PageSourceSearch

https://netnr.com/chunks/7582.d2ef18581735ae742a12.js

js netnr.com collected 2026-09-29 05:50:27 UTC 2,783,927 bytes, 678 lines download raw bytes

1"use strict";(self.webpackChunknetnr=self.webpackChunknetnr||[]).push([[7582],{47582(e,t,i){let s,r,a;i.r(t),i.d(t,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>hP,AbstractHeaderCellCtrl:()=>aq,AdvancedFilterModule:()=>Rt,AgAbstractField:()=>rt,AgAbstractInputField:()=>ri,AgAbstractLabel:()=>re,AgCheckbox:()=>rs,AgCheckboxSelector:()=>rr,AgColumn:()=>t4,AgColumnGroup:()=>iw,AgDialog:()=>Av,AgGroupComponent:()=>Ae,AgGroupComponentSelector:()=>As,AgInputDateField:()=>n6,AgInputNumberField:()=>ay,AgInputNumberFieldSelector:()=>aw,AgInputTextArea:()=>nZ,AgInputTextField:()=>af,AgInputTextFieldSelector:()=>aC,AgMenuItemComponent:()=>Ay,AgMenuItemRenderer:()=>I7,AgMenuList:()=>Af,AgMenuPanel:()=>AC,AgPanel:()=>Am,AgPickerField:()=>ah,AgPrimaryCols:()=>P4,AgPromise:()=>rm,AgProvidedColumnGroup:()=>tO,AgRadioButton:()=>an,AgRichSelect:()=>Au,AgSelect:()=>ad,AgSelectSelector:()=>au,AgToggleButton:()=>lD,AgToggleButtonSelector:()=>lE,AnimateShowChangeCellRenderer:()=>s8,AnimateSlideCellRenderer:()=>s7,AnimationFrameService:()=>n_,AriaAnnouncementService:()=>hU,AutoScrollService:()=>rK,AutoWidthCalculator:()=>lp,BarColumnLabelPlacement:()=>dd,BaseComponentWrapper:()=>dl,BaseCreator:()=>dS,BaseGridSerializingSession:()=>dx,BeanStub:()=>tk,BodyDropPivotTarget:()=>oS,BodyDropTarget:()=>oA,CellComp:()=>nR,CellCtrl:()=>nr,CellNavigationService:()=>lN,CellPositionUtils:()=>l1,CellRangeType:()=>o9,ChangedPath:()=>hQ,ChartMappings:()=>dh,CheckboxCellEditor:()=>lt,CheckboxCellRenderer:()=>ra,CheckboxSelectionComponent:()=>o2,ClientSideRowModelModule:()=>db,ClientSideRowModelSteps:()=>n$,ClipboardModule:()=>F_,ColumnApplyStateService:()=>io,ColumnAutosizeService:()=>ir,ColumnFactory:()=>t8,ColumnKeyCreator:()=>t5,ColumnModel:()=>t9,ColumnMoveService:()=>ih,ColumnNameService:()=>im,ColumnSizeService:()=>iC,ColumnsToolPanelModule:()=>P7,CommunityFeaturesModule:()=>hL,Component:()=>s$,ComponentUtil:()=>iL,Context:()=>rj,CssClassManager:()=>iO,CsvCreator:()=>dI,CsvExportModule:()=>dF,CtrlsService:()=>l0,DataTypeService:()=>hn,DateCellEditor:()=>n7,DateFilter:()=>aj,DateStringCellEditor:()=>le,Downloader:()=>dM,DragAndDropService:()=>rY,DragService:()=>rQ,DragSourceType:()=>r$,EnterpriseCoreModule:()=>I9,Environment:()=>l8,EventService:()=>he,ExcelExportModule:()=>Nr,ExcelFactoryMode:()=>rW,ExpansionService:()=>nY,ExpressionService:()=>h4,FakeHScrollComp:()=>oY,FakeVScrollComp:()=>oq,FilterManager:()=>r6,FilterWrapperComp:()=>r5,FiltersToolPanelModule:()=>Nd,FocusService:()=>hi,FuncColsService:()=>ia,GROUP_AUTO_COLUMN_ID:()=>tz,Grid:()=>dt,GridBodyComp:()=>nN,GridBodyCtrl:()=>nA,GridChartsModule:()=>FN,GridComp:()=>ha,GridCoreCreator:()=>ds,GridCoreModule:()=>hT,GridCtrl:()=>hr,GridHeaderComp:()=>oV,GridHeaderCtrl:()=>ow,GridOptionsService:()=>hB,GridSerializer:()=>dR,GroupCellRenderer:()=>AD,GroupCellRendererCtrl:()=>Ax,GroupInstanceIdCreator:()=>ib,HeaderCellCtrl:()=>oL,HeaderFilterCellComp:()=>op,HeaderFilterCellCtrl:()=>aX,HeaderGroupCellCtrl:()=>ok,HeaderNavigationDirection:()=>oC,HeaderNavigationService:()=>oy,HeaderPositionUtils:()=>hz,HeaderRowComp:()=>of,HeaderRowContainerComp:()=>oz,HeaderRowContainerCtrl:()=>oG,HeaderRowCtrl:()=>oO,HeaderRowType:()=>ov,HorizontalDirection:()=>r_,HorizontalResizeService:()=>nj,InfiniteRowModelModule:()=>dX,KeyCode:()=>s9,LargeTextCellEditor:()=>nQ,LayoutCssClasses:()=>oj,LicenseManager:()=>I8,LocalEventService:()=>el,LocaleService:()=>hV,ManagedFocusFeature:()=>ai,MasterDetailModule:()=>NC,MenuModule:()=>NV,MenuService:()=>nK,ModuleNames:()=>eh,ModuleRegistry:()=>rV,MouseEventService:()=>nV,MoveColumnFeature:()=>oI,MultiFilter:()=>NH,MultiFilterModule:()=>N_,NavigationService:()=>nH,NumberCellEditor:()=>n4,NumberFilter:()=>aD,NumberSequence:()=>sL,OverlayWrapperComponent:()=>oU,PillDragComp:()=>Ac,PillDropZonePanel:()=>Ap,PinnedRowModel:()=>lf,PivotDropZonePanel:()=>F5,PivotResultColsService:()=>iv,PopupComponent:()=>ru,PopupEditorWrapper:()=>nX,PopupService:()=>lF,PositionableFeature:()=>ae,PropertyKeys:()=>iR,ProvidedFilter:()=>ao,RangeSelectionModule:()=>Rc,RefPlaceholder:()=>s_,ResizeObserverService:()=>nU,RichSelectModule:()=>NY,RowContainerComp:()=>nL,RowContainerCtrl:()=>nE,RowCtrl:()=>nn,RowDragComp:()=>rX,RowGroupDropZonePanel:()=>F8,RowGroupingModule:()=>PT,RowHighlightPosition:()=>rZ,RowModelHelperService:()=>dr,RowNode:()=>r4,RowNodeBlock:()=>lw,RowNodeBlockLoader:()=>lb,RowNodeSorter:()=>hq,RowPositionUtils:()=>l3,RowRenderer:()=>lm,RowType:()=>dA,ScalarFilter:()=>ag,ScrollVisibleService:()=>nG,SelectCellEditor:()=>nJ,SelectableService:()=>hJ,SelectionHandleType:()=>o7,ServerSideRowModelModule:()=>Ol,ServerSideTransactionResultStatus:()=>ly,SetFilter:()=>Ow,SetFilterModule:()=>OI,SetLeftFeature:()=>aW,SideBarModule:()=>PZ,SimpleFilter:()=>ap,SortController:()=>h1,SortIndicatorComp:()=>s2,SortIndicatorSelector:()=>s3,SparklinesModule:()=>GC,StandardMenuFactory:()=>nW,StatusBarModule:()=>GL,StylingService:()=>lM,TabGuardClassNames:()=>lI,TabGuardComp:()=>lT,TabGuardCtrl:()=>lA,TabGuardFeature:()=>lR,TabbedLayout:()=>AS,TextCellEditor:()=>n2,TextFilter:()=>aR,TextFloatingFilter:()=>os,ToolPanelColDefService:()=>Pk,TooltipFeature:()=>sW,TooltipStateManager:()=>sj,TouchListener:()=>sJ,UserComponentFactory:()=>rG,UserComponentRegistry:()=>rg,ValueCache:()=>h6,ValueService:()=>h5,ValuesDropZonePanel:()=>PL,VanillaFrameworkOverrides:()=>lk,VerticalDirection:()=>rU,ViewportRowModelModule:()=>GP,VirtualList:()=>An,VirtualListDragFeature:()=>Ab,VisibleColsService:()=>iS,XmlFactory:()=>
1dN,ZipContainer:()=>d$,_ColumnFilterModule:()=>oo,_CommunityMenuApiModule:()=>hc,_CsrmSsrmSharedApiModule:()=>da,_CsvExportCoreModule:()=>dL,_EditCoreModule:()=>ld,_EmptyBean:()=>ik,_FilterCoreModule:()=>oa,_FloatingFilterModule:()=>ol,_ReadOnlyFloatingFilterModule:()=>oh,_RowNodeBlockModule:()=>lS,_SsrmInfiniteSharedApiModule:()=>dn,_addFocusableContainerListener:()=>hv,_areEqual:()=>tg,_bindCellRendererToHtmlElement:()=>sT,_capitalise:()=>ip,_clearElement:()=>sm,_cloneObject:()=>tZ,_combineAttributesAndGridOptions:()=>iF,_compose:()=>eS,_createIcon:()=>sZ,_createIconNoSpan:()=>sq,_debounce:()=>ey,_defaultComparator:()=>eF,_defineModule:()=>aJ,_doOnce:()=>eu,_errorOnce:()=>eg,_escapeString:()=>ig,_exists:()=>eM,_existsAndNotEmpty:()=>tc,_flatten:()=>tx,_forEachReverse:()=>tD,_formatNumberCommas:()=>ak,_formatNumberTwoDecimalPlacesAndCommas:()=>aP,_fuzzySuggestions:()=>rp,_getAbsoluteHeight:()=>sd,_getAbsoluteWidth:()=>su,_getActiveDomElement:()=>eZ,_getAllValuesInObject:()=>tQ,_getAriaPosInSet:()=>iH,_getCtrlForEventTarget:()=>tF,_getDocument:()=>e$,_getFillHandle:()=>ts,_getGlobalGridOption:()=>h9,_getGrandTotalRow:()=>e1,_getGroupAggFiltering:()=>e0,_getGroupSelection:()=>th,_getGroupSelectsDescendants:()=>td,_getGroupTotalRowCallback:()=>e2,_getHeaderCheckbox:()=>e8,_getHeaderClassesFromColDef:()=>aU,_getInnerHeight:()=>sl,_getInnerWidth:()=>sh,_getIsRowSelectable:()=>to,_getRowContainerOptions:()=>nf,_getRowHeightAsNumber:()=>ej,_getRowHeightForNode:()=>eH,_getRowIdCallback:()=>e6,_getRowSelectionMode:()=>tn,_getSuppressMultiRanges:()=>te,_getToolPanelClassesFromColDef:()=>a_,_includes:()=>tS,_insertArrayIntoArray:()=>tw,_insertIntoArray:()=>ty,_isAnimateRows:()=>eQ,_isCellSelectionEnabled:()=>tt,_isClientSideRowModel:()=>eN,_isColumnsSortingCoupledToGroup:()=>eJ,_isDomLayout:()=>eG,_isElementInEventPath:()=>tP,_isEventFromPrintableCharacter:()=>am,_isGetRowHeightFunction:()=>eV,_isGroupMultiAutoColumn:()=>e3,_isGroupUseEntireRow:()=>e4,_isIOSUserAgent:()=>sO,_isMultiRowSelection:()=>tl,_isNodeOrElement:()=>sI,_isNothingFocused:()=>eq,_isRowSelection:()=>eB,_isServerSideRowModel:()=>eO,_isStopPropagationForAgGrid:()=>tT,_isUsingNewCellSelectionAPI:()=>e9,_isUsingNewRowSelectionAPI:()=>e7,_isVisible:()=>sC,_iterateObject:()=>tK,_jsonEquals:()=>eL,_last:()=>tp,_loadTemplate:()=>sy,_log:()=>ec,_makeNull:()=>ex,_mergeDeep:()=>tX,_missing:()=>eD,_missingOrEmpty:()=>eE,_parseDateTimeFromString:()=>aB,_processOnChange:()=>iP,_radioCssClass:()=>se,_removeAriaExpanded:()=>iq,_removeAriaSort:()=>i6,_removeFromArray:()=>tC,_removeFromParent:()=>sv,_removeRepeatsFromArray:()=>tv,_serialiseDate:()=>aN,_setAriaActiveDescendant:()=>iK,_setAriaChecked:()=>i8,_setAriaColCount:()=>i1,_setAriaColIndex:()=>i2,_setAriaColSpan:()=>i3,_setAriaControls:()=>i7,_setAriaDescribedBy:()=>iU,_setAriaDisabled:()=>i$,_setAriaExpanded:()=>iZ,_setAriaHidden:()=>iY,_setAriaLabel:()=>ij,_setAriaLabelledBy:()=>iW,_setAriaLevel:()=>i_,_setAriaPosInSet:()=>iX,_setAriaRole:()=>iV,_setAriaRowCount:()=>iJ,_setAriaRowIndex:()=>i0,_setAriaSelected:()=>i5,_setAriaSetSize:()=>iQ,_setAriaSort:()=>i4,_setDisabled:()=>sa,_setDisplayed:()=>ss,_setFixedWidth:()=>sM,_setVisible:()=>sr,_shallowCompare:()=>tm,_stopPropagationForAgGrid:()=>tR,_toStringOrNull:()=>eI,_unwrapUserComp:()=>rB,_utf8_encode:()=>ic,_values:()=>eP,_waitUntil:()=>eb,_warnOnce:()=>ep,agCharts:()=>FO,checkboxStyleDefault:()=>uw,colorSchemeDark:()=>uM,colorSchemeDarkBlue:()=>uE,colorSchemeDarkWarm:()=>uD,colorSchemeLight:()=>ub,colorSchemeLightCold:()=>ux,colorSchemeLightWarm:()=>uS,createGrid:()=>de,createPart:()=>d1,createTheme:()=>uo,exportMultipleSheetsAsExcel:()=>k7,getDefaultFloatingFilterType:()=>a1,getMultipleSheetsAsExcel:()=>k8,getParamType:()=>d8,iconSetAlpine:()=>uI,iconSetMaterial:()=>uA,iconSetQuartz:()=>uF,iconSetQuartzBold:()=>uN,iconSetQuartzLight:()=>uP,iconSetQuartzRegular:()=>uk,inputStyleBase:()=>uO,inputStyleBordered:()=>uG,inputStyleUnderlined:()=>uB,isColumn:()=>t3,isColumnControlsCol:()=>tU,isColumnGroup:()=>iy,isColumnGroupAutoCol:()=>tW,isProvidedColumnGroup:()=>tN,isSelectionUIEvent:()=>hk,paramValueToCss:()=>ur,provideGlobalGridOptions:()=>h7,tabStyleAlpine:()=>uj,tabStyleBase:()=>uz,tabStyleMaterial:()=>uH,tabStyleQuartz:()=>uV,tabStyleRolodex:()=>uW,themeAlpine:()=>u$,themeBalham:()=>uY,themeQuartz:()=>u_});var o,n,l,h,d,u,c,p,g,m,v,f,C,y,w,b,S,x,M,D,E,I,A,R,T,L,F,P,k,N,O,G,B,z,V,H,j,W,U,_,$,Y,K,Z,q,Q,X,J,ee,et,ei,es,er,ea,eo,en={};
1i.r(en),i.d(en,{AG_CHARTS_LOCALE_EN_US:()=>uX,AgCharts:()=>Ih,AgErrorBarSupportedSeriesTypes:()=>uJ,AgTooltipPositionType:()=>u1,ICONS_LEGACY:()=>u0,Marker:()=>wY,VERSION:()=>Cm,_ModuleSupport:()=>IR,_Scale:()=>II,_Scene:()=>Ip,_Theme:()=>ID,_Util:()=>IA,setupCommunityModules:()=>Ic,time:()=>u2});var el=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){let s=t?this.allAsyncListeners:this.allSyncListeners,r=s.get(e);return!r&&i&&(r=new Set,s.set(e,r)),r}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){let s=this.getListeners(e,i,!1);s&&(s.delete(t),0===s.size&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){var i;let s=e.type;if(t&&"event"in e){let t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}let r=(i,s)=>i.forEach(i=>{if(!s.has(i))return;let r=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(e)):()=>i(e);t?this.dispatchAsync(r):r()}),a=null!=(i=this.getListeners(s,t,!1))?i:new Set,o=new Set(a);o.size>0&&r(o,a),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(i=>{let r=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(s,e)):()=>i(s,e);t?this.dispatchAsync(r):r()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(e=>e())}},eh=((o=eh||{}).CommunityCoreModule="@ag-grid-community/core",o.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",o.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",o.CsvExportModule="@ag-grid-community/csv-export",o.EnterpriseCoreModule="@ag-grid-enterprise/core",o.RowGroupingModule="@ag-grid-enterprise/row-grouping",o.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",o.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",o.MenuModule="@ag-grid-enterprise/menu",o.SetFilterModule="@ag-grid-enterprise/set-filter",o.MultiFilterModule="@ag-grid-enterprise/multi-filter",o.StatusBarModule="@ag-grid-enterprise/status-bar",o.SideBarModule="@ag-grid-enterprise/side-bar",o.RangeSelectionModule="@ag-grid-enterprise/range-selection",o.MasterDetailModule="@ag-grid-enterprise/master-detail",o.RichSelectModule="@ag-grid-enterprise/rich-select",o.GridChartsModule="@ag-grid-enterprise/charts",o.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",o.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",o.ExcelExportModule="@ag-grid-enterprise/excel-export",o.ClipboardModule="@ag-grid-enterprise/clipboard",o.SparklinesModule="@ag-grid-enterprise/sparklines",o.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",o.AngularModule="@ag-grid-community/angular",o.ReactModule="@ag-grid-community/react",o.VueModule="@ag-grid-community/vue",o),ed={};function eu(e,t){ed[t]||(e(),ed[t]=!0)}function ec(e,...t){console.log("AG Grid: "+e,...t)}function ep(e,...t){eu(()=>console.warn("AG Grid: "+e,...t),e+(null==t?void 0:t.join("")))}function eg(e,...t){eu(()=>console.error("AG Grid: "+e,...t),e+(null==t?void 0:t.join("")))}function em(e){return!!(e&&e.constructor&&e.call&&e.apply)}var ev=[],ef=!1;function eC(e){ev.push(e),ef||(ef=!0,window.setTimeout(()=>{let e=ev.slice();
1ev.length=0,ef=!1,e.forEach(e=>e())},0))}function ey(e,t){let i;return function(...s){let r=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(r,s)},t)}}function ew(e,t){let i=0;return function(...s){let r=(new Date).getTime();r-i<t||(i=r,e.apply(this,s))}}function eb(e,t,i=100,s){let r=(new Date).getTime(),a=null,o=!1,n=()=>{let n=(new Date).getTime()-r>i;(e()||n)&&(t(),o=!0,null!=a&&(window.clearInterval(a),a=null),n&&s&&ep(s))};n(),o||(a=window.setInterval(n,10))}function eS(...e){return t=>e.reduce((e,t)=>t(e),t)}function ex(e){return null==e||""===e?null:e}function eM(e,t=!1){return null!=e&&(""!==e||t)}function eD(e){return!eM(e)}function eE(e){return null==e||0===e.length}function eI(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function eA(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;let t=parseInt(e,10);return isNaN(t)?void 0:t}function eR(e){if(void 0!==e)return null!==e&&""!==e&&eT(e)}function eT(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)}function eL(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function eF(e,t,i=!1){var s,r,a,o;let n=null==e,l=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&l)return 0;if(n)return -1;if(l)return 1;if("string"!=typeof e||!i){return(s=e)>(r=t)?1:s<r?-1:0}try{return e.localeCompare(t)}catch{return(a=e)>(o=t)?1:a<o?-1:0}}function eP(e){if(e instanceof Set||e instanceof Map){let t=[];return e.forEach(e=>t.push(e)),t}return Object.values(e)}function ek(e,t){return e.get("rowModelType")===t}function eN(e){return ek(e,"clientSide")}function eO(e){return ek(e,"serverSide")}function eG(e,t){return e.get("domLayout")===t}function eB(e){return void 0!==tn(e)}function ez(e){return!e.get("suppressAsyncEvents")}function eV(e){return"function"==typeof e.get("getRowHeight")}function eH(e,t,i=!1,s){if(null==s&&(s=e.environment.getDefaultRowHeight()),eV(e)){if(i)return{height:s,estimated:!0};let r={node:t,data:t.data},a=e.getCallback("getRowHeight")(r);if(eW(a))return 0===a&&ep("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,a),estimated:!1}}if(t.detail&&e.get("masterDetail")){var r=e;if(r.get("detailRowAutoHeight"))return{height:1,estimated:!1};let t=r.get("detailRowHeight");return eW(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}let a=e.get("rowHeight");return{height:a&&eW(a)?a:s,estimated:!1}}function ej(e){let{environment:t}=e,i=e.get("rowHeight");if(!i||eD(i))return t.getDefaultRowHeight();let s=t.refreshRowHeightVariable();return -1!==s?s:(ep("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function eW(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}function eU(e,t,i){let s=t[e.getDomDataKey()];return s?s[i]:void 0}function e_(e,t,i,s){let r=e.getDomDataKey(),a=t[r];eD(a)&&(a={},t[r]=a),a[i]=s}function e$(e){let t=null,i=e.get("getDocument");return(i&&eM(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&eM(t))?t:document}function eY(e){return e$(e).defaultView||window}function eK(e){return e.eGridDiv.getRootNode()}function eZ(e){return eK(e).activeElement}function eq(e){let t=e$(e),i=eZ(e);return null===i||i===t.body}function eQ(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function eX(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||eG(e,"print"))}function eJ(e){let t=e.get("autoGroupColumnDef");return!(null!=t&&t.comparator)&&!e.get("treeData")}function e0(e){let t=e.get("groupAggFiltering");return"function"==typeof t?e.getCallback("groupAggFiltering"):!0===t?()=>!0:void 0}function e1(e){let t=e.get("grandTotalRow");return t||(e.get("groupIncludeTotalFooter")?"bottom":void 0)}function e2(e){let t=e.get("groupTotalRow");if("function"==typeof t)return e.getCallback("groupTotalRow");if(t)return()=>t;let i=e.get("groupIncludeFooter");if("function"==typeof i){let t=e.getCallback("groupIncludeFooter");return e=>t(e)?"bottom":void 0}return()=>i?"bottom":void 0}function e3(e){return e.exists("groupDisplayType")?"multipleColumns"===e.get("groupDisplayType"):e.get("groupHideOpenParents")}function e4(e,t){return!t&&"groupRows"===e.get("groupDisplayType")}function e6(e){let t=e.getCallback("getRowId");return void 0===t?t:e=>{let i=t(e);return"string"!=typeof i&&(ep("The getRowId callback must return a string. The ID ",i," is being cast to a string."),i=String(i)),i}}function e5(e){var t;return null==(t=null==e?void 0:e.checkboxes)||t}function e8(e){var t;return(null==e?void 0:e.mode)==="multiRow"&&(null==(t=e.headerCheckbox)||t)}function e7(e){return"string"!=typeof e.get("rowSelection")}
1function e9(e){return void 0!==e.get("cellSelection")}function te(e){var t;let i=e.get("cellSelection");return void 0===i?e.get("suppressMultiRangeSelection"):"boolean"!=typeof i&&null!=(t=null==i?void 0:i.suppressMultiRanges)&&t}function tt(e){let t=e.get("cellSelection");return void 0!==t?!!t:e.get("enableRangeSelection")}function ti(e){var t;let i=e.get("cellSelection");return void 0===i?e.get("enableFillHandle"):"boolean"!=typeof i&&(null==(t=i.handle)?void 0:t.mode)==="fill"}function ts(e){var t;let i=e.get("cellSelection");return void 0===i?{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}:"boolean"!=typeof i&&(null==(t=i.handle)?void 0:t.mode)==="fill"?i.handle:void 0}function tr(e){var t,i;let s=null!=(t=e.get("rowSelection"))?t:"single";if("string"==typeof s){let t=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return(!t||!i)&&(t?"enableDeselection":!i||"enableSelection")}return("singleRow"===s.mode||"multiRow"===s.mode)&&null!=(i=s.enableClickSelection)&&i}function ta(e){let t=tr(e);return!0===t||"enableDeselection"===t}function to(e){let t=e.get("rowSelection");return"string"==typeof t?e.get("isRowSelectable"):null==t?void 0:t.isRowSelectable}function tn(e){let t=e.get("rowSelection");if("string"==typeof t)switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return null==t?void 0:t.mode}function tl(e){return"multiRow"===tn(e)}function th(e){let t=e.get("rowSelection");if("string"==typeof t){let t=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return t&&i?"filteredDescendants":t?"descendants":"self"}return(null==t?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function td(e){let t=th(e);return"descendants"===t||"filteredDescendants"===t}function tu(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function tc(e){return null!=e&&e.length>0}function tp(e){if(e&&e.length)return e[e.length-1]}function tg(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((e,s)=>i?i(e,t[s]):t[s]===e)}function tm(e,t){return tg(e,t)}function tv(e,t){if(e)for(let i=e.length-2;i>=0;i--){let s=e[i]===t,r=e[i+1]===t;s&&r&&e.splice(i+1,1)}}function tf(e,t){let i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function tC(e,t){let i=e.indexOf(t);i>=0&&e.splice(i,1)}function ty(e,t,i){e.splice(i,0,t)}function tw(e,t,i){if(null!=e&&null!=t)for(let s=t.length-1;s>=0;s--)ty(e,t[s],i)}function tb(e,t,i){for(let i=0;i<t.length;i++)tC(e,t[i]);t.slice().reverse().forEach(t=>ty(e,t,i))}function tS(e,t){return e.indexOf(t)>-1}function tx(e){var t;return null!=(t=null==e?void 0:e.flatMap(e=>e))?t:[]}function tM(e,t){null!=t&&null!=e&&t.forEach(t=>e.push(t))}function tD(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i)}var tE="__ag_Grid_Stop_Propagation",tI=["touchstart","touchend","touchmove","touchcancel","scroll"],tA={};function tR(e){e[tE]=!0}function tT(e){return!0===e[tE]}var tL=(s={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},e=>{if("boolean"==typeof tA[e])return tA[e];let t=document.createElement(s[e]||"div");return tA[e="on"+e]=e in t});function tF(e,t,i){let s=t;for(;s;){let t=eU(e,s,i);if(t)return t;s=s.parentElement}return null}function tP(e,t){return!!t&&!!e&&(function(e){if(e.path)return e.path;if(e.composedPath)return e.composedPath();let t=[],i=e.target;for(;i;)t.push(i),i=i.parentElement;return t})(t).indexOf(e)>=0}var tk=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new el),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}
1addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){let i=[];for(let s in t){let r=t[s];r&&i.push(this._setupListener(e,s,r))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;if(e instanceof HTMLElement){var s;let r;s=this.getFrameworkOverrides(),r=tS(tI,t),s&&s.addEventListener&&s.addEventListener(e,t,i,r?{passive:!0}:void 0)}else e.addEventListener(t,i);let r=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==r),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);let i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let i=e.join("-")+this.propertyListenerId++,s=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}t({type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source})};e.forEach(e=>this.setupGridOptionListener(e,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){let 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 tN(e){return e instanceof tO}var tO=class extends tk{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=t2++,this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}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}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(e=>e.isVisible())}isPadding(){return this.padding}setExpanded(e){this.expanded=void 0!==e&&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(){let e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{t3(t)?e.push(t):tN(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1,s=this.findChildrenRemovingPadding();for(let r=0,a=s.length;r<a;r++){let a=s[r];if(!a.isVisible())continue;let o=a.getColumnGroupShow();"open"===o?(e=!0,i=!0):"closed"===o?(t=!0,i=!0):(e=!0,t=!0)}let r=e&&t&&i;this.expandable!==r&&(this.expandable=r,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){let e=[],t=i=>{i.forEach(i=>{tN(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},tG="ag-Grid-ControlsColumn",tB=class extends tk{constructor(){super(...arguments),this.beanName="
1controlsColService"}isControlsColEnabled(){let{gos:e}=this,t=e.get("rowSelection");if(!t||"object"!=typeof t)return!1;let i=e5(t),s=e8(t);return!!(i||s)}createControlsCols(){if(!this.isControlsColEnabled())return[];let{gos:e}=this,t=e.get("selectionColumnDef"),i={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(e,t,i,s){let r=i.isSelected(),a=s.isSelected();return r&&a?0:r?1:-1},editable:!1,suppressFillHandle:!0,...t,colId:`${tG}`},s=new t4(i,null,i.colId,!1);return this.createBean(s),[s]}},tz="ag-Grid-AutoColumn";function tV(e){let t=[],i=e=>{for(let s=0;s<e.length;s++){let r=e[s];t3(r)?t.push(r):tN(r)&&i(r.getChildren())}};return i(e),t}function tH(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}function tj(e,t,i){let s={};if(!t)return;t7(null,t,e=>{s[e.getInstanceId()]=e}),i&&t7(null,i,e=>{s[e.getInstanceId()]=null});let r=Object.values(s).filter(e=>null!=e);e.destroyBeans(r)}function tW(e){return e.getId().startsWith(tz)}function tU(e){return e.getColId().startsWith(tG)}function t_(e){let t=[];return e instanceof Array?e.some(e=>"string"!=typeof e)?ep("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:"string"==typeof e?t=e.split(","):ep("colDef.type should be of type 'string' | 'string[]'"),t}var t$=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e,t){let{frameworkOverrides:i,wrappedListeners:s}=this,r=t;if(i.shouldWrapOutgoing){r=e=>{i.wrapOutgoing(()=>t(e))};let a=s.get(e);a||(a=new Map,s.set(e,a)),a.set(t,r)}return r}wrapGlobal(e){let{frameworkOverrides:t,wrappedGlobalListeners:i}=this,s=e;return t.shouldWrapOutgoing&&(s=(i,s)=>{t.wrapOutgoing(()=>e(i,s))},i.set(e,s)),s}unwrap(e,t){let{wrappedListeners:i}=this,s=i.get(e);if(s){let r=s.get(t);if(r)return s.delete(t),0===s.size&&i.delete(e),r}return t}unwrapGlobal(e){let{wrappedGlobalListeners:t}=this,i=t.get(e);return i?(t.delete(e),i):e}},tY=new Set(["__proto__","constructor","prototype"]);function tK(e,t){if(null!=e){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(let[i,s]of Object.entries(e))tY.has(i)||t(i,s)}}function tZ(e){let t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(tY.has(i[s]))continue;let r=i[s],a=e[r];t[r]=a}return t}function tq(e,t){if(!e)return;let i={};return Object.keys(e).forEach(s=>{if(t&&t.indexOf(s)>=0||tY.has(s))return;let r=e[s];t0(r)&&r.constructor===Object?i[s]=tq(r):i[s]=r}),i}function tQ(e){if(!e)return[];let t=Object;if("function"==typeof t.values)return t.values(e);let i=[];for(let t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&i.push(e[t]);return i}function tX(e,t,i=!0,s=!1){eM(t)&&tK(t,(t,r)=>{if(tY.has(t))return;let a=e[t];a!==r&&(s&&null==a&&null!=r&&"object"==typeof r&&r.constructor===Object&&(a={},e[t]=a),t0(r)&&t0(a)&&!Array.isArray(a)?tX(a,r,i,s):(i||void 0!==r)&&(e[t]=r))})}function tJ(e,t,i){if(!t||!e)return;if(!i)return e[t];let s=t.split("."),r=e;for(let e=0;e<s.length;e++){if(null==r)return;r=r[s[e]]}return r}function t0(e){return"object"==typeof e&&null!==e}var t1={resizable:!0,sortable:!0},t2=0;function t3(e){return e instanceof t4}var t4=class extends tk{constructor(e,t,i,s){super(),this.isColumn=!0,this.instanceId=t2++,this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new el,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){void 0!==e.sort?("asc"===e.sort||"desc"===e.sort)&&(this.sort=e.sort):("asc"===e.initialSort||"desc"===e.initialSort)&&(this.sort=e.initialSort);let t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortIndex=i);let s=e.hide,r=e.initialHide;void 0!==s?this.visible=!s:this.visible=!r,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);let a=e.flex,o=e.initialFlex;void 0!==a?this.flex=a:void 0!==o&&(this.flex=o)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){let e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=eM(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=eM(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){var e,t;let i=this.colDef;this.minWidth=null!=(e=i.minWidth)?e:this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=null!=(t=i.maxWidth)?t:Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=eM(this.colDef.tooltipField)||eM(this.colDef.tooltipValueGetter)||eM(this.colDef.tooltipComponent)}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t=eA(e.width),i=eA(e.initialWidth);return Math.max(Math.min(null!=t?t:null!=i?i:200,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(eD(this.colDef)||eD(this.colDef.showRowGroup))return!1;let t=!0===this.colDef.showRowGroup,i=this.colDef.showRowGroup===e;return t||i}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){var i,s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new t$(this.frameworkOverrides));let r=null!=(i=null==(s=this.frameworkEventListenerService)?void 0:s.wrap(e,t))?i:t;this.columnEventService.addEventListener(e,r)}removeEventListener(e,t){var i,s;let r=null!=(i=null==(s=this.frameworkEventListenerService)?void 0:s.unwrap(e,t))?i:t;this.columnEventService.removeEventListener(e,r)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){let t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}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){let t=this.gos.get("rowSelection");if(!t||"string"==typeof t)return this.isColumnFunc(e,this.colDef.checkboxSelection);{let i=tU(this)&&e5(t);return this.isColumnFunc(e,i)}}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){var t;return null!=(t=this.colDef[e])?t:t1[e]}isColumnFunc(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return eD(this.sort)}isSorting(){return eM(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}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.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));let s=this.createColumnEvent("filterChanged",t);i&&tX(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){!0===e||"left"===e?this.pinned="left":"right"===e?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){let i=!0===e;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}
1isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,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){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(eD(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e);return Math.max(this.colDef.colSpan(t),1)}getRowSpan(e){if(eD(this.colDef.rowSpan))return 1;let t=this.createBaseColDefParams(e);return Math.max(this.colDef.rowSpan(t),1)}setActualWidth(e,t,i=!1){e=Math.min(e=Math.max(e,this.minWidth),this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},t6={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},t5=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=eI(e);let i=0;for(;;){let s;if(e?(s=e,0!==i&&(s+="_"+i)):t?(s=t,0!==i&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},t8=class extends tk{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,s){let r=new t5,{existingCols:a,existingGroups:o,existingColKeys:n}=this.extractExistingTreeData(i);r.addExistingKeys(n);let l=this.recursivelyCreateColumns(e,0,t,a,r,o,s),h=this.findMaxDept(l,0),d=this.balanceColumnTree(l,0,h,r);return t7(null,d,(e,t)=>{tN(e)&&e.setupExpandable(),e.setOriginalParent(t)}),{columnTree:d,treeDept:h}}extractExistingTreeData(e){let t=[],i=[],s=[];return e&&t7(null,e,e=>{tN(e)?i.push(e):(s.push(e.getId()),t.push(e))}),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){let i=[],s=this.findDepth(t);return e.forEach(e=>{let t=e;for(let i=s-1;i>=0;i--){let s=new tO(null,`FAKE_PATH_${e.getId()}}_${i}`,!0,i);this.createBean(s),s.setChildren([t]),t.setOriginalParent(s),t=s}0===s&&e.setOriginalParent(null),i.push(t)}),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&tN(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){let r=[];for(let a=0;a<e.length;a++){let o=e[a];if(tN(o)){let e=this.balanceColumnTree(o.getChildren(),t+1,i,s);o.setChildren(e),r.push(o)}else{let a,n;for(let e=i-1;e>=t;e--){let e=s.getUniqueKey(null,null),i=new tO(this.createMergedColGroupDef(null),e,!0,t);this.createBean(i),n&&n.setChildren([i]),n=i,a||(a=n)}if(a&&n){if(r.push(a),e.some(e=>tN(e))){n.setChildren([o]);continue}n.setChildren(e);break}r.push(o)}}return r}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;
1s++){let r=e[s];if(tN(r)){let e=this.findMaxDept(r.getChildren(),t+1);i<e&&(i=e)}}return i}recursivelyCreateColumns(e,t,i,s,r,a,o){if(!e)return[];let n=Array(e.length);for(let l=0;l<n.length;l++){let h=e[l];this.isColumnGroup(h)?n[l]=this.createColumnGroup(i,h,t,s,r,a,o):n[l]=this.createColumn(i,h,s,r,o)}return n}createColumnGroup(e,t,i,s,r,a,o){let n=this.createMergedColGroupDef(t),l=r.getUniqueKey(n.groupId||null,null),h=new tO(n,l,!1,i);this.createBean(h);let d=this.findExistingGroup(t,a);d&&a.splice(d.idx,1);let u=null==d?void 0:d.group;u&&h.setExpanded(u.isExpanded());let c=this.recursivelyCreateColumns(n.children,i+1,e,s,r,a,o);return h.setChildren(c),h}createMergedColGroupDef(e){let t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,r){var a;let o=this.findExistingColumn(t,i);o&&(null==i||i.splice(o.idx,1));let n=null==o?void 0:o.column;if(n){let e=this.addColumnDefaultAndTypes(t,n.getColId());n.setColDef(e,t,r),this.applyColumnState(n,e,r)}else{let i=s.getUniqueKey(t.colId,t.field);n=new t4(this.addColumnDefaultAndTypes(t,i),t,i,e),this.createBean(n)}return null==(a=this.dataTypeService)||a.addColumnListeners(n),n}applyColumnState(e,t,i){let s=eA(t.flex);if(void 0!==s&&e.setFlex(s),0>=e.getFlex()){let s=eA(t.width);if(null!=s)e.setActualWidth(s,i);else{let t=e.getActualWidth();e.setActualWidth(t,i)}}void 0!==t.sort&&("asc"==t.sort||"desc"==t.sort?e.setSort(t.sort,i):e.setSort(void 0,i));let r=eA(t.sortIndex);void 0!==r&&e.setSortIndex(r);let a=eR(t.hide);void 0!==a&&e.setVisible(!a,i),void 0!==t.pinned&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){let s=t[i].getUserProvidedColDef();if(s){if(null!=e.colId){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}
1if(null!=e.field){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}}findExistingGroup(e,t){if(null!=e.groupId)for(let i=0;i<t.length;i++){let s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}addColumnDefaultAndTypes(e,t){var i;let s={};tX(s,this.gos.get("defaultColDef"),!1,!0);let r=this.updateColDefAndGetColumnType(s,e,t);r&&this.assignColumnTypes(r,s),tX(s,e,!1,!0);let a=this.gos.get("autoGroupColumnDef"),o=eJ(this.gos);return e.rowGroup&&a&&o&&tX(s,{sort:a.sort,initialSort:a.initialSort},!1,!0),null==(i=this.dataTypeService)||i.validateColDef(s),s}updateColDefAndGetColumnType(e,t,i){var s,r,a;let o=null==(s=this.dataTypeService)?void 0:s.updateColDefAndGetColumnType(e,t,i),n=null!=(r=null!=(a=t.type)?a:o)?r:e.type;return e.type=n,n?t_(n):void 0}assignColumnTypes(e,t){if(!e.length)return;let i=Object.assign({},t6);tK(this.gos.get("columnTypes")||{},(e,t)=>{e in i?ep(`the column type '${e}' is a default column type and cannot be overridden.`):(t.type&&ep("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."),i[e]=t)}),e.forEach(e=>{let s=i[e.trim()];s?tX(t,s,!1,!0):ep("colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return void 0!==e.children}};function t7(e,t,i){if(t)for(let s=0;s<t.length;s++){let r=t[s];tN(r)&&t7(r,r.getChildren(),i),i(r,e)}}var t9=class extends tk{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){let e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.refreshAll(ie(e.source))),this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,ie(e.source))}),this.addManagedPropertyListener("autoGroupColumnDef",e=>this.onAutoGroupColumnDefChanged(ie(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],e=>this.recreateColumnDefs(ie(e.source))),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),ie(e.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){var t,i,s;let r=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();let a=null==(t=this.colDefCols)?void 0:t.list,o=null==(i=this.colDefCols)?void 0:i.tree,n=this.columnFactory.createColumnTree(this.colDefs,!0,o,e);tj(this.context,null==(s=this.colDefCols)?void 0:s.tree,n.columnTree);let l=n.columnTree,h=n.treeDept,d=tV(l),u={};d.forEach(e=>u[e.getId()]=e),this.colDefCols={tree:l,treeDepth:h,list:d,map:u},this.funcColsService.extractCols(e,a),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),r&&(this.changeEventsDispat
1ching=!0,r(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),"gridInitializing"===e&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var t,i,s,r;if(!this.colDefCols)return;let a=null==(t=this.cols)?void 0:t.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();let o=(r=this.gos,this.showingPivotResult?!r.get("enableStrictPivotColumnOrder"):r.get("maintainColumnOrder"));(!e||o)&&this.restoreColOrder(),this.positionLockedCols(),null==(i=this.showRowGroupColsService)||i.refresh(),null==(s=this.quickFilterService)||s.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),tg(a,this.cols.tree)||this.eventDispatcher.gridColumns()}selectCols(){let e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=null!=e,e){let{map:t,list:i,tree:s,treeDepth:r}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:r},e.list.some(e=>{var t;return(null==(t=this.cols)?void 0:t.map[e.getColId()])!==void 0})||(this.lastPivotOrder=null)}else{let{map:e,list:t,tree:i,treeDepth:s}=this.colDefCols;this.cols={list:t.slice(),map:{...e},tree:i.slice(),treeDepth:s}}}getColsToShow(){var e;let t=this.isPivotMode()&&!this.isShowingPivotResult(),i=this.funcColsService.getValueColumns(),s=null==(e=this.controlsColService)?void 0:e.isControlsColEnabled();return this.cols.list.filter(e=>{let r=tW(e);if(!t)return r||e.isVisible();{let t=i&&tS(i,e);return r||t||s&&tU(e)}})}addAutoCols(){null!=this.autoCols&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),it(this.cols))}createAutoCols(){var e,t;let i=e4(this.gos,this.pivotMode),s=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),r=this.funcColsService.getRowGroupColumns(),a=r.length>0||this.gos.get("treeData"),o=()=>{this.autoCols&&(tj(this.context,this.autoCols.tree),this.autoCols=null)};if(!a||s||i||!this.autoColService)return void o();let n=null!=(e=this.autoColService.createAutoCols(r))?e:[],l=is(n,(null==(t=this.autoCols)?void 0:t.list)||null),h=this.cols.treeDepth,d=this.autoCols?this.autoCols.treeDepth:-1;if(l&&d==h)return;o();let[u,c]=this.columnFactory.balanceTreeForAutoCols(n,this.cols.tree);this.autoCols={list:n,tree:u,treeDepth:c,map:{}};let p=e=>e?[...n,...e.filter(e=>!tW(e))]:null;this.lastOrder=p(this.lastOrder),this.lastPivotOrder=p(this.lastPivotOrder)}createControlsCols(){var e,t,i,s,r,a;let o=()=>{var e;tj(this.context,null==(e=this.controlsCols)?void 0:e.tree),this.controlsCols=null};this.controlsColService||o();let n=this.cols.treeDepth,l=null!=(e=null==(t=this.controlsCols)?void 0:t.treeDepth)?e:-1,h=null!=(i=null==(s=this.controlsColService)?void 0:s.createControlsCols())?i:[];if(is(h,null!=(r=null==(a=this.controlsCols)?void 0:a.list)?r:[])&&l==n)return;o();let[d,u]=this.columnFactory.balanceTreeForAutoCols(h,this.cols.tree);this.controlsCols={list:h,tree:d,treeDepth:u,map:{}};let c=e=>e?[...h,...e.filter(e=>!tU(e))]:null;this.lastOrder=c(this.lastOrder),this.lastPivotOrder=c(this.lastPivotOrder)}addControlsCols(){null!=this.controlsCols&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),it(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(e=>({colId:"string"==typeof e?e:e.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){let s;if(!this.cols||eE(e))return;if(eG(this.gos,"print"))return void ep("Changing the column pinning status is not allowed with domLayout='print'");this.columnAnimationService.start(),s=!0===t||"left"===t?"left":"right"===t?"right":null;let r=[];e.forEach(e=>{if(!e)return;let t=this.getCol(e);t&&t.getPinned()!==s&&(t.setPinned(s),r.push(t))}),r.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(r,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;s=tN(e)?e.getId():e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){var t;let i=null;return t7(null,null==(t=this.cols)?void 0:t.tree,t=>{tN(t)&&t.getId()===e&&(i=t)}),i}isColGroupLocked(e){let t=this.gos.get("groupLockGroupColumns");return!!e.isRowGroupActive()&&0!==t&&(-1===t||t>this.funcColsService.getRowGroupColumns().findIndex(t=>t.getColId()===e.getColId()))}isSuppressAutoCol(){return"custom"===this.gos.get("groupDisplayType")||"custom"===this.gos.get("treeDataDisplayType")}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,eN(this.gos)||eO(this.gos)||ep("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){let e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;let t=new Map(e.map((e,t)=>[e,t]));if(!this.cols.list.some(e=>t.has(e)))return;let i=new Map(this.cols.list.map(e=>[e,!0])),s=e.filter(e=>i.has(e)),r=new Map(s.map(e=>[e,!0])),a=this.cols.list.filter(e=>!r.has(e)),o=s.slice();
1a.forEach(e=>{let t=e.getOriginalParent();if(!t)return void o.push(e);let i=[];for(;!i.length&&t;)t.getLeafColumns().forEach(e=>{let t=o.indexOf(e)>=0,s=0>i.indexOf(e);t&&s&&i.push(e)}),t=t.getOriginalParent();if(!i.length)return void o.push(e);let s=Math.max(...i.map(e=>o.indexOf(e)));ty(o,e,s+1)}),this.cols.list=o}sortColsLikeKeys(e){if(null==this.cols)return;let t=[],i={};e.forEach(e=>{if(i[e])return;let s=this.cols.map[e];s&&(t.push(s),i[e]=!0)});let s=0;(this.cols.list.forEach(e=>{let r=e.getColId();null!=i[r]||(r.startsWith(tz)?ty(t,e,s++):t.push(e))}),t=this.columnMoveService.placeLockedColumns(t),this.columnMoveService.doesMovePassMarryChildren(t))?this.cols.list=t:ep("Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}sortColsLikeCols(e){!e||e.length<=1||e.filter(e=>0>this.cols.list.indexOf(e)).length>0||e.sort((e,t)=>this.cols.list.indexOf(e)-this.cols.list.indexOf(t))}resetColDefIntoCol(e,t){let i=e.getUserProvidedColDef();if(!i)return!1;let s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){var s;tb(null==(s=this.cols)?void 0:s.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=null==(e=this.cols)?void 0:e.list:this.lastOrder=null==(t=this.cols)?void 0:t.list}getColumnDefs(){if(!this.colDefCols)return;let e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((e,t)=>this.lastOrder.indexOf(e)-this.lastOrder.indexOf(t)):this.lastOrder&&e.sort((e,t)=>this.cols.list.indexOf(e)-this.cols.list.indexOf(t));let t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){var e;return(null==(e=this.colDefCols)?void 0:e.treeDepth)>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>null!=e.getColDef().colSpan)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return!(e&&this.gos.get("treeData"))||(ep("Pivot mode not available with treeData."),!1)}isPivotActive(){let e=this.funcColsService.getPivotColumns();return this.pivotMode&&!eE(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e,t,i;tj(this.context,null==(e=this.colDefCols)?void 0:e.tree),tj(this.context,null==(t=this.autoCols)?void 0:t.tree),tj(this.context,null==(i=this.controlsCols)?void 0:i.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){var e;return null!=(e=this.colDefCols)&&e.list?this.colDefCols.list:null}getCols(){var e,t;return null!=(e=null==(t=this.cols)?void 0:t.list)?e:[]}getAllCols(){var e,t,i,s,r,a;let o=this.pivotResultColsService.getPivotResultCols(),n=null==o?void 0:o.list;return[null!=(e=null==(t=this.colDefCols)?void 0:t.list)?e:[],null!=(i=null==(s=this.autoCols)?void 0:s.list)?i:[],null!=(r=null==(a=this.controlsCols)?void 0:a.list)?r:[],null!=n?n:[]].flat()}getColsForKeys(e){return e?e.map(e=>this.getCol(e)).filter(e=>null!=e):[]}getColDefCol(e){var t;return null!=(t=this.colDefCols)&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return null==e?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(null==t)return null;let{map:i,list:s}=t;if("string"==typeof e&&i[e])return i[e];for(let t=0;t<s.length;t++)if(ii(s[t],e))return s[t];return this.getAutoCol(e)}getAutoCol(e){var t,i;return null!=(t=null==(i=this.autoCols)?void 0:i.list.find(t=>ii(t,e)))?t:null}getAutoCols(){var e,t;return null!=(e=null==(t=this.autoCols)?void 0:t.list)?e:null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){let e=[];for(let t of this.ctrlsService.getHeaderRowContainerCtrls()){if(!t)continue;let i=t.getGroupRowCount()||0;for(let s=0;s<i;s++){let i=t.getGroupRowCtrlAtIndex(s),r=e[s];if(i){let t=this.getColumnGroupHeaderRowHeight(i);(null==r||t>
1r)&&(e[s]=t)}}}return e}getColumnGroupHeaderRowHeight(e){let t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight(),i=0;for(let t of e.getHeaderCtrls()){let e=t.getColumn();if(e.isAutoHeaderHeight()){let t=e.getAutoHeaderHeight();null!=t&&t>i&&(i=t)}}return Math.max(t,i)}getColumnHeaderRowHeight(){return Math.max(this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),...this.visibleColsService.getAllCols().filter(e=>e.isAutoHeaderHeight()).map(e=>e.getAutoHeaderHeight()||0))}getHeaderHeight(){var e;return null!=(e=this.gos.get("headerHeight"))?e:this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){var e;return null!=(e=this.gos.get("floatingFiltersHeight"))?e:this.getHeaderHeight()}getGroupHeaderHeight(){var e;return null!=(e=this.gos.get("groupHeaderHeight"))?e:this.getHeaderHeight()}getPivotHeaderHeight(){var e;return null!=(e=this.gos.get("pivotHeaderHeight"))?e:this.getHeaderHeight()}getPivotGroupHeaderHeight(){var e;return null!=(e=this.gos.get("pivotGroupHeaderHeight"))?e:this.getGroupHeaderHeight()}onFirstDataRendered(){let e=this.gos.get("autoSizeStrategy");if((null==e?void 0:e.type)!=="fitCellContents")return;let{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){let s=t&&"string"!=typeof t?e5(t):void 0,r=e&&"string"!=typeof e?e5(e):void 0,a=t&&"string"!=typeof t?e8(t):void 0,o=e&&"string"!=typeof e?e8(e):void 0;(s!==r||a!==o)&&this.refreshAll(i)}};function ie(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e}function it(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function ii(e,t){let i=e===t,s=e.getColDef()===t,r=e.getColId()==t;return i||s||r}function is(e,t){return tg(e,t,(e,t)=>e.getColId()===t.getColId())}var ir=class extends tk{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));let{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:r,source:a="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;let o=[],n=-1,l=null!=i?i:this.gos.get("skipHeaderOnAutoSize"),h=null!=s?s:l;for(;0!==n;){n=0;let e=[];t.forEach(t=>{if(!t)return;let i=this.columnModel.getCol(t);if(!i||o.indexOf(i)>=0)return;let s=this.autoWidthCalculator.getPreferredWidthForColumn(i,l);if(s>0){let e=this.normaliseColumnWidth(i,s);i.setActualWidth(e,a),o.push(i),n++}e.push(i)}),e.length&&this.visibleColsService.refresh(a)}h||this.autoSizeColumnGroupsByColumns(t,a,r),this.eventDispatcher.columnResized(o,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){let s,r=new Set;for(let a of(this.columnModel.getColsForKeys(e).forEach(e=>{let t=e.getParent();for(;t&&t!=i;)t.isPadding()||r.add(t),t=t.getParent()}),r)){for(let e of this.ctrlsService.getHeaderRowContainerCtrls())if(s=e.getHeaderCtrlForColumn(a))break;s&&s.resizeLeafColumnsToFit(t)}return[]}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));let i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){let i=e.getMinWidth();t<i&&(t=i);let s=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=s),t}},ia=class extends tk{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>tC(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>tC(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>tC(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){let t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupCols.slice(0);let i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return eE(this.rowGroupCols)}
1setColumnAggFunc(e,t,i){if(!e)return;let s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(e,i)=>this.setRowGroupActive(e,i,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),e||this.gos.get("suppressMakeColumnVisibleAfterUnGroup")||this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,e=>this.setRowGroupActive(!0,e,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,e=>this.setRowGroupActive(!1,e,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,e=>e.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(e,i)=>{i.setPivotActive(e,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,e=>e.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(e,i)=>this.setValueActive(e,i,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){let e=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(e)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,e=>this.setValueActive(!0,e,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,e=>this.setValueActive(!1,e,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;let s=this.rowGroupCols[e],r=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(r,i)}setColList(e,t,i,s,r,a,o){if(!this.columnModel.getCols())return;let n=new Map;t.forEach((e,t)=>n.set(e,t)),t.length=0,eM(e)&&e.forEach(e=>{let i=this.columnModel.getColDefCol(e);
1i&&t.push(i)}),t.forEach((e,t)=>{let i=n.get(e);void 0===i?n.set(e,0):s&&i!==t||n.delete(e)}),(this.columnModel.getColDefCols()||[]).forEach(e=>{a(t.indexOf(e)>=0,e)}),r&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(o),this.eventDispatcher.columnChanged(i,[...n.keys()],o)}updateColList(e,t,i,s,r,a,o){if(!e||eE(e))return;let n=!1,l=new Set;e.forEach(e=>{if(!e)return;let s=this.columnModel.getColDefCol(e);if(s){if(l.add(s),i){if(t.indexOf(s)>=0)return;t.push(s)}else{let e=t.indexOf(s);if(e<0)return;for(let i=e+1;i<t.length;i++)l.add(t[i]);tC(t,s)}r(s),n=!0}}),n&&(s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(o),this.eventDispatcher.genericColumnEvent(a,Array.from(l),o))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(t,i)=>t.setValueActive(i,e),()=>void 0,()=>void 0,e=>{let t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0},e=>null!=e.initialAggFunc&&""!=e.initialAggFunc),this.valueCols.forEach(e=>{let t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(t,i)=>t.setRowGroupActive(i,e),e=>e.rowGroupIndex,e=>e.initialRowGroupIndex,e=>e.rowGroup,e=>e.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(t,i)=>t.setPivotActive(i,e),e=>e.pivotIndex,e=>e.initialPivotIndex,e=>e.pivot,e=>e.initialPivot)}extractColsCommon(e=[],t=[],i,s,r,a,o){let n=[],l=[];(this.columnModel.getColDefCols()||[]).forEach(i=>{let h=0>e.indexOf(i),d=i.getColDef(),u=eR(a(d)),c=eR(o(d)),p=eA(s(d)),g=eA(r(d));(void 0!==u?u:void 0!==p?null!==p&&p>=0:h?void 0!==c?c:void 0!==g&&null!=g&&g>=0:t.indexOf(i)>=0)&&((h?null!=p||null!=g:null!=p)?n.push(i):l.push(i))});let h=e=>{let t=s(e.getColDef()),i=r(e.getColDef());return null!=t?t:i};n.sort((e,t)=>{let i=h(e),s=h(t);return i===s?0:i<s?-1:1});let d=[].concat(n);return t.forEach(e=>{l.indexOf(e)>=0&&d.push(e)}),l.forEach(e=>{0>d.indexOf(e)&&d.push(e)}),t.forEach(e=>{0>d.indexOf(e)&&i(e,!1)}),d.forEach(e=>{0>t.indexOf(e)&&i(e,!0)}),d}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={},s=(e,t,s,r,a,o)=>{let n=this.columnModel.getColDefCols();if(!t.length||!n)return[];let l=Object.keys(e),h=new Set(l),d=new Set(l),u=new Set(t.map(e=>{let t=e.getColId();return d.delete(t),t}).concat(l)),c=[],p={},g=0;for(let e=0;e<n.length;e++){let t=n[e].getColId();u.has(t)&&(c.push(t),p[t]=g++)}let m=1e3,v=!1,f=0,C=t=>{let i=p[t];for(let t=f;t<i;t++){let i=c[t];d.has(i)&&(e[i][a]=m++,d.delete(i))}f=i};t.forEach(t=>{let n=t.getColId();if(h.has(n))C(n),e[n][a]=m++;else{let l=t.getColDef();(null===l[a]||void 0===l[a]&&null==l[o])&&(v||(l[s]||void 0===l[s]&&l[r]?C(n):(d.forEach(t=>{e[t][a]=m+p[t]}),m+=c.length,v=!0)),i[n]||(i[n]={colId:n}),i[n][a]=m++)}})};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},io=class extends tk{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){let i=this.columnModel.getColDefCols()||[];if(eE(i))return!1;if(e&&e.state&&!e.state.forEach)return ep("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;let s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),r=(i,r,a)=>{let o=this.compareColumnStatesAndDispatchEvents(t),n=r.slice(),l={},h={},d=[],u=[],c=0,p=this.funcColsService.getRowGroupColumns().slice(),g=this.funcColsService.getPivotColumns().slice();
1i.forEach(i=>{let r=i.colId||"";if(r.startsWith(tz)){d.push(i),u.push(i);return}let o=a(r);o?(this.syncColumnWithStateItem(o,i,e.defaultState,l,h,!1,t,s),tC(n,o)):(u.push(i),c+=1)});let m=i=>this.syncColumnWithStateItem(i,null,e.defaultState,l,h,!1,t,s);n.forEach(m),this.funcColsService.sortRowGroupColumns(il.bind(this,l,p)),this.funcColsService.sortPivotColumns(il.bind(this,h,g)),this.columnModel.refreshCols(!1);let v=(this.columnModel.getAutoCols()||[]).slice();return d.forEach(i=>{let r=this.columnModel.getAutoCol(i.colId);tC(v,r),this.syncColumnWithStateItem(r,i,e.defaultState,null,null,!0,t,s)}),v.forEach(m),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),o(),{unmatchedAndAutoStates:u,unmatchedCount:c}};this.columnAnimationService.start();let{unmatchedAndAutoStates:a,unmatchedCount:o}=r(e.state||[],i,e=>this.columnModel.getColDefCol(e));if(a.length>0||eM(e.defaultState)){let e=this.pivotResultColsService.getPivotResultCols();o=r(a,(null==e?void 0:e.list)||[],e=>this.pivotResultColsService.getPivotResultCol(e)).unmatchedCount}return this.columnAnimationService.finish(),0===o}resetColumnState(e){if(eE(this.columnModel.getColDefCols()))return;let t=tV(this.columnModel.getColDefColTree()),i=[],s=1e3,r=1e3,a=[],o=this.columnModel.getAutoCols();o&&(a=a.concat(o)),t&&(a=a.concat(t)),a.forEach(e=>{let t=this.getColumnStateFromColDef(e);eD(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=s++),eD(t.pivotIndex)&&t.pivot&&(t.pivotIndex=r++),i.push(t)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){let t=(e,t)=>null!=e?e:null!=t?t:null,i=e.getColDef(),s=t(i.sort,i.initialSort),r=t(i.sortIndex,i.initialSortIndex),a=t(i.hide,i.initialHide),o=t(i.pinned,i.initialPinned),n=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex),h=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);null==h&&(null==d||!1==d)&&(h=null,d=null);let u=t(i.pivotIndex,i.initialPivotIndex),c=t(i.pivot,i.initialPivot);null==u&&(null==c||!1==c)&&(u=null,c=null);let p=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:r,hide:a,pinned:o,width:n,flex:l,rowGroup:d,rowGroupIndex:h,pivot:c,pivotIndex:u,aggFunc:p}}syncColumnWithStateItem(e,t,i,s,r,a,o,n){var l;if(!e)return;let h=(e,s)=>{let r={value1:void 0,value2:void 0},a=!1;return t&&(void 0!==t[e]&&(r.value1=t[e],a=!0),eM(s)&&void 0!==t[s]&&(r.value2=t[s],a=!0)),!a&&i&&(void 0!==i[e]&&(r.value1=i[e]),eM(s)&&void 0!==i[s]&&(r.value2=i[s])),r},d=h("hide").value1;void 0!==d&&e.setVisible(!d,o);let u=h("pinned").value1;void 0!==u&&e.setPinned(u);let c=null!=(l=e.getColDef().minWidth)?l:this.gos.environment.getDefaultColumnMinWidth(),p=h("flex").value1;if(void 0!==p&&e.setFlex(p),null==p){let t=h("width").value1;null!=t&&null!=c&&t>=c&&e.setActualWidth(t,o)}let g=h("sort").value1;void 0!==g&&("desc"===g||"asc"===g?e.setSort(g,o):e.setSort(void 0,o));let m=h("sortIndex").value1;if(void 0!==m&&e.setSortIndex(m),a||!e.isPrimary())return;let v=h("aggFunc").value1;void 0!==v&&("string"==typeof v?(e.setAggFunc(v),e.isValueActive()||(e.setValueActive(!0,o),n.addValueCol(e))):(eM(v)&&ep("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,o),n.removeValueCol(e))));let{value1:f,value2:C}=h("rowGroup","rowGroupIndex");(void 0!==f||void 0!==C)&&("number"==typeof C||f?(e.isRowGroupActive()||(e.setRowGroupActive(!0,o),n.addGroupCol(e)),s&&"number"==typeof C&&(s[e.getId()]=C)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,o),n.removeGroupCol(e)));let{value1:y,value2:w}=h("pivot","pivotIndex");(void 0!==y||void 0!==w)&&("number"==typeof w||y?(e.isPivotActive()||(e.setPivotActive(!0,o),n.addPivotCol(e)),r&&"number"==typeof w&&(r[e.getId()]=w)):e.isPivotActive()&&(e.setPivotActive(!1,o),n.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;let t=[];
1e.state.forEach(e=>{null!=e.colId&&t.push(e.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){let t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach(e=>{s[e.colId]=e}),()=>{let r=this.columnModel.getAllCols(),a=(t,i,s,r)=>{if(tg(i.map(r),s.map(r)))return;let a=new Set(i);s.forEach(e=>{a.delete(e)||a.add(e)});let o=[...a];this.eventService.dispatchEvent({type:t,columns:o,column:1===o.length?o[0]:null,source:e})},o=e=>{let t=[];return r.forEach(i=>{let r=s[i.getColId()];r&&e(r,i)&&t.push(i)}),t},n=e=>e.getColId();a("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),n),a("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),n);let l=o((e,t)=>{let i=null!=e.aggFunc,s=i!=t.isValueActive(),r=i&&e.aggFunc!=t.getAggFunc();return s||r});l.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",l,e),this.eventDispatcher.columnResized(o((e,t)=>e.width!=t.getActualWidth()),!0,e),this.eventDispatcher.columnPinned(o((e,t)=>e.pinned!=t.getPinned()),e),this.eventDispatcher.columnVisible(o((e,t)=>e.hide==t.isVisible()),e);let h=o((e,t)=>e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex());h.length>0&&this.sortController.dispatchSortChangedEvents(e,h),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){let i=this.columnGetStateService.getColumnState(),s={};i.forEach(e=>s[e.colId]=e);let r={};e.forEach(e=>{s[e.colId]&&(r[e.colId]=!0)});let a=e.filter(e=>r[e.colId]),o=i.filter(e=>r[e.colId]),n=[];o.forEach((e,t)=>{let i=a&&a[t];if(i&&i.colId!==e.colId){let e=this.columnModel.getCol(i.colId);e&&n.push(e)}}),n.length&&this.eventDispatcher.columnMoved({movedColumns:n,source:t,finished:!0})}},il=(e,t,i,s)=>{let r=e[i.getId()],a=e[s.getId()],o=null!=r,n=null!=a;if(o&&n)return r-a;if(o)return -1;if(n)return 1;let l=t.indexOf(i),h=t.indexOf(s),d=l>=0;return d&&h>=0?l-h:d?-1:1},ih=class extends tk{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){let s=this.columnModel.getCols();if(!s)return;let r=s[e];this.moveColumns([r],t,i)}moveColumns(e,t,i,s=!0){let r=this.columnModel.getCols();if(!r)return;if(t>r.length-e.length){ep("tried to insert columns in invalid location, toIndex = ",t),ep("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();let a=this.columnModel.getColsForKeys(e);this.doesMovePassRules(a,t)&&(this.columnModel.moveInCols(a,t,i),this.eventDispatcher.columnMoved({movedColumns:a,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){let i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)}getProposedColumnOrder(e,t){let i=this.columnModel.getCols().slice();return tb(i,e,t),i}doesMovePassLockedPositions(e){let t=this.gos.get("enableRtl"),i=t?1:-1,s=!0;return e.forEach(e=>{var r;let a=(r=e.getColDef().lockPosition)?"left"===r||!0===r?-1:1:0;t?a>i&&(s=!1):a<i&&(s=!1),i=a}),s}doesMovePassMarryChildren(e){let t=!0;return t7(null,this.columnModel.getColTree(),i=>{if(!tN(i))return;let s=i.getColGroupDef();if(!(s&&s.marryChildren))return;let r=[];i.getLeafColumns().forEach(t=>{let i=e.indexOf(t);r.push(i)}),Math.max.apply(Math,r)-Math.min.apply(Math,r)>i.getLeafColumns().length-1&&(t=!1)}),t}placeLockedColumns(e){let t=[],i=[],s=[];return(e.forEach(e=>{let r=e.getColDef().lockPosition;"right"===r?s.push(e):"left"===r||!0===r?t.push(e):i.push(e)}),this.gos.get("enableRtl"))?[...s,...i,...t]:[...t,...i,...s]}},id=/[&<>"']/g,iu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ic(e){let t=String.fromCharCode;function i(e,i){return t(e>>i&63|128)}let s=function(e){let t,i,s=[];if(!e)return[];let r=e.length,a=0;for(;a<r;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<r?(64512&(i=e.charCodeAt(a++)))==56320?s.push(((1023&t)<<10)+(1023&i)+65536):(s.push(t),a--):s.push(t);return s}(e),r=s.length,a=-1,o="";for(;++a<r;)o+=function(e){if((0xffffff80&e)==0)return t(e);let s="";if((0xfffff800&e)==0)s=t(e>>6&31|192);else if((0xffff0000&e)==0){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");s=t(e>>12&15|224)+i(e,6)}else(0xffe00000&e)==0&&(s=t(e>>18&7|240)+i(e,12)+i(e,6));return s+t(63&e|128)}(s[a]);return o}function ip(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function ig(e,t){if(null==e)return null;let i=e.toString().toString();return t?i:i.replace(id,e=>iu[e])}var im=class extends tk{constructor(){super(...arguments),this.beanName="
1columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;let s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){let s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,r){let a=e.headerValueGetter;if(a){let o=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:r});if("function"==typeof a)return a(o);if("string"==typeof a)return this.expressionService.evaluate(a,o);ep("headerValueGetter must be a function or a string")}else if(null!=e.headerName)return e.headerName;else if(e.field){var o;return(o=e.field)&&null!=o?o.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")).join(" "):null}return""}wrapHeaderNameWithAggFunc(e,t){let i;if(this.gos.get("suppressAggFuncInHeader"))return t;let s=e.getColDef().pivotValueColumn,r=eM(s),a=null;if(r){let r=this.funcColsService.getValueColumns(),o=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===r.length,n=void 0!==e.getColDef().pivotTotalColumnIds;if(o&&!n)return t;a=s?s.getAggFunc():null,i=!0}else{let t=e.isValueActive(),s=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();t&&s?(a=e.getAggFunc(),i=!0):i=!1}if(i){let e="string"==typeof a?a:"func",i=this.localeService.getLocaleTextFunc()(e,e);return`${i}(${t})`}return t}},iv=class extends tk{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){var e;tj(this.context,null==(e=this.pivotResultCols)?void 0:e.tree),super.destroy()}isPivotResultColsPresent(){return null!=this.pivotResultCols}lookupPivotResultCol(e,t){if(null==this.pivotResultCols)return null;let i=this.columnModel.getColDefCol(t),s=null;return this.pivotResultCols.list.forEach(t=>{let r=t.getColDef().pivotKeys,a=t.getColDef().pivotValueColumn;tg(r,e)&&a===i&&(s=t)}),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.columnModel.isReady()&&(null!=e||null!=this.pivotResultCols)){if(e){var i,s;this.processPivotResultColDef(e);let r=this.columnFactory.createColumnTree(e,!1,(null==(i=this.pivotResultCols)?void 0:i.tree)||this.previousPivotResultCols||void 0,t);tj(this.context,null==(s=this.pivotResultCols)?void 0:s.tree,r.columnTree);let a=r.columnTree,o=r.treeDept,n=tV(a);this.pivotResultCols={tree:a,treeDepth:o,list:n,map:{}},this.pivotResultCols.list.forEach(e=>this.pivotResultCols.map[e.getId()]=e);let l=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!l)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){let t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;let s=e=>{e.forEach(e=>{eM(e.children)?(i&&i(e),s(e.children)):t&&t(e)})};e&&s(e)}},iC=class extends tk{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){let r=[];e.forEach(e=>{let i=this.columnModel.getColDefCol(e.key)||this.columnModel.getCol(e.key);if(i&&(r.push({width:e.newWidth,ratios:[1],columns:[i]}),"shift"===this.gos.get("colResizeDefault")&&(t=!t),t)){let t=this.visibleColsService.getColAfter(i);if(!t)return;let s=i.getActualWidth()-e.newWidth,a=t.getActualWidth()+s;r.push({width:a,ratios:[1],columns:[t]})}}),0!==r.length&&this.resizeColumnSets({resizeSets:r,finished:i,source:s})}resizeColumnSets(e){let{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(e=>this.checkMinAndMaxWidthsForSet(e)))){if(i){let e=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(e,i,s)}return}let r=[],a=[];
1t.forEach(e=>{let{width:t,columns:i,ratios:o}=e,n={},l={};i.forEach(e=>a.push(e));let h=!0,d=0;for(;h;){if(++d>1e3){eg("infinite loop in resizeColumnSets");break}h=!1;let e=[],s=0,r=t;i.forEach((t,i)=>{if(l[t.getId()])r-=n[t.getId()];else{e.push(t);let r=o[i];s+=r}});let a=1/s;e.forEach((i,s)=>{let d;s===e.length-1?d=r:(d=Math.round(o[s]*t*a),r-=d);let u=i.getMinWidth(),c=i.getMaxWidth();d<u?(d=u,l[i.getId()]=!0,h=!0):c>0&&d>c&&(d=c,l[i.getId()]=!0,h=!0),n[i.getId()]=d})}i.forEach(e=>{let t=n[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,s),r.push(e))})});let o=r.length>0,n=[];o&&(n=this.refreshFlexedColumns({resizingCols:a,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());let l=a.concat(n);(o||i)&&this.eventDispatcher.columnResized(l,i,s,n)}checkMinAndMaxWidthsForSet(e){let{columns:t,width:i}=e,s=0,r=0,a=!0;t.forEach(e=>{let t=e.getMinWidth();s+=t||0;let i=e.getMaxWidth();i>0?r+=i:a=!1});let o=i>=s,n=!a||i<=r;return o&&n}refreshFlexedColumns(e={}){let t,i=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let s=this.visibleColsService.getCenterCols(),r=-1;if(e.resizingCols){let t=new Set(e.resizingCols);for(let e=s.length-1;e>=0;e--)if(t.has(s[e])){r=e;break}}let a=0,o=[],n=0,l=0;for(let e=0;e<s.length;e++)s[e].getFlex()&&e>r?(o.push(s[e]),l+=s[e].getFlex(),n+=s[e].getMinWidth()):a+=s[e].getActualWidth();if(!o.length)return[];let h=[];a+n>this.flexViewportWidth&&(o.forEach(e=>e.setActualWidth(e.getMinWidth(),i)),h=o,o=[]);let d=[];e:for(;;){let e=(t=this.flexViewportWidth-a)/l;for(let t=0;t<o.length;t++){let s=o[t],r=e*s.getFlex(),n=0,u=s.getMinWidth(),c=s.getMaxWidth();if(r<u?n=u:r>
1c&&(n=c),n){s.setActualWidth(n,i),tf(o,s),l-=s.getFlex(),h.push(s),a+=s.getActualWidth();continue e}d[t]=Math.floor(r)}break}let u=t;return o.forEach((e,t)=>{let s=t<o.length-1?Math.min(d[t],u):Math.max(d[t],u);e.setActualWidth(s,i),h.push(e),u-=d[t]}),e.skipSetLeft||this.visibleColsService.setLeftValues(i),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(h,!0,i,o),o}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var r,a,o;if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,s));let n={};s&&(null==s||null==(r=s.columnLimits)||r.forEach(({key:e,...t})=>{n["string"==typeof e?e:e.getColId()]=t}));let l=this.visibleColsService.getAllCols(),h=e===tH(l);if(e<=0||!l.length||h)return;let d=[],u=[];l.forEach(e=>{!0===e.getColDef().suppressSizeToFit?u.push(e):d.push(e)});let c=d.slice(0),p=!1,g=e=>{tC(d,e),u.push(e)};for(d.forEach(e=>{var i,r;e.resetActualWidth(t);let a=null==n?void 0:n[e.getId()],o=null!=(i=null==a?void 0:a.minWidth)?i:null==s?void 0:s.defaultMinWidth,l=null!=(r=null==a?void 0:a.maxWidth)?r:null==s?void 0:s.defaultMaxWidth,h=e.getActualWidth();"number"==typeof o&&h<o?e.setActualWidth(o,t,!0):"number"==typeof l&&h>l&&e.setActualWidth(l,t,!0)});!p;){p=!0;let i=e-tH(u);if(i<=0)d.forEach(e=>{var i,r;let a=null!=(i=null==n||null==(r=n[e.getId()])?void 0:r.minWidth)?i:null==s?void 0:s.defaultMinWidth;"number"==typeof a?e.setActualWidth(a,t,!0):e.setMinimum(t)});else{let e=i/tH(d),r=i;for(let i=d.length-1;i>=0;i--){let l=d[i],h=null==n?void 0:n[l.getId()],u=null!=(a=null==h?void 0:h.minWidth)?a:null==s?void 0:s.defaultMinWidth,c=null!=(o=null==h?void 0:h.maxWidth)?o:null==s?void 0:s.defaultMaxWidth,m=l.getMinWidth(),v=l.getMaxWidth(),f="number"==typeof u&&u>m?u:m,C="number"==typeof c&&c<v?c:v,y=Math.round(l.getActualWidth()*e);y<f?(y=f,g(l),p=!1):y>C?(y=C,g(l),p=!1):0===i&&(y=r),l.setActualWidth(y,t,!0),r-=y}}}c.forEach(e=>{e.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),i||this.eventDispatcher.columnResized(c,!0,t)}applyAutosizeStrategy(){let e=this.gos.get("autoSizeStrategy");if(!e)return;let{type:t}=e;setTimeout(()=>{if("fitGridWidth"===t){let{columnLimits:t,defaultMinWidth:i,defaultMaxWidth:s}=e,r=null==t?void 0:t.map(({colId:e,minWidth:t,maxWidth:i})=>({key:e,minWidth:t,maxWidth:i}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:r})}else"fitProvidedWidth"===t&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function iy(e){return e instanceof iw}var iw=class extends tk{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return this.groupId+"_"+this.partId}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!!e&&0!==e.length&&e.every(e=>e.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{iy(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let e=tp(this.displayedChildren).getLeft();this.setLeft(e)}else{let e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let 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(){var e;return!!(null!=(e=this.getColGroupDef())&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}
1addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{t3(t)?e.push(t):iy(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{t3(t)?e.push(t):iy(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;null!=e&&e.isPadding();)e=e.getParent();if(!(e&&e.getProvidedColumnGroup().isExpandable())){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(t=>{if(!iy(t)||t.displayedChildren&&t.displayedChildren.length)switch(t.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(t);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(t);break;default:this.displayedChildren.push(t)}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},ib=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t,i=this.existingIds[e];return t="number"!=typeof i?0:i+1,this.existingIds[e]=t,t}},iS=class extends tk{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=iM(this.treeLeft),this.columnsCenter=iM(this.treeCenter),this.columnsRight=iM(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(e=>e.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){let e=tH(this.columnsCenter),t=tH(this.columnsLeft),i=tH(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?tp(this.columnsRight):null):(t=this.columnsLeft?tp(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}buildTrees(){let e=this.columnModel.getColsToShow(),t=e.filter(e=>"left"==e.getPinned()),i=e.filter(e=>"right"==e.getPinned()),s=e.filter(e=>"left"!=e.getPinned()&&"right"!=e.getPinned()),r=new ib;this.treeLeft=this.createGroups({columns:t,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){let e=this.columnModel.getCols(),t=[],i=[],s=[];for(let r of e){let e=r.getPinned();e?!0===e||"left"===e?t.push(r):s.push(r):i.push(r)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return t=iy(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e
1=>{e.forEach(e=>{iy(e)&&e.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;let t=this.columnModel.getCols().slice(0),i=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(s=>{if(i){let t=tH(s);s.forEach(i=>{t-=i.getActualWidth(),i.setLeft(t,e)})}else{let t=0;s.forEach(i=>{i.setLeft(t,e),t+=i.getActualWidth()})}for(let e=0;e<s.length;e++)tf(t,s[e])}),t.forEach(t=>{t.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){let r=[],a=null;for(let o=0;o<t.length;o++){let n,l=t[o],h=t.length-o,d=Math.min(l.getColSpan(e),h),u=[l];if(d>1){let e=d-1;for(let i=1;i<=e;i++)u.push(t[o+i]);o+=e}i?(n=!1,u.forEach(e=>{i(e)&&(n=!0)})):n=!0,n&&(0===r.length&&a&&s&&s(l)&&r.push(a),r.push(l)),a=l}return r}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){let t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){let i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),r="After"===t?tp(s):s[0],a=`getCol${t}`;for(;;){let t=this[a](r);if(!t)return null;let s=this.getColGroupAtLevel(t,i);if(s!==e)return s}}getColGroupAtLevel(e,t){let i=e.getParent();for(;!(i.getProvidedColumnGroup().getLevel()+i.getPaddingLevel()<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};let e=e=>{this.colsAndGroupsMap[e.getUniqueId()]=e};ix(this.treeCenter,!1,e),ix(this.treeLeft,!1,e),ix(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){ix(this.getAllTrees(),!1,e=>{iy(e)&&e.calculateDisplayedColumns()})}getFirstColumn(){let e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){let s=this[t[i]]();if(s.length)return e?tp(s):s[0]}return null}getColumnGroup(e,t){if(!e)return null;if(iy(e))return e;let i=this.getAllTrees(),s="number"==typeof t,r=null;return ix(i,!1,i=>{iy(i)&&(s?e===i.getGroupId()&&t===i.getPartId():e===i.getGroupId())&&(r=i)}),r}getColAfter(e){let t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return tH(this.columnsLeft)}getDisplayedColumnsRightWidth(){return tH(this.columnsRight)}isColAtEdge(e,t){let i,s=this.getAllCols();if(!s.length)return!1;let r="first"===t;if(iy(e)){let t=e.getDisplayedLeafColumns();if(!t.length)return!1;i=r?t[0]:tp(t)}else i=e;return(r?s[0]:tp(s))===i}createGroups(e){let{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:r,isStandaloneStructure:a}=e,o=this.mapOldGroupsById(r),n=[],l=t;for(;l.length;){let e=l;l=[];let t=0,r=r=>{let h=t;t=r;let d=e[h],u=(iy(d)?d.getProvidedColumnGroup():d).getOriginalParent();if(null==u){for(let t=h;t<r;t++)n.push(e[t]);return}let c=this.createColGroup(u,i,o,s,a);for(let t=h;t<r;t++)c.addChild(e[t]);l.push(c)};for(let i=1;i<e.length;i++){let s=e[i],a=(iy(s)?s.getProvidedColumnGroup():s).getOriginalParent(),o=e[t];a!==(iy(o)?o.getProvidedColumnGroup():o).getOriginalParent()&&r(i)}t<e.length&&r(e.length)}return a||this.setupParentsIntoCols(n,null),n}createColGroup(e,t,i,s,r){let a=e.getGroupId(),o=t.getInstanceIdForKey(a),n=i[a+"_"+o];return n&&n.getProvidedColumnGroup()!==e&&(n=null),eM(n)?n.reset():(n=new iw(e,a,o,s),r||this.createBean(n)),n}mapOldGroupsById(e){let t={},i=e=>
1{e.forEach(e=>{iy(e)&&(t[e.getUniqueId()]=e,i(e.getChildren()))})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(e=>{e.setParent(t),iy(e)&&this.setupParentsIntoCols(e.getChildren(),e)})}};function ix(e,t,i){if(e)for(let s=0;s<e.length;s++){let r=e[s];iy(r)&&ix(t?r.getDisplayedChildren():r.getChildren(),t,i),i(r)}}function iM(e){let t=[];return ix(e,!0,e=>{t3(e)&&t.push(e)}),t}var iD=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","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","filterOpened","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"],iE=[...iD,"scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],iI={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,advancedFilterModel:!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,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},iA=class{};iA.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],iA.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"],iA.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],iA.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],iA.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],iA.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"],iA.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","
1sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],iA.ALL_PROPERTIES=[...iA.ARRAY_PROPERTIES,...iA.OBJECT_PROPERTIES,...iA.STRING_PROPERTIES,...iA.NUMBER_PROPERTIES,...iA.FUNCTION_PROPERTIES,...iA.BOOLEAN_PROPERTIES,...iA.OTHER_PROPERTIES];var iR=iA,iT=class{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}};iT.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",iT.PUBLIC_EVENTS=iD,iT.EVENT_CALLBACKS=iE.map(e=>iT.getCallbackForEvent(e)),iT.BOOLEAN_PROPERTIES=iR.BOOLEAN_PROPERTIES,iT.ALL_PROPERTIES=iR.ALL_PROPERTIES,iT.ALL_PROPERTIES_AND_CALLBACKS=[...iT.ALL_PROPERTIES,...iT.EVENT_CALLBACKS],iT.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(iT.ALL_PROPERTIES_AND_CALLBACKS);var iL=iT;function iF(e,t){"object"!=typeof e&&(e={});let i={...e};return iL.ALL_PROPERTIES_AND_CALLBACKS.forEach(e=>{let s=t[e];void 0!==s&&s!==iL.VUE_OMITTED_PROPERTY&&(i[e]=s)}),i}function iP(e,t){if(!e)return;let i={},s=!1;if(Object.keys(e).filter(e=>iL.ALL_PROPERTIES_AND_CALLBACKS_SET.has(e)).forEach(t=>{i[t]=e[t],s=!0}),!s)return;t.dispatchEvent({type:"gridOptionsChanged",options:i});let r={type:"componentStateChanged"};tK(i,(e,t)=>{r[e]=t}),t.dispatchEvent(r)}var ik=class extends tk{};function iN(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),null!=i?i:e}var iO=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){let t=(e||"").split(" ");if(t.length>1)return void t.forEach(e=>this.addCssClass(e));if(!0!==this.cssClassStates[e]&&e.length){let t=this.getGui();t&&t.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){let t=(e||"").split(" ");if(t.length>1)return void t.forEach(e=>this.removeCssClass(e));if(!1!==this.cssClassStates[e]&&e.length){let t=this.getGui();t&&t.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){let t=this.getGui();return!!t&&t.classList.contains(e)}addOrRemoveCssClass(e,t){if(e){if(e.indexOf(" ")>=0){let i=(e||"").split(" ");if(i.length>1)return void i.forEach(e=>this.addOrRemoveCssClass(e,t))}if(this.cssClassStates[e]!==t&&e.length){let i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}}};function iG(e,t,i){null==i||"string"==typeof i&&""==i?iz(e,t):iB(e,t,i)}function iB(e,t,i){var s;e.setAttribute((s=t,`aria-${s}`),i.toString())}function iz(e,t){var i;e.removeAttribute((i=t,`aria-${i}`))}function iV(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function iH(e){return parseInt(e.getAttribute("aria-posinset"),10)}function ij(e,t){iG(e,"label",t)}function iW(e,t){iG(e,"labelledby",t)}function iU(e,t){iG(e,"describedby",t)}function i_(e,t){iG(e,"level",t)}function i$(e,t){iG(e,"disabled",t)}function iY(e,t){iG(e,"hidden",t)}function iK(e,t){iG(e,"activedescendant",t)}function iZ(e,t){iB(e,"expanded",t)}function iq(e){iz(e,"expanded")}function iQ(e,t){iB(e,"setsize",t)}function iX(e,t){iB(e,"posinset",t)}function iJ(e,t){iB(e,"rowcount",t)}function i0(e,t){iB(e,"rowindex",t)}function i1(e,t){iB(e,"colcount",t)}function i2(e,t){iB(e,"colindex",t)}function i3(e,t){iB(e,"colspan",t)}function i4(e,t){iB(e,"sort",t)}function i6(e){iz(e,"sort")}function i5(e,t){iG(e,"selected",t)}function i8(e,t){iB(e,"checked",void 0===t?"mixed":t)}function i7(e,t){iG(e,"controls",t.id),iW(t,e.id)}function i9(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function se(e,t,i){let s=e.parentElement,r=s&&s.firstChild;for(;r;)t&&r.classList.toggle(t,r===e),i&&r.classList.toggle(i,r!==e),r=r.nextSibling}var st="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function si(e){let t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,st),r=sC(e);return i&&!s&&r}function ss(e,t,i={}){let{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||iY(e,!t)}function sr(e,t,i={}){let{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||iY(e,!t)}function sa(e,t){let i="disabled",s=t?e=>
1e.setAttribute(i,""):e=>e.removeAttribute(i);s(e),sR(e.querySelectorAll("input"),e=>s(e))}function so(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++s>i)break}else if(e===i)break}return!1}function sn(e){let{height:t,width:i,borderTopWidth:s,borderRightWidth:r,borderBottomWidth:a,borderLeftWidth:o,paddingTop:n,paddingRight:l,paddingBottom:h,paddingLeft:d,marginTop:u,marginRight:c,marginBottom:p,marginLeft:g,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(r||"0"),borderBottomWidth:parseFloat(a||"0"),borderLeftWidth:parseFloat(o||"0"),paddingTop:parseFloat(n||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(h||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(c||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(g||"0"),boxSizing:m}}function sl(e){let t=sn(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function sh(e){let t=sn(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function sd(e){let{height:t,marginBottom:i,marginTop:s}=sn(e);return Math.floor(t+i+s)}function su(e){let{width:t,marginLeft:i,marginRight:s}=sn(e);return Math.floor(t+i+s)}function sc(e){let t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:r,borderBottomWidth:a}=sn(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(r||0),bottom:t.bottom+(a||0)}}function sp(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function sg(e,t,i){i&&(t*=-1),e.scrollLeft=t}function sm(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function sv(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function sf(e){return!!e.offsetParent}function sC(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!sf(e)||"visible"!==window.getComputedStyle(e).visibility)}function sy(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function sw(e,t,i){(!i||i.nextSibling!==t)&&(e.firstChild?i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function sb(e,t){for(let i=0;i<t.length;i++){let s=t[i],r=e.children[i];r!==s&&e.insertBefore(s,r)}}function sS(e,t){if(t)for(let[i,s]of Object.entries(t)){if(!i||!i.length||null==s)continue;let t=i.replace(/[A-Z]/g,e=>`-${e.toLocaleLowerCase()}`),r=s.toString(),a=r.replace(/\s*!important/g,""),o=a.length!=r.length?"important":void 0;e.style.setProperty(t,a,o)}}function sx(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):sM(e,t)}function sM(e,t){t=sE(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function sD(e,t){t=sE(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function sE(e){return"number"==typeof e?`${e}px`:e}function sI(e){return e instanceof Node||e instanceof HTMLElement}function sA(e,t,i){null==i||""===i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function sR(e,t){if(null!=e)for(let i=0;i<e.length;i++)t(e[i])}function sT(e,t){e.then(e=>{let i=e.getGui();null!=i&&("object"==typeof i?t.appendChild(i):t.innerHTML=i)})}var sL=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){let e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}};function sF(){return void 0===W&&(W=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),W}function sP(){if(void 0===U)if(sF()){let e=navigator.userAgent.match(/version\/(\d+)/i);e&&(U=null!=e[1]?parseFloat(e[1]):0)}else U=0;return U}function sk(){return void 0===$&&($=/(firefox)/i.test(navigator.userAgent)),$}function sN(){return void 0===Y&&(Y=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Y}function sO(){return void 0===K&&(K=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),K}function sG(){return!sF()||sP()>=15}function sB(e){if(!e)return null;let t=e.tabIndex,i=e.getAttribute("tabIndex");return -1!==t||null!==i&&(""!==i||sk())?t.toString():null}function sz(){let 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;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.parentNode.removeChild(t),null!=i&&(q=i,Z=0===i)}function sV(){return null==Z&&sz(),Z}var sH=class e extends tk{constructor(e,t,i,s){super(),this.parentComp=e,this.tooltipShowDelayOverride=t,this.tooltipHideDelayOverride=i,this.shouldDisplayTooltip=s,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupService=e.popupService,this.userComponentFactory=e.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let e=this.parentComp.getGui();0===this.tooltipTrigger&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&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){let t=this.gos.get(e);return t<0&&ep(`${e} should not be lower than 0`),Math.max(200,t)}getTooltipDelay(e){var t,i;return"show"===e?null!=(i=this.tooltipShowDelayOverride)?i:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!=(t=this.tooltipHideDelayOverride)?t:this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),sO()||(e.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},100):this.prepareToShowTooltip(t))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var t;let i=e.relatedTarget,s=this.parentComp.getGui(),r=null==(t=this.tooltipComp)?void 0:t.getGui();this.isInteractingWithTooltip||s.contains(i)||this.interactionEnabled&&null!=r&&r.contains(i)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(0!=this.state||e.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){return(new Date).getTime()-e.lastTooltipHideTime<1e3}setToDoNothing(e){e||2!==this.state||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){let e={...this.parentComp.getTooltipParams()};if(!eM(e.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())return void this.setToDoNothing();this.state=2,this.tooltipInstanceCount++;let t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);
1this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}hideTooltip(t){(t||!this.isInteractingWithTooltip)&&(this.tooltipComp&&(this.destroyTooltipComp(),e.lastTooltipHideTime=(new Date).getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)return void this.destroyBean(t);let i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");let s=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){let e=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:e,columnMoved:e})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(e$(this.gos),{keydown:e=>{i.contains(null==e?void 0:e.target)||this.onKeyDown()}}),1===this.tooltipTrigger&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var e;let t=null==(e=this.tooltipComp)?void 0:e.getGui(),i=eZ(this.gos);return!!t&&t.contains(i)}onTooltipFocusOut(e){let t=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){let e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...e,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=1e3*(0===this.tooltipTrigger);window.setTimeout(()=>{e(),this.destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){e.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},100)}unlockService(){e.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};sH.isLocked=!1;var sj=sH,sW=class extends tk{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){let t="title",i=this.ctrl.getGui();i&&(null!=e&&""!=e?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var e,t,i,s;null!=this.tooltipManager||(this.tooltipManager=this.createBean(new sj({getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()},null==(e=(t=this.ctrl).getTooltipShowDelayOverride)?void 0:e.call(t),null==(i=(s=this.ctrl).getTooltipHideDelayOverride)?void 0:i.call(s),this.ctrl.
1shouldDisplayTooltip),this.beans.context))}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){var e,t,i,s,r;let a=this.ctrl,o=null==(e=a.getColumn)?void 0:e.call(a),n=null==(t=a.getColDef)?void 0:t.call(a),l=null==(i=a.getRowNode)?void 0:i.call(a);return{location:a.getLocation(),colDef:n,column:o,rowIndex:null==(s=a.getRowIndex)?void 0:s.call(a),node:l,data:null==l?void 0:l.data,value:this.getTooltipText(),valueFormatted:null==(r=a.getValueFormatted)?void 0:r.call(a),hideTooltipCallback:()=>{var e;return null==(e=this.tooltipManager)?void 0:e.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},sU=new sL,s_=null,s$=class e extends tk{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=sU.next(),this.cssClassManager=new iO(()=>this.eGui),this.componentSelectors=new Map((null!=t?t:[]).map(e=>[e.selector,e])),e&&this.setTemplate(e)}preWireBeans(e){super.preWireBeans(e)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(e){let{newTooltipText:t,showDelayOverride:i,hideDelayOverride:s,location:r,shouldDisplayTooltip:a}=e||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==t&&(this.tooltipText=t);let o=()=>this.tooltipText;null!=t&&(this.tooltipFeature=this.createBean(new sW({getTooltipValue:o,getGui:()=>this.getGui(),getLocation:()=>null!=r?r:"UNKNOWN",getColDef:null==e?void 0:e.getColDef,getColumn:null==e?void 0:e.getColumn,getTooltipShowDelayOverride:null!=i?()=>i:void 0,getTooltipHideDelayOverride:null!=s?()=>s:void 0,shouldDisplayTooltip:a})))}getDataRefAttribute(e){return e.getAttribute?e.getAttribute("data-ref"):null}applyElementsToComponent(e,t,i,s=null){if(void 0===t&&(t=this.getDataRefAttribute(e)),t){let r=this[t];if(r===s_)this[t]=null!=s?s:e;else{let e=i&&i[t];this.suppressDataRefValidation||e||ep(`Issue with data-ref: ${t} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(e,t){(function(e){if(null==e)return[];let t=[];return sR(e,e=>t.push(e)),t})(e.childNodes).forEach(i=>{if(!(i instanceof HTMLElement))return;let s=this.createComponentFromElement(i,e=>{e.getGui()&&this.copyAttributesFromNode(i,e.getGui())},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);let e=Array.prototype.slice.call(i.children);s.addItems(e)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(t,i,s){let r=t.nodeName,a=this.getDataRefAttribute(t),o=0===r.indexOf("AG-"),n=o?this.componentSelectors.get(r):null,l=null;if(n){e.elementGettingCreated=t;let r=s&&a?s[a]:void 0;(l=new n.component(r)).setParentComponent(this),this.createBean(l,null,i)}else o&&ep(`Missing selector: ${r}`);return this.applyElementsToComponent(t,a,s,l),l}copyAttributesFromNode(e,t){!function(e,t){if(e)for(let i=0;i<e.length;i++){let s=e[i];t(s.name,s.value)}}(e.attributes,(e,i)=>t.setAttribute(e,i))}swapComponentForNode(e,t,i){let s=e.getGui();t.replaceChild(s,i),t.insertBefore(document.createComment(i.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){let t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(e=>e.setAttribute("tabindex",t.toString()))}setTemplate(e,t,i){let s=sy(e);this.setTemplateFromElement(s,t,i)}setTemplateFromElement(e,t,i,s=!1){if(this.eGui=e,this.suppressDataRefValidation=s,t)for(let e=0;e<t.length;e++){let i=t[e];this.componentSelectors.set(i.selector,i)}this.wireTemplate(e,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let i=t;return null==e?null:(i||(i=this.eGui),sI(e))?{element:e,parent:i}:{element:e.getGui(),parent:i}}prependChild(e,t){let{element:i,parent:s}=this.getContainerAndElement(e,t)||{};i&&s&&s.insertAdjacentElement("afterbegin",i)}appendChild(e,t){let{element:i,parent:s}=this.getContainerAndElement(e,t)||{};i&&s&&s.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;let{skipAriaHidden:i}=t;sr(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;let{skipAriaHidden:i}=t;ss(this.eGui,e,{skipAriaHidden:i});let s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}
1addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}},sY={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},sK=((r=new Set(Object.values(sY))).add("eye"),r);function sZ(e,t,i){let s=sq(e,t,i);if(s){let{className:e}=s;if("string"==typeof e&&e.indexOf("ag-icon")>-1||"object"==typeof e&&e["ag-icon"])return s}let r=document.createElement("span");return r.appendChild(s),r}function sq(e,t,i,s){let r=null,a=i&&i.getColDef().icons;if(a&&(r=a[e]),t&&!r){let i=t.get("icons");i&&(r=i[e])}if(r){let e;if("function"==typeof r)e=r();else if("string"==typeof r)e=r;else throw Error("icon from grid options needs to be a string or a function");if("string"==typeof e)return sy(e);if(sI(e))return e;ep("iconRenderer should return back a string or a dom object")}else{var o;let t=document.createElement("span"),i=null!=(o=sY[e])?o:sK.has(e)?e:void 0;return i||(s?i=e:(ep(`Did not find icon ${e}`),i="")),t.setAttribute("class",`ag-icon ag-icon-${i}`),t.setAttribute("unselectable","on"),iV(t,"presentation"),t}}var sQ=class extends s${constructor(){super(...arguments),this.dragSource=null,this.eIcon=s_,this.eLabel=s_}postConstruct(){let e=e=>sZ(e,this.gos,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(`<div class="ag-dnd-ghost ag-unselectable">
2                <span data-ref="eIcon" class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
3                <div data-ref="eLabel" class="ag-dnd-ghost-label"></div>
4            </div>`)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t=!1){sm(this.eIcon);let i=null;if(!e){var s,r;e=null!=(s=this.dragSource)&&s.getDefaultIconName?null==(r=this.dragSource)?void 0:r.getDefaultIconName():"notAllowed"}i=this.dropIconMap[e],this.eIcon.classList.toggle("ag-shake-left-to-right",t),
4!(i===this.dropIconMap.hide&&this.gos.get("suppressDragLeaveHidesColumns"))&&i&&this.eIcon.appendChild(i)}setLabel(e){this.eLabel.textContent=ig(e)}};function sX(e,t,i){return 0!==i&&Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))<=i}var sJ=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new el,this.eElement=e,this.preventMouseClick=t;let i=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",s,{passive:!0}),this.eElement.addEventListener("touchend",r,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",s,{passive:!0}),this.eElement.removeEventListener("touchend",r,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;let t=this.touchStart;window.setTimeout(()=>{let i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;let t={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(t)}},500)}onTouchMove(e){if(!this.touching)return;let t=this.getActiveTouch(e.touches);!t||sX(t,this.touchStart,4)||(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){let e={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(e),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){let e=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){let e={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(e),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}};function s0(e,t){return`<span data-ref="eSort${e}" class="ag-sort-indicator-icon ag-sort-${t} ag-hidden" aria-hidden="true"></span>`}var s1=`<span class="ag-sort-indicator-container">
5        ${s0("Order","order")}
6        ${s0("Asc","ascending-icon")}
7        ${s0("Desc","descending-icon")}
8        ${s0("Mixed","mixed-icon")}
9        ${s0("None","none-icon")}
10    </span>`,s2=class extends s${constructor(e){super(),this.eSortOrder=s_,this.eSortAsc=s_,this.eSortDesc=s_,this.eSortMixed=s_,this.eSortNone=s_,e||this.setTemplate(s1)}wireBeans(e){this.sortController=e.sortController}attachCustomElements(e,t,i,s,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=s,this.eSortNone=r}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!this.column.isSortable()&&!this.column.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);let i=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(null==t)return;let s=sq(e,this.gos,i);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc&&ss(this.eSortAsc,"asc"===e,{skipAriaHidden:!0}),this.eSortDesc&&ss(this.eSortDesc,"desc"===e,{skipAriaHidden:!0}),this.eSortNone){let t=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon");ss(this.eSortNone,!t&&null==e,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);let e=this.column.getColDef().showRowGroup;eJ(this.gos)&&e&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){let e="mixed"===this.sortController.getDisplaySortForColumn(this.column);ss(this.eSortMixed,e,{skipAriaHidden:!0})}}updateSortOrder(){var e;if(!this.eSortOrder)return;let t=this.sortController.getColumnsWithSortingOrdered(),i=null!=(e=this.sortController.getDisplaySortIndexForColumn(this.column))?e:-1,s=t.some(e=>{var t;return null!=(t=this.sortController.getDisplaySortIndexForColumn(e))&&t});ss(this.eSortOrder,i>=0&&s,{skipAriaHidden:!0}),i>=0?this.eSortOrder.textContent=(i+1).toString():sm(this.eSortOrder)}},s3={selector:"AG-SORT-INDICATOR",component:s2},s4=`<div class="ag-cell-label-container" role="presentation">
11        <span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
12        <span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
13        <div data-ref="eLabel" class="ag-header-cell-label" role="presentation">
14            <span data-ref="eText" class="ag-header-cell-text"></span>
15            <span data-ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
16            <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
17        </div>
18    </div>`,s6=class extends s${constructor(){super(...arguments),this.eFilter=s_,this.eFilterButton=s_,this.eSortIndicator=s_,this.eMenu=s_,this.eLabel=s_,this.eText=s_,this.eSortOrder=s_,this.eSortAsc=s_,this.eSortDesc=s_,this.eSortMixed=s_,this.eSortNone=s_,this.lastMovingChanged=0}wireBeans(e){this.sortController=e.sortController,this.menuService=e.menuService,this.funcColsService=e.funcColsService}destroy(){super.destroy()}refresh(e){let t=this.params;return this.params=e,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&t.enableFilterButton==e.enableFilterButton&&t.enableFilterIcon==e.enableFilterIcon&&(this.setDisplayName(e),!0)}workOutTemplate(){var e;let t=null!=(e=this.params.template)?e:s4;return t&&t.trim?t.trim():t}init(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate,[s3]),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(e)}setDisplayName(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;let t=ig(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}addInIcon(e,t,i){if(null==t)return;let s=sq(e,this.gos,i);s&&t.appendChild(s)}setupTap(){let{gos:e}=this;if(e.get("suppressTouch"))return;let t=new sJ(this.getGui(),!0),i=this.shouldSuppressMenuHide(),s=i&&eM(this.eMenu),r=s?new sJ(this.eMenu,!0):t;if(this.params.enableMenu){let e=e=>this.params.showColumnMenuAfterMouseClick(e.touchStart);this.addManagedListeners(r,{[s?"tap":"longTap"]:e})}if(this.params.enableSorting){let e=e=>{var t,s;let r=e.touchStart.target;i&&(null!=(t=this.eMenu)&&t.contains(r)||null!=(s=this.eFilterButton)&&s.contains(r))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListeners(t,{tap:e})}if(this.params.enableFilterButton){let e=new sJ(this.eFilterButton,!0);this.addManagedListeners(e,{tap:()=>this.params.showFilter(this.eFilterButton)}),this.addDestroyFunc(()=>e.destroy())}this.addDestroyFunc(()=>t.destroy()),s&&this.addDestroyFunc(()=>r.destroy())}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){sv(this.eMenu),this.eMenu=void 0;return}let e=this.menuService.isLegacyMenuEnabled();this.addInIcon(e?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!e),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedElementListeners(this.eMenu,{click:()=>this.params.showColumnMenu(this.eMenu)}),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(e){var t,i,s,r;let a=this.params.column,o=this.menuService.isLegacyMenuEnabled();if(e&&!o){if(this.menuService.isFilterMenuInHeaderEnabled(a))return this.params.showFilter(null!=(t=null!=(i=this.eFilterButton)?i:this.eMenu)?t:this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(null!=(s=null!=(r=this.eMenu)?r:this.eFilterButton)?s:this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.createBean(new s2(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDe
18sc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListeners(this.params.column,{movingChanged:()=>{this.lastMovingChanged=(new Date).getTime()}}),this.eLabel&&this.addManagedElementListeners(this.eLabel,{click:e=>{let t=this.params.column.isMoving(),i=(new Date).getTime()-this.lastMovingChanged<50;if(!(t||i)){let t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.params.progressSort(t)}}});let e=()=>{let e=this.params.column.getSort();if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc","asc"===e),this.addOrRemoveCssClass("ag-header-cell-sorted-desc","desc"===e),this.addOrRemoveCssClass("ag-header-cell-sorted-none",!e),this.params.column.getColDef().showRowGroup){let e=this.funcColsService.getSourceColumnsForGroupColumn(this.params.column),t=null==e?void 0:e.every(e=>this.params.column.getSort()==e.getSort());this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",!t)}};this.addManagedEventListeners({sortChanged:e,columnRowGroupChanged:e})}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){this.eFilterButton&&(this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedElementListeners(this.eFilterButton,{click:()=>this.params.showFilter(this.eFilterButton)}):this.eFilterButton=void 0)}configureFilter(e,t,i){if(!e)return sv(t),!1;let s=this.params.column;return this.addInIcon("filter",t,s),this.addManagedListeners(s,{filterChanged:i}),i(),!0}onFilterChangedIcon(){let e=this.params.column.isFilterActive();ss(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){let e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){var t,i,s,r;return e?null!=(s=null!=(r=this.eFilterButton)?r:this.eMenu)?s:this.getGui():null!=(t=null!=(i=this.eMenu)?i:this.eFilterButton)?t:this.getGui()}},s5=class extends s${constructor(){super(`<div class="ag-header-group-cell-label" role="presentation">
19            <span data-ref="agLabel" class="ag-header-group-text" role="presentation"></span>
20            <span data-ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
21            <span data-ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
22        </div>`),this.agOpened=s_,this.agClosed=s_,this.agLabel=s_}wireBeans(e){this.columnModel=e.columnModel}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&ep("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened",this.agOpened),this.addInIcon("columnGroupClosed",this.agClosed);let e=e=>{if(tT(e))return;let t=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),t,"uiColumnExpanded")};this.addTouchAndClickListeners(this.agClosed,e),this.addTouchAndClickListeners(this.agOpened,e);let t=e=>{tR(e)};this.addManagedElementListeners(this.agClosed,{dblclick:t}),this.addManagedElementListeners(this.agOpened,{dblclick:t}),this.addManagedElementListeners(this.getGui(),{dblclick:e}),this.updateIconVisibility();let i=this.params.columnGroup.getProvidedColumnGroup(),s=this.updateIconVisibility.bind(this);this.addManagedListeners(i,{expandedChanged:s,expandableChanged:s})}addTouchAndClickListeners(e,t){let i=new sJ(e,!0);this.addManagedListeners(i,{tap:t}),this.addDestroyFunc(()=>i.destroy()),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){let e=this.params.columnGroup.isExpanded();ss(this.agOpened,e),ss(this.agClosed,!e)}else ss(this.agOpened,!1),ss(this.agClosed,!1)}addInIcon(e,t){let i=sq(e,this.gos,null);i&&t.appendChild(i)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){ss(this.agOpened,!1),ss(this.agClosed,!1);return}}setupLabel(){var e;let{displayName:t,columnGroup:i}=this.params;if(eM(t)){let e=ig(t,!0);this.agLabel.textContent=e}this.addOrRemoveCssClass("ag-sticky-label",!(null!=(e=i.getColGroupDef())&&e.suppressStickyLabel))}},s8=class extends s${constructor(){super(),this.refreshCount=0;let e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");let i=document.createElement("span");i.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(i),this.setTemplateFromElement(e)}wireBeans(e){this.filterManager=e.filterManager}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,t){let i=Math.abs(t),s=e.formatValue(i),r=eM(s)?s:i,a=t>=0;a?this.eDelta.textContent="↑"+r:this.eDelta.textContent="↓"+r,this.eDelta.classList.toggle("ag-value-change-delta-up",a),this.eDelta.classList.toggle("ag-value-change-delta-down",!a)}setTimerToRemoveDelta(){this.refreshCount++;let e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),sm(this.eDelta)}refresh(e,t=!1){var i;let s=e.value;if(s===this.lastValue||(eM(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:eM(e.value)?this.eValue.textContent=s:sm(this.eValue),null!=(i=this.filterManager)&&i.isSuppressFlashingCellsBecauseFiltering()))return!1;if("number"==typeof s&&"number"==typeof this.lastValue){let t=s-this.lastValue;this.showDelta(e,t)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},s7=class extends s${constructor(){super(),this.refreshCount=0;let e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}wireBeans(e){this.filterManager=e.filterManager}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;let e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);let t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var i;let s=e.value;return eD(s)&&(s=""),!(s===this.lastValue||null!=(i=this.filterManager)&&i.isSuppressFlashingCellsBecauseFiltering())&&
22(t||this.addSlideAnimation(),this.lastValue=s,eM(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:eM(e.value)?this.eCurrent.textContent=s:sm(this.eCurrent),!0)}},s9=class{};s9.BACKSPACE="Backspace",s9.TAB="Tab",s9.ENTER="Enter",s9.ESCAPE="Escape",s9.SPACE=" ",s9.LEFT="ArrowLeft",s9.UP="ArrowUp",s9.RIGHT="ArrowRight",s9.DOWN="ArrowDown",s9.DELETE="Delete",s9.F2="F2",s9.PAGE_UP="PageUp",s9.PAGE_DOWN="PageDown",s9.PAGE_HOME="Home",s9.PAGE_END="End",s9.A="KeyA",s9.C="KeyC",s9.D="KeyD",s9.V="KeyV",s9.X="KeyX",s9.Y="KeyY",s9.Z="KeyZ";var re=class extends s${constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");let{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:r}=this.config;null!=r&&this.setDisabled(r),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){sm(this.eLabel),"string"==typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(ss(this.eLabel,!1),iV(this.eLabel,"presentation")):(ss(this.eLabel,!0),iV(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){let t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||sx(this.eLabel,e),this}setDisabled(e){e=!!e;let t=this.getGui();return sa(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},rt=class extends re{constructor(e,t,i,s){super(e,t,i),this.className=s}postConstruct(){super.postConstruct();let{width:e,value:t,onValueChange:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){let e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();null==i||""==i||null!==e.getAttribute("aria-label")?iW(e,""):iW(e,null!=t?t:"")}setAriaLabel(e){return ij(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return sM(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}},ri=class extends rt{constructor(e,t,i="text",s="input"){var r;super(e,null!=(r=null==e?void 0:e.template)?r:`
23            <div role="presentation">
24                <div data-ref="eLabel" class="ag-input-field-label"></div>
25                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
26                    <${s} data-ref="eInput" class="ag-input-field-input"></${s}>
27                </div>
28            </div>`,[],t),this.inputType=i,this.displayFieldTag=s,this.eLabel=s_,this.eWrapper=s_,this.eInput=s_}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;let{inputName:e,inputWidth:t}=this.config;null!=e&&this.setInputName(e),null!=t&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input
28:e=>this.setValue(e.target.value)})}setInputType(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return sx(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return sA(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return ij(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return sa(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return!0===e?sA(this.eInput,"autocomplete",null):sA(this.eInput,"autocomplete","string"==typeof e?e:"off"),this}},rs=class extends ri{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();let{readOnly:e,passive:t}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return void 0===this.selected||!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;let 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){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});let s=this.getInputElement();this.eventService.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;let t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)}},rr={selector:"AG-CHECKBOX",component:rs},ra=class extends s${constructor(){super(`
29            <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
30                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
31            </div>`,[rr]),this.eCheckbox=s_}init(e){this.refresh(e);let t=this.eCheckbox.getInputElement();t.setAttribute("tabindex","-1"),iG(t,"live","polite"),this.addManagedListeners(t,{click:e=>{if(tR(e),this.eCheckbox.isDisabled())return;let t=this.eCheckbox.getValue();this.onCheckboxChanged(t)},dblclick:e=>{tR(e)}}),this.addManagedElementListeners(this.params.eGridCell,{keydown:e=>{if(e.key===s9.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===eZ(this.gos)&&this.eCheckbox.toggle();let t=this.eCheckbox.getValue();this.onCheckboxChanged(t),e.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var t,i,s;let r,a=!0;if(e.node.group&&e.column)if("boolean"==typeof e.value)r=e.value;else{let t=e.column.getColId();t.startsWith(tz)?r=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[t]?r=null!=(i=e.value)?i:void 0:a=!1}else r=null!=(s=e.value)?s:void 0;if(!a)return void this.eCheckbox.setDisplayed(!1);this.eCheckbox.setValue(r);let o=null!=e.disabled?e.disabled:!(null!=(t=e.column)&&t.isCellEditable(e.node));this.eCheckbox.setDisabled(o);let n=this.localeService.getLocaleTextFunc(),l=i9(n,r),h=o?l:`${n("ariaToggleCellValue","Press SPACE to toggle cell value")} (${l})`;this.eCheckbox.setInputAriaLabel(h)}
31onCheckboxChanged(e){let{column:t,node:i,value:s}=this.params;this.eventService.dispatchEvent({type:"cellEditingStarted",column:t,colDef:null==t?void 0:t.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:s});let r=this.params.node.setDataValue(this.params.column,e,"edit");this.eventService.dispatchEvent({type:"cellEditingStopped",column:t,colDef:null==t?void 0:t.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:s,oldValue:s,newValue:e,valueChanged:r}),r||this.updateCheckbox(this.params)}},ro=class extends s${constructor(){super(`<div class="ag-loading">
32            <span class="ag-loading-icon" data-ref="eLoadingIcon"></span>
33            <span class="ag-loading-text" data-ref="eLoadingText"></span>
34        </div>`),this.eLoadingIcon=s_,this.eLoadingText=s_}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){let e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){let e=sq("groupLoading",this.gos,null);e&&this.eLoadingIcon.appendChild(e);let t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}},rn=class extends s${constructor(){super('<div class="ag-skeleton-container"></div>')}init(e){let t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>iW(e.eParentOfValue)),iW(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){let e=this.localeService.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");let t=e("ariaSkeletonCellLoadingFailed","Row failed to load");ij(this.getGui(),t)}setupLoading(e){let t=e$(this.gos).createElement("div");t.classList.add("ag-skeleton-effect");let i=e.node.rowIndex;if(null!=i){let e=75+25*(i%2==0?Math.sin(i):Math.cos(i));t.style.width=`${e}%`}this.getGui().appendChild(t);let s=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");ij(this.getGui(),s)}refresh(e){return!1}destroy(){super.destroy()}},rl=class extends s${constructor(){super()}destroy(){super.destroy()}},rh=class extends rl{init(){var e;let t=ex(null==(e=this.gos.get("overlayLoadingTemplate"))?void 0:e.trim());if(this.setTemplate(null!=t?t:'<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>'),!t){let e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("loadingOoo","Loading...")})}}},rd=class extends rl{init(){var e;let t=ex(null==(e=this.gos.get("overlayNoRowsTemplate"))?void 0:e.trim());if(this.setTemplate(null!=t?t:'<span class="ag-overlay-no-rows-center"></span>'),!t){let e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("noRowsToShow","No Rows To Show")})}}},ru=class extends s${isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){let e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},rc=class extends ru{constructor(){super('<div class="ag-tooltip"></div>')}init(e){let{value:t}=e;this.getGui().textContent=ig(t,!0)}};function rp(e){let{inputValue:t,allSuggestions:i,hideIrrelevant:s,filterByPercentageOfBestMatch:r,addSequentialWeight:a}=e,o=i.map((e,i)=>({value:e,relevance:function(e,t,i=!1){let s=e.replace(/\s/g,""),r=t.replace(/\s/g,""),a=s.length,o=r.length,n=Array(a+1).fill(null).map(()=>Array(o+1).fill(0));for(let e=0;e<=a;e+=1)n[e][0]=e;for(let e=0;e<=o;e+=1)n[0][e]=e;for(let e=1;e<=a;e++)for(let t=1;t<=o;t++)s[e-1]===r[t-1]?n[e][t]=n[e-1][t-1]:n[e][t]=1+Math.min(n[e][t-1],Math.min(n[e-1][t],n[e-1][t-1]));let l=n[a][o],h=Math.max(a,o)-l;if(i){let e=function(e){let t=[],i=e.length;for(let s=1;s<=i;s++)for(let r=0;r<=i-s;r++){let i=r+s-1;t.push(e.slice(r,i+1))}return t}(s);for(let t=0;t<e.length;t++){let i=e[t];-1!==r.indexOf(i)&&(h+=1,h*=i.length)}}return h}(t.toLowerCase(),e.toLocaleLowerCase(),a),idx:i}));if(o.sort((e,t)=>t.relevance-e.relevance),s&&(o=o.filter(e=>0!==e.relevance)),o.length>0&&r&&r>0){let e=o[0].relevance*r;o=o.filter(t=>e-t.relevance<0)}let n=[],l=[];
34for(let e of o)n.push(e.value),l.push(e.idx);return{values:n,indices:l}}var rg=class extends tk{constructor(){super(...arguments),this.beanName="userComponentRegistry",this.agGridDefaults={agDragAndDropImage:sQ,agColumnHeader:s6,agColumnGroupHeader:s5,agSortIndicator:s2,agAnimateShowChangeCellRenderer:s8,agAnimateSlideCellRenderer:s7,agLoadingCellRenderer:ro,agSkeletonCellRenderer:rn,agCheckboxCellRenderer:ra,agLoadingOverlay:rh,agNoRowsOverlay:rd,agTooltipComponent:rc},this.agGridDefaultParams={},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agGroupCellRenderer:"@ag-grid-enterprise/row-grouping",agGroupRowRenderer:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}postConstruct(){let e=this.gos.get("components");null!=e&&tK(e,(e,t)=>this.registerJsComponent(e,t))}registerDefaultComponent(e,t,i){this.agGridDefaults[e]=t,i&&(this.agGridDefaultParams[e]=i)}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){let i=(e,t,i)=>({componentFromFramework:t,component:e,params:i}),s=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(null!=s)return i(s,!0);let r=this.jsComps[t];if(r){let e=this.getFrameworkOverrides().isFrameworkComponent(r);return i(r,e)}let a=this.agGridDefaults[t];if(a)return i(a,!1,this.agGridDefaultParams[t]);let o=this.enterpriseAgDefaultCompsModule[t];return o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):eu(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){let i=rp({inputValue:t,allSuggestions:[...Object.keys(this.agGridDefaults).filter(e=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e)),...Object.keys(this.jsComps)],hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;ep(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),i.length>0&&ep(`         Did you mean: [${i.slice(0,3)}]?`),ep(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}},rm=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(e=>this.onDone(e),e=>this.onReject(e))}static all(t){return t.length?new e(e=>{let i=t.length,s=Array(i);t.forEach((t,r)=>{t.then(t=>{s[r]=t,0==--i&&e(s)})})}):e.resolve()}static resolve(t=null){return new e(e=>e(t))}then(t){return new e(e=>{1===this.status?e(t(this.resolution)):this.waiters.push(i=>e(t(i)))})}onDone(e){this.status=1,this.resolution=e,this.waiters.forEach(t=>t(e))}onReject(e){}},rv={propertyName:"dateComponent",cellRenderer:!1},rf={propertyName:"dragAndDropImageComponent",cellRenderer:!1},rC={propertyName:"headerComponent",cellRenderer:!1},ry={propertyName:"headerGroupComponent",cellRenderer:!1},rw={propertyName:"cellRenderer",cellRenderer:!0},rb={propertyName:"cellRenderer",cellRenderer:!1},rS={propertyName:"loadingCellRenderer",cellRenderer:!0},rx={propertyName:"cellEditor",cellRenderer:!1},rM={propertyName:"innerRenderer",cellRenderer:!0},rD={propertyName:"loadingOverlayComponent",cellRenderer:!1},rE={propertyName:"noRowsOverlayComponent",cellRenderer:!1},rI={propertyName:"tooltipComponent",cellRenderer:!1},rA={propertyName:"filter",cellRenderer:!1},rR={propertyName:"floatingFilterComponent",cellRenderer:!1},rT={propertyName:"toolPanel",cellRenderer:!1},rL={propertyName:"statusPanel",cellRenderer:!1},rF={propertyName:"fullWidthCellRenderer",cellRenderer:!0},rP={propertyName:"loadingCellRenderer",cellRenderer:!0},rk={propertyName:"groupRowRenderer",cellRenderer:!0},rN={propertyName:"detailCellRenderer",cellRenderer:!0},rO={propertyName:"menuItem",cellRenderer:!1},rG=class e extends tk{constructor(){super(...arguments),this.beanName="userComponentFactory"}wireBeans(e){this.agComponentUtils=e.agComponentUtils,this.componentMetadataProvider=e.componentMetadataProvider,this.userComponentRegistry=e.userComponentRegistry,this.frameworkComponentWrapper=e.frameworkComponentWrapper,this.gridOptions=e.gridOptions}
34getDragAndDropImageCompDetails(e){return this.getCompDetails(this.gridOptions,rf,"agDragAndDropImage",e,!0)}getHeaderCompDetails(e,t){return this.getCompDetails(e,rC,"agColumnHeader",t)}getHeaderGroupCompDetails(e){let t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,ry,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,rF,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,rP,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,rk,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,rN,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,rM,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,rM,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,rw,null,t)}getEditorRendererDetails(e,t){return this.getCompDetails(e,rb,null,t)}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,rS,"agSkeletonCellRenderer",t,!0)}getCellEditorDetails(e,t){return this.getCompDetails(e,rx,"agCellEditor",t,!0)}getFilterDetails(e,t,i){return this.getCompDetails(e,rA,i,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,rv,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,rD,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,rE,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,rI,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,rw,null,t)}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,rR,i,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,rT,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,rL,null,t,!0)}getMenuItemCompDetails(e,t){return this.getCompDetails(e,rO,"agMenuItem",t,!0)}getCompDetails(t,i,s,r,a=!1){let o,{propertyName:n,cellRenderer:l}=i,{compName:h,jsComp:d,fwComp:u,paramsFromSelector:c,popupFromSelector:p,popupPositionFromSelector:g}=e.getCompKeys(this.frameworkOverrides,t,i,r),m=e=>{let t=this.userComponentRegistry.retrieve(n,e);t&&(d=t.componentFromFramework?void 0:t.component,u=t.componentFromFramework?t.component:void 0,o=t.params)};if(null!=h&&m(h),null==d&&null==u&&null!=s&&m(s),d&&l&&!this.agComponentUtils.doesImplementIComponent(d)&&(d=this.agComponentUtils.adaptFunction(n,d)),!d&&!u){a&&eg(`Could not find component ${h}, did you forget to configure this component?`);return}
34let v=this.mergeParamsWithApplicationProvidedParams(t,i,r,c,o),f=null==d,C=d||u;return{componentFromFramework:f,componentClass:C,params:v,type:i,popupFromSelector:p,popupPositionFromSelector:g,newAgStackInstance:()=>this.newAgStackInstance(C,f,v,i)}}static getCompKeys(e,t,i,s){let r,a,o,n,l,h,{propertyName:d}=i;if(t){let i=t[d+"Selector"],u=i?i(s):null,c=t=>{"string"==typeof t?r=t:null!=t&&!0!==t&&(e.isFrameworkComponent(t)?o=t:a=t)};u?(c(u.component),n=u.params,l=u.popup,h=u.popupPosition):c(t[d])}return{compName:r,jsComp:a,fwComp:o,paramsFromSelector:n,popupFromSelector:l,popupPositionFromSelector:h}}newAgStackInstance(e,t,i,s){let r,a=s.propertyName;if(t){let t=this.componentMetadataProvider.retrieve(a);r=this.frameworkComponentWrapper.wrap(e,t.mandatoryMethodList,t.optionalMethodList,s)}else r=new e;let o=this.initComponent(r,i);return null==o?rm.resolve(r):o.then(()=>r)}mergeParamsWithApplicationProvidedParams(e,t,i,s=null,r){let a=this.gos.getGridCommonParams();tX(a,i),r&&tX(a,r);let o=e&&e[t.propertyName+"Params"];return"function"==typeof o?tX(a,o(i)):"object"==typeof o&&tX(a,o),tX(a,s),a}initComponent(e,t){if(this.createBean(e),null!=e.init)return e.init(t)}};function rB(e){return null!=e&&null!=e.getFrameworkComponentInstance?e.getFrameworkComponentInstance():e}var rz=class e{static register(t){e.__register(t,!0,void 0)}static registerModules(t){e.__registerModules(t,!0,void 0)}static __register(t,i,s){e.runVersionChecks(t),void 0!==s?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[s]&&(e.gridModulesMap[s]={}),e.gridModulesMap[s][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,i,s){e.setModuleBased(i),t&&t.forEach(t=>e.__register(t,i,s))}static isValidModuleVersion(t){let[i,s]=t.version.split(".")||[],[r,a]=e.currentModuleVersion.split(".")||[];return i===r&&s===a}static runVersionChecks(t){e.currentModuleVersion||(e.currentModuleVersion=t.version);let i=e=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${e} Please update all modules to the same version.`;if(t.version?e.isValidModuleVersion(t)||eg(i(`'${t.moduleName}' is version ${t.version} but the other modules are version ${e.currentModuleVersion}.`)):eg(i(`'${t.moduleName}' is incompatible.`)),t.validate){let e=t.validate();e.isValid||eg(`${e.message}`)}}static setModuleBased(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&(eg("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) 
34- you can only use one or the other of these mechanisms."),eg("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information."))}static __setIsBundled(){e.isBundled=!0}static __assertRegistered(t,i,s){let r;if(this.__isRegistered(t,s))return!0;if(e.isBundled)r=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:
35        
36        <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"></script>
37        
38For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(e.moduleBased||void 0===e.moduleBased){var a;let o=null==(a=Object.entries(eh).find(([e,i])=>i===t))?void 0:a[0];r=`AG Grid: unable to use ${i} as the ${o} is not registered${e.areGridScopedModules?` for gridId: ${s}`:""}. Check if you have registered the module:
39           
40    import { ModuleRegistry } from '@ag-grid-community/core';
41    import { ${o} } from '${t}';
42    
43    ModuleRegistry.registerModules([ ${o} ]);
44
45For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else r=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
46            
47    import 'ag-grid-enterprise';`;return eg(r),!1}static __isRegistered(t,i){var s;return!!e.globalModulesMap[t]||!!(null!=(s=e.gridModulesMap[i])&&s[t])}static __getRegisteredModules(t){return[...eP(e.globalModulesMap),...eP(e.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var i;return eP(null!=(i=e.gridModulesMap[t])?i:{})||[]}static __isPackageBased(){return!e.moduleBased}};rz.globalModulesMap={},rz.gridModulesMap={},rz.areGridScopedModules=!1;var rV=rz,rH=class{constructor(e){if(this.beans={}
47,this.createdBeans=[],this.destroyed=!1,!e||!e.beanClasses)return;this.beanDestroyComparator=e.beanDestroyComparator,this.init(e)}init(e){var t;Object.entries(e.providedBeanInstances).forEach(([e,t])=>{this.beans[e]=t}),e.beanClasses.forEach(e=>{let t=new e;t.beanName?this.beans[t.beanName]=t:console.error(`Bean ${e.name} is missing beanName`),this.createdBeans.push(t)}),null==(t=e.derivedBeans)||t.forEach(e=>{let{beanName:t,bean:i}=e(this);this.beans[t]=i,this.createdBeans.push(i)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(e=>{var t,i;null==(t=e.preWireBeans)||t.call(e,this.beans),null==(i=e.wireBeans)||i.call(e,this.beans)}),e.forEach(e=>{var t;return null==(t=e.preConstruct)?void 0:t.call(e)}),t&&e.forEach(t),e.forEach(e=>{var t;return null==(t=e.postConstruct)?void 0:t.call(e)})}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;let e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){var t;null==e||null==(t=e.destroy)||t.call(e)}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},rj=class extends rH{init(e){this.gridId=e.gridId,this.beans.context=this,super.init(e)}destroy(){super.destroy(),rV.__unRegisterGridModules(this.gridId)}getGridId(){return this.gridId}},rW=((n=rW||{})[n.SINGLE_SHEET=0]="SINGLE_SHEET",n[n.MULTI_SHEET=1]="MULTI_SHEET",n),rU=((l=rU||{})[l.Up=0]="Up",l[l.Down=1]="Down",l),r_=((h=r_||{})[h.Left=0]="Left",h[h.Right=1]="Right",h),r$=((d=r$||{})[d.ToolPanel=0]="ToolPanel",d[d.HeaderCell=1]="HeaderCell",d[d.RowDrag=2]="RowDrag",d[d.ChartPanel=3]="ChartPanel",d[d.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",d),rY=class extends tk{constructor(){super(...arguments),this.beanName="dragAndDropService",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsService=e.ctrlsService,this.dragService=e.dragService,this.mouseEventService=e.mouseEventService,this.environment=e.environment,this.userComponentFactory=e.userComponentFactory}addDragSource(e,t=!1){let i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}getDragAndDropImageComponent(){let{dragAndDropImageComp:e}=this;return e&&e.comp?e.comp:null}removeDragSource(e){let t=this.dragSourceAndParamsList.find(t=>t.dragSource===e);t&&(this.dragService.removeDragSource(t.params),tC(this.dragSourceAndParamsList,t))}destroy(){this.dragSourceAndParamsList.forEach(e=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){var i,s;this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),null==(i=(s=this.dragSource).onDragStarted)||i.call(s),this.createDragAndDropImageComponent()}onDragStop(e){var t,i,s;if(null==(t=this.dragSource)||null==(i=t.onDragStopped)||i.call(t),null!=(s=this.lastDropTarget)&&s.onDragStop){let t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.clearDragAndDropProperties()}onDragCancel(){var e,t,i;null==(e=this.dragSource)||null==(t=e.onDragCancelled)||t.call(e),null!=(i=this.lastDropTarget)&&i.onDragCancel&&this.lastDropTarget.onDragCancel(this.createDropTargetEvent(this.lastDropTarget,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){let i=this.getHorizontalDirection(e),s=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);let r=this.dropTargets.filter(t=>this.isMouseOnDropTarget(e,t)),a=this.findCurrentDropTarget(e,r);if(a!==this.lastDropTarget){var o,n,l,h;if(this.leaveLastTargetIfExists(e,i,s,t),null!==this.lastDropTarget&&null===a&&(null==(o=this.dragSource)||null==(n=o.onGridExit)||n.call(o,this.dragItem)),null===this.lastDropTarget&&null!==a&&(null==(l=this.dragSource)||null==(h=l.onGridEnter)||h.call(l,this.dragItem)),this.enterDragTargetIfExists(a,e,i,s,t),a&&this.dragAndDropImageComp){let{comp:e,promise:t}=this.dragAndDropImageComp;e?e.setIcon(a.getIconName?a.getIconName():null):t.then(e=>{e&&e.setIcon(a.getIconName?a.getIconName():null)})}this.lastDropTarget=a}else if(a&&a.onDragging){let r=this.createDropTargetEvent(a,e,i,s,t);a.onDragging(r)}}getAllContainersFromDropTarget(e){let t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];
47return t?i.concat(t):i}allContainersIntersect(e,t){for(let i of t){let{width:t,height:s,left:r,right:a,top:o,bottom:n}=i.getBoundingClientRect();if(0===t||0===s)return!1;let l=e.clientX>=r&&e.clientX<a,h=e.clientY>=o&&e.clientY<n;if(!l||!h)return!1}return!0}isMouseOnDropTarget(e,t){let i=this.getAllContainersFromDropTarget(t),s=!1;for(let t of i)if(this.allContainersIntersect(e,t)){s=!0;break}let{eElement:r,type:a}=this.dragSource;return(!t.targetContainsSource||!!t.getContainer().contains(r))&&s&&t.isInterestedIn(a,r)}findCurrentDropTarget(e,t){let i=t.length;if(0===i)return null;if(1===i)return t[0];for(let i of eK(this.gos).elementsFromPoint(e.clientX,e.clientY))for(let e of t)if(-1!==tx(this.getAllContainersFromDropTarget(e)).indexOf(i))return e;return null}enterDragTargetIfExists(e,t,i,s,r){if(e&&e.onDragEnter){let a=this.createDropTargetEvent(e,t,i,s,r);e.onDragEnter(a)}}leaveLastTargetIfExists(e,t,i,s){if(!this.lastDropTarget)return;if(this.lastDropTarget.onDragLeave){let r=this.createDropTargetEvent(this.lastDropTarget,e,t,i,s);this.lastDropTarget.onDragLeave(r)}let r=this.getDragAndDropImageComponent();r&&r.setIcon(null)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(e=>e.external).find(t=>t.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){let t=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:i}=e;return t.contains(i)}getHorizontalDirection(e){let t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1}getVerticalDirection(e){let t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1}createDropTargetEvent(e,t,i,s,r){let a=e.getContainer(),o=a.getBoundingClientRect(),{dragItem:n,dragSource:l}=this,h=t.clientX-o.left,d=t.clientY-o.top;return this.gos.addGridCommonParams({event:t,x:h,y:d,vDirection:s,hDirection:i,dragSource:l,fromNudge:r,dragItem:n,dropZoneTarget:a})}positionDragAndDropImageComp(e){var t,i,s,r,a,o;let n=this.getDragAndDropImageComponent();if(!n)return;let l=n.getGui(),h=l.getBoundingClientRect().height,d=(null!=(t=null==(i=document.body)?void 0:i.clientWidth)?t:window.innerHeight||(null==(s=document.documentElement)?void 0:s.clientWidth)||-1)-2,u=(null!=(r=null==(a=document.body)?void 0:a.clientHeight)?r:window.innerHeight||(null==(o=document.documentElement)?void 0:o.clientHeight)||-1)-2;if(!l.offsetParent)return;let c=sc(l.offsetParent),{clientY:p,clientX:g}=e,m=p-c.top-h/2,v=g-c.left-10,f=e$(this.gos),C=f.defaultView||window,y=C.pageYOffset||f.documentElement.scrollTop,w=C.pageXOffset||f.documentElement.scrollLeft;d>0&&v+l.clientWidth>d+w&&(v=d+w-l.clientWidth),v<0&&(v=0),u>0&&m+l.clientHeight>u+y&&(m=u+y-l.clientHeight),m<0&&(m=0),l.style.left=`${v}px`,l.style.top=`${m}px`}removeDragAndDropImageComponent(){if(this.dragAndDropImageComp){let{comp:e}=this.dragAndDropImageComp;if(e){let t=e.getGui();this.dragAndDropImageParent&&this.dragAndDropImageParent.removeChild(t),this.destroyBean(e)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){let{dragSource:e}=this;if(!e)return;let t=this.userComponentFactory.getDragAndDropImageCompDetails({dragSource:e}).newAgStackInstance();this.dragAndDropImageComp={promise:t},t.then(e=>{e&&this.isAlive()&&(this.processDragAndDropImageComponent(e),this.dragAndDropImageComp.comp=e)})}processDragAndDropImageComponent(e){let{dragSource:t,mouseEventService:i,environment:s}=this;if(!t)return;let r=e.getGui();r.style.setProperty("position","absolute"),r.style.setProperty("z-index","9999"),i.stampTopLevelGridCompWithGridInstance(r),s.applyThemeClasses(r),e.setIcon(null);let{dragItemName:a}=t;em(a)&&(a=a()),e.setLabel(a||""),r.style.top="20px",r.style.left="20px";let o=e$(this.gos),n=null,l=null;try{n=o.fullscreenElement}catch{}finally{n||(n=eK(this.gos));let e=n.querySelector("body");if(e)l=e;else if(n instanceof ShadowRoot)l=n;else if(n instanceof Document){var h;l=null==(h=n)?void 0:h.documentElement}else l=n}this.dragAndDropImageParent=l,l?l.appendChild(r):ep("Could not find document body, it is needed for drag and drop.")}},rK=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollC
47ontainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){let i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;let s=this.scrollContainer.getBoundingClientRect(),r=this.scrollByTick;this.tickLeft=e.clientX<s.left+r,this.tickRight=e.clientX>s.right-r,this.tickUp=e.clientY<s.top+r&&!i,this.tickDown=e.clientY>s.bottom-r&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;let e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let 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)}},rZ=((u=rZ||{})[u.Above=0]="Above",u[u.Below=1]="Below",u),rq=class extends tk{wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService,this.focusService=e.focusService,this.sortController=e.sortController,this.filterManager=e.filterManager,this.selectionService=e.selectionService,this.mouseEventService=e.mouseEventService,this.ctrlsService=e.ctrlsService,this.funcColsService=e.funcColsService,this.rangeService=e.rangeService}constructor(e){super(),this.eContainer=e}postConstruct(){eN(this.gos)&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(this,e=>{let t=e.gridBodyCtrl;this.autoScrollService=new rK({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){var e;return!!(this.funcColsService.getRowGroupColumns().length||(null==(e=this.filterManager)?void 0:e.isAnyFilterPresent())||this.sortController.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let e=[...this.selectionService.getSelectedNodes()].sort((e,t)=>null==e.rowIndex||null==t.rowIndex?0:this.getRowIndexNumber(e)-this.getRowIndexNumber(t));if(-1!==e.indexOf(t))return e}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(e=>{e.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){let{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;let t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){let i=this.isFromThisGrid(e),s=this.gos.get("rowDragManaged"),r=e.dragItem.rowNodes;!(s&&this.shouldPreventRowMove())&&(this.gos.get("suppressMoveWhenRowDragging")||!i?this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(r[0],t):this.moveRows(r,t))}getRowIndexNumber(e){return parseInt(tp(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){let t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&1===t.highlighted,s=this.mouseEventService.getNormalisedPosition(e).y,r=e.dragItem.rowNodes,a=+!!i;
47if(this.isFromThisGrid(e))r.forEach(e=>{e.rowTop<s&&(a-=1)}),this.moveRows(r,s,a);else{let e=e6(this.gos),t=this.clientSideRowModel.getRowIndexAtPixel(s)+1;0===this.clientSideRowModel.getHighlightPosition(s)&&t--,this.clientSideRowModel.updateRowData({add:r.filter(t=>{var i;return!this.clientSideRowModel.getRowNode(null!=(i=null==e?void 0:e({data:t.data,level:0,rowPinned:t.rowPinned}))?i:t.data.id)}).map(e=>e.data),addIndex:t})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){if(this.clientSideRowModel.ensureRowsAtPixel(e,t,i)){var s;this.focusService.clearFocusedCell(),null==(s=this.rangeService)||s.removeAllCellRanges()}}addRowDropZone(e){if(!e.getContainer())return void ep("addRowDropZone - A container target needs to be provided");if(this.dragAndDropService.findExternalZone(e))return void ep("addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=t=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",t))}),e.onDragLeave&&(t.onDragLeave=t=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",t))}),e.onDragging&&(t.onDragging=t=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",t))}),e.onDragStop&&(t.onDragStop=t=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",t))}),e.onDragCancel&&(t.onDragCancel=t=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",t))}));let i={isInterestedIn:e=>2===e,getIconName:()=>"move",external:!0,...t};this.dragAndDropService.addDropTarget(i),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(i))}getRowDropZone(e){let t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),r=this.onDragging.bind(this),a=this.onDragStop.bind(this),o=this.onDragCancel.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?t=>{i(t),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",t))}:i,onDragLeave:e.onDragLeave?t=>{s(t),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",t))}:s,onDragging:e.onDragging?t=>{r(t),e.onDragging(this.draggingToRowDragEvent("rowDragMove",t))}:r,onDragStop:e.onDragStop?t=>{a(t),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",t))}:a,onDragCancel:e.onDragCancel?t=>{o(t),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",t))}:o,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:r,onDragStop:a,onDragCancel:o,fromGrid:!0}}draggingToRowDragEvent(e,t){let i,s,r=this.mouseEventService.getNormalisedPosition(t).y,a=r>this.pageBoundsService.getCurrentPageHeight(),o=-1;switch(!a&&(o=this.rowModel.getRowIndexAtPixel(r),i=this.rowModel.getRow(o)),t.vDirection){case 1:s="down";break;case 0:s="up";break;default:s=null}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:o,overNode:i,y:r,vDirection:s})}dispatchGridEvent(e,t){let i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(e=>{e.setDragging(!1)})}},rQ=class extends tk{constructor(){super(...arguments),this.beanName="dragService",this.dragEndFunctions=[],this.dragSources=[]}wireBeans(e){this.mouseEventService=e.mouseEventService}destroy(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0,super.destroy()}removeListener(e){let t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){let i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){let t=this.dragSources.find(t=>t.dragSource===e);t&&(this.removeListener(t),tC(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){let t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:r}=e;i.addEventListener("mousedown",t);let a=null,o=this.gos.get("suppressTouch");s&&!o&&(a=t=>{si(t.target)||(r&&t.stopPropagation(),this.onTouchStart(e,t))},i.addEventListener("touchstart",a,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:a,touchEnabled:!!s})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;let i=t.touches[0];this.touchLastTime=i,this.touchStart=i;let s=t=>this.onTouchMove(t,e.eElement),r=t=>this.onTouchUp(t,e.eElement),a=t.target,o=[{target:eK(this.gos),type:"touchmove",listener:e=>{e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:a,type:"touchmove",listener:s,options:{passive:!0}},{target:a,type:"touchend",listener:r,options:{passive:!0}},{target:a,type:"touchcancel",listener:r,options:{passive:!0}}];this.addTemporaryEvents(o),0===e.dragStartPixels&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){if(e.skipMouseEvent&&e.skipMouseEvent(t)||t._alreadyProcessedByDragService||(t._alreadyProcessedByDragService=!0,0!==t.button))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;let i=t=>this.onMouseMove(t,e.eElement),s=t=>this.onMouseUp(t,e.eElement),r=t=>{t.key===s9.ESCAPE&&this.cancelDrag(e.eElement)},a=eK(this.gos),o=[{target:a,type:"mousemove",listener:i},{target:a,type:"mouseup",listener:s},{target:a,type:"contextmenu",listener:e=>e.preventDefault()},{target:a,type:"keydown",listener:r}];this.addTemporaryEvents(o),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}
47addTemporaryEvents(e){e.forEach(e=>{let{target:t,type:i,listener:s,options:r}=e;t.addEventListener(i,s,r)}),this.dragEndFunctions.push(()=>{e.forEach(e=>{let{target:t,type:i,listener:s,options:r}=e;t.removeEventListener(i,s,r)})})}isEventNearStartEvent(e,t){let{dragStartPixels:i}=this.currentDragParams;return sX(e,t,eM(i)?i:4)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){var s;if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventService.dispatchEvent({type:"dragStarted",target:i}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}null==(s=this.currentDragParams)||s.onDragging(e)}onTouchMove(e,t){let i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){if(sF()){var i;null==(i=e$(this.gos).getSelection())||i.removeAllRanges()}this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){let t=this.gos.get("enableCellTextSelection"),i="mousemove"===e.type;return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){let t=e.target,i=null==t?void 0:t.tagName.toLocaleLowerCase();return!!(null!=i&&i.match("^a$|textarea|input|select|button"))}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventService.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){var t,i;this.eventService.dispatchEvent({type:"dragCancelled",target:e}),null==(t=this.currentDragParams)||null==(i=t.onDragCancel)||i.call(t),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(e=>e()),this.dragEndFunctions.length=0}},rX=class extends s${constructor(e,t,i,s,r,a){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=r,this.suppressVisibilityChange=a,this.dragSource=null}wireBeans(e){this.beans=e}isCustomGui(){return null!=this.customGui}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(sq("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){let e=this.gos.get("rowDragManaged")?new r1(this,this.beans,this.rowNode,this.column):new r0(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];let e=this.beans.selectionService.getSelectedNodes();return -1!==e.indexOf(this.rowNode)?e:[this.rowNode]}checkCompatibility(){let e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&ep("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){let t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();let t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:e=>{null==e||e.preventDefault()}})[0]);let i=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:()=>{var e;let t=this.getDragItem(),s=(null==(e=t.rowNodes)?void 0:e.length)||1,r=this.getRowDragText(this.column);return r?r(t,s):1===s?this.cellValueFn():`${s} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},rJ=class extends tk{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){let t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let e=!0,i=!1;this.column&&(e=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=em(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,t),this.parent.setVisible(e,t)):(this.parent.setDisplayed(e,t),this.parent.setVisible(!0,t))}}},r0=class extends rJ{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));let e=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:e}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}},r1=class extends rJ{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){let e=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventService,{sortChanged:e,filterChanged:e,columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature
47(),t=e&&e.shouldPreventRowMove(),i=this.gos.get("suppressRowDrag"),s=this.beans.dragAndDropService.hasExternalDropZones();this.setDisplayedOrVisible(t&&!s||i)}},r2=new Set(["localEventService","__objectId","sticky","__autoHeights","checkAutoHeightsDebounced"]),r3=class e{constructor(t){this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var i;let s=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();let r=this.createDataChangedEvent(e,s,t);null==(i=this.localEventService)||i.dispatchEvent(r)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return null==this.rowIndex?(eg("Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid."),null):"top"===this.rowPinned?e.ID_PREFIX_TOP_PINNED+this.rowIndex:"bottom"===this.rowPinned?e.ID_PREFIX_BOTTOM_PINNED+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){let t=new e(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(e,t){var i;let s=eM(this.id)?this.createDaemonNode():null,r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,s);let a=this.createDataChangedEvent(e,r,!1);null==(i=this.localEventService)||i.dispatchEvent(a)}checkRowSelectable(){let e=to(this.beans.gos);this.setRowSelectable(!e||e(this))}setRowSelectable(e,t){if(this.selectable!==e&&(this.selectable=e,this.dispatchRowEvent("selectableChanged"),!t)){if(td(this.beans.gos)){let e=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:null!=e&&e,source:"selectableChanged"});return}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){let i=e6(this.beans.gos);if(i)if(this.data){var s,r;let t=null!=(s=null==(r=this.parent)?void 0:r.getRoute())?s:[];this.id=i({data:this.data,parentKeys:t.length>0?t:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&eg(`Row IDs cannot start with ${e.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`)}else this.id=void 0;else this.id=t}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(null!==e))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setMaster(e){this.master!==e&&(this.master&&!e&&(this.expanded=!1),this.master=e,this.dispatchRowEvent("masterChanged"))}setGroup(e){this.group!==e&&(this.group&&!e&&(this.expanded=!1),this.group=e,this.updateHasChildren(),this.checkRowSelectable(),this.dispatchRowEvent("groupChanged"))}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setRowAutoHeight(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=ey(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){var e;let t=!1,i=!0,s=0,r=this.__autoHeights;if(null==r||(this.beans.visibleColsService.getAllAutoHeightCols().forEach(e=>{let a=r[e.getId()];if(null==a)if(this.beans.columnModel.isColSpanActive()){let i=[];switch(e.getPinned()){case"left":i=this.beans.visibleColsService.getLeftColsForRow(this);break;case"right":i=this.beans.visibleColsService.getRightColsForRow(this);break;case null:i=this.beans.columnViewportService.getColsWithinViewport(this)}if(i.includes(e)){t=!0;return}a=-1}else{t=!0;return}else i=!1;a>s&&(s=a)}),t)||((i||s<10)&&(s=eH(this.beans.gos,this).height),s==this.rowHeight))return;this.setRowHeight(s);let a=this.beans.rowModel;null==(e=a.onRowHeightChangedDebounced)||e.call(a)}setExpanded(e,t,i){if(this.expanded===e)return;this.expanded=e,this.dispatchRowEvent("expandedChanged");let s={...this.createGlobalRowEvent("rowGroupOpened"),expanded:e,event:t||null};this.beans.rowNodeEventThrottle.dispatchExpanded(s,i),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(e){return this.beans.gos.addGridCommonParams({type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}setDataValue(e,t,i){var s;let r="string"!=typeof e?e:null!=(s=this.beans.columnModel.getCol(e))?s:this.beans.columnModel.getColDefCol(e),a=this.beans.valueService.getValueForDisplay(r,this);if(this.beans.gos.get("readOnlyEdit"))return this.beans.eventService.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:r,colDef:r.getColDef(),data:this.data,node:this,oldValue:a,newValue:t,value:t,source:i}),!1;let o=this.beans.valueService.setValue(this,r,t,i);return this.dispatchCellChangedEvent(r,t,a),this.checkRowSelectable(),o}setGroupValue(e,t){let i=this.beans.columnModel.getCol(e);eD(this.groupData)&&(this.groupData={});let s=i.getColId(),r=this.groupData[s];r!==t&&(this.groupData[s]=t,this.dispatchCellChangedEvent(i,t,r))}setAggData(e){let t=this.aggData;if(this.aggData=e,this.localEventService){let i=e=>{let i=this.aggData?this.aggData[e]:void 0,s=t?t[e]:void 0;if(i===s)return;let r=this.beans.columnModel.getCol(e);r&&this.dispatchCellChangedEvent(r,i,s)};for(let e in t)i(e);for(let s in e)t&&s in t||i(s)}}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(eO(this.beans.gos)){let t=this.beans.gos.get("treeData"),i=this.beans.gos.get("isServerSideGroup");e=!this.stub&&!this.footer&&(t?!!i&&i(this.data):!!this.group)}e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){var s;null==(s=this.localEventService)||s.dispatchEvent({type:"cellChanged",node:this,column:e,newValue:t,oldValue:i})}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||
47!!this.master)}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(t=>t.depthFirstSearch(e)),e(this)}calculateSelectedFromChildren(){var e;let t=!1,i=!1;if(!(null!=(e=this.childrenAfterGroup)&&e.length))return this.selectable?this.selected:null;for(let e=0;e<this.childrenAfterGroup.length;e++){let s=this.childrenAfterGroup[e],r=s.isSelected();if(!s.selectable){let e=s.calculateSelectedFromChildren();if(null===e)continue;r=e}switch(r){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!t||!i)return!!t||!i&&(this.selectable?this.selected:null)}setSelectedInitialValue(e){this.selected=e}dispatchRowEvent(e){var t;null==(t=this.localEventService)||t.dispatchEvent({type:e,node:this})}selectThisNode(e,t,i="api"){let s=!this.selectable&&e,r=this.selected===e;if(s||r)return!1;this.selected=e,this.dispatchRowEvent("rowSelected");let a=this.sibling;return a&&a.footer&&a.localEventService&&a.dispatchRowEvent("rowSelected"),this.beans.eventService.dispatchEvent({...this.createGlobalRowEvent("rowSelected"),event:t||null,source:i}),!0}setSelected(e,t=!1,i="api"){"boolean"==typeof i?ep("since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead."):this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:i})}setSelectedParams(e){return this.rowPinned?(ep("cannot select pinned rows"),0):void 0===this.id?(ep("cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected({...e,nodes:[this.footer?this.sibling:this]})}isRowPinned(){return!!this.rowPinned}addEventListener(e,t){var i,s;this.localEventService||(this.localEventService=new el),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.localEventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new t$(this.beans.frameworkOverrides));let r=null!=(i=null==(s=this.frameworkEventListenerService)?void 0:s.wrap(e,t))?i:t;this.localEventService.addEventListener(e,r)}removeEventListener(e,t){var i,s;if(!this.localEventService)return;let r=null!=(i=null==(s=this.frameworkEventListenerService)?void 0:s.unwrap(e,t))?i:t;this.localEventService.removeEventListener(e,r),this.localEventService.noRegisteredListenersExist()&&(this.localEventService=null)}onMouseEnter(){this.dispatchRowEvent("mouseEnter")}onMouseLeave(){this.dispatchRowEvent("mouseLeave")}isFullWidthCell(){if(ep("since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option."),this.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(-1===this.level)return[];if(null==this.key)return;let e=[],t=this;for(;t&&null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}createFooter(){if(this.sibling)return;let t=new e(this.beans);Object.keys(this).forEach(e=>{r2.has(e)||(t[e]=this[e])}),t.footer=!0,t.setRowTop(null),t.setRowIndex(null),t.oldRowTop=null,t.id="rowGroupFooter_"+this.id,t.sibling=this,this.sibling=t}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setLastChild(e){this.lastChild!==e&&(this.lastChild=e,this.dispatchRowEvent("lastChildChanged"))}setChildIndex(e){this.childIndex!==e&&(this.childIndex=e,this.dispatchRowEvent("childIndexChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setDragging(e){this.dragging!==e&&(this.dragging=e,this.dispatchRowEvent("draggingChanged"))}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.dispatchRowEvent("rowHighlightChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};r3.ID_PREFIX_ROW_GROUP="row-group-",r3.ID_PREFIX_TOP_PINNED="t-",r3.ID_PREFIX_BOTTOM_PINNED="b-",r3.OBJECT_ID_SEQUENCE=0;var r4=r3,r6=class extends tk{constructor(){super(...arguments),this.beanName="filterManager",this.advancedFilterModelUpdateQueue=[]}wireBeans(e){this.columnModel=e.columnModel,this.dataTypeService=e.dataTypeService,this.quickFilterService=e.quickFilterService,this.advancedFilterService=e.advancedFilterService,this.columnFilterService=e.columnFilterService}postConstruct(){let e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvancedFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:e})=>this.onAdvancedFilterEnabledChanged(e),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.addManagedPropertyListener("advancedFilterModel",e=>this.setAdvancedFilterModel(e.currentValue)),this.quickFilterService&&this.addManagedListeners(this.quickFilterService,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})})}isExternalFilterPresentCallback(){let e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){let t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterModel(e,t="api"){var i;this.isAdvancedFilterEnabled()?this.warnAdvancedFilters():null==(i=this.columnFilterService)||i.setFilterModel(e,t)}getFilterModel(){var e,t;return null!=(e=null==(t=this.columnFilterService)?void 0:t.getFilterModel())?e:{}}isColumnFilterPresent(){var e;return!!(null!=(e=this.columnFilterService)&&e.isColumnFilterPresent())}isAggregateFilterPresent(){var e;return!!(null!=(e=this.columnFilterService)&&e.isAggregateFilterPresent())}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){var t,i;e?null!=(t=this.columnFilterService)&&t.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):null!=(i=this.advancedFilterService)&&i.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){var e;return!!(null!=(e=this.advancedFilterService)&&e.isEnabled())}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}resetQuickFilterCache(){var e;null==(e=this.quickFilterService)||e.resetQuickFilterCache()}refreshFiltersForAggregations(){e0(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:i,columns:s=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.columnFilterService?this.columnFilterService.updateBeforeFilterChanged(e):rm.resolve()).then(()=>{var e;let r={source:t,type:"filterChanged",columns:s};i&&tX(r,i),this.eventService.dispatchEvent(r),null==(e=this.columnFilterService)||e.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!(null!=(e=this.columnFilterService)&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!(null!=(e=this.quickFilterService)&&e.isQuickFilterPresent())}updateAggFiltering(){this.aggFiltering=!!e0(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.columnFilterService.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.columnFilterService.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))}isFilterActive(e){var t;return!!(null!=(t=this.columnFilterService)&&t.isFilterActive(e))}getOrCreateFilterWrapper(e){var t,i;return null!=(t=null==(i=this.columnFilterService)?void 0:i.getOrCreateFilterWrapper(e))?t:null}getDefaultFloatingFilter(e){return this.columnFilterService.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.columnFilterService.createFilterParams(e,t)}isFilterAllowed(e){var t;return!this.isAdvancedFilterEnabled()&&!!(null!=(t=this.columnFilterService)&&t.isFilterAllowed(e))}
47getFloatingFilterCompDetails(e,t){var i;return null==(i=this.columnFilterService)?void 0:i.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){var t;return null==(t=this.columnFilterService)?void 0:t.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){var i;null==(i=this.columnFilterService)||i.destroyFilter(e,t)}areFilterCompsDifferent(e,t){var i;return!!(null!=(i=this.columnFilterService)&&i.areFilterCompsDifferent(e,t))}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){var t;if(this.isAdvancedFilterEnabled()){if(null!=(t=this.dataTypeService)&&t.isPendingInference())return void this.advancedFilterModelUpdateQueue.push(e);this.advancedFilterService.setModel(null!=e?e:null),this.onFilterChanged({source:"advancedFilter"})}}toggleAdvancedFilterBuilder(e,t){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){var e;return!this.isAdvancedFilterEnabled()&&!!(null!=(e=this.columnFilterService)&&e.hasFloatingFilters())}getFilterInstance(e,t){var i;return this.isAdvancedFilterEnabled()?void this.warnAdvancedFilters():null==(i=this.columnFilterService)?void 0:i.getFilterInstance(e,t)}getColumnFilterInstance(e){var t,i;return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve(void 0)):null!=(t=null==(i=this.columnFilterService)?void 0:i.getColumnFilterInstance(e))?t:Promise.resolve(void 0)}warnAdvancedFilters(){ep("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){var t;null==(t=this.advancedFilterService)||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return+!!this.isAdvancedFilterHeaderActive()}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){var t;return null==(t=this.columnFilterService)?void 0:t.getColumnFilterModel(e)}setColumnFilterModel(e,t){var i,s;return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve()):null!=(i=null==(s=this.columnFilterService)?void 0:s.setColumnFilterModel(e,t))?i:Promise.resolve()}setColDefPropertiesForDataType(e,t,i){var s;null==(s=this.columnFilterService)||s.setColDefPropertiesForDataType(e,t,i)}},r5=class extends s${constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}wireBeans(e){this.filterManager=e.filterManager,this.columnModel=e.columnModel}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){var e,t;return null!=(e=null==(t=this.filterWrapper)?void 0:t.filterPromise)?e:null}afterInit(){var e,t;return null!=(e=null==(t=this.filterWrapper)||null==(t=t.filterPromise)?void 0:t.then(()=>{}))?e:rm.resolve()}afterGuiAttached(e){var t;null==(t=this.filterWrapper)||null==(t=t.filterPromise)||t.then(t=>{var i;null==t||null==(i=t.afterGuiAttached)||i.call(t,e)})}afterGuiDetached(){var e;null==(e=this.filterWrapper)||null==(e=e.filterPromise)||e.then(e=>{var t;null==e||null==(t=e.afterGuiDetached)||t.call(e)})}createFilter(e){var t,i,s;let{column:r,source:a}=this;this.filterWrapper=null!=(t=null==(i=this.filterManager)?void 0:i.getOrCreateFilterWrapper(r))?t:null,null!=(s=this.filterWrapper)&&s.filterPromise&&this.filterWrapper.filterPromise.then(t=>{let i=t.getGui();eM(i)||ep(`getGui method from filter returned ${i}; it should be a DOM element.`),this.appendChild(i),e&&this.eventService.dispatchEvent({type:"filterOpened",column:r,source:a,eGui:this.getGui()})})}onFilterDestroyed(e){("api"===e.source||"paramsUpdated"===e.source)&&e.column.getId()===this.column.getId()&&this.columnModel.getColDefCol(this.column)&&(sm(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},r8="ag-resizer-wrapper",r7=(e,t)=>`<div data-ref="${e}Resizer" class="ag-resizer ag-resizer-${t}"></div>`,r9=`<div class="${r8}">
48        ${r7("eTopLeft","topLeft")}
49        ${r7("eTop","top")}
50        ${r7("eTopRight","topRight")}
51        ${r7("eRight","right")}
52        ${r7("eBottomRight","bottomRight")}
53        ${r7("eBottom","bottom")}
54        ${r7("eBottomLeft","bottomLeft")}
55        ${r7("eLeft","left")}
56    </div>`,ae=class extends tk{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0}
56,this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupService=e.popupService,this.resizeObserverService=e.resizeObserverService,this.dragService=e.dragService}center(){let{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;let{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:r,height:a,x:o,y:n}=this.config;this.offsetParent||this.setOffsetParent();let l=0,h=0,d=sC(this.element);if(d){let e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(null!=t.minWidth){let i=e.offsetWidth-this.element.offsetWidth;h=parseInt(t.minWidth,10)-i}if(null!=t.minHeight){let i=e.offsetHeight-this.element.offsetHeight;l=parseInt(t.minHeight,10)-i}}if(this.minHeight=r||l,this.minWidth=i||h,s&&this.setWidth(s),a&&this.setHeight(a),s&&a||this.refreshSize(),e)this.center();else if(o||n)this.offsetElement(o,n);else if(d&&t){let e=this.boundaryEl,t=!0;if(e||(e=this.findBoundaryElement(),t=!1),e){let i=parseFloat(e.style.top),s=parseFloat(e.style.left);t?this.offsetElement(isNaN(s)?0:s,isNaN(i)?0:i):this.setPosition(s,i)}}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;let i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{let i=!!e[t],s=this.getResizerElement(t),r={dragStartPixels:0,eElement:s,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};!i&&(this.isAlive()||i)||(i?(this.dragService.addDragSource(r),this.resizeListeners.push(r),s.style.pointerEvents="all"):s.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";let{height:e,width:t}=this.lastSize;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,i=this.element,s=!1;if("string"==typeof e&&-1!==e.indexOf("%"))sD(i,e),e=sd(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?sD(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:i}=this.offsetParent;if(!i)return null;let s=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),a=e?this.position.y:s.top,o=e?0:r.top,n=0;if(t){let e=this.element.parentElement;if(e){let{bottom:t}=e.getBoundingClientRect();n=t-s.bottom}}return i+o-a-n}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:i}=this.config,s=!1;if("string"==typeof e&&-1!==e.indexOf("%"))sM(t,e),e=su(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:t}=this.offsetParent,s=i?this.position.x:this.element.getBoundingClientRect().left;t&&e+s>t&&(e=t-s)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?sM(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:parseFloat(e)))}offsetElement(e=0,t=0){let{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupService.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;let t=()=>{let e=this.getAvailableHeight();this.element.style.setProperty("max-height",`${e}px`)};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.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){let{e:t,isLeft:i,isTop:s,anywhereWithin:r,topBuffer:a}=e,o=t.clientX-this.dragStartPosition.x,n=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!r,o)?0:o,movementY:this.shouldSkipY(t,!!s,a,n)?0:n}}shouldSkipX(e,t,i,s){let r=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),n=this.config.popup?this.position.x:r.left,l=n<=0&&a.left>
56=e.clientX||a.right<=e.clientX&&a.right<=o.right;return!!l||(l=t?s<0&&e.clientX>n+a.left||s>0&&e.clientX<n+a.left:i?s<0&&e.clientX>o.right||s>0&&e.clientX<n+a.left:s<0&&e.clientX>o.right||s>0&&e.clientX<o.right)}shouldSkipY(e,t,i=0,s){let r=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),n=this.config.popup?this.position.y:r.top,l=n<=0&&a.top>=e.clientY||a.bottom<=e.clientY&&a.bottom<=o.bottom;return!!l||(l=t?s<0&&e.clientY>n+a.top+i||s>0&&e.clientY<n+a.top:s<0&&e.clientY>o.bottom||s>0&&e.clientY<o.bottom)}createResizeMap(){let e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[data-ref=eTopLeftResizer]")},top:{element:e.querySelector("[data-ref=eTopResizer]")},topRight:{element:e.querySelector("[data-ref=eTopRightResizer]")},right:{element:e.querySelector("[data-ref=eRightResizer]")},bottomRight:{element:e.querySelector("[data-ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[data-ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[data-ref=eBottomLeftResizer]")},left:{element:e.querySelector("[data-ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;let e=this.element;if(!e)return;let t=new DOMParser().parseFromString(r9,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;let e=this.element.querySelector(`.${r8}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");let{popup:i,forcePopupParentAsOffsetParent:s}=this.config;i||s||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(e=>!e.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,i=0;for(let s=0;s<e.length;s++){let r=e[s],a=!!r.style.flex&&"0 0 auto"!==r.style.flex;if(r===this.element)continue;let o=this.minHeight||0,n=this.minWidth||0;if(a){let e=window.getComputedStyle(r);e.minHeight&&(o=parseInt(e.minHeight,10)),e.minWidth&&(n=parseInt(e.minWidth,10))}else o=r.offsetHeight,n=r.offsetWidth;t+=o,i+=n}return{height:t,width:i}}applySizeToSiblings(e){let t=null,i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){let r=i[s];r!==t&&(e?r.style.height=`${r.offsetHeight}px`:r.style.width=`${r.offsetWidth}px`,r.style.flex="0 0 auto",r===this.element&&(t=i[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;let{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:r,isBottom:a,isLeft:o}=this.currentResizer,n=r||o,l=a||s,{movementX:h,movementY:d}=this.calculateMouseMovement({e,isLeft:o,isTop:s}),u=this.position.x,c=this.position.y,p=0,g=0;if(n&&h){let e=o?-1:1,t=this.getWidth(),i=t+h*e,s=!1;o&&(u+(p=t-i)<=0||i<=this.minWidth)&&(s=!0,p=0),s||this.setWidth(i)}if(l&&d){let e=s?-1:1,t=this.getHeight(),i=t+d*e,r=!1;s?(c+(g=t-i)<=0||i<=this.minHeight)&&(r=!0,g=0):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(r=!0),r||this.setHeight(i)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&p||g)&&this.offsetElement(u+p,c+g)}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(){let 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){let t;if(!this.isMoving)return;let{x:i,y:s}=this.position;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());let{movementX:r,movementY:a}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:t});this.offsetElement(i+r,s+a),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){let e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},at=class e extends tk{constructor(e,t={}){super(),this.eFocusableElement=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;let t=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())},...t}}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.eFocusableElement.classList.add(e.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedElementListeners(this.eFocusableElement,{focusin:this.callbacks.onFocusIn}),this.callbacks.onFocusOut&&this.addManagedElementListeners(this.eFocusableElement,{focusout:this.callbacks.onFocusOut})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:e=>{if(!(e.defaultPrevented||tT(e))){if(this.callbacks.shouldStopEventPropagation(e))return void tR(e);e.key===s9.TAB?this.callbacks.onTabKeyDown(e):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(e)}}})}};at.FOCUS_MANAGED_CLASS="ag-focus-managed";var ai=at,as={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function ar(e,t){return aa(e)?(null!=e.debounceMs&&ep("debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:t}function aa(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0}var ao=class extends s${constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=s_,this.buttonListeners=[]}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.resetTemplate(),this.createManagedBean(new ai(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new ae(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);let i=`
57            <form class="ag-filter-wrapper">
58                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" data-ref="eFilterBody">
59                    ${this.createBodyTemplate()}
60                </div>
61            </form>`;this.setTemplate(i,this.getAgComponents(),e),(t=this.getGui())&&t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.providedFilterParams=e,this.applyActive=aa(e),this.resetButtonsPanel(e)}updateParams(e){this.providedFilterParams=e,this.applyActive=aa(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){let{buttons:i,readOnly:s}=null!=t?t:{},{buttons:r,readOnly:a}=e;if(s===a&&eL(i,r))return;let o=r&&r.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(sm(this.eButtonsPanel),this.buttonListeners.forEac
61h(e=>e()),this.buttonListeners=[]):o&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!o){this.eButtonsPanel&&sv(this.eButtonsPanel);return}let n=document.createDocumentFragment(),l=e=>{let t,i;switch(e){case"apply":t=this.translate("applyFilter"),i=e=>this.onBtApply(!1,!1,e);break;case"clear":t=this.translate("clearFilter"),i=()=>this.onBtClear();break;case"reset":t=this.translate("resetFilter"),i=()=>this.onBtReset();break;case"cancel":t=this.translate("cancelFilter"),i=e=>{this.onBtCancel(e)};break;default:ep("Unknown button type specified");return}let s=sy(`<button
62                    type="${"apply"===e?"submit":"button"}"
63                    data-ref="${e}FilterButton"
64                    class="ag-button ag-standard-button ag-filter-apply-panel-button"
65                >${t}
66                </button>`);this.buttonListeners.push(...this.addManagedElementListeners(s,{click:i})),n.append(s)};r.forEach(e=>l(e)),this.eButtonsPanel.append(n),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){let e=ar(this.providedFilterParams,this.getDefaultDebounceMs()),t=ey(this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(null!=e?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.providedFilterParams.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){let i=()=>{this.onUiChanged(!1,"prevent"),null==t||t()};null!=e?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){let t=this.getModelFromUi();if(!this.isModelValid(t))return!1;let i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,i){i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});let{closeOnApply:s}=this.providedFilterParams;s&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){let t;if(!this.hidePopup)return;let i=e&&e.key;("Enter"===i||"Space"===i)&&(t={keyboardEvent:e}),this.hidePopup(t),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){let e=this.isModelValid(this.getModelFromUi()),t=this.queryForHtmlElement('[data-ref="applyFilterButton"]');t&&sa(t,!e)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(null==e?void 0:e.container)}refreshFilterResizer(e){if(!this.positionableFeature||"toolPanel"===e)return;let{positionableFeature:t,gos:i}=this;"floatingFilter"===e||"columnFilter"===e?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}refresh(e){let t=this.providedFilterParams;return this.providedFilterParams=e,this.resetButtonsPanel(e,t),!0}destroy(){let e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.localeService.getLocaleTextFunc()(e,as[e])}getCellValue(e){return this.providedFilterParams.getValue(e)}getPositionableElement(){return this.eFilterBody}},an=class extends rs{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){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}},al=class extends s${constructor(e="default",t=!1){super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),this.unFocusable||this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){let t=e.key;switch(t){case s9.ENTER:if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(e)}else this.setValue(this.getValue());break;case s9.DOWN:case s9.UP:e.preventDefault(),this.navigate(t);break;case s9.PAGE_DOWN:case s9.PAGE_UP:case s9.PAGE_HOME:case s9.PAGE_END:e.preventDefault(),this.navigateToPage(t)}}navigate(e){let t,i=e===s9.DOWN;if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl)+(i?1:-1);e=Math.min(Math.max(e,0),this.itemEls.length-1),t=this.itemEls[e]}else t=this.itemEls[i?0:this.itemEls.length-1];this.highlightItem(t)}navigateToPage(e){if(!this.highlightedEl||0===this.itemEls.length)return;let t=this.itemEls.indexOf(this.highlightedEl),i=this.options.length-1,s=this.itemEls[0].clientHeight,r=Math.floor(this.getGui().clientHeight/s),a=-1;e===s9.PAGE_HOME?a=0:e===s9.PAGE_END?a=i:e===s9.PAGE_DOWN?a=Math.min(t+r,i):e===s9.PAGE_UP&&(a=Math.max(t-r,0)),-1!==a&&this.highlightItem(this.itemEls[a])}
66addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){let{value:t,text:i}=e,s=i||t;return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{sv(e)}),this.itemEls=[]}updateIndices(){let e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,i)=>{iX(t,i+1),iQ(t,e.length)})}renderOption(e,t){let i=e$(this.gos),s=i.createElement("div");iV(s,"option"),s.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);let r=i.createElement("span");s.appendChild(r),r.textContent=t,this.unFocusable||(s.tabIndex=-1),this.itemEls.push(s),this.addManagedListeners(s,{mouseover:()=>this.highlightItem(s),mousedown:t=>{t.preventDefault(),t.stopPropagation(),this.setValue(e)}}),this.createManagedBean(new sW({getTooltipValue:()=>t,getGui:()=>s,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth})),this.getGui().appendChild(s)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;let i=this.options.findIndex(t=>t.value===e);if(-1!==i){let e=this.options[i];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.itemEls[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();let e=this.options.findIndex(e=>e.value===this.value);-1!==e&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!sC(e))return;this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(this.activeClass),i5(this.highlightedEl,!0);let{scrollTop:t,clientHeight:i}=this.getGui(),{offsetTop:s,offsetHeight:r}=e;(s+r>t+i||s<t)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){this.highlightedEl&&sC(this.highlightedEl)&&(this.highlightedEl.classList.remove(this.activeClass),i5(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},ah=class extends rt{constructor(e){if(super(e,(null==e?void 0:e.template)||`
67            <div class="ag-picker-field" role="presentation">
68                <div data-ref="eLabel"></div>
69                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
70                    <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
71                    <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
72                </div>
73            </div>`,(null==e?void 0:e.agComponents)||[],null==e?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=s_,this.eWrapper=s_,this.eDisplayField=s_,this.eIcon=s_,this.ariaRole=null==e?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:r,maxPickerWidth:a}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!s,null!=i&&this.setPickerMaxHeight(i),null!=r&&this.setPickerMinWidth(r),null!=a&&this.setPickerMaxWidth(a)}wireBeans(e){this.popupService=e.popupService}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);let 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)});let{pickerIcon:i,inputWidth:s}=this.config;if(i){let e=sq(i,this.gos);e&&this.eIcon.appendChild(e)}null!=s&&this.setInputWidth(s)}setupAria(){let e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),iZ(e,!1),this.ariaRole&&iV(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let t=this.getFocusableElement();if(t!==this.eWrapper&&(null==e?void 0: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 s9.UP:case s9.DOWN:case s9.ENTER:case s9.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case s9.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());let e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let t=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:i,pickerAriaLabelValue:s,modalPicker:r=!0}=this.config,a={modal:r,eChild:e,closeOnEsc:!0,closedCallback:()=>{let e=eq(this.gos);this.beforeHidePicker(),e&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,s),anchorToElement:this.eWrapper};e.style.position="absolute";let o=this.popupService.addPopup(a),{maxPickerHeight:n,minPickerWidth:l,maxPickerWidth:h,variableWidth:d}=this;d?(l&&(e.style.minWidth=l),e.style.width=sE(su(this.eWrapper)),h&&(e.style.maxWidth=h)):sx(e,null!=h?h:su(this.eWrapper));let u=null!=n?n:`${sl(this.popupService.getPopupParent())}px`;return e.style.setProperty("max-height",u),this.alignPickerToComponent(),o.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);let e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){this.isAlive()&&(iZ(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e))}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;null!=(t=this.pickerComponent)&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return sx(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=null==e?void 0:e,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=null==e?void 0:e,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=null==e?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}},ad=class extends ah{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox",...e})}
73postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{options:e,value:t,placeholder:i}=this.config;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),i&&null==t&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new al("select",!0)),this.listComponent.setParentComponent(this);let e=this.listComponent.getAriaElement(),t=`ag-select-list-${this.listComponent.getCompId()}`;e.setAttribute("id",t),i7(this.getAriaElement(),e),this.listComponent.addManagedListeners(this.listComponent,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})}}),this.listComponent.addManagedListeners(this.listComponent,{fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){let{key:t}=e;switch(t===s9.TAB&&this.hidePicker(),t){case s9.ENTER:case s9.UP:case s9.DOWN:case s9.PAGE_UP:case s9.PAGE_DOWN:case s9.PAGE_HOME:case s9.PAGE_END:if(e.preventDefault(),this.isPickerDisplayed){var i;null==(i=this.listComponent)||i.handleKeyDown(e)}else super.onKeyDown(e);break;case s9.ESCAPE:super.onKeyDown(e);break;case s9.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e)}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return null==(e=this.listComponent)||e.clearOptions(),this}setValue(e,t,i){if(this.value===e||!this.listComponent||(i||this.listComponent.setValue(e,!0),this.listComponent.getValue()===this.getValue()))return this;let s=this.listComponent.getDisplayValue();return null==s&&this.config.placeholder&&(s=this.config.placeholder),this.eDisplayField.textContent=s,this.setTooltip({newTooltipText:null!=s?s:null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(e,t)}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},au={selector:"AG-SELECT",component:ad},ac=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{if("string"!=typeof e){if(![["displayKey"],["displayName"],["predicate","test"]].every(t=>!!t.some(t=>null!=e[t])||(ep(`ignoring FilterOptionDef as it doesn't contain one of '${t}'`),!1))){this.filterOptions=this.filterOptions.filter(t=>t===e)||[];return}this.customFilterOptions[e.displayKey]=e}})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){let e=this.filterOptions[0];"string"==typeof e?this.defaultOption=e:e.displayKey?this.defaultOption=e.displayKey:ep("invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else ep("no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}},ap=class extends ao{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(e){let t=this.optionsFactory.getCustomOption(e);if(t){let{numberOfInputs:e}=t;return null!=e?e:1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:"inRange"===e?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{0===i?t.setValue(e,!0):t.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){let e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;
73if(!e&&t||e&&!t)return!1;let i=!e.operator,s=!t.operator;return(!!i||!s)&&(!i||!!s)&&(i?this.areSimpleModelsEqual(e,t):e.operator===t.operator&&tg(e.conditions,t.conditions,(e,t)=>this.areSimpleModelsEqual(e,t)))}shouldRefresh(e){var t,i,s;let r=this.getModel(),a=r?null!=(t=r.conditions)?t:[r]:null,o=null!=(i=null==(s=e.filterOptions)?void 0:s.map(e=>"string"==typeof e?e:e.displayKey))?i:this.getDefaultFilterOptions();return!!(!a||a.every(e=>void 0!==o.find(t=>t===e.type)))&&("number"!=typeof e.maxNumConditions||!a||!(a.length>e.maxNumConditions))}refresh(e){return!!this.shouldRefresh(e)&&!!super.refresh(e)&&(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(e){if(e.operator){let t=e.conditions;null==t&&(t=[],ep("Filter model is missing 'conditions'"));let i=this.validateAndUpdateConditions(t),s=this.getNumConditions();if(i<s)this.removeConditionsAndOperators(i);else if(i>s)for(let e=s;e<i;e++)this.createJoinOperatorPanel(),this.createOption();let r="OR"===e.operator;this.eJoinOperatorsAnd.forEach(e=>e.setValue(!r,!0)),this.eJoinOperatorsOr.forEach(e=>e.setValue(r,!0)),t.forEach((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)})}else this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(e.type,!0),this.setConditionIntoUi(e,0);return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),rm.resolve()}validateAndUpdateConditions(e){let t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),ep('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t}doesFilterPass(e){let t=this.getModel();if(null==t)return!0;let{operator:i}=t,s=[];if(i){var r;s.push(...null!=(r=t.conditions)?r:[])}else s.push(t);return s[i&&"OR"===i?"some":"every"](t=>this.individualConditionPasses(e,t))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new ac,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){var t,i;this.maxNumConditions=null!=(t=e.maxNumConditions)?t:2,this.maxNumConditions<1&&(ep('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!=(i=e.numAlwaysVisibleConditions)?i:1,this.numAlwaysVisibleConditions<1&&(ep('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(ep('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){let e=this.createManagedBean(new ad);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());let t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);let i=this.getNumConditions()-1;this.forEachPositionInput(i,e=>this.resetInput(e)),this.addChangedListeners(e,i)}createJoinOperatorPanel(){let e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");let t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);let s=this.eJoinOperatorPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,r),this.resetJoinOperatorOr(i,s,r),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){let s=this.createManagedBean(new an);return e.push(s),s.addCssClass("ag-filter-condition-operator"),s.addCssClass(`ag-filter-condition-operator-${i}`),t.appendChild(s.getGui()),s}getDefaultJoinOperator(e){return"AND"===e||"OR"===e?e:"AND"}createFilterListOptions(){let e=this.optionsFactory.getFilterOptions();this.filterListOptions=e.map(e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){this.filterListOptions.forEach(t=>{e.addOption(t)}),e.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}
73}createBodyTemplate(){return""}getAgComponents(){return[]}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){let e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{var i;let t=null!=(i=this.lastUiCompletePosition)?i:this.getNumConditions()-2;if(e<t){this.removeConditionsAndOperators(t+1);let i=e+1,s=t-i;s>0&&this.removeConditionsAndOperators(i,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((t,i)=>{let s=this.isConditionDisabled(i,e);t.setDisabled(s||this.filterListOptions.length<=1),1===i&&(sa(this.eJoinOperatorPanels[0],s),this.eJoinOperatorsAnd[0].setDisabled(s),this.eJoinOperatorsOr[0].setDisabled(s))}),this.eConditionBodies.forEach((e,t)=>{ss(e,this.isConditionBodyVisible(t))});let i=(null!=t?t:this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(e=>{e.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach(e=>{e.setValue(i,!0)}),this.forEachInput((t,i,s,r)=>{this.setElementDisplayed(t,i<r),this.setElementDisabled(t,this.isConditionDisabled(s,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);let i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,t),this.removeComponents(this.eJoinOperatorsAnd,i,t),this.removeComponents(this.eJoinOperatorsOr,i,t)}removeElements(e,t,i){this.removeItems(e,t,i).forEach(e=>sv(e))}
73removeComponents(e,t,i){this.removeItems(e,t,i).forEach(e=>{sv(e.getGui()),this.destroyBean(e)})}removeItems(e,t,i){return null==i?e.splice(t):e.splice(t,i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!(null!=e&&e.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{let e=this.getInputs(0)[0];if(!e)return;e instanceof ri&&e.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();let e=this.getModel();this.resetUiToActiveModel(e);let t=-1,i=-1,s=!1,r=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))-1===t&&(t=e,i=e);else{let r=e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1),a=e<t;(r||a)&&(this.removeConditionsAndOperators(e,1),s=!0,a&&i--)}let a=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),a=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),a=!0),a&&this.updateConditionStatusesAndValues(i,r),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getPlaceholderText(e,t){let i=this.translate(e);if(em(this.filterPlaceholder)){let e=this.filterPlaceholder,s=this.eTypes[t].getValue(),r=this.translate(s);i=e({filterOptionKey:s,filterOption:r,placeholder:i})}else"string"==typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i}resetPlaceholder(){let e=this.localeService.getLocaleTextFunc();this.forEachInput((t,i,s,r)=>{if(!(t instanceof ri))return;let a=0===i&&r>1?e("ariaFilterFromValue","Filter from value"):0===i?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(0===i&&r>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",s)),t.setInputAriaLabel(a)})}setElementValue(e,t,i){e instanceof ri&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){e instanceof s$&&ss(e.getGui(),t)}setElementDisabled(e,t){e instanceof s$&&sa(e.getGui(),t)}attachElementOnChange(e,t){e instanceof ri&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){let i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){let s=this.getNumberOfInputs(t),r=this.getInputs(e);for(let t=0;t<r.length;t++){let a=r[t];null!=a&&i(a,t,e,s)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){let t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||"empty"===this.getConditionType(e)||this.getValues(e).some(e=>null==e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(e=>this.resetType(e)),this.eJoinOperatorsAnd.forEach((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t)),this.eJoinOperatorsOr.forEach((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),rm.resolve()}resetType(e){let t=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),i)}resetJoinOperator(e,t,i,s,r){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(s),t)}
73updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t)),this.eJoinOperatorsOr.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t))}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){let i=this.mapValuesFromModel(e);this.forEachInput((e,s,r)=>{r===t&&this.setElementValue(e,null!=i[s]?i[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,s)=>{this.setElementValue(t,0===i&&0===s?e:null,!0)})}isDefaultOperator(e){return e===this.defaultJoinOperator}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,e=>{this.attachElementOnChange(e,this.listener)}))}individualConditionPasses(e,t){let i=this.getCellValue(e.node),s=this.mapValuesFromModel(t),r=this.optionsFactory.getCustomOption(t.type),a=this.evaluateCustomFilter(r,s,i);return null!=a?a:null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e)}evaluateCustomFilter(e,t,i){if(null==e)return;let{predicate:s}=e;if(null!=s&&!t.some(e=>null==e))return s(t,i)}isBlank(e){return null==e||"string"==typeof e&&0===e.trim().length}hasInvalidInputs(){return!1}},ag=class extends ap{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(e){switch(e){case"equals":if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case"notEqual":if(this.scalarFilterParams.includeBlanksInNotEqual)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case"lessThan":case"lessThanOrEqual":if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case"inRange":if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case"blank":return!0}return!1}evaluateNonNullValue(e,t,i){let s=this.comparator(),r=null!=e[0]?s(e[0],t):0;switch(i.type){case"equals":return 0===r;case"notEqual":return 0!==r;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{let i=s(e[1],t);return this.scalarFilterParams.inRangeInclusive?r>=0&&i<=0:r>0&&i<0}case"blank":return this.isBlank(t);case"notBlank":return!this.isBlank(t);default:return ep('Unexpected type of filter "'+i.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}};function am(e){var t;return!e.altKey&&!e.ctrlKey&&!e.metaKey&&(null==(t=e.key)?void 0:t.length)===1}function av(e,t,i,s,r){let a=s?s.getColDef().suppressKeyboardEvent:void 0;if(!a)return!1;let o=e.addGridCommonParams({event:t,editing:r,column:s,node:i,data:i.data,colDef:s.getColDef()});return!!(a&&a(o))||!1}var af=class extends ri{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){return this.eInput.value!==e&&(this.eInput.value=eM(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){let e=RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:t=>{am(t)&&t.key&&!e.test(t.key)&&t.preventDefault()},paste:t=>{var i;let s=null==(i=t.clipboardData)?void 0:i.getData("text");s&&s.split("").some(t=>!e.test(t))&&t.preventDefault()}})}},aC={selector:"AG-INPUT-TEXT-FIELD",component:af},ay=class extends af{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListeners(this.eInput,{blur:()=>{let e=parseFloat(this.eInput.value),t=isNaN(e)?"":this.normalizeValue(e.toString());this.value!==t&&this.setValue(t)},wheel:this.onWheel.bind(this)}),this.eInput.step="any";let{precision:e,min:t,max:i,step:s}=this.config;"number"==typeof e&&this.setPrecision(e),"number"==typeof t&&this.setMin(t),"number"==typeof i&&this.setMax(i),"number"==typeof s&&this.setStep(s)}onWheel(e){eZ(this.gos)===this.eInput&&e.preventDefault()}normalizeValue(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));let t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(null==this.precision)return e;if(t)return parseFloat(parseFloat(e).toFixed(this.precision)).toString();let i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;else if(this.precision>0)return`${i[0]}.${i[1].slice(0,this.precision)}`}return i[0]}setMin(e){return this.min===e||(this.min=e,sA(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,sA(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,sA(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue(e=>super.setValue(e,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},e)}setValueOrInputValue(e,t,i){if(eM(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){i=this.adjustPrecision(i);let e=this.normalizeValue(i);s=i!=e}if(s)return t(i)}return e(i)}getValue(){if(!this.eInput.validity.valid)return;let e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},aw={selector:"AG-INPUT-NUMBER-FIELD",component:ay},ab=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"],aS=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;let t=null!=e.operator,i=this.localeService.getLocaleTextFunc();if(t){var s;let t=(null!=(s=e.conditions)?s:[]).map(e=>this.getModelAsString(e)),r="AND"===e.operator?"andCondition":"orCondition";return t.join(` ${i(r,as[r])} `)}{if("blank"===e.type||"notBlank"===e.type)return i(e.type,e.type);let t=this.optionsFactory.getCustomOption(e.type),{displayKey:s,displayName:r,numberOfInputs:a}=t||{};return s&&r&&0===a?(i(s,r),r):this.conditionToString(e,t)}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){var t;return this.valueFormatter?null!=(t=this.valueFormatter(null!=e?e:null))?t:"":String(e)}},ax=class extends aS{conditionToString(e,t){let{numberOfInputs:i}=t||{};return"inRange"==e.type||2===i?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}
73`:null!=e.filter?this.formatValue(e.filter):`${e.type}`}};function aM(e){let{allowedCharPattern:t}=null!=e?e:{};return null!=t?t:null}var aD=class extends ag{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(e){return this.numberFilterParams.allowedCharPattern===e.allowedCharPattern&&super.refresh(e)}mapValuesFromModel(e){let{filter:t,filterTo:i,type:s}=e||{};return[this.processValue(t),this.processValue(i)].slice(0,this.getNumberOfInputs(s))}getDefaultDebounceMs(){return 500}comparator(){return(e,t)=>e===t?0:e<t?1:-1}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new ax(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return ab}setElementValue(e,t,i){let s=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(null!=t?t:null):t;super.setElementValue(e,s)}createValueElement(){let e=aM(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),iV(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,s){let r=this.createManagedBean(s?new af({allowedCharPattern:s}):new ay);r.addCssClass(`ag-filter-${i}`),r.addCssClass("ag-filter-filter"),t.push(r),e.appendChild(r.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getValues(e){let t=[];return this.forEachPositionInput(e,(e,i,s,r)=>{i<r&&t.push(this.processValue(this.stringToFloat(e.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getFilterType(){return"number"}processValue(e){return null==e||isNaN(e)?null:e}stringToFloat(e){if("number"==typeof e)return e;let t=ex(e);return(null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser)?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)}createCondition(e){let t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},s=this.getValues(e);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{if(!t.getInputElement().validity.valid){e=!0;return}}),e}},aE=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],aI=class extends aS{conditionToString(e,t){let{numberOfInputs:i}=t||{};return"inRange"==e.type||2===i?`${e.filter}-${e.filterTo}
73`:null!=e.filter?`${e.filter}`:`${e.type}`}};function aA(e){let t=e&&e.trim();return""===t?e:t}var aR=class extends ap{constructor(){super("textFilter"),this.defaultFormatter=e=>e,this.defaultLowercaseFormatter=e=>null==e?null:e.toString().toLowerCase(),this.defaultMatcher=({filterOption:e,value:t,filterText:i})=>{if(null==i)return!1;switch(e){case"contains":return t.indexOf(i)>=0;case"notContains":return 0>t.indexOf(i);case"equals":return t===i;case"notEqual":return t!=i;case"startsWith":return 0===t.indexOf(i);case"endsWith":{let e=t.lastIndexOf(i);return e>=0&&e===t.length-i.length}default:return!1}},this.eValuesFrom=[],this.eValuesTo=[]}getDefaultDebounceMs(){return 500}setParams(e){this.textFilterParams=e,super.setParams(e),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?this.defaultFormatter:this.defaultLowercaseFormatter),this.filterModelFormatter=new aI(this.localeService,this.optionsFactory)}getTextMatcher(){let e=this.textFilterParams.textCustomComparator;return e?(ep("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:t,value:i,filterText:s})=>e(t,i,s)):this.textFilterParams.textMatcher||this.defaultMatcher}createCondition(e){let t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},s=this.getValuesWithSideEffects(e,!0);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getFilterType(){return"text"}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(e,t){let i=[];return this.forEachPositionInput(e,(e,s,r,a)=>{if(s<a){let s=ex(e.getValue());if(t&&this.textFilterParams.trimInput){var o;s=null!=(o=aA(s))?o:null,e.setValue(s,!0)}i.push(s)}}),i}getDefaultFilterOptions(){return aE}createValueElement(){let e=document.createElement("div");return e.classList.add("ag-filter-body"),iV(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,i){let s=this.createManagedBean(new af);s.addCssClass(`ag-filter-${i}`),s.addCssClass("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}mapValuesFromModel(e){let{filter:t,filterTo:i,type:s}=e||{};return[t||null,i||null].slice(0,this.getNumberOfInputs(s))}evaluateNullValue(e){return!!e&&["notEqual","notContains","blank"].indexOf(e)>=0}evaluateNonNullValue(e,t,i,s){let r=e.map(e=>this.formatter(e))||[],a=this.formatter(t),{api:o,colDef:n,column:l,context:h,textFormatter:d}=this.textFilterParams;if("blank"===i.type)return this.isBlank(t);if("notBlank"===i.type)return!this.isBlank(t);let u={api:o,colDef:n,column:l,context:h,node:s.node,data:s.data,filterOption:i.type,value:a,textFormatter:d};return r.some(e=>this.matcher({...u,filterText:e}))}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}};function aT(e){if("number"==typeof e)return e;if("string"==typeof e){let t=parseInt(e);if(isNaN(t))return;return t}}function aL(e,t=Number.MAX_VALUE){return i=>{let s=aT(i);if(null!=s&&!(s<e)&&!(s>t))return s}}function aF(e,t){return e.toString().padStart(t,"0")}function aP(e,t,i){return"number"!=typeof e?"":ak(Math.round(100*e)/100,t,i)}function ak(e,t,i){return"number"!=typeof e?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function aN(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(e=>aF(e,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(e=>aF(e,2)).join(":")),s}var aO=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function aG(e,t="YYYY-MM-DD"){let i=aF(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
73ay","Saturday"],a={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>aF(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${aO(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${aO(e.getDate())}`,DD:()=>aF(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>r[e.getDay()],ddd:()=>r[e.getDay()].slice(0,3),dd:()=>r[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${aO(e.getDay())}`,d:()=>`${e.getDay()}`},o=RegExp(Object.keys(a).join("|"),"g");return t.replace(o,e=>e in a?a[e]():e)}function aB(e){if(!e)return null;let[t,i]=e.split(" ");if(!t)return null;let s=t.split("-").map(e=>parseInt(e,10));if(3!==s.filter(e=>!isNaN(e)).length)return null;let[r,a,o]=s,n=new Date(r,a-1,o);if(n.getFullYear()!==r||n.getMonth()!==a-1||n.getDate()!==o)return null;if(!i||"00:00:00"===i)return n;let[l,h,d]=i.split(":").map(e=>parseInt(e,10));return l>=0&&l<24&&n.setHours(l),h>=0&&h<60&&n.setMinutes(h),d>=0&&d<60&&n.setSeconds(d),n}var az=class{constructor(e,t,i,s,r){this.alive=!0,this.context=e,this.eParent=s,t.getDateCompDetails(i).newAgStackInstance().then(t=>{this.alive?(this.dateComp=t,t&&(s.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),this.tempValue&&t.setDate(this.tempValue),null!=this.disabled&&this.setDateCompDisabled(this.disabled),null==r||r(this))):e.destroyBean(t)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){ss(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&"function"==typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)}updateParams(e){var t,i;let s=!1;null!=(t=this.dateComp)&&t.refresh&&"function"==typeof this.dateComp.refresh&&null!==this.dateComp.refresh(e)&&(s=!0),!s&&null!=(i=this.dateComp)&&i.onParamsUpdated&&"function"==typeof this.dateComp.onParamsUpdated&&null!==this.dateComp.onParamsUpdated(e)&&ep("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){null==this.dateComp||null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)}},aV=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"],aH=class extends aS{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){let{type:i}=e,{numberOfInputs:s}=t||{},r=aB(e.dateFrom),a=aB(e.dateTo),o=this.dateFilterParams.inRangeFloatingFilterDateFormat;if("inRange"==i||2===s){let e=null!==r?aG(r,o):"null",t=null!==a?aG(a,o):"null";return`${e}-${t}`}return null!=r?aG(r,o):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},aj=class extends ag{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=1/0,this.minValidDate=null,this.maxValidDate=null}wireBeans(e){super.wireBeans(e),this.context=e.context,this.userComponentFactory=e.userComponentFactory}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){let{dateFrom:t,dateTo:i,type:s}=e||{};return[t&&aB(t)||null,i&&aB(i)||null].slice(0,this.getNumberOfInputs(s))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(e,t){return null==t||t<e?-1:+(t>e)}setParams(e){this.dateFilterParams=e,super.setParams(e);let t=(t,i)=>{if(null!=e[t])if(!isNaN(e[t]))return null==e[t]?i:Number(e[t]);else ep(`DateFilter ${t} is not a number`);return i};this.minValidYear=t("minValidYear",1e3),this.maxValidYear=t("maxValidYear",1/0),this.minValidYear>this.maxValidYear&&ep("DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:aB(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:aB(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&ep("DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new aH(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(e){let t=new az(this.context,this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},e);return this.addDestroyFunc(()=>t.destroy()),t}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return aV}createValueElement(){let e=e$(this.gos).createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,s){let r=e$(this.gos).createElement("div");r.classList.add(`ag-filter-${s}`),r.classList.add(`ag-filter-date-${s}
73`),t.push(r),e.appendChild(r),i.push(this.createDateCompWrapper(r))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){this.removeItems(e,t,i).forEach(e=>e.destroy())}isValidDateValue(e){if(null===e)return!1;if(this.minValidDate){if(e<this.minValidDate)return!1}else if(e.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(e>this.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((i,s,r,a)=>{r===e&&t&&!(s>=a)&&(t=t&&this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}getFilterType(){return"date"}createCondition(e){let t=this.getConditionType(e),i={},s=this.getValues(e);return s.length>0&&(i.dateFrom=aN(s[0])),s.length>1&&(i.dateTo=aN(s[1])),{dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t,...i}}resetPlaceholder(){let e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(i)})}getInputs(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(e,i,s,r)=>{i<r&&t.push(e.getDate())}),t}translate(e){return"lessThan"===e?super.translate("before"):"greaterThan"===e?super.translate("after"):super.translate(e)}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}},aW=class extends tk{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=s,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?tp(this.colsSpanning):this.columnOrGroup}postConstruct(){let e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){let e=this.beans.gos.get("suppressColumnMoveAnimation"),t=eM(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),s=this.modifyLeftForPrintLayout(e,i),r=this.modifyLeftForPrintLayout(e,t);this.setLeft(s),this.actualLeft=r,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===r&&this.setLeft(r)})}onLeftChanged(){let e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!eG(this.beans.gos,"print")||"left"===e.getPinned())return t;let i=this.beans.visibleColsService.getColsLeftWidth();return"right"===e.getPinned()?i+this.beans.visibleColsService.getBodyContainerWidth()+t:i+t}setLeft(e){if(eM(e)&&(this.eCell.style.left=`${e}px`),iy(this.columnOrGroup)){let e=this.columnOrGroup.getLeafColumns();e.length&&e.length>1&&i3(this.ariaEl,e.length)}}};function aU(e,t,i,s){return eD(e)?[]:aY(e.headerClass,e,t,i,s)}function a_(e,t,i,s){return eD(e)?[]:aY(e.toolPanelClass,e,t,i,s)}function a$(e,t,i){e.addOrRemoveCssClass("ag-column-first",i.isColAtEdge(t,"first")),e.addOrRemoveCssClass("ag-column-last",i.isColAtEdge(t,"last"))}function aY(e,t,i,s,r){let a;if(eD(e))return[];if("function"==typeof e)a=e(i.addGridCommonParams({colDef:t,column:s,columnGroup:r}));else a=e;return"string"==typeof a?[a]:Array.isArray(a)?[...a]:[]}var aK=0,aZ=class e extends tk{constructor(e,t,i){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=e,this.parentRowCtrl=i,this.beans=t,this.instanceId=e.getUniqueId()+"-"+aK++}wireBeans(e){this.pinnedWidthService=e.pinnedWidthService,this.focusService=e.focusService,this.userComponentFactory=e.userComponentFactory,this.ctrlsService=e.ctrlsService,this.dragAndDropService=e.dragAndDropService,this.menuService=e.menuService}postConstruct(){let e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){var t;let i,s,{headerRowIndex:r,column:a}=this.focusService.getFocusedHeader();return t=this.gos,!!eM(s=(i=a.getDefinition())&&i.suppressHeaderKeyboardEvent)&&!!s(t.addGridCommonParams({colDef:i,column:a,headerRowIndex:r,event:e}))}getWrapperHasFocus(){return eZ(this.gos)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onGuiFocus(){this.eventService.dispatchEvent({type:"headerFocused",column:this.column})}
73setupAutoHeight(e){let t,{wrapperElement:i,checkMeasuringCallback:s,compBean:r}=e,{animationFrameService:a,resizeObserverService:o,columnModel:n,gos:l}=this.beans,h=e=>{if(!this.isAlive()||!r.isAlive())return;let{paddingTop:t,paddingBottom:s,borderBottomWidth:o,borderTopWidth:d}=sn(this.getGui()),u=i.offsetHeight+(t+s+o+d);if(e<5){let t=e$(l),s=!t||!t.contains(i),r=0==u;if(s||r)return void a.requestAnimationFrame(()=>h(e+1))}n.setColHeaderHeight(this.column,u)},d=!1,u=()=>{let e=this.column.isAutoHeaderHeight();e&&!d&&c(),!e&&d&&p()},c=()=>{d=!0,h(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),t=o.observeResize(i,()=>h(0))},p=()=>{d=!1,t&&t(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),t=void 0};u(),r.addDestroyFunc(()=>p()),r.addManagedListeners(this.column,{widthChanged:()=>d&&h(0)}),r.addManagedEventListeners({sortChanged:()=>{d&&window.setTimeout(()=>h(0))}}),s&&s(u)}onDisplayedColumnsChanged(){let{comp:e,column:t,beans:i,eGui:s}=this;e&&t&&s&&(a$(e,t,i.visibleColsService),i2(s,i.visibleColsService.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){this.resizeFeature&&e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let e=this.focusService.isHeaderFocusSuppressed();this.eGui&&sA(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){let t=eZ(this.gos),i=e.key===s9.LEFT||e.key===s9.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),!i))return;let s=r_[e.key===s9.LEFT!==this.gos.get("enableRtl")?"Left":"Right"];if(e.altKey){var r;this.isResizing=!0,this.resizeMultiplier+=1;let t=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(t,e.shiftKey),null==(r=this.resizeFeature)||r.toggleColumnResizing(!0)}else this.moveHeader(s)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e);if(this.column.getPinned()){let e=this.pinnedWidthService.getPinnedLeftWidth(),i=this.pinnedWidthService.getPinnedRightWidth(),s=sh(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(e+i+t>s)if(!(s>e+i))return 0;else t=s-e-i}return t}getResizeDiff(e){let t=e.key===s9.LEFT!==this.gos.get("enableRtl"),i=this.column.getPinned(),s=this.gos.get("enableRtl");return i&&s!==("right"===i)&&(t=!t),(t?-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(()=>{var e;null==(e=this.resizeFeature)||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){let t=this.getWrapperHasFocus();switch(e.key){case s9.PAGE_DOWN:case s9.PAGE_UP:case s9.PAGE_HOME:case s9.PAGE_END:t&&e.preventDefault()}}addDomData(t){let i=e.DOM_DATA_KEY_HEADER_CTRL;e_(this.gos,this.eGui,i,this),t.addDestroyFunc(()=>e_(this.gos,this.eGui,i,null))}getGui(){return this.eGui}focus(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){let s=null!=e?e:t;this.gos.get("preventDefaultOnContextMenu")&&s.preventDefault(),this.menuService.isHeaderContextMenuEnabled(i)&&this.menuService.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventService.dispatchEvent({type:e,column:t})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null}};aZ.DOM_DATA_KEY_HEADER_CTRL="headerCtrl";var aq=aZ,aQ=class extends tk{wireBeans(e){this.columnHoverService=e.columnHoverService}constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListeners(this.element,{mouseout:this.onMouseOut.bind(this),mouseover:this.onMouseOver.bind(this)})}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}},aX=class extends aq{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,s,r){this.comp=e,r=iN(this,this.beans.context,r),this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,this.setGui(t,r),this.setupActive(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r),r.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(r)}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetail
73s=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}setupActive(){let 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;let e=sq("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new ai(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.localeService.getLocaleTextFunc();ij(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(eZ(this.gos)===this.eGui)return;let t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),t.focus();return}let i=this.findNextColumnWithFloatingFilter(e.shiftKey);i&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:i},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleColsService,i=this.column;do if(!(i=e?t.getColBefore(i):t.getColAfter(i)))break;while(!i.getColDef().filter||!i.getColDef().floatingFilter)return i}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();switch(e.key){case s9.UP:case s9.DOWN:t||e.preventDefault();case s9.LEFT:case s9.RIGHT:if(t)return;e.stopPropagation();case s9.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case s9.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&so(e.relatedTarget,"ag-floating-filter");if(t&&i&&e.target===this.eGui){let e=this.lastFocusEvent,t=!!(e&&e.key===s9.TAB);if(e&&t){let t=e.shiftKey;this.focusService.focusInto(this.eGui,t)}}let s=this.getRowIndex();this.beans.focusService.setFocusedHeader(s,this.column)}setupHover(e){e.createManagedBean(new aQ([this.column],this.eGui));let t=()=>{if(!this.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:t}),t()}setupLeft(e){let t=new aW(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){var e;if(!this.active)return;let t=null==(e=this.beans.filterManager)?void 0:e.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());t&&this.setCompDetails(t)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){let e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;let{filterManager:t}=this.beans,i=e=>{if((null==e?void 0:e.source)==="filterDestroyed"&&!this.isAlive())return;let i=this.comp.getFloatingFilterComp();i&&i.then(i=>{if(i){var s;let r=null==t?void 0:t.getCurrentFloatingFilterParentModel(this.column),a=e?{...e,columns:null!=(s=e.columns)?s:[],source:"api"===e.source?"api":"columnFilter"}:null;i.onParentModelChanged(r,a)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:i}),null!=t&&t.isFilterActive(this.column)&&i(null)}setupWidth(e){let t=()=>{let e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};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){var e;let t=!!(null!=(e=this.beans.filterManager)&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){var t;let i=this.active;this.setupActive();let s=!i&&this.active;i&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let r=this.active?null==(t=this.beans.filterManager)?void 0:t.getFloatingFilterCompDetail
73s(this.column,()=>this.showParentFilter()):null,a=this.comp.getFloatingFilterComp();a&&r?a.then(t=>{var i,a;!t||null!=(i=this.beans.filterManager)&&i.areFilterCompsDifferent(null!=(a=this.userCompDetails)?a:null,r)?this.updateCompDetails(e,r,s):this.updateFloatingFilterParams(r)}):this.updateCompDetails(e,r,s)}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){var t;if(!e)return;let i=e.params;null==(t=this.comp.getFloatingFilterComp())||t.then(e=>{let t=!1;null!=e&&e.refresh&&"function"==typeof e.refresh&&null!==e.refresh(i)&&(t=!0),!t&&null!=e&&e.onParamsUpdated&&"function"==typeof e.onParamsUpdated&&null!==e.onParamsUpdated(i)&&ep("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function aJ(e){return e}var a0="32.3.9";function a1(e,t,i){if(null==t)return null;let s=null,{compName:r,jsComp:a,fwComp:o}=rG.getCompKeys(e,t,rA);return r?s=({set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"})[r]:null==a&&null==o&&!0===t.filter&&(s=i()),s}var a2={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},a3=["january","february","march","april","may","june","july","august","september","october","november","december"],a4=class extends tk{constructor(){super(...arguments),this.beanName="columnFilterService",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.rowModel=e.rowModel,this.userComponentFactory=e.userComponentFactory,this.rowRenderer=e.rowRenderer,this.dataTypeService=e.dataTypeService,this.filterManager=e.filterManager}postConstruct(){var e,t;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),rowDataUpdated:()=>this.onNewRowsLoaded("rowDataUpdated"),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...null!=(e=null==(t=this.gos.get("initialState"))||null==(t=t.filter)?void 0:t.filterModel)?e:{}}}setFilterModel(e,t="api"){var i;if(null!=(i=this.dataTypeService)&&i.isPendingInference())return void this.filterModelUpdateQueue.push({model:e,source:t});let s=[],r=this.getFilterModel(!0);if(e){let t=new Set(Object.keys(e));this.allColumnFilters.forEach((i,r)=>{let a=e[r];s.push(this.setModelOnFilterWrapper(i.filterPromise,a)),t.delete(r)}),t.forEach(t=>{let i=this.columnModel.getColDefCol(t)||this.columnModel.getCol(t);if(!i)return void ep("setFilterModel() - no column found for colId: "+t);if(!i.isFilterAllowed())return void ep("setFilterModel() - unable to fully apply model, filtering disabled for colId: "+t);let r=this.getOrCreateFilterWrapper(i);r?s.push(this.setModelOnFilterWrapper(r.filterPromise,e[t])):ep("setFilterModel() - unable to fully apply model, unable to create filter for colId: "+t)})}else this.allColumnFilters.forEach(e=>{s.push(this.setModelOnFilterWrapper(e.filterPromise,null))});rm.all(s).then(()=>{let e=this.getFilterModel(!0),i=[];if(this.allColumnFilters.forEach((t,s)=>{eL(r?r[s]:null,e?e[s]:null)||i.push(t.column)}),i.length>0){var s;null==(s=this.filterManager)||s.onFilterChanged({columns:i,source:t})}})}setModelOnFilterWrapper(e,t){return new rm(i=>{e.then(e=>{"function"!=typeof e.setModel&&(ep("filter missing setModel method, which is needed for setFilterModel"),i()),(e.setModel(t)||rm.resolve()).then(()=>i())})})}getFilterModel(e){let t={},{allColumnFilters:i,initialFilterModel:s}=this;
73return i.forEach((e,i)=>{let s=this.getModelFromFilterWrapper(e);eM(s)&&(t[i]=s)}),e||Object.entries(s).forEach(([e,s])=>{var r;eM(s)&&!i.has(e)&&null!=(r=this.columnModel.getCol(e))&&r.isFilterAllowed()&&(t[e]=s)}),t}getModelFromFilterWrapper(e){let{filter:t}=e;return t?"function"!=typeof t.getModel?(ep("filter API missing getModel method, which is needed for getFilterModel"),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){var t;return null!=(t=this.initialFilterModel[e.getColId()])?t:null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){return!!this.allColumnFilters.size&&(this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"advancedFilterEnabled")),!0)}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){let e=!!e0(this.gos),t=t=>{if(!t.isPrimary())return!0;let i=!this.columnModel.isPivotActive();return!!t.isValueActive()&&!!i&&(!!this.columnModel.isPivotMode()||e)},i=[],s=[];return this.forEachColumnFilter((e,r)=>{e&&(e.isFilterActive?e.isFilterActive():(ep("Filter is missing isFilterActive() method"),!1))&&(t(r.column)?i.push(e):s.push(e))}).then(()=>{this.activeAggregateFilters=i,this.activeColumnFilters=s})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((i,s)=>s.column.setFilterActive(i.isFilterActive(),e,t))}forEachColumnFilter(e){return rm.all(Array.from(this.allColumnFilters.values()).map(t=>t.filterPromise.then(i=>e(i,t))))}doColumnFiltersPass(e,t,i){let{data:s,aggData:r}=e,a=i?this.activeAggregateFilters:this.activeColumnFilters,o=i?r:s;for(let i=0;i<a.length;i++){let s=a[i];if(null!=s&&s!==t){if("function"!=typeof s.doesFilterPass)throw Error("Filter is missing method doesFilterPass");if(!s.doesFilterPass({node:e,data:o}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){let t=()=>{var t;return null==(t=this.filterManager)?void 0:t.onFilterChanged(e)};this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}updateBeforeFilterChanged(e={}){let{filterInstance:t,additionalEventAttributes:i}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(e=>{e.filterPromise&&e.filterPromise.then(e=>{e&&e!==t&&e.onAnyFilterChanged&&e.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var e;return!(null!=(e=this.gos.get("allowShowChangeAfterFilter"))&&e)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(e=>{e.onNewRowsLoaded&&e.onNewRowsLoaded()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}createGetValue(e){return(t,i)=>{let s=i?this.columnModel.getCol(i):e;return s?this.valueService.getValue(s,t,!0):void 0}}isFilterActive(e){var t;let{filter:i}=null!=(t=this.cachedFilter(e))?t:{};return i?i.isFilterActive():null!=this.getModelFromInitialState(e)}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(tu(this.gos))t="agSetColumnFilter";else{var i;let s=null==(i=this.dataTypeService)?void 0:i.getBaseDataType(e);t="number"===s?"agNumberColumnFilter":"date"===s||"dateString"===s?"agDateColumnFilter":"agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(tu(this.gos))t="agSetColumnFloatingFilter";else{var i;let s=null==(i=this.dataTypeService)?void 0:i.getBaseDataType(e);t="number"===s?"agNumberColumnFloatingFilter":"date"===s||"dateString"===s?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){let i,s=this.getDefaultFilter(e),r=e.getColDef(),a={...this.createFilterParams(e,r),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(i,e)(),filterChangedCallback:t=>this.filterChangedCallbackFactory(i,e)(t),doesRowPassOtherFilter:e=>!this.filterManager||this.filterManager.doesRowPassOtherFilters(i,e)},o=this.userComponentFactory.getFilterDetails(r,a,s);return o?{filterPromise:()=>{let e=o.newAgStackInstance();return null!=e&&e.then(e=>{i=e,t&&(t.filter=e)}),e}
73,compDetails:o}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:tZ(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){var t;let i={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:s,compDetails:r}=this.createFilterInstance(e,i);return i.filterPromise=null!=(t=null==s?void 0:s())?t:null,i.compDetails=r,i}onColumnsChanged(){let e=[];this.allColumnFilters.forEach((t,i)=>{let s;(s=t.column.isPrimary()?this.columnModel.getColDefCol(i):this.columnModel.getCol(i))&&s===t.column||(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i))});let t=e.every(e=>"agGroupColumnFilter"===e.getColDef().filter);if(e.length>0&&!t){var i;null==(i=this.filterManager)||i.onFilterChanged({columns:e,source:"api"})}else this.updateDependentFilters()}updateDependentFilters(){let e=this.columnModel.getAutoCols();null==e||e.forEach(e=>{"agGroupColumnFilter"===e.getColDef().filter&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(e){var t;if(!e.isFilterAllowed())return!1;let{filter:i}=null!=(t=this.allColumnFilters.get(e.getColId()))?t:{};return!i||"function"!=typeof(null==i?void 0:i.isFilterAllowed)||i.isFilterAllowed()}getFloatingFilterCompDetails(e,t){let i=t=>{var i;let s=null==(i=this.getOrCreateFilterWrapper(e))?void 0:i.filterPromise;null!=s&&s.then(e=>{t(rB(e))})},s=e.getColDef(),r={...this.createFilterParams(e,s),filterChangedCallback:()=>i(t=>this.filterChangedCallbackFactory(t,e)())},a=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,rA,r),o=a1(this.frameworkOverrides,s,()=>this.getDefaultFloatingFilter(e));return null==o&&(o="agReadOnlyFloatingFilter"),this.userComponentFactory.getFloatingFilterCompDetails(s,{column:e,filterParams:a,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1},o)}getCurrentFloatingFilterParentModel(e){var t;return this.getModelFromFilterWrapper(null!=(t=this.cachedFilter(e))?t:{column:e})}destroyFilter(e,t="api"){let i=e.getColId(),s=this.allColumnFilters.get(i);if(this.disposeColumnListener(i),delete this.initialFilterModel[i],s){var r;this.disposeFilterWrapper(s,t),null==(r=this.filterManager)||r.onFilterChanged({columns:[e],source:"api"})}}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then(i=>{this.destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventService.dispatchEvent({type:"filterDestroyed",source:t,column:e.column})})}filterModifiedCallbackFactory(e,t){return()=>{this.eventService.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return i=>{var s;let r=null!=(s=null==i?void 0:i.source)?s:"columnFilter";this.callOnFilterChangedOutsideRenderCycle({filter:e,additionalEventAttributes:i,columns:[t],source:r})}}checkDestroyFilter(e){let t=this.allColumnFilters.get(e);if(!t)return;let i=t.column,{compDetails:s}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,s))return void this.destroyFilter(i,"paramsUpdated");let r=i.getColDef().filterParams;t.filterPromise?t.filterPromise.then(e=>{!1===(null==e||!e.refresh||e.refresh({...this.createFilterParams(i,i.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(e,i),filterChangedCallback:this.filterChangedCallbackFactory(e,i),doesRowPassOtherFilter:t=>!this.filterManager||this.filterManager.doesRowPassOtherFilters(e,t),...r}))&&this.destroyFilter(i,"paramsUpdated")}):this.destroyFilter(i,"paramsUpdated")}setColumnFilterWrapper(e,t){let i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;let{componentClass:i}=e,{componentClass:s}=t;return!(i===s||(null==i?void 0:i.render)&&(null==s?void 0:s.render)&&i.render===s.render)}hasFloatingFilters(){return this.columnModel.getCols().some(e=>e.getColDef().floatingFilter)}getFilterInstance(e,t){t&&this.getFilterInstanceImpl(e).then(e=>{t(rB(e))})}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(e=>{t(rB(e))})})}getFilterInstanceImpl(e){var t;let i=this.columnModel.getColDefCol(e);if(!i)return rm.resolve(void 0);let s=null==(t=this.getOrCreateFilterWrapper(i))?void 0:t.filterPromise;return null!=s?s:rm.resolve(null)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){let t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){var i;let s;if(null!=(i=this.dataTypeService)&&i.isPendingInference()){let i=()=>{},s=new Promise(e=>{i=e});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:i}),s}let r=this.columnModel.getColDefCol(e),a=r?this.getOrCreateFilterWrapper(r):null;return a?(s=this.setModelOnFilterWrapper(a.filterPromise,t),new Promise(e=>{s.then(t=>e(t))})):Promise.resolve()}getFilterWrapper(e){var t;let i=this.columnModel.getColDefCol(e);return i&&null!=(t=this.cachedFilter(i))?t:null}setColDefPropertiesForDataType(e,t,i){let s=tu(this.gos),r=this.localeService.getLocaleTextFunc(),a=t=>{let{filterParams:i}=e;e.filterParams="object"==typeof i?{...i,...t}:t};switch(t.baseDataType){case"number":s&&a({comparator:(e,t)=>
73{let i=null==e?0:parseInt(e),s=null==t?0:parseInt(t);return i===s?0:i>s?1:-1}});break;case"boolean":a(s?{valueFormatter:e=>eM(e.value)?r(String(e.value),e.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]});break;case"date":s&&a({valueFormatter:e=>{let t=i(e);return eM(t)?t:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(e,t)=>{if(1===t&&null!=e){let t=a3[Number(e)-1];return r(t,a2[t])}return null!=e?e:r("blanks","(Blanks)")}});break;case"dateString":{let e=t.dateParser;a(s?{valueFormatter:e=>{let t=i(e);return eM(t)?t:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:t=>{let i=e(null!=t?t:void 0);return i?[String(i.getFullYear()),String(i.getMonth()+1),String(i.getDate())]:null},treeListFormatter:(e,t)=>{if(1===t&&null!=e){let t=a3[Number(e)-1];return r(t,a2[t])}return null!=e?e:r("blanks","(Blanks)")}}:{comparator:(t,i)=>{let s=e(i);return null==i||s<t?-1:+(s>t)}});break}case"object":s?a({valueFormatter:e=>{let t=i(e);return eM(t)?t:r("blanks","(Blanks)")}}):e.filterValueGetter=e=>i({column:e.column,node:e.node,value:this.valueService.getValue(e.column,e.node)})}}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}},a6=class extends s${constructor(){super(`
74            <div class="ag-floating-filter-input" role="presentation">
75                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
76            </div>`,[aC]),this.eFloatingFilterText=s_}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e;let t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){null==e?this.eFloatingFilterText.setValue(""):this.params.parentFilterInstance(t=>{if(t.getModelAsString){let i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}},a5=class extends s${wireBeans(e){this.columnNameService=e.columnNameService}getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return null==e?void 0:e.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){let t;if(!e){this.lastType=this.optionsFactory.getDefaultOption();return}t=e.operator?e.conditions[0]:e,this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){return e?!e.operator&&this.isTypeEditable(e.type):this.isTypeEditable(this.lastType)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){this.optionsFactory=new ac,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;let i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){let{numberOfInputs:t}=this.optionsFactory.getCustomOption(e)||{};return null==t||1==t}isTypeEditable(e){return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&0>["inRange","empty","blank","notBlank"].indexOf(e)}getAriaLabel(e){let t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return`${t} ${i("ariaFilterInput","Filter Input")}`}},a8=class extends a5{constructor(){super(`
77            <div class="ag-floating-filter-input" role="presentation">
78                <ag-input-text-field data-ref="eReadOnlyText"></ag-input-text-field>
79                <div data-ref="eDateWrapper" style="display: flex;"></div>
80            </div>`,[aC]),this.eReadOnlyText=s_,this.eDateWrapper=s_}wireBeans(e){super.wireBeans(e),this.context=e.context,this.userComponentFactory=e.userComponentFactory}getDefaultFilterOptions(){return aV}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new aH(this.filterParams,this.localeService,this.optionsFactory);let t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){let t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);this.setEditable(t),t?(e?this.dateComp.setDate(aB(e.dateFrom)):this.dateComp.setDate(null),this.eReadOnlyText.setValue("")):(this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null))}setEditable(e){ss(this.eDateWrapper,e),ss(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){let e=aN(this.dateComp.getDate());this.params.parentFilterInstance(t=>{if(t){let i=aB(e);t.onFloatingFilterChanged(this.getLastType()||null,i)}})}getDateComponentParams(){let e=ar(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:ey(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new az(this.context,this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){let e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}},a7=class extends s${constructor(){super(`
81            <div class="ag-filter-filter">
82                <ag-input-text-field class="ag-date-filter" data-ref="eDateInput"></ag-input-text-field>
83            </div>`,[aC]),this.eDateInput=s_}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);let t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()},input:e=>{e.target!==eZ(this.gos)||this.eDateInput.isDisabled()||this.params.onDateChanged()}})}setParams(e){let t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&sF(),t.type=i?"date":"text";let{minValidYear:s,maxValidYear:r,minValidDate:a,maxValidDate:o}=e.filterParams||{};if(a&&s&&ep("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),o&&r&&ep("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),a&&o){let[e,t]=[a,o].map(e=>e instanceof Date?e:aB(e));e&&t&&e.getTime()>t.getTime()&&ep("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}
83a?a instanceof Date?t.min=aG(a):t.min=a:s&&(t.min=`${s}-01-01`),o?o instanceof Date?t.max=aG(o):t.max=o:r&&(t.max=`${r}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return aB(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(aN(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:function(){if(void 0===_){let e=window;_=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return _}()||sk()||sF()&&sP()>=14.1}},a9=class extends tk{constructor(e){super(),this.params=e,this.eFloatingFilterTextInput=s_,this.valueChangedListener=()=>{}}setupGui(e){var t;this.eFloatingFilterTextInput=this.createManagedBean(new af(null==(t=this.params)?void 0:t.config));let i=this.eFloatingFilterTextInput.getGui();e.appendChild(i);let s=e=>this.valueChangedListener(e);this.addManagedListeners(i,{input:s,keydown:s})}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},oe=class extends a5{constructor(){super(...arguments),this.eFloatingFilterInputContainer=s_}postConstruct(){this.setTemplate(`
84            <div class="ag-floating-filter-input" role="presentation" data-ref="eFloatingFilterInputContainer"></div>
85        `)}getDefaultDebounceMs(){return 500}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){var t;this.params=e;let i=null!=(t=e.browserAutoComplete)&&t;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=aa(this.params.filterParams),!this.isReadOnly()){let e=ar(this.params.filterParams,this.getDefaultDebounceMs()),t=ey(this.syncUpWithParentFilter.bind(this),e);this.floatingFilterInputService.setValueChangedListener(t)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let t=this.floatingFilterInputService.getValue();sm(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){let t=e.key===s9.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=aA(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(e=>{e&&e.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}},ot=class extends tk{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new ay),this.eFloatingFilterTextInput=this.createManagedBean(new af),this.eFloatingFilterTextInput.setDisabled(!0);let t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,e=>this.valueChangedListener(e)),this.setupListeners(i,e=>this.valueChangedListener(e))}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(e){this.valueChangedListener=e}
85setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}},oi=class extends oe{init(e){var t;super.init(e),this.filterModelFormatter=new ax(this.localeService,this.optionsFactory,null==(t=e.filterParams)?void 0:t.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){aM(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return ab}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return(this.allowedCharPattern=aM(e.filterParams),this.allowedCharPattern)?this.createManagedBean(new a9({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new ot)}},os=class extends oe{init(e){super.init(e),this.filterModelFormatter=new aI(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return aE}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new a9)}},or=class extends tk{constructor(){super(...arguments),this.beanName="quickFilterService",this.quickFilter=null,this.quickFilterParts=null}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.rowModel=e.rowModel,this.pivotResultColsService=e.pivotResultColsService}postConstruct(){let e=this.resetQuickFilterCache.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}refreshQuickFilterCols(){var e,t;let i=this.columnModel.isPivotMode(),s=this.columnModel.getAutoCols(),r=this.columnModel.getColDefCols(),a=null!=(e=i&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?null==(t=this.pivotResultColsService.getPivotResultCols())?void 0:t.list:r)?e:[];s&&(a=a.concat(s)),this.colsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?a:a.filter(e=>e.isVisible()||e.isRowGroupActive())}isQuickFilterPresent(){return null!==this.quickFilter}doesRowPassQuickFilter(e){let t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i))}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}setQuickFilterParts(){let{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseQuickFilter(e){return eM(e)?eN(this.gos)?e.toUpperCase():(ep("Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(null!=e&&"string"!=typeof e)return void ep(`Grid option quickFilterText only supports string inputs, received: ${typeof e}`);let t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setQuickFilterParserAndMatcher(){let 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.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onQuickFilterColumnConfigChanged(){this.refreshQuickFilterCols(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassQuickFilterNoCache(e,t){return this.colsForQuickFilter.some(i=>{let s=this.getQuickFilterTextForColumn(i,e);return eM(s)&&s.indexOf(t)>=0})}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);let{quickFilterParts:s,matcher:r}=this;return r(s,i)}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0),s=e.getColDef();if(s.getQuickFilterText){let r=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:s});i=s.getQuickFilterText(r)}return eM(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){let t=[];return this.colsForQuickFilter.forEach(i=>
85{let s=this.getQuickFilterTextForColumn(i,e);eM(s)&&t.push(s)}),t.join(`
86`)}},oa={version:a0,moduleName:"@ag-grid-community/filter-core",beans:[r6]},oo={version:a0,moduleName:"@ag-grid-community/column-filter",beans:[a4],dependantModules:[oa]},on={version:a0,moduleName:"@ag-grid-community/floating-filter-core",controllers:[{name:"headerFilterCell",classImp:aX}],dependantModules:[oo]},ol={version:a0,moduleName:"@ag-grid-community/floating-filter",dependantModules:[on,oo]},oh={version:a0,moduleName:"@ag-grid-community/read-only-floating-filter",userComponents:[{name:"agReadOnlyFloatingFilter",classImp:a6}],dependantModules:[on]},od={version:a0,moduleName:"@ag-grid-community/quick-filter-core",beans:[or],dependantModules:[oa]},ou={version:a0,moduleName:"@ag-grid-community/filter",dependantModules:[{version:a0,moduleName:"@ag-grid-community/simple-floating-filter",dependantModules:[{version:a0,moduleName:"@ag-grid-community/simple-filter",dependantModules:[oo],userComponents:[{name:"agTextColumnFilter",classImp:aR},{name:"agNumberColumnFilter",classImp:aD},{name:"agDateColumnFilter",classImp:aj},{name:"agDateInput",classImp:a7}]},on],userComponents:[{name:"agTextColumnFloatingFilter",classImp:os},{name:"agNumberColumnFloatingFilter",classImp:oi},{name:"agDateColumnFloatingFilter",classImp:a8}]},oh,{version:a0,moduleName:"@ag-grid-community/quick-filter",dependantModules:[od,{version:a0,moduleName:"@ag-grid-community/quick-filter-api",apiFunctions:{isQuickFilterPresent:function(e){var t;return!!(null!=(t=e.filterManager)&&t.isQuickFilterPresent())},getQuickFilter:function(e){return e.gos.get("quickFilterText")},resetQuickFilter:function(e){var t;null==(t=e.filterManager)||t.resetQuickFilterCache()}},dependantModules:[od]}]},{version:a0,moduleName:"@ag-grid-community/column-filter-api",apiFunctions:{isColumnFilterPresent:function(e){var t,i;return!!(null!=(t=e.filterManager)&&t.isColumnFilterPresent())||!!(null!=(i=e.filterManager)&&i.isAggregateFilterPresent())},getFilterInstance:function(e,t,i){var s;return null==(s=e.filterManager)?void 0:s.getFilterInstance(t,i)},getColumnFilterInstance:function(e,t){var i,s;return null!=(i=null==(s=e.filterManager)?void 0:s.getColumnFilterInstance(t))?i:Promise.resolve(void 0)},destroyFilter:function(e,t){let i=e.columnModel.getColDefCol(t);if(i){var s;return null==(s=e.filterManager)?void 0:s.destroyFilter(i,"api")}},setFilterModel:function(e,t){e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.filterManager)?void 0:i.setFilterModel(t)})},getFilterModel:function(e){var t,i;return null!=(t=null==(i=e.filterManager)?void 0:i.getFilterModel())?t:{}},getColumnFilterModel:function(e,t){var i,s;return null!=(i=null==(s=e.filterManager)?void 0:s.getColumnFilterModel(t))?i:null},setColumnFilterModel:function(e,t,i){var s,r;return null!=(s=null==(r=e.filterManager)?void 0:r.setColumnFilterModel(t,i))?s:Promise.resolve()},showColumnFilter:function(e,t){let i=e.columnModel.getCol(t);i?e.menuService.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"}):eg(`column '${t}' not found`)}},dependantModules:[oo,{version:a0,moduleName:"@ag-grid-community/filter-api",apiFunctions:{isAnyFilterPresent:function(e){var t;return!!(null!=(t=e.filterManager)&&t.isAnyFilterPresent())},onFilterChanged:function(e,t="api"){var i;null==(i=e.filterManager)||i.onFilterChanged({source:t})}},dependantModules:[oa]}]}]},oc=class extends s${constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},op=class extends oc{constructor(e){super(`<div class="ag-header-cell ag-floating-filter" role="gridcell">
87            <div data-ref="eFloatingFilterBody" role="presentation"></div>
88            <div class="ag-floating-filter-button ag-hidden" data-ref="eButtonWrapper" role="presentation">
89                <button type="button" class="ag-button ag-floating-filter-button-button" data-ref="eButtonShowMainFilter" tabindex="-1"></button>
90            </div>
91        </div>`,e),this.eFloatingFilterBody=s_,this.eButtonWrapper=s_,this.eButtonShowMainFilter=s_}postConstruct(){let e=this.getGui();
91this.ctrl.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveBodyCssClass:(e,t)=>this.eFloatingFilterBody.classList.toggle(e,t),setButtonWrapperDisplayed:e=>ss(this.eButtonWrapper,e),setCompDetails:e=>this.setCompDetails(e),getFloatingFilterComp:()=>this.compPromise,setWidth:t=>e.style.width=t,setMenuIcon:e=>this.eButtonShowMainFilter.appendChild(e)},e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(e=>this.afterCompCreated(e))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive())return void this.destroyBean(e);this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},og=class extends oc{constructor(e){super(`<div class="ag-header-cell" role="columnheader">
92            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
93            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
94        </div>`,e),this.eResize=s_,this.eHeaderCompWrapper=s_,this.headerCompVersion=0,this.column=e.getColumnGroupChild(),this.pinned=e.getPinned()}postConstruct(){var e;let t=this.getGui();null!=(e=this.column.getColId())&&""!=e?t.setAttribute("col-id",e):t.removeAttribute("col-id"),this.ctrl.
94setComp({setWidth:e=>t.style.width=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setAriaSort:e=>e?i4(t,e):i6(t),setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerComp},this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);let i=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",i)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;let t=this.headerCompVersion;e.newAgStackInstance().then(e=>this.afterCompCreated(t,e))}afterCompCreated(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)}},om=class extends oc{constructor(e){super(`<div class="ag-header-group-cell" role="columnheader">
95            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
96            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
97        </div>`,e),this.eResize=s_,this.eHeaderCompWrapper=s_}postConstruct(){let e=this.getGui();e.setAttribute("col-id",this.ctrl.getColId()),this.ctrl.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setHeaderWrapperHidden:e=>{e?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:e=>{null!=e?this.eHeaderCompWrapper.style.setProperty("max-height",`${e}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",null!=e)},setResizableDisplayed:e=>ss(this.eResize,e),setWidth:t=>e.style.width=t,setAriaExpanded:t=>{let i;return i="aria-expanded",void 0!=t?e.setAttribute(i,t):e.removeAttribute(i)},setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerGroupComp},e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(e=>this.afterHeaderCompCreated(e))}afterHeaderCompCreated(e){let t=()=>this.destroyBean(e);if(!this.isAlive())return void t();let i=this.getGui(),s=e.getGui();this.eHeaderCompWrapper.appendChild(s),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}addOrRemoveHeaderWrapperStyle(e,t){let{eHeaderCompWrapper:i}=this;t?i.style.setProperty(e,t):i.style.removeProperty(e)}},ov=((c=ov||{}).COLUMN_GROUP="group",c.COLUMN="column",c.FLOATING_FILTER="filter",c),of=class extends s${constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}postConstruct(){i0(this.getGui(),this.ctrl.getAriaRowIndex()),this.ctrl.setComp({setHeight:e=>this.getGui().style.height=e,setTop:e=>this.getGui().style.top=e,setHeaderCtrls:(e,t)=>this.setHeaderCtrls(e,t),setWidth:e=>this.getGui().style.width=e},void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;let i=this.headerComps;if(this.headerComps={},e.forEach(e=>{let t=e.instanceId,s=i[t];delete i[t],null==s&&(s=this.createHeaderComp(e),this.getGui().appendChild(s.getGui())),this.headerComps[t]=s}),tK(i,(e,t)=>{this.getGui().removeChild(t.getGui()),this.destroyBean(t)}),t){let e=tQ(this.headerComps);e.sort((e,t)=>e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft());let t=e.map(e=>e.getGui());sb(this.getGui(),t)}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case"group":t=new om(e);break;case"filter":t=new op(e);break;default:t=new og(e)}return this.createBean(t),t.setParentComponent(this),t}},oC=((p=oC||{})[p.UP=0]="UP",p[p.DOWN=1]="DOWN",p[p.LEFT=2]="LEFT",p[p.RIGHT=3]="RIGHT",p),oy=class extends tk{constructor(){super(...arguments),this.beanName="headerNavigationService",this.currentHeaderRowWithoutSpan=-1}wireBeans(e){this.focusService=e.focusService,this.headerPositionUtils=e.headerPositionUtils,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.visibleColService=e.visibleColsService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl});let e=e$(this.gos);this.addManagedElementListeners(e,{mousedown:()=>this.setCurrentHeaderRowWithoutSpan(-1)})}getHeaderRowCount(){var e,t;return null!=(e=null==(t=this.ctrlsService.getHeaderRowContainerCtrl())?void 0:t.getRowCount())?e:0}getHeaderPositionForColumn(e,t){let i;if("string"==typeof e?(i=this.columnModel.getCol(e))||(i=this.visibleColService.getColumnGroup(e)):i=e,!i)return null;let s=this.ctrlsService.getHeaderRowContainerCtrl(),r="filter"===tp((null==s?void 0:s.getAllCtrls())||[]).getType(),a=this.getHeaderRowCount()-1,o=-1,n=i;for(;n;)o++,n=n.getParent();let l=o;return t&&r&&l===a-1&&l++,-1===l?null:{headerRowIndex:l,column:i}}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;let{headerRowIndex:s}=t,r=t.column,a=this.getHeaderRowCount(),{headerRowIndex:o,column:n,headerRowIndexWithoutSpan:l}=0===e?this.headerPositionUtils.getColumnVisibleParent(r,s):this.headerPositionUtils.getColumnVisibleChild(r,s),h=!1;return o<0&&(o=0,n=r,h=!0),o>=a?(o=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==l&&(this.currentHeaderRowWithoutSpan=l),(!!h||!!n)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:o,column:n},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,t=!1,i){let s,r,a=this.focusService.getFocusedHeader(),o=this.gos.get("enableRtl");if(-1!==this.currentHeaderRowWithoutSpan?a.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=a.headerRowIndex,r=2===e!==o?"Before":"After",(s=this.headerPositionUtils.findHeader(a,r))||!t)return this.focusService.focusHeaderPosition({headerPosition:s,direction:r,fromTab:t,allowUserOverride:!0,event:i});if(t){let e=this.gos.getCallback("tabToNextHeader");if(e)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:e,headerPosition:s,direction:r})}return this.focusNextHeaderRow(a,r,i)}focusNextHeaderRow(e,t,i){var s;let r,a=e.headerRowIndex,o=null;if("Before"===t?a>0&&(r=a-1,this.currentHeaderRowWithoutSpan-=1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=a+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),!o)return!1;let{column:n,headerRowIndex:l}=this.headerPositionUtils.getHeaderIndexToFocus(o.column,null==(s=o)?void 0:s.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){let i;if(!e.getPinned()){if(iy(e)){let s=e.getDisplayedLeafColumns();i="Before"===t?tp(s):s[0]}else i=e;
97this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}}},ow=class extends tk{wireBeans(e){this.animationFrameService=e.animationFrameService,this.headerNavigationService=e.headerNavigationService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService,this.filterManager=e.filterManager,this.menuService=e.menuService}setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new ai(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),this.onPivotModeChanged(),this.setupHeaderHeight();let s=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:s}),this.mockContextMenuForIPad(s),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>this.animationFrameService.requestAnimationFrame(()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){var e;let{columnModel:t}=this,i=0,s=this.columnModel.getGroupRowsHeight().reduce((e,t)=>e+t,0),r=this.columnModel.getColumnHeaderRowHeight();if(null!=(e=this.filterManager)&&e.hasFloatingFilters()&&(i+=t.getFloatingFiltersHeight()),i+=s,i+=r,this.headerHeight===i)return;this.headerHeight=i;let a=`${i+1}px`;this.comp.setHeightAndMinHeight(a),this.eventService.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(){let e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){let e=this.visibleColsService.getAllCols().some(e=>e.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)}onTabKeyDown(e){let t=this.gos.get("enableRtl"),i=e.shiftKey;(this.headerNavigationService.navigateHorizontally(i!==t?2:3,!0,e)||!i&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case s9.LEFT:t=2;case s9.RIGHT:eM(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e)&&e.preventDefault();break;case s9.UP:t=0;case s9.DOWN:eM(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){let{relatedTarget:t}=e;!(!t&&this.eGui.contains(eZ(this.gos)))&&(this.eGui.contains(t)||this.focusService.clearFocusedHeader())}onHeaderContextMenu(e,t,i){var s;if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;let{target:r}=null!=e?e:t;(r===this.eGui||r===(null==(s=this.ctrlsService.getHeaderRowContainerCtrl())?void 0:s.getViewportElement()))&&this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!sO())return;let t=new sJ(this.eGui);this.addManagedListeners(t,{longTap:t=>{e(void 0,t.touchStart,t.touchEvent)}}),this.addDestroyFunc(()=>t.destroy())}},ob=class extends tk{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}wireBeans(e){this.visibleColsService=e.visibleColsService,this.scrollVisibleService=e.scrollVisibleService}postConstruct(){let 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(){let e,t=eG(this.gos,"print"),i=this.visibleColsService.getBodyContainerWidth(),s=this.visibleColsService.getColsLeftWidth(),r=this.visibleColsService.getDisplayedColumnsRightWidth();t?e=i+s+r:(e=i,this.addSpacer&&0===(this.gos.get("enableRtl")?s:r)&&this.scrollVisibleService.isVerticalScrollShowing()&&(e+=this.scrollVisibleService.getScrollbarWidth())),this.callback(e)}},oS=class extends tk{constructor(e){super(),this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}wireBeans(e){this.funcColsService=e.funcColsService}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let t=e.dragItem.columns;
97t&&t.forEach(e=>{e.isPrimary()&&!e.isAnyFunctionActive()&&(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e))})}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){this.columnsToAggregate.length>0&&this.funcColsService.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.funcColsService.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.funcColsService.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function ox(e){var t;let i,s,r,{isFromHeader:a,fromLeft:o,xPosition:n,fromEnter:l,fakeEvent:h,pinned:d,gos:u,columnModel:c,columnMoveService:p,visibleColsService:g}=e,{allMovingColumns:m}=e;if(a){let e=[];m.forEach(t=>{let i=null,s=t.getParent();for(;null!=s&&1===s.getDisplayedLeafColumns().length;)i=s,s=s.getParent();if(null!=i){var r;(null!=(r=i.getColGroupDef())&&r.marryChildren?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns()).forEach(t=>{e.includes(t)||e.push(t)})}else e.includes(t)||e.push(t)}),m=e}let v=m.slice();c.sortColsLikeCols(v);let f=function(e){let t,{movingCols:i,draggingRight:s,xPosition:r,pinned:a,gos:o,columnModel:n,visibleColsService:l}=e;if(o.get("suppressMovableColumns")||i.some(e=>e.getColDef().suppressMovable))return[];let h=function(e,t){switch(t){case"left":return e.getLeftCols();case"right":return e.getRightCols();default:return e.getCenterCols()}}(l,a),d=n.getCols(),u=h.filter(e=>tS(i,e)),c=h.filter(e=>!tS(i,e)),p=d.filter(e=>!tS(i,e)),g=0,m=r;if(s){let e=0;u.forEach(t=>e+=t.getActualWidth()),m-=e}if(m>0){for(let e=0;e<c.length&&!((m-=c[e].getActualWidth())<0);e++)g++;s&&g++}if(g>0){let e=c[g-1];t=p.indexOf(e)+1}else -1===(t=p.indexOf(c[0]))&&(t=0);let v=[t],f=(e,t)=>e-t;if(s){let e=t+1,i=d.length-1;for(;e<=i;)v.push(e),e++;v.sort(f)}else{let e=t,i=d.length-1,s=d[e];for(;e<=i&&0>h.indexOf(s);)e++,v.push(e),s=d[e];for(e=t-1;e>=0;)v.push(e),e--;v.sort(f).reverse()}return v}({movingCols:v,draggingRight:o,xPosition:n,pinned:d,gos:u,columnModel:c,visibleColsService:g}),C=(t=v,i=c.getCols(),r=(s=t.map(e=>i.indexOf(e)).sort((e,t)=>e-t))[0],tp(s)-r!=s.length-1?null:r);if(0===f.length)return;let y=f[0],w=null!==C&&!l;if(a&&(w=null!==C),w&&!h&&(!o&&y>=C||o&&y<=C))return;let b=g.getAllCols(),S=[],x=null;for(let e=0;e<f.length;e++){let t=f[e],i=p.getProposedColumnOrder(v,t);if(!p.doesOrderPassRules(i))continue;let s=i.filter(e=>b.includes(e));if(null===x)x=s;else if(!tg(s,x))break;let r=function(e){function t(e){let t=[],i=e.getOriginalParent();for(;null!=i;)t.push(i),i=i.getOriginalParent();return t}let i=0;for(let s=0;s<e.length-1;s++){let r=t(e[s]),a=t(e[s+1]);[r,a]=r.length>a.length?[r,a]:[a,r],r.forEach(e=>{-1===a.indexOf(e)&&i++})}return i}(i);S.push({move:t,fragCount:r})}if(0===S.length)return;S.sort((e,t)=>e.fragCount-t.fragCount);let M=S[0].move;if(!(M>c.getCols().length-m.length))return{columns:m,toIndex:M}}function oM(e){let{columns:t,toIndex:i}=ox(e)||{},{finished:s,columnMoveService:r}=e;return t&&null!=i?(r.moveColumns(t,i,"uiColumnMoved",s),s?null:{columns:t,toIndex:i}):null}function oD(e){var t;let{pinned:i,fromKeyboard:s,gos:r,ctrlsService:a,useHeaderRow:o,skipScrollPadding:n}=e,l=null==(t=a.getHeaderRowContainerCtrl(i))?void 0:t.getViewportElement(),{x:h}=e;return l?(s&&(h-=l.getBoundingClientRect().left),r.get("enableRtl")&&(o&&(l=l.querySelector(".ag-header-row")),h=l.clientWidth-h),null!=i||n||(h+=a.get("center").getCenterViewportScrollLeft()),h):0}function oE(e,t){for(let i of e)i.setMoving(t,"uiColumnMoved")}var oI=class extends tk{constructor(e){super(),this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!eM(e)}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnMoveService=e.columnMoveService,this.dragAndDropService=e.dragAndDropService,this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){var e,t;for(let i of null!=(e=null==(t=this.lastDraggingEvent)?void 0:t.dragItem.columns)?e:[]){let e=i.getPinned();if(i.getColDef().lockPinned){if(e==this.pinned)return"move";continue}if(e===this.pinned||!this.pinned)return"move";if(!e&&this.pinned)return"pinned"}return"notAllowed"}onDragEnter(e){let t=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(t,!0,"uiColumnDragged");else{let i=e.dragItem.visibleState,s=(t||[]).filter(e=>i[e.getId()]);this.setColumnsVisible(s,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(t,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){let r=this.gos.get("suppressMoveWhenColumnDragging");if(s&&!r)return void this.finishColumnMoving();if(this.lastDraggingEvent=e,!e||!s&&eD(e.hDirection))return;let{pinned:a,gos:o,ctrlsService:n}=this,l=oD({x:e.x,pinned:a,gos:o,ctrlsService:n});t||this.checkCenterForScrolling(l),r?this.handleColumnDragWhileSuppressingMovement(e,t,i,l,s):this.handleColumnDragWhileAllowingMovement(e,t,i,l,s)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),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)return;let s=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColsVisible(s,t,i)}finishColumnMoving(){if(this.clearHighlighted(),!this.lastMovedInfo)return;let{columns:e,toIndex:t}=this.lastMovedInfo;this.columnMoveService.moveColumns(e,t,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,i,s,r){let a=this.getAllMovingColumns(e,!0);if(r){let e=this.isAttemptingToPin(a);e&&this.attemptToPinColumns(a,void 0,!0);let{fromLeft:s,xPosition:r}=this.getNormalisedXPositionInfo(a,e)||{};if(null==s||null==r)return void this.finishColumnMoving();this.moveColumnsAfterHighlight({allMovingColumns:a,xPosition:r,fromEnter:t,fakeEvent:i,fromLeft:s})}else{if(!this.dragAndDropService.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(a,s)}}handleColumnDragWhileAllowingMovement(e,t,i,s,r){let a=this.getAllMovingColumns(e),o=1===this.normaliseDirection(e.hDirection),n=1===e.dragSource.type,l=oM({...this.getMoveColumnParams({allMovingColumns:a,isFromHeader:n,xPosition:s,fromLeft:o,fromEnter:t,fakeEvent:i}),finished:r});l&&(this.lastMovedInfo=l)}getAllMovingColumns(e,t=!1){let i=e.dragSource.getDragItem(),s=null;t&&(s=i.columnsInSplit)||(s=i.columns);let r=e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned;return s?s.filter(r):[]}getMoveColumnParams(e){let{allMovingColumns:t,isFromHeader:i,xPosition:s,fromLeft:r,fromEnter:a,fakeEvent:o}=e,{pinned:n,gos:l,columnModel:h,columnMoveService:d,visibleColsService:u}=this;return{allMovingColumns:t,isFromHeader:i,fromLeft:r,xPosition:s,pinned:n,fromEnter:a,fakeEvent:o,gos:l,columnModel:h,columnMoveService:d,visibleColsService:u}}findFirstAndLastMovingColumns(e){let t,i,s=e.length;for(let r=0;r<=s;r++){if(!t){let i=e[r];null!=i.getLeft()&&(t=i)}if(!i){let t=e[s-1-r];null!=t.getLeft()&&(i=t)}if(t&&i)break}return{firstMovingCol:t,lastMovingCol:i}
97}highlightHoveredColumn(e,t){var i;let s,{gos:r,columnModel:a}=this,o=r.get("enableRtl"),n=a.getCols().filter(e=>e.isVisible()&&e.getPinned()===this.pinned),l=null,h=null,d=null;for(let e of n){if(h=e.getActualWidth(),null!=(l=this.getNormalisedColumnLeft(e,0,o))){let i=l+h;if(l<=t&&i>=t){d=e;break}}l=null,h=null}if(d)-1!==e.indexOf(d)&&(d=null);else{for(let e=n.length-1;e>=0;e--){let t=n[e],i=n[e].getParent();if(!i){d=t;break}let s=null==i?void 0:i.getDisplayedLeafColumns();if(s.length){d=tp(s);break}}if(!d)return;l=this.getNormalisedColumnLeft(d,0,o),h=d.getActualWidth()}(null==(i=this.lastHighlightedColumn)?void 0:i.column)!==d&&this.clearHighlighted(),null!=d&&null!=l&&null!=h&&(s=+(t-l<h/2===o),d.setHighlighted(s),this.lastHighlightedColumn={column:d,position:s})}getNormalisedXPositionInfo(e,t){let{gos:i,visibleColsService:s}=this,r=i.get("enableRtl"),{firstMovingCol:a,column:o,position:n}=this.getColumnMoveAndTargetInfo(e,t,r);if(!a||!o||null==n)return;let l=s.getAllCols(),h=l.indexOf(a),d=l.indexOf(o),u=0===n!==r,c=h<d||h===d&&!u,p=0;if(u?c&&(p-=1):c||(p+=1),d+p===h)return;let g=l[d+p];if(g)return{fromLeft:c,xPosition:this.getNormalisedColumnLeft(g,20,r)}}getColumnMoveAndTargetInfo(e,t,i){let s=this.lastHighlightedColumn||{},{firstMovingCol:r,lastMovingCol:a}=this.findFirstAndLastMovingColumns(e);if(!r||!a||s.column||!t)return{firstMovingCol:r,...s};let o="left"===this.getPinDirection();return{firstMovingCol:r,position:+!!o,column:o!==i?r:a}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case 0:return 1;case 1:return 0}return e}getNormalisedColumnLeft(e,t,i){let{gos:s,ctrlsService:r}=this,a=e.getLeft();if(null==a)return null;let o=e.getActualWidth();return oD({x:i?a+o-t:a+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:s,ctrlsService:r})}isAttemptingToPin(e){let t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>7;return t&&i||e.some(e=>e.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){let{allMovingColumns:t,xPosition:i,fromEnter:s,fakeEvent:r,fromLeft:a}=e,{columns:o,toIndex:n}=ox(this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:a,fromEnter:s,fakeEvent:r}))||{};o&&null!=n&&(this.lastMovedInfo={columns:o,toIndex:n}),this.finishColumnMoving()}clearHighlighted(){this.lastHighlightedColumn&&(this.lastHighlightedColumn.column.setHighlighted(null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;let t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>s-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>s-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){var e;this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),null==(e=this.dragAndDropService.getDragAndDropImageComponent())||e.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){var e;this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,null==(e=this.dragAndDropService.getDragAndDropImageComponent())||e.setIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);let t=null,i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{var s,r;if(this.failedMoveAttempts++,this.failedMoveAttempts<=8)return;if(null==(s=this.dragAndDropService.getDragAndDropImageComponent())||s.setIcon("pinned"),!this.gos.get("suppressMoveWhenColumnDragging")){let e=null==(r=this.lastDraggingEvent)?void 0:r.dragItem.columns;this.attemptToPinColumns(e,void 0,!0)}}}getPinDirection(){return this.needToMoveLeft||"left"===this.pinned?"left":this.needToMoveRight||"right"===this.pinned?"right":void 0}attemptToPinColumns(e,t,i=!1){let s=(e||[]).filter(e=>!e.getColDef().lockPinned);return s.length?(i&&(t=this.getPinDirection()),this.columnModel.setColsPinned(s,t,"uiColumnDragged"),i&&this.dragAndDropService.nudge(),s.length):0}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}},oA=class extends tk{wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(this,e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]]}}),this.moveColumnFeature=this.createManagedBean(new oI(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new oS(this.pinned)),this.dragAndDropService.addDropTarget(this),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(this))}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},oR=class extends tk{wireBeans(e){this.horizontalResizeService=e.horizontalResizeService,this.pinnedWidthService=e.pinnedWidthService,this.ctrlsService=e.ctrlsService,this.columnSizeService=e.columnSizeService,this.columnAutosizeService=e.columnAutosizeService}constructor(e,t,i,s,r){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=r}postConstruct(){let e,t,i=[],s=()=>
97{if(ss(this.eResize,e),!e)return;let s=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(i.push(s),t){let e=this.gos.get("skipHeaderOnAutoSize"),t=()=>{this.columnAutosizeService.autoSizeColumn(this.column,"uiColumnResized",e)};this.eResize.addEventListener("dblclick",t);let s=new sJ(this.eResize);s.addEventListener("doubleTap",t),i.push(()=>{this.eResize.removeEventListener("dblclick",t),s.removeEventListener("doubleTap",t),s.destroy()})}},r=()=>{i.forEach(e=>e()),i.length=0},a=()=>{let i=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(i!==e||a!==t)&&(e=i,t=a,r(),s())};a(),this.addDestroyFunc(r),this.ctrl.setRefreshFunction("resize",a)}onResizing(e,t){let{column:i,lastResizeAmount:s,resizeStartWidth:r}=this,a=this.normaliseResizeAmount(t);if(!(this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(a-s)>sh(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50))this.lastResizeAmount=a,this.columnSizeService.setColumnWidths([{key:i,newWidth:r+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.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e,i="left"!==this.pinned,s="right"===this.pinned;return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t}},oT=class extends tk{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}onSpaceKeyDown(e){let t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(eZ(this.gos))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new rs),this.cbSelectAll.addCssClass("ag-header-select-all"),iV(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:this.onNewColumnsLoaded.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedListeners(this.cbSelectAll,{fieldValueChanged:this.onCbSelectAll.bind(this)}),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;let e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);let t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){let e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${i} (${t}
97)`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(e("ariaHeaderSelection","Column with Header Selection")),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return!!tl(this.gos)||(ep(`${e} is only available if using 'multiRow' selection mode.`),!1)}checkRightRowModelType(e){return!!(eN(this.gos)||eO(this.gos))||(ep(`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${this.rowModel.getType()}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly(),s="uiSelectAll";i?s="uiSelectAllCurrentPage":t&&(s="uiSelectAllFiltered");let r={source:s,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(r):this.selectionService.deselectAllRowNodes(r)}isCheckboxSelection(){let e=this.gos.get("rowSelection"),t="object"==typeof e&&e8(e)&&tU(this.column),i=this.column.getColDef().headerCheckboxSelection;return(!!t||("function"==typeof i?i(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()})):!!i))&&this.checkRightRowModelType(t?"headerCheckbox":"headerCheckboxSelection")&&this.checkSelectionType(t?"headerCheckbox":"headerCheckboxSelection")}isFilteredOnly(){let e=this.gos.get("rowSelection");return"object"==typeof e?"multiRow"===e.mode&&"filtered"===e.selectAll:!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){let e=this.gos.get("rowSelection");return"object"==typeof e?"multiRow"===e.mode&&"currentPage"===e.selectAll:!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}},oL=class extends aq{constructor(e,t,i){super(e,t,i),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,i,s,r){this.comp=e,r=iN(this,this.beans.context,r),this.setGui(t,r),this.updateState(),this.setupWidth(r),this.setupMovingCss(r),this.setupMenuClass(r),this.setupSortableClass(r),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:s,checkMeasuringCallback:e=>this.setRefreshFunction("measuring",e),compBean:r}),this.addColumnHoverListener(r),this.setupFilterClass(r),this.setupClassesFromColDef(),this.setupTooltip(r),this.addActiveHeaderMouseListeners(r),this.setupSelectAll(r),this.setupUserComp(r),this.refreshAria(),this.resizeFeature=r.createManagedBean(new oR(this.getPinned(),this.column,i,e,this)),r.createManagedBean(new aQ([this.column],t)),r.createManagedBean(new aW(this.column,t,this.beans)),r.createManagedBean(new ai(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(r),r.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],()=>this.refresh(r)),r.addManagedListeners(this.column,{colDefChanged:()=>this.refresh(r)}),r.addManagedListeners(this.column,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let a=()=>this.checkDisplayName(r);r.addManagedEventListeners({columnValueChanged:a,columnRowGroupChanged:a,columnPivotChanged:a,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),r.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){if(!this.column.isResizable())return;let i=Math.min(Math.max(this.column.getActualWidth()+e,this.column.getMinWidth()),this.column.getMaxWidth());this.beans.columnSizeService.setColumnWidths([{key:this.column,newWidth:i}],t,!0,"uiColumnResized")}moveHeader(e){let{eGui:t,beans:i,column:s,ctrlsService:r}=this,{gos:a,columnModel:o,columnMoveService:n,visibleColsService:l}=i,h=this.getPinned(),d=t.getBoundingClientRect().left,u=s.getActualWidth(),c=oD({x:0===e!==a.get("enableRtl")?d-20:d+u+20,pinned:h,fromKeyboard:!0,gos:a,ctrlsService:r}),p=this.focusService.getFocusedHeader();oM({allMovingColumns:[s],isFromHeader:!0,fromLeft:1===e,xPosition:c,pinned:h,fromEnter:!1,fakeEvent:!1,gos:a,columnModel:o,columnMoveService:n,visibleColsService:l,finished:!0}
97),r.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(s,"auto"),(!this.isAlive()||this.beans.gos.get("ensureDomOrder"))&&p&&this.restoreFocus(p)}restoreFocus(e){this.focusService.focusHeaderPosition({headerPosition:{...e,column:this.column}})}setupUserComp(e){let t=this.lookupUserCompDetails(e);this.setCompDetails(t)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(e){let t=this.createParams(e),i=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(i,t)}createParams(e){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:e=>{this.menuService.showColumnMenu({column:this.column,buttonElement:e,positionBy:"button"})},showColumnMenuAfterMouseClick:e=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:e,positionBy:"mouse"})},showFilter:e=>{this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{this.beans.sortController.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,t)=>{this.beans.sortController.setSortForColumn(this.column,e,!!t,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(t,i)=>{this.setupTooltip(e,t,i)}})}setupSelectAll(e){this.selectAllFeature=e.createManagedBean(new oT(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===s9.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===s9.ENTER&&this.onEnterKeyDown(e),e.key===s9.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){let t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}showMenuOnKeyPress(e,t){let i=this.comp.getUserCompInstance();i&&i instanceof s6&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){let e=this.getRowIndex();this.focusService.setFocusedHeader(e,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let s="whenTruncated"===this.gos.get("tooltipShowMode"),r=this.eGui,a=this.column.getColDef();i||!s||a.headerComponent||(i=()=>{let e=r.querySelector(".ag-header-cell-text");return!e||e.scrollWidth>e.clientWidth});let o={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>null!=t?t:this.column.getColDef().headerTooltip,shouldDisplayTooltip:i},n=e.createManagedBean(new sW(o));this.setRefreshFunction("tooltip",()=>n.refreshToolTip())}setupClassesFromColDef(){let e=()=>{let e=aU(this.column.getColDef(),this.gos,this.column,null),t=this.userHeaderClasses;this.userHeaderClasses=new Set(e),e.forEach(e=>{t.has(e)?t.delete(e):this.comp.addOrRemoveCssClass(e,!0)}),t.forEach(e=>this.comp.addOrRemoveCssClass(e,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;let{column:t,beans:i,displayName:s,dragAndDropService:r,gos:a}=this,{columnModel:o}=i,n=!this.gos.get("suppressDragLeaveHidesColumns"),l=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>n?"hide":"notAllowed",getDragItem:()=>this.createDragItem(t),dragItemName:s,onDragStarted:()=>{n=!a.get("suppressDragLeaveHidesColumns"),oE([t],!0)},onDragStopped:()=>oE([t],!1),onDragCancelled:()=>oE([t],!1),onGridEnter:e=>{if(n){var t;let i=(null==e||null==(t=e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColsVisible(i,!0,"uiColumnMoved")}}
97,onGridExit:e=>{if(n){var t;let i=(null==e||null==(t=e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColsVisible(i,!1,"uiColumnMoved")}}};r.addDragSource(l,!0)}createDragItem(e){let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(e){this.updateState(),this.refreshHeaderComp(e),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(e){let t=this.lookupUserCompDetails(e);null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==t.componentClass&&this.attemptHeaderCompRefresh(t.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(t)}attemptHeaderCompRefresh(e){let t=this.comp.getUserCompInstance();return!!t&&!!t.refresh&&t.refresh(e)}calculateDisplayName(){return this.beans.columnNameService.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(e){this.displayName!==this.calculateDisplayName()&&this.refresh(e)}workOutDraggable(){let e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){let t=()=>{let e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){let t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){let t=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){let t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){let t=()=>{let e=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",e),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let e=()=>{let e=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",e)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){let e=this.column.getHighlighted();this.comp.addOrRemoveCssClass("ag-header-highlight-before",0===e),this.comp.addOrRemoveCssClass("ag-header-highlight-after",1===e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){let{eGui:e,column:t,comp:i,beans:s}=this,r=this.beans.columnModel.getGroupRowsHeight(),a=0===r.reduce((e,t)=>e+=t,0);if(i.addOrRemoveCssClass("ag-header-parent-hidden",a),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),i.addOrRemoveCssClass("ag-header-span-total",!1);return}let{numberOfParents:o,isSpanningTotal:n}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",o>0);let{columnModel:l}=s,h=l.getColumnHeaderRowHeight();if(0===o){i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${h}px`);return}i.addOrRemoveCssClass("ag-header-span-total",n);let d=0;for(let e=0;e<o;e++)d+=r[r.length-1-e];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${h+d}px`)}refreshAriaSort(){if(this.sortable){let e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort("asc"===t?"ascending":"desc"===t?"descending":"mixed"===t?"other":"none"),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}
97refreshAriaMenu(){if(this.menuEnabled){let e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){let e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){let e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(eZ(this.beans.gos)))return;let e=Array.from(this.ariaDescriptionProperties.keys()).sort((e,t)=>"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0)).map(e=>this.ariaDescriptionProperties.get(e)).join(". ");this.beans.ariaAnnouncementService.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){let t=()=>{if(!this.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:t}),t()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(e){let t=e=>this.handleMouseOverChange("mouseenter"===e.type),i=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column),s=e=>this.handleContextMenuMouseEvent(e,void 0,this.column);e.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventService.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){let t=this.comp.getUserCompInstance();return t instanceof s6?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy()}},oF=class extends tk{wireBeans(e){this.horizontalResizeService=e.horizontalResizeService,this.autoWidthCalculator=e.autoWidthCalculator,this.visibleColsService=e.visibleColsService,this.columnSizeService=e.columnSizeService,this.columnAutosizeService=e.columnAutosizeService}constructor(e,t,i,s){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);let e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){let e=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{let t=[];this.columnGroup.getDisplayedLeafColumns().forEach(e=>{e.getColDef().suppressAutoSize||t.push(e.getColId())}),t.length>0&&this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:e,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){let t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){let s=this.normaliseDragChange(t),r=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(r,i,e)}getInitialValues(e){let t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),s=this.getSizeRatiosOfColumns(t,i),r={columnsToResize:t,resizeStartWidth:i,resizeRatios:s},a=null;if(e&&(a=this.visibleColsService.getGroupAtDirection(this.columnGroup,"After")),a){let e=r.groupAfterColumns=a.getDisplayedLeafColumns().filter(e=>e.isResizable()),t=r.groupAfterStartWidth=this.getInitialSizeOfColumns(e);r.groupAfterRatios=this.getSizeRatiosOfColumns(e,t)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}
97storeLocalValues(e){let{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:r,groupAfterStartWidth:a,groupAfterRatios:o}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=a,this.resizeTakeFromRatios=o}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){let t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){var s,r,a;if(!this.resizeCols||!this.resizeRatios)return;let o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!=(s=this.resizeTakeFromCols)?s:void 0,groupAfterStartWidth:null!=(r=this.resizeTakeFromStartWidth)?r:void 0,groupAfterRatios:null!=(a=this.resizeTakeFromRatios)?a:void 0};this.resizeColumns(o,e,t,i)}resizeColumns(e,t,i,s=!0){let{columnsToResize:r,resizeStartWidth:a,resizeRatios:o,groupAfterColumns:n,groupAfterStartWidth:l,groupAfterRatios:h}=e,d=[];if(d.push({columns:r,ratios:o,width:t}),n){let e=t-a;d.push({columns:n,ratios:h,width:l-e})}this.columnSizeService.resizeColumnSets({resizeSets:d,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(e=>e.isResizable())}getInitialSizeOfColumns(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}getSizeRatiosOfColumns(e,t){return e.map(e=>e.getActualWidth()/t)}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.clearLocalValues()}},oP=class extends tk{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();let e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",0===e)}},ok=class extends aq{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){let e=this.getGui();this.setDragSource(e)}},this.column=e}setComp(e,t,i,s,r){this.comp=e,r=iN(this,this.beans.context,r),this.setGui(t,r),this.displayName=this.beans.columnNameService.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(r),this.setupExpandable(r),this.setupTooltip(r),this.setupAutoHeight({wrapperElement:s,compBean:r}),this.setupUserComp(r),this.addHeaderMouseListeners(r),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();let a=this.getParentRowCtrl().getPinned(),o=this.column.getProvidedColumnGroup().getLeafColumns();r.createManagedBean(new aQ(o,t)),r.createManagedBean(new aW(this.column,t,this.beans)),r.createManagedBean(new oP(e,this.column)),this.resizeFeature=r.createManagedBean(new oF(e,i,a,this.column)),r.createManagedBean(new ai(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>void 0,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(r,o),r.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(r),r.addDestroyFunc(()=>this.clearComponent())}refreshMaxHeaderHeight(){let{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");null!=i?0===i?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(let i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){let t=this.column.getDisplayedLeafColumns(),i=t[0]===e,s=tp(t)===e;if(!i&&!s)return;let r=e.getHighlighted(),a=!!this.getParentRowCtrl().findHeaderCellCtrl(e=>e.getColumnGroupChild().isMoving()),o=!1,n=!1;if(a){let e=this.beans.gos.get("enableRtl"),t=1===r,a=0===r;i&&(e?n=t:o=a),s&&(e?o=a:n=t)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",o),this.comp.addOrRemoveCssClass("ag-header-highlight-after",n)}getColumn(){return this.column}resizeHeader(e,t){if(!this.resizeFeature)return;let i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){let{beans:t,eGui:i,column:s,ctrlsService:r}=this,{gos:a,columnModel:o,columnMoveService:n,visibleColsService:l}=t,h=a.get("enableRtl"),d=0===e,u=this.getPinned(),c=i.getBoundingClientRect(),p=c.left,g=c.width,m=oD({x:d!==h?p-20:p+g+20,pinned:u,fromKeyboard:!0,gos:a,ctrlsService:r}),v=s.getGroupId(),f=this.focusService.getFocusedHeader();oM({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,fromLeft:1===e,xPosition:m,pinned:u,fromEnter:!1,fakeEvent:!1,gos:a,columnModel:o,columnMoveService:n,visibleColsService:l,finished:!0});let C=s.getDisplayedLeafColumns(),y=d?C[0]:tp(C);
97this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(y,"auto"),(!this.isAlive()||this.beans.gos.get("ensureDomOrder"))&&f&&this.restoreFocus(v,s,f)}restoreFocus(e,t,i){let s=t.getLeafColumns();if(!s.length)return;let r=s[0].getParent();if(!r)return;let a=this.findGroupWidthId(r,e);a&&this.focusService.focusHeaderPosition({headerPosition:{...i,column:a}})}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(e){let t=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:e=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),e,"gridInitializing")},setTooltip:(t,i)=>{this.setupTooltip(e,t,i)}}),i=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(i)}addHeaderMouseListeners(e){let t=e=>this.handleMouseOverChange("mouseenter"===e.type),i=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),s=e=>this.handleContextMenuMouseEvent(e,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.eventService.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let s=this.column.getColGroupDef(),r="whenTruncated"===this.gos.get("tooltipShowMode"),a=this.eGui;i||!r||null!=s&&s.headerGroupComponent||(i=()=>{let e=a.querySelector(".ag-header-group-text");return!e||e.scrollWidth>e.clientWidth});let o={getColumn:()=>this.column,getGui:()=>a,getLocation:()=>"headerGroup",getTooltipValue:()=>null!=t?t:s&&s.headerTooltip,shouldDisplayTooltip:i};s&&(o.getColDef=()=>s),e.createManagedBean(new sW(o))}setupExpandable(e){let t=this.column.getProvidedColumnGroup();this.refreshExpanded();let i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){let{column:e}=this;this.expandable=e.isExpandable();let t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){let e=this.column.getColGroupDef(),t=aU(e,this.gos,null,this.column);this.column.isPadding()?(t.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(e=>e.isSpanHeaderHeight())&&t.push("ag-header-span-height")):(t.push("ag-header-group-cell-with-group"),null!=e&&e.wrapHeaderText&&t.push("ag-header-cell-wrap-text")),t.forEach(e=>this.comp.addOrRemoveCssClass(e,!0))}setupMovingCss(e){let t=this.column.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());t.forEach(t=>{e.addManagedListeners(t,{movingChanged:i})}),i()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){let e=this.getRowIndex();this.beans.focusService.setFocusedHeader(e,this.column)}}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();if(this.expandable&&t&&e.key===s9.ENTER){let e=this.column,t=!e.isExpanded();this.beans.columnModel.setColumnGroupOpened(e.getProvidedColumnGroup(),t,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),!e))return;let{beans:t,column:i,displayName:s,gos:r,dragAndDropService:a}=this,{columnModel:o}=t,n=i.getProvidedColumnGroup().getLeafColumns(),l=!r.get("suppressDragLeaveHidesColumns"),h=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",dragItemName:s,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{l=!r.get("suppressDragLeaveHidesColumns"),oE(n,!0)},onDragStopped:()=>oE(n,!1),onDragCancelled:()=>oE(n,!1),onGridEnter:e=>
97{if(l){let{columns:t=[],visibleState:i}=null!=e?e:{},s=t.filter(e=>!e.getColDef().lockVisible&&(!i||i[e.getColId()]));o.setColsVisible(s,!0,"uiColumnMoved")}},onGridExit:e=>{if(l){var t;let i=(null==e||null==(t=e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];o.setColsVisible(i,!1,"uiColumnMoved")}}};a.addDragSource(h,!0)}getDragItemForGroup(e){let t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(e=>i[e.getId()]=e.isVisible());let s=[];this.beans.visibleColsService.getAllCols().forEach(e=>{t.indexOf(e)>=0&&(s.push(e),tC(t,e))}),t.forEach(e=>s.push(e));let r=[],a=e.getLeafColumns();for(let e of s)-1!==a.indexOf(e)&&r.push(e);return{columns:s,columnsInSplit:r,visibleState:i}}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(t=>{(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)}),e||this.gos.get("suppressMovableColumns")}destroy(){super.destroy()}},oN=0,oO=class extends tk{constructor(e,t,i){super(),this.instanceId=oN++,this.rowIndex=e,this.pinned=t,this.type=i,this.headerRowClass=`ag-header-row ${"group"==i?"ag-header-row-column-group":"filter"==i?"ag-header-row-column-filter":"ag-header-row-column"}`}wireBeans(e){this.beans=e}postConstruct(){this.isPrintLayout=eG(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return!!this.comp&&this.getHeaderCellCtrls().every(e=>null!=e.getGui())}setComp(e,t,i=!0){this.comp=e,t=iN(this,this.beans.context,t),i&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){let t=this.onRowHeightChanged.bind(this);e.addManagedEventListeners({columnResized:this.onColumnResized.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:e=>this.onVirtualColumnsChanged(e.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),e.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}getHeaderCellCtrl(e){if(this.headerCellCtrls)return eP(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=eG(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{visibleColsService:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){let{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let{columnModel:e,filterManager:t}=this.beans,i=[],s=e.getGroupRowsHeight(),r=e.getColumnHeaderRowHeight();i.push(...s),i.push(r),null!=t&&t.hasFloatingFilters()&&i.push(e.getFloatingFiltersHeight());let a=0;for(let e=0;e<this.rowIndex;e++)a+=i[e];return{topOffset:a,rowHeight:i[this.rowIndex]}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(e=!1){let t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getHeaderCtrls(){let e=this.headerCellCtrls;for(let t of(this.headerCellCtrls=new Map,this.getColumnsInViewport()))this.recycleAndCreateHeaderCtrls(t,e);let t=e=>{let{focusService:t,visibleColsService:i}=this.beans;return!!t.isHeaderWrapperFocused(e)&&i.isVisible(e.getColumnGroupChild())};if(e)for(let[i,s]of e)t(s)?this.headerCellCtrls.set(i,s):this.destroyBean(s);return this.getHeaderCellCtrls()}getHeaderCellCtrls(){var e,t;return Array.from(null!=(e=null==(t=this.headerCellCtrls)?void 0:t.values())?e:[])}recycleAndCreateHeaderCtrls(e,t){let i;if(!this.headerCellCtrls||e.isEmptyGroup())return;let s=e.getUniqueId();if(t&&(i=t.get(s),t.delete(s)),i&&i.getColumnGroupChild()!=e&&(this.destroyBean(i),i=void 0),null==i)switch(this.type){case"filter":i=this.createBean(this.beans.ctrlsFactory.getInstance("headerFilterCell",e,this.beans,this));break;case"group":i=this.createBean(new ok(e,this.beans,this));break;default:i=this.createBean(new oL(e,this.beans,this))}this.headerCellCtrls.set(s,i)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(null!=this.pinned)return[];let e=[],t=this.getActualDepth(),{columnViewportService:i}=this.beans;return["left",null,"right"].forEach(s=>{let r=i.getHeadersToRender(s,t);e=e.concat(r)}),e}getActualDepth(){return"filter"==this.type?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnViewportService.getHeadersToRender(this.pinned,this.getActualDepth())}findHeaderCellCtrl(e){if(!this.headerCellCtrls)return;let t=this.getHeaderCellCtrls();return"function"==typeof e?t.find(e):t.find(t=>t.getColumnGroupChild()==e)}focusHeader(e,t){let i=this.findHeaderCellCtrl(e);return!!i&&i.focus(t)}destroy(){var e;
97null==(e=this.headerCellCtrls)||e.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}},oG=class extends tk{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}wireBeans(e){this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService,this.pinnedWidthService=e.pinnedWidthService,this.columnModel=e.columnModel,this.focusService=e.focusService,this.filterManager=e.filterManager}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport);let i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:i,advancedFilterEnabledChanged:i});let s=`${"string"==typeof this.pinned?this.pinned:"center"}Header`;this.ctrlsService.register(s,this),this.columnModel.isReady()&&this.refresh()}getAllCtrls(){let e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){let t=new sL,i=this.focusService.getFocusHeaderToUseAfterRefresh(),s=()=>{let i=t.next(),s=!this.hidden&&(null==this.columnsRowCtrl||!e||this.columnsRowCtrl.getRowIndex()!==i);(s||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),s&&(this.columnsRowCtrl=this.createBean(new oO(i,this.pinned,"column")))},r=()=>{var i;this.includeFloatingFilter=!!(null!=(i=this.filterManager)&&i.hasFloatingFilters())&&!this.hidden;let s=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void s();let r=t.next();if(this.filtersRowCtrl){let t=this.filtersRowCtrl.getRowIndex()!==r;(!e||t)&&s()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new oO(r,this.pinned,"filter")))};(()=>{let e=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let i=0;i<e;i++){let e=this.createBean(new oO(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(e)}})(),s(),r();let a=this.getAllCtrls();this.comp.setCtrls(a),this.restoreFocusOnHeader(i)}getHeaderCtrlForColumn(e){if(t3(e)){var t;return null==(t=this.columnsRowCtrl)?void 0:t.getHeaderCellCtrl(e)}if(0!==this.groupsRowCtrls.length)for(let t=0;t<this.groupsRowCtrls.length;t++){let i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i}}getHtmlElementForColumnHeader(e){let t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){let t=this.getAllCtrls()[e];return t?t.getType():void 0}focusHeader(e,t,i){let s=this.getAllCtrls()[e];return!!s&&s.focusHeader(t,i)}getViewportElement(){return this.eViewport}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+ +!!this.columnsRowCtrl+ +!!this.filtersRowCtrl}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}setupDragAndDrop(e){let t=new oA(this.pinned,e);this.createManagedBean(t)}restoreFocusOnHeader(e){if(!e)return;let{column:t}=e;t.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){var e;let t=(null==(e=this.filterManager)?void 0:e.hasFloatingFilters())&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new ob(e=>this.comp.setCenterWidth(`${e}px`),!0))}setupPinnedWidth(){if(null==this.pinned)return;let e="left"===this.pinned,t="right"===this.pinned;this.hidden=!0;let i=()=>{let i=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(null==i)return;let s=0==i,r=this.hidden!==s,a=this.gos.get("enableRtl"),o=this.scrollVisibleService.getScrollbarWidth(),n=this.scrollVisibleService.isVerticalScrollShowing()&&(a&&e||!a&&t);this.comp.setPinnedContainerWidth(`${n?i+o:i}px`),this.comp.setDisplayed(!s),r&&(this.hidden=s,this.refresh())};this.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}},oB=`<div class="ag-header-viewport" role="presentation">
98        <div class="ag-header-container" data-ref="eCenterContainer" role="rowgroup"></div>
99    </div>`,oz=class extends s${constructor(e){super(),this.eCenterContainer=s_,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate(),this.createManagedBean(new oG(this.pinned)).setComp({setDisplayed:e=>this.setDisplayed(e),setCtrls:e=>this.setCtrls(e),setCenterWidth:e=>this.eCenterContainer.style.width=e,setViewportScrollLeft:e=>this.getGui().scrollLeft=e,setPinnedContainerWidth:e=>{let t=this.getGui();t.style.width=e,t.style.maxWidth=e,t.style.minWidth=e}},this.getGui())}
99selectAndSetTemplate(){let e="left"==this.pinned,t="right"==this.pinned;this.setTemplate(e?'<div class="ag-pinned-left-header" role="rowgroup"></div>':t?'<div class="ag-pinned-right-header" role="rowgroup"></div>':oB),this.eRowContainer=this.eCenterContainer!==s_?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){let t,i=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let s=e=>{let i=e.getGui();i.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(i),t&&sw(this.eRowContainer,i,t),t=i};e.forEach(e=>{let t=e.instanceId,r=i[t];delete i[t];let a=r||this.createBean(new of(e));this.headerRowComps[t]=a,this.rowCompsList.push(a),s(a)}),tQ(i).forEach(e=>this.destroyRowComp(e))}},oV=class extends s${constructor(){super('<div class="ag-header" role="presentation"/>')}postConstruct(){this.createManagedBean(new ow).setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setHeightAndMinHeight:e=>{this.getGui().style.height=e,this.getGui().style.minHeight=e}},this.getGui(),this.getFocusableElement());let e=e=>{this.createManagedBean(e),this.appendChild(e)};e(new oz("left")),e(new oz(null)),e(new oz("right"))}},oH={selector:"AG-HEADER-ROOT",component:oV},oj=((g=oj||{}).AUTO_HEIGHT="ag-layout-auto-height",g.NORMAL="ag-layout-normal",g.PRINT="ag-layout-print",g),oW=class extends tk{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},i=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(i,t)}getDomLayout(){var e;let t=null!=(e=this.gos.get("domLayout"))?e:"normal";return -1===["normal","print","autoHeight"].indexOf(t)?(ep(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t}},oU=class extends s${constructor(){super(`
100            <div class="ag-overlay" role="presentation">
101                <div class="ag-overlay-panel" role="presentation">
102                    <div class="ag-overlay-wrapper" data-ref="eOverlayWrapper" role="presentation"></div>
103                </div>
104            </div>`),this.eOverlayWrapper=s_,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeOverlayWrapperCssClass=null,this.elToFocusAfter=null}wireBeans(e){this.overlayService=e.overlayService,this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}handleKeyDown(e){if(!(e.key!==s9.TAB||e.defaultPrevented||tT(e)||this.focusService.findNextFocusableElement(this.eOverlayWrapper,!1,e.shiftKey)))(e.shiftKey?this.focusService.focusGridView(tp(this.visibleColsService.getAllCols()),!0,!1):this.focusService.focusNextGridCoreContainer(!1))&&e.preventDefault()}updateLayoutClasses(e,t){let i=this.eOverlayWrapper.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print)}postConstruct(){this.createManagedBean(new oW(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){let t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i,s){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.focusService.isGridFocused()){let e=eZ(this.gos);e&&!eq(this.gos)&&(this.elToFocusAfter=e)}e.then(t=>{if(this.activePromise!==e){this.activeOverlay!==t&&(this.destroyBean(t),t=null);return}if(this.activePromise=null,!t)return;if(this.activeOverlay!==t&&(this.eOverlayWrapper.appendChild(t.getGui()),this.activeOverlay=t,s)){let e=t;this.updateListenerDestroyFunc=this.addManagedPropertyListener(s,({currentValue:t})=>{var i;null==(i=e.refresh)||i.call(e,this.gos.addGridCommonParams({...null!=t?t:{}}))})}let r=this.focusService;i&&r.isGridFocused()&&r.focusInto(this.eOverlayWrapper)})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){var e,t;this.activePromise=null;let i=this.activeOverlay;if(!i)return;let s=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,s&&!this.focusService.isGridFocused()&&(s=null);let r=this.updateListenerDestroyFunc;r&&(r(),this.updateListenerDestroyFunc=null),this.destroyBean(i),sm(this.eOverlayWrapper),null==(e=s)||null==(t=e.focu
104s)||t.call(e,{preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.overlayService.setOverlayWrapperComp(void 0),super.destroy()}},o_={selector:"AG-OVERLAY-WRAPPER",component:oU},o$=class extends s${constructor(e,t){super(),this.direction=t,this.eViewport=s_,this.eContainer=s_,this.hideTimeout=null,this.setTemplate(e)}wireBeans(e){this.animationFrameService=e.animationFrameService}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",sN()||sO())}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=sV(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){let e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),i=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(null!==this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)}})}attemptSettingScrollPosition(e){let t=this.getViewportElement();eb(()=>sC(t),()=>this.setScrollPosition(e),100)}getViewportElement(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}},oY=class extends o${constructor(){super(`<div class="ag-body-horizontal-scroll" aria-hidden="true">
105            <div class="ag-horizontal-left-spacer" data-ref="eLeftSpacer"></div>
106            <div class="ag-body-horizontal-scroll-viewport" data-ref="eViewport">
107                <div class="ag-body-horizontal-scroll-container" data-ref="eContainer"></div>
108            </div>
109            <div class="ag-horizontal-right-spacer" data-ref="eRightSpacer"></div>
110        </div>`,"horizontal"),this.eLeftSpacer=s_,this.eRightSpacer=s_}wireBeans(e){super.wireBeans(e),this.visibleColsService=e.visibleColsService,this.pinnedRowModel=e.pinnedRowModel,this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService}postConstruct(){super.postConstruct();let e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new ob(e=>this.eContainer.style.width=`${e}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;let e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.visibleColsService.getDisplayedColumnsRightWidth(),i=!this.enableRtl&&e,s=this.scrollVisibleService.getScrollbarWidth();i&&(t+=s),sM(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let r=this.visibleColsService.getColsLeftWidth();this.enableRtl&&e&&(r+=s),sM(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=s)}setScrollVisible(){let e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,
110i=this.gos.get("suppressHorizontalScroll"),s=e&&this.scrollVisibleService.getScrollbarWidth()||0,r=i?0:0===s&&t?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),sD(this.getGui(),r),sD(this.eViewport,r),sD(this.eContainer,r),this.setDisplayed(e,{skipAriaHidden:!0})}getScrollPosition(){return sp(this.getViewportElement(),this.enableRtl)}setScrollPosition(e){sC(this.getViewportElement())||this.attemptSettingScrollPosition(e),sg(this.getViewportElement(),e,this.enableRtl)}},oK={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:oY},oZ=class extends tk{wireBeans(e){this.maxDivHeightScaler=e.rowContainerHeightService}constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this)})}onHeightChanged(){let e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}},oq=class extends o${wireBeans(e){super.wireBeans(e),this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService}constructor(){super(`<div class="ag-body-vertical-scroll" aria-hidden="true">
111            <div class="ag-body-vertical-scroll-viewport" data-ref="eViewport">
112                <div class="ag-body-vertical-scroll-container" data-ref="eContainer"></div>
113            </div>
114        </div>`,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new oZ(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this)})}setScrollVisible(){let e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,i=e&&this.scrollVisibleService.getScrollbarWidth()||0,s=0===i&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),sM(this.getGui(),s),sM(this.eViewport,s),sM(this.eContainer,s),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(){let{ctrlsService:e}=this,t=e.getGridBodyCtrl().getBodyViewportElement(),i=this.getScrollPosition(),s=t.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.getViewportElement().scrollTop}setScrollPosition(e,t){t||sC(this.getViewportElement())||this.attemptSettingScrollPosition(e),this.getViewportElement().scrollTop=e}},oQ={selector:"AG-FAKE-VERTICAL-SCROLL",component:oq},oX=((m=oX||{}).FakeHScrollbar="fakeHScrollComp",m.Header="centerHeader",m.PinnedTop="topCenter",m.PinnedBottom="bottomCenter",m.StickyTop="stickyTopCenter",m.StickyBottom="stickyBottomCenter",m),oJ=class extends tk{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=ey(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=ey(()=>this.lastScrollSource[0]=null,500)}wireBeans(e){this.ctrlsService=e.ctrlsService,this.animationFrameService=e.animationFrameService,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService,this.rowModel=e.rowModel,this.heightScaler=e.rowContainerHeightService,this.rowRenderer=e.rowRenderer,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)}),this.ctrlsService.whenReady(this,e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){for(let e of(this.addManagedElementListeners(this.centerRowsCtrl.getViewportElement(),{scroll:this.onHScroll.bind(this,"Viewport")}),Object.values(oX))){let t=this.ctrlsService.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){let e=this.ctrlsService.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),i=t?ey(this.onVScroll.bind(this,"Viewport"),100):this.onVScroll.bind(this,"Viewport"),s=t?ey(this.onVScroll.bind(this,"fakeVScrollComp"),100):this.onVScroll.bind(this,"fakeVScrollComp");this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,s)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloating
114Center()}horizontallyScrollHeaderCenterAndFloatingCenter(e){null!=this.centerRowsCtrl&&(void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(let t of[...Object.values(oX),"Viewport"])this.lastScrollSource[1]!==t&&sg(this.getViewportForSource(t),e,this.enableRtl)}getViewportForSource(e){return"Viewport"===e?this.centerRowsCtrl.getViewportElement():this.ctrlsService.get(e).getViewportElement()}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(0===t?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;let{scrollLeft:t}=this.centerRowsCtrl.getViewportElement();if(this.shouldBlockScrollUpdate(1,t,!0))return;let i=sp(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){let t;!this.isControllingScroll(e,0)||(t="Viewport"===e?this.eBodyViewport.scrollTop:this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,"Viewport"===e?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced()))}doHorizontalScroll(e){let t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();(this.scrollLeft!==e||e!==t)&&(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){let t={type:"bodyScroll",direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{this.eventService.dispatchEvent({...t,type:"bodyScrollEnd"})},100)}shouldBlockScrollUpdate(e,t,i=!1){return(!i||!!sO())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){let t=sl(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return!!(e<0)||!!(e+t>i)}shouldBlockHorizontalScroll(e){let t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();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(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll("Viewport")}scrollGridIfNeeded(){let e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){let i=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl?e>0?0:i:Math.min(Math.max(e,0),i)),sg(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){let t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){let i=this.rowModel.getRowCount(),s=-1;for(let t=0;t<i;t++){let i=this.rowModel.getRow(t);if("function"==typeof e){if(i&&e(i)){s=t;break}}else if(e===i||e===i.data){s=t;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(eG(this.gos,"print"))return;let i=this.rowModel.getRowCount();if("number"!=typeof e||e<0||e>=i)return void ep("Invalid row index for ensureIndexVisible: "+e);let s=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{let i;if(!s){var r;null==(r=this.paginationService)||r.goToPageWithIndex(e)}let a=this.ctrlsService.getGridBodyCtrl(),o=a.getStickyTopHeight(),n=a.getStickyBottomHeight(),l=this.rowModel.getRow(e);do{let e=l.rowTop,s=l.rowHeight,r=this.pageBoundsService.getPixelOffset(),a=l.rowTop-r,h=a+l.rowHeight,d=this.getVScrollPosition(),u=this.heightScaler.getDivStretchOffset(),c=d.top+u,p=d.bottom+u,g=p-c,m=this.heightScaler.getScrollPositionForPixel(a),v=this.heightScaler.getScrollPositionForPixel(h-g),f=Math.min((m+v)/2,a),C=c+o>a,y=p-n<h,w=null;"top"===t?w=m:"bottom"===t?w=v:"middle"===t?w=f:C?w=m-o:y&&(w=v+n),null!==w&&(this.setVerticalScrollPosition(w),this.rowRenderer.redraw({afterScroll:!0})),i=e!==l.rowTop||s!==l.rowHeight}while(i)this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,t="auto"){let i=this.columnModel.getCol(e);if(!i||i.isPinned()||!this.visibleColsService.isColDisplayed(i))return;let s=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming(()=>{null!==s&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}
114getPositionedHorizontalScroll(e,t){let{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),r=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),a=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl,n=(o?i:s)||r,l=o?s:i;"auto"!==t&&(n="start"===t,l="end"===t);let h="middle"===t;if(n||l||h){let{colLeft:t,colMiddle:i,colRight:s}=this.getColumnBounds(e);return h?i-a/2:n?o?s:t:o?t-a:s-a}return null}isColumnOutsideViewport(e){let{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:r}=this.getColumnBounds(e),a=this.enableRtl;return{columnBeforeStart:a?t>r:i<r,columnAfterEnd:a?i<s:t>s}}getColumnBounds(e){let t=this.enableRtl,i=this.visibleColsService.getBodyContainerWidth(),s=e.getActualWidth(),r=e.getLeft(),a=t?-1:1,o=t?i-r:r;return{colLeft:o,colMiddle:o+s/2*a,colRight:o+s*a}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}},o0=class extends tk{wireBeans(e){this.animationFrameService=e.animationFrameService,this.ctrlsService=e.ctrlsService,this.pinnedWidthService=e.pinnedWidthService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnSizeService=e.columnSizeService,this.scrollVisibleService=e.scrollVisibleService,this.columnViewportService=e.columnViewportService}constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){let e=()=>{this.animationFrameService.requestAnimationFrame(()=>{this.onCenterViewportResized()})};this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleService.onCentreViewportResized(),this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnSizeService.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){let e=sh(this.gridBodyCtrl.getBodyViewportElement());if(e<=50)return;let t=this.getPinnedColumnsOverflowingViewport(e-50),i=this.gos.getCallback("processUnpinnedColumns");t.length&&(i&&(t=i({columns:t,viewportWidth:e})),this.columnModel.setColsPinned(t,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){let t=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(t<e)return[];let i=[...this.visibleColsService.getLeftCols()],s=[...this.visibleColsService.getRightCols()],r=0,a=0,o=[],n=t-0-e;for(;(a<i.length||r<s.length)&&n>0;){if(r<s.length){let e=s[r++];n-=e.getActualWidth(),o.push(e)}if(a<i.length&&n>0){let e=i[a++];n-=e.getActualWidth(),o.push(e)}}return o}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){let e=sl(this.gridBodyCtrl.getBodyViewportElement());this.bodyHeight!==e&&(this.bodyHeight=e,this.eventService.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){let e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){let e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnViewportService.setScrollPosition(e,t)}},o1=class extends tk{wireBeans(e){this.dragService=e.dragService,this.rangeService=e.rangeService}constructor(e){super(),this.eContainer=e}postConstruct(){!this.rangeService||(this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>
114{tt(this.gos)?this.enableFeature():this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),tt(this.gos)&&this.enableFeature())}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}},o2=class extends s${constructor(){super(`
115            <div class="ag-selection-checkbox" role="presentation">
116                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
117            </div>`,[rr]),this.eCheckbox=s_}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=i9(e,t),[s,r]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(s,r);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${a} (${i})`)}onClicked(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"})}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:e=>tR(e),click:e=>{tR(e);let t="filteredDescendants"===th(this.gos),i=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(i,t)?0===this.onClicked(!0,t,e||{})&&this.onClicked(!1,t,e):i?this.onClicked(!1,t,e):this.onClicked(!0,t,e||{})}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),to(this.gos)||"function"==typeof this.getIsVisible()){let e=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&eN(this.gos)}showOrHideSelect(){var e,t,i,s;let r=this.rowNode.selectable,a=this.getIsVisible();if(r)if("function"==typeof a){let e=null==(i=this.overrides)?void 0:i.callbackParams;if(this.column){let t=this.column.createColumnFunctionCallbackParams(this.rowNode);r=a({...e,...t})}else r=a({...e,node:this.rowNode,data:this.rowNode.data})}else r=null!=a&&a;let o=this.gos.get("rowSelection");if(o&&"string"!=typeof o?!(null!=(s=null==o?void 0:o.hideDisabledCheckboxes)&&s):null==(e=this.column)?void 0:e.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!r),this.setVisible(!0),this.setDisplayed(!0);return}null!=(t=this.overrides)&&t.removeHidden?this.setDisplayed(r):this.setVisible(r)}getIsVisible(){var e;if(this.overrides)return this.overrides.isVisible;let t=this.gos.get("rowSelection");return t&&"string"!=typeof t?e5(t):null==(e=this.column)||null==(e=e.getColDef())?void 0:e.checkboxSelection}},o3=class extends s${constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(sq("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",e=>{e.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){let t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);let i=()=>{try{let t=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",t),e.dataTransfer.setData("text/plain",t)}catch{}};t?t(this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e})):i()}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},o4=class extends tk{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){let e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,e=>this.cellComp.addOrRemoveCssClass(e,!0),e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.cellClassRules=t}applyUserStyles(){let e,t=this.column.getColDef();if(t.cellStyle){if("function"==typeof t.cellStyle){let i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:t,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});e=(0,t.cellStyle)(i)}else e=t.cellStyle;e&&this.cellComp.setUserStyles(e)}}applyClassesFromColDef(){let e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});
117this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!0))}destroy(){super.destroy()}},o6=class extends tk{constructor(e,t,i,s,r){super(),this.cellCtrl=e,this.beans=t,this.rowNode=s,this.rowCtrl=r}setComp(e){this.eGui=e}onKeyDown(e){let t=e.key;switch(t){case s9.ENTER:this.onEnterKeyDown(e);break;case s9.F2:this.onF2KeyDown(e);break;case s9.ESCAPE:this.onEscapeKeyDown(e);break;case s9.TAB:this.onTabKeyDown(e);break;case s9.BACKSPACE:case s9.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case s9.DOWN:case s9.UP:case s9.RIGHT:case s9.LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;let t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){let{cellCtrl:i,beans:s,rowNode:r}=this,{gos:a,rangeService:o,eventService:n}=s;if(!i.isEditing()){if(n.dispatchEvent({type:"keyShortcutChangedCellStart"}),function(e,t=!1){return e===s9.DELETE||!t&&e===s9.BACKSPACE&&sN()}(e,a.get("enableCellEditingOnBackspace"))){if(o&&tt(a))o.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){let e=i.getColumn(),t=this.beans.valueService.getDeleteValue(e,r);r.setDataValue(e,t,"cellClear")}}else i.startRowOrCellEdit(e,t);n.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){let t=e.shiftKey?s9.UP:s9.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(s9.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(s9.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;let t=e.key;" "===t?this.onSpaceKeyDown(e):this.cellCtrl.startRowOrCellEdit(t,e)&&e.preventDefault()}onSpaceKeyDown(e){let{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&eB(t)){let i=this.rowNode.isSelected(),s="filteredDescendants"===th(t),r=this.rowNode.setSelectedParams({newValue:!i,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"});void 0===i&&0===r&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"})}e.preventDefault()}destroy(){super.destroy()}},o5=class extends tk{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!tT(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}}onCellClicked(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}let{eventService:t,rangeService:i,gos:s}=this.beans,r=e.ctrlKey||e.metaKey;i&&r&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);let a=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(a);let o=this.column.getColDef();o.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{o.onCellClicked(a)})},0),(s.get("singleClickEdit")||o.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&(null==i?void 0:i.getCellRanges().length)!=0)&&this.cellCtrl.startRowOrCellEdit()}
117isDoubleClickOnIPad(){if(!sO()||tL("dblclick"))return!1;let e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){let{column:t,beans:i,cellCtrl:s}=this,{eventService:r,frameworkOverrides:a,gos:o}=i,n=t.getColDef(),l=s.createEvent(e,"cellDoubleClicked");r.dispatchEvent(l),"function"==typeof n.onCellDoubleClicked&&window.setTimeout(()=>{a.wrapOutgoing(()=>{n.onCellDoubleClicked(l)})},0),o.get("singleClickEdit")||o.get("suppressClickEdit")||s.startRowOrCellEdit(null,e)}onMouseDown(e){let{ctrlKey:t,metaKey:i,shiftKey:s}=e,r=e.target,{cellCtrl:a,beans:o}=this,{eventService:n,rangeService:l,focusService:h,gos:d}=o;if(this.isRightClickInExistingRange(e))return;let u=l&&0!=l.getCellRanges().length;if(!s||!u){let t=d.get("enableCellTextSelection")&&e.defaultPrevented,i=(sF()||t)&&!a.isEditing()&&!si(r);a.focusCell(i)}if(s&&u&&!h.isCellFocused(a.getCellPosition())){e.preventDefault();let t=h.getFocusedCell();if(t){let{column:e,rowIndex:i,rowPinned:s}=t,r=o.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:s}),a=null==r?void 0:r.getCellCtrl(e);null!=a&&a.isEditing()&&a.stopEditing(),h.setFocusedCell({column:e,rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(r)){if(l){let e=this.cellCtrl.getCellPosition();s?l.extendLatestRangeToCell(e):l.setRangeToCell(e,t||i)}n.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){let{rangeService:t}=this.beans;if(t){let i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),s=2===e.button||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0}return!1}containsWidget(e){return so(e,"ag-selection-checkbox",3)}onMouseOut(e){this.mouseStayingInsideCell(e)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),this.beans.columnHoverService.clearMouseOver())}onMouseOver(e){this.mouseStayingInsideCell(e)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),this.beans.columnHoverService.setMouseOver([this.column]))}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;let t=this.cellCtrl.getGui(),i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s}destroy(){super.destroy()}},o8=class extends tk{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){let e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){let e=this.getColSpanningList();tg(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eGui)return;let e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){let e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else{let i=this.column,s=this.column.getPinned();for(let r=0;i&&r<e&&(t.push(i),!(!(i=this.beans.visibleColsService.getColAfter(i))||eD(i))&&s===i.getPinned());r++);}return t}onLeftChanged(){if(!this.eGui)return;let e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){return(this.beans.gos.get("enableRtl")&&this.colsSpanning?tp(this.colsSpanning):this.column).getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;let t=this.beans.visibleColsService.getColsLeftWidth();return"right"===this.column.getPinned()?t+this.beans.visibleColsService.getBodyContainerWidth()+(e||0):t+(e||0)}applyRowSpan(e){if(1===this.rowSpan&&!e)return;let t=ej(this.beans.gos)*this.rowSpan;this.eGui.style.height=`${t}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},o7=((v=o7||{})[v.FILL=0]="FILL",v[v.RANGE=1]="RANGE",v),o9=((f=o9||{})[f.VALUE=0]="VALUE",f[f.DIMENSION=1]="DIMENSION",f),ne="ag-cell-range-selected",nt=class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onCellSelectionChanged()}onCellSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(ne,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(`${ne}-1`,1===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${ne}-2`,2===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${ne}-3`,3===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${ne}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),i5(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){let e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,s=!t&&e.right,r=!t&&e.bottom,a=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",i),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",r),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",a)}isSingleCell(){let{rangeService:e}=this.beans;return 1===this.rangeCount&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){let{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;let t=e.getCellRanges();return t.length>0&&t.every(e=>tS([1,0],e.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){let e,t,i=this.beans.gos.get("enableRtl"),s=!1,r=!1,a=!1,o=!1,n=this.cellCtrl.getCellPosition().column,l=this.beans.visibleColsService;i?(e=l.getColAfter(n),t=l.getColBefore(n)):(e=l.getColBefore(n),t=l.getColAfter(n));let h=this.rangeService.getCellRanges().filter(e=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),e));e||(o=!0),t||(r=!0);for(let i=0;i<h.length&&(!s||!r||!a||!o);i++){let n=h[i],l=this.rangeService.getRangeStartRow(n),d=this.rangeService.getRangeEndRow(n);!s&&this.beans.rowPositionUtils.sameRow(l,this.cellCtrl.getCellPosition())&&(s=!0),!a&&this.beans.rowPositionUtils.sameRow(d,this.cellCtrl.getCellPosition())&&(a=!0),!o&&e&&0>n.columns.indexOf(e)&&(o=!0),!r&&t&&0>n.columns.indexOf(t)&&(r=!0)}
117return{top:s,right:r,bottom:a,left:o}}refreshHandle(){if(this.beans.context.isDestroyed())return;let e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}shouldHaveSelectionHandle(){var e;let t,i=this.beans.gos,s=this.rangeService.getCellRanges(),r=s.length;if(this.rangeCount<1||r<1)return!1;let a=tp(s),o=this.cellCtrl.getCellPosition(),n=ti(i)&&!this.cellCtrl.isSuppressFillHandle(),l=void 0===(t=i.get("cellSelection"))?i.get("enableRangeHandle"):"boolean"!=typeof t&&(null==(e=t.handle)?void 0:e.mode)==="range",h=1===r&&!this.cellCtrl.isEditing()&&(n||l);if(this.hasChartRange){let e=1===s[0].type&&this.rangeService.isCellInSpecificRange(o,s[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",e),h=0===a.type}return h&&null!=a.endRow&&this.rangeService.isContiguousRange(a)&&this.rangeService.isBottomRightCell(a,o)}addSelectionHandle(){let e=tp(this.rangeService.getCellRanges()).type,t=+!(ti(this.beans.gos)&&eD(e));this.selectionHandle&&this.selectionHandle.getType()!==t&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(t)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},ni=0,ns=class e extends tk{constructor(e,t,i,s){super(),this.column=e,this.rowNode=t,this.beans=i,this.rowCtrl=s,this.cellRangeFeature=void 0,this.cellPositionFeature=void 0,this.cellCustomStyleFeature=void 0,this.tooltipFeature=void 0,this.cellMouseListenerFeature=void 0,this.cellKeyboardListenerFeature=void 0,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.onCellEditorAttachedFuncs=[],this.instanceId=e.getId()+"-"+ni++,this.colIdSanitised=ig(this.column.getId()),this.createCellPosition(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}onFocusOut(){this.beans.focusService.clearRestoreFocus()}addFeatures(){this.cellPositionFeature=new o8(this,this.beans),this.cellCustomStyleFeature=new o4(this,this.beans),this.cellMouseListenerFeature=new o5(this,this.beans,this.column),this.cellKeyboardListenerFeature=new o6(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature(),this.beans.rangeService&&tt(this.beans.gos)&&(this.cellRangeFeature=new nt(this.beans,this))}removeFeatures(){let e=this.beans.context;this.cellPositionFeature=e.destroyBean(this.cellPositionFeature),this.cellCustomStyleFeature=e.destroyBean(this.cellCustomStyleFeature),this.cellMouseListenerFeature=e.destroyBean(this.cellMouseListenerFeature),this.cellKeyboardListenerFeature=e.destroyBean(this.cellKeyboardListenerFeature),this.cellRangeFeature=e.destroyBean(this.cellRangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){let i=()=>{let e=this.column.getColDef(),t=this.rowNode.data;if(e.tooltipField&&eM(t))return tJ(t,e.tooltipField,this.column.isTooltipFieldContainsDots());let i=e.tooltipValueGetter;return i?i(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},s="whenTruncated"===this.beans.gos.get("tooltipShowMode");t||!s||this.isCellRenderer()||(t=()=>{let e=this.getGui(),t=0===e.children.length?e:e.querySelector(".ag-cell-value");return!t||t.scrollWidth>t.clientWidth});let r={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:null!=e?()=>e:i,getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:t};this.tooltipFeature=new sW(r,this.beans)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,i,s,r,a){var o,n,l,h;this.cellComp=e,this.eGui=t,this.printLayout=s,null!=a||(a=this),this.addDomData(a),this.addFeatures(),a.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasse
117s(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,a),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),null==(o=this.cellPositionFeature)||o.setComp(t),null==(n=this.cellCustomStyleFeature)||n.setComp(e),null==(l=this.tooltipFeature)||l.refreshToolTip(),null==(h=this.cellKeyboardListenerFeature)||h.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),r&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(e=>e()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(e,t){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!e)return;let i=e.parentElement,s=eH(this.beans.gos,this.rowNode).height,r=a=>{if(this.editing||!this.isAlive()||!t.isAlive())return;let{paddingTop:o,paddingBottom:n,borderBottomWidth:l,borderTopWidth:h}=sn(i),d=e.offsetHeight+(o+n+l+h);if(a<5){let t=e$(this.beans.gos),i=!t||!t.contains(e),s=0==d;if(i||s)return void window.setTimeout(()=>r(a+1),0)}let u=Math.max(d,s);this.rowNode.setRowAutoHeight(u,this.column)},a=()=>r(0);a();let o=this.beans.resizeObserverService.observeResize(e,a);t.addDestroyFunc(()=>{o(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){var e;return null!=(e=this.column.getColDef().cellAriaRole)?e:"gridcell"}isCellRenderer(){let e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){var e;return null!=(e=this.valueFormatted)?e:this.value}showValue(e=!1){var t;let i,{beans:s,column:r,rowNode:a,cellRangeFeature:o,cellComp:n}=this,{userComponentFactory:l,animationFrameService:h}=s,d=this.getValueToDisplay();if(a.stub&&(null==(t=a.groupData)?void 0:t[this.column.getId()])==null){let e=this.createCellRendererParams();i=l.getLoadingCellRendererDetails(r.getColDef(),e)}else if(this.isCellRenderer()){let e=this.createCellRendererParams();i=l.getCellRendererDetails(r.getColDef(),e)}n.setRenderDetails(i,d,e),h.requestAnimationFrame(()=>null==o?void 0:o.refreshHandle())}setupControlComps(){let e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return null==this.rowNode.rowPinned&&("function"==typeof e||!0===e)}isCheckboxSelection(e){let{rowSelection:t}=this.beans.gridOptions;return e.checkboxSelection||tU(this.column)&&t&&"string"!=typeof t&&e5(t)}refreshShouldDestroy(){let e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource),r=this.isAutoHeight!=this.column.isAutoHeight();return t||i||s||r}startEditing(e=null,t=!1,i=null){let{editService:s}=this.beans;return!this.isCellEditable()||!!this.editing||!s||(this.cellComp?s.startEditing(this,e,t,i):(this.onCellCompAttachedFuncs.push(()=>{this.startEditing(e,t,i)}),!0))}setEditing(e,t){this.editCompDetails=t,this.editing!==e&&(this.editing=e)}stopRowOrCellEdit(e=!1){"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.stopEditing(e):this.stopEditing(e)}onPopupEditorClosed(){this.editing&&this.stopEditingAndFocus()}stopEditing(e=!1){this.onCellEditorAttachedFuncs=[];let{editService:t}=this.beans;return!!this.editing&&!!t&&t.stopEditing(this,e)}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.beans.valueService.getValueForDisplay(this.column,this.rowNode),setValue:e=>this.beans.valueService.setValue(this.rowNode,this.column,e),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(e,t,i,s)=>this.registerRowDragger(e,t,s),setTooltip:(e,t)=>{var i;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),null==(i=this.tooltipFeature)||i.refreshToolTip()}})}setFocusOutOnEditor(){var e;this.editing&&(null==(e=this.beans.editService)||e.setFocusOutOnEditor(this))}setFocusInOnEditor(){var e;this.editing&&(null==(e=this.beans.editService)||e.setFocusInOnEditor(this))}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()){var t;null==(t=this.rowCtrl)||t.recreateCell(this)}else this.refreshCell(e)}refreshCell(e){var t,i,s,r,a;if(this.suppressRefreshCell||this.editing)return;let o=this.column.getColDef(),n=null!=e&&!!e.newData,l=null!=e&&!!e.suppressFlash||!!o.suppressCellFlash,h=null==o.field&&null==o.valueGetter&&null==o.showRowGroup,d=e&&e.forceRefresh||h||n,u=!!this.cellComp,c=this.updateAndFormatValue(u);if(u){if(d||c){this.showValue(n);let e=null==(s=this.beans.filterManager)?void 0:s.isSuppressFlashingCellsBecauseFiltering();!l&&!e&&(this.beans.gos.get("enableCellChangeFlash")||o.enableCellChangeFlash)&&this.flashCell(),null==(r=this.cellCustomStyleFeature)||r.applyUserStyles(),null==(a=this.cellCustomStyleFeature)||a.applyClassesFromColDef()}null==(t=this.tooltipFeature)||t.refreshToolTip(),null==(i=this.cellCustomStyleFeature)||i.applyCellClassRules()}}stopEditingAndFocus(e=!1,t=!1){var i;null==(i=this.beans.editService)||i.stopEditingAndFocus(this,e,t)}flashCell(e){var t,i;let s=null!=(t=null==e?void 0:e.flashDuration)?t:null==e?void 0:e.flashDelay,r=null!=(i=null==e?void 0:e.fadeDuration)?i:null==e?void 0:e.fadeDelay;this.animateCell("data-changed",s,r)}animateCell(e,t,i){if(!this.cellComp)return;let{gos:s}=this.beans;if(t||(t=s.get("cellFlashDuration")),0===t)return;eM(i)||(i=s.get("cellFadeDuration"));let r=`ag-cell-${e}`,a=`ag-cell-${e}-animation`;this.cellComp.addOrRemoveCssClass(r,!0),this.cellComp.addOrRemoveCssClass(a,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(r,!1),this.cellComp.addOrRemoveCssClass(a,!0),this.eGui.style.transition=`background-color ${i}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(a,!1),this.eGui.style.transition="")},i))},t)})}onFlashCells(e){if(!this.cellComp)return;let t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(e){var t;return null!=(t=this.callValueFormatter(e))?t:e}callValueFormatter(e){return this.beans.valueService.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){let t=this.value,i=this.valueFormatted;return this.value=this.beans.valueService.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i}valuesAreEqual(e,t){let i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}getComp(){return this.cellComp}getValue(){return this.value}addDomData(t){let i=this.getGui();e_(this.beans.gos,i,e.DOM_DATA_KEY_CELL_CTRL,this),t.addDestroyFunc(()=>e_(this.beans.gos,i,e.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(e,t){return this.beans.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex})}processCharacter(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.processCharacter(e)}onKeyDown(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.onKeyDown(e)}onMouseEvent(e,t){var i;null==(i=this.cellMouseListenerFeature)||i.onMouseEvent(e,t)}getGui(){return this.eGui}
117getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){var e;this.cellComp&&(null==(e=this.cellPositionFeature)||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{cellComp:e,column:t,beans:i}=this;a$(e,t,i.visibleColsService)}refreshAriaColIndex(){let e=this.beans.visibleColsService.getAriaColIndex(this.column);i2(this.getGui(),e)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){var e;return null==(e=this.cellPositionFeature)?void 0:e.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(e,t=null){return this.cellComp?"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,t):(this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(e,t)}),!0)}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onCellSelectionChanged()}isRangeSelectionEnabled(){return null!=this.cellRangeFeature}focusCell(e=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onCellSelectionChanged()}onSuppressCellFocusChanged(e){this.eGui&&sA(this.eGui,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.cellComp)return;let e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.cellComp)return;let e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}onCellFocused(e){if(this.beans.focusService.isCellFocusSuppressed())return;let t=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){t&&null!=e&&e.forceBrowserFocus&&(this.focusEventToRestore=e);return}if(this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus){let t=this.cellComp.getFocusableElement();if(this.editing){let e=this.beans.focusService.findFocusableElements(t,null,!0);e.length&&(t=e[0])}t.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}let i="fullRow"===this.beans.gos.get("editType");t||i||!this.editing||this.stopRowOrCellEdit(),t&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:ex(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);let e=!0==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}onColDefChanged(){if(this.cellComp)if(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing){var e;null==(e=this.beans.editService)||e.handleColDefChanged(this)}else this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}setWrapText(){let e=!0==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){let t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu");this.beans.eventService.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})}
117,0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],this.onCellEditorAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){let e=new o2;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){let e=new o3(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(e,t);let s=this.createRowDragComp(e,t,i);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}))}createRowDragComp(e,t,i){let s=this.beans.gos.get("pagination"),r=this.beans.gos.get("rowDragManaged"),a=eN(this.beans.gos);if(r){if(!a)return void ep("managed row dragging is only allowed in the Client Side Row Model");if(s)return void ep("managed row dragging is not possible when doing pagination")}let o=new rX(()=>this.value,this.rowNode,this.column,e,t,i);return this.beans.context.createBean(o),o}setSuppressRefreshCell(e){this.suppressRefreshCell=e}getEditCompDetails(){return this.editCompDetails}onCellEditorAttached(e){this.onCellEditorAttachedFuncs.push(e)}cellEditorAttached(){this.onCellEditorAttachedFuncs.forEach(e=>e()),this.onCellEditorAttachedFuncs=[]}};ns.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var nr=ns,na=0,no=class e extends tk{constructor(e,t,i,s,r){var a,o;super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=t,this.gos=t.gos,this.rowNode=e,this.paginationPage=null!=(a=null==(o=t.paginationService)?void 0:o.getCurrentPage())?a:0,this.useAnimationFrameForCreate=s,this.printLayout=r,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+na++,this.rowId=ig(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=t.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=ig(e)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}isSticky(){return this.rowNode.sticky}updateGui(e,t){"left"===e?this.leftGui=t:"right"===e?this.rightGui=t:"fullWidth"===e?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,s){let r={rowComp:e,element:t,containerType:i,compBean:s=iN(this,this.beans.context,s)};this.allRowGuis.push(r),this.updateGui(i,r),this.initialiseRowComp(r),"FullWidthLoading"===this.rowType||this.rowNode.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){let t=e?"none":"";this.allRowGuis.forEach(e=>e.element.style.display=t)}initialiseRowComp(t){let i=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),eB(i)&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);let s=t.rowComp;
117this.getInitialRowClasses(t.containerType).forEach(e=>s.addOrRemoveCssClass(e,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&iZ(t.element,!0==this.rowNode.expanded),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),e_(i,t.element,e.DOM_DATA_KEY_ROW_CTRL,this),t.compBean.addDestroyFunc(()=>e_(i,t.element,e.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKeySanitised&&e.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(e){this.rowId=ig(this.rowNode.id),null!=this.rowId&&e.setRowId(this.rowId)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(eC(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(eC(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){if(tt(this.gos))return void ep("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `cellSelection: true`");let t=this.beans.localeService.getLocaleTextFunc(),i=new rX(()=>`1 ${t("rowDragRow","row")}`,this.rowNode,void 0,e.element,void 0,!0),s=this.createBean(i,this.beans.context);this.rowDragComps.push(s),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(e=>e!==s),this.destroyBean(s,this.beans.context)})}setupFullWidth(e){let t=this.getPinnedForContainer(e.containerType);if("FullWidthDetail"==this.rowType&&!this.gos.assertModuleRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)"))return;let i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){var e;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>{var t;return null==e||null==(t=e.rowComp)?void 0:t.getFullWidthCellRenderer()}):[null==(e=this.fullWidthGui)||null==(e=e.rowComp)?void 0:e.getFullWidthCellRenderer()]}getCellElement(e){let t=this.getCellCtrl(e);return t?t.getGui():null}executeProcessRowPostCreateFunc(){let e=this.gos.getCallback("processRowPostCreate");e&&this.areAllContainersReady()&&e({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){let e=!!this.leftGui||!this.beans.visibleColsService.isPinningLeft(),t=!!this.centerGui,i=!!this.rightGui||!this.beans.visibleColsService.isPinningRight();return e&&t&&i}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this.rowNode})}setRowType(){let e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,s=this.beans.columnModel.isPivotMode(),r=!!this.rowNode.group&&!this.rowNode.footer&&e4(this.gos,s);e?this.rowType="FullWidthLoading":i?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":r?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){this.isFullWidth()||(e||this.gos.get("suppressAnimationFrame")||this.printLayout?this.updateColumnListsImpl(t):this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0))}createCellCtrls(e,t,i=null){let s={list:[],map:{}},r=(e,t,i)=>{null!=i?s.list.splice(i,0,t):s.list.push(t),s.map[e]=t},a=[];for(let i of t){let t=i.getInstanceId(),s=e.map[t];s||(s=new nr(i,this.rowNode,this.beans,this)),r(t,s)}for(let t of e.list){let e=t.getColumn().getInstanceId();null==s.map[e]&&(this.isCellEligibleToBeRemoved(t,i)?t.destroy():a.push([e,t]))}if(a.length)for(let[e,t]of a){let i=s.list.findIndex(e=>e.getColumn().getLeft()>t.getColumn().getLeft());r(e,t,-1===i?void 0:Math.max(i-1,0))}return s}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{let 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(){let e=this.beans.columnViewportService,t=this.beans.visibleColsService;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllCols()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let i=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);let s=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");let r=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}}isCellEligibleToBeRemoved(e,t){if(e.getColumn().getPinned()!=t)return!0;let i=e.isEditing(),s=this.beans.focusService.isCellFocused(e.getCellPosition());if(i||s){let t=e.getColumn();return!(this.beans.visibleColsService.getAllCols().indexOf(t)>=0)}return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||eG(this.gos,"print")}listenOnDomOrder(e){let t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};
117e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.isSticky()||!e)return;let t=eM(this.rowNode.oldRowTop),i=this.beans.visibleColsService.isPinningLeft(),s=this.beans.visibleColsService.isPinningRight();if(t){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.slideInAnimation.fullWidth=!0;return}this.slideInAnimation.center=!0,this.slideInAnimation.left=i,this.slideInAnimation.right=s}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=i,this.fadeInAnimation.right=s}}isEditing(){return this.editingRow}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){let e=(e,t)=>!e||e.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(e.element,t).params),t=e(this.fullWidthGui,null),i=e(this.centerGui,null),s=e(this.leftGui,"left"),r=e(this.rightGui,"right");return t&&i&&s&&r}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),expandedChanged:this.updateExpandedCss.bind(this),hasChildrenChanged:this.updateExpandedCss.bind(this)}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{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)}),this.addManagedListeners(this.beans.eventService,{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()}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{this.gos.get("rowDragEntireRow")?this.allRowGuis.forEach(e=>{this.addRowDraggerToRow(e)}):this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell())return void this.beans.rowRenderer.redrawRow(this.rowNode);if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(t=>t.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(e=>{this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",0===e),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",1===e)})}postProcessRowDragging(){let e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}updateExpandedCss(){let e=this.rowNode.isExpandable(),t=!0==this.rowNode.expanded;this.allRowGuis.forEach(i=>
117{i.rowComp.addOrRemoveCssClass("ag-row-group",e),i.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),i.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),iZ(i.element,e&&t)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:ex(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}onKeyboardNavigate(e){var t;let i=this.findFullWidthRowGui(e.target);if((i?i.element:null)!==e.target)return;let s=this.rowNode,r=this.beans.focusService.getFocusedCell(),a={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:null!=(t=null==r?void 0:r.column)?t:this.getColumnForFullWidth(i)};this.beans.navigationService.navigateToNextCell(e,e.key,a,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||tT(e))return;let t=this.allRowGuis.find(t=>t.element.contains(e.target)),i=t?t.element:null,s=i===e.target,r=eZ(this.gos),a=!1;i&&r&&(a=i.contains(r)&&r.classList.contains("ag-cell"));let o=null;s||a||(o=this.beans.focusService.findNextFocusableElement(i,!1,e.shiftKey)),(this.isFullWidth()&&s||!o)&&this.beans.navigationService.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var e;let t=null==(e=this.allRowGuis.find(e=>sC(e.element)))?void 0:e.element;return t?t.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){let t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(e=>{sA(e.element,"tabindex",t)})}onFullWidthRowFocused(e){var t;let i=this.rowNode,s=!!e&&this.isFullWidth()&&e.rowIndex===i.rowIndex&&e.rowPinned==i.rowPinned,r=this.fullWidthGui?this.fullWidthGui.element:null==(t=this.centerGui)?void 0:t.element;r&&(r.classList.toggle("ag-full-width-focus",s),s&&null!=e&&e.forceBrowserFocus&&r.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){let i={list:[],map:{}};return e.list.forEach(e=>{e!==t&&(i.list.push(e),i.map[e.getColumn().getInstanceId()]=e)}),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){return this.gos.addGridCommonParams({type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:t})}createRowEventWithSource(e,t){let i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){tT(e)||this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}getColumnForFullWidth(e){let{visibleColsService:t}=this.beans;switch(null==e?void 0:e.containerType){case"center":return t.getCenterCols()[0];case"left":return t.getLeftCols()[0];case"right":return t.getRightCols()[0];default:return t.getAllCols()[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=so(e.target,"ag-row-drag",3),!this.isFullWidth())return;let t=this.rowNode;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges();let i=this.findFullWidthRowGui(e.target),s=null==i?void 0:i.element,r=e.target,a=!0;s&&s.contains(r)&&si(r)&&(a=!1),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:this.getColumnForFullWidth(i),rowPinned:t.rowPinned,forceBrowserFocus:a})}onRowClick(e){var t;let i,s;if(tT(e)||this.lastMouseDownOnDragger)return;let{gos:r}=this;this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowClicked",e));let a=e.ctrlKey||e.metaKey,o=e.shiftKey,n=this.rowNode.isSelected(),l=td(r),h=ta(r),d=!0===(i=tr(r))||"enableSelection"===i;if(l&&this.rowNode.group||this.isRowSelectionBlocked()||!d&&!n||!h&&n)return;let u="string"==typeof(s=r.get("rowSelection"))?r.get("rowMultiSelectWithClick"):null!=(t=null==s?void 0:s.enableSelectionWithoutKeys)&&t,c="rowClicked";n?u?this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):a?h&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):d&&this.rowNode.setSelectedParams({newValue:!0,clearSelection:!o,rangeSelect:o,event:e,source:c}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!u&&!a,rangeSelect:o,event:e,source:c})}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!eB(this.gos)}setupDetailRowAutoHeight(e){if("FullWidthDetail"!==this.rowType||!this.gos.get("detailRowAutoHeight"))return;let t=()=>{let t=e.clientHeight;if(null!=t&&t>0){let e=()=>{this.rowNode.setRowHeight(t),(eN(this.gos)||eO(this.gos))&&this.beans.rowModel.onRowHeightChanged()};window.setTimeout(e,0)}},i=this.beans.resizeObserverService.observeResize(e,t);this.addDestroyFunc(i),t()}
117createFullWidthCompDetails(e,t){let{gos:i,rowNode:s}=this,r=i.addGridCommonParams({fullWidth:!0,data:s.data,node:s,value:s.key,valueFormatted:s.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,i,s)=>this.addFullWidthRowDragging(e,t,i,s),setTooltip:(e,t)=>this.refreshRowTooltip(e,t)}),a=this.beans.userComponentFactory;switch(this.rowType){case"FullWidthDetail":return a.getFullWidthDetailCellRendererDetails(r);case"FullWidthGroup":return a.getFullWidthGroupCellRendererDetails(r);case"FullWidthLoading":return a.getFullWidthLoadingCellRendererDetails(r);default:return a.getFullWidthCellRendererDetails(r)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new sW({getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>e,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:t},this.beans)))}addFullWidthRowDragging(e,t,i="",s){if(!this.isFullWidth())return;let r=new rX(()=>i,this.rowNode,void 0,e,t,s);this.createBean(r,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(r,this.beans.context)})}onUiLevelChanged(){let e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){let t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(e=>{e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(i,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getLastRow()}refreshFirstAndLastRowStyles(){let e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-row-last",t)))}stopEditing(e=!1){var t;this.stoppingRowEdit||null==(t=this.beans.rowEditService)||t.stopEditing(this,e)}setInlineEditingCss(){let e=this.editingRow||this.getAllCellCtrls().some(e=>e.isEditing());this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})}setEditingRow(e){this.editingRow=e}startRowEditing(e=null,t=null,i=null){var s,r;return!!this.editingRow||null==(s=null==(r=this.beans.rowEditService)?void 0:r.startEditing(this,e,t,i))||s}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){let e=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);e&&e.length&&e.forEach(e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,e=>e.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return"left"===e||"right"===e?e:null}getInitialRowClasses(e){let t=this.getPinnedForContainer(e),i={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2==0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(i)}processStylesFromGridOptions(){let e,t=this.gos.get("rowStyle");if(t&&"function"==typeof t)return void ep("rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");let i=this.gos.getCallback("getRowStyle");return(i&&(e=i({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex})),e||t)?Object.assign({},t,e):this.emptyStyle}onRowSelected(e){let t=!!this.rowNode.isSelected();this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-selected",t),i5(e.element,t),e.element.contains(eZ(this.gos))&&(e===this.centerGui||e===this.fullWidthGui)&&this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;let e=this.rowNode.isSelected();if(e&&!ta(this.gos))return;let t=this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${e?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(t,"rowSelection")}addHoverFunctionality(e){if(!this.active)return;let{element:t,compBean:i}=e,{rowNode:s,beans:r,gos:a}=this;i.addManagedListeners(t,{mouseenter:()=>s.onMouseEnter(),mouseleave:()=>s.onMouseLeave()}),i.addManagedListeners(s,{mouseEnter:()=>{r.dragService.isDragging()||a.get("suppressRowHoverHighlight")||(t.classList.add("ag-row-hover"),s.setHovered(!0))},mouseLeave:()=>{t.classList.remove("ag-row-hover"),s.setHovered(!1)}})}roundRowTopToBounds(e){let t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature
117().getApproximateVScollPosition();return Math.min(Math.max(this.applyPaginationOffset(t.top,!0)-100,e),this.applyPaginationOffset(t.bottom,!0)+100)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;let t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),s=eV(this.gos)?eH(this.gos,this.rowNode).height:void 0,r=s?`${Math.min(i,s)-2}px`:void 0;this.forEachGui(e,e=>{e.element.style.height=`${t}px`,r&&e.element.style.setProperty("--ag-line-height",r)})}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}destroyFirstPass(e=!1){if(this.active=!1,!e&&eQ(this.gos)&&!this.isSticky())if(null!=this.rowNode.rowTop){let e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);let t=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(t),this.beans.eventService.dispatchEvent(t),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();let e=e=>(e.list.forEach(e=>e.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){var e,t;let i=null!=(e=null==(t=this.beans.paginationService)?void 0:t.getCurrentPage())?e:0;this.paginationPage!==i&&(this.paginationPage=i,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.pageBoundsService.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&eM(e)){let t=this.applyPaginationOffset(e),i=this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t),s=`${i}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){let t;if(this.printLayout)return"";let i=this.rowNode;if(this.isSticky())t=i.stickyRowTop;else{let s=this.slideInAnimation[e]?this.roundRowTopToBounds(i.oldRowTop):i.rowTop,r=this.applyPaginationOffset(s);t=i.isRowPinned()?r:this.beans.rowContainerHeightService.getRealPixelPosition(r)}return t+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getRowNode(){return this.rowNode}getCellCtrl(e){let t=null;return this.getAllCellCtrls().forEach(i=>{i.getColumn()==e&&(t=i)}),null!=t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(t=i)}),t}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(e){var t,i;let s=this.rowNode.getRowIndexString();if(null===s)return;let r=this.beans.headerNavigationService.getHeaderRowCount()+(null!=(t=null==(i=this.beans.filterManager)?void 0:i.getHeaderRowCount())?t:0),a=this.rowNode.rowIndex%2==0,o=r+this.rowNode.rowIndex+1;this.forEachGui(e,e=>{e.rowComp.setRowIndex(s),e.rowComp.addOrRemoveCssClass("ag-row-even",a),e.rowComp.addOrRemoveCssClass("ag-row-odd",!a),i0(e.element,o)})}setStoppingRowEdit(e){this.stoppingRowEdit=e}};no.DOM_DATA_KEY_ROW_CTRL="renderedRow";var nn=no,nl=class extends tk{wireBeans(e){this.mouseEventService=e.mouseEventService,this.valueService=e.valueService,this.menuService=e.menuService,this.ctrlsService=e.ctrlsService,this.navigationService=e.navigationService,this.focusService=e.focusService,this.undoRedoService=e.undoRedoService,this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.rangeService=e.rangeService,this.clipboardService=e.clipboardService}constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){let e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",tL("touchstart")?"touchstart":"mousedown"].forEach(e
117=>{let t=this.processMouseEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||tT(t))return;let i=this.getRowForEvent(t),s=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,void 0,i,s):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!sO())return;let e=new sJ(this.element),t=e=>{let t=this.getRowForEvent(e.touchEvent),i=this.mouseEventService.getRenderedCellForEvent(e.touchEvent);this.handleContextMenuMouseEvent(void 0,e.touchEvent,t,i)};this.addManagedListeners(e,{longTap:t}),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){let e=eU(this.gos,t,nn.DOM_DATA_KEY_ROW_CTRL);if(e)return e;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,s){let r=i?i.getRowNode():null,a=s?s.getColumn():null,o=null;if(a){let i=e||t;s.dispatchCellContextMenuEvent(null!=i?i:null),o=this.valueService.getValue(a,r)}let n=this.ctrlsService.getGridBodyCtrl(),l=s?s.getGui():n.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:r,column:a,value:o,anchorToElement:l})}getControlsForEventTarget(e){return{cellCtrl:tF(this.gos,e,nr.DOM_DATA_KEY_CELL_CTRL),rowCtrl:tF(this.gos,e,nn.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){let{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);!t.defaultPrevented&&(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,i){let s=e.getRowNode(),r=e.getColumn(),a=e.isEditing();!av(this.gos,i,s,r,a)&&"keydown"===t&&(!a&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),am(i)&&e.processCharacter(i)),"keydown"===t&&this.eventService.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){let s=e.getRowNode(),r=this.focusService.getFocusedCell(),a=r&&r.column;if(!av(this.gos,i,s,a,!1)){let s=i.key;if("keydown"===t)switch(s){case s9.PAGE_HOME:case s9.PAGE_END:case s9.PAGE_UP:case s9.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case s9.UP:case s9.DOWN:e.onKeyboardNavigate(i);break;case s9.TAB:e.onTabKeyDown(i)}}"keydown"===t&&this.eventService.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!this.mouseEventService.isEventFromThisGrid(e))return;let i=function(e){let t,{keyCode:i}=e;switch(i){case 65:t=s9.A;break;case 67:t=s9.C;break;case 86:t=s9.V;break;case 68:t=s9.D;break;case 90:t=s9.Z;break;case 89:t=s9.Y;break;default:t=e.code}return t}(e);return i===s9.A?this.onCtrlAndA(e):i===s9.C?this.onCtrlAndC(e):i===s9.D?this.onCtrlAndD(e):i===s9.V?this.onCtrlAndV(e):i===s9.X?this.onCtrlAndX(e):i===s9.Y?this.onCtrlAndY():i===s9.Z?this.onCtrlAndZ(e):void 0}onCtrlAndA(e){let{pinnedRowModel:t,rowModel:i,rangeService:s}=this;if(s&&i.isRowsToRender()){let e,r,[a,o]=[t.isEmpty("top"),t.isEmpty("bottom")];o?(e=null,r=i.getRowCount()-1):(e="bottom",r=t.getPinnedBottomRowCount()-1);let n=this.visibleColsService.getAllCols();if(eE(n))return;s.setCellRange({rowStartIndex:0,rowStartPinned:a?null:"top",rowEndIndex:r,rowEndPinned:e,columnStart:n[0],columnEnd:tp(n)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);null!=t&&t.isEditing()||null!=i&&i.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);null!=t&&t.isEditing()||null!=i&&i.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);null!=t&&t.isEditing()||null!=i&&i.isEditing()||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&this.undoRedoService&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){var e;null==(e=this.undoRedoService)||e.redo("ui")}
117},nh=class extends tk{wireBeans(e){this.pinnedWidthService=e.pinnedWidthService}constructor(e){super(),this.element=e}postConstruct(){this.addManagedEventListeners({leftPinnedWidthChanged:this.onPinnedLeftWidthChanged.bind(this)})}onPinnedLeftWidthChanged(){let e=this.pinnedWidthService.getPinnedLeftWidth();ss(this.element,e>0),sM(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}},nd=class extends tk{wireBeans(e){this.pinnedWidthService=e.pinnedWidthService}constructor(e){super(),this.element=e}postConstruct(){this.addManagedEventListeners({rightPinnedWidthChanged:this.onPinnedRightWidthChanged.bind(this)})}onPinnedRightWidthChanged(){let e=this.pinnedWidthService.getPinnedRightWidth();ss(this.element,e>0),sM(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}},nu=e=>e.getTopRowCtrls(),nc=e=>e.getStickyTopRowCtrls(),np=e=>e.getStickyBottomRowCtrls(),ng=e=>e.getBottomRowCtrls(),nm=e=>e.getCentreRowCtrls(),nv={center:{type:"center",container:"ag-center-cols-container",viewport:"ag-center-cols-viewport",getRowCtrls:nm},left:{type:"left",container:"ag-pinned-left-cols-container",pinnedType:"left",getRowCtrls:nm},right:{type:"right",container:"ag-pinned-right-cols-container",pinnedType:"right",getRowCtrls:nm},fullWidth:{type:"fullWidth",container:"ag-full-width-container",fullWidth:!0,getRowCtrls:nm},topCenter:{type:"center",container:"ag-floating-top-container",viewport:"ag-floating-top-viewport",getRowCtrls:nu},topLeft:{type:"left",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:nu},topRight:{type:"right",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:nu},topFullWidth:{type:"fullWidth",container:"ag-floating-top-full-width-container",fullWidth:!0,getRowCtrls:nu},stickyTopCenter:{type:"center",container:"ag-sticky-top-container",viewport:"ag-sticky-top-viewport",getRowCtrls:nc},stickyTopLeft:{type:"left",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:nc},stickyTopRight:{type:"right",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:nc},stickyTopFullWidth:{type:"fullWidth",container:"ag-sticky-top-full-width-container",fullWidth:!0,getRowCtrls:nc},stickyBottomCenter:{type:"center",container:"ag-sticky-bottom-container",viewport:"ag-sticky-bottom-viewport",getRowCtrls:np},stickyBottomLeft:{type:"left",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:np},stickyBottomRight:{type:"right",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:np},stickyBottomFullWidth:{type:"fullWidth",container:"ag-sticky-bottom-full-width-container",fullWidth:!0,getRowCtrls:np},bottomCenter:{type:"center",container:"ag-floating-bottom-container",viewport:"ag-floating-bottom-viewport",getRowCtrls:ng},bottomLeft:{type:"left",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:ng},bottomRight:{type:"right",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:ng},bottomFullWidth:{type:"fullWidth",container:"ag-floating-bottom-full-width-container",fullWidth:!0,getRowCtrls:ng}};function nf(e){return nv[e]}var nC=["center","left","right","fullWidth"],ny=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],nw=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],nb=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],nS=["stickyTopCenter","stickyTopLeft","stickyTopRight"],nx=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],nM=[...nS,"stickyTopFullWidth",...nx,"stickyBottomFullWidth"],nD=["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right",...nS,...nx],nE=class extends tk{constructor(e){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=e,this.options=nv[e]}wireBeans(e){this.dragService=e.dragService,this.ctrlsService=e.ctrlsService,this.columnViewportService=e.columnViewportService,this.resizeObserverService=e.resizeObserverService,this.rowRenderer=e.rowRenderer}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new o0(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.ctrlsService.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}
117getViewportSizeFeature(){return this.viewportSizeFeature}setComp(e,t,i){this.comp=e,this.eContainer=t,this.eViewport=i,this.createManagedBean(new nl(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let s=()=>this.onPinnedWidthChanged();this.forContainers(nw,()=>{this.pinnedWidthFeature=this.createManagedBean(new nh(this.eContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:s})}),this.forContainers(nb,()=>{this.pinnedWidthFeature=this.createManagedBean(new nd(this.eContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:s})}),this.forContainers(nC,()=>this.createManagedBean(new oZ(this.eContainer,"center"===this.name?i:void 0))),this.forContainers(nD,()=>this.createManagedBean(new o1(this.eContainer))),this.forContainers(ny,()=>this.createManagedBean(new ob(e=>this.comp.setContainerWidth(`${e}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}addListeners(){this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),displayedRowsChanged:e=>this.onDisplayedRowsChanged(e.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(nM.indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);let e=()=>{let e=this.gos.get("ensureDomOrder"),t=eG(this.gos,"print");this.comp.setDomOrder(e||t)};this.addManagedPropertyListener("domLayout",e),e()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let e=e=>{this.dragService.isDragging()&&e.cancelable&&e.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",e))}onHorizontalViewportChanged(e=!1){let t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnViewportService.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return sh(this.eViewport)}getCenterViewportScrollLeft(){return sp(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return sf(this.eViewport)}getViewportScrollLeft(){return sp(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){var e;return this.gos.get("alwaysShowHorizontalScroll")||(e=this.eViewport).clientWidth<e.scrollWidth}getViewportElement(){return this.eViewport}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){sg(this.eViewport,e,this.enableRtl)}isContainerVisible(){return null==this.options.pinnedType||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){let t=this.options.getRowCtrls(this.rowRenderer);if(!this.visible||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});let i=eG(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||i,r=t.filter(e=>{let t=e.isFullWidth();return this.options.fullWidth?!s&&t:s||!t});this.comp.setRowCtrls({rowCtrls:r,useFlushSync:e})}},nI="ag-force-vertical-scroll",nA=class extends tk{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.animationFrameService=e.animationFrameService,this.rowContainerHeightService=e.rowContainerHeightService,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.scrollVisibleService=e.scrollVisibleService,this.menuService=e.menuService,this.headerNavigationService=e.headerNavigationService,this.dragAndDropService=e.dragAndDropService,this.pinnedRowModel=e.pinnedRowModel,this.rowRenderer=e.rowRenderer,this.popupService=e.popupService,this.mouseEventService=e.mouseEventService,this.rowModel=e.rowModel,this.filterManager=e.filterManager,this.environment=e.environment}
117getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,s,r,a,o){var n;this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=r,this.eStickyTop=a,this.eStickyBottom=o,this.eCenterColsViewport=i.querySelector(`.${nv.center.viewport}`),this.eFullWidthContainer=i.querySelector(`.${nv.fullWidth.container}`),this.eStickyTopFullWidthContainer=a.querySelector(`.${nv.stickyTopFullWidth.container}`),this.eStickyBottomFullWidthContainer=o.querySelector(`.${nv.stickyBottomFullWidth.container}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",e=>this.setCellTextSelection(e.currentValue)),this.createManagedBean(new oW(this.comp)),this.bodyScrollFeature=this.createManagedBean(new oJ(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,r,a,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),null==(n=this.filterManager)||n.setupAdvancedFilterHeaderComp(s),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){let e=this.setFloatingHeights.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.onScrollGapChanged.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.onHeaderHeightChanged.bind(this)})}addFocusListeners(e){e.forEach(e=>{this.addManagedElementListeners(e,{focusin:t=>{let{target:i}=t,s=so(i,"ag-root",e);e.classList.toggle("ag-has-focus",!s)},focusout:t=>{let{target:i,relatedTarget:s}=t,r=e.contains(s),a=so(s,"ag-root",e);so(i,"ag-root",e)||(!r||a)&&e.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e)}onScrollVisibilityChanged(){let e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();let t=e&&this.scrollVisibleService.getScrollbarWidth()||0,i=16*!!sV(),s=`calc(100% + ${t+i}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}onScrollGapChanged(){this.updateScrollingClasses()}updateScrollingClasses(){this.eGridBody.classList.toggle("ag-body-vertical-content-no-gap",!this.scrollVisibleService.hasVerticalScrollGap()),this.eGridBody.classList.toggle("ag-body-horizontal-content-no-gap",!this.scrollVisibleService.hasHorizontalScrollGap())}onGridColumnsChanged(){let e=this.columnModel.getCols();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;let e=e=>{let i=e.relatedTarget;if(null===sB(i))return void this.rowRenderer.stopEditing();let s=t.some(e=>e.contains(i))&&this.mouseEventService.isElementInThisGrid(i);if(!s){let e=this.popupService;s=e.getActivePopups().some(e=>e.contains(i))||e.isElementWithinCustomPopup(i)}s||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(t=>this.addManagedElementListeners(t,{focusout:e}))}updateRowCount(){var e,t;let i=this.headerNavigationService.getHeaderRowCount()+(null!=(e=null==(t=this.filterManager)?void 0:t.getHeaderRowCount())?e:0),s=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1;this.comp.setRowCount(-1===s?-1:i+s)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){this.comp.setPinnedTopBottomOverflowY(e?"scroll":"hidden")}isVerticalScrollShowing(){var e;let t=this.gos.get("alwaysShowVerticalScroll"),i=eG(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t?nI:null,t),t||i&&(e=this.eBodyViewport).clientHeight<e.scrollHeight}setupRowAnimationCssClass(){let e=this.environment.hasMeasuredSizes(),t=()=>{let t=e&&eQ(this.gos)&&!this.rowContainerHeightService.isStretching();this.comp.setRowAnimationCssOnBodyViewport(t?"ag-row-animation":"ag-row-no-animation",t)};t(),this.addManagedEventListeners({heightScaleChanged:t}),this.addManagedPropertyListener("animateRows",t),this.addManagedEventListeners({gridStylesChanged:()=>{!e&&this.environment.hasMeasuredSizes()&&(e=!0,t())}})}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){let e=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:e}),this.mockContextMenuForIPad(e),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){let{deltaX:t,deltaY:i,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(i))&&this.mouseEventService.isEventFromThisGrid(e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){let{deltaX:t,deltaY:i,shiftKey:s}=e,r=s||Math.abs(t)>Math.abs(i),a=e.target;r?(this.eStickyTopFullWidthContainer.contains(a)||this.eStickyBottomFullWidthContainer.contains(a))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(i))}scrollGridBodyToMatchEvent(e){let{deltaX:t,deltaY:i}
117=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();let{target:s}=e||t;(s===this.eBodyViewport||s===this.ctrlsService.get("center").getViewportElement())&&this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!sO())return;let t=new sJ(this.eBodyViewport);this.addManagedListeners(t,{longTap:t=>{e(void 0,t.touchStart,t.touchEvent)}}),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}getGui(){return this.eGridBody}scrollVertically(e){let t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new rq(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(this.rowDragFeature))}getRowDragFeature(){return this.rowDragFeature}setFloatingHeights(){let{pinnedRowModel:e}=this,t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(e){let e=this.scrollVisibleService.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){var e,t;let i=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+(null!=(e=null==(t=this.filterManager)?void 0:t.getHeaderHeight())?e:0),s=this.pinnedRowModel.getPinnedTopTotalHeight(),r=0;i>0&&(r+=i),s>0&&(r+=s),r>0&&(r+=1),this.comp.setStickyTopTop(`${r}px`)}setStickyBottomOffsetBottom(){let e=this.pinnedRowModel.getPinnedBottomTotalHeight(),t=this.scrollVisibleService.isHorizontalScrollShowing()&&this.scrollVisibleService.getScrollbarWidth()||0;this.comp.setStickyBottomBottom(`${e+t}px`)}sizeColumnsToFit(e,t){let i=this.isVerticalScrollShowing()?this.scrollVisibleService.getScrollbarWidth():0,s=sh(this.eGridBody)-i;s>0?this.columnSizeService.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1)},500):ep("tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}},nR=class extends s${constructor(e,t,i,s,r){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode(),this.rowCtrl=t.getRowCtrl(),this.eRow=s,this.cellCtrl=t;let a=document.createElement("div");a.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(a);let o=this.getGui();this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1),iV(o,t.getCellAriaRole()),o.setAttribute("col-id",t.colIdSanitised),t.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>sS(o,e),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:e=>this.includeSelection=e,setIncludeRowDrag:e=>this.includeRowDrag=e,setIncludeDndSource:e=>this.includeDndSource=e,setRenderDetails:(e,t,i)=>this.setRenderDetails(e,t,i),setEditDetails:(e,t,i)=>this.setEditDetails(e,t,i),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()},this.getGui(),this.eCellWrapper,i,r,void 0)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;
117this.firstRender=null==this.firstRender;let s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){let t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,s=i&&null==this.eCellWrapper;if(s){let e=document.createElement("div");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=e,this.getGui().appendChild(this.eCellWrapper)}let r=!i&&null!=this.eCellWrapper;r&&(sv(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);let a=!e&&i,o=a&&null==this.eCellValue;if(o){let e=document.createElement("span");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-value"),this.eCellValue=e,this.eCellWrapper.appendChild(this.eCellValue)}let n=!a&&null!=this.eCellValue;n&&(sv(this.eCellValue),this.eCellValue=void 0);let l=s||r||o||n;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,t,i){let s=this.editorVersion,r=e.newAgStackInstance();if(null==r)return;let{params:a}=e;r.then(e=>this.afterCellEditorCreated(s,e,a,t,i)),eD(this.cellEditor)&&a.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){let t=this.getParentOfValue();sm(t);let i=null!=e?ig(e,!0):null;null!=i&&(t.textContent=i)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){let{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),sv(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){let{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),sv(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh||this.cellRendererClass!==e.componentClass)return!1;let t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}createCellRendererInstance(e){let t=this.beans.gos.get("suppressAnimationFrame"),i=this.rendererVersion,{componentClass:s}=e,r=()=>{if(this.rendererVersion!==i||!this.isAlive())return;let t=e.newAgStackInstance(),r=this.afterCellRendererCreated.bind(this,i,s);t&&t.then(r)};!t&&this.firstRender?this.beans.animationFrameService.createTask(r,this.rowNode.rowIndex,"createTasksP2"):r()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion)return void this.beans.context.destroyBean(i);if(this.cellRenderer=i,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){let e=this.getParentOfValue();sm(e),e.appendChild(this.cellRendererGui)}}afterCellEditorCreated(e,t,i,s,r){if(e!==this.editorVersion)return void this.beans.context.destroyBean(t);if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){this.beans.context.destroyBean(t),this.cellCtrl.
117stopEditing(!0);return}if(!t.getGui){ep(`cellEditor for column ${this.column.getId()} is missing getGui() method`),this.beans.context.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();let a=s||void 0!==t.isPopup&&t.isPopup();a?this.addPopupCellEditor(i,r):this.addInCellEditor(),this.refreshEditStyles(!0,a),t.afterGuiAttached&&t.afterGuiAttached(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){var i;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),null==(i=this.rowCtrl)||i.setInlineEditingCss()}addInCellEditor(){let e=this.getGui();e.contains(eZ(this.beans.gos))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var i,s;"fullRow"===this.beans.gos.get("editType")&&ep("popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");let r=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(this.beans.editService.createPopupEditorWrapper(e));let a=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&a.appendChild(this.cellEditorGui);let o=this.beans.popupService,n=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),l=null!=t?t:null!=(i=null==(s=r.getPopupPosition)?void 0:s.call(r))?i:"over",h=this.beans.gos.get("enableRtl"),d={ePopup:a,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:l,alignSide:h?"right":"left",keepWithinBounds:!0},u=o.positionPopupByComponent.bind(o,d),c=this.beans.localeService.getLocaleTextFunc(),p=o.addPopup({modal:n,eChild:a,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:u,ariaLabel:c("ariaLabelCellEditor","Cell Editor")});p&&(this.hideEditorPopup=p.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){let e=this.getGui();e.contains(eZ(this.beans.gos))&&sG()&&e.focus({preventScroll:!0}),sm(this.getParentOfValue())}},nT=class extends s${constructor(e,t,i){super(),this.cellComps={},this.beans=t,this.rowCtrl=e;let s=document.createElement("div");s.setAttribute("comp-id",`${this.getCompId()}`),this.setInitialStyle(s,i),this.setTemplateFromElement(s);let r=this.getGui(),a=r.style;this.domOrder=this.rowCtrl.getDomOrder(),iV(r,"row"),e.setComp({setDomOrder:e=>this.domOrder=e,setCellCtrls:e=>this.setCellCtrls(e),showFullWidth:e=>this.showFullWidth(e),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>sS(r,e),setTop:e=>a.top=e,setTransform:e=>a.transform=e,setRowIndex:e=>r.setAttribute("row-index",e),setRowId:e=>r.setAttribute("row-id",e),setRowBusinessKey:e=>r.setAttribute("row-business-key",e),refreshFullWidth:e=>{var t,i,s;return null!=(t=null==(i=this.fullWidthCellRenderer)||null==(s=i.refresh)?void 0:s.call(i,e()))&&t}},this.getGui(),i,void 0),this.addDestroyFunc(()=>{e.unsetComp(i)})}setInitialStyle(e,t){let i=this.rowCtrl.getInitialTransform(t);if(i)e.style.setProperty("transform",i);else{let i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){let t=e=>{if(this.isAlive()){let t=e.getGui();this.getGui().appendChild(t),this.rowCtrl.setupDetailRowAutoHeight(t),this.setFullWidthRowComp(e)}else this.beans.context.destroyBean(e)},i=e.newAgStackInstance();null!=i&&i.then(t)}setCellCtrls(e){let t=Object.assign({},this.cellComps);e.forEach(e=>{let i=e.instanceId;null==this.cellComps[i]?this.newCellComp(e):t[i]=null});let i=tQ(t).filter(e=>null!=e);this.destroyCells(i),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;let t=[];e.forEach(e=>{let i=this.cellComps[e.instanceId];i&&t.push(i.getGui())}),sb(this.getGui(),t)}newCellComp(e){let t=new nR(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.instanceId]=t,this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){let e=tQ(this.cellComps).filter(e=>null!=e);this.destroyCells(e)}setFullWidthRowComp(e){this.fullWidthCellRenderer&&eg("should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}
117destroyCells(e){e.forEach(e=>{if(!e)return;let t=e.getCtrl().instanceId;this.cellComps[t]===e&&(e.detach(),e.destroy(),this.cellComps[t]=null)})}},nL=class extends s${constructor(){var e;super(),this.eViewport=s_,this.eContainer=s_,this.rowComps={},this.name=s$.elementGettingCreated.getAttribute("name"),this.options=nv[this.name],this.setTemplate("center"===(e=this.options).type?`<div class="${e.viewport}" data-ref="eViewport" role="presentation">
118                <div class="${e.container}" data-ref="eContainer" role="rowgroup"></div>
119            </div>`:`<div class="${e.container}" data-ref="eContainer" role="rowgroup"></div>`)}wireBeans(e){this.beans=e}postConstruct(){this.createManagedBean(new nE(this.name)).setComp({setHorizontalScroll:e=>this.eViewport.scrollLeft=e,setViewportHeight:e=>this.eViewport.style.height=e,setRowCtrls:({rowCtrls:e})=>this.setRowCtrls(e),setDomOrder:e=>{this.domOrder=e},setContainerWidth:e=>this.eContainer.style.width=e,setOffsetTop:e=>this.eContainer.style.transform=`translateY(${e})`},this.eContainer,this.eViewport)}destroy(){this.setRowCtrls([]),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e){let{rowComps:t,beans:i,options:s}=this,r={...t};this.rowComps={},this.lastPlacedElement=null;let a=[];for(let t of e){let e,o=t.instanceId,n=r[o];if(n)e=n,delete r[o];else{if(!t.getRowNode().displayed)continue;e=new nT(t,i,s.type)}this.rowComps[o]=e,a.push([e,!n])}this.removeOldRows(Object.values(r)),this.addRowNodes(a)}addRowNodes(e){let{domOrder:t,eContainer:i}=this;for(let[s,r]of e){let e=s.getGui();t?this.ensureDomOrder(e):r&&i.appendChild(e)}}removeOldRows(e){let{eContainer:t}=this;for(let i of e)t.removeChild(i.getGui()),i.destroy()}ensureDomOrder(e){this.domOrder&&(sw(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}},nF={selector:"AG-ROW-CONTAINER",component:nL};function nP(e){return e.map(e=>`<ag-row-container name="${e}"></ag-row-container>`).join("")}var nk=`<div class="ag-root ag-unselectable" role="treegrid">
120        <ag-header-root></ag-header-root>
121        <div class="ag-floating-top" data-ref="eTop" role="presentation">
122            ${nP(["topLeft","topCenter","topRight","topFullWidth"])}
123        </div>
124        <div class="ag-body" data-ref="eBody" role="presentation">
125            <div class="ag-body-viewport" data-ref="eBodyViewport" role="presentation">
126            ${nP(["left","center","right","fullWidth"])}
127            </div>
128            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>
129        </div>
130        <div class="ag-sticky-top" data-ref="eStickyTop" role="presentation">
131            ${nP(["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])}
132        </div>
133        <div class="ag-sticky-bottom" data-ref="eStickyBottom" role="presentation">
134            ${nP(["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])}
135        </div>
136        <div class="ag-floating-bottom" data-ref="eBottom" role="presentation">
137            ${nP(["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])}
138        </div>
139        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
140        <ag-overlay-wrapper></ag-overlay-wrapper>
141    </div>`,nN=class extends s${constructor(){super(nk,[o_,oK,oQ,oH,nF]),this.eBodyViewport=s_,this.eStickyTop=s_,this.eStickyBottom=s_,this.eTop=s_,this.eBottom=s_,this.eBody=s_}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.rangeService=e.rangeService}postConstruct(){let e=(e,t)=>{let i=`${e}px`;t.style.minHeight=i,t.style.height=i};
141this.ctrl=this.createManagedBean(new nA),this.ctrl.setComp({setRowAnimationCssOnBodyViewport:(e,t)=>this.setRowAnimationCssOnBodyViewport(e,t),setColumnCount:e=>i1(this.getGui(),e),setRowCount:e=>iJ(this.getGui(),e),setTopHeight:t=>e(t,this.eTop),setBottomHeight:t=>e(t,this.eBottom),setTopDisplay:e=>this.eTop.style.display=e,setBottomDisplay:e=>this.eBottom.style.display=e,setStickyTopHeight:e=>this.eStickyTop.style.height=e,setStickyTopTop:e=>this.eStickyTop.style.top=e,setStickyTopWidth:e=>this.eStickyTop.style.width=e,setStickyBottomHeight:e=>{this.eStickyBottom.style.height=e,this.eStickyBottom.classList.toggle("ag-hidden","0px"===e)},setStickyBottomBottom:e=>this.eStickyBottom.style.bottom=e,setStickyBottomWidth:e=>this.eStickyBottom.style.width=e,setColumnMovingCss:(e,t)=>this.addOrRemoveCssClass(e,t),updateLayoutClasses:(e,t)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(e=>{e.toggle("ag-layout-auto-height",t.autoHeight),e.toggle("ag-layout-normal",t.normal),e.toggle("ag-layout-print",t.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)},setAlwaysVerticalScrollClass:(e,t)=>this.eBodyViewport.classList.toggle(nI,t),registerBodyViewportResizeListener:e=>{let t=this.resizeObserverService.observeResize(this.eBodyViewport,e);this.addDestroyFunc(()=>t())},setPinnedTopBottomOverflowY:e=>this.eTop.style.overflowY=this.eBottom.style.overflowY=e,setCellSelectableCss:(e,t)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(i=>i.classList.toggle(e,t))},setBodyViewportWidth:e=>this.eBodyViewport.style.width=e},this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&tt(this.gos)||tl(this.gos))&&iB(this.getGui(),"multiselectable",!0)}setRowAnimationCssOnBodyViewport(e,t){let i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}},nO={selector:"AG-GRID-BODY",component:nN},nG=class extends tk{constructor(){super(...arguments),this.beanName="scrollVisibleService"}wireBeans(e){this.ctrlsService=e.ctrlsService,this.columnAnimationService=e.columnAnimationService}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)})}onDisplayedColumnsChanged(){this.updateScrollVisible()}onDisplayedColumnsWidthChanged(){this.updateScrollVisible()}onCentreViewportResized(){this.updateScrollGap()}updateScrollVisible(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){let e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;let t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){let e=this.ctrlsService.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventService.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventService.dispatchEvent({type:"scrollVisibilityChanged"}))}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}hasHorizontalScrollGap(){return this.horizontalScrollGap}hasVerticalScrollGap(){return this.verticalScrollGap}getScrollbarWidth(){if(null==this.scrollbarWidth){let e=this.gos.get("scrollbarWidth"),t="number"==typeof e&&e>=0?e:(null==q&&sz(),q);null!=t&&(this.scrollbarWidth=t,this.eventService.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},nB="__ag_grid_instance",nz=class e extends tk{constructor(){super(...arguments),this.beanName="mouseEventService",this.gridInstanceId=e.gridInstanceSequence.next()}wireBeans(e){this.ctrlsService=e.ctrlsService}stampTopLevelGridCompWithGridInstance(e){e[nB]=this.gridInstanceId}getRenderedCellForEvent(e){return tF(this.gos,e.target,nr.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){let e=t[nB];if(eM(e))return e===this.gridInstanceId;t=t.parentElement}return!1}getCellPositionForEvent(e){let t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){let t,i,s=eG(this.gos,"normal");if(null!=e.clientX||null!=e.clientY?(t=e.clientX,i=e.clientY):(t=e.x,i=e.y),s){let e=this.ctrlsService.getGridBodyCtrl(),s=e.getScrollFeature
141().getVScrollPosition();t+=e.getScrollFeature().getHScrollPosition().left,i+=s.top}return{x:t,y:i}}};nz.gridInstanceSequence=new sL;var nV=nz,nH=class extends tk{constructor(){super(),this.beanName="navigationService",this.onPageDown=ew(this.onPageDown,100),this.onPageUp=ew(this.onPageUp,100)}wireBeans(e){this.mouseEventService=e.mouseEventService,this.pageBoundsService=e.pageBoundsService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.ctrlsService=e.ctrlsService,this.rowRenderer=e.rowRenderer,this.headerNavigationService=e.headerNavigationService,this.rowPositionUtils=e.rowPositionUtils,this.cellNavigationService=e.cellNavigationService,this.pinnedRowModel=e.pinnedRowModel,this.scrollVisibleService=e.scrollVisibleService,this.rangeService=e.rangeService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){let i=e.key,s=e.altKey,r=e.ctrlKey||e.metaKey,a=!!this.rangeService&&e.shiftKey,o=this.mouseEventService.getCellPositionForEvent(e),n=!1;switch(i){case s9.PAGE_HOME:case s9.PAGE_END:r||s||(this.onHomeOrEndKey(i),n=!0);break;case s9.LEFT:case s9.RIGHT:case s9.UP:case s9.DOWN:if(!o)return!1;!r||s||a||(this.onCtrlUpDownLeftRight(i,o),n=!0);break;case s9.PAGE_DOWN:case s9.PAGE_UP:r||s||(n=this.handlePageUpDown(i,o,t))}return n&&e.preventDefault(),n}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),!!t&&(e===s9.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo(e){var t;let{scrollIndex:i,scrollType:s,scrollColumn:r,focusIndex:a,focusColumn:o}=e;eM(r)&&!r.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(r),eM(i)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(i,s),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(a),this.focusService.setFocusedCell({rowIndex:a,column:o,rowPinned:null,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell({rowIndex:a,rowPinned:null,column:o})}onPageDown(e){let t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),s=this.pageBoundsService.getPixelOffset(),r=t.top+i,a=this.rowModel.getRowIndexAtPixel(r+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,a):this.navigateToNextPage(e,a)}onPageUp(e){let t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.pageBoundsService.getPixelOffset(),s=t.top,r=this.rowModel.getRowIndexAtPixel(s+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r,!0):this.navigateToNextPage(e,r,!0)}navigateToNextPage(e,t,i=!1){let s,r=this.getViewportHeight(),a=this.pageBoundsService.getFirstRow(),o=this.pageBoundsService.getLastRow(),n=this.pageBoundsService.getPixelOffset(),l=this.rowModel.getRow(e.rowIndex),h=i?(null==l?void 0:l.rowHeight)-r-n:r-n,d=(null==l?void 0:l.rowTop)+h,u=this.rowModel.getRowIndexAtPixel(d+n);u===e.rowIndex&&(t=u=e.rowIndex+(i?-1:1)),i?(s="bottom",u<a&&(u=a),t<a&&(t=a)):(s="top",u>o&&(u=o),t>o&&(t=o)),this.isRowTallerThanView(u)&&(t=u,s="top"),this.navigateTo({scrollIndex:t,scrollType:s,scrollColumn:null,focusIndex:u,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{let s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){let i=t?-1:1,s=this.getViewportHeight(),r=this.pageBoundsService.getLastRow(),a=0,o=e.rowIndex;for(;o>=0&&o<=r;){let e=this.rowModel.getRow(o);if(e){var n;let t=null!=(n=e.rowHeight)?n:0;if(a+t>s)break;a+=t}o+=i}return Math.max(0,Math.min(o,r))}getViewportHeight(){let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),t=this.scrollVisibleService.getScrollbarWidth(),i=e.bottom-e.top;return this.ctrlsService.get("center").isHorizontalScrollShowing()&&(i-=t),i}isRowTallerThanView(e){let t=this.rowModel.getRow(e);if(!t)return!1;let i=t.rowHeight;return"number"==typeof i&&i>
141this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let i=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:s}=i,r=i.column;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:r,focusIndex:s,focusColumn:r})}onHomeOrEndKey(e){let t=e===s9.PAGE_HOME,i=this.visibleColsService.getAllCols(),s=t?i[0]:tp(i),r=t?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow();this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:s,focusIndex:r,focusColumn:s})}onTabKeyDown(e,t){let i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t);if(!1!==s)return void(s?t.preventDefault():null===s&&this.focusService.allowFocusForNextGridCoreContainer(i));if(i){let{rowIndex:i,rowPinned:s}=e.getRowPosition();(s?0===i:i===this.pageBoundsService.getFirstRow())&&(0===this.gos.get("headerHeight")||this.focusService.isHeaderFocusSuppressed()?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof nr&&e.focusCell(!0),(!i&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(i))&&t.preventDefault()}tabToNextCell(e,t){let i=this.focusService.getFocusedCell();if(!i)return!1;let s=this.getCellByPosition(i);return(!!s||!!(s=this.rowRenderer.getRowByPosition(i))&&!!s.isFullWidth())&&!!this.tabToNextCellCommon(s,e,t)}tabToNextCellCommon(e,t,i){let s,r=e.isEditing();if(!r&&e instanceof nr){let t=e.getRowCtrl();t&&(r=t.isEditing())}return null===(s=r?"fullRow"===this.gos.get("editType")?this.moveToNextEditingRow(e,t,i):this.moveToNextEditingCell(e,t,i):this.moveToNextCellNotEditing(e,t))?s:s||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,i=null){let s=e.getCellPosition();e.getGui().focus(),e.stopEditing();let r=this.findNextCellToFocusOn(s,t,!0);return!1===r?null:null!=r&&(r.startEditing(null,!0,i),r.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){let s=e.getCellPosition(),r=this.findNextCellToFocusOn(s,t,!0);if(!1===r)return null;if(null==r)return!1;let a=r.getCellPosition(),o=this.isCellEditable(s),n=this.isCellEditable(a),l=a&&s.rowIndex===a.rowIndex&&s.rowPinned===a.rowPinned;return o&&e.setFocusOutOnEditor(),l||(e.getRowCtrl().stopEditing(),r.getRowCtrl().startRowEditing(void 0,void 0,i)),n?(r.setFocusInOnEditor(),r.focusCell()):r.focusCell(!0),!0}moveToNextCellNotEditing(e,t){let i,s=this.visibleColsService.getAllCols();i=e instanceof nn?{...e.getRowPosition(),column:t?s[0]:tp(s)}:e.getCellPosition();let r=this.findNextCellToFocusOn(i,t,!1);if(!1===r)return null;if(r instanceof nr)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r.getRowPosition(),t);return eM(r)}findNextCellToFocusOn(e,t,i){let s=e;for(;;){var r;e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextTabbedCell(s,t);let a=this.gos.getCallback("tabToNextCell");if(eM(a)){let r=a({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(!0===r||null===r)null===r&&ep("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),s=e;else{if(!1===r)return!1;s={rowIndex:r.rowIndex,column:r.column,rowPinned:r.rowPinned}}}if(!s)return null;if(s.rowIndex<0){let e=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:e+s.rowIndex,column:s.column},fromCell:!0}),null}let o="fullRow"===this.gos.get("editType");if(i&&!o&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);let n=this.getCellByPosition(s);if(!n){let e=this.rowRenderer.getRowByPosition(s);if(!e||!e.isFullWidth()||i)continue;return e}if(!n.isSuppressNavigable())return null==(r=this.rangeService)||r.setRangeToCell(s),n}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}getCellByPosition(e){let t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.rowModel.getRow(e.rowIndex)}navigateToNextCell(e,t,i,s){let r=i,a=!1;for(;r&&(r===i||!this.isValidNavigateCell(r));)this.gos.get("enableRtl")?t===s9.LEFT&&(r=this.getLastCellOfColSpan(r)):t===s9.RIGHT&&(r=this.getLastCellOfColSpan(r)),a=eD(r=this.cellNavigationService.getNextCellToFocus(t,r));if(a&&e&&e.key===s9.UP&&(r={rowIndex:-1,rowPinned:null,column:i.column}),s){let s=this.gos.getCallback("navigateToNextCell");if(eM(s)){let a=s({key:t,previousCellPosition:i,nextCellPosition:r||null,event:e});r=eM(a)?{rowPinned:a.rowPinned,rowIndex:a.rowIndex,column:a.column}:null}}if(!r)return;if(r.rowIndex<0){let t=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:t+r.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}let o=this.getNormalisedPosition(r);o?this.focusPosition(o):this.tryToFocusFullWidthRow(r)}
141getNormalisedPosition(e){this.ensureCellVisible(e);let t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){let i=this.visibleColsService.getAllCols(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;let r=this.focusService.getFocusedCell(),a={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?tp(i):i[0])};this.focusPosition(a);let o=null==t?null!=r&&this.rowPositionUtils.before(a,r):t;return this.eventService.dispatchEvent({type:"fullWidthRowFocused",rowIndex:a.rowIndex,rowPinned:a.rowPinned,column:a.column,isFullWidthCell:!0,fromBelow:o}),!0}focusPosition(e){var t;this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){let t=this.getCellByPosition(e);if(!t)return e;let i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:tp(i),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=eX(this.gos),i=this.rowModel.getRow(e.rowIndex);!(t&&(null==i?void 0:i.sticky))&&eD(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}},nj=class extends tk{constructor(){super(...arguments),this.beanName="horizontalResizeService"}wireBeans(e){this.dragService=e.dragService,this.ctrlsService=e.ctrlsService}addResizeBar(e){let 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};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();let i=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(i)}setResizeIcons(){let e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},nW=class extends tk{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.menuService=e.menuService}hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,s=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:s})},i,t.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,t,i){let s=-1,r="left",a=this.menuService.isLegacyMenuEnabled();!a&&this.gos.get("enableRtl")&&(s=1,r="right");let o=a?void 0:4*s,n=a?void 0:4;this.showPopup(e,s=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:s,nudgeX:o,nudgeY:n,alignSide:r,keepWithinBounds:!0,position:"under",column:e})},i,t,a)}showPopup(e,t,i,s,r){let a,o=e?this.createBean(new r5(e,"COLUMN_MENU")):void 0;if(this.activeMenu=o,!(null!=o&&o.hasFilter())||!e)throw Error("AG Grid - unable to show popup filter, filter instantiation failed");let n=document.createElement("div");iV(n,"presentation"),n.classList.add("ag-menu"),r||n.classList.add("ag-filter-menu"),[this.tabListener]=this.addManagedElementListeners(n,{keydown:e=>this.trapFocusWithin(e,n)}),n.appendChild(null==o?void 0:o.getGui());let l=this.menuService.isColumnMenuAnchoringEnabled()?null!=s?s:this.ctrlsService.getGridBodyCtrl().getGui():void 0,h=t=>{e.setMenuVisible(!1,"contextMenu");let r=t instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),r&&s&&sC(s)){let e=this.focusService.findTabbableParent(s);e&&e.focus()}null==o||o.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},d=this.localeService.getLocaleTextFunc(),u=r&&"columnFilter"!==i?d("ariaLabelColumnMenu","Column Menu"):d("ariaLabelColumnFilter","Column Filter"),c=this.popupService.addPopup({modal:!0,e
141Child:n,closeOnEsc:!0,closedCallback:h,positionCallback:()=>t(n),anchorToElement:l,ariaLabel:u});c&&(this.hidePopup=a=c.hideFunc),o.afterInit().then(()=>{t(n),o.afterGuiAttached({container:i,hidePopup:a})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==s9.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:null!=i?i:null,columnGroup:null})}isMenuEnabled(e){var t;return e.isFilterAllowed()&&(null!=(t=e.getColDef().menuTabs)?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},nU=class extends tk{constructor(){super(...arguments),this.beanName="resizeObserverService"}observeResize(e,t){let i=eY(this.gos).ResizeObserver,s=i?new i(t):null;return null==s||s.observe(e),()=>null==s?void 0:s.disconnect()}},n_=class extends tk{constructor(){super(...arguments),this.beanName="animationFrameService",this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}wireBeans(e){this.ctrlsService=e.ctrlsService,this.paginationService=e.paginationService}setScrollTop(e){let t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){var i,s;let e=null!=(i=null==(s=this.paginationService)?void 0:s.getCurrentPage())?i:0;e!==this.lastPage&&(this.lastPage=e,this.scrollGoingDown=!0)}this.lastScrollTop=e}postConstruct(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){!1===this.useAnimationFrame&&ep(`AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,i){this.verifyAnimationFrameOn(i);let s={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],s),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;let t=this.scrollGoingDown?1:-1;e.list.sort((e,i)=>e.index!==i.index?t*(i.index-e.index):i.createOrder-e.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");let t=this.createTasksP1,i=t.list,s=this.createTasksP2,r=s.list,a=this.destroyTasks,o=(new Date).getTime(),n=(new Date).getTime()-o,l=e<=0,h=this.ctrlsService.getGridBodyCtrl();for(;l||n<e;){if(!h.getScrollFeature().scrollGridIfNeeded()){let e;if(i.length)this.sortTaskList(t),e=i.pop().task;else if(r.length)this.sortTaskList(s),e=r.pop().task;else if(a.length)e=a.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(e)||e()}n=(new Date).getTime()-o}i.length||r.length||a.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){let e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){let t=eY(this.gos);t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{this.isOn()?t||(t=!0,this.addDestroyTask(()=>{t=!1,e()})):window.setTimeout(e,0)}}},n$=((C=n$||{}).EVERYTHING="group",C.FILTER="filter",C.SORT="sort",C.MAP="map",C.AGGREGATE="aggregate",C.FILTER_AGGREGATES="filter_aggregates",C.PIVOT="pivot",C.NOTHING="nothing",C),nY=class extends tk{constructor(){super(...arguments),this.beanName="expansionService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.isClientSideRowModel=eN(this.gos)}expandRows(e){if(!this.isClientSideRowModel)return;let t=new Set(e);this.rowModel.forEachNode(e=>{e.id&&t.has(e.id)&&(e.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){let e=[];return this.rowModel.forEachNode(({expanded:t,id:i}
141)=>{t&&i&&e.push(i)}),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,t,i,s){e&&(i&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,i,s),e.setExpanded(t,void 0,s))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}},nK=class extends tk{constructor(){super(...arguments),this.beanName="menuService"}wireBeans(e){this.valueService=e.valueService,this.filterMenuFactory=e.filterMenuFactory,this.ctrlsService=e.ctrlsService,this.animationFrameService=e.animationFrameService,this.filterManager=e.filterManager,this.rowRenderer=e.rowRenderer,this.columnChooserFactory=e.columnChooserFactory,this.contextMenuFactory=e.contextMenuFactory,this.enterpriseMenuFactory=e.enterpriseMenuFactory}postConstruct(){var e;this.activeMenuFactory=null!=(e=this.enterpriseMenuFactory)?e:this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){let t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i)}getContextMenuPosition(e,t){let i=this.getRowCtrl(e),s=this.getCellGui(i,t);if(!s)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};let r=s.getBoundingClientRect();return{x:r.x+r.width/2,y:r.y+r.height/2}}showContextMenu(e){var t,i,s;let r=e.rowNode,a=e.column,{anchorToElement:o,value:n}=e;r&&a&&null==n&&(n=this.valueService.getValueForDisplay(a,r)),null==o&&(o=this.getContextMenuAnchorElement(r,a)),null==(t=this.contextMenuFactory)||t.onContextMenu(null!=(i=e.mouseEvent)?i:null,null!=(s=e.touchEvent)?s:null,null!=r?r:null,null!=a?a:null,n,o)}showColumnChooser(e){var t;null==(t=this.columnChooserFactory)||t.showColumnChooser(e)}hidePopupMenu(){var e;null==(e=this.contextMenuFactory)||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){var e;null==(e=this.columnChooserFactory)||e.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){let{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(null!=i?i:t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){var t;return!e.getColDef().suppressHeaderFilterButton&&!!(null!=(t=this.filterManager)&&t.isFilterAllowed(e))}isHeaderContextMenuEnabled(e){let t=e&&t3(e)?e.getColDef():null==e?void 0:e.getColGroupDef();return!(null!=t&&t.suppressHeaderContextMenu)&&"new"===this.getColumnMenuType()}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(sO()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!(null!=(t=this.filterManager)&&t.isFilterAllowed(e))&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return"new"===this.getColumnMenuType()}isLegacyMenuEnabled(){return"legacy"===this.getColumnMenuType()}isFloatingFilterButtonEnabled(e){var t;let i=e.getColDef(),s=null==(t=i.floatingFilterComponentParams)?void 0:t.suppressFilterButton;return null!=s&&ep("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==i.suppressFloatingFilterButton?!s:!i.suppressFloatingFilterButton}getColumnMenuType(){return this.gos.get("columnMenu")}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){let e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()?!!this.gos.exists("suppressMenuHide")&&e:e}showColumnMenuCommon(e,t,i,s){let{positionBy:r}=t,a=t.column;if("button"===r){let{buttonElement:r}=t;e.showMenuAfterButtonClick(a,r,i,s)}else if("mouse"===r){let{mouseEvent:r}=t;e.showMenuAfterMouseEvent(a,r,i,s)}
141else a&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(a,"auto"),this.animationFrameService.requestAnimationFrame(()=>{var t;let r=null==(t=this.ctrlsService.getHeaderRowContainerCtrl(a.getPinned()))?void 0:t.getHeaderCtrlForColumn(a);r&&e.showMenuAfterButtonClick(a,r.getAnchorElementForMenu(s),i,!0)}))}getRowCtrl(e){let{rowIndex:t,rowPinned:i}=e||{};if(null!=t)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0}getCellGui(e,t){if(!e||!t)return;let i=e.getCellCtrl(t);return(null==i?void 0:i.getGui())||void 0}getContextMenuAnchorElement(e,t){let i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),s=this.getRowCtrl(e);if(!s)return i;let r=this.getCellGui(s,t);return r||(s.isFullWidth()?s.getFullWidthElement():i)}},nZ=class extends ri{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){let 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}},nq={selector:"AG-INPUT-TEXT-AREA",component:nZ},nQ=class extends ru{constructor(){super(`<div class="ag-large-text">
142        <ag-input-text-area data-ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
143        </div>`,[nq]),this.eTextArea=s_}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),eM(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){let t=e.key;(t===s9.LEFT||t===s9.UP||t===s9.RIGHT||t===s9.DOWN||e.shiftKey&&t===s9.ENTER)&&e.stopPropagation()}afterGuiAttached(){let e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){let e=this.eTextArea.getValue();return eM(e)||eM(this.params.value)?this.params.parseValue(e):this.params.value}},nX=class extends ru{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){e_(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params,i=e=>{av(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)};this.addManagedElementListeners(e,{keydown:i})}},nJ=class extends ru{constructor(){super(`<div class="ag-cell-edit-wrapper">
144                <ag-select class="ag-cell-editor" data-ref="eSelect"></ag-select>
145            </div>`,[au]),this.eSelect=s_,this.startedByEnter=!1}wireBeans(e){this.valueService=e.valueService}init(e){this.focusAfterAttached=e.cellStartedEdit;let{eSelect:t,valueService:i,gos:s}=this,{values:r,value:a,eventKey:o}=e;if(eD(r))return void ep("no values found for select cellEditor");this.startedByEnter=null!=o&&o===s9.ENTER;let n=!1;r.forEach(s=>{let r={value:s},o=i.formatValue(e.column,null,s);r.text=null!=o?o:s,t.addOption(r),n=n||a===s}),n?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:l,valueListMaxWidth:h,valueListMaxHeight:d}=e;null!=l&&t.setPickerGap(l),null!=d&&t.setPickerMaxHeight(d),null!=h&&t.setPickerMaxWidth(h),"fullRow"!==s.get("editType")&&this.addManagedListeners(this.eSelect,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}},n0=class extends ru{constructor(e){super(`
146            <div class="ag-cell-edit-wrapper">
147                ${e.getTemplate()}
148            </div>`,e.getAgComponents()),this.cellEditorInput=e,this.eInput=s_}init(e){let t;this.params=e;let{cellStartedEdit:i,eventKey:s,suppressPreventDefault:r}=e,a=this.eInput;this.cellEditorInput.init(a,e);let o=!0;i?(this.focusAfterAttached=!0,s===s9.BACKSPACE||s===s9.DELETE?t="":s&&1===s.length?r?o=!1:t=s:(t=this.cellEditorInput.getStartValue(),s!==s9.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,t=this.cellEditorInput.getStartValue()),o&&null!=t&&a.setStartValue(t),this.addManagedElementListeners(a.getGui(),{keydown:e=>{let{key:t}=e;(t===s9.PAGE_UP||t===s9.PAGE_DOWN)&&e.preventDefault()}})}afterGuiAttached(){let e=this.localeService.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;sF()||t.getFocusableElement().focus();let i=t.getInputElement();if(this.highlightAllOnFocus)i.select();else{var s,r;null==(s=(r=this.cellEditorInput).setCaret)||s.call(r)}}focusIn(){let e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}},n1=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" data-ref="eInput"></ag-input-text-field>'}getAgComponents(){return[aC]}init(e,t){this.eInput=e,this.params=t,null!=t.maxLength&&e.setMaxLength(t.maxLength)}getValue(){let e=this.eInput.getValue();return eM(e)||eM(this.params.value)?this.params.parseValue(e):this.params.value}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){let e=this.eInput.getValue(),t=eM(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},n2=class extends n0{constructor(){super(new n1)}},n3=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" data-ref="eInput"></ag-input-number-field>'}getAgComponents(){return[aw]}init(e,t){this.eInput=e,this.params=t,null!=t.max&&e.setMax(t.max),null!=t.min&&e.setMin(t.min),null!=t.precision&&e.setPrecision(t.precision),null!=t.step&&e.setStep(t.step);let i=e.getInputElement();t.preventStepping?e.addManagedElementListeners(i,{keydown:this.preventStepping}):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===s9.UP||e.key===s9.DOWN)&&e.preventDefault()}getValue(){let e=this.eInput.getValue();if(!eM(e)&&!eM(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(null==t)return t;if("string"==typeof t){if(""===t)return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}setCaret(){sF()&&this.eInput.getInputElement().focus({preventScroll:!0})}},n4=class extends n0{constructor(){super(new n3)}},n6=class extends af{constructor(e){super(e,"ag-date-field","date")}
148postConstruct(){super.postConstruct();let e=sF();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){eZ(this.gos)===this.eInput&&e.preventDefault()}setMin(e){var t;let i=e instanceof Date?null!=(t=aN(null!=e?e:null,!1))?t:void 0:e;return this.min===i||(this.min=i,sA(this.eInput,"min",i)),this}setMax(e){var t;let i=e instanceof Date?null!=(t=aN(null!=e?e:null,!1))?t:void 0:e;return this.max===i||(this.max=i,sA(this.eInput,"max",i)),this}setStep(e){return this.step===e||(this.step=e,sA(this.eInput,"step",e)),this}getDate(){var e;if(this.eInput.validity.valid)return null!=(e=aB(this.getValue()))?e:void 0}setDate(e,t){this.setValue(aN(null!=e?e:null,!1),t)}},n5={selector:"AG-INPUT-DATE-FIELD",component:n6},n8=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[n5]}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){let e=this.eInput.getDate();return eM(e)||eM(this.params.value)?null!=e?e:null:this.params.value}getStartValue(){let{value:e}=this.params;if(e instanceof Date)return aN(e,!1)}},n7=class extends n0{constructor(){super(new n8)}},n9=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[n5]}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){let e=this.formatDate(this.eInput.getDate());return eM(e)||eM(this.params.value)?this.params.parseValue(null!=e?e:""):this.params.value}getStartValue(){var e,t;return aN(null!=(e=this.parseDate(null!=(t=this.params.value)?t:void 0))?e:null,!1)}parseDate(e){var t;let i=this.getDataTypeService();return i?i.getDateParserFunction(this.params.column)(e):null!=(t=aB(e))?t:void 0}formatDate(e){var t;let i=this.getDataTypeService();return i?i.getDateFormatterFunction(this.params.column)(e):null!=(t=aN(null!=e?e:null,!1))?t:void 0}},le=class extends n0{wireBeans(e){this.dataTypeService=e.dataTypeService}constructor(){super(new n9(()=>this.dataTypeService))}},lt=class extends ru{constructor(){super(`
149            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
150                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
151            </div>`,[rr]),this.eCheckbox=s_}init(e){var t;this.params=e;let i=null!=(t=e.value)?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListeners(this.eCheckbox,{fieldValueChanged:e=>this.setAriaLabel(e.selected)})}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){let t=this.localeService.getLocaleTextFunc(),i=i9(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}},li=class{constructor(e){this.cellValueChanges=e}},ls=class extends li{constructor(e,t,i,s){super(e),this.initialRange=t,this.finalRange=i,this.ranges=s}},lr=class{constructor(e){this.actionStack=[],this.maxStackSize=e||10,this.actionStack=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}},la=class extends tk{constructor(){super(...arguments),this.beanName="undoRedoService",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=null!==this.activeCellEdit&&this.cellPositionUtils.equals(this.activeCellEdit,t),s=null!==this.activeRowEdit&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||s||this.isPasting||this.isRangeInAction))return;let{rowPinned:r,rowIndex:a,column:o,oldValue:n,value:l}=e,h={rowPinned:r,rowIndex:a,columnId:o.getColId(),newValue:l,oldValue:n};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}wireBeans(e){this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.columnModel=e.columnModel,this.rangeService=e.rangeService}postConstruct(){if(!this.gos.get("undoRedoCellEditing"))return;let e=this.gos.get("undoRedoCellEditingLimit");if(e<=0)return;this.undoStack=new lr(e),this.redoStack=new lr(e),this.addListeners();let t=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:e=>{e.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:t,newColumnsLoaded:t,columnGroupOpened:t,columnRowGroupChanged:t,columnMoved:t,columnPinned:t,columnVisible:t,rowDragEnd:t}),this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){this.eventService.dispatchEvent({type:"undoStarted",source:e});let t=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo");this.eventService.dispatchEvent({type:"undoEnded",source:e,operationPerformed:t})}redo(e){this.eventService.dispatchEvent({type:"redoStarted",source:e});let t=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo");this.eventService.dispatchEvent({type:"redoEnded",source:e,operationPerformed:t})}undoRedo(e,t,i,s,r){if(!e)return!1;let a=e.pop();return!!a&&!!a.cellValueChanges&&(this.processAction(a,e=>e[s],r),a instanceof ls?this.processRange(this.rangeService,a.ranges||[a[i]]):this.processCell(a.cellV
151alueChanges),t.push(a),!0)}processAction(e,t,i){e.cellValueChanges.forEach(e=>{let{rowIndex:s,rowPinned:r,columnId:a}=e,o=this.rowPositionUtils.getRowNode({rowIndex:s,rowPinned:r});o.displayed&&o.setDataValue(a,t(e),i)})}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((s,r)=>{if(!s)return;let a=s.startRow,o=s.endRow;r===t.length-1&&(i={rowPinned:a.rowPinned,rowIndex:a.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(i));let n={rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:s.startColumn,columns:s.columns};e.addCellRange(n)})}processCell(e){let t=e[0],{rowIndex:i,rowPinned:s}=t,r=this.rowPositionUtils.getRowNode({rowIndex:i,rowPinned:s}),a={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(a,this.rangeService)}setLastFocusedCell(e,t){let{rowIndex:i,columnId:s,rowPinned:r}=e,a=this.gridBodyCtrl.getScrollFeature(),o=this.columnModel.getCol(s);if(!o)return;a.ensureIndexVisible(i),a.ensureColumnVisible(o);let n={rowIndex:i,column:o,rowPinned:r};this.focusService.setFocusedCell({...n,forceBrowserFocus:!0}),null==t||t.setRangeToCell(n)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new li(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){let e=new li(this.cellValueChanges);this.pushActionsToUndoStack(e)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new li(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new ls(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;e=this.rangeService&&tt(this.gos)?new ls(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):new li(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1}})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};function lo(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function ln(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}var ll=class extends tk{constructor(){super(...arguments),this.beanName="editService"}wireBeans(e){this.navigationService=e.navigationService,this.userComponentFactory=e.userComponentFactory,this.valueService=e.valueService}startEditing(e,t=null,i=!1,s=null){var r;let a=this.createCellEditorParams(e,t,i),o=e.getColumn().getColDef(),n=this.userComponentFactory.getCellEditorDetails(o,a),l=(null==n?void 0:n.popupFromSelector)!=null?n.popupFromSelector:!!o.cellEditorPopup,h=(null==n?void 0:n.popupPositionFromSelector)!=null?n.popupPositionFromSelector:o.cellEditorPopupPosition;return e.setEditing(!0,n),e.getComp().setEditDetails(n,l,h,this.gos.get("reactiveCustomComponents")),this.eventService.dispatchEvent(e.createEvent(s,"cellEditingStarted")),!(null!=n&&null!=(r=n.params)&&r.suppressPreventDefault)}stopEditing(e,t){let i=e.getComp(),{newValue:s,newValueExists:r}=this.takeValueFromCellEditor(t,i),a=e.getRowNode(),o=e.getColumn(),n=this.valueService.getValueForDisplay(o,a),l=!1;return r&&(l=this.saveNewValue(e,n,s,a,o)),e.setEditing(!1,void 0),i.setEditDetails(),e.updateAndFormatValue(!1),e.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.eventService.dispatchEvent({...e.createEvent(null,"cellEditingStopped"),oldValue:n,newValue:s,valueChanged:l}),l}handleColDefChanged(e){let t=e.getCellEditor();if(null!=t&&t.refresh){let{eventKey:i,cellStartedEdit:s}
151=e.getEditCompDetails().params,r=this.createCellEditorParams(e,i,s),a=e.getColumn().getColDef(),o=this.userComponentFactory.getCellEditorDetails(a,r);t.refresh(o.params)}}setFocusOutOnEditor(e){let t=e.getComp().getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(e){let t=e.getComp(),i=t.getCellEditor();null!=i&&i.focusIn?i.focusIn():(e.focusCell(!0),e.onCellEditorAttached(()=>{var e,i;return null==(e=t.getCellEditor())||null==(i=e.focusIn)?void 0:i.call(e)}))}stopEditingAndFocus(e,t=!1,i=!1){e.stopRowOrCellEdit(),e.focusCell(!0),t||this.navigateAfterEdit(i,e.getCellPosition())}createPopupEditorWrapper(e){return new nX(e)}takeValueFromCellEditor(e,t){let i={newValueExists:!1};if(e)return i;let s=t.getCellEditor();return!s||s.isCancelAfterEnd&&s.isCancelAfterEnd()?i:{newValue:s.getValue(),newValueExists:!0}}saveNewValue(e,t,i,s,r){if(i===t)return!1;e.setSuppressRefreshCell(!0);let a=s.setDataValue(r,i,"edit");return e.setSuppressRefreshCell(!1),a}createCellEditorParams(e,t,i){let s=e.getColumn(),r=e.getRowNode();return this.gos.addGridCommonParams({value:this.valueService.getValueForDisplay(s,r),eventKey:t,column:s,colDef:s.getColDef(),rowIndex:e.getCellPosition().rowIndex,node:r,data:r.data,cellStartedEdit:i,onKeyDown:e.onKeyDown.bind(e),stopEditing:e.stopEditingAndFocus.bind(e),eGridCell:e.getGui(),parseValue:t=>this.valueService.parseValue(s,r,t,e.getValue()),formatValue:e.formatValue.bind(e)})}navigateAfterEdit(e,t){if(this.gos.get("enterNavigatesVerticallyAfterEdit")){let i=e?s9.UP:s9.DOWN;this.navigationService.navigateToNextCell(null,i,t,!1)}}},lh=class extends tk{constructor(){super(...arguments),this.beanName="rowEditService"}startEditing(e,t=null,i=null,s=null){let r=!0;return e.getAllCellCtrls().reduce((e,a)=>{let o=a===i;return o?r=a.startEditing(t,o,s):a.startEditing(null,o,s),!!e||a.isEditing()},!1)&&this.setEditing(e,!0),r}stopEditing(e,t=!1){let i=e.getAllCellCtrls(),s=e.isEditing();e.setStoppingRowEdit(!0);let r=!1;for(let e of i){let i=e.stopEditing(t);s&&!t&&!r&&i&&(r=!0)}r&&this.eventService.dispatchEvent(e.createRowEvent("rowValueChanged")),s&&this.setEditing(e,!1),e.setStoppingRowEdit(!1)}setEditing(e,t){e.setEditingRow(t),e.forEachGui(void 0,e=>e.rowComp.addOrRemoveCssClass("ag-row-editing",t));let i=t?e.createRowEvent("rowEditingStarted"):e.createRowEvent("rowEditingStopped");this.eventService.dispatchEvent(i)}},ld={version:a0,moduleName:"@ag-grid-community/edit-core",beans:[ll]},lu={version:a0,moduleName:"@ag-grid-community/default-editor",userComponents:[{name:"agCellEditor",classImp:n2}],dependantModules:[ld]},lc={version:a0,moduleName:"@ag-grid-community/all-editors",dependantModules:[lu,{version:a0,moduleName:"@ag-grid-community/data-type-editors",userComponents:[{name:"agTextCellEditor",classImp:n2},{name:"agNumberCellEditor",classImp:n4,params:{suppressPreventDefault:!0}},{name:"agDateCellEditor",classImp:n7},{name:"agDateStringCellEditor",classImp:le},{name:"agCheckboxCellEditor",classImp:lt}],dependantModules:[lu]},{version:a0,moduleName:"@ag-grid-community/select-editor",userComponents:[{name:"agSelectCellEditor",classImp:nJ}],dependantModules:[ld]},{version:a0,moduleName:"@ag-grid-community/large-text-editor",userComponents:[{name:"agLargeTextCellEditor",classImp:nQ}],dependantModules:[ld]}]},lp=class extends tk{constructor(){super(...arguments),this.beanName="autoWidthCalculator"}wireBeans(e){this.rowRenderer=e.rowRenderer,this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){let i=this.getHeaderCellForColumn(e);if(!i)return -1;let s=this.rowRenderer.getAllCellsForColumn(e);return t||s.push(i),this.addElementsToContainerAndGetWidth(s)}getPreferredWidthForColumnGroup(e){let t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){let t=document.createElement("form");t.style.position="fixed";let i=this.centerRowContainerCtrl.getContainerElement();e.forEach(e=>this.cloneItemIntoDummy(e,t)),i.appendChild(t);let s=t.offsetWidth;return i.removeChild(t),s+this.getAutoSizePadding()}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let t=null;
151return this.ctrlsService.getHeaderRowContainerCtrls().forEach(i=>{let s=i.getHtmlElementForColumnHeader(e);null!=s&&(t=s)}),t}cloneItemIntoDummy(e,t){let i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";let s=document.createElement("div"),r=s.classList;["ag-header-cell","ag-header-group-cell"].some(e=>i.classList.contains(e))?(r.add("ag-header","ag-header-row"),s.style.position="static"):r.add("ag-row");let a=e.parentElement;for(;a;){if(["ag-header-row","ag-row"].some(e=>a.classList.contains(e))){for(let e=0;e<a.classList.length;e++){let t=a.classList[e];"ag-row-position-absolute"!=t&&r.add(t)}break}a=a.parentElement}s.appendChild(i),t.appendChild(s)}},lg=class extends tk{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}wireBeans(e){this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer,this.ctrlsService=e.ctrlsService,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.isClientSide=eN(this.gos),this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl}),this.resetStickyContainers()}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}setOffsetTop(e){this.extraTopHeight!==e&&(this.extraTopHeight=e,this.eventService.dispatchEvent({type:"stickyTopOffsetChanged",offset:e}))}setOffsetBottom(e){this.extraBottomHeight!==e&&(this.extraBottomHeight=e)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getExtraTopHeight(){return this.extraTopHeight}getExtraBottomHeight(){return this.extraBottomHeight}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){if(this.isClientSide)throw Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){var t,i,s,r,a,o;let n=null==(t=e.childStore)?void 0:t.getStoreBounds();return e.footer&&(n=null==(o=e.sibling.childStore)?void 0:o.getStoreBounds()),(null!=(i=null==(s=n)?void 0:s.heightPx)?i:0)+(null!=(r=null==(a=n)?void 0:a.topPx)?r:0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){if(e.footer&&0===e.rowIndex)return Number.MAX_SAFE_INTEGER;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let t=e.footer?e.sibling:e;for(;t.isExpandable()&&t.expanded;)if(t.master)t=t.detailNode;else if(t.childrenAfterSort){if(0===t.childrenAfterSort.length)break;t=tp(t.childrenAfterSort)}return t.rowTop+t.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){let t="top"===e,i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,i);let s=t?this.rowRenderer.getFirstVisibleVerticalPixel()-this.extraTopHeight:this.rowRenderer.getLastVisibleVerticalPixel()-this.extraTopHeight,r=new Set,a=e=>{if(r.add(e),t){let t=this.getLastPixelOfGroup(e),r=s+i+e.rowHeight;t<r?e.stickyRowTop=i+(t-r):e.stickyRowTop=i}else{let t=this.getFirstPixelOfGroup(e),r=s-(i+e.rowHeight);t>r?e.stickyRowTop=i-(t-r):e.stickyRowTop=i}i=0,r.forEach(e=>{let t=e.stickyRowTop+e.rowHeight;i<t&&(i=t)})},o=this.areFooterRowsStickySuppressed(),n=this.gos.get("suppressGroupRowsSticky"),l=t=>{if(!t.displayed)return!1;if(t.footer){if(!0===o||"grand"===o&&-1===t.level||"group"===o&&t.level>-1)return!1;let i=!!t.sibling.rowIndex&&t.sibling.rowIndex+1===t.rowIndex;return("bottom"!==e||!i)&&!r.has(t)}return!!t.isExpandable()&&!0!==n&&"bottom"!==e&&!r.has(t)&&t.expanded};for(let e=0;e<100;e++){let e=s+i;t||(e=s-i);let r=this.rowModel.getRowIndexAtPixel(e),o=this.rowModel.getRow(r);if(null==o)break;let n=this.getStickyAncestors(o).find(e=>(t?e.rowIndex<r:e.rowIndex>r)&&l(e));if(n){a(n);continue}if((t?o.rowTop<e:o.rowTop+o.rowHeight>e)&&l(o)){a(o);continue}break}
151return t||r.forEach(e=>{e.stickyRowTop=i-(e.stickyRowTop+e.rowHeight)}),this.refreshNodesAndContainerHeight(e,r,i)}areFooterRowsStickySuppressed(){let e=this.gos.get("suppressStickyTotalRow");if(!0===e)return!0;let t=!!this.gos.get("groupIncludeFooter")||"group"===e,i=!!this.gos.get("groupIncludeTotalFooter")||"grand"===e;return!!t&&!!i||(i?"grand":!!t&&"group")}canRowsBeSticky(){let e=eX(this.gos),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i)}getStickyAncestors(e){let t=[],i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse()}checkStickyRows(){let e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){let t=new Set;if(this.stickyTopRowCtrls.some(t=>t.getRowNode()===e)){for(let i=0;i<this.stickyTopRowCtrls.length;i++){let s=this.stickyTopRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let i=0;i<this.stickyBottomRowCtrls.length;i++){let s=this.stickyBottomRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,i){let s="top"===e,r=s?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,a={},o=[];for(let e=0;e<r.length;e++){let i=r[e].getRowNode();if(!t.has(i)){a[i.id]=r[e],i.sticky=!1;continue}o.push(r[e])}let n=new Set;for(let e=0;e<o.length;e++)n.add(o[e].getRowNode());let l=[];t.forEach(e=>{n.has(e)||(e.sticky=!0,l.push(this.createRowCon(e,!1,!1)))});let h=!!l.length||o.length!==r.length;s?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),h=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),h=!0),this.destroyRowCtrls(a,!1);let d=[...o,...l];d.sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex),s||d.reverse(),d.forEach(e=>e.setRowTop(e.getRowNode().stickyRowTop));let u=0;return s?(t.forEach(e=>{e.rowIndex<this.pageBoundsService.getFirstRow()&&(u+=e.rowHeight)}),u>this.topContainerHeight&&(u=this.topContainerHeight),this.setOffsetTop(u)):(t.forEach(e=>{e.rowIndex>this.pageBoundsService.getLastRow()&&(u+=e.rowHeight)}),u>this.bottomContainerHeight&&(u=this.bottomContainerHeight),this.setOffsetBottom(u)),!!h&&(s?this.stickyTopRowCtrls=d:this.stickyBottomRowCtrls=d,!0)}ensureRowHeightsValid(){let e=!1,t=t=>{let i=t.getRowNode();if(i.rowHeightEstimated){let t=eH(this.gos,i);i.setRowHeight(t.height),e=!0}};return this.stickyTopRowCtrls.forEach(t),this.stickyBottomRowCtrls.forEach(t),e}},lm=class extends tk{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=()=>{let e=()=>{this.getAllCellCtrls().forEach(e=>e.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(e=>e.updateRangeBordersIfRangeCount())},i=()=>{this.eventService.addEventListener("cellSelectionChanged",e),this.eventService.addEventListener("columnMoved",t),this.eventService.addEventListener("columnPinned",t),this.eventService.addEventListener("columnVisible",t)},s=()=>{this.eventService.removeEventListener("cellSelectionChanged",e),this.eventService.removeEventListener("columnMoved",t),this.eventService.removeEventListener("columnPinned",t),this.eventService.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{tt(this.gos)?i():s()}),tt(this.gos)&&i()}}wireBeans(e){this.animationFrameService=e.animationFrameService,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusService=e.focusService,this.beans=e,this.rowContainerHeightService=e.rowContainerHeightService,this.ctrlsService=e.ctrlsService,this.environment=e.environment}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}
151),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",e=>this.onSuppressCellFocusChanged(e.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection","rowSelection"],()=>this.redrawRows()),eX(this.gos)&&(eN(this.gos)||eO(this.gos))&&(this.stickyRowFeature=this.createManagedBean(new lg(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this)))),this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=eG(this.gos,"print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let e=this.getKeepDetailRowsCount();this.cachedRowCtrls=new lv(null!=e?e:3)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){let e=tQ(this.rowCtrlsByRowIndex),t=tQ(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>{this.onCellFocusChanged(e)},cellFocusCleared:()=>this.onCellFocusChanged(),flashCells:e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getCols().forEach(e=>{let t=t=>{this.getAllCellCtrls().forEach(i=>{i.getColumn()===e&&t(i)})},i=()=>{t(e=>e.onLeftChanged())},s=()=>{t(e=>e.onWidthChanged())},r=()=>{t(e=>e.onFirstRightPinnedChanged())},a=()=>{t(e=>e.onLastLeftPinnedChanged())},o=()=>{t(e=>e.onColDefChanged())};e.addEventListener("leftChanged",i),e.addEventListener("widthChanged",s),e.addEventListener("firstRightPinnedChanged",r),e.addEventListener("lastLeftPinnedChanged",a),e.addEventListener("colDefChanged",o),this.destroyFuncsForColumnListeners.push(()=>{e.removeEventListener("leftChanged",i),e.removeEventListener("widthChanged",s),e.removeEventListener("firstRightPinnedChanged",r),e.removeEventListener("lastLeftPinnedChanged",a),e.removeEventListener("colDefChanged",o)})})}onDomLayoutChanged(){let e=eG(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;let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}
151onPageLoaded(e){let t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){let t=[];return this.getAllRowCtrls().forEach(i=>{let s=i.getCellElement(e);s&&t.push(s)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){let{pinnedRowModel:i,beans:s,printLayout:r}=this,a=Object.fromEntries(e.map(e=>[e.getRowNode().id,e]));i.forEachPinnedRow(t,(o,n)=>{let l=e[n];l&&void 0===i.getPinnedRowById(l.getRowNode().id,t)&&(l.destroyFirstPass(),l.destroySecondPass()),o.id in a?(e[n]=a[o.id],delete a[o.id]):e[n]=new nn(o,s,!1,!1,r)}),e.length="top"===t?i.getPinnedTopRowCount():i.getPinnedBottomRowCount()}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var i;if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{if(null!=(i=this.cachedRowCtrls)&&i.has(e))return void this.cachedRowCtrls.removeRow(e);let t=t=>{let i=t[e.rowIndex];i&&i.getRowNode()===e&&(i.destroyFirstPass(),i.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":t(this.topRowCtrls);break;case"bottom":t(this.bottomRowCtrls);break;default:t(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(null!=e){null==e||e.forEach(e=>this.redrawRow(e,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){let t=null!=e&&e.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;let i=eZ(this.gos),s=eU(this.gos,i,nr.DOM_DATA_KEY_CELL_CTRL),r=eU(this.gos,i,nn.DOM_DATA_KEY_ROW_CTRL);return s||r?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();let t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);let i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&eQ(this.gos),r=i?this.getRowsToRecycle():null;if(i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature){this.stickyRowFeature.checkStickyRows();let e=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();e&&this.updateContainerHeights(e)}this.recycleRows(r,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){let t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");if(t&&!i){var s;this.gridBodyCtrl.getScrollFeature().scrollToTop(),null==(s=this.stickyRowFeature)||s.resetOffsets()}}updateContainerHeights(e=0){if(this.printLayout)return void this.rowContainerHeightService.setModelHeight(null);let t=this.pageBoundsService.getCurrentPageHeight();0===t&&(t=1),this.rowContainerHeightService.setModelHeight(t+e)}getLockOnRefresh(){var e,t;if(this.refreshInProgress)throw Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }
151, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0,null==(e=(t=this.frameworkOverrides).getLockOnRefresh)||e.call(t)}releaseLockOnRefresh(){var e,t;this.refreshInProgress=!1,null==(e=(t=this.frameworkOverrides).releaseLockOnRefresh)||e.call(t)}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&this.focusService.restoreFocusedCell(e,()=>{this.onCellFocusChanged(this.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))})}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e)})}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){let i=t[s].getAllCellCtrls(),r=i.length;for(let t=0;t<r;t++)e.push(i[t])}return e}getAllRowCtrls(){let e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(let e in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[e]);return i}addRenderedRowListener(e,t,i){let s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i)}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.flashCell(e))}refreshCells(e={}){let t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(let i of this.getCellCtrls(e.rowNodes,e.columns))i.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=null;for(let i of(this.stickyRowFeature&&sG()&&(t=this.getCellToRestoreFocusToAfterRefresh()||null),this.getRowCtrls(e)))i.isFullWidth()&&(i.refreshFullWidth()||this.redrawRow(i.getRowNode(),!0));this.dispatchDisplayedRowsChanged(!1),t&&this.restoreFocusedCell(t)}getCellRendererInstances(e){var t;let i=this.getCellCtrls(e.rowNodes,e.columns).map(e=>e.getCellRenderer()).filter(e=>null!=e);if(null!=(t=e.columns)&&t.length)return i;let s=[],r=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(e=>{if(r&&!this.isRowInMap(e.getRowNode(),r)||!e.isFullWidth())return;let t=e.getFullWidthCellRenderers();for(let e=0;e<t.length;e++){let i=t[e];null!=i&&s.push(i)}}),[...s,...i]}getCellEditorInstances(e){let t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(e=>{let i=e.getCellEditor();i&&t.push(i)}),t}getEditingCells(){let e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){let i=t.getCellPosition();e.push(i)}}),e}mapRowNodes(e){if(!e)return;let t={top:{},bottom:{},normal:{}};return e.forEach(e=>{let i=e.id;switch(e.rowPinned){case"top":t.top[i]=e;break;case"bottom":t.bottom[i]=e;break;default:t.normal[i]=e}}),t}isRowInMap(e,t){let i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i]}}getRowCtrls(e){let t=this.mapRowNodes(e),i=this.getAllRowCtrls();return e&&t?i.filter(e=>{let i=e.getRowNode();return this.isRowInMap(i,t)}):i}getCellCtrls(e,t){let i;eM(t)&&(i={},t.forEach(e=>{let t=this.columnModel.getCol(e);eM(t)&&(i[t.getId()]=!0)}));let s=[];return this.getRowCtrls(e).forEach(e=>{e.getAllCellCtrls().forEach(e=>{let t=e.getColumn().getId();i&&!i[t]||s.push(e)})}),s}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){let e=[];tK(this.rowCtrlsByRowIndex,(t,i)=>{null==i.getRowNode().id&&e.push(t)}),this.removeRowCtrls(e);let t={};return tK(this.rowCtrlsByRowIndex,(e,i)=>{t[i.getRowNode().id]=i}),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(e=>{let i=this.rowCtrlsByRowIndex[e];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[e]})}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){let t,{afterScroll:i}=e;this.stickyRowFeature&&sG()&&(t=this.getCellToRestoreFocusToAfterRefresh()||void 0);let s=this.firstRenderedRow,r=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let a=!1;if(this.stickyRowFeature){a=this.stickyRowFeature.checkStickyRows();let e=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();e&&this.updateContainerHeights(e)}
151let o=this.firstRenderedRow!==s||this.lastRenderedRow!==r;if((!i||a||o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!a),null!=t)){let e=this.getCellToRestoreFocusToAfterRefresh();null!=t&&null==e&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(t))}}removeRowCompsNotToDraw(e,t){let i={};e.forEach(e=>i[e]=!0);let s=Object.keys(this.rowCtrlsByRowIndex).filter(e=>!i[e]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){let t=function(e,t){let i=[];for(let s=e;s<=t;s++)i.push(s);return i}(this.firstRenderedRow,this.lastRenderedRow),i=(e,i)=>{let s=i.getRowNode().rowIndex;null!=s&&(s<this.firstRenderedRow||s>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(i)&&t.push(s)};tK(this.rowCtrlsByRowIndex,i),tK(e,i),t.sort((e,t)=>e-t);let s=[];for(let e=0;e<t.length;e++){let i=t[e],r=this.rowModel.getRow(i);r&&!r.sticky&&s.push(i)}return s}recycleRows(e,t=!1,i=!1){let s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t);let r=[];s.forEach(s=>{let a=this.createOrUpdateRowCtrl(s,e,t,i);eM(a)&&r.push(a)}),e&&(!i||this.gos.get("suppressAnimationFrame")||this.printLayout?this.destroyRowCtrls(e,t):this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventService.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){let e=this.visibleColsService.isPinningLeft(),t=this.visibleColsService.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){let e=[];this.getFullWidthRowCtrls().forEach(t=>{let i=t.getRowNode().rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(e=>{if(!e.isFullWidth())return!1;let i=e.getRowNode();return null==t||!!this.isRowInMap(i,t)})}createOrUpdateRowCtrl(e,t,i,s){let r,a=this.rowCtrlsByRowIndex[e];if(!a&&eM(r=this.rowModel.getRow(e))&&eM(t)&&t[r.id]&&r.alreadyRendered&&(a=t[r.id],t[r.id]=null),!a){if(r||(r=this.rowModel.getRow(e)),!eM(r))return;a=this.createRowCon(r,i,s)}return r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=a,a}destroyRowCtrls(e,t){let i=[];tK(e,(e,s)=>{if(s){if(this.cachedRowCtrls&&s.isCacheable())return void this.cachedRowCtrls.addRow(s);if(s.destroyFirstPass(!t),t){let e=s.instanceId;this.zombieRowCtrls[e]=s,i.push(()=>{s.destroySecondPass(),delete this.zombieRowCtrls[e]})}else s.destroySecondPass()}}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),function(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(e=>e()),t)}(i,400))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*ej(this.gos)}workOutFirstAndLastRowsToRender(){let e,t;if(this.rowContainerHeightService.updateOffset(),this.rowModel.isRowsToRender())if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.pageBoundsService.getFirstRow(),t=this.pageBoundsService.getLastRow();else{let i,s,r=this.getRowBufferInPixels(),a=this.ctrlsService.getGridBodyCtrl(),o=this.gos.get("suppressRowVirtualisation"),n=!1;do{let e=this.pageBoundsService.getPixelOffset(),{pageFirstPixel:t,pageLastPixel:l}=this.pageBoundsService.getCurrentPagePixelRange(),h=this.rowContainerHeightService.getDivStretchOffset(),d=a.getScrollFeature().getVScrollPosition(),u=d.top,c=d.bottom;o?(i=t+h,s=l+h):(i=Math.max(u+e-r,t)+h,s=Math.min(c+e+r,l)+h),this.firstVisibleVPixel=Math.max(u+e,t)+h,this.lastVisibleVPixel=Math.min(c+e,l)+h,n=this.ensureAllRowsInRangeHaveHeightsCalculated(i,s)}while(n)let l=this.rowModel.getRowIndexAtPixel(i),h=this.rowModel.getRowIndexAtPixel(s),d=this.pageBoundsService.getFirstRow(),u=this.pageBoundsService.getLastRow();l<d&&(l=d),h>u&&(h=u),e=l,t=h}else e=0,t=-1;let i=eG(this.gos,"normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),r=Math.max(this.getRowBuffer(),500);i&&!s&&t-e>r&&(t=e+r);
151let a=e!==this.firstRenderedRow,o=t!==this.lastRenderedRow;(a||o)&&(this.firstRenderedRow=e,this.lastRenderedRow=t,this.eventService.dispatchEvent({type:"viewportChanged",firstRow:e,lastRow:t}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){var i,s;let r=null==(i=this.pinnedRowModel)?void 0:i.ensureRowHeightsValid(),a=null==(s=this.stickyRowFeature)?void 0:s.ensureRowHeightsValid(),o=this.rowModel.ensureRowHeightsValid(e,t,this.pageBoundsService.getFirstRow(),this.pageBoundsService.getLastRow());return(o||a)&&this.eventService.dispatchEvent({type:"recalculateRowBounds"}),(!!a||!!o||!!r)&&(this.updateContainerHeights(),!0)}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){let t=e.getRowNode(),i=this.focusService.isRowNodeFocused(t),s=e.isEditing(),r=t.detail;return!!(i||s||r)&&!!this.isRowPresent(t)}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(!this.paginationService||this.paginationService.isRowPresent(e))}createRowCon(e,t,i){let s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;let r=this.gos.get("suppressAnimationFrame"),a=i&&!r&&!this.printLayout;return new nn(e,this.beans,t,a,this.printLayout)}getRenderedNodes(){return Object.values(this.rowCtrlsByRowIndex).map(e=>e.getRowNode())}getRowByPosition(e){let t,{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=this.getStickyTopRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null)||(t=this.getStickyBottomRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null))}return t}isRangeInRenderedViewport(e,t){if(null==e||null==t)return!1;let i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},lv=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){let e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(null==e||null==e.id)return null;let t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}has(e){return null!=this.entriesMap[e.id]}removeRow(e){let t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],tC(this.entriesList,i)}removeFromCache(e){let t=e.getRowNode().id;delete this.entriesMap[t],tC(this.entriesList,e)}getEntries(){return this.entriesList}},lf=class extends tk{constructor(){super(...arguments),this.beanName="pinnedRowModel",this.nextId=0,this.pinnedTopRows=new lC,this.pinnedBottomRows=new lC}wireBeans(e){this.beans=e}postConstruct(){this.setPinnedRowData(this.gos.get("pinnedTopRowData"),"top"),this.setPinnedRowData(this.gos.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",e=>this.setPinnedRowData(e.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",e=>this.setPinnedRowData(e.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}isEmpty(e){return("top"===e?this.pinnedTopRows:this.pinnedBottomRows).isEmpty()}isRowsToRender(e){return!this.isEmpty(e)}onGridStylesChanges(e){if(e.rowHeightChanged){let e=e=>{e.setRowHeight(e.rowHeight,!0)};this.pinnedBottomRows.forEach(e),this.pinnedTopRows.forEach(e)}}ensureRowHeightsValid(){var e,t;let i=!1,s=0,r=e=>{if(e.rowHeightEstimated){let t=eH(this.gos,e);e.setRowTop(s),e.setRowHeight(t.height),s+=t.height,i=!0}};return null==(e=this.pinnedBottomRows)||e.forEach(r),s=0,null==(t=this.pinnedTopRows)||t.forEach(r),this.eventService.dispatchEvent({type:"pinnedHeightChanged"}),i}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventService.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){let i="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(void 0===e)return void i.clear();let s=e6(this.gos),r="top"===t?r4.ID_PREFIX_TOP_PINNED:r4.ID_PREFIX_BOTTOM_PINNED,a=i.getIds(),o=[],n=new Set,l=0,h=-1;for(let u of e){var d;let e=null!=(d=null==s?void 0:s({data:u,level:0,rowPinned:t}))?d:r+this.nextId++;
151if(n.has(e)){ep("Duplicate ID",e,"found for pinned row with data",u,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter.");continue}h++,n.add(e),o.push(e);let c=i.getById(e);if(void 0!==c)c.data!==u&&c.setData(u),l+=this.setRowTopAndRowIndex(c,l,h),a.delete(e);else{let s=new r4(this.beans);s.id=e,s.data=u,s.rowPinned=t,l+=this.setRowTopAndRowIndex(s,l,h),i.push(s)}}a.forEach(e=>{var t;null==(t=i.getById(e))||t.clearRowTopAndRowIndex()}),i.removeAllById(a),i.setOrder(o)}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(eH(this.gos,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getPinnedTopRowCount(){return this.pinnedTopRows.getSize()}getPinnedBottomRowCount(){return this.pinnedBottomRows.getSize()}getPinnedTopRow(e){return this.pinnedTopRows.getByIndex(e)}getPinnedBottomRow(e){return this.pinnedBottomRows.getByIndex(e)}getPinnedRowById(e,t){return"top"===t?this.pinnedTopRows.getById(e):this.pinnedBottomRows.getById(e)}forEachPinnedRow(e,t){return"top"===e?this.pinnedTopRows.forEach(t):this.pinnedBottomRows.forEach(t)}getTotalHeight(e){let t=e.getSize();if(0===t)return 0;let i=e.getByIndex(t-1);return void 0===i?0:i.rowTop+i.rowHeight}},lC=class{constructor(){this.cache={},this.ordering=[]}getById(e){return this.cache[e]}getByIndex(e){let t=this.ordering[e];return this.cache[t]}push(e){this.cache[e.id]=e,this.ordering.push(e.id)}removeAllById(e){for(let t of e)delete this.cache[t];this.ordering=this.ordering.filter(t=>!e.has(t))}setOrder(e){this.ordering=e}forEach(e){this.ordering.forEach((t,i)=>{let s=this.cache[t];s&&e(s,i)})}clear(){this.ordering.length=0,this.cache={}}isEmpty(){return 0===this.ordering.length}getSize(){return this.ordering.length}getIds(){return new Set(this.ordering)}},ly=((y=ly||{}).Applied="Applied",y.StoreNotFound="StoreNotFound",y.StoreLoading="StoreLoading",y.StoreWaitingToLoad="StoreWaitingToLoad",y.StoreLoadingFailed="StoreLoadingFailed",y.StoreWrongType="StoreWrongType",y.Cancelled="Cancelled",y.StoreNotStarted="StoreNotStarted",y),lw=class extends tk{constructor(e){super(),this.state="needsLoading",this.version=0,this.id=e}getId(){return this.id}load(){this.state="loading",this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}getState(){return this.state}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed",this.processServerFail()),this.dispatchLoadCompleted(!1)}success(e,t){this.successCommon(e,t)}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){let t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}dispatchLoadCompleted(e=!0){this.dispatchLocalEvent({type:"loadComplete",success:e,block:this})}},lb=class extends tk{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();let e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=ey(this.performCheckBlocksToLoad.bind(this),e))}getMaxConcurrentDatasourceRequests(){let e=this.gos.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){tC(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchLocalEvent({type:"blockLoaded"}),0==this.activeBlockLoadsCount&&this.dispatchLocalEvent({type:"blockLoaderFinished"})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.gos.get("debug")&&ec("RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}let e=this.getAvailableLoadingCount(),t=this.blocks.filter(e=>"needsLoading"===e.getState()).slice(0,e);
151this.registerLoads(t.length),t.forEach(e=>e.load()),this.printCacheStatus()}getBlockState(){if(eO(this.gos))return this.rowModel.getBlockStates();let e={};return this.blocks.forEach(t=>{let{id:i,state:s}=t.getBlockStateJson();e[i]=s}),e}printCacheStatus(){this.gos.get("debug")&&ec(`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}},lS={version:a0,moduleName:"@ag-grid-community/row-node-block",beans:[lb]},lx=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(e){this.rowModel=e}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(e){this.root=e,this.end=null,this.cachedRange.length=0}setEndRange(e){this.end=e,this.cachedRange.length=0}getRange(){if(0===this.cachedRange.length){let e=this.getRoot(),t=this.getEnd();if(null==e||null==t)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)}return this.cachedRange}isInRange(e){return null!==this.root&&this.getRange().some(t=>t.id===e.id)}getRoot(){var e,t;return this.root&&(null==(e=this.root)?void 0:e.key)===null&&(this.root=null!=(t=this.rowModel.getRowNode(this.root.id))?t:null),this.root}getEnd(){var e,t;return this.end&&(null==(e=this.end)?void 0:e.key)===null&&(this.end=null!=(t=this.rowModel.getRowNode(this.end.id))?t:null),this.end}truncate(e){let t=this.getRange();if(0===t.length)return{keep:[],discard:[]};let i=t[0].id===this.root.id,s=t.findIndex(t=>t.id===e.id);if(!(s>-1))return{keep:t,discard:[]};{let r=t.slice(0,s),a=t.slice(s+1);return this.setEndRange(e),i?{keep:r,discard:a}:{keep:a,discard:r}}}extend(e,t=!1){let i=this.getRoot();if(null==i){let i=this.getRange().slice();return t&&e.depthFirstSearch(e=>!e.group&&i.push(e)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}if(this.rowModel.getNodesInRangeForSelection(i,e).find(e=>{var t;return e.id===(null==(t=this.end)?void 0:t.id)}))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}},lM=class extends tk{constructor(){super(...arguments),this.beanName="stylingService"}wireBeans(e){this.expressionService=e.expressionService}processAllCellClasses(e,t,i,s){this.processClassRules(void 0,e.cellClassRules,t,i,s),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,s,r){if(null==t&&null==e)return;let a={},o={},n=(e,t)=>{e.split(" ").forEach(e=>{""!=e.trim()&&t(e)})};if(t){let e=Object.keys(t);for(let s=0;s<e.length;s++){let r,l=e[s],h=t[l];"string"==typeof h?r=this.expressionService.evaluate(h,i):"function"==typeof h&&(r=h(i)),n(l,e=>{r?a[e]=!0:o[e]=!0})}}e&&r&&Object.keys(e).forEach(e=>n(e,e=>{a[e]||(o[e]=!0)})),r&&Object.keys(o).forEach(r),Object.keys(a).forEach(s)}getStaticCellClasses(e,t){let i,{cellClass:s}=e;return s?("string"==typeof(i="function"==typeof s?s(t):s)&&(i=[i]),i||[]):[]}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(e=>{i(e)})}},lD=class extends rs{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},lE={selector:"AG-TOGGLE-BUTTON",component:lD},lI=((w=lI||{}).TAB_GUARD="ag-tab-guard",w.TAB_GUARD_TOP="ag-tab-guard-top",w.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",w),lA=class extends tk{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:r,forceFocusOutWhenTabGuardsAreEmpty:a,isFocusableContainer:o,focusInnerElement:n,onFocusIn:l,onFocusOut:h,shouldStopEventPropagation:d,onTabKeyDown:u,handleKeyDown:c,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=n,this.eFocusableElement=p,this.focusTrapActive=!!r,this.forceFocusOutWhenTabGuardsAreEmpty=!!a,this.isFocusableContainer=!!o,this.providedFocusIn=l,this.providedFocusOut=h,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=c}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.createManagedBean(new ai(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEac
151h(e=>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()}activateTabGuards(){if(this.forcingFocusOut)return;let 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)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;let t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){var t;let i,s,r=e$(this.gos),a=this.focusService.findFocusableElements(r.body,null,!0),o=a.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===o)return;e?(i=0,s=o):(i=o+1,s=a.length);let n=a.slice(i,s),l=this.gos.get("tabIndex");n.sort((e,t)=>{let i=parseInt(e.getAttribute("tabindex")||"0"),s=parseInt(t.getAttribute("tabindex")||"0");return s===l?1:i===l?-1:0===i?1:0===s?-1:i-s}),null==(t=n[e?n.length-1:0])||t.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)return void this.providedOnTabKeyDown(e);if(this.focusTrapActive||e.defaultPrevented)return;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let 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&&(null==t||t)}setAllowFocus(e){this.allowFocus=e}},lR=class extends tk{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();let{eTopGuard:t,eBottomGuard:i,eFocusableElement:s}=this,r=[t,i];this.addTabGuards(t,i);let{focusTrapActive:a=!1,onFocusIn:o,onFocusOut:n,focusInnerElement:l,handleKeyDown:h,onTabKeyDown:d,shouldStopEventPropagation:u,forceFocusOutWhenTabGuardsAreEmpty:c,isFocusableContainer:p}=e;this.tabGuardCtrl=this.createManagedBean(new lA({comp:{setTabIndex:e=>{r.forEach(t=>null!=e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex"))}},focusTrapActive:a,eTopGuard:t,eBottomGuard:i,eFocusableElement:s,onFocusIn:o,onFocusOut:n,focusInnerElement:l,handleKeyDown:h,onTabKeyDown:d,shouldStopEventPropagation:u,forceFocusOutWhenTabGuardsAreEmpty:c,isFocusableContainer:p}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){let t=e$(this.gos).createElement("div");return t.classList.add("ag-tab-guard","top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom"),iV(t,"presentation"),t}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];sm(this.comp.getFocusableElement()),this.addTabGuards(...e)}
151forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){sI(t)||(t=t.getGui());let{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",t):e(t,i)}},lT=class extends s${initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new lR(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},lL=0,lF=class extends tk{constructor(){super(...arguments),this.beanName="popupService",this.popupList=[]}wireBeans(e){this.ctrlsService=e.ctrlsService,this.resizeObserverService=e.resizeObserverService,this.environment=e.environment}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){let e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){let t,{eventSource:i,ePopup:s}=e,r=this.getPopupIndex(s);-1!==r&&(this.popupList[r].alignedToElement=i);let a=i.getBoundingClientRect(),o=this.getParentRect(),n=this.keepXYWithinBounds(s,a.top-o.top,0),l=s.clientWidth>0?s.clientWidth:200;s.style.minWidth=`${l}px`;let h=o.right-o.left-l;function d(){return a.right-o.left-2}function u(){return a.left-o.left-l}this.gos.get("enableRtl")?((t=u())<0&&(t=d(),this.setAlignedStyles(s,"left")),t>h&&(t=0,this.setAlignedStyles(s,"right"))):((t=d())>h&&(t=u(),this.setAlignedStyles(s,"right")),t<0&&(t=0,this.setAlignedStyles(s,"left"))),s.style.left=`${t}px`,s.style.top=`${n}px`}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:i,nudgeY:s,skipObserver:r}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){let t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){let{ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:r,eventSource:a,alignSide:o="left",position:n="over",column:l,rowNode:h,type:d}=e,u=a.getBoundingClientRect(),c=this.getParentRect(),p=this.getPopupIndex(t);-1!==p&&(this.popupList[p].alignedToElement=a);let g=()=>{let i,r=u.left-c.left;return"right"===o&&(r-=t.offsetWidth-u.width),"over"===n?(i=u.top-c.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),i="under"===this.shouldRenderUnderOrAbove(t,u,c,e.nudgeY||0)?u.top-c.top+u.height:u.top-t.offsetHeight-2*(s||0)-c.top),{x:r,y:i}};this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:r,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(d,t,a,null,l,h)})}shouldRenderUnderOrAbove(e,t,i,s){let r=i.bottom-t.bottom,a=t.top-i.top,o=e.offsetHeight+s;return r>o?"under":a>o||a>r?"above":"under"}setAlignedStyles(e,t){let i=this.getPopupIndex(e);if(-1===i)return;let{alignedToElement:s}=this.popupList[i];!s||(["right","left","over","above","under"].forEach(t=>{s.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`)}),t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`)))}callPostProcessPopup(e,t,i,s,r,a){let o=this.gos.getCallback("postProcessPopup");o&&o({column:r,rowNode:a,ePopup:t,type:e,eventSource:i,mouseEvent:s})}positionPopup(e){let{ePopup:t,keepWithinBounds:i,nudgeX:s,nudgeY:r,skipObserver:a,updatePosition:o}=e,n={width:0,height:0},l=(a=!1)=>{let{x:l,y:h}=o();(!a||t.clientWidth!==n.width||t.clientHeight!==n.height)&&(n.width=t.clientWidth,n.height=t.clientHeight,s&&(l+=s),r&&(h+=r),i&&(l=this.keepXYWithinBounds(t,l,1),h=this.keepXYWithinBounds(t,h,0)),t.style.left=`${l}px`,t.style.top=`${h}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!a){let e=this.resizeObserverService.observeResize(t,()=>l(!0));setTimeout(()=>e(),200)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){let e=e$(this.gos),t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),sc(t)}keepXYWithinBounds(e,t,i){let s=0===i,r=s?"top":"left",a=e$(this.gos),o=a.documentElement,n=this.getPopupParent(),l=e.getBoundingClientRect(),h=n.getBoundingClientRect(),d=a.documentElement.getBoundingClientRect(),u=n===a.body,c=Math.ceil(l[s?"height":"width"]),p=u?(s?sd:su)(o)+o[s?"scrollTop":"scrollLeft"]:n[s?"clientHeight":"clientWidth"];return u&&(p-=Math.abs(d[r]-h[r])),Math.min(Math.max(t,0),Math.abs(p-c))}addPopup(e){let t=e$(this.gos),{eChild:i,ariaLabel:s,alwaysOnTop:r,positionCallback:a,anchorToElement:o}=e;if(!t)return ep("could not find the document, document is empty"),{hideFunc:()=>{}};let n=this.getPopupIndex(i);if(-1!==n)return{hideFunc:this.popupList[n].hideFunc};this.initialisePopupPosition(i);let l=this.createPopupWrapper(i,s,!!r),h=this.addEventListenersToPopup({...e,wrapperEl:l});return a&&a(),this.addPopupToPopupList(i,l,h,o),{hideFunc:h}}initialisePopupPosition(e){let t=this.getPopupParent().getBoundingClientRect();eM(e.style.top)||(e.style.top=`${-1*t.top}px`),eM(e.style.left)||(e.style.left=`${-1*t.left}px`)}createPopupWrapper(e,t,i){let s=this.getPopupParent(),r=document.createElement("div");return this.environment.applyThemeClasses(r),r.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||iV(e,"dialog"),ij(e,t),r.appendChild(e),s.appendChild(r),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),r}handleThemeChange(e){if(e.themeChanged)for(let e of this.popupList)this.environment.applyThemeClasses(e.wrapper)}addEventListenersToPopup(e){let t=e$(this.gos),i=this.getPopupParent(),{wrapperEl:s,eChild:r,closedCallback:a,afterGuiAttached:o,closeOnEsc:n,modal:l}=e,h=!1,d=e=>
151{!s.contains(eZ(this.gos))||e.key!==s9.ESCAPE||tT(e)||p({keyboardEvent:e})},u=e=>p({mouseEvent:e}),c=e=>p({touchEvent:e}),p=(e={})=>{let{mouseEvent:o,touchEvent:n,keyboardEvent:l,forceHide:p}=e;!p&&(this.isEventFromCurrentPopup({mouseEvent:o,touchEvent:n},r)||h)||(h=!0,i.removeChild(s),t.removeEventListener("keydown",d),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",c),t.removeEventListener("contextmenu",u),this.eventService.removeEventListener("dragStarted",u),a&&a(o||n||l),this.removePopupFromPopupList(r))};return o&&o({hidePopup:p}),window.setTimeout(()=>{n&&t.addEventListener("keydown",d),l&&(t.addEventListener("mousedown",u),this.eventService.addEventListener("dragStarted",u),t.addEventListener("touchstart",c),t.addEventListener("contextmenu",u))},0),p}addPopupToPopupList(e,t,i,s){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:lL++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let i=this.getPopupIndex(e);if(-1===i)return;let s=this.popupList[i];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(e=>e&&e()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;let r=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=r,s.isAnchored=!0,r}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:s,ePopup:r}=e,a=s.getBoundingClientRect(),o=e=>parseInt(e.substring(0,e.length-1),10),n=(e,t)=>{let s=i[e]-a[e],n=o(r.style[e]);return{initialDiff:s,lastDiff:s,initial:n,last:n,direction:t}},l=n("top",0),h=n("left",1),d=this.getFrameworkOverrides();return new rm(i=>{d.wrapIncoming(()=>{d.setInterval(()=>{let i=t.getBoundingClientRect(),a=s.getBoundingClientRect();if(0==a.top&&0==a.left&&0==a.height&&0==a.width)return void e.hidePopup();let n=(e,t)=>{let s=o(r.style[t]);e.last!==s&&(e.initial=s,e.last=s);let n=i[t]-a[t];if(n!=e.lastDiff){let i=this.keepXYWithinBounds(r,e.initial+e.initialDiff-n,e.direction);r.style[t]=`${i}px`,e.last=i}e.lastDiff=n};n(l,"top"),n(h,"left")},200).then(e=>{i(()=>{null!=e&&window.clearInterval(e)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){let{mouseEvent:i,touchEvent:s}=e,r=i||s;if(!r)return!1;let a=this.getPopupIndex(t);if(-1===a)return!1;for(let e=a;e<this.popupList.length;e++)if(tP(this.popupList[e].element,r))return!0;return this.isElementWithinCustomPopup(r.target)}isElementWithinCustomPopup(e){let t=e$(this.gos);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){let i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){let t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=i.length,r=this.getWrapper(e);if(!r||s<=1||!t.contains(e))return;let a=[],o=[];for(let e of i)e!==r&&(e.classList.contains("ag-always-on-top")?o.push(e):a.push(e));let n=[],l=o.length,h=r.classList.contains("ag-always-on-top")||!l?[...a,...o,r]:[...a,r,...o];for(let e=0;e<=s;e++){let s=h[e];i[e]!==h[e]&&s!==r&&(s.querySelectorAll("div").forEach(e=>{0!==e.scrollTop&&n.push([e,e.scrollTop])}),0===e?t.insertAdjacentElement("afterbegin",s):h[e-1].insertAdjacentElement("afterend",s))}for(;n.length;){let e=n.pop();e[0].scrollTop=e[1]}}},lP=["touchstart","touchend","touchmove","touchcancel"],lk=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e()}setInterval(e,t){return new rm(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,s){let r=tS(lP,t);e.addEventListener(t,i,{capture:!!s,passive:r})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){let t="solid"===this.frameworkName?"react":this.frameworkName;return`https://www.ag-grid.com/${t}-data-grid${e?`/${e}`:""}`}},lN=class extends tk{constructor(){super(...arguments),this.beanName="
151cellNavigationService"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer,this.pinnedRowModel=e.pinnedRowModel,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){let i,s,r=e===s9.UP,a=e===s9.DOWN,o=e===s9.LEFT;if(r||a)s=r?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow(),i=t.column;else{let e=this.visibleColsService.getAllCols(),r=this.gos.get("enableRtl");s=t.rowIndex,i=o!==r?e[0]:tp(e)}return{rowIndex:s,rowPinned:null,column:i}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case s9.UP:i=this.getCellAbove(i);break;case s9.DOWN:i=this.getCellBelow(i);break;case s9.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case s9.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,ep("unknown key for navigation ",e)}s=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(e){let t,i=e.column;switch(e.rowPinned){case"top":t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!!t&&!i.isSuppressNavigable(t)}getCellToLeft(e){if(!e)return null;let t=this.visibleColsService.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;let t=this.visibleColsService.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){let t=e.rowIndex,i=e.rowPinned,s=!1;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":if(this.rowModel.isRowsToRender())return{rowIndex:this.pageBoundsService.getFirstRow(),rowPinned:null};if(this.pinnedRowModel.isRowsToRender("bottom"))return{rowIndex:0,rowPinned:"bottom"};return null;default:if(this.pinnedRowModel.isRowsToRender("bottom"))return{rowIndex:0,rowPinned:"bottom"};return null}i&&(s=!0);let r=this.rowModel.getRow(e.rowIndex),a=s?void 0:this.getNextStickyPosition(r);return a||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!eX(this.gos)||!e||!e.sticky)return;let i=this.rowRenderer.getStickyTopRowCtrls().some(t=>t.getRowNode().rowIndex===e.rowIndex),s=[],r=(s=i?[...this.rowRenderer.getStickyTopRowCtrls()].sort((e,t)=>e.getRowNode().rowIndex-t.getRowNode().rowIndex):[...this.rowRenderer.getStickyBottomRowCtrls()].sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex)).findIndex(t=>t.getRowNode().rowIndex===e.rowIndex),a=s[r+(t?-1:1)];if(a)return{rowIndex:a.getRowNode().rowIndex,rowPinned:null}}getCellBelow(e){if(!e)return null;let t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){let t=e.rowPinned,i=e.rowIndex;return"top"===t?this.pinnedRowModel.getPinnedTopRowCount()-1<=i:"bottom"===t?this.pinnedRowModel.getPinnedBottomRowCount()-1<=i:this.pageBoundsService.getLastRow()<=i}getRowAbove(e){let t=e.rowIndex,i=e.rowPinned,s=i?0===t:t===this.pageBoundsService.getFirstRow(),r=!1;if(s)return"top"===i?null:i?this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null:this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;i&&(r=!0);let a=this.rowModel.getRow(e.rowIndex),o=r?void 0:this.getNextStickyPosition(a,!0);return o||{rowIndex:t-1,rowPinned:i}}getCellAbove(e){if(!e)return null;let t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.pageBoundsService.getLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowCount()-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){let t=this.visibleColsService.getAllCols(),i=e.rowIndex,s=e.rowPinned,r=this.visibleColsService.getColAfter(e.column);if(!r){var a,o;r=t[0];let n=this.getRowBelow(e);if(eD(n)||!n.rowPinned&&!(null==(a=null==(o=this.paginationService)?void 0:o.isRowInPage(n))||a))return null;i=n?n.rowIndex:null,s=n?n.rowPinned:null}return{rowIndex:i,column:r,rowPinned:s}}getNextTabbedCellBackwards(e){let t=this.visibleColsService.getAllCols(),i=e.rowIndex,s=e.rowPinned,r=this.visibleColsService.getColBefore(e.column);if(!r){var a,o;r=tp(t);let n=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(eD(n)||!n.rowPinned&&!(null==(a=null==(o=this.paginationService)?void 0:o.isRowInPage(n))||a))return null;i=n?n.rowIndex:null,s=n?n.rowPinned:null}return{rowIndex:i,column:r,rowPinned:s}}},lO=(e,t)=>{for(let i in t)t[i]=e;return t},lG={...lO("@ag-grid-community/core",{dispatchEvent:0,destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,getState:0,setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0,redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRow:0,getFirstDisplayedRowIndex:0,getLastDisplayedRow:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0,getModel:0,getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0,getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0,addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0,expireValueCache:0,getValue:0,getCellValue:0,showColumnMenuAfterButtonClick:0,showColumnMenuAfterMouseClick:0,showColumnMenu:0,hidePopupMenu:0,onSortChanged:0,getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0,setGridAriaProperty:0,refreshCells:0,flashCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,get
151SizesForCurrentTheme:0,getCellRendererInstances:0,addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getColumnDef:0,getColumnDefs:0,sizeColumnsToFit:0,setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumn:0,getDisplayNameForColumnGroup:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnVisible:0,setColumnsVisible:0,setColumnPinned:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0,moveColumn:0,moveColumnByIndex:0,moveColumns:0,setColumnWidth:0,setColumnWidths:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0,autoSizeColumn:0,autoSizeColumns:0,autoSizeAllColumns:0,undoCellEditing:0,redoCellEditing:0,getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,getCurrentUndoSize:0,getCurrentRedoSize:0,isAnyFilterPresent:0,onFilterChanged:0,isColumnFilterPresent:0,getFilterInstance:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0,paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0,expandAll:0,collapseAll:0,onRowHeightChanged:0,setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...lO("@ag-grid-community/client-side-row-model",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...lO("@ag-grid-community/csv-export",{getDataAsCsv:0,exportDataAsCsv:0}),...lO("@ag-grid-community/infinite-row-model",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...lO("@ag-grid-enterprise/advanced-filter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...lO("@ag-grid-enterprise/charts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...lO("@ag-grid-enterprise/clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...lO("@ag-grid-enterprise/excel-export",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...lO("@ag-grid-enterprise/master-detail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...lO("@ag-grid-enterprise/menu",{showContextMenu:0,showColumnChooser:0,hideColumnChooser:0}),...lO("@ag-grid-enterprise/range-selection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...lO("@ag-grid-enterprise/row-grouping",{addAggFunc:0,addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0,isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumn:0,removeValueColumns:0,addValueColumn:0,addValueColumns:0,setRowGroupColumns:0,removeRowGroupColumn:0,removeRowGroupColumns:0,addRowGroupColumn:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0,setPivotColumns:0,removePivotColumn:0,removePivotColumns:0,addPivotColumn:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...lO("@ag-grid-enterprise/server-side-row-model",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...lO("@ag-grid-enterprise/side-bar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...lO("@ag-grid-enterprise/status-bar",{getStatusPanel:0})},lB={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},lz=(e,t)=>e.eventService.dispatchEvent(t),lV=class{};Reflect.defineProperty(lV,"name",{value:"GridApi"});var lH=class extends tk{constructor(){super(),this.beanName="api
151FunctionService",this.api=new lV,this.fns={...lB,dispatchEvent:lz},this.beans=null,this.preDestroyLink="";let{api:e}=this;for(let t in lG)e[t]=this.makeApi(t)[t]}wireBeans(e){this.beans=e}postConstruct(){this.preDestroyLink=this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){let{fns:i,beans:s}=this;if(i!==lB){var r,a;i[e]=null!=(r=null==s||null==(a=s.validationService)?void 0:a.validateApiFunction(e,t))?r:t}}makeApi(e){return{[e]:(...t)=>{let{beans:i,fns:{[e]:s}}=this;return s?s(i,...t):this.apiNotFound(e)}}}apiNotFound(e){let{beans:t,gos:i,preDestroyLink:s}=this;if(t){let t=lG[e];i.assertModuleRegistered(t,`api.${e}`)&&ep(`API function '${e}' not registered to module '${t}'`)}else ep(`Grid API function ${e}() cannot be called as the grid has been destroyed.
152Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
153To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${s}`)}destroy(){super.destroy(),this.fns=lB,this.beans=null}};function lj(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionService").api}}var lW=class extends tk{constructor(){super(...arguments),this.beanName="columnDefFactory"}buildColumnDefs(e,t,i){let s=[],r={};return e.forEach(e=>{let a=this.createDefFromColumn(e,t,i),o=!0,n=a,l=e.getOriginalParent(),h=null;for(;l;){let e=null;if(l.isPadding()){l=l.getOriginalParent();continue}let t=r[l.getGroupId()];if(t){t.children.push(n),o=!1;break}if((e=this.createDefFromGroup(l))&&(e.children=[n],r[e.groupId]=e,n=e,l=l.getOriginalParent()),null!=l&&h===l){o=!1;break}h=l}o&&s.push(n)}),s}createDefFromGroup(e){let t=tq(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){let s=tq(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=!e.isVisible()||void 0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,s}},lU=class extends tk{constructor(){super(...arguments),this.beanName="columnEventDispatcher"}visibleCols(e){this.eventService.dispatchEvent({type:"displayedColumnsChanged",source:e})}gridColumns(){this.eventService.dispatchEvent({type:"gridColumnsChanged"})}headerHeight(e){this.eventService.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"})}groupHeaderHeight(e){this.eventService.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}groupOpened(e){this.eventService.dispatchEvent({type:"columnGroupOpened",columnGroup:1===e.length?e[0]:void 0,columnGroups:e})}rowGroupChanged(e,t){this.eventService.dispatchEvent({type:"columnRowGroupChanged",columns:e,column:1===e.length?e[0]:null,source:t})}genericColumnEvent(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:1===t.length?t[0]:null,source:i})}pivotModeChanged(){this.eventService.dispatchEvent({type:"columnPivotModeChanged"})}virtualColumnsChanged(e){this.eventService.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}newColumnsLoaded(e){this.eventService.dispatchEvent({type:"newColumnsLoaded",source:e})}everythingChanged(e){this.eventService.dispatchEvent({type:"columnEverythingChanged",source:e})}columnMoved(e){let{movedColumns:t,source:i,toIndex:s,finished:r}=e;this.eventService.dispatchEvent({type:"columnMoved",columns:t,column:t&&1===t.length?t[0]:null,toIndex:s,finished:r,source:i})}columnPinned(e,t){if(!e.length)return;let i=1===e.length?e[0]:null,s=this.getCommonValue(e,e=>e.getPinned());this.eventService.dispatchEvent({type:"columnPinned",pinned:null!=s?s:null,columns:e,column:i,source:t})}columnVisible(e,t){if(!e.length)return;let i=1===e.length?e[0]:null,s=this.getCommonValue(e,e=>e.isVisible());this.eventService.dispatchEvent({type:"columnVisible",visible:s,columns:e,column:i,source:t})}getCommonValue(e,t){if(!e||0==e.length)return;let i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}columnChanged(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:t&&1==t.length?t[0]:null,source:i})}columnResized(e,t,i,s=null){e&&e.length&&this.eventService.dispatchEvent({type:"columnResized",columns:e,column:1===e.length?e[0]:null,flexColumns:s,finished:t,source:i})}},l_=class extends tk{constructor(){super(...arguments),this.beanName="
153columnGetStateService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}getColumnState(){if(eD(this.columnModel.getColDefCols())||!this.columnModel.isAlive())return[];let e=this.columnModel.getAllCols().map(e=>this.createStateItemFromColumn(e));return this.orderColumnStateList(e),e}createStateItemFromColumn(e){let t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns(),s=e.isRowGroupActive()?t.indexOf(e):null,r=e.isPivotActive()?i.indexOf(e):null,a=e.isValueActive()?e.getAggFunc():null,o=null!=e.getSort()?e.getSort():null,n=null!=e.getSortIndex()?e.getSortIndex():null,l=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:n,aggFunc:a,rowGroup:e.isRowGroupActive(),rowGroupIndex:s,pivot:e.isPivotActive(),pivotIndex:r,flex:l}}orderColumnStateList(e){let t=new Map(this.columnModel.getCols().map((e,t)=>[e.getColId(),t]));e.sort((e,i)=>(t.has(e.colId)?t.get(e.colId):-1)-(t.has(i.colId)?t.get(i.colId):-1))}},l$=class extends tk{constructor(){super(...arguments),this.beanName="columnGroupStateService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService}getColumnGroupState(){let e=[];return t7(null,this.columnModel.getColTree(),t=>{tN(t)&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}resetColumnGroupState(e){let t=this.columnModel.getColDefColTree();if(!t)return;let i=[];t7(null,t,e=>{if(tN(e)){let t=e.getColGroupDef(),s={groupId:e.getGroupId(),open:t?t.openByDefault:void 0};i.push(s)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){if(!this.columnModel.getColTree())return;this.columnAnimationService.start();let i=[];e.forEach(e=>{let t=e.groupId,s=e.open,r=this.columnModel.getProvidedColGroup(t);r&&r.isExpanded()!==s&&(r.setExpanded(s),i.push(r))}),this.visibleColsService.refresh(t,!0),i.length&&this.eventDispatcher.groupOpened(i),this.columnAnimationService.finish()}},lY=class extends tk{constructor(){super(...arguments),this.beanName="columnViewportService",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,i=!1){let s=this.visibleColsService.isBodyWidthDirty();if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,this.visibleColsService.setBodyWidthDirty(),this.gos.get("enableRtl")){let e=this.visibleColsService.getBodyContainerWidth();this.viewportLeft=e-this.scrollPosition-this.scrollWidth,this.viewportRight=e-this.scrollPosition}else this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition;this.columnModel.isReady()&&this.checkViewportColumns(i)}}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]}return i||[]}extractViewportColumns(){let e=this.visibleColsService.getCenterCols();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||0===this.viewportRight}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return!!(e.isAutoHeaderHeight()||this.isAnyParentAutoHeaderHeight(e))||this.isColumnInRowViewport(e)}isAnyParentAutoHeaderHeight(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,r=this.viewportRight+200;return!(t<s&&i<s)&&!(t>r&&i>r)}getViewportColumns(){let e=this.visibleColsService.getLeftCols(),t=this.visibleColsService.getRightCols();return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.columnModel.isColSpanActive())return this.colsWithinViewport;let t=e=>{let t=e.getLeft();return eM(t)&&t>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),s=this.visibleColsService.getColsCenter();return this.visibleColsService.getColsForRow(e,s,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventDispatcher.virtualColumnsChanged(e)}calculateHeaderRows(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={};let e={},t=this.visibleColsService.getLeftCols(),i=this.visibleColsService.getRightCols();
153this.headerColsWithinViewport.concat(t).concat(i).forEach(t=>e[t.getId()]=!0);let s=(t,i,r)=>{let a=!1;for(let o=0;o<t.length;o++){let n=t[o],l=!1;if(t3(n))l=!0===e[n.getId()];else{let e=n.getDisplayedChildren();e&&(l=s(e,i,r+1))}l&&(a=!0,i[r]||(i[r]=[]),i[r].push(n))}return a};s(this.visibleColsService.getTreeLeft(),this.rowsOfHeadersToRenderLeft,0),s(this.visibleColsService.getTreeRight(),this.rowsOfHeadersToRenderRight,0),s(this.visibleColsService.getTreeCenter(),this.rowsOfHeadersToRenderCenter,0)}extractViewport(){this.extractViewportColumns();let e=this.getViewportColumns().map(e=>`${e.getId()}-${e.getPinned()||"normal"}`).join("#"),t=this.colsWithinViewportHash!==e;return t&&(this.colsWithinViewportHash=e,this.calculateHeaderRows()),t}},lK=class extends tk{constructor(){super(...arguments),this.beanName="agComponentUtils"}wireBeans(e){this.componentMetadataProvider=e.componentMetadataProvider}adaptFunction(e,t){let i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){return class{refresh(){return!1}getGui(){return this.eGui}init(t){let i=e(t),s=typeof i;if("string"===s||"number"===s||"boolean"===s){this.eGui=sy("<span>"+i+"</span>");return}if(null==i){this.eGui=sy("<span></span>");return}this.eGui=i}}}doesImplementIComponent(e){return!!e&&e.prototype&&"getGui"in e.prototype}},lZ=class extends tk{constructor(){super(...arguments),this.beanName="componentMetadataProvider"}wireBeans(e){this.agComponentUtils=e.agComponentUtils}postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},dragAndDropImageComponent:{mandatoryMethodList:["setIcon","setLabel"],optionalMethodList:[]},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}},lq=Object.fromEntries(["rowPositionUtils","cellPositionUtils","headerPositionUtils","paginationAutoPageSizeService","apiFunctionService","gridApi","userComponentRegistry","agComponentUtils","componentMetadataProvider","resizeObserverService","userComponentFactory","rowContainerHeightService","horizontalResizeService","localeService","validationService","pinnedRowModel","dragService","visibleColsService","eventService","gos","popupService","selectionService","columnFilterService","quickFilterService","filterManager","columnModel","headerNavigationService","pageBoundsService","paginationService","pageBoundsListener","rowRenderer","expressionService","columnFactory","alignedGridsService","navigationService","valueCache","valueService","loggerFactory","autoWidthCalculator","filterMenuFactory","dragAndDropService","focusService","mouseEventService","environment","cellNavigationService","stylingService","scrollVisibleService","sortController","columnHoverService","columnAnimationService","selectableService","autoColService","controlsColService","changeDetectionService","animationFrameService","undoRedoService","columnDefFactory","rowCssClassCalculator","rowNodeBlockLoader","rowNodeSorter","ctrlsService","pinnedWidthService","rowNodeEventThrottle","ctrlsFactory","dataTypeService","syncService","overlayService","stateService","expansionService","apiEventService","ariaAnnouncementService","menuService","columnApplyStateService","columnEventDispatcher","columnMoveService","columnAutosizeService","columnGetStateService","columnGroupStateService","columnSizeService","funcColsService","columnNameService","columnViewportService","pivotResultColsService","showRowGroupColsService"].map((e,t)=>[e,t]));function lQ(e,t){var i,s;return(null!=(i=e.beanName?lq[e.beanName]:void 0)?i:Number.MAX_SAFE_INTEGER)-(null!=(s=t.beanName?lq[t.beanName]:void 0)?s:Number.MAX_SAFE_INTEGER)}function lX(e,t){return(null==e?void 0:e.beanName)==="gridDestroyService"?-1:0}var lJ=class extends tk{constructor(){super(...arguments),this.beanName="
153ctrlsFactory",this.registry={}}register(e){this.registry[e.name]=e.classImp}getInstance(e,...t){let i=this.registry[e];if(null!=i)return new i(...t)}},l0=class extends tk{constructor(){super(...arguments),this.beanName="ctrlsService",this.params={gridCtrl:void 0,gridBodyCtrl:void 0,center:void 0,left:void 0,right:void 0,bottomCenter:void 0,bottomLeft:void 0,bottomRight:void 0,topCenter:void 0,topLeft:void 0,topRight:void 0,stickyTopCenter:void 0,stickyTopLeft:void 0,stickyTopRight:void 0,stickyBottomCenter:void 0,stickyBottomLeft:void 0,stickyBottomRight:void 0,fakeHScrollComp:void 0,fakeVScrollComp:void 0,gridHeaderCtrl:void 0,centerHeader:void 0,leftHeader:void 0,rightHeader:void 0},this.ready=!1,this.readyCallbacks=[],this.runReadyCallbacksAsync=!1}wireBeans(e){var t,i,s;this.runReadyCallbacksAsync=null!=(t=null==(i=(s=e.frameworkOverrides).runWhenReadyAsync)?void 0:i.call(s))&&t}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.runReadyCallbacksAsync)}updateReady(){this.ready=Object.values(this.params).every(e=>{var t;return null!=(t=null==e?void 0:e.isAlive())&&t})}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{let e=this.readyCallbacks.indexOf(t);e>=0&&this.readyCallbacks.splice(e,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(){let{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){let t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}},l1=class extends tk{constructor(){super(...arguments),this.beanName="cellPositionUtils"}createId(e){let{rowIndex:t,rowPinned:i,column:s}=e;return this.createIdFromValues({rowIndex:t,column:s,rowPinned:i})}createIdFromValues(e){let{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${null==i?"null":i}.${s.getId()}`}equals(e,t){let i=e.column===t.column,s=e.rowPinned===t.rowPinned,r=e.rowIndex===t.rowIndex;return i&&s&&r}},l2=class extends tk{constructor(){super(...arguments),this.beanName="rowNodeEventThrottle",this.events=[]}wireBeans(e){this.animationFrameService=e.animationFrameService,this.rowModel=e.rowModel}postConstruct(){eN(this.gos)&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e,t){if(null==this.clientSideRowModel)return void this.eventService.dispatchEvent(e);this.events.push(e);let i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(e=>this.eventService.dispatchEvent(e)),this.events=[]};t?i():(null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced())}},l3=class extends tk{constructor(){super(...arguments),this.beanName="rowPositionUtils"}wireBeans(e){this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.pageBoundsService=e.pageBoundsService}getFirstRow(){let e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.pageBoundsService.getFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:t,rowPinned:e}}getLastRow(){let e,t=null,i=this.pinnedRowModel.getPinnedBottomRowCount(),s=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.pageBoundsService.getLastRow()):s&&(t="top",e=s-1),void 0===e?null:{rowIndex:e,rowPinned:t}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRow(e.rowIndex);case"bottom":return this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);default:return this.rowModel.getRow(e.rowIndex)}}sameRow(e,t){return!e&&!t||(!e||!!t)&&(!!e||!t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(eM(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}},l4={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42}
153,l6={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},l5={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},l8=class extends tk{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.ancestorThemeClasses=[],this.sizesMeasured=!1,this.gridTheme=null}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.eGridDiv=e.eGridDiv}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addDestroyFunc(()=>this.stopUsingTheme()),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.ancestorThemeClasses=this.readAncestorThemeClasses(),this.setUpThemeClassObservers(),this.getSizeEl(l4),this.getSizeEl(l6),this.getSizeEl(l5)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(l4)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(l6)}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(l5)}hasMeasuredSizes(){return this.sizesMeasured}getGridThemeClass(){var e;return(null==(e=this.gridTheme)?void 0:e.getCssClass())||null}getThemeClasses(){return this.gridTheme?[this.gridTheme.getCssClass()]:this.ancestorThemeClasses}applyThemeClasses(e){let t=this.getThemeClasses();for(let i of Array.from(e.classList))i.startsWith("ag-theme-")&&!t.includes(i)&&e.classList.remove(i);e.classList.add(...t)}refreshRowHeightVariable(){let e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;let i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):""!=e?parseFloat(e):-1}getCSSVariablePixelValue(e){let t=this.lastKnownValues.get(e);if(null!=t)return t;let i=this.measureSizeEl(e);return"detached"===i||"no-styles"===i?e.defaultValue:(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){let t=this.getSizeEl(e);if(null==t.offsetParent)return"detached";let i=t.offsetWidth;return i===l9?"no-styles":(this.sizesMeasured=!0,i)}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let i=this.eMeasurementContainer;i||((i=this.eMeasurementContainer=document.createElement("div")).className="ag-measurement-container",this.gos.get("theme")&&this.applyThemeClasses(i),this.eGridDiv.appendChild(i)),(t=document.createElement("div")).style.width=`var(${e.cssName}, ${l9}px)`,i.appendChild(t),this.sizeEls.set(e,t);let s=this.measureSizeEl(e);"no-styles"===s&&ep(`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.`);let r=this.resizeObserverService.observeResize(t,()=>{let t=this.measureSizeEl(e);"detached"!==t&&"no-styles"!==t&&(this.lastKnownValues.set(e,t),t!==s&&(s=t,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){this.eventService.dispatchEvent({type:"gridStylesChanged",[e]:!0})}setUpThemeClassObservers(){let e=new MutationObserver(()=>{let e=this.readAncestorThemeClasses();l7(e,this.ancestorThemeClasses)||(this.ancestorThemeClasses=e,this.fireGridStylesChangedEvent("themeChanged"))}),t=this.eGridDiv;for(;t;)e.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement;this.addDestroyFunc(()=>e.disconnect())}readAncestorThemeClasses(){let e=this.eGridDiv,t=[];for(;e;){for(let i of Array.from(e.classList).filter(e=>e.startsWith("ag-theme-")))t.includes(i)||t.unshift(i);e=e.parentElement}return Object.freeze(t)}handleThemeGridOptionChange(){let{gos:e,eMeasurementContainer:t,gridTheme:i}=this,s=e.get("theme")||null;s!==i&&(null==i||i.stopUse(),this.gridTheme=s,null==s||s.startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),container:this.eGridDiv}),t&&this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged"))}stopUsingTheme(){var e;null==(e=this.gridTheme)||e.stopUse(),this.gridTheme=null}},l7=(e,t)=>e.length===t.length&&-1===e.findIndex((i,s)=>e[s]!==t[s]),l9=15538,he=class extends tk{constructor(){super(...arguments),this.beanName="eventService",this.globalEventService=new el}wireBeans(e){this.globalEventListener=e.globalEventListener,this.globalSyncEventListener=e.globalSyncEventListener}postConstruct(){if(this.globalEventListener){let e=ez(this.gos);this.addGlobalListener(this.globalEventListener,e)}this.globalSyncEventListener&&this.addGlobalListener(this.globalSyncEventListener,!1)}addEventListener(e,t,i){this.globalEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.globalEventService.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}
153dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(this.gos.addGridCommonParams(e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(this.gos.addGridCommonParams(e))}},ht=class e extends tk{constructor(){super(...arguments),this.beanName="focusService"}wireBeans(e){this.eGridDiv=e.eGridDiv,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.headerNavigationService=e.headerNavigationService,this.headerPositionUtils=e.headerPositionUtils,this.rowRenderer=e.rowRenderer,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.navigationService=e.navigationService,this.ctrlsService=e.ctrlsService,this.filterManager=e.filterManager,this.rangeService=e.rangeService,this.advancedFilterService=e.advancedFilterService,this.overlayService=e.overlayService}static addKeyboardModeEvents(t){this.instanceCount>0||(t.addEventListener("keydown",e.toggleKeyboardMode),t.addEventListener("mousedown",e.toggleKeyboardMode))}static removeKeyboardModeEvents(t){this.instanceCount>0||(t.removeEventListener("keydown",e.toggleKeyboardMode),t.removeEventListener("mousedown",e.toggleKeyboardMode))}static toggleKeyboardMode(t){let i=e.keyboardModeActive,s="keydown"===t.type;s&&(t.ctrlKey||t.metaKey||t.altKey)||i!==s&&(e.keyboardModeActive=s)}postConstruct(){let e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(this,e=>{this.gridCtrl=e.gridCtrl})}registerKeyboardFocusEvents(){let t=e$(this.gos);e.addKeyboardModeEvents(t),e.instanceCount++,this.addDestroyFunc(()=>{e.instanceCount--,e.removeKeyboardModeEvents(t)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;let e=this.focusedCellPosition.column,t=this.columnModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return e.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(eZ(this.gos),nn.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(eZ(this.gos),aq.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(eU(this.gos,i,t))return!1;i=i.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return!!this.isCellRestoreFocused(e)&&(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0)}clearRestoreFocus(){this.restoredFocusedCellPosition=null,this.awaitRestoreFocusedCell=!1}restoreFocusedCell(e,t){this.awaitRestoreFocusedCell=!0,setTimeout(()=>{this.awaitRestoreFocusedCell&&(this.setRestoreFocusedCell(e),t())})}isCellRestoreFocused(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(e){let{rowIndex:t,rowPinned:i,column:s}=e,r={rowIndex:t,rowPinned:i,column:s,isFullWidthCell:!1},a=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return a&&(r.isFullWidthCell=a.isFullWidth()),r}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,null==this.focusedCellPosition)return;let e=this.getFocusEventParams(this.focusedCellPosition);this.focusedCellPosition=null,this.eventService.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){let{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:r=!1,preventScrollOnBrowserFocus:a=!1}=e,o=this.columnModel.getCol(t);if(!o){this.focusedCellPosition=null;return}this.focusedCellPosition={rowIndex:i,rowPinned:ex(s),column:o},this.eventService.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCellPosition),forceBrowserFocus:r,preventScrollOnBrowserFocus:a})}isCellFocused(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}
153isHeaderWrapperFocused(e){if(null==this.focusedHeaderPosition)return!1;let t=e.getColumnGroupChild(),i=e.getRowIndex(),s=e.getPinned(),{column:r,headerRowIndex:a}=this.focusedHeaderPosition;return t===r&&i===a&&s==r.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}isHeaderFocusSuppressed(){return this.gos.get("suppressHeaderFocus")||this.overlayService.isExclusive()}isCellFocusSuppressed(){return this.gos.get("suppressCellFocus")||this.overlayService.isExclusive()}focusHeaderPosition(e){var t;if(this.isHeaderFocusSuppressed())return!1;let{direction:i,fromTab:s,allowUserOverride:r,event:a,fromCell:o,rowWithoutSpanValue:n}=e,{headerPosition:l}=e;if(o&&null!=(t=this.filterManager)&&t.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(l);if(r){let e=this.getFocusedHeader(),t=this.headerNavigationService.getHeaderRowCount();if(s){let s=this.gos.getCallback("tabToNextHeader");s&&(l=this.getHeaderPositionFromUserFunc({userFunc:s,direction:i,currentPosition:e,headerPosition:l,headerRowCount:t}))}else{let i=this.gos.getCallback("navigateToNextHeader");i&&a&&(l=i({key:a.key,previousHeaderPosition:e,nextHeaderPosition:l,headerRowCount:t,event:a}))}}return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:i,event:a,fromCell:o,rowWithoutSpanValue:n})}focusHeaderPositionFromUserFunc(e){if(this.isHeaderFocusSuppressed())return!1;let{userFunc:t,headerPosition:i,direction:s,event:r}=e,a=this.getFocusedHeader(),o=this.headerNavigationService.getHeaderRowCount(),n=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:a,headerPosition:i,headerRowCount:o});return!!n&&this.focusProvidedHeaderPosition({headerPosition:n,direction:s,event:r})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:i,currentPosition:s,headerPosition:r,headerRowCount:a}=e,o=t({backwards:"Before"===i,previousHeaderPosition:s,nextHeaderPosition:r,headerRowCount:a});return!0===o||null===o?(null===o&&ep("Since v31.3 Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),s):!1===o?null:o}focusProvidedHeaderPosition(e){let{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:r,event:a}=e,{column:o,headerRowIndex:n}=t;if(-1===n){var l;return null!=(l=this.filterManager)&&l.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(o)}this.headerNavigationService.scrollToColumn(o,i);let h=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()),d=(null==h?void 0:h.focusHeader(t.headerRowIndex,o,a))||!1;return d&&(null!=r||s)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(null!=r?r:-1),d}focusFirstHeader(){if(this.overlayService.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleColsService.getAllCols()[0];if(!e)return!1;e.getParent()&&(e=this.visibleColsService.getColGroupAtLevel(e,0));let t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlayService.isExclusive()&&this.focusOverlay(!0))return!0;let t=this.headerNavigationService.getHeaderRowCount()-1,i=tp(this.visibleColsService.getAllCols());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){var t;return null!=(t=this.filterManager)&&t.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return null!=this.focusedCellPosition&&this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===ex(t)}findFocusableElements(e,t,i=!1){let s=st;t&&(s+=", "+t),i&&(s+=', [tabindex="-1"]');let r=Array.prototype.slice.apply(e.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter(e=>sC(e)),a=Array.prototype.slice.apply(e.querySelectorAll(s));return a.length?r.filter(e=>-1===a.indexOf(e)):r}focusInto(e,t=!1,i=!1){let s=this.findFocusableElements(e,null,i),r=t?tp(s):s[0];return!!r&&(r.focus({preventScroll:!0}),!0)}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;let i=this.findFocusableElements(e),s=i.indexOf(t);if(-1===s)return null;let r=-1;for(let e=s-1;e>=0;e--)if(i[e].classList.contains("ag-tab-guard-top")){r=e;break}return r<=0?null:i[r-1]}findNextFocusableElement(e=this.eGridDiv,t,i){let s=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),r=eZ(this.gos),a=(t?s.findIndex(e=>e.contains(r)):s.indexOf(r))+(i?-1:1);return a<0||a>=s.length?null:s[a]}isTargetUnderManagedComponent(e,t){if(!t)return!1;let i=e.querySelectorAll(`.${ai.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let e=0;e<i.length;e++)if(i[e].contains(t))return!0;return!1}
153findTabbableParent(e,t=5){let i=0;for(;e&&null===sB(e)&&++i<=t;)e=e.parentElement;return null===sB(e)?null:e}focusOverlay(e){var t;let i=this.overlayService.isVisible()&&(null==(t=this.overlayService.getOverlayWrapper())?void 0:t.getGui());return!!i&&this.focusInto(i,e)}focusGridViewFailed(e,t){return t&&this.focusOverlay(e)||e&&this.focusLastHeader()}focusGridView(e,t=!1,i=!0){if(this.overlayService.isExclusive())return i&&this.focusOverlay(t);if(this.isCellFocusSuppressed())return t&&!this.isHeaderFocusSuppressed()?this.focusLastHeader():!!(i&&this.focusOverlay(t))||this.focusNextGridCoreContainer(!1);let s=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(s){var r,a;let{rowIndex:i,rowPinned:o}=s;if(null!=e||(e=null==(r=this.getFocusedHeader())?void 0:r.column),e&&null!=i){if(this.navigationService.ensureCellVisible({rowIndex:i,column:e,rowPinned:o}),t){let e=this.rowRenderer.getRowByPosition(s);if(null!=e&&e.isFullWidth()&&this.navigationService.tryToFocusFullWidthRow(s,t))return!0}return this.setFocusedCell({rowIndex:i,column:e,rowPinned:ex(o),forceBrowserFocus:!0}),null==(a=this.rangeService)||a.setRangeToCell({rowIndex:i,rowPinned:o,column:e}),!0}}return!!(i&&this.focusOverlay(t)||t&&this.focusLastHeader())}isGridFocused(){let e=eZ(this.gos);return!!e&&this.eGridDiv.contains(e)}focusNextGridCoreContainer(e,t=!1){return!!(!t&&this.gridCtrl.focusNextInnerContainer(e))||(!t&&(e||this.gridCtrl.isDetailGrid())||this.gridCtrl.forceFocusOutOfContainer(e),!1)}focusAdvancedFilter(e){var t,i;return this.advancedFilterFocusColumn=null==e?void 0:e.column,null!=(t=null==(i=this.advancedFilterService)?void 0:i.getCtrl().focusHeaderComp())&&t}focusNextFromAdvancedFilter(e,t){var i,s;let r=null!=(i=t?void 0:this.advancedFilterFocusColumn)?i:null==(s=this.visibleColsService.getAllCols())?void 0:s[0];return e?this.focusHeaderPosition({headerPosition:{column:r,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(r)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}addFocusableContainer(e){this.gridCtrl.addFocusableContainer(e)}removeFocusableContainer(e){this.gridCtrl.removeFocusableContainer(e)}focusGridInnerElement(e){return this.gridCtrl.focusInnerElement(e)}allowFocusForNextGridCoreContainer(e){this.gridCtrl.allowFocusForNextCoreContainer(e)}};ht.keyboardModeActive=!1,ht.instanceCount=0;var hi=ht,hs=class extends tk{constructor(){super(...arguments),this.beanName="pinnedWidthService"}wireBeans(e){this.visibleColsService=e.visibleColsService}postConstruct(){let e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){let e=eG(this.gos,"print"),t=e?0:this.visibleColsService.getColsLeftWidth(),i=e?0:this.visibleColsService.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:"leftPinnedWidthChanged"})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:"rightPinnedWidthChanged"}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}},hr=class extends tk{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}wireBeans(e){this.beans=e,this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());let{dragAndDropService:s,mouseEventService:r,ctrlsService:a,resizeObserverService:o}=this.beans,n={getContainer:()=>this.eGui,isInterestedIn:e=>1===e||0===e,getIconName:()=>"notAllowed"};s.addDropTarget(n),this.addDestroyFunc(()=>s.removeDropTarget(n)),r.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new oW(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),this.updateGridThemeClass(),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)});let l=o.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>l()),a.register("gridCtrl",this)}isDetailGrid(){var e;let t=this.focusService.findTabbableParent(this.getGui());return(null==t||null==(e=t.getAttribute("row-id"))?void 0:e.startsWith("detail"))||!1}getOptionalSelectors(){var e,t,i,s,r;let a=this.beans;return{paginationSelector:null==(e=a.paginationService)?void 0:e.getPaginationSelector(),gridHeaderDropZonesSelector:null==(t=a.columnDropZonesService)?void 0:t.getDropZoneSelector(),sideBarSelector:null==(i=a.sideBarService)?void 0:i.getSideBarSelector(),statusBarSelector:null==(s=a.statusBarService)?void 0:s.getStatusPanelSelector(),watermarkSelector:null==(r=a.licenseManager)?void 0:r.getWatermarkSelector()}}onGridSizeChanged(){this.eventService.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){let t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:s}=this.getNextFocusableIndex(t,e);if(s<0||s>=t.length)return!1;
153if(0===s){if(i>0){let e=tp(this.visibleColsService.getAllCols());if(this.focusService.focusGridView(e,!0))return!0}return!1}return this.focusContainer(t[s],e)}focusInnerElement(e){let t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;let i=this.getFocusableContainers(),s=this.visibleColsService.getAllCols();if(e){if(i.length>1)return this.focusContainer(tp(i),!0);let e=tp(s);if(this.focusService.focusGridView(e,!0))return!0}if(0===this.gos.get("headerHeight")||this.focusService.isHeaderFocusSuppressed()){if(this.focusService.focusGridView(s[0]))return!0;for(let e=1;e<i.length;e++)if(this.focusService.focusInto(i[e].getGui()))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){var t;let i=this.view.getFocusableContainers(),{nextIndex:s,indexWithFocus:r}=this.getNextFocusableIndex(i,e);if(-1===r||s<0||s>=i.length)return;let a=i[s];null==(t=a.setAllowFocus)||t.call(a,!0),setTimeout(()=>{var e;null==(e=a.setAllowFocus)||e.call(a,!1)})}getNextFocusableIndex(e,t){let i=eZ(this.gos),s=e.findIndex(e=>e.getGui().contains(i));return{indexWithFocus:s,nextIndex:s+(t?-1:1)}}focusContainer(e,t){var i,s;null==(i=e.setAllowFocus)||i.call(e,!0);let r=this.focusService.focusInto(e.getGui(),t);return null==(s=e.setAllowFocus)||s.call(e,!1),r}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}updateGridThemeClass(){let e=this.beans.environment.getGridThemeClass();e&&this.view.setGridThemeClass(e)}handleThemeChange(e){e.themeChanged&&this.updateGridThemeClass()}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},ha=class extends lT{constructor(e){super(),this.gridBody=s_,this.sideBar=s_,this.pagination=s_,this.rootWrapperBody=s_,this.eGridDiv=e}postConstruct(){let e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:e=>this.addCssClass(e),setGridThemeClass:e=>this.addCssClass(e),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:e=>{this.getGui().style.userSelect=null!=e?e:"",this.getGui().style.webkitUserSelect=null!=e?e:""},setCursor:e=>{this.getGui().style.cursor=null!=e?e:""}},t=this.createManagedBean(new hr),i=t.getOptionalSelectors(),s=this.createTemplate(i),r=[nO,...Object.values(i).filter(e=>!!e)];this.setTemplate(s,r),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>void 0,focusInnerElement:e=>t.focusInnerElement(e),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){let e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),this.gos.get("debug")&&ec("Grid removed from DOM")})}updateLayoutClasses(e,t){let i=this.rootWrapperBody.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)}createTemplate(e){let t=e.gridHeaderDropZonesSelector?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",i=e.sideBarSelector?'<ag-side-bar data-ref="sideBar"></ag-side-bar>':"",s=e.statusBarSelector?"<ag-status-bar></ag-status-bar>":"",r=e.watermarkSelector?"<ag-watermark></ag-watermark>":"",a=e.paginationSelector?'<ag-pagination data-ref="pagination"></ag-pagination>':"";return`<div class="ag-root-wrapper" role="presentation">
154                ${t}
155                <div class="ag-root-wrapper-body" data-ref="rootWrapperBody" role="presentation">
156                    <ag-grid-body data-ref="gridBody"></ag-grid-body>
157                    ${i}
158                </div>
159                ${s}
160                ${a}
161                ${r}
162            </div>`}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){var t;!e&&null!=(t=this.pagination)&&t.isDisplayed()?this.pagination.forceFocusOutOfContainer(e):super.forceFocusOutOfContainer(e)}getFocusableContainers(){let e=[this.gridBody];
162return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(e=>sC(e.getGui()))}},ho=class extends tk{constructor(){super(...arguments),this.beanName="alignedGridsService",this.consuming=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.ctrlsService=e.ctrlsService,this.columnApplyStateService=e.columnApplyStateService}getAlignedGridApis(){var e;let t=null!=(e=this.gos.get("alignedGrids"))?e:[],i="function"==typeof t;"function"==typeof t&&(t=t());let s=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return t.map(e=>{if(!e){eg("alignedGrids contains an undefined option."),i||eg(`You may want to configure via a callback to avoid setup race conditions:
163                     "alignedGrids: () => [linkedGrid]"`),eg(s());return}if(this.isGridApi(e))return e;if("current"in e){var t;return null==(t=e.current)?void 0:t.api}return e.api||eg(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${s()}`),e.api}).filter(e=>!!e&&!e.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){let e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:e})=>this.onColumnEvent(e),alignedGridScroll:({event:e})=>this.onScrollEvent(e)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){let i=[];return e.columns?e.columns.forEach(e=>{i.push(t(e))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,e=>e)}getColumnIds(e){return this.extractDataFromEvent(e,e=>e.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":ep("pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}})}processGroupOpenedEvent(e){let{columnModel:t}=this;e.columnGroups.forEach(e=>{let i=null;e&&(i=t.getProvidedColGroup(e.getGroupId())),(!e||i)&&t.setColumnGroupOpened(i,e.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){let t=e.column,i=null;if(t&&(i=this.columnModel.getColDefCol(t.getColId())),t&&!i)return;let s=this.getMasterColumns(e),{columnApplyStateService:r,columnSizeService:a,ctrlsService:o}=this;switch(e.type){case"columnMoved":{let t=e.api.getColumnState().map(e=>({colId:e.colId}));r.applyColumnState({state:t,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{let t=e.api.getColumnState().map(e=>({colId:e.colId,hide:e.hide}));r.applyColumnState({state:t},"alignedGridChanged")}break;case"columnPinned":{let t=e.api.getColumnState().map(e=>({colId:e.colId,pinned:e.pinned}));r.applyColumnState({state:t},"alignedGridChanged")}break;case"columnResized":{var n;let t={};s.forEach(e=>{t[e.getId()]={key:e.getColId(),newWidth:e.getActualWidth()}}),null==(n=e.flexColumns)||n.forEach(e=>{t[e.getId()]&&delete t[e.getId()]}),a.setColumnWidths(Object.values(t),!1,e.finished,"alignedGridChanged")}}let l=o.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(e=>{e.setGridOption("alwaysShowVerticalScroll",l)})}},hn=class extends tk{constructor(){super(...arguments),this.beanName="dataTypeService",this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.rowModel=e.rowModel,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.columnApplyStateService=e.columnApplyStateService,this.filterManager=e.filterManager}postConstruct(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(ie(e.source))})}processDataTypeDefinitions(){var e;let t=this.getDefaultDataTypes();this.dataTypeDefinitions={},this.formatValueFuncs={};let i=e=>t=>{let{column:i,node:s,value:r}=t,a=i.getColDef().valueFormatter;return a===e.groupSafeValueFormatter&&(a=e.valueFormatter),this.valueService.formatValue(i,s,r,a)};Object.entries(t).forEach(([e,t])=>{let s={...t,groupSafeValueFormatter:this.createGroupSafeValueFormatter(t)};this.dataTypeDefinitions[e]=s,this.formatValueFuncs[e]=i(s)});let s=null!=(e=this.gos.get("dataTypeDefinitions"))?e:{};this.dataTypeMatchers={}
163,Object.entries(s).forEach(([e,r])=>{let a=this.processDataTypeDefinition(r,s,[e],t);a&&(this.dataTypeDefinitions[e]=a,r.dataTypeMatcher&&(this.dataTypeMatchers[e]=r.dataTypeMatcher),this.formatValueFuncs[e]=i(a))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(e=>{let i=this.dataTypeMatchers[e];i&&delete this.dataTypeMatchers[e],this.dataTypeMatchers[e]=null!=i?i:t[e].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){let i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...t_(e.columnTypes),...t_(t.columnTypes)]),i}processDataTypeDefinition(e,t,i,s){let r,a=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let i=s[a],o=t[a];if(i&&o&&(i=o),!this.validateDataTypeDefinition(e,i,a))return;r=this.mergeDataTypeDefinitions(i,e)}else{if(i.includes(a))return void ep('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');let o=t[a];if(!this.validateDataTypeDefinition(e,o,a))return;let n=this.processDataTypeDefinition(o,t,[...i,a],s);if(!n)return;r=this.mergeDataTypeDefinitions(n,e)}return{...r,groupSafeValueFormatter:this.createGroupSafeValueFormatter(r)}}validateDataTypeDefinition(e,t,i){return t?t.baseDataType===e.baseDataType||(ep('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(ep(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var i,s,r;if(null!=(i=t.node)&&i.group){let i=(null!=(s=t.colDef.pivotValueColumn)?s:t.column).getAggFunc();if(i){if("first"===i||"last"===i)return e.valueFormatter(t);if("number"===e.baseDataType&&"count"!==i){if("number"==typeof t.value)return e.valueFormatter(t);if("object"==typeof t.value){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter({...t,value:t.value.toNumber()});if("value"in t.value)return e.valueFormatter({...t,value:t.value.value})}}return}if((this.gos.get("suppressGroupMaintainValueType")||"groupRows"===this.gos.get("groupDisplayType"))&&!this.gos.get("treeData"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()&&"string"==typeof t.value&&!(null!=(r=e.dataTypeMatcher)&&r.call(e,t.value)))return;return e.valueFormatter(t)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:s}=t,{field:r}=t;if(void 0===s&&(s=e.cellDataType),(null==s||!0===s)&&(s=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(r,i)),!s){e.cellDataType=!1;return}let a=this.dataTypeDefinitions[s];return a?(e.cellDataType=s,a.groupSafeValueFormatter&&(e.valueFormatter=a.groupSafeValueFormatter),a.valueParser&&(e.valueParser=a.valueParser),a.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,s,a,i),a.columnTypes):void ep(`Missing data type definition - "${s}"`)}addColumnListeners(e){if(!this.isWaitingForRowData)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let i=e=>{t.add(e.key)};e.addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){if(!eN(this.gos))return!1;let i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0}
163;if(this.doColDefPropsPreventInference(t,i))return!1;let s=null===t.type?e.type:t.type;if(s){var r;let e=null!=(r=this.gos.get("columnTypes"))?r:{};if(t_(s).some(t=>{let s=e[t.trim()];return s&&this.doColDefPropsPreventInference(s,i)}))return!1}return!this.doColDefPropsPreventInference(e,i)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,s])=>this.doesColDefPropPreventInference(e,t,i,s))}doesColDefPropPreventInference(e,t,i,s){if(!t[i])return!1;let r=e[i];return null===r?(t[i]=!1,!1):void 0===s?!!r:r===s}inferCellDataType(e,t){var i;let s;if(!e)return;let r=this.getInitialData();if(r){let t=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");s=tJ(r,e,t)}else this.initWaitForRowData(t);if(null==s)return;let[a]=null!=(i=Object.entries(this.dataTypeMatchers).find(([e,t])=>t(s)))?i:["object"];return a}getInitialData(){let e=this.gos.get("rowData");if(null!=e&&e.length)return e[0];{if(this.initialData)return this.initialData;let e=this.rowModel.getRootNode().allLeafChildren;if(null!=e&&e.length)return e[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;let t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();let[i]=this.addManagedEventListeners({rowDataUpdateStarted:e=>{let{firstRowData:s}=e;s&&(null==i||i(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(s,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations(),this.eventService.dispatchEvent({type:"dataTypesInferred"}))}})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;let i=[];this.destroyColumnStateUpdateListeners();let s={},r={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([e,a])=>{let o=this.columnModel.getCol(e);if(!o)return;let n=o.getColDef();if(!this.columnModel.resetColDefIntoCol(o,"cellDataTypeInferred"))return;let l=o.getColDef();if(t&&l.type&&l.type!==n.type){let t=this.getUpdatedColumnState(o,a);t.rowGroup&&null==t.rowGroupIndex&&(s[e]=t),t.pivot&&null==t.pivotIndex&&(r[e]=t),i.push(t)}}),t&&i.push(...this.funcColsService.generateColumnStateForRowGroupAndPivotIndexes(s,r)),i.length&&this.columnApplyStateService.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){let i=this.columnApplyStateService.getColumnStateFromColDef(e);return t.forEach(e=>{delete i[e],"rowGroup"===e?delete i.rowGroupIndex:"pivot"===e&&delete i.pivotIndex}),i}checkObjectValueHandlers(e){let t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}getDateStringTypeDefinition(e){var t;return e&&null!=(t=this.getDataTypeDefinition(e))?t:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){let t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return null==(t=this.getDataTypeDefinition(e))?void 0:t.baseDataType}checkType(e,t){var i;if(null==t)return!0;let s=null==(i=this.getDataTypeDefinition(e))?void 0:i.dataTypeMatcher;return!s||s(t)}validateColDef(e){let t=e=>ep(`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`);"object"===e.cellDataType&&(e.valueFormatter!==this.dataTypeDefinitions.object.groupSafeValueFormatter||this.hasObjectValueFormatter||t("Formatter"),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&t("Parser"))}getFormatValue(e){return this.formatValueFuncs[e]}setColDefPropertiesForBaseDataType(e,t,i,s){var r;let a=this.formatValueFuncs[t];switch(i.baseDataType){case"number":e.cellEditor="agNumberCellEditor";break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=e=>!!e.colDef.editable&&e.event.key===s9.SPACE;break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=a;break;case"dateString":e.cellEditor="agDateStringCellEditor",e.keyCreator=a;break;case"object":e.cellEditorParams={useFormatter:!0},e.comparator=(e,t)=>
163{let i=this.columnModel.getColDefCol(s),r=null==i?void 0:i.getColDef();if(!i||!r)return 0;let o=null==e?"":a({column:i,node:null,value:e}),n=null==t?"":a({column:i,node:null,value:t});return o===n?0:o>n?1:-1},e.keyCreator=a}null==(r=this.filterManager)||r.setColDefPropertiesForDataType(e,i,a)}getDefaultDataTypes(){let e=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:e=>{var t,i;return(null==(t=e.newValue)||null==(i=t.trim)?void 0:i.call(t))===""?null:Number(e.newValue)},valueFormatter:t=>null==t.value?"":"number"!=typeof t.value||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:e=>"number"==typeof e},text:{baseDataType:"text",valueParser:e=>""===e.newValue?null:eI(e.newValue),dataTypeMatcher:e=>"string"==typeof e},boolean:{baseDataType:"boolean",valueParser:e=>{var t,i;return null==e.newValue?e.newValue:(null==(t=e.newValue)||null==(i=t.trim)?void 0:i.call(t))===""?null:"true"===String(e.newValue).toLowerCase()},valueFormatter:e=>null==e.value?"":String(e.value),dataTypeMatcher:e=>"boolean"==typeof e},date:{baseDataType:"date",valueParser:e=>aB(null==e.newValue?null:String(e.newValue)),valueFormatter:t=>{var i;return null==t.value?"":!(t.value instanceof Date)||isNaN(t.value.getTime())?e("invalidDate","Invalid Date"):null!=(i=aN(t.value,!1))?i:""},dataTypeMatcher:e=>e instanceof Date},dateString:{baseDataType:"dateString",dateParser:e=>{var t;return null!=(t=aB(e))?t:void 0},dateFormatter:e=>{var t;return null!=(t=aN(null!=e?e:null,!1))?t:void 0},valueParser:e=>String(e.newValue).match("^\\d{4}-\\d{2}-\\d{2}
163$")?e.newValue:null,valueFormatter:e=>String(e.value).match("^\\d{4}-\\d{2}-\\d{2}$")?e.value:"",dataTypeMatcher:e=>"string"==typeof e&&!!e.match("^\\d{4}-\\d{2}-\\d{2}$")},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:e=>{var t;return null!=(t=eI(e.value))?t:""}}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function hl(e,t){var i;let{colKey:s,rowNode:r,useFormatter:a}=t,o=null!=(i=e.columnModel.getColDefCol(s))?i:e.columnModel.getCol(s);if(eD(o))return null;let n=e.valueService.getValueForDisplay(o,r);if(a){let t=e.valueService.formatValue(o,r,n);return null!=t?t:ig(n,!0)}return n}function hh(e,t){e.gos.updateGridOptions({options:t})}function hd(e){return e.rowRenderer.getFirstVirtualRenderedRow()}function hu(e){return e.rowRenderer.getLastVirtualRenderedRow()}var hc={version:a0,moduleName:"@ag-grid-community/menu-api",apiFunctions:{showColumnMenuAfterButtonClick:function(e,t,i){let s=e.columnModel.getCol(t);e.menuService.showColumnMenu({column:s,buttonElement:i,positionBy:"button"})},showColumnMenuAfterMouseClick:function(e,t,i){let s=e.columnModel.getCol(t);(s||(s=e.columnModel.getColDefCol(t)),s)?e.menuService.showColumnMenu({column:s,mouseEvent:i,positionBy:"mouse"}):eg(`column '${t}' not found`)},showColumnMenu:function(e,t){let i=e.columnModel.getCol(t);i?e.menuService.showColumnMenu({column:i,positionBy:"auto"}):eg(`column '${t}' not found`)},hidePopupMenu:function(e){e.menuService.hidePopupMenu()}}},hp=class extends tk{constructor(){super(...arguments),this.beanName="stateService",this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ey(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ey(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=ey(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}wireBeans(e){this.filterManager=e.filterManager,this.ctrlsService=e.ctrlsService,this.pivotResultColsService=e.pivotResultColsService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnGroupStateService=e.columnGroupStateService,this.columnGetStateService=e.columnGetStateService,this.paginationService=e.paginationService,this.selectionService=e.selectionService,this.expansionService=e.expansionService,this.columnAnimationService=e.columnAnimationService,this.columnApplyStateService=e.columnApplyStateService,this.sideBarService=e.sideBarService,this.rangeService=e.rangeService}postConstruct(){this.isClientSideRowModel=eN(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",a0),this.ctrlsService.whenReady(this,()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));let[e,t,i]=this.addManagedEventListeners({newColumnsLoaded:({source:t})=>{"gridInitializing"===t&&(e(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{null==t||t(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{null==i||i(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())}})}getInitialState(){var e,t,i;return(t={...t=null!=(e=this.gos.get("initialState"))?e:{}}).version||(t.version="32.1.0"),"32.1.0"===t.version&&((i=t).cellSelection=function(e,t){if(e&&"object"==typeof e)return e[t]}(i,"rangeSelection"),t=i),t}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState());let e=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){let e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());let t=e=>()=>this.updateColumnState([e]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){let{filter:e,rowGroupExpansion:t,rowSelection:i,pagination:s}=this.getInitialState(),r=this.gos.get("advancedFilterModel");(e||r)&&this.setFilterState(e,r),t&&this.setRowGroupExpansionState(t),i&&this.setRowSelectionState(i),s&&this.setPaginationState(s),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState());let a=()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState());this.addManagedEventListeners({filterChanged:()=>this.updateCachedState("filter",this.getFilterState()),rowGroupOpened:()=>
163this.onRowGroupOpenedDebounced(),expandOrCollapseAll:a,columnRowGroupChanged:a,rowDataUpdated:()=>{0!==this.gos.get("groupDefaultExpanded")&&setTimeout(()=>{a()})},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:e=>{(e.newPage||e.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){let{scroll:e,cellSelection:t,focusedCell:i,columnOrder:s}=this.getInitialState();i&&this.setFocusedCellState(i),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!(null!=s&&s.orderedColIds)),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState());let r=this.getRangeSelectionState();this.updateCachedState("rangeSelection",r),this.updateCachedState("cellSelection",r),this.updateCachedState("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>this.updateCachedState("focusedCell",this.getFocusedCellState()),cellSelectionChanged:e=>{if(e.finished){let e=this.getRangeSelectionState();this.updateCachedState("rangeSelection",e),this.updateCachedState("cellSelection",e)}},bodyScrollEnd:()=>this.updateCachedState("scroll",this.getScrollState())})}getColumnState(){let e=this.columnModel.isPivotMode(),t=[],i=[],s=[],r=[],a=[],o=[],n=[],l=[],h=[],d=0,u=this.columnGetStateService.getColumnState();for(let e=0;e<u.length;e++){let{colId:c,sort:p,sortIndex:g,rowGroup:m,rowGroupIndex:v,aggFunc:f,pivot:C,pivotIndex:y,pinned:w,hide:b,width:S,flex:x}=u[e];h.push(c),p&&(t[null!=g?g:d++]={colId:c,sort:p}),m&&(i[null!=v?v:0]=c),"string"==typeof f&&s.push({colId:c,aggFunc:f}),C&&(r[null!=y?y:0]=c),w&&("right"===w?o:a).push(c),b&&n.push(c),(x||S)&&l.push({colId:c,flex:null!=x?x:void 0,width:S})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:r.length||e?{pivotMode:e,pivotColIds:r}:void 0,columnPinning:a.length||o.length?{leftColIds:a,rightColIds:o}:void 0,columnVisibility:n.length?{hiddenColIds:n}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:h.length?{orderedColIds:h}:void 0}}setColumnState(e){let{sort:t,rowGroup:i,aggregation:s,pivot:r,columnPinning:a,columnVisibility:o,columnSizing:n,columnOrder:l,partialColumnState:h}=e,d={},u=e=>{let t=d[e];return t||(t={colId:e},d[e]=t),t},c=h?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:e,sort:t},i)=>{let s=u(e);s.sort=t,s.sortIndex=i}),c.sort=null,c.sortIndex=null),i&&(i.groupColIds.forEach((e,t)=>{let i=u(e);i.rowGroup=!0,i.rowGroupIndex=t}),c.rowGroup=null,c.rowGroupIndex=null),s&&(s.aggregationModel.forEach(({colId:e,aggFunc:t})=>{u(e).aggFunc=t}),c.aggFunc=null),r&&(r.pivotColIds.forEach((e,t)=>{let i=u(e);i.pivot=!0,i.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:r.pivotMode},source:"gridInitializing"}),c.pivot=null,c.pivotIndex=null),a&&(a.leftColIds.forEach(e=>{u(e).pinned="left"}),a.rightColIds.forEach(e=>{u(e).pinned="right"}),c.pinned=null),o&&(o.hiddenColIds.forEach(e=>{u(e).hide=!0}),c.hide=null),n&&(n.columnSizingModel.forEach(({colId:e,flex:t,width:i})=>{let s=u(e);s.flex=null!=t?t:null,s.width=i}),c.flex=null);let p=null==l?void 0:l.orderedColIds,g=!!(null!=p&&p.length),m=g?p.map(e=>u(e)):Object.values(d);m.length&&(this.columnStates=m,this.columnApplyStateService.applyColumnState({state:m,applyOrder:g,defaultState:c},"gridInitializing"))}setColumnPivotState(e){let t=this.columnStates;this.columnStates=void 0;let i=this.columnGroupStates;if(this.columnGroupStates=void 0,this.pivotResultColsService.isPivotResultColsPresent()){if(t){let i=[];for(let e of t)this.pivotResultColsService.getPivotResultCol(e.colId)&&i.push(e);this.columnApplyStateService.applyColumnState({state:i,applyOrder:e},"gridInitializing")}i&&this.columnGroupStateService.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){let e=this.columnGroupStateService.getColumnGroupState(),t=[];return e.forEach(({groupId:e,open:i})=>
163{i&&t.push(e)}),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){var t;if(!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;let i=new Set(null==(t=e.columnGroup)?void 0:t.openColumnGroupIds),s=this.columnGroupStateService.getColumnGroupState().map(({groupId:e})=>{let t=i.has(e);return t&&i.delete(e),{groupId:e,open:t}});i.forEach(e=>{s.push({groupId:e,open:!0})}),s.length&&(this.columnGroupStates=s),this.columnGroupStateService.setColumnGroupState(s,"gridInitializing")}getFilterState(){var e,t,i;let s=null==(e=this.filterManager)?void 0:e.getFilterModel();s&&0===Object.keys(s).length&&(s=void 0);let r=null!=(t=null==(i=this.filterManager)?void 0:i.getAdvancedFilterModel())?t:void 0;return s||r?{filterModel:s,advancedFilterModel:r}:void 0}setFilterState(e,t){var i,s;let{filterModel:r,advancedFilterModel:a}=null!=e?e:{advancedFilterModel:t};r&&(null==(i=this.filterManager)||i.setFilterModel(r,"columnFilter")),a&&(null==(s=this.filterManager)||s.setAdvancedFilterModel(a))}getRangeSelectionState(){var e;let t=null==(e=this.rangeService)?void 0:e.getCellRanges().map(e=>{let{id:t,type:i,startRow:s,endRow:r,columns:a,startColumn:o}=e;return{id:t,type:i,startRow:s,endRow:r,colIds:a.map(e=>e.getColId()),startColId:o.getColId()}});return null!=t&&t.length?{cellRanges:t}:void 0}setCellSelectionState(e){let{gos:t,rangeService:i,columnModel:s,visibleColsService:r}=this;if(!tt(t)||!i)return;let a=[];
163if(e.cellRanges.forEach(e=>{let t=[];if(e.colIds.forEach(e=>{let i=s.getCol(e);i&&t.push(i)}),!t.length)return;let i=s.getCol(e.startColId);if(!i){let e=r.getAllCols(),s=new Set(t);i=e.find(e=>s.has(e))}a.push({...e,columns:t,startColumn:i})}),e9(t)&&te(t)&&a.length>1)return ep("cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`");i.setCellRanges(a)}getScrollState(){var e,t,i;if(!this.isClientSideRowModel)return;let s=null==(e=this.ctrlsService.getGridBodyCtrl())?void 0:e.getScrollFeature(),{left:r}=null!=(t=null==s?void 0:s.getHScrollPosition())?t:{left:0},{top:a}=null!=(i=null==s?void 0:s.getVScrollPosition())?i:{top:0};return a||r?{top:a,left:r}:void 0}setScrollState(e){var t;if(!this.isClientSideRowModel)return;let{top:i,left:s}=e;null==(t=this.ctrlsService.getGridBodyCtrl())||t.getScrollFeature().setScrollPosition(i,s)}getSideBarState(){var e;return null==(e=this.sideBarService)||null==(e=e.getSideBarComp())?void 0:e.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.focusService.getFocusedCell();if(e){let{column:t,rowIndex:i,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{colId:t,rowIndex:i,rowPinned:s}=e;this.focusService.setFocusedCell({column:this.columnModel.getCol(t),rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){if(!this.paginationService)return;let e=this.paginationService.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationService.getPageSize();if(e||t)return{page:e,pageSize:t}}setPaginationState(e){this.paginationService&&(e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationService.setPageSize(e.pageSize,"initialState"),"number"==typeof e.page&&this.paginationService.setPage(e.page))}getRowSelectionState(){var e;let t=this.selectionService.getSelectionState();return t&&(Array.isArray(t)||!1!==t.selectAll&&!1!==t.selectAllChildren||null!=t&&null!=(e=t.toggledNodes)&&e.length)?t:void 0}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){let e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){let t=this.getColumnState(),i=!1;Object.entries(t).forEach(([e,t])=>{eL(t,this.cachedState[e])||(i=!0)}),this.cachedState={...this.cachedState,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let i=this.cachedState[e];this.setCachedStateValue(e,t),eL(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){this.staleStateKeys.forEach(e=>{"rowSelection"===e&&this.setCachedStateValue(e,this.getRowSelectionState())}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(e=>this.queuedUpdateSources.add(e)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){let e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear(),this.eventService.dispatchEvent({type:"stateUpdated",sources:e,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},hg={version:a0,moduleName:"@ag-grid-community/state-core",beans:[hp]},hm=class extends tk{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeService"}wireBeans(e){this.ctrlsService=e.ctrlsService,this.paginationService=e.paginationService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.centerRowsCtrl=e.center;let 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")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.paginationService.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;
163let e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){let t=()=>{let t=Math.floor(e/Math.max(ej(this.gos),1));this.paginationService.setPageSize(t,"autoCalculated")};this.isBodyRendered?ey(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function hv(e,t,i){e.addManagedElementListeners(t,{keydown:e=>{if(!e.defaultPrevented&&e.key===s9.TAB){let s=e.shiftKey;!i.findNextFocusableElement(t,!1,s)&&i.focusNextGridCoreContainer(s)&&e.preventDefault()}}})}var hf="paginationPageSizeSelector",hC={selector:"AG-PAGE-SIZE-SELECTOR",component:class extends s${constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let t=Number(e);isNaN(t)||t<1||t===this.paginationService.getPageSize()||(this.paginationService.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.paginationService=e.paginationService}postConstruct(){this.addManagedPropertyListener(hf,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(null!=e&&e.newPageSize))return;let t=this.paginationService.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){if(this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),!this.selectPageSizeComp))return}reset(){sm(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")&&!1!==this.gos.get(hf)}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.paginationService.getPageSize(),i=!t||!e.includes(t);if(i){let i=this.gos.exists("paginationPageSize"),s=!0!==this.gos.get(hf);ep(`'paginationPageSize=${t}'${i?"":" (default value)"}, but ${t} is not included in${s?"":" the default"} paginationPageSizeSelector=[${e.join(", ")}].`),s||ep(`Either set '${hf}' to an array that includes ${t} or to 'false' to disable the page size selector.`),e.unshift("")}let s=String(i?"":t);this.selectPageSizeComp?(tg(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(e=>({value:String(e)}))}createPageSizeSelectorComp(e,t){let i=this.localeService.getLocaleTextFunc(),s=i("pageSizeSelectorLabel","Page Size:"),r=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new ad).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(r).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=this.gos.get(hf);return!Array.isArray(e)||eE(e)?[20,50,100]:[...e].sort((e,t)=>e-t)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},hy={selector:"AG-PAGINATION",component:class extends lT{constructor(){super(),this.btFirst=s_,this.btPrevious=s_,this.btNext=s_,this.btLast=s_,this.lbRecordCount=s_,this.lbFirstRowOnPage=s_,this.lbLastRowOnPage=s_,this.lbCurrent=s_,this.lbTotal=s_,this.pageSizeComp=s_,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1}wireBeans(e){this.rowModel=e.rowModel,this.paginationService=e.paginationService,this.focusService=e.focusService,this.ariaAnnouncementService=e.ariaAnnouncementService}postConstruct(){let e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[hC]);let{btFirst:t,btPrevious:i,btNext:s,btLast:r}=this;this.activateTabIndex([t,i,s,r]),t.insertAdjacentElement("afterbegin",sq(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",sq(e?"next":"previous",this.gos)),s.insertAdjacentElement("afterbegin",sq(e?"previous":"next",this.gos)),r.insertAdjacentElement("afterbegin",sq(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:e=>{this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(e):this.focusService.focusGridInnerElement(e)},forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){let e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}
163].forEach(e=>{let{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:e=>{(e.key===s9.ENTER||e.key===s9.SPACE)&&(e.preventDefault(),i())}})}),hv(this,this.getGui(),this.focusService),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationService.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});let i=this.localeService.getLocaleTextFunc();return ak(e,i("thousandSeparator",","),i("decimalSeparator","."))}getTemplate(){let e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),s=e("of","of"),r=e("firstPage","First Page"),a=e("previousPage","Previous Page"),o=e("nextPage","Next Page"),n=e("lastPage","Last Page"),l=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${l}">
164                <ag-page-size-selector data-ref="pageSizeComp"></ag-page-size-selector>
165                <span class="ag-paging-row-summary-panel">
166                    <span id="ag-${l}-first-row" data-ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
167                    <span id="ag-${l}-to">${i}</span>
168                    <span id="ag-${l}-last-row" data-ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
169                    <span id="ag-${l}-of">${s}</span>
170                    <span id="ag-${l}-row-count" data-ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
171                </span>
172                <span class="ag-paging-page-summary-panel" role="presentation">
173                    <div data-ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
174                    <div data-ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>
175                    <span class="ag-paging-description">
176                        <span id="ag-${l}-start-page">${t}</span>
177                        <span id="ag-${l}-start-page-number" data-ref="lbCurrent" class="ag-paging-number"></span>
178                        <span id="ag-${l}-of-page">${s}</span>
179                        <span id="ag-${l}-of-page-number" data-ref="lbTotal" class="ag-paging-number"></span>
180                    </span>
181                    <div data-ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
182                    <div data-ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>
183                </span>
184            </div>`}onBtNext(){this.nextButtonDisabled||this.paginationService.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationService.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationService.goToLastPage()}enableOrDisableButtons(){let e=this.paginationService.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.paginationService.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);let s=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===i-1||s,this.lastButtonDisabled=!t||s||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){i$(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.paginationService.getTotalPages();return e&&0===t}updateLabels(){let e,t,i,s,r,a=this.rowModel.isLastRowIndexKnown(),o=this.paginationService.getTotalPages(),n=this.paginationService.getMasterRowCount(),l=a?n:null;if(1===l){let e=this.rowModel.getRow(0);if(e&&e.group&&!(e.groupData||e.aggData))return void this.setTotalLabelsToZero()}let h=this.paginationService.getCurrentPage(),d=this.paginationService.getPageSize();this.isZeroPagesToDisplay()?e=t=0:(t=(e=d*h+1)+d-1,a&&t>l&&(t=l));let u=e+d-1,c=this.formatNumber(e);this.lbFirstRowOnPage.textContent=c;let p=this.localeService.getLocaleTextFunc();i=!a&&n<u?p("pageLastRowUnknown","?"):this.formatNumber(t),this.lbLastRowOnPage.textContent=i;let g=o>0,m=this.formatNumber(g?h+1:0);if(this.lbCurrent.textContent=m,a)s=this.formatNumber(o),r=this.formatNumber(l);else{let e=p("more","more");s=e,r=e}this.lbTotal.textContent=s,this.lbRecordCount.textContent=r,this.announceAriaStatus(c,i,r,m,s)}announceAriaStatus(e,t,i,s,r){let a=this.localeService.getLocaleTextFunc(),o=a("page","Page"),n=a("to","to"),l=a("of","of"),h=`${e} ${n} ${t} ${l} ${i}`,d=`${o} ${s} ${l} ${r}`;h!==this.ariaRowStatus&&(this.ariaRowStatus=h,this.ariaAnnouncementService.announceValue(h,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnouncementService.announceValue(d,"paginationPage"))}setTotalLabelsToZero(){let e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}}},hw={version:a0,moduleName:"@ag-grid-community/pagination-core",beans:[class extends tk{constructor(){super(...arguments),this.beanName="paginationService",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDis
184playedRowIndex=0,this.masterRowCount=0}wireBeans(e){this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return hy}isPaginateChildRows(){return!!(this.gos.get("groupRemoveSingleChildren")||this.gos.get("groupRemoveLowestSingleChildren"))||this.gos.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){this.active&&this.currentPage!==e&&"number"==typeof this.currentPage&&(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}isRowPresent(e){return e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;let t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){let e=Math.floor(this.rowModel.getRowCount()/this.pageSize);this.goToPage(e)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return eM(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:eM(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:eM(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:eM(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.pageBoundsService.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}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(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)return void this.setZeroRows();let e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();let t=this.pageSize*this.currentPage,i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{let e=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=e-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),0===this.masterRowCount)return void this.setZeroRows();let e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDis
184playedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){let{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:s=!1}=e;this.eventService.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:s,keepRenderedRows:t})}},hm]},hb="clientSide",hS="serverSide",hx="infinite",hM={onGroupExpandedOrCollapsed:[hb],refreshClientSideRowModel:[hb],isRowDataEmpty:[hb],forEachLeafNode:[hb],forEachNodeAfterFilter:[hb],forEachNodeAfterFilterAndSort:[hb],resetRowHeights:[hb],applyTransaction:[hb],applyTransactionAsync:[hb],flushAsyncTransactions:[hb],getBestCostNodeSelection:[hb],getServerSideSelectionState:[hS],setServerSideSelectionState:[hS],applyServerSideTransaction:[hS],applyServerSideTransactionAsync:[hS],applyServerSideRowData:[hS],retryServerSideLoads:[hS],flushServerSideAsyncTransactions:[hS],refreshServerSide:[hS],getServerSideGroupLevelState:[hS],refreshInfiniteCache:[hx],purgeInfiniteCache:[hx],getInfiniteRowCount:[hx],isLastRowIndexKnown:[hx,hS],expandAll:[hb,hS],collapseAll:[hb,hS],onRowHeightChanged:[hb,hS],setRowCount:[hx,hS],getCacheBlockState:[hx,hS]},hD={getValue:{version:"v31.3",new:"getCellValue"},getFirstDisplayedRow:{version:"v31.1",new:"getFirstDisplayedRowIndex"},getLastDisplayedRow:{version:"v31.1",new:"getLastDisplayedRowIndex"},getModel:{version:"v31.1",message:"Please use the appropriate grid API methods instead."},setColumnVisible:{version:"v31.1",old:"setColumnVisible(key,visible)",new:"setColumnsVisible([key],visible)"},setColumnPinned:{version:"v31.1",old:"setColumnPinned(key,pinned)",new:"setColumnsPinned([key],pinned)"},moveColumn:{version:"v31.1",old:"moveColumn(key, toIndex)",new:"moveColumns([key], toIndex)"},setColumnWidth:{version:"v31.1",old:"setColumnWidth(col, width)",new:"setColumnWidths([{key: col, newWidth: width}])"},autoSizeColumn:{version:"v31.1",old:"autoSizeColumn(key, skipHeader)",new:"autoSizeColumns([key], skipHeader)"},addAggFunc:{version:"v31.1",old:"addAggFunc(key, func)",new:"addAggFuncs({ key: func })"},removeValueColumn:{version:"v31.1",old:"removeValueColumn(colKey)",new:"removeValueColumns([colKey])"},addValueColumn:{version:"v31.1",old:"addValueColumn(colKey)",new:"addValueColumns([colKey])"},removeRowGroupColumn:{version:"v31.1",old:"removeRowGroupColumn(colKey)",new:"removeRowGroupColumns([colKey])"},addRowGroupColumn:{version:"v31.1",old:"addRowGroupColumn(colKey)",new:"addRowGroupColumns([colKey])"},removePivotColumn:{version:"v31.1",old:"removePivotColumn(colKey)",new:"removePivotColumns([colKey])"},addPivotColumn:{version:"v31.1",old:"addPivotColumn(colKey)",new:"addPivotColumns([colKey])"},showColumnMenuAfterButtonClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere."},showColumnMenuAfterMouseClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere."},getFilterInstance:{version:"v31.1",message:"'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."},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()"}},hE=(e,t)=>{var i;let s=null!=(i=t.rowModelType)?i:"clientSide";return"clientSide"===s||"serverSide"===s?{module:"@ag-grid-enterprise/row-grouping"}:null},hI={objectName:"colDef",allProperties:["headerName","columnGroupShow","headerClass","toolPanelClass","headerValueGetter","pivotKeys","groupId","colId","sort","initialSort","field","type","cellDataType","tooltipComponent","tooltipField","headerTooltip","cellClass","showRowGroup","filter","initialAggFunc","defaultAggFunc","aggFunc","pinned","initialPinned","chartDataType","cellAriaRole","cellEditorPopupPosition","headerGroupComponent","headerGroupComponentParams","cellStyle","cellRenderer","cellRendererParams","cellEditor","cellEditorParams","filterParams","pivotValueColumn","headerComponent","headerComponentParams","floatingFilterComponent","floatingFilterComponentParams","tooltipComponentParams","refData","columnsMenuParams","columnChooserParams","children","sortingOrder","allowedAggFuncs","menuTabs","pivotTotalColumnIds","cellClassRules","icons","sortIndex","initialSortIndex","flex","initialFlex","width","initialWidth","minWidth","maxWidth","rowGroupIndex","initialRowGroupIndex","pivotIndex","initialPivotIndex","suppressCellFlash","suppressColumnsToolPanel","suppressFiltersToolPanel","openByDefault","marryChildren","suppressStickyLabel","hide","initialHide","rowGroup","initialRowGroup","pivot","initialPivot","checkboxSelection","showDisabledCheckboxes","headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly","suppressMenu","suppressHeaderMenuButton","suppressMovable","lockPosition","lockVisible","lockPinned","unSortIcon","suppressSizeToFit","suppressAutoSize","enableRowGroup","enablePivot","enableValue","editable","suppressPaste","suppressNavigable","enableCellChangeFlash","rowDrag","dndSource","autoHeight","wrapText","sortable","resizable","singleClickEdit","floatingFilter","cellEditorPopup","suppressFillHandle","wrapHeaderText","autoHeaderHeight","dndSourceOnRowDrag","valueGetter","valueSetter","filterValueGetter","keyCreator","valueFormatter","valueParser","comparator","equals","pivotComparator","suppressKeyboardEvent","suppressHeaderKeyboardEvent","colSpan","rowSpan","getQuickFilterText","onCellValueChanged","onCellClicked","onCellDoubleClicked","onCellContextMenu","rowDragText","tooltipValueGetter","cellRendererSelector","cellEditorSelector","suppressS
184panHeaderHeight","useValueFormatterForExport","useValueParserForImport","mainMenuItems","contextMenuItems","suppressFloatingFilterButton","suppressHeaderFilterButton","suppressHeaderContextMenu","loadingCellRenderer","loadingCellRendererParams","loadingCellRendererSelector","context"],docsUrl:"column-properties/",deprecations:{columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},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."}},validations:{enableRowGroup:hE,rowGroup:hE,rowGroupIndex:hE,enablePivot:hE,enableValue:hE,pivot:hE,pivotIndex:hE,aggFunc:hE,cellEditor:e=>"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var t;let i=["columnsMenuTab","generalMenuTab"];return null!=(t=e.menuTabs)&&t.some(e=>i.includes(e))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>hI}},hA={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,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,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1},hR=class extends tk{constructor(){super(...arguments),this.beanName="validationService"}wireBeans(e){this.beans=e,this.gridOptions=e.gridOptions}postConstruct(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,{objectName:"gridOptions",allProperties:[...iR.ALL_PROPERTIES,...iL.EVENT_CALLBACKS],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:{advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all c
184olumns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."},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."}},validations:{sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",validate:e=>{var t;let i=null!=(t=e.rowModelType)?t:"clientSide";switch(i){case"clientSide":{let t=`treeData requires 'getDataPath' in the ${i} row model.`;return e.getDataPath?null:t}case"serverSide":{let t=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:t}}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],validate:e=>{var t;switch(null!=(t=e.rowModelType)?t:"clientSide"){case"clientSide":break;case"serverSide":return e.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null}return null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:[void 0,"bottom"]}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}}
184,groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},paginationPageSizeSelector:{validate:e=>{let t=e.paginationPageSizeSelector;return"boolean"==typeof t||null==t||t.length?null:`'paginationPageSizeSelector' cannot be an empty array.
185                    If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},rowSelection:{validate:({rowSelection:e})=>e&&"string"==typeof e?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':e&&"object"!=typeof e?"Expected `RowSelectionOptions` object for the `rowSelection` property.":null},cellSelection:{module:"@ag-grid-enterprise/range-selection"},columnDefs:()=>hI,defaultColDef:()=>hI,defaultColGroupDef:()=>hI,autoGroupColumnDef:()=>hI,selectionColumnDef:()=>hI}})}validateApiFunction(e,t){return function(e,t,i){let s=hD[e];if(s){let{version:i,new:r,old:a,message:o}=s,n=null!=a?a:e;return(...e)=>{let s=r?`Please use ${r} instead. `:"";return ep(`Since ${i} api.${n} is deprecated. ${s}${null!=o?o:""}`),t.apply(t,e)}}let r=hM[e];return r?(...s)=>{let a=i.rowModel.getType();return r.includes(a)?t.apply(t,s):void eg(`api.${e} can only be called when gridOptions.rowModelType is ${r.join(" or ")}`)}:t}(e,t,this.beans)}processOptions(e,t){let{validations:i,deprecations:s,allProperties:r,propertyExceptions:a,objectName:o,docsUrl:n}=t;r&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...null!=a?a:[],...Object.keys(s)],r,o,n);let l=new Set;Object.keys(e).forEach(t=>{let r,a=s[t];if(a)if("renamed"in a){let{renamed:i,version:s}=a;l.add(`As of v${s}, ${String(t)} is deprecated. Please use ${String(i)} instead.`),e[i]=e[t]}else{let{message:e,version:i}=a;l.add(`As of v${i}, ${String(t)} is deprecated. ${null!=e?e:""}`)}let o=e[t];if(null==o||!1===o)return;let n=i[t];if(!n)return;if("function"==typeof n){let i=n(e,this.gridOptions);if(!i)return;if("objectName"in i){let s=e[t];return Array.isArray(s)?void s.forEach(e=>{this.processOptions(e,i)}):void this.processOptions(e[t],i)}r=i}else r=n;let{module:h,dependencies:d,validate:u,supportedRowModels:c}=r;if(c){var p;let e=null!=(p=this.gridOptions.rowModelType)?p:"clientSide";if(!c.includes(e))return void l.add(`${String(t)} is not supported with the '${e}' row model.`)}if(h){let e=Array.isArray(h)?h:[h],i=!0;if(e.forEach(e=>{this.gos.assertModuleRegistered(e,String(t))||(i=!1,l.add(`${String(t)} is only available when ${e} is loaded.`))}),!i)return}if(d){let i=this.checkForRequiredDependencies(t,d,e);if(i)return void l.add(i)}if(u){let t=u(e,this.gridOptions);if(t)return void l.add(t)}}),l.size>0&&l.forEach(e=>{ep(e)})}checkForRequiredDependencies(e,t,i){let s=Object.entries(t).find(([e,t])=>{let s=i[e];return!t.includes(s)});if(!s)return null;let[r,a]=s;return a.length>1?`'${String(e)}' requires '${r}' to be one of [${a.join(", ")}].`:`'${String(e)}' requires '${r}' to be ${a[0]}.`}checkProperties(e,t,i,s,r){var a,o,n;let l,h,d=(a=Object.getOwnPropertyNames(e),o=["__ob__","__v_skip","__metadata__",...t,...i],n=i,l={},(h=a.filter(e=>!o.some(t=>t===e))).length>0&&h.forEach(e=>l[e]=rp({inputValue:e,allSuggestions:n}).values),l);if(tK(d,(e,t)=>{let r=`invalid ${s} property '${e}' did you mean any of these: ${t.slice(0,8).join(", ")}.`;i.includes("context")&&(r+=`
186If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),ep(r)}),Object.keys(d).length>0&&r){let e=this.getFrameworkOverrides().getDocLink(r);ep(`to see all the valid ${s} properties please check: ${e}`)}}},hT={version:a0,moduleName:"@ag-grid-community/core"},hL={version:a0,moduleName:"@ag-grid-community/core-community-features",dependantModules:[hT,{version:a0,moduleName:"@ag-grid-community/core-validations",beans:[hR]},{version:a0,moduleName:"@ag-grid-community/editing",dependantModules:[ld,{version:a0,moduleName:"@ag-grid-community/undo-redo-edit",beans:[la],dependantModules:[ld]},{version:a0,moduleName:"@ag-grid-community/full-row-edit",beans:[lh],dependantModules:[ld]},lc,{version:a0,moduleName:"@ag-grid-community/edit-api",apiFunctions:{undoCellEditing:function(e){var t;null==(t=e.undoRedoService)||t.undo("api")},redoCellEditing:function(e){var t;null==(t=e.undoRedoService)||t.redo("api")},getCellEditorInstances:function(e,t={}){return e.rowRenderer.getCellEditorInstances(t).map(rB)},getEditingCells:function(e){return e.rowRenderer.getEditingCells()},stopEditing:function(e,t=!1){e.rowRenderer.stopEditing(t)},startEditingCell:function(e,t){let i,s,r=e.columnModel.getCol(t.col
186Key);if(!r)return void ep(`no column found for ${t.colKey}`);let a={rowIndex:t.rowIndex,rowPinned:t.rowPinned||null,column:r};null==t.rowPinned&&ln(e,t.rowIndex),lo(e,t.colKey);let o=e.navigationService.getCellByPosition(a);if(!o)return;let{focusService:n,gos:l}=e,h=l.get("stopEditingWhenCellsLoseFocus")&&(i=eZ(l),i!==(s=o.getGui())&&!!(null!=s&&s.contains(i)));(h||!n.isCellFocused(a))&&n.setFocusedCell({...a,forceBrowserFocus:h,preventScrollOnBrowserFocus:!0}),o.startRowOrCellEdit(t.key)},getCurrentUndoSize:function(e){var t,i;return null!=(t=null==(i=e.undoRedoService)?void 0:i.getCurrentUndoStackSize())?t:0},getCurrentRedoSize:function(e){var t,i;return null!=(t=null==(i=e.undoRedoService)?void 0:i.getCurrentRedoStackSize())?t:0}},dependantModules:[ld]}]},ou,{version:a0,moduleName:"@ag-grid-community/state",dependantModules:[hg,{version:a0,moduleName:"@ag-grid-community/state-api",apiFunctions:{getState:function(e){var t,i;return null!=(t=null==(i=e.stateService)?void 0:i.getState())?t:{}}},dependantModules:[hg]}]},{version:a0,moduleName:"@ag-grid-community/data-type",beans:[hn]},{version:a0,moduleName:"@ag-grid-community/aligned-grid",beans:[ho]},{version:a0,moduleName:"@ag-grid-community/pagination",dependantModules:[hw,{version:a0,moduleName:"@ag-grid-community/pagination-api",dependantModules:[hw],apiFunctions:{paginationIsLastPageFound:function(e){return e.rowModel.isLastRowIndexKnown()},paginationGetPageSize:function(e){var t,i;return null!=(t=null==(i=e.paginationService)?void 0:i.getPageSize())?t:100},paginationGetCurrentPage:function(e){var t,i;return null!=(t=null==(i=e.paginationService)?void 0:i.getCurrentPage())?t:0},paginationGetTotalPages:function(e){var t,i;return null!=(t=null==(i=e.paginationService)?void 0:i.getTotalPages())?t:1},paginationGetRowCount:function(e){return e.paginationService?e.paginationService.getMasterRowCount():e.rowModel.getRowCount()},paginationGoToNextPage:function(e){var t;null==(t=e.paginationService)||t.goToNextPage()},paginationGoToPreviousPage:function(e){var t;null==(t=e.paginationService)||t.goToPreviousPage()},paginationGoToFirstPage:function(e){var t;null==(t=e.paginationService)||t.goToFirstPage()},paginationGoToLastPage:function(e){var t;null==(t=e.paginationService)||t.goToLastPage()},paginationGoToPage:function(e,t){var i;null==(i=e.paginationService)||i.goToPage(t)}}}]},{version:a0,moduleName:"@ag-grid-community/api",dependantModules:[{version:a0,moduleName:"@ag-grid-community/core-api",apiFunctions:{getGridId:function(e){return e.context.getGridId()},destroy:function(e){e.gridDestroyService.destroy()},isDestroyed:function(e){return e.gridDestroyService.isDestroyCalled()},getGridOption:function(e,t){return e.gos.get(t)},setGridOption:function(e,t,i){hh(e,{[t]:i})},updateGridOptions:hh}},{version:a0,moduleName:"@ag-grid-community/pinned-row-api",apiFunctions:{getPinnedTopRowCount:function(e){return e.pinnedRowModel.getPinnedTopRowCount()},getPinnedBottomRowCount:function(e){return e.pinnedRowModel.getPinnedBottomRowCount()},getPinnedTopRow:function(e,t){return e.pinnedRowModel.getPinnedTopRow(t)},getPinnedBottomRow:function(e,t){return e.pinnedRowModel.getPinnedBottomRow(t)}}},{version:a0,moduleName:"@ag-grid-community/row-selection-api",apiFunctions:{setNodesSelected:function(e,t){if(!t.nodes.every(e=>e.rowPinned?(ep("cannot select pinned rows"),!1):void 0!==e.id||(ep("cannot select node until id for node is known"),!1)))return;let{nodes:i,source:s,newValue:r}=t;e.selectionService.setNodesSelected({nodes:i,source:null!=s?s:"api",newValue:r})},selectAll:function(e,t="apiSelectAll"){e.selectionService.selectAllRowNodes({source:t})},deselectAll:function(e,t="apiSelectAll"){e.selectionService.deselectAllRowNodes({source:t})},selectAllFiltered:function(e,t="apiSelectAllFiltered"){e.selectionService.selectAllRowNodes({source:t,justFiltered:!0})},deselectAllFiltered:function(e,t="apiSelectAllFiltered"){e.selectionService.deselectAllRowNodes({source:t,justFiltered:!0})},selectAllOnCurrentPage:function(e,t="apiSelectAllCurrentPage"){e.selectionService.selectAllRowNodes({source:t,justCurrentPage:!0})},deselectAllOnCurrentPage:function(e,t="apiSelectAllCurrentPage"){e.selectionService.deselectAllRowNodes({source:t,justCurrentPage:!0})},getSelectedNodes:function(e){return e.selectionService.getSelectedNodes()},getSelectedRows:function(e){return e.selectionService.getSelectedRows()}}},{version:a0,moduleName:"@ag-grid-community/column-api",apiFunctions:{getColumnDef:function(e,t){le
vendor: 2,822 bytes, line 186
186t i=e.columnModel.getColDefCol(t);return i?i.getColDef():null},getColumnDefs:function(e){return e.columnModel.getColumnDefs()},sizeColumnsToFit:function(e,t){"number"==typeof t?e.columnSizeService.sizeColumnsToFit(t,"api"):e.ctrlsService.getGridBodyCtrl().sizeColumnsToFit(t)},setColumnGroupOpened:function(e,t,i){e.columnModel.setColumnGroupOpened(t,i,"api")},getColumnGroup:function(e,t,i){return e.visibleColsService.getColumnGroup(t,i)},getProvidedColumnGroup:function(e,t){return e.columnModel.getProvidedColGroup(t)},getDisplayNameForColumn:function(e,t,i){return e.columnNameService.getDisplayNameForColumn(t,i)||""},getDisplayNameForColumnGroup:function(e,t,i){return e.columnNameService.getDisplayNameForColumnGroup(t,i)||""},getColumn:function(e,t){return e.columnModel.getColDefCol(t)},getColumns:function(e){return e.columnModel.getColDefCols()},applyColumnState:function(e,t){return e.columnApplyStateService.applyColumnState(t,"api")},getColumnState:function(e){return e.columnGetStateService.getColumnState()},resetColumnState:function(e){e.columnApplyStateService.resetColumnState("api")},getColumnGroupState:function(e){return e.columnGroupStateService.getColumnGroupState()},setColumnGroupState:function(e,t){e.columnGroupStateService.setColumnGroupState(t,"api")},resetColumnGroupState:function(e){e.columnGroupStateService.resetColumnGroupState("api")},isPinning:function(e){return e.visibleColsService.isPinningLeft()||e.visibleColsService.isPinningRight()},isPinningLeft:function(e){return e.visibleColsService.isPinningLeft()},isPinningRight:function(e){return e.visibleColsService.isPinningRight()},getDisplayedColAfter:function(e,t){return e.visibleColsService.getColAfter(t)},getDisplayedColBefore:function(e,t){return e.visibleColsService.getColBefore(t)},setColumnVisible:function(e,t,i){e.columnModel.setColsVisible([t],i,"api")},setColumnsVisible:function(e,t,i){e.columnModel.setColsVisible(t,i,"api")},setColumnPinned:function(e,t,i){e.columnModel.setColsPinned([t],i,"api")},setColumnsPinned:function(e,t,i){e.columnModel.setColsPinned(t,i,"api")},getAllGridColumns:function(e){return e.columnModel.getCols()},getDisplayedLeftColumns:function(e){return e.visibleColsService.getLeftCols()},getDisplayedCenterColumns:function(e){return e.visibleColsService.getCenterCols()},getDisplayedRightColumns:function(e){return e.visibleColsService.getRightCols()},getAllDisplayedColumns:function(e){return e.visibleColsService.getAllCols()},getAllDisplayedVirtualColumns:function(e){return e.columnViewportService.getViewportColumns()},moveColumn:function(e,t,i){e.columnMoveService.moveColumns([t],i,"api")},moveColumnByIndex:function(e,t,i){e.columnMoveService.moveColumnByIndex(t,i,"api")},moveColumns:function(e,t,i){e.columnMoveService.moveColumns(t,i,"api")},setColumnWidth:function(e,t,i,s=!0,
186r="api"){e.columnSizeService.setColumnWidths([{key:t,newWidth:i}],!1,s,r)},setColumnWidths:function(e,t,i=!0,s="api"){e.columnSizeService.setColumnWidths(t,!1,i,s)},getLeftDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeLeft()},getCenterDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeCenter()},getRightDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeRight()},getAllDisplayedColumnGroups:function(e){return e.visibleColsService.getAllTrees()},autoSizeColumn:function(e,t,i){return e.columnAutosizeService.autoSizeCols({colKeys:[t],skipHeader:i,source:"api"})},autoSizeColumns:function(e,t,i){e.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"api"})},autoSizeAllColumns:function(e,t){e.columnAutosizeService.autoSizeAllColumns("api",t)}}},{version:a0,moduleName:"@ag-grid-community/row-api",apiFunctions:{redrawRows:function(e,t={}){let i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))},setRowNodeExpanded:function(e,t,i,s,r){e.expansionService.setRowNodeExpanded(t,i,s,r)},getRowNode:function(e,t){return e.rowModel.getRowNode(t)},addRenderedRowListener:function(e,t,i,s){e.rowRenderer.addRenderedRowListener(t,i,s)},getRenderedNodes:function(e){return e.rowRenderer.getRenderedNodes()},forEachNode:function(e,t,i){e.rowModel.forEachNode(t,i)},getFirstDisplayedRow:function(e){return hd(e)},getFirstDisplayedRowIndex:hd,getLastDisplayedRow:function(e){return hu(e)},getLastDisplayedRowIndex:hu,getDisplayedRowAtIndex:function(e,t){return e.rowModel.getRow(t)},getDisplayedRowCount:function(e){return e.rowModel.getRowCount()},getModel:function(e){return e.rowModel}}},{version:a0,moduleName:"@ag-grid-community/drag-api",apiFunctions:{addRowDropZone:function(e,t){e.ctrlsService.getGridBodyCtrl().getRowDragFeature().addRowDropZone(t)},removeRowDropZone:function(e,t){let i=e.dragAndDropService.findExternalZone(t);i&&e.dragAndDropService.removeDropTarget(i)},getRowDropZoneParams:function(e,t){return e.ctrlsService.getGridBodyCtrl().getRowDragFeature().getRowDropZone(t)}}},{version:a0,moduleName:"@ag-grid-community/scroll-api",apiFunctions:{getVerticalPixelRange:function(e){return e.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition()},getHorizontalPixelRange:function(e){return e.ctrlsService.getGridBodyCtrl().getScrollFeature().getHScrollPosition()},ensureColumnVisible:lo,ensureIndexVisible:ln,ensureNodeVisible:function(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}}},{version:a0,moduleName:"@ag-grid-community/overlay-api",apiFunctions:{showLoadingOverlay:function(e){e.overlayService.showLoadingOverlay()},showNoRowsOverlay:function(e){e.overlayService.showNoRowsOverlay()},hideOverlay:function(e){e.overlayService.hideOverlay()}}},{version:a0,moduleName:"@ag-grid-community/keyboard-navigation-api",apiFunctions:{getFocusedCell:function(e){return e.focusService.getFocusedCell()},clearFocusedCell:function(e){return e.focusService.clearFocusedCell()},setFocusedCell:function(e,t,i,s){e.focusService.setFocusedCell({rowIndex:t,column:i,rowPinned:s,forceBrowserFocus:!0})},setFocusedHeader:function(e,t,i=!1){let s=e.headerNavigationService.getHeaderPositionForColumn(t,i);s&&e.focusService.focusHeaderPosition({headerPosition:s})},tabToNextCell:function(e,t){return e.navigationService.tabToNextCell(!1,t)},tabToPreviousCell:function(e,t){return e.navigationService.tabToNextCell(!0,t)}}},{version:a0,moduleName:"@ag-grid-community/event-api",apiFunctions:{addEventListener:function(e,t,i){e.apiEventService.addEventListener(t,i)},addGlobalListener:function(e,t){e.apiEventService.addGlobalListener(t)},removeEventListener:function(e,t,i){e.apiEventService.removeEventListener(t,i)},removeGlobalListener:function(e,t){e.apiEventService.removeGlobalListener(t)}}},{version:a0,moduleName:"@ag-grid-community/render-api",apiFunctions:{setGridAriaProperty:function(e,t,i){if(!t)return;let s=e.ctrlsService.getGridBodyCtrl().getGui(),r=`aria-${t}`;null===i?s.removeAttribute(r):s.setAttribute(r,i)},refreshCells:function(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))},flashCells:function(e,t={}){let i=e=>ep(`Since v31.1 api.flashCells parameter '${e}Delay' is deprecated. Please use '${e}Duration' instead.`);eM(t.fadeDelay)&&i("fade"),eM(t.flashDelay)&&i("flash"),e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.flashCells(t))},refreshHeader:function(e){e.frameworkOverrides.wrapIncoming(()=>
186e.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))},isAnimationFrameQueueEmpty:function(e){return e.animationFrameService.isQueueEmpty()},flushAllAnimationFrames:function(e){e.animationFrameService.flushAllFrames()},getSizesForCurrentTheme:function(e){return{rowHeight:ej(e.gos),headerHeight:e.columnModel.getHeaderHeight()}},getCellRendererInstances:function(e,t={}){return e.rowRenderer.getCellRendererInstances(t).map(rB)}}},{version:a0,moduleName:"@ag-grid-community/cell-api",apiFunctions:{expireValueCache:function(e){e.valueCache.expire()},getValue:function(e,t,i){return hl(e,{colKey:t,rowNode:i})},getCellValue:hl}},hc,{version:a0,moduleName:"@ag-grid-community/sort-api",apiFunctions:{onSortChanged:function(e){e.sortController.onSortChanged("api")}}}]}]},hF=class extends tk{constructor(){super(...arguments),this.beanName="gridDestroyService",this.destroyCalled=!1}wireBeans(e){this.beans=e}destroy(){var e,t,i;this.destroyCalled||(this.eventService.dispatchEvent({type:"gridPreDestroyed",state:null!=(e=null==(t=this.beans.stateService)?void 0:t.getState())?e:{}}),this.destroyCalled=!0,null==(i=this.beans.ctrlsService.get("gridCtrl"))||i.destroyGridUi(),this.beans.context.destroy(),super.destroy())}isDestroyCalled(){return this.destroyCalled}},hP=new Set(["gridPreDestroyed","fillStart","pasteStart"]),hk=e=>"checkboxSelected"===e||"rowClicked"===e||"spaceKey"===e||"uiSelectAll"===e||"uiSelectAllCurrentPage"===e||"uiSelectAllFiltered"===e,hN=new Map([...iR.BOOLEAN_PROPERTIES.map(e=>[e,eT]),...iR.NUMBER_PROPERTIES.map(e=>[e,aT]),["groupAggFiltering",e=>"function"==typeof e?e:eT(e)],["pageSize",aL(1)],["autoSizePadding",aL(0)],["keepDetailRowsCount",aL(1)],["rowBuffer",aL(0)],["infiniteInitialRowCount",aL(1)],["cacheOverflowSize",aL(1)],["cacheBlockSize",aL(1)],["serverSideInitialRowCount",aL(1)],["viewportRowModelPageSize",aL(1)],["viewportRowModelBufferSize",aL(0)]]);function hO(e,t){let i=hN.get(e);return i?i(t):t}var hG=class e extends tk{constructor(){super(...arguments),this.beanName="gos",this.gridReadyFired=!1,this.queueEvents=[],this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new el,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;let s=hP.has(t);if(s&&!e||!s&&e)return;let r=(e,t)=>{let i=this.gridOptions[iL.getCallbackForEvent(e)];"function"==typeof i&&this.frameworkOverrides.wrapOutgoing(()=>i(t))};if(this.gridReadyFired)r(t,i);else if("gridReady"===t){for(let e of(r(t,i),this.gridReadyFired=!0,this.queueEvents))r(e.eventName,e.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:i})}}wireBeans(e){this.gridOptions=e.gridOptions,this.eGridDiv=e.eGridDiv,this.validationService=e.validationService,this.environment=e.environment,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){let e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){var t;return null!=(t=this.gridOptions[e])?t:hA[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return eM(this.gridOptions[e])}mergeGridCommonParams(e){return e?t=>(t.api=this.api,t.context=this.gridOptionsContext,e(t)):e}updateGridOptions({options:t,force:i,source:s="api"}){var r;let a={id:e.changeSetId++,properties:[]},o=[];Object.entries(t).forEach(([e,t])=>{"api"===s&&iI[e]&&ep(`${e} is an initial property and cannot be updated.`);let r=hO(e,t),n=i||"object"==typeof r&&"api"===s,l=this.gridOptions[e];(n||l!==r)&&(this.gridOptions[e]=r,o.push({type:e,currentValue:r,previousValue:l,changeSet:a,source:s}))}),null==(r=this.validationService)||r.processGridOptions(this.gridOptions),a.properties=o.map(e=>
186e.type),o.forEach(e=>{this.gridOptions.debug&&ec(`Updated property ${e.type} from`,e.previousValue," to ",e.currentValue),this.propertyEventService.dispatchEvent(e)})}addPropertyEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removePropertyEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}getGridCommonParams(){return{api:this.api,context:this.gridOptionsContext}}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){return rV.__assertRegistered(e,t,this.gridId)}isModuleRegistered(e){return rV.__isRegistered(e,this.gridId)}};hG.changeSetId=0;var hB=hG,hz=class extends tk{constructor(){super(...arguments),this.beanName="headerPositionUtils"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}findHeader(e,t){let i,s;if(iy(e.column)?i=this.visibleColsService.getGroupAtDirection(e.column,t):(s=`getCol${t}`,i=this.visibleColsService[s](e.column)),!i)return;let{headerRowIndex:r}=e;if("filter"!==this.getHeaderRowType(r)){let e=[i];for(;i.getParent();)e.push(i=i.getParent());i=e[e.length-1-r]}let{column:a,headerRowIndex:o}=this.getHeaderIndexToFocus(i,r);return{column:a,headerRowIndex:o}}getHeaderIndexToFocus(e,t){let i;if(iy(e)&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){let s=i=e.getLeafColumns()[0];for(;s!==e;)t++,s=s.getParent()}return{column:i||e,headerRowIndex:t}}isAnyChildSpanningHeaderHeight(e){return!!e&&e.getLeafColumns().some(e=>e.isSpanHeaderHeight())}getColumnVisibleParent(e,t){let i=this.getHeaderRowType(t),s="filter"===i?e:e.getParent(),r=t-1,a=r;if("column"===i&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;s&&s.isPadding();)s=s.getParent(),r--;a=r,r<0&&(s=e,r=t,a=void 0)}return{column:s,headerRowIndex:r,headerRowIndexWithoutSpan:a}}getColumnVisibleChild(e,t,i="After"){let s=this.getHeaderRowType(t),r=e,a=t+1,o=a;if("group"===s){let t=e.getDisplayedLeafColumns(),s="After"===i?t[0]:tp(t),o=[],n=s;for(;n.getParent()!==e;)n=n.getParent(),o.push(n);if(r=s,s.isSpanHeaderHeight())for(let e=o.length-1;e>=0;e--){let t=o[e];if(!t.isPadding()){r=t;break}a++}else(r=tp(o))||(r=s)}return{column:r,headerRowIndex:a,headerRowIndexWithoutSpan:o}}getHeaderRowType(e){let t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){let i=this.visibleColsService.getAllCols(),s=i["start"===t?0:i.length-1];if(!s)return;let r=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()),a=null==r?void 0:r.getRowType(e);if("group"==a){let t=this.visibleColsService.getColGroupAtLevel(s,e);return{headerRowIndex:e,column:t}}return{headerRowIndex:null==a?-1:e,column:s}}},hV=class extends tk{constructor(){super(...arguments),this.beanName="localeService"}getLocaleTextFunc(){let e=this.gos.getCallback("getLocaleText");if(e)return(t,i,s)=>e({key:t,defaultValue:i,variableValues:s});let t=this.gos.get("localeText");return(e,i,s)=>{let r=t&&t[e];if(r&&s&&s.length){let e=0;for(;!(e>=s.length)&&-1!==r.indexOf("${variable}");)r=r.replace("${variable}",s[e++])}return null!=r?r:i}}},hH=class extends tk{constructor(){super(...arguments),this.beanName="apiEventService",this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new t$(this.getFrameworkOverrides())}addEventListener(e,t){let i=this.frameworkEventWrappingService.wrap(e,t),s=ez(this.gos)&&!hP.has(e),r=s?this.asyncEventListeners:this.syncEventListeners;r.has(e)||r.set(e,new Set),r.get(e).add(i),this.eventService.addEventListener(e,i,s)}removeEventListener(e,t){let i=this.frameworkEventWrappingService.unwrap(e,t),s=this.asyncEventListeners.get(e),r=!!(null!=s&&s.delete(i));if(!r){var a;null==(a=this.syncEventListeners.get(e))||a.delete(i)}this.eventService.removeEventListener(e,i,r)}addGlobalListener(e){let t=this.frameworkEventWrappingService.wrapGlobal(e);if(ez(this.gos)){let i=(e,i)=>{hP.has(e)&&t(e,i)},s=(e,i)=>{hP.has(e)||t(e,i)};this.globalEventListenerPairs.set(e,{syncListener:i,asyncListener:s}),this.eventService.addGlobalListener(i,!1),this.eventService.addGlobalListener(s,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}removeGlobalListener(e){let t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){let{syncListener:i,asyncListener:s}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(i,!1),this.eventService.removeGlobalListener(s,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach((e,i)=>
186{e.forEach(e=>this.eventService.removeEventListener(i,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(e=>this.eventService.removeGlobalListener(e,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:t})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(t,!0)}),this.globalEventListenerPairs.clear()}},hj=class extends tk{constructor(){super(...arguments),this.beanName="pageBoundsListener"}wireBeans(e){this.rowModel=e.rowModel,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){var t,i,s,r,a;this.calculatePages(),this.eventService.dispatchEvent({type:"paginationChanged",animate:null!=(t=null==e?void 0:e.animate)&&t,newData:null!=(i=null==e?void 0:e.newData)&&i,newPage:null!=(s=null==e?void 0:e.newPage)&&s,newPageSize:null!=(r=null==e?void 0:e.newPageSize)&&r,keepRenderedRows:null!=(a=null==e?void 0:e.keepRenderedRows)&&a})}calculatePages(){this.paginationService?this.paginationService.calculatePages():this.pageBoundsService.calculateBounds(0,this.rowModel.getRowCount()-1)}},hW=class extends tk{constructor(){super(...arguments),this.beanName="pageBoundsService",this.pixelOffset=0}wireBeans(e){this.rowModel=e.rowModel}getFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getCurrentPageHeight(){return eD(this.topRowBounds)||eD(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}}calculateBounds(e,t){this.topRowBounds=this.rowModel.getRowBounds(e),this.topRowBounds&&(this.topRowBounds.rowIndex=e),this.bottomRowBounds=this.rowModel.getRowBounds(t),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=t),this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){let e=eM(this.topRowBounds)?this.topRowBounds.rowTop:0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},hU=class extends tk{constructor(){super(),this.beanName="ariaAnnouncementService",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.updateAnnouncement=ey(this.updateAnnouncement.bind(this),200)}wireBeans(e){this.eGridDiv=e.eGridDiv}postConstruct(){let e=e$(this.gos),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),iG(t,"live","polite"),iG(t,"relevant","additions text"),iG(t,"atomic",!0),this.eGridDiv.appendChild(t)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50)}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(sm(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null,this.pendingAnnouncements.clear()}},h_=class extends tk{constructor(){super(...arguments),this.beanName="columnAnimationService",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}wireBeans(e){this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,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++;let e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(e,t){if(0===this.executeNextFuncs.length&&0===this.executeLaterFuncs.length){e(),t();return}let i=e=>{for(;e.length;){let t=e.pop();t&&t()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e(),i(this.executeNextFuncs)},0),window.setTimeout(()=>{t(),i(this.executeLaterFuncs)},200)})}},h$=class extends tk{constructor(){super(...arguments),this.beanName="
186columnHoverService"}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}updateState(e){this.selectedColumns=e,this.eventService.dispatchEvent({type:"columnHoverChanged"})}},hY=class extends tk{constructor(){super(...arguments),this.beanName="overlayService",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.rowModel=e.rowModel,this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}postConstruct(){this.isClientSide=eN(this.gos);let e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.onGridSizeChanged.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.overlayWrapperComp=e,this.updateOverlayVisibility()}isVisible(){return 0!==this.state&&!!this.overlayWrapperComp}isExclusive(){return 1===this.state&&!!this.overlayWrapperComp}getOverlayWrapper(){return this.overlayWrapperComp}showLoadingOverlay(){this.showInitialOverlay=!1;let e=this.gos.get("loading");!e&&(void 0!==e||this.gos.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1,this.gos.get("loading")||this.gos.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){(this.showInitialOverlay=!1,this.gos.get("loading"))?ep("Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead."):this.doHideOverlay()}updateOverlayVisibility(){if(!this.overlayWrapperComp){this.state=0;return}let e=this.gos.get("loading");this.showInitialOverlay&&void 0===e&&!this.gos.get("suppressLoadingOverlay")&&(e=!this.gos.get("columnDefs")||!this.columnModel.isReady()||!this.gos.get("rowData")&&this.isClientSide),e?1!==this.state&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,this.rowModel.isEmpty()&&!this.gos.get("suppressNoRowsOverlay")&&this.isClientSide?2!==this.state&&this.doShowNoRowsOverlay():0!==this.state&&this.doHideOverlay())}doShowLoadingOverlay(){this.overlayWrapperComp&&(this.state=1,this.showOverlay(this.userComponentFactory.getLoadingOverlayCompDetails({}),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.overlayWrapperComp&&(this.state=2,this.showOverlay(this.userComponentFactory.getNoRowsOverlayCompDetails({}),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.overlayWrapperComp&&(this.state=0,this.overlayWrapperComp.hideOverlay(),this.updateExclusive())}showOverlay(e,t,i){var s;let r=e.newAgStackInstance();null==(s=this.overlayWrapperComp)||s.showOverlay(r,t,this.isExclusive(),i),this.refreshWrapperPadding()}updateExclusive(){let e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventService.dispatchEvent({type:"overlayExclusiveChanged"})}onGridSizeChanged(){this.refreshWrapperPadding()}refreshWrapperPadding(){if(!this.overlayWrapperComp)return;let e=0;if(2===this.state){let t=this.ctrlsService.get("gridHeaderCtrl");e=(null==t?void 0:t.getHeaderHeight())||0}else 0!==this.wrapperPadding&&(e=0);this.wrapperPadding!==e&&(this.wrapperPadding=e,this.overlayWrapperComp.updateOverlayWrapperPaddingTop(e))}},hK=class extends tk{constructor(){super(...arguments),this.beanName="rowCssClassCalculator"}wireBeans(e){this.stylingService=e.stylingService}getInitialRowClasses(e){let t=[];return eM(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),tM(t,this.processClassesFromGridOptions(e.rowNode)),tM(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&("left"===e.pinned&&t.push("ag-cell-last-left-pinned"),"right"===e.pinned&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){let t=[],i=e=>
186{"string"==typeof e?t.push(e):Array.isArray(e)&&e.forEach(e=>t.push(e))},s=this.gos.get("rowClass");if(s){if("function"==typeof s)return ep("rowClass should not be a function, please use getRowClass instead"),[];i(s)}let r=this.gos.getCallback("getRowClass");return r&&i(r({data:e.data,node:e,rowIndex:e.rowIndex})),t}preProcessRowClassRules(e){let t=[];return this.processRowClassRules(e,e=>{t.push(e)},()=>{}),t}processRowClassRules(e,t,i){let s=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),s,t,i)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}},hZ=class extends tk{constructor(){super(...arguments),this.beanName="rowContainerHeightService",this.scrollY=0,this.uiBodyHeight=0}wireBeans(e){this.ctrlsService=e.ctrlsService}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=function(){if(void 0!==Q)return Q;if(!document.body)return -1;let e=1e6,t=sk()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){let s=2*e;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),Q=e,e}(),this.gos.get("debug")&&ec("RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;let e=this.ctrlsService.getGridBodyCtrl().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;let e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.gos.get("debug")&&ec(`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){let t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;let t=this.modelHeight-this.getUiBodyHeight();return this.maxScrollY*(e/t)}},hq=class extends tk{constructor(){super(...arguments),this.beanName="rowNodeSorter"}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.showRowGroupColsService=e.showRowGroupColsService}postConstruct(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=eJ(this.gos),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=eJ(this.gos))}doFullSort(e,t){let i=e.map((e,t)=>({currentPos:t,rowNode:e}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(e=>e.rowNode)}compareRowNodes(e,t,i){let s=t.rowNode,r=i.rowNode;for(let t=0,i=e.length;t<i;t++){let i,a=e[t],o="desc"===a.sort,n=this.getValue(s,a.column),l=this.getValue(r,a.column),h=this.getComparator(a,s);if(!isNaN(i=h?h(n,l,s,r,o):eF(n,l,this.isAccentedSort))&&0!==i)return"asc"===a.sort?i:-1*i}return t.currentPos-i.currentPos}getComparator(e,t){let i=e.column,s=i.getColDef().comparator;if(null!=s)return s;if(!i.getColDef().showRowGroup)return;let r=!t.group&&i.getColDef().field;if(!r)return;let a=this.columnModel.getColDefCol(r);if(a)return a.getColDef().comparator}getValue(e,t){if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){var i,s,r;if(e4(this.gos,this.columnModel.isPivotActive())){let i=null==(r=e.allLeafChildren)?void 0:r[0];return i?this.valueService.getValue(t,i,!1,!1):void 0}let a=null==(i=this.showRowGroupColsService)?void 0:i.getShowRowGroupCol(t.getId());if(!a)return;return null==(s=e.groupData)?void 0:s[a.getId()]}if(!e.group||!t.getColDef().showRowGroup)return this.valueService.getValue(t,e,!1,!1)}},hQ=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let s=0;s<e.childrenAfterGroup.length;s++){let r=e.childrenAfterGroup[s];r.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],t,i):i&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){let e={rowNode:t,children:null};this.mapToItems[t.id]=e,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}
186),t.forEach(e=>this.nodeIdsToColumns[i.id][e.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let e=0;e<t;e++){let e=this.mapToItems[i.id],t=this.mapToItems[i.parent.id];t.children||(t.children=[]),t.children.push(e),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;let i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;let i=this.nodeIdsToColumns[e.id];return t.filter(e=>i[e.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;let i=this.nodeIdsToColumns[e.id];return t.filter(e=>!i[e.getId()])}},hX=class extends tk{constructor(){super(...arguments),this.beanName="selectionService",this.selectedNodes=new Map,this.selectionCtx=new lx,this.rowSelectionMode=void 0}wireBeans(e){this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService}postConstruct(){let{gos:e,rowModel:t,onRowSelected:i}=this;this.selectionCtx.init(t),this.rowSelectionMode=tn(e),this.groupSelectsChildren=td(e),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{let t=td(e),i=tn(e);(t!==this.groupSelectsChildren||i!==this.rowSelectionMode)&&(this.groupSelectsChildren=t,this.rowSelectionMode=i,this.deselectAllRowNodes({source:"api"}))}),this.addManagedEventListeners({rowSelected:i.bind(this)})}destroy(){super.destroy(),this.resetNodes(),this.selectionCtx.reset()}isMultiSelect(){return"multiRow"===this.rowSelectionMode}overrideSelectionValue(e,t){var i;if(!hk(t))return e;let s=this.selectionCtx.getRoot();return!s||null!=(i=s.isSelected())&&i}setNodesSelected(e){let{newValue:t,clearSelection:i,suppressFinishActions:s,rangeSelect:r,nodes:a,event:o,source:n}=e;if(0===a.length)return 0;if(a.length>1&&!this.isMultiSelect())return ep("cannot multi select unless selection mode is 'multiRow'"),0;let l=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,h=a.map(e=>e.footer?e.sibling:e);if(r){if(h.length>1)return ep("cannot range select while selecting multiple rows"),0;let e=h[0],i=this.overrideSelectionValue(t,n);if(this.isMultiSelect()){if(this.selectionCtx.isInRange(e)){let t=this.selectionCtx.truncate(e);return i&&this.selectRange(t.discard,!1,n),this.selectRange(t.keep,i,n)}else if(this.selectionCtx.getRoot()!==e){let t=this.selectionCtx.extend(e,this.groupSelectsChildren);return i&&this.selectRange(t.discard,!1,n),this.selectRange(t.keep,i,n)}}}s||this.selectionCtx.setRoot(h[0]);let d=0;for(let e=0;e<h.length;e++){var u;let i=h[e];!(l&&i.group)&&i.selectThisNode(t,o,n)&&d++,this.groupSelectsChildren&&null!=(u=i.childrenAfterGroup)&&u.length&&(d+=this.selectChildren(i,t,l,n))}return!s&&(t&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(h[0],n)),d>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),d}selectRange(e,t,i){let s=0;return e.forEach(e=>{e.group&&this.groupSelectsChildren||e.selectThisNode(t,void 0,i)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),s}selectChildren(e,t,i,s){let r=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return eD(r)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:s,nodes:r})}getSelectedNodes(){let e=[];return this.selectedNodes.forEach(t=>{t&&e.push(t)}),e}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>{t&&t.data&&e.push(t.data)}),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((i,s)=>{i&&e(i)&&t.set(s,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren||!eN(this.gos))return!1;let i=this.rowModel.getRootNode();t||(t=new hQ(!0,i)).setInactive();let s=!1;return t.forEachChangedNodeDepthFirst(t=>{if(t!==i){let i=t.calculateSelectedFromChildren();s=t.selectThisNode(null!==i&&i,void 0,e)||s}}),s}clearOtherNodes(e,t){let i=new Map,s=0;return this.selectedNodes.forEach(r=>{if(r&&r.id!==e.id){let e=this.selectedNodes.get(r.id);s+=e.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&r.parent&&i.set(r.parent.id,r.parent)}}
186),i.forEach(e=>{let i=e.calculateSelectedFromChildren();e.selectThisNode(null!==i&&i,void 0,t)}),s}onRowSelected(e){let t=e.node;this.groupSelectsChildren&&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)}syncInOldRowNode(e,t){if(eM(t)&&e.id!==t.id&&t){let i=t.id;this.selectedNodes.get(i)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){let t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){var e;null==(e=this.selectedNodes)||e.clear()}getBestCostNodeSelection(){if(!eN(this.gos))return;let e=this.rowModel.getTopLevelNodes();if(null===e)return;let t=[];return!function e(i){for(let s=0,r=i.length;s<r;s++){let r=i[s];r.isSelected()?t.push(r):r.group&&r.children&&e(r.children)}}(e),t}isEmpty(){let e=0;return this.selectedNodes.forEach(t=>{t&&e++}),0===e}deselectAllRowNodes(e){let t=e=>e.selectThisNode(!1,void 0,s),i=eN(this.gos),{source:s,justFiltered:r,justCurrentPage:a}=e;if(a||r){if(!i)return void eg("selecting just filtered only works when gridOptions.rowModelType='clientSide'");this.getNodesToSelect(r,a).forEach(t)}else this.selectedNodes.forEach(e=>{e&&t(e)}),this.reset(s);this.selectionCtx.reset(),i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)}getSelectedCounts(e,t){let i=0,s=0,r=e=>{(!this.groupSelectsChildren||!e.group)&&(e.isSelected()?i++:e.selectable&&s++)};return this.getNodesToSelect(e,t).forEach(r),{selectedCount:i,notSelectedCount:s}}getSelectAllState(e,t){let{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(e,t);return(0!==i||0!==s)&&(i>0&&s>0?null:i>0)}hasNodesToSelect(e=!1,t=!1){return this.getNodesToSelect(e,t).filter(e=>e.selectable).length>0}getNodesToSelect(e=!1,t=!1){this.validateSelectAllType();let i=[];if(t)return this.forEachNodeOnPage(e=>{if(!e.group)return void i.push(e);if(!e.expanded){let t=e=>{var s;i.push(e),null!=(s=e.childrenAfterFilter)&&s.length&&e.childrenAfterFilter.forEach(t)};t(e);return}this.groupSelectsChildren||i.push(e)}),i;let s=this.rowModel;return e?s.forEachNodeAfterFilter(e=>{i.push(e)}):s.forEachNode(e=>{i.push(e)}),i}forEachNodeOnPage(e){let t=this.pageBoundsService.getFirstRow(),i=this.pageBoundsService.getLastRow();for(let s=t;s<=i;s++){let t=this.rowModel.getRow(s);t&&e(t)}}selectAllRowNodes(e){var t,i;if(e7(this.gos)&&!tl(this.gos))return ep("cannot multi select unless selection mode is 'multiRow'");this.validateSelectAllType();let{source:s,justFiltered:r,justCurrentPage:a}=e,o=this.getNodesToSelect(r,a);o.forEach(e=>e.selectThisNode(!0,void 0,s)),this.selectionCtx.setRoot(null!=(t=o[0])?t:null),this.selectionCtx.setEndRange(null!=(i=tp(o))?i:null),eN(this.gos)&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)}getSelectionState(){let e=[];return this.selectedNodes.forEach(t=>{null!=t&&t.id&&e.push(t.id)}),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e))return eg("Invalid selection state. When using client-side row model, the state must conform to `string[]`.");let i=new Set(e),s=[];this.rowModel.forEachNode(e=>{i.has(e.id)&&s.push(e)}),this.setNodesSelected({newValue:!0,nodes:s,source:t})}dispatchSelectionChanged(e){this.eventService.dispatchEvent({type:"selectionChanged",source:e})}validateSelectAllType(){if(!eN(this.gos))throw Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`)}},hJ=class extends tk{constructor(){super(...arguments),this.beanName="selectableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){let{gos:t}=this,i=eB(t),s=to(t);if(!i||!s)return;let r=td(t),a=eN(t)&&r,o=[],n=t=>{var i;if(e&&!t.group)return;if(a&&t.group){let e=t.childrenAfterGroup.some(e=>!0===e.selectable);t.setRowSelectable(e,!0);return}let r=null==(i=null==s?void 0:s(t))||i;t.setRowSelectable(r,!0),!r&&t.isSelected()&&o.push(t)};
186a?new hQ(!1,this.rowModel.getRootNode()).forEachChangedNodeDepthFirst(n,!0,!0):this.rowModel.forEachNode(n),o.length&&this.selectionService.setNodesSelected({nodes:o,newValue:!1,source:"selectableChanged"}),a&&this.selectionService instanceof hX&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}},h0=["asc","desc",null],h1=class extends tk{constructor(){super(...arguments),this.beanName="sortController"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.showRowGroupColsService=e.showRowGroupColsService}progressSort(e,t,i){let s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i)}setSortForColumn(e,t,i,s){"asc"!==t&&"desc"!==t&&(t=null);let r=eJ(this.gos),a=[e];if(r&&e.getColDef().showRowGroup){let t=this.funcColsService.getSourceColumnsForGroupColumn(e),i=null==t?void 0:t.filter(e=>e.isSortable());i&&(a=[e,...i])}a.forEach(e=>e.setSort(t,s));let o=(i||this.gos.get("alwaysMultiSort"))&&!this.gos.get("suppressMultiSort"),n=[];if(!o){let e=this.clearSortBarTheseColumns(a,s);n.push(...e)}this.updateSortIndex(e),n.push(...a),this.dispatchSortChangedEvents(s,n)}updateSortIndex(e){var t;let i=eJ(this.gos),s=null==(t=this.showRowGroupColsService)?void 0:t.getShowRowGroupCol(e.getId()),r=i&&s||e,a=this.getColumnsWithSortingOrdered();this.columnModel.getAllCols().forEach(e=>e.setSortIndex(null));let o=a.filter(e=>(!i||!e.getColDef().showRowGroup)&&e!==r);(r.getSort()?[...o,r]:o).forEach((e,t)=>{e.setSortIndex(t)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=this.columnModel.getAllCols().filter(e=>!!e.getSort());return e&&e.length>0}dispatchSortChangedEvents(e,t){let i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i)}clearSortBarTheseColumns(e,t){let i=[];return this.columnModel.getAllCols().forEach(s=>{e.includes(s)||(s.getSort()&&i.push(s),s.setSort(void 0,t))}),i}getNextSortDirection(e){let t,i;if(!Array.isArray(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gos.get("sortingOrder")?this.gos.get("sortingOrder"):h0)||t.length<=0)return ep(`sortingOrder must be an array with at least one element, currently it's ${t}`),null;let s=t.indexOf(e.getSort()),r=s==t.length-1;return(i=s<0||r?t[0]:t[s+1],0>h0.indexOf(i))?(ep("invalid sort type ",i),null):i}getIndexedSortMap(){let e=this.columnModel.getAllCols().filter(e=>!!e.getSort());if(this.columnModel.isPivotMode()){let t=eJ(this.gos);e=e.filter(e=>{var i;let s=!!e.getAggFunc(),r=!e.isPrimary(),a=t?null==(i=this.showRowGroupColsService)?void 0:i.getShowRowGroupCol(e.getId()):e.getColDef().showRowGroup;return s||r||a})}let t=this.funcColsService.getRowGroupColumns().filter(e=>!!e.getSort()),i={};e.forEach((e,t)=>i[e.getId()]=t),e.sort((e,t)=>{let s=e.getSortIndex(),r=t.getSortIndex();return null!=s&&null!=r?s-r:null==s&&null==r?i[e.getId()]>i[t.getId()]?1:-1:null==r?-1:1});let s=eJ(this.gos)&&!!t.length;s&&(e=[...new Set(e.map(e=>{var t,i;return null!=(t=null==(i=this.showRowGroupColsService)?void 0:i.getShowRowGroupCol(e.getId()))?t:e}))]);let r=new Map;return e.forEach((e,t)=>r.set(e,t)),s&&t.forEach(e=>{let t=this.showRowGroupColsService.getShowRowGroupCol(e.getId());r.set(e,r.get(t))}),r}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[i,s])=>t-s).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){let t=eJ(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){let t=this.funcColsService.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(null!=t&&t.length))return e.getSort();let i=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every(e=>e.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}},h2=class extends tk{constructor(){super(...arguments),this.beanName="syncService",this.waitingForColumns=!1}wireBeans(e){this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.rowModel=e.rowModel}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(this,()=>{let e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){this.columnModel.setColumnDefs(null!=e?e:[],"gridInitializing"),this.rowModel.start()}gridReady(){this.eventService.dispatchEvent({type:"gridReady"});let e=this.gos.isModuleRegistered("@ag-grid-enterprise/core");this.gos.get("debug")&&ec(`initialised successfully, enterprise = ${e}`)}setColumnDefs(e){let t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.columnModel.setColumnDefs(t,ie(e.source))}}},h3=class extends tk{constructor(){super(...arguments),this.beanName="
186changeDetectionService"}wireBeans(e){this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer}postConstruct(){eN(this.gos)&&(this.clientSideRowModel=this.rowModel),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;let i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){let s=new hQ(this.gos.get("aggregateOnlyChangedColumns"),this.clientSideRowModel.getRootNode());s.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(s),s.forEachChangedNodeDepthFirst(e=>{i.push(e)})}this.rowRenderer.refreshCells({rowNodes:i})}},h4=class extends tk{constructor(){super(...arguments),this.beanName="expressionService",this.expressionToFunctionCache={}}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);eg("value should be either a string or a function",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 ec("Processing of the expression failed"),ec("Expression = ",e),ec("Params = ",t),ec("Exception = ",i),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];let t=Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",this.createFunctionBody(e));return this.expressionToFunctionCache[e]=t,t}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},h6=class extends tk{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}},h5=class extends tk{constructor(){super(...arguments),this.beanName="valueService",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionService=e.expressionService,this.columnModel=e.columnModel,this.valueCache=e.valueCache,this.dataTypeService=e.dataTypeService}postConstruct(){this.initialised||this.init()}init(){this.isSsrm=eO(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;let e=e=>this.callColumnCellValueChangedHandler(e),t=ez(this.gos);this.eventService.addEventListener("cellValueChanged",e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener("cellValueChanged",e,t)),this.addManagedPropertyListener("treeData",e=>this.isTreeData=e.currentValue)}getValueForDisplay(e,t){var i,s;let r=t.leafGroup&&this.columnModel.isPivotMode(),a=t.group&&t.expanded&&!t.footer&&!r,o=this.gos.get("groupSuppressBlankHeader");if(!a||o)return this.getValue(e,t);let n=!1,l=null!=(i=this.gos.get("groupTotalRow"))?i:this.gos.get("groupIncludeFooter");n="function"!=typeof l?!!l:!!(null!=(s=this.gos.getCallback("groupTotalRow"))?s:this.gos.getCallback("groupIncludeFooter"))({node:this});let h=a&&n;return this.getValue(e,t,!1,h)}getValue(e,t,i=!1,s=!1){let r;if(this.initialised||this.init(),!t)return;let a=e.getColDef(),o=a.field,n=e.getColId(),l=t.data,h=t.groupData&&void 0!==t.groupData[n],d=!s&&t.aggData&&void 0!==t.aggData[n],u=this.isSsrm&&s&&!!e.getColDef().aggFunc,c=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(i&&a.filterValueGetter?r=this.executeFilterValueGetter(a.filterValueGetter,l,e,t):this.isTreeData&&d?r=t.aggData[n]:this.isTreeData&&a.valueGetter?r=this.executeValueGetter(a.valueGetter,l,e,t):this.isTreeData&&o&&l?r=tJ(l,o,e.isFieldContainsDots()):h?r=t.groupData[n]:d?r=t.aggData[n]:a.valueGetter?r=this.executeValueGetter(a.valueGetter,l,e,t):c?r=tJ(l,t.field,e.isFieldContainsDots()):o&&l&&!u&&(r=tJ(l,o,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof r&&0===r.indexOf("=")){let i=r.substring(1);
186r=this.executeValueGetter(i,l,e,t)}if(null==r){let i=this.getOpenedGroup(t,e);if(null!=i)return i}return r}parseValue(e,t,i,s){let r=e.getColDef(),a=r.valueParser;if(eM(a)){let o=this.gos.addGridCommonParams({node:t,data:null==t?void 0:t.data,oldValue:s,newValue:i,colDef:r,column:e});return"function"==typeof a?a(o):this.expressionService.evaluate(a,o)}return i}getDeleteValue(e,t){if(eM(e.getColDef().valueParser)){var i;return null!=(i=this.parseValue(e,t,"",this.getValueForDisplay(e,t)))?i:null}return null}formatValue(e,t,i,s,r=!0){let a,o=null,n=e.getColDef();if(s?a=s:r&&(a=n.valueFormatter),a){let s=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:n,column:e});o="function"==typeof a?a(s):this.expressionService.evaluate(a,s)}else if(n.refData)return n.refData[i]||"";return null==o&&Array.isArray(i)&&(o=i.join(", ")),o}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup")||!t.getColDef().showRowGroup)return;let i=t.getColDef().showRowGroup,s=e.parent;for(;null!=s;){if(s.rowGroupColumn&&(!0===i||i===s.rowGroupColumn.getColId()))return s.key;s=s.parent}}setValue(e,t,i,s){let r,a=this.columnModel.getColDefCol(t);if(!e||!a)return!1;eD(e.data)&&(e.data={});let{field:o,valueSetter:n}=a.getColDef();if(eD(o)&&eD(n))return ep("you need either field or valueSetter set on colDef for editing to work"),!1;if(this.dataTypeService&&!this.dataTypeService.checkType(a,i))return ep("Data type of the new value does not match the cell data type of the column"),!1;let l=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(a,e),newValue:i,colDef:a.getColDef(),column:a});if(l.newValue=i,void 0===(r=eM(n)?"function"==typeof n?n(l):this.expressionService.evaluate(n,l):this.setValueUsingField(e.data,o,i,a.isFieldContainsDots()))&&(r=!0),!r)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged();let h=this.getValue(a,e);return this.eventService.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,colDef:l.colDef,data:e.data,node:e,oldValue:l.oldValue,newValue:h,value:h,source:s}),!0}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;"function"==typeof t&&this.getFrameworkOverrides().wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,i,s){if(!t)return!1;let r=!1;if(s){let s=t.split("."),a=e;for(;s.length>0&&a;){let e=s.shift();0===s.length?(r=a[e]===i)||(a[e]=i):a=a[e]}}else(r=e[t]===i)||(e[t]=i);return!r}executeFilterValueGetter(e,t,i,s){let r=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return"function"==typeof e?e(r):this.expressionService.evaluate(e,r)}executeValueGetter(e,t,i,s){let r,a=i.getColId(),o=this.valueCache.getValue(s,a);if(void 0!==o)return o;let n=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return r="function"==typeof e?e(n):this.expressionService.evaluate(e,n),this.valueCache.setValue(s,a,r),r}getValueCallback(e,t){let i=this.columnModel.getColDefCol(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){let i=this.getValue(e,t),s=e.getColDef().keyCreator,r=i;return s&&(r=s(this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof r||null==r||"[object Object]"===(r=String(r))&&ep("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key"),r}},h8=class e{static applyGlobalGridOptions(t){if(!e.gridOptions)return t;let i={};return tX(i,e.gridOptions,!0,!0),"deep"===e.mergeStrategy?tX(i,t,!0,!0):i={...i,...t},e.gridOptions.context&&(i.context=e.gridOptions.context),t.context&&("deep"===e.mergeStrategy&&i.context&&tX(t.context,i.context,!0,!0),i.context=t.context),i}};function h7(e,t="shallow"){h8.gridOptions=e,h8.mergeStrategy=t}function h9(e){var t;return null==(t=h8.gridOptions)?void 0:t[e]}function de(e,t,i){if(!t)return eg("No gridOptions provided to createGrid"),{};let s=new ds().create(e,t,t=>{let i=new ha(e);t.createBean(i)},void 0,i);return Object.isFrozen(t)||null!=i&&i.frameworkOverrides||Object.defineProperty(t,"api",{get:()=>{eg("gridOptions.api is no longer supported. See https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api.")},configurable:!0}),s}h8.gridOptions=void 0,h8.mergeStrategy="shallow";var dt=class{constructor(e,t,i){if(ep("Since v31 new Grid(...) is deprecated. Use createGrid instead: `const gridApi = createGrid(...)`. The grid api is returned from createGrid and will not be available on gridOptions."),!t)return void eg("No gridOptions provided to the grid");this.gridOptions=t;let s=new ds().create(e,t,t=>{let i=new ha(e);t.createBean(i).addDestroyFunc(()=>{this.destroy()})},void 0,i);this.gridOptions.api=s}destroy(){if(this.gridOptions){var e;null==(e=this.gridOptions.api)||e.destroy(),delete this.gridOptions.api}}},di=1,ds=class{create(e,t,i,s,r){var a;let o,n=(o={}
186,Object.entries(h8.applyGlobalGridOptions(t)).forEach(([e,t])=>{let i=hO(e,t);o[e]=i}),o),l=null!=(a=n.gridId)?a:String(di++),h=this.getRegisteredModules(r,l),d=this.createBeansList(n.rowModelType,h,l),u=this.createProvidedBeans(e,n,r);if(!d)return void eg("Failed to create grid.");let c=new rj({providedBeanInstances:u,beanClasses:d,gridId:l,beanInitComparator:lQ,beanDestroyComparator:lX,derivedBeans:[lj]});return this.registerModuleUserComponents(c,h),this.registerControllers(c,h),this.registerModuleApiFunctions(c,h),i(c),c.getBean("syncService").start(),s&&s(c),c.getBean("gridApi")}registerControllers(e,t){let i=e.getBean("ctrlsFactory");t.forEach(e=>{e.controllers&&e.controllers.forEach(e=>i.register(e))})}getRegisteredModules(e,t){let i=e?e.modules:null,s=rV.__getRegisteredModules(t),r=[],a={},o=(e,t,i)=>{a[t.moduleName]||(a[t.moduleName]=!0,r.push(t),rV.__register(t,e,i)),t.dependantModules&&t.dependantModules.forEach(t=>o(e,t,i))};return o(!!(null!=i&&i.length)||!rV.__isPackageBased(),hL,void 0),i&&i.forEach(e=>o(!0,e,t)),s&&s.forEach(e=>o(!rV.__isPackageBased(),e,void 0)),r}registerModuleUserComponents(e,t){let i=this.extractModuleEntity(t,e=>e.userComponents?e.userComponents:[]),s=e.getBean("userComponentRegistry");i.forEach(({name:e,classImp:t,params:i})=>{s.registerDefaultComponent(e,t,i)})}registerModuleApiFunctions(e,t){let i=e.getBean("apiFunctionService");t.forEach(e=>{let t=e.apiFunctions;t&&Object.keys(t).forEach(e=>{null==i||i.addFunction(e,t[e])})})}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;eD(s)&&(s=new lk);let r={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(r,i.providedBeanInstances),r}createBeansList(e="clientSide",t,i){let s=t.filter(t=>!t.rowModel||t.rowModel===e),r={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!r[e])return void eg("Could not find row model for rowModelType = ",e);if(!rV.__assertRegistered(r[e],`rowModelType = '${e}'`,i))return;let a=[l3,l1,hz,hF,lH,rg,lK,lZ,nU,rG,hZ,nj,hV,lf,rQ,iS,he,hB,lF,hX,t9,oy,hW,hj,lm,h4,t8,nH,h6,h5,lp,nW,rY,hi,nV,l8,lN,lM,nG,h1,h$,h_,hJ,h3,n_,lW,hK,hq,l0,hs,l2,lJ,h2,hY,nY,hH,hU,nK,io,lU,ih,ir,l_,l$,iC,ia,im,lY,iv,tB];a.push(...this.extractModuleEntity(s,e=>e.beans?e.beans:[]));let o=[];return a.forEach(e=>{0>o.indexOf(e)&&o.push(e)}),o}extractModuleEntity(e,t){return[].concat(...e.map(t))}},dr=class extends tk{constructor(){super(...arguments),this.beanName="rowModelHelperService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){let e=this.rowModel;switch(e.getType()){case"clientSide":this.clientSideRowModel=e;break;case"infinite":this.infiniteRowModel=e;break;case"serverSide":this.serverSideRowModel=e}}getClientSideRowModel(){return this.clientSideRowModel}getInfiniteRowModel(){return this.infiniteRowModel}getServerSideRowModel(){return this.serverSideRowModel}},da={version:a0,moduleName:"@ag-grid-community/csrm-ssrm-shared-api",apiFunctions:{expandAll:function(e){e.expansionService.expandAll(!0)},collapseAll:function(e){e.expansionService.expandAll(!1)},onRowHeightChanged:function(e){var t,i;let s=null==(t=e.rowModelHelperService)?void 0:t.getClientSideRowModel(),r=null==(i=e.rowModelHelperService)?void 0:i.getServerSideRowModel();s?s.onRowHeightChanged():r&&r.onRowHeightChanged()}}},dn={version:a0,moduleName:"@ag-grid-community/ssrm-infinite-shared-api",apiFunctions:{setRowCount:function(e,t,i){var s,r;let a=null==(s=e.rowModelHelperService)?void 0:s.getServerSideRowModel();if(a)return e.funcColsService.isRowGroupEmpty()?void a.setRowCount(t,i):void eg("setRowCount cannot be used while using row grouping.");let o=null==(r=e.rowModelHelperService)?void 0:r.getInfiniteRowModel();if(o)return void o.setRowCount(t,i)},getCacheBlockState:function(e){var t,i;return null!=(t=null==(i=e.rowNodeBlockLoader)?void 0:i.getBlockState())?t:{}},isLastRowIndexKnown:function(e){return e.rowModel.isLastRowIndexKnown()}}},dl=class{wrap(e,t,i=[],s){let r=this.createWrapper(e,s);
186return t.forEach(e=>{this.createMethod(r,e,!0)}),i.forEach(e=>{this.createMethod(r,e,!1)}),r}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&ep("Framework component is missing the method "+t+"()"),null)}}},dh=class{};dh.CHART_TYPE_TO_SERIES_TYPE={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"line",scatter:"scatter",bubble:"bubble",pie:"pie",donut:"donut",doughnut:"donut",area:"area",stackedArea:"area",normalizedArea:"area",histogram:"histogram",radarLine:"radar-line",radarArea:"radar-area",nightingale:"nightingale",radialColumn:"radial-column",radialBar:"radial-bar",sunburst:"sunburst",rangeBar:"range-bar",rangeArea:"range-area",boxPlot:"box-plot",treemap:"treemap",heatmap:"heatmap",waterfall:"waterfall"},dh.COMBO_CHART_TYPES=["columnLineCombo","areaColumnCombo","customCombo"],dh.SERIES_GROUP_TYPES=["grouped","stacked","normalized"];var dd=((b=dd||{}).InsideBase="insideBase",b.InsideEnd="insideEnd",b.Center="center",b.OutsideEnd="outsideEnd",b),du=void 0===i.g?{}:i.g;du.HTMLElement="u"<typeof HTMLElement?{}:HTMLElement,du.HTMLButtonElement="u"<typeof HTMLButtonElement?{}:HTMLButtonElement,du.HTMLSelectElement="u"<typeof HTMLSelectElement?{}:HTMLSelectElement,du.HTMLInputElement="u"<typeof HTMLInputElement?{}:HTMLInputElement,du.Node="u"<typeof Node?{}:Node,du.MouseEvent="u"<typeof MouseEvent?{}:MouseEvent;var dc=class{constructor(e,t,i,s,r,a){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=e,this.gos=t,this.eventService=i,this.funcColsService=s,this.beans=a,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id="ROOT_NODE_ID",this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return tZ(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(e){if("string"==typeof e)return void ep("rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e);let t=this.rootNode,i=this.rootNode.sibling;t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.nextId=0,this.allNodesMap={},e?t.allLeafChildren=e.map((e,t)=>this.createNode(e,this.rootNode,0,t)):(t.allLeafChildren=[],t.childrenAfterGroup=[]),i&&(i.childrenAfterFilter=t.childrenAfterFilter,i.childrenAfterGroup=t.childrenAfterGroup,i.childrenAfterAggFilter=t.childrenAfterAggFilter,i.childrenAfterSort=t.childrenAfterSort,i.childrenMapped=t.childrenMapped,i.allLeafChildren=t.allLeafChildren)}updateRowData(e){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);let t={rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},i=[];return this.executeRemove(e,t,i),this.executeUpdate(e,t,i),this.executeAdd(e,t),this.updateSelection(i,"rowDataChanged"),t}updateRowOrderFromRowData(e){var t;let i=this.rootNode.allLeafChildren,s=null!=(t=null==i?void 0:i.length)?t:0,r=new Map,a=-1,o=-1;for(let t=0;t<s;++t){let s=i[t],n=s.data;n!==e[t]&&(o<0&&(a=t),o=t,r.set(n,s))}if(a<0)return!1;for(let t=a;t<=o;++t){let s=r.get(e[t]);void 0!==s&&(i[t]=s,s.sourceRowIndex=t)}return!0}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){this.eventService.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:null!=e&&e.length?e[0]:null})}updateSelection(e,t){let i=e.length>0;i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i&&this.eventService.dispatchEvent({type:"selectionChanged",source:t})}executeAdd(e,t){let i=e.add;if(eE(i))return;let s=this.rootNode.allLeafChildren,r=s.length;if("number"==typeof e.addIndex&&(r=this.sanitizeAddIndex(e.addIndex))>0&&this.gos.get("treeData"))for(let e=0;e<s.length;e++){let t=s[e];if((null==t?void 0:t.rowIndex)==r-1){r=e+1;break}}let a=i.map((e,t)=>this.createNode(e,this.rootNode,0,r+t));if(r<s.length){let e=s.slice(0,r),i=s.slice(r,s.length),o=e.length+a.length;for(let e=0,t=i.length;e<t;++e)i[e].sourceRowIndex=o+e;this.rootNode.allLeafChildren=[...e,...a,...i],t.rowsInserted=!0}else this.rootNode.allLeafChildren=s.concat(a);let o=this.rootNode.sibling;o&&(o.allLeafChildren=s),t.rowNodeTransaction.add=a}sanitizeAddIndex(e){var t,i;let s=null!=(t=null==(i=this.rootNode.allLeafChildren)?void 0:i.length)?t:0;return e<0||e>=s||Number.isNaN(e)?s:Math.ceil(e)}executeRemove(e,{rowNodeTransaction:t},i){var s,r,a;let{remove:o}=e;if(eE(o))return;let n={};
186o.forEach(e=>{let s=this.lookupRowNode(e);s&&(s.isSelected()&&i.push(s),s.clearRowTopAndRowIndex(),n[s.id]=!0,delete this.allNodesMap[s.id],t.remove.push(s))}),this.rootNode.allLeafChildren=null!=(s=null==(r=this.rootNode.allLeafChildren)?void 0:r.filter(e=>!n[e.id]))?s:null,null==(a=this.rootNode.allLeafChildren)||a.forEach((e,t)=>{e.sourceRowIndex=t});let l=this.rootNode.sibling;l&&(l.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(e,{rowNodeTransaction:t},i){let{update:s}=e;eE(s)||s.forEach(e=>{let s=this.lookupRowNode(e);s&&(s.updateData(e),!s.selectable&&s.isSelected()&&i.push(s),this.setMasterForRow(s,e,0,!1),t.update.push(s))})}lookupRowNode(e){let t,i=e6(this.gos);if(i){let s=i({data:e,level:0});if(!(t=this.allNodesMap[s]))return eg(`could not find row id=${s}, data item was not found for this id`),null}else{var s;if(!(t=null==(s=this.rootNode.allLeafChildren)?void 0:s.find(t=>t.data===e)))return eg("could not find data item as object was not found",e),eg("Consider using getRowId to help the Grid find matching row data"),null}return t||null}createNode(e,t,i,s){let r=new r4(this.beans);return r.sourceRowIndex=s,r.group=!1,this.setMasterForRow(r,e,i,!0),t&&(r.parent=t),r.level=i,r.setDataAndId(e,this.nextId.toString()),this.allNodesMap[r.id]&&ep(`duplicate node id '${r.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[r.id]=r,this.nextId++,r}setMasterForRow(e,t,i,s){if(this.gos.get("treeData"))e.setMaster(!1),s&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){let i=this.gos.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(s){let t=this.funcColsService.getRowGroupColumns(),s=t?t.length:0;e.expanded=!!e.master&&this.isExpanded(i+s)}}}isExpanded(e){let t=this.gos.get("groupDefaultExpanded");return -1===t||e<t}},dp=class extends tk{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=ey(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.selectionService=e.selectionService,this.valueCache=e.valueCache,this.environment=e.environment,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggregationStage=e.aggregationStage,this.pivotStage=e.pivotStage,this.filterAggregatesStage=e.filterAggregatesStage}postConstruct(){let e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new r4(this.beans),this.nodeManager=new dc(this.rootNode,this.gos,this.eventService,this.funcColsService,this.selectionService,this.beans)}addPropertyListeners(){let e=new Set(["treeData","masterDetail"]),t=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),r=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),a=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),n=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),l=[...e,...t,...i,...s,...s,...r,...a,...o,...n];this.addManagedPropertyListeners(l,l=>{var h;let d=null==(h=l.changeSet)?void 0:h.properties;if(!d)return;let u=e=>d.some(t=>e.has(t));u(e)?this.setRowData(this.rootNode.allLeafChildren.map(e=>e.data)):u(t)?this.refreshModel({step:"group"}):u(i)?this.refreshModel({step:"filter"}):u(s)?this.refreshModel({step:"pivot"}):u(r)?this.refreshModel({step:"aggregate"}):u(a)?this.refreshModel({step:"sort"}):u(o)?this.refreshModel({step:"filter_aggregates"}):u(n)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){let e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,s){let r,a=!1;do{r=!1;let o=this.getRowIndexAtPixel(e),n=this.getRowIndexAtPixel(t),l=Math.max(o,i),h=Math.min(n,s);for(let e=l;e<=h;e++){let t=this.getRow(e);if(t.rowHeightEstimated){let e=eH(this.gos,t);t.setRowHeight(e.height),r=!0,a=!0}}r&&this.setRowTopAndRowIndex()}while(r)return a}setRowTopAndRowIndex(){let e=this.environment.getDefaultRowHeight(),t=0,i=new Set,s=eG(this.gos,"normal");for(let r=0;r<this.rowsToDisplay.length;r++){let a=this.rowsToDisplay[r];if(null!=a.id&&i.add(a.id),null==a.rowHeight){let t=eH(this.gos,a,s,e);a.setRowHeight(t.height,t.estimated)}a.setRowTop(t),a.setRowIndex(r),t+=a.rowHeight}return i}clearRowTopAndRowIndex(e,t){let i=e.isActive(),s=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},r=e=>{if(s(e),s(e.detailNode),s(e.sibling),e.hasChildren()&&e.childrenAfterGroup){let t=-1==e.level;(!i||t||e.expanded)&&e.childrenAfterGroup.forEach(r)}};r(this.rootNode)}ensureRowsAtPixel(e,t,i=0){let s=this.getRowIndexAtPixel(t),r=this.getRow(s),a=!this.gos.get("suppressAnimationFrame");
186if(r===e[0])return!1;let o=this.rootNode.allLeafChildren;return e.forEach(e=>{tC(o,e)}),e.forEach((e,t)=>{ty(o,e,Math.max(s+i,0)+t)}),e.forEach((e,t)=>{e.sourceRowIndex=t}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:a,rowNodesOrderChanged:!0}),!0}highlightRowAtPixel(e,t){let i=null!=t?this.getRowIndexAtPixel(t):null,s=null!=i?this.getRow(i):null;if(!s||!e||null==t)return void this.clearHighlightedRow();let r=this.getHighlightPosition(t,s),a=this.isHighlightingCurrentPosition(e,s,r),o=null!=this.lastHighlightedRow&&this.lastHighlightedRow!==s;(a||o)&&(this.clearHighlightedRow(),a)||(s.setHighlighted(r),this.lastHighlightedRow=s)}getHighlightPosition(e,t){if(!t){let i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return 1}let{rowTop:i,rowHeight:s}=t;return e-i<s/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isHighlightingCurrentPosition(e,t,i){return e===t||this.getRow(t.rowIndex+(0===i?-1:1))===e}clearHighlightedRow(){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(0===this.rowsToDisplay.length)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;let e=this.rootNode.childrenAfterAggFilter,t=+!!this.rootNode.sibling;return(e?e.length:0)+t}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=e;if(this.rowsToDisplay[0].footer){if(0===e)return 0;t-=1}let i=this.rowsToDisplay[this.rowsToDisplay.length-1],s=t>=this.rootNode.childrenAfterSort.length;if(i.footer&&s)return i.rowIndex;let r=this.rootNode.childrenAfterSort[t];if(this.gos.get("groupHideOpenParents"))for(;r.expanded&&r.childrenAfterSort&&r.childrenAfterSort.length>0;)r=r.childrenAfterSort[0];return r.rowIndex}getRowBounds(e){if(eD(this.rowsToDisplay))return null;let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){let e=eQ(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;let t=eQ(this.gos),i=0===e.columns.length||e.columns.some(e=>e.isPrimary());this.refreshModel({step:i?"filter":"filter_aggregates",keepRenderedRows:!0,animate:t})}onSortChanged(){let e=eQ(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){let t=eE(e),i=new hQ(!1,this.rootNode);return t&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction")||null==e.rowNodeTransactions)return!1;let t=e.rowNodeTransactions.filter(e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0);return null==t||0==t.length}buildRefreshModelParams(e){let t="group",i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",filter_aggregates:"filter_aggregates",sort:"sort",pivot:"pivot",nothing:"nothing"};return(eM(e)&&(t=i[e]),eD(t))?void eg(`invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`):{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.isChangeEventsDispatching())return;let t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;let i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,i,!!t.rowNodesOrderChanged,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay()}let s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,s),this.isRefreshingModel=!1,this.eventService.dispatchEvent({type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newD
186ata:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack})}isEmpty(){let e=eD(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return eD(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return eM(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!1,s=!1,r=[],a=td(this.gos);return this.forEachNodeAfterFilterAndSort(o=>{if(!s){if(i&&(o===t||o===e)&&(s=!0,o.group&&a))return void r.push(...o.allLeafChildren);if(!i){if(o!==t&&o!==e)return;i=!0}if(!o.group||!a)return void r.push(o)}}),r}setDatasource(e){eg("should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return -1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(tp(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let s=-1,r=-1;for(;;){let a=Math.floor((t+i)/2),o=this.rowsToDisplay[a];if(this.isRowInPixel(o,e)||(o.rowTop<e?t=a+1:o.rowTop>e&&(i=a-1),s===t&&r===i))return a;s=t,r=i}}isRowInPixel(e,t){let i=e.rowTop,s=e.rowTop+e.rowHeight;return i<=t&&s>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((t,i)=>e(t,i))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){let{nodes:t,callback:i,recursionType:s,includeFooterNodes:r}=e,{index:a}=e,o=e=>{var s;let o=null==(s=t[0])?void 0:s.parent;if(!o)return;let n=r&&e1(this.gos),l=e2(this.gos),h=r&&l({node:o});if(o===this.rootNode){n===e&&(o.createFooter(),i(o.sibling,a++));return}h===e&&(o.createFooter(),i(o.sibling,a++))};o("top");for(let e=0;e<t.length;e++){let o=t[e];if(i(o,a++),o.hasChildren()&&!o.footer){let e=null;switch(s){case 0:e=o.childrenAfterGroup;break;case 1:e=o.childrenAfterAggFilter;break;case 2:e=o.childrenAfterSort;break;case 3:e=o.leafGroup?null:o.childrenAfterSort}e&&(a=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:i,recursionType:s,index:a,includeFooterNodes:r}))}}return o("bottom"),a}doAggregate(e){var t;null==(t=this.aggregationStage)||t.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){let t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),s=r=>{r&&r.forEach(r=>{let a=()=>{r.expanded=e,s(r.childrenAfterGroup)};if(t){eM(r.childrenAfterGroup)&&a();return}if(i){r.leafGroup||a();return}r.group&&a()})};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"}),this.eventService.dispatchEvent({type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"})}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,s){if(this.groupStage)e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodesOrderChanged:i,changedPath:t}):this.groupStage.execute({rowNode:this.rootNode,changedPath:t,afterColumnsChanged:s}),td(this.gos)&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",t)&&this.eventService.dispatchEvent({type:"selectionChanged",source:"rowGroupChanged"});else{let e=this.rootNode,t=e.sibling;e.childrenAfterGroup=e.allLeafChildren,t&&(t.childrenAfterGroup=e.childrenAfterGroup),this.rootNode.updateHasChildren()}this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){var t;null==(t=this.pivotStage)||t.execute({rowNode:this.rootNode,changedPath:e})}getNodeManager(){return this.nodeManager}getRowNode(e){if("string"==typeof e&&0==e.indexOf(r4.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];let e=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},e)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var e;this.valueCache.onDataChanged();let t=[],i=[],s=!1;
186null==(e=this.rowDataTransactionBatch)||e.forEach(e=>{let{rowNodeTransaction:r,rowsInserted:a}=this.nodeManager.updateRowData(e.rowDataTransaction);a&&(s=!0),i.push(r),e.callback&&t.push(e.callback.bind(null,r))}),this.commonUpdateRowData(i,s),t.length>0&&window.setTimeout(()=>{t.forEach(e=>e())},0),i.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache.onDataChanged();let{rowNodeTransaction:t,rowsInserted:i}=this.nodeManager.updateRowData(e);return this.commonUpdateRowData([t],i),t}afterImmutableDataChange(e,t){this.commonUpdateRowData([e],t)}commonUpdateRowData(e,t){if(!this.hasStarted)return;let i=!this.gos.get("suppressAnimationFrame");this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodesOrderChanged:t,keepRenderedRows:!0,keepEditingRows:!0,animate:i})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){let e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&(this.columnModel.isAutoRowHeightActive()||this.resetRowHeights())}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlightedRow()}},dg=class extends tk{constructor(){super(...arguments),this.beanName="filterStage"}wireBeans(e){this.filterManager=e.filterManager}execute(e){let{changedPath:t}=e;this.filter(t)}filter(e){var t;let i=!!(null!=(t=this.filterManager)&&t.isChildFilterPresent());this.filterNodes(i,e)}filterNodes(e,t){let i=(t,i)=>{t.hasChildren()&&e&&!i?t.childrenAfterFilter=t.childrenAfterGroup.filter(e=>{let t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i}):t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){let e=(t,s)=>{if(t.childrenAfterGroup)for(let r=0;r<t.childrenAfterGroup.length;r++){let a=t.childrenAfterGroup[r],o=s||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?e(t.childrenAfterGroup[r],o):i(a,o)}i(t,s)};t.executeFromRootNode(t=>e(t,!1))}else t.forEachChangedNodeDepthFirst(e=>i(e,!1),!0)}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},dm=class extends tk{constructor(){super(...arguments),this.beanName="flattenStage"}wireBeans(e){this.beans=e,this.columnModel=e.columnModel}execute(e){let t=e.rowNode,i=[],s=this.columnModel.isPivotMode(),r=s&&t.leafGroup,a=r?[t]:t.childrenAfterSort,o=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(o,a,i,s,0);let n=i.length>0;if(!r&&n&&o.grandTotalRow){t.createFooter();let e="top"===o.grandTotalRow;this.addRowNodeToRowsToDisplay(o,t.sibling,i,0,e)}return i}getFlattenDetails(){let e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:e3(this.gos),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:e1(this.gos),groupTotalRow:e2(this.gos)}}recursivelyAddToRowsToDisplay(e,t,i,s,r){if(!eE(t))for(let a=0;a<t.length;a++){let o=t[a],n=o.hasChildren(),l=s&&!n,h=e.groupRemoveSingleChildren&&n&&1===o.childrenAfterGroup.length,d=e.groupRemoveLowestSingleChildren&&n&&o.leafGroup&&1===o.childrenAfterGroup.length,u=s&&o.leafGroup,c=e.hideOpenParents&&o.expanded&&!o.master&&!u;if(l||c||h||d||this.addRowNodeToRowsToDisplay(e,o,i,r),!s||!o.leafGroup){if(n){let t=h||d;if(o.expanded||t){let a=e.groupTotalRow({node:o});a||o.destroyFooter();let n=t?r:r+1;"top"===a&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,n)),this.recursivelyAddToRowsToDisplay(e,o.childrenAfterSort,i,s,n),"bottom"===a&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,n))}}
186else if(o.master&&o.expanded){let t=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(e,t,i,r)}}}}addRowNodeToRowsToDisplay(e,t,i,s,r){r?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if(eM(e.detailNode))return e.detailNode;let t=new r4(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,eM(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}},dv=class extends tk{constructor(){super(...arguments),this.beanName="immutableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){eN(this.gos)&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){let e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){let t=this.createTransactionForRowData(e);if(!t)return;let i=this.clientSideRowModel.getNodeManager(),{rowNodeTransaction:s,rowsInserted:r}=i.updateRowData(t),a=!1;this.gos.get("suppressMaintainUnsortedOrder")||(a=i.updateRowOrderFromRowData(e)),this.clientSideRowModel.afterImmutableDataChange(s,a||r)}createTransactionForRowData(e){if(!eN(this.gos))return eg("ImmutableService only works with ClientSideRowModel"),null;let t=e6(this.gos);if(null==t)return eg("ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!"),null;let i=this.clientSideRowModel.getNodeManager().getCopyOfNodesMap(),s=[],r=[],a=[];return eM(e)&&e.forEach(e=>{let s=t({data:e,level:0}),o=i[s];o?(o.data!==e&&r.push(e),i[s]=void 0):a.push(e)}),tK(i,(e,t)=>{t&&s.push(t.data)}),{remove:s,update:r,add:a}}onRowDataUpdated(){let e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}},df=class extends tk{constructor(){super(...arguments),this.beanName="sortService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.rowNodeSorter=e.rowNodeSorter,this.showRowGroupColsService=e.showRowGroupColsService}sort(e,t,i,s,r,a){let o=this.gos.get("groupMaintainOrder"),n=this.columnModel.getCols().some(e=>e.isRowGroupActive()),l={};i&&s&&(l=this.calculateDirtyNodes(s));let h=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows"),u=s=>{this.pullDownGroupDataForHideOpenParents(s.childrenAfterAggFilter,!0);let u=h&&s.leafGroup;if(o&&n&&!s.leafGroup&&!a){var c;let e=null==(c=this.funcColsService.getRowGroupColumns())?void 0:c[s.level+1],t=(null==e?void 0:e.getSort())===null,i=s.childrenAfterAggFilter.slice(0);if(s.childrenAfterSort&&!t){let e={};s.childrenAfterSort.forEach((t,i)=>{e[t.id]=i}),i.sort((t,i)=>{var s,r;return(null!=(s=e[t.id])?s:0)-(null!=(r=e[i.id])?r:0)})}s.childrenAfterSort=i}else!t||u?s.childrenAfterSort=s.childrenAfterAggFilter.slice(0):i?s.childrenAfterSort=this.doDeltaSort(s,l,r,e):s.childrenAfterSort=this.rowNodeSorter.doFullSort(s.childrenAfterAggFilter,e);s.sibling&&(s.sibling.childrenAfterSort=s.childrenAfterSort),this.updateChildIndexes(s),d&&d({nodes:s.childrenAfterSort})};r&&r.forEachChangedNodeDepthFirst(u),this.updateGroupDataForHideOpenParents(r)}calculateDirtyNodes(e){let t={},i=e=>{e&&e.forEach(e=>t[e.id]=!0)};return e&&e.forEach(e=>{i(e.add),i(e.update),i(e.remove)}),t}doDeltaSort(e,t,i,s){let r=e.childrenAfterAggFilter,a=e.childrenAfterSort;if(!a)return this.rowNodeSorter.doFullSort(r,s);let o={},n=[];r.forEach(e=>{t[e.id]||!i.canSkip(e)?n.push(e):o[e.id]=!0});let l=a.filter(e=>o[e.id]),h=(e,t)=>({currentPos:t,rowNode:e}),d=n.map(h).sort((e,t)=>this.rowNodeSorter.compareRowNodes(s,e,t));return this.mergeSortedArrays(s,d,l.map(h)).map(({rowNode:e})=>e)}mergeSortedArrays(e,t,i){let s=[],r=0,a=0;for(;r<t.length&&a<i.length;)0>this.rowNodeSorter.compareRowNodes(e,t[r],i[a])?s.push(t[r++]):s.push(i[a++]);for(;r<t.length;)s.push(t[r++]);for(;a<i.length;)s.push(i[a++]);return s}updateChildIndexes(e){if(eD(e.childrenAfterSort))return;let t=e.childrenAfterSort;for(let i=0;i<t.length;i++){let s=t[i],r=0===i,a=i===e.childrenAfterSort.length-1;s.setFirstChild(r),s.setLastChild(a),s.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return ep("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;let t=e=>{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach(e
186=>{e.hasChildren()&&t(e)})};e&&e.executeFromRootNode(e=>t(e))}pullDownGroupDataForHideOpenParents(e,t){!this.gos.get("groupHideOpenParents")||eD(e)||e.forEach(e=>{var i,s;(null!=(i=null==(s=this.showRowGroupColsService)?void 0:s.getShowRowGroupCols())?i:[]).forEach(i=>{let s=i.getColDef().showRowGroup;if("string"!=typeof s)return void eg("groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");let r=this.columnModel.getColDefCol(s);if(r!==e.rowGroupColumn)if(t)e.setGroupValue(i.getId(),void 0);else{let t=this.getFirstChildOfFirstChild(e,r);t&&e.setGroupValue(i.getId(),t.key)}})})}getFirstChildOfFirstChild(e,t){let i=e;for(;i;){let e=i.parent;if(e&&i.firstChild){if(e.rowGroupColumn===t)return e}else break;i=e}return null}},dC=class extends tk{constructor(){super(...arguments),this.beanName="sortStage"}wireBeans(e){this.sortService=e.sortService,this.sortController=e.sortController}execute(e){let t=this.sortController.getSortOptions(),i=eM(t)&&t.length>0,s=i&&eM(e.rowNodeTransactions)&&this.gos.get("deltaSort"),r=t.some(e=>eJ(this.gos)?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup);this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,r)}},dy="32.3.9",dw={version:dy,moduleName:"@ag-grid-community/client-side-row-model-core",rowModel:"clientSide",beans:[dp,dg,dC,dm,df,dv]},db={version:dy,moduleName:"@ag-grid-community/client-side-row-model",dependantModules:[dw,{version:dy,moduleName:"@ag-grid-community/client-side-row-model-api",beans:[dr],apiFunctions:{onGroupExpandedOrCollapsed:function(e){e.expansionService.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function(e,t){var i;null==(i=e.rowModelHelperService)||null==(i=i.getClientSideRowModel())||i.refreshModel(t)},isRowDataEmpty:function(e){var t,i;return null==(t=null==(i=e.rowModelHelperService)||null==(i=i.getClientSideRowModel())?void 0:i.isEmpty())||t},forEachLeafNode:function(e,t){var i;null==(i=e.rowModelHelperService)||null==(i=i.getClientSideRowModel())||i.forEachLeafNode(t)},forEachNodeAfterFilter:function(e,t){var i;null==(i=e.rowModelHelperService)||null==(i=i.getClientSideRowModel())||i.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function(e,t){var i;null==(i=e.rowModelHelperService)||null==(i=i.getClientSideRowModel())||i.forEachNodeAfterFilterAndSort(t)},resetRowHeights:function(e){var t;e.columnModel.isAutoRowHeightActive()?ep("calling gridApi.resetRowHeights() makes no sense when using Auto Row Height."):null==(t=e.rowModelHelperService)||null==(t=t.getClientSideRowModel())||t.resetRowHeights()},applyTransaction:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.rowModelHelperService)||null==(i=i.getClientSideRowModel())?void 0:i.updateRowData(t)})},applyTransactionAsync:function(e,t,i){e.frameworkOverrides.wrapIncoming(()=>{var s;return null==(s=e.rowModelHelperService)||null==(s=s.getClientSideRowModel())?void 0:s.batchUpdateRowData(t,i)})},flushAsyncTransactions:function(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return null==(t=e.rowModelHelperService)||null==(t=t.getClientSideRowModel())?void 0:t.flushAsyncTransactions()})},getBestCostNodeSelection:function(e){return e.selectionService.getBestCostNodeSelection()}},dependantModules:[dw,da]}]},dS=class extends tk{setBeans(e){this.beans=e}getFileName(e){let t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?`${e}.${t}`:e}getData(e){let t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},dx=class{constructor(e){this.groupColumns=[];let{columnModel:t,funcColsService:i,columnNameService:s,valueService:r,gos:a,processCellCallback:o,processHeaderCallback:n,processGroupHeaderCallback:l,processRowGroupCallback:h}=e;this.columnModel=t,this.funcColsService=i,this.columnNameService=s,this.valueService=r,this.gos=a,this.processCellCallback=o,this.processHeaderCallback=n,this.processGroupHeaderCallback=l,this.processRowGroupCallback=h}prepare(e){this.groupColumns=e.filter(e=>!!e.getColDef().showRowGroup)}extractHeaderValue(e){let t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""}extractRowCellValue(e,t,i,s,r){let a=(!this.gos.get("groupHideOpenParents")||r.footer)&&this.shouldRenderGroupSummaryCell(r,e,t)?this.createValueForGroupNode(e,r):this.valueService.getValue(e,r);return this.processCell({accumulatedRowIndex:i,rowNode:r,column:e,value:a,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,t,i){if(!(e&&e.group))return!1;if(-1!==this.groupColumns.indexOf(t)){var s;let i=null==(s=e.groupData)?void 0:s[t.getId()],r=this.gos.get("suppressGroupMaintainValueType");if(r&&null!=i||!r&&void 0!==i||eO(this.gos)&&e.group)return!0;
186if(e.footer&&-1===e.level){let e=t.getColDef();return null==e||!0===e.showRowGroup||e.showRowGroup===this.funcColsService.getRowGroupColumns()[0].getId()}}let r=e4(this.gos,this.columnModel.isPivotMode());return 0===i&&r}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnNameService.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));let i=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),r=t=>{var r,a;if(i||s)return t.key;let o=null==(r=t.groupData)?void 0:r[e.getId()];return o&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(a=this.valueService.formatValue(t.rowGroupColumn,t,o))?a:o},a=t.footer,o=[r(t)];if(!e3(this.gos))for(;t.parent;)o.push(r(t=t.parent));let n=o.reverse().join(" -> ");return a?`Total ${n}`:n}processCell(e){let{accumulatedRowIndex:t,rowNode:i,column:s,value:r,processCellCallback:a,type:o}=e;if(a){var n;return{value:null!=(n=a(this.gos.addGridCommonParams({accumulatedRowIndex:t,column:s,node:i,value:r,type:o,parseValue:e=>this.valueService.parseValue(s,i,e,this.valueService.getValue(s,i)),formatValue:e=>{var t;return null!=(t=this.valueService.formatValue(s,i,e))?t:e}})))?n:""}}return!1!==s.getColDef().useValueFormatterForExport?{value:null!=r?r:"",valueFormatted:this.valueService.formatValue(s,i,r)}:{value:null!=r?r:""}}},dM=class{static download(e,t){let i=document.defaultView||window;if(!i)return void ep("There is no `window` associated with the current `document`");let s=document.createElement("a"),r=i.URL.createObjectURL(t);s.setAttribute("href",r),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(s),i.setTimeout(()=>{i.URL.revokeObjectURL(r)},0)}},dD=`\r
187`,dE=class extends dx{constructor(e){super(e),this.isFirstLine=!0,this.result="";let{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,dD),this.result+=e):e.forEach(e=>{this.beginNewLine(),e.forEach((e,t)=>{0!==t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||""),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,s){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}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){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){var s;0!=t&&(this.result+=this.columnSeparator);let r=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(null!=(s=r.valueFormatted)?s:r.value)}putInQuotes(e){let t;return this.suppressQuotes?e:null==e?'""':("string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(ep("unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"')}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=dD),this.isFirstLine=!1}},dI=class extends dS{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.gridSerializer=e.gridSerializer}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){return Object.assign({},this.gos.get("defaultCsvExportParams"),e)}export(e){if(this.isExportSuppressed())return void ep("Export cancelled. Export is not allowed as per your configuration.");let t=this.getMergedParams(e),i=new Blob(["\uFEFF",this.getData(t)],{type:"text/plain"}),s="function"==typeof t.fileName?t.fileName(this.gos.getGridCommonParams()):t.fileName;dM.download(this.getFileName(s),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}
187createSerializingSession(e){let{columnModel:t,columnNameService:i,funcColsService:s,valueService:r,gos:a}=this,{processCellCallback:o,processHeaderCallback:n,processGroupHeaderCallback:l,processRowGroupCallback:h,suppressQuotes:d,columnSeparator:u}=e;return new dE({columnModel:t,columnNameService:i,funcColsService:s,valueService:r,gos:a,processCellCallback:o||void 0,processHeaderCallback:n||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:h||void 0,suppressQuotes:d||!1,columnSeparator:u||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}},dA=((S=dA||{})[S.HEADER_GROUPING=0]="HEADER_GROUPING",S[S.HEADER=1]="HEADER",S[S.BODY=2]="BODY",S),dR=class extends tk{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.selectionService=e.selectionService,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController}serialize(e,t={}){let{allColumns:i,columnKeys:s,skipRowGroups:r}=t,a=this.getColumnsToExport(i,r,s);return eS(this.prepareSession(a),this.prependContent(t),this.exportColumnGroups(t,a),this.exportHeaders(t,a),this.processPinnedTopRows(t,a),this.processRows(t,a),this.processPinnedBottomRows(t,a),this.appendContent(t))(e).parse()}processRow(e,t,i,s){var r;let a=t.shouldRowBeSkipped||(()=>!1),o=this.gos.get("groupRemoveSingleChildren"),n=this.gos.get("groupRemoveLowestSingleChildren"),l=null!=t.rowPositions||!!t.onlySelected,h=this.gos.get("groupHideOpenParents")&&!l,d=this.columnModel.isPivotMode()?s.leafGroup:!s.group,u=!!s.footer,c=n&&s.leafGroup,p=1===s.allChildrenCount&&(null==(r=s.childrenAfterGroup)?void 0:r.length)===1&&(o||c);if(!d&&!u&&(t.skipRowGroups||p||h)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&"top"===s.rowPinned||t.skipPinnedBottom&&"bottom"===s.rowPinned||-1===s.level&&!d&&!u||a(this.gos.addGridCommonParams({node:s})))return;let g=e.onNewBodyRow(s);if(i.forEach((e,t)=>{g.onColumn(e,t,s)}),t.getCustomContentBelowRow){let i=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:s}));i&&e.addCustomContent(i)}}appendContent(e){return t=>{let i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{let 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){let s=new ib,r=this.visibleColsService.createGroups({columns:t,idCreator:s,pinned:null,isStandaloneStructure:!0});this.recursivelyAddHeaderGroups(r,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){let e=i.onNewHeaderRow();t.forEach((t,i)=>{e.onColumn(t,i,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{let s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"top"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedTopRow(e.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedRow("top",s),i}}processRows(e,t){return i=>{let s=this.rowModel,r=eN(this.gos),a=eO(this.gos),o=!r&&e.onlySelected,n=this.processRow.bind(this,i,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(e=>null==e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>s.getRow(e.rowIndex)).forEach(n);
187else if(this.columnModel.isPivotMode())r?s.forEachPivotNode(n,!0):a?s.forEachNodeAfterFilterAndSort(n,!0):s.forEachNode(n);else if(e.onlySelectedAllPages||o){let e=this.selectionService.getSelectedNodes();this.replicateSortedOrder(e),e.forEach(n)}else"all"===l?s.forEachNode(n):r||a?s.forEachNodeAfterFilterAndSort(n,!0):s.forEachNode(n);return i}}replicateSortedOrder(e){let t=this.sortController.getSortOptions(),i=(e,s)=>{if(null!=e.rowIndex&&null!=s.rowIndex)return e.rowIndex-s.rowIndex;if(e.level===s.level){var r,a,o,n;return(null==(r=e.parent)?void 0:r.id)===(null==(a=s.parent)?void 0:a.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:e,currentPos:null!=(o=e.rowIndex)?o:-1},{rowNode:s,currentPos:null!=(n=s.rowIndex)?n:-1}):i(e.parent,s.parent)}return e.level>s.level?i(e.parent,s):i(e,s.parent)};e.sort(i)}processPinnedBottomRows(e,t){return i=>{let s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"bottom"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedBottomRow(e.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedRow("bottom",s),i}}getColumnsToExport(e=!1,t=!1,i){let s=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getColsForKeys(i);let r=this.gos.get("treeData"),a=[];return a=e&&!s?this.columnModel.getCols():this.visibleColsService.getAllCols(),t&&!r&&(a=a.filter(e=>!tW(e)&&!tU(e))),a}recursivelyAddHeaderGroups(e,t,i){let s=[];e.forEach(e=>
187{e.getChildren&&e.getChildren().forEach(e=>s.push(e))}),e.length>0&&iy(e[0])&&this.doAddHeaderHeader(t,e,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,i)}doAddHeaderHeader(e,t,i){let s=e.onNewHeaderGroupingRow(),r=0;t.forEach(e=>{let t;t=i?i(this.gos.addGridCommonParams({columnGroup:e})):this.columnNameService.getDisplayNameForColumnGroup(e,"header");let a=e.getLeafColumns().reduce((e,t,i,s)=>{let r=tp(e);return"open"===t.getColumnGroupShow()?r&&null==r[1]||(r=[i],e.push(r)):r&&null==r[1]&&(r[1]=i-1),i===s.length-1&&r&&null==r[1]&&(r[1]=i),e},[]);s.onColumn(e,t||"",r++,e.getLeafColumns().length-1,a)})}},dT="32.3.9",dL={version:dT,moduleName:"@ag-grid-community/csv-export-core",beans:[dI,dR]},dF={version:dT,moduleName:"@ag-grid-community/csv-export",dependantModules:[dL,{version:dT,moduleName:"@ag-grid-community/csv-export-api",apiFunctions:{getDataAsCsv:function(e,t){var i;return null==(i=e.csvCreator)?void 0:i.getDataAsCsv(t)},exportDataAsCsv:function(e,t){var i;null==(i=e.csvCreator)||i.exportDataAsCsv(t)}},dependantModules:[dL]}]},dP=`\r
188`;function dk(e,t,i){if(!t&&""!==t&&0!==t)return"";let s=t;return"boolean"==typeof t&&i&&(s=i(t)),` ${e}="${s}"`}var dN=class{static createHeader(e={}){let t=["version"];e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone");let i=t.map(t=>`${t}="${e[t]}"`).join(" ");return`<?xml ${i} ?>`}static createXml(e,t){let i="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach(e=>{Object.keys(e.map).forEach(s=>{i+=dk(e.prefix+s,e.map[s],t)})}),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach(s=>{i+=dk(s,e.properties.rawMap[s],t)}));let s="<"+e.name+i;return e.children||null!=e.textNode?null!=e.textNode?s+">"+e.textNode+"</"+e.name+">"+dP:(s+=">"+dP,e.children&&e.children.forEach(e=>{s+=this.createXml(e,t)}),s+"</"+e.name+">"+dP):s+"/>"+dP}},dO=async e=>{let t=0,i=[],s=new WritableStream({write:e=>{i.push(e),t+=e.length}}),r=new ReadableStream({start:t=>{let i=new FileReader;i.onload=e=>{var i;null!=(i=e.target)&&i.result&&t.enqueue(e.target.result),t.close()},i.readAsArrayBuffer(e)}}),a=new window.CompressionStream("deflate-raw");return await r.pipeThrough(a).pipeTo(s),{size:t,content:new Blob(i)}},dG=async e=>{let t=new Blob([e]),{size:i,content:s}=await dO(t);return{size:i,content:new Uint8Array(await s.arrayBuffer())}};function dB(e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(255&e),e>>>=8;return i}var dz=e=>{if(!e.length)return 0;let t=-1,i=0;for(let s=0;s<e.length;s++)i=dH[(t^e[s])&255],t=t>>>8^i;return -1^t},dV=e=>e.length?"string"==typeof e?dz(new TextEncoder().encode(e)):dz(e):0,dH=new Uint32Array([0,0x77073096,0xee0e612c,0x990951ba,0x76dc419,0x706af48f,0xe963a535,0x9e6495a3,0xedb8832,0x79dcb8a4,0xe0d5e91e,0x97d2d988,0x9b64c2b,0x7eb17cbd,0xe7b82d07,0x90bf1d91,0x1db71064,0x6ab020f2,0xf3b97148,0x84be41de,0x1adad47d,0x6ddde4eb,0xf4d4b551,0x83d385c7,0x136c9856,0x646ba8c0,0xfd62f97a,0x8a65c9ec,0x14015c4f,0x63066cd9,0xfa0f3d63,0x8d080df5,0x3b6e20c8,0x4c69105e,0xd56041e4,0xa2677172,0x3c03e4d1,0x4b04d447,0xd20d85fd,0xa50ab56b,0x35b5a8fa,0x42b2986c,0xdbbbc9d6,0xacbcf940,0x32d86ce3,0x45df5c75,0xdcd60dcf,0xabd13d59,0x26d930ac,0x51de003a,0xc8d75180,0xbfd06116,0x21b4f4b5,0x56b3c423,0xcfba9599,0xb8bda50f,0x2802b89e,0x5f058808,0xc60cd9b2,0xb10be924,0x2f6f7c87,0x58684c11,0xc1611dab,0xb6662d3d,0x76dc4190,0x1db7106,0x98d220bc,0xefd5102a,0x71b18589,0x6b6b51f,0x9fbfe4a5,0xe8b8d433,0x7807c9a2,0xf00f934,0x9609a88e,0xe10e9818,0x7f6a0dbb,0x86d3d2d,0x91646c97,0xe6635c01,0x6b6b51f4,0x1c6c6162,0x856530d8,0xf262004e,0x6c0695ed,0x1b01a57b,0x8208f4c1,0xf50fc457,0x65b0d9c6,0x12b7e950,0x8bbeb8ea,0xfcb9887c,0x62dd1ddf,0x15da2d49,0x8cd37cf3,0xfbd44c65,0x4db26158,0x3ab551ce,0xa3bc0074,0xd4bb30e2,0x4adfa541,0x3dd895d7,0xa4d1c46d,0xd3d6f4fb,0x4369e96a,0x346ed9fc,0xad678846,0xda60b8d0,0x44042d73,0x33031de5,0xaa0a4c5f,0xdd0d7cc9,0x5005713c,0x270241aa,0xbe0b1010,0xc90c2086,0x5768b525,0x206f85b3,0xb966d409,0xce61e49f,0x5edef90e,0x29d9c998,0xb0d09822,0xc7d7a8b4,0x59b33d17,0x2eb40d81,0xb7bd5c3b,0xc0ba6cad,0xedb88320,0x9abfb3b6,0x3b6e20c,0x74b1d29a,0xead54739,0x9dd277af,0x4db2615,0x73dc1683,0xe3630b12,0x94643b84,0xd6d6a3e,0x7a6a5aa8,0xe40ecf0b,0x9309ff9d,0xa00ae27,0x7d079eb1,0xf00f9344,0x8708a3d2,0x1e01f268,0x6906c2fe,0xf762575d,0x806567cb,0x196c3671,0x6e6b06e7,0xfed41b76,0x89d32be0,0x10da7a5a,0x67dd4acc,0xf9b9df6f,0x8ebeeff9,0x17b7be43,0
188x60b08ed5,0xd6d6a3e8,0xa1d1937e,0x38d8c2c4,0x4fdff252,0xd1bb67f1,0xa6bc5767,0x3fb506dd,0x48b2364b,0xd80d2bda,0xaf0a1b4c,0x36034af6,0x41047a60,0xdf60efc3,0xa867df55,0x316e8eef,0x4669be79,0xcb61b38c,0xbc66831a,0x256fd2a0,0x5268e236,0xcc0c7795,0xbb0b4703,0x220216b9,0x5505262f,0xc5ba3bbe,0xb2bd0b28,0x2bb45a92,0x5cb36a04,0xc2d7ffa7,0xb5d0cf31,0x2cd99e8b,0x5bdeae1d,0x9b64c2b0,0xec63f226,0x756aa39c,0x26d930a,0x9c0906a9,0xeb0e363f,0x72076785,0x5005713,0x95bf4a82,0xe2b87a14,0x7bb12bae,0xcb61b38,0x92d28e9b,0xe5d5be0d,0x7cdcefb7,0xbdbdf21,0x86d3d2d4,0xf1d4e242,0x68ddb3f8,0x1fda836e,0x81be16cd,0xf6b9265b,0x6fb077e1,0x18b74777,0x88085ae6,0xff0f6a70,0x66063bca,0x11010b5c,0x8f659eff,0xf862ae69,0x616bffd3,0x166ccf45,0xa00ae278,0xd70dd2ee,0x4e048354,0x3903b3c2,0xa7672661,0xd06016f7,0x4969474d,0x3e6e77db,0xaed16a4a,0xd9d65adc,0x40df0b66,936918e3,0xa9bcae53,0xdebb9ec5,0x47b2cf7f,0x30b5ffe9,0xbdbdf21c,0xcabac28a,0x53b39330,0x24b4a3a6,0xbad03605,0xcdd70693,0x54de5729,0x23d967bf,0xb3667a2e,0xc4614ab8,0x5d681b02,0x2a6f2b94,0xb40bbe37,0xc30c8ea1,0x5a05df1b,0x2d02ef8d]),dj=(e,t,i,s,r,a)=>{let{content:o,path:n,created:l}=e,h=(l.getHours()<<6|l.getMinutes())<<5|l.getSeconds()/2,d=(l.getFullYear()-1980<<4|l.getMonth()+1)<<5|l.getDate(),u=dV(r),c=void 0!==a?a:s,p=ic(n),g=p!==n,m="";if(g){let e=dB(1,1)+dB(dV(p),4)+p;m="up"+dB(e.length,2)+e}let v="\x14\0"+(g?"\0\b":"\0\0")+dB(8*!!t,2)+dB(h,2)+dB(d,2)+dB(c?u:0,4)+dB(null!=a?a:s,4)+dB(s,4)+dB(p.length,2)+dB(m.length,2),f="PK\x03\x04"+v+p+m,C="PK\x01\x02\x14\0"+v+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\x10\0\0\0")+dB(i,4)+p+m;return{localFileHeader:Uint8Array.from(f,e=>e.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(C,e=>e.charCodeAt(0))}},dW=e=>{let t;if("string"==typeof e){let i=atob(e.split(";base64,")[1]);t=Uint8Array.from(i,e=>e.charCodeAt(0))}else t=e;return{size:t.length,content:t}},dU=async(e,t)=>{let i,s,{content:r}=e,{size:a,content:o}=r?dW(r):{size:0,content:Uint8Array.from([])},n=!1;if("file"===e.type&&o&&a>0){let e=await dG(o);i=e.content,s=e.size,n=!0}return{...dj(e,n,t,a,o,s),content:i||o,isCompressed:n}},d_=(e,t)=>{let{content:i}=e,{content:s}=i?dW(i):{content:Uint8Array.from([])};return{...dj(e,!1,t,s.length,s,void 0),content:s,isCompressed:!1}},d$=class{static addFolders(e){e.forEach(this.addFolder.bind(this))}static addFolder(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}static addFile(e,t,i=!1){this.files.push({path:e,created:new Date,content:i?t:new TextEncoder().encode(t),isBase64:i,type:"file"})}static async getZipFile(e="application/zip"){let t=await this.buildCompressedFileStream();return this.clearStream(),new Blob([t],{type:e})}static getUncompressedZipFile(e="application/zip"){let t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e})}static clearStream(){this.folders=[],this.files=[]}static packageFiles(e){var t,i,s;let r,a=0,o=0;for(let t of e){let{localFileHeader:e,centralDirectoryHeader:i,content:s}=t;a+=e.length+s.length,o+=i.length}let n=new Uint8Array(a),l=new Uint8Array(o),h=0,d=0;for(let t of e){let{localFileHeader:e,centralDirectoryHeader:i,content:s}=t;n.set(e,h),h+=e.length,n.set(s,h),h+=s.length,l.set(i,d),d+=i.length}let u=(t=e.length,i=o,s=a,r="PK\x05\x06\0\0\0\0"+dB(t,2)+dB(t,2)+dB(i,4)+dB(s,4)+"\0\0",Uint8Array.from(r,e=>e.charCodeAt(0))),c=new Uint8Array(n.length+l.length+u.length);return c.set(n),c.set(l,n.length),c.set(u,n.length+l.length),c}static async buildCompressedFileStream(){let e=[...this.folders,...this.files],t=[],i=0;for(let s of e){let e=await dU(s,i),{localFileHeader:r,content:a}=e;t.push(e),i+=r.length+a.length}return this.packageFiles(t)}static buildFileStream(){let e=[...this.folders,...this.files],t=[],i=0;for(let s of e){let e=d_(s,i),{localFileHeader:r,content:a}=e;t.push(e),i+=r.length+a.length}return this.packageFiles(t)}};d$.folders=[],d$.files=[];var dY=class extends lw{wireBeans(e){this.beans=e}constructor(e,t,i){super(e),this.parentCache=t,this.params=i,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}
188setDataAndId(e,t,i){eM(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){let e=this.createLoadParams();eD(this.params.datasource.getRows)?ep("datasource is missing getRows method"):window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gos.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach((s,r)=>{this.startRow+r<i&&e(s,t.next())})}getLastAccessed(){return this.lastAccessed}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.next());let i=e-this.startRow;return this.rowNodes[i]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){let t=this.startRow+e,i=new r4(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i)}}processServerResult(e){this.rowNodes.forEach((t,i)=>{let s=e.rowData?e.rowData[i]:void 0;!t.id&&t.alreadyRendered&&s&&(this.rowNodes[i]=new r4(this.beans),this.rowNodes[i].setRowIndex(t.rowIndex),this.rowNodes[i].setRowTop(t.rowTop),this.rowNodes[i].setRowHeight(t.rowHeight),t.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[i],s,this.startRow+i)});let t=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroy(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()}),super.destroy()}},dK=class extends tk{constructor(e){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount,this.params=e}wireBeans(e){this.rowRenderer=e.rowRenderer,this.focusService=e.focusService}getRow(e,t=!1){let i=Math.floor(e/this.params.blockSize),s=this.blocks[i];if(!s){if(t)return;s=this.createBlock(i)}return s.getRow(e)}createBlock(e){let t=this.createBean(new dY(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}refreshCache(){0==this.blockCount?this.purgeCache():(this.getBlocksInOrder().forEach(e=>e.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad())}destroy(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e)),super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(this.gos.get("debug")&&ec(`InfiniteCache - onPageLoaded: page = ${e.getId()}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){let t=this.getBlocksInOrder().filter(t=>t!=e);t.sort((e,t)=>t.getLastAccessed()-e.getLastAccessed());let i=this.params.maxBlocksInCache>0,s=i?this.params.maxBlocksInCache-1:null;t.forEach((e,t)=>{if("needsLoading"===e.getState()&&t>=1||i&&t>=s){if(!(this.isBlockCurrentlyDisplayed(e)||this.isBlockFocused(e)))this.removeBlockFromCache(e)}})}isBlockFocused(e){let t=this.focusService.getFocusCellToUseAfterRefresh();if(!t||null!=t.rowPinned)return!1;let i=e.getStartRow(),s=e.getEndRow();return t.rowIndex>=i&&t.rowIndex<s}isBlockCurrentlyDisplayed(e){let t=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,i)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let t=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<t&&(this.rowCount=t)}}setRowCount(e,t){this.rowCount=e,eM(t)&&(this.lastRowIndexKnown=t),!this.lastRowIndexKnown&&this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){let t=new sL;this.getBlocksInOrder().forEach(i=>i.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){return tQ(this.blocks).sort((e,t)=>e.getId()-t.getId())}destroyBlock(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}
188onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventService.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){let e=[];this.getBlocksInOrder().forEach(t=>{t.getId()*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(e=>this.destroyBlock(e))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let i=[],s=-1,r=!1,a=new sL,o=!1;return this.getBlocksInOrder().forEach(n=>{if(!o){if(r&&s+1!==n.getId()){o=!0;return}s=n.getId(),n.forEachNode(s=>{let a=s===e||s===t;(r||a)&&i.push(s),a&&(r=!r)},a,this.rowCount)}}),o||r?[]:i}},dZ=class extends tk{constructor(){super(...arguments),this.beanName="rowModel"}wireBeans(e){this.filterManager=e.filterManager,this.sortController=e.sortController,this.selectionService=e.selectionService,this.rowRenderer=e.rowRenderer,this.rowNodeBlockLoader=e.rowNodeBlockLoader}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){"infinite"===this.gos.get("rowModelType")&&(this.rowHeight=ej(this.gos),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&ep("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onCacheUpdated.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=ej(this.gos),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){(!this.cacheParams||this.isSortModelDifferent())&&this.reset()}isSortModelDifferent(){return!eL(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){this.datasource&&(null==e6(this.gos)&&this.selectionService.reset("rowDataChanged"),this.resetCache())}dispatchModelUpdatedEvent(){this.eventService.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){var e,t;this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:null!=(e=null==(t=this.filterManager)?void 0:t.getFilterModel())?e:{},sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:ej(this.gos),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new sL},this.infiniteCache=this.createBean(new dK(this.cacheParams)),this.eventService.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.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){this.dispatchModelUpdatedEvent()}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){let 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&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}},dq="32.3.9",dQ={version:dq,moduleName:"@ag-grid-community/infinite-row-model-core",rowModel:"infinite",beans:[dZ],dependantModules:[lS]},dX={version:dq,moduleName:"@ag-grid-community/infinite-row-model",dependantModules:[dQ,{version:dq,moduleName:"@ag-grid-community/infinite-row-model-api",beans:[dr],apiFunctions:{refreshInfiniteCache:function(e){var t;null==(t=e.rowModelHelperService)||null==(t=t.getInfiniteRowModel())||t.refreshCache()},purgeInfiniteCache:function(e){var t;null==(t=e.rowModelHelperService)||null==(t=t.getInfiniteRowModel())||t.purgeCache()},getInfiniteRowCount:function(e){var t;return null==(t=e.rowModelHelperService)||null==(t=t.getInfiniteRowModel())?void 0:t.getRowCount()}},dependantModules:[dQ,dn]}]},dJ=(e,t)=>new d2(e.feature,t,e.defaults,e.css),d0=0,d1=(e,t=`customPart${++d0}`)=>new d2(e,t),d2=class e{constructor(e,t,i={},s=[]){this.feature=e,this.variant=t,this.defaults=i,this.css=s}get id(){return this.feature?`${this.feature}/${this.variant}`:this.variant}withParams(t){let i={...this.defaults};for(let[e,s]of Object.entries(t))null!=s&&(i[e]=s);return new e(this.feature,this.variant,i,this.css)}withAdditionalParams(e){return this.withParams(e)}withCSS(t){return new e(this.feature,this.variant,this.defaults,this.css.concat(t))}},d3
vendor: 92,529 bytes, line 188
188=':where([class^=ag-]){box-sizing:border-box;outline:none;&:after,&:before,&:focus,&:focus-within{box-sizing:border-box;outline:none}&:where(button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0}&:where(button){font-weight:inherit}&::-ms-clear{display:none}}.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-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.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-tab-guard{display:block;height:0;position:absolute;width:0}.ag-virtual-list-viewport .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.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-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;right:25px;transition:opacity 1s ease-out 3s;&:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==);background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}.ag-ltr .ag-watermark-text{padding-left:.7rem}.ag-rtl .ag-watermark-text{padding-right:.7rem}.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,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.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;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&.ag-layout-normal{overflow-y:auto;-webkit-overflow-scrolling:touch}}.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-virtual-list-viewport{overflow:auto;width:100%}.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-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.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}.ag-ltr .ag-floating-bottom-full-width-container,.ag-ltr .ag-floating-top-full-width-container,.ag-ltr .ag-full-width-container,.ag-ltr .ag-sticky-bottom-full-width-container,.ag-ltr .ag-sticky-top-full-width-container{left:0}.ag-rtl .ag-floating-bottom-full-width-container,.ag-rtl .ag-floating-top-full-width-container,.ag-rtl .ag-full-width-container,.ag-rtl .ag-sticky-bottom-full-width-container,.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-virtual-list-container{overflow:hidden}.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;&.ag-scrollbar-invisible{bottom:0;position:absolute;&.ag-apple-scrollbar{opacity:0;transition:opacity .4s;visibility:hidden;&.ag-scrollbar-active,&.ag-scrollbar-scrolling{opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&.ag-scrollbar-invisible{left:0;right:0}}.ag-body-vertical-scroll{height:100%;&.ag-scrollbar-invisible{top:0;z-index:10}}.ag-ltr .ag-body-vertical-scroll{&.ag-scrollbar-invisible{right:0}}.ag-rtl .ag-body-vertical-scroll{&.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;&.ag-scroller-corner{overflow-x:hidden}}.ag-ltr .ag-column-moving{.ag-cell,.ag-header-cell{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}.ag-rtl .ag-column-moving{.ag-cell,.ag-header-cell{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}.ag-row-animation .ag-row{transition:transform .4s,top .4s,opacity .2s}.ag-row-animation .ag-row.ag-after-created{transition:transform .4s,top .4s,height .4s,opacity .2s}.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}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}.ag-sparkline-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}.ag-full-width-row .ag-cell-wrapper.ag-row-group{align-items:center;height:100%}.ag-cell .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-top,.ag-pinned-right-floating-top{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-floating-bottom{border-top:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-bottom,.ag-pinned-right-floating-bottom{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%}.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-value-slide-out{opacity:1}.ag-ltr .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}.ag-rtl .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:is(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}.ag-ltr .ag-value-slide-out-end{margin-right:10px}.ag-rtl .ag-value-slide-out-end{margin-left:10px}.ag-opacity-zero{opacity:0!important}.ag-details-row{width:100%}.ag-details-row-fixed-height{height:100%}.ag-details-grid{width:100%}.ag-details-grid-fixed-height{height:100%}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}.ag-right-aligned-header{.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}.ag-pill-select{display:flex;flex-direction:column;.ag-column-drop-list{padding:0}.ag-select{padding-top:var(--ag-spacing)}.ag-picker-field-wrapper{background-color:transparent;border:0}.ag-picker-field-display{cursor:pointer}}.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}}.ag-rtl{direction:rtl;.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}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{overflow:hidden;visibility:hidden;width:0;& div{position:absolute}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-group-title-bar .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-direction:row;flex-wrap:wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}.ag-ltr .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-group-item-alignment-stretch .ag-group-item{align-items:stretch}.ag-group-item-alignment-start .ag-group-item{align-items:flex-start}.ag-group-item-alignment-end .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}.ag-rtl{text-align:right}.ag-ltr .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}.ag-rtl .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}.ag-ltr .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.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{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);color:var(--ag-cell-text-color);font-size:var(--ag-data-font-size);height:var(--ag-row-height);white-space:nowrap;width:100%;--ag-internal-content-line-height:min(calc(var(--ag-row-height) - 1px),var(--ag-line-height,1000px))}:where(.ag-body-vertical-content-no-gap) .ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important;display:none}.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)}.ag-ltr .ag-cell{border-right:var(--ag-column-border)}.ag-rtl .ag-cell{border-left:var(--ag-column-border)}.ag-ltr :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}.ag-rtl :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;&.ag-row-group{align-items:flex-start}>:not(.ag-cell-value):not(.ag-group-value){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}}.ag-ltr .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-rtl .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.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))}.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-ltr .ag-group-contracted,.ag-ltr .ag-group-expanded,.ag-ltr .ag-row-drag,.ag-ltr .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-group-contracted,.ag-rtl .ag-group-expanded,.ag-rtl .ag-row-drag,.ag-rtl .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-ltr .ag-group-child-count{margin-left:3px}.ag-rtl .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}.ag-ltr .ag-row-highlight-above:after,.ag-ltr .ag-row-highlight-below:after{left:1px}.ag-rtl .ag-row-highlight-above:after,.ag-rtl .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:-1px}.ag-row-highlight-above.ag-row-first:after{top:0}.ag-row-highlight-below:after{bottom:0}.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-hover.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}.ag-ltr .ag-right-aligned-cell{text-align:right}.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}.ag-cell:not(.ag-cell-inline-editing),.ag-full-width-row .ag-cell-wrapper.ag-row-group{-webkit-font-smoothing:subpixel-antialiased}.ag-ltr .ag-cell:not(.ag-cell-inline-editing),.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)}.ag-rtl .ag-cell:not(.ag-cell-inline-editing),.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-background-color);padding:calc(var(--ag-spacing)*3.5)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-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%}.ag-ltr .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}.ag-rtl .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}.ag-ltr .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}.ag-ltr .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-details-row{padding:calc(var(--ag-spacing)*3.75)}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;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):not(.ag-cell-range-single-cell){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right):not(.ag-cell-range-single-cell){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-pinned-right-header{height:100%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing),.ag-cell-range-selected:not(.ag-cell-focus){background-color:var(--ag-range-selection-background-color);&.ag-cell-range-chart{background-color:var(--ag-range-selection-chart-background-color)!important;&.ag-cell-range-chart-category{background-color:var(--ag-range-selection-chart-category-background-color)!important}}}.ag-cell-range-selected-1:not(.ag-cell-focus),.ag-root:not(.ag-context-menu-open) .ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-1:not(.ag-cell-inline-editing){background-color:var(--ag-range-selection-background-color)}.ag-cell-range-selected-2:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-3:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-4:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell){&.ag-cell-range-top{border-top-color:var(--ag-range-selection-border-color);border-top-style:var(--ag-range-selection-border-style)}&.ag-cell-range-right{border-right-color:var(--ag-range-selection-border-color);border-right-style:var(--ag-range-selection-border-style)}&.ag-cell-range-bottom{border-bottom-color:var(--ag-range-selection-border-color);border-bottom-style:var(--ag-range-selection-border-style)}&.ag-cell-range-left{border-left-color:var(--ag-range-selection-border-color);border-left-style:var(--ag-range-selection-border-style)}}.ag-ltr,.ag-rtl{.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-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-cell.ag-selection-fill-top,.ag-cell.ag-selection-fill-top.ag-cell-range-selected{border-top:1px dashed;border-top-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-right,.ag-ltr .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-right,.ag-rtl .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-cell.ag-selection-fill-bottom,.ag-cell.ag-selection-fill-bottom.ag-cell-range-selected{border-bottom:1px dashed;border-bottom-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-left,.ag-ltr .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-left,.ag-rtl .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-fill-handle,.ag-range-handle{background-color:var(--ag-range-selection-border-color);bottom:-1px;height:6px;position:absolute;width:6px}.ag-ltr .ag-fill-handle,.ag-ltr .ag-range-handle{right:-1px}.ag-rtl .ag-fill-handle,.ag-rtl .ag-range-handle{left:-1px}.ag-fill-handle{cursor:cell}.ag-ltr .ag-range-handle{cursor:nwse-resize}.ag-rtl .ag-range-handle{cursor:nesw-resize}.ag-cell-inline-editing{border:var(--ag-input-focus-border)!important}.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{flex:1 1 auto}.ag-floating-filter-input .ag-input-field-input[type=date]{width:1px}.ag-input-field-input{min-width:0;width:100%}.ag-column-select-header-filter-wrapper,.ag-filter-filter,.ag-filter-toolpanel-search,.ag-mini-filter{.ag-input-wrapper:before{background-color:currentColor;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:50%;position:absolute;width:12px}}.ag-ltr .ag-column-select-header-filter-wrapper,.ag-ltr .ag-filter-filter,.ag-ltr .ag-filter-toolpanel-search,.ag-ltr .ag-mini-filter{.ag-input-wrapper:before{margin-left:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-rtl .ag-column-select-header-filter-wrapper,.ag-rtl .ag-filter-filter,.ag-rtl .ag-filter-toolpanel-search,.ag-rtl .ag-mini-filter{.ag-input-wrapper:before{margin-right:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-advanced-filter-header{align-items:center;background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);display:flex;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);position:relative}.ag-advanced-filter{align-items:center;display:flex;width:100%}.ag-advanced-filter-apply-button,.ag-advanced-filter-builder-button{line-height:normal;white-space:nowrap}.ag-ltr .ag-advanced-filter-apply-button,.ag-ltr .ag-advanced-filter-builder-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-advanced-filter-apply-button,.ag-rtl .ag-advanced-filter-builder-button{margin-right:calc(var(--ag-spacing)*2)}.ag-advanced-filter-builder-button{align-items:center;background-color:unset;border:0;display:flex;font-size:var(--ag-font-size);font-weight:600;padding:var(--ag-spacing);&:hover:not(:disabled){background-color:var(--ag-row-hover-color)}&:not(:disabled){cursor:pointer}}.ag-ltr .ag-advanced-filter-builder-button-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-advanced-filter-builder-button-label{margin-right:var(--ag-spacing)}.ag-advanced-filter-builder{display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-advanced-filter-builder-list{flex:1;overflow:auto}.ag-advanced-filter-builder-button-panel{border-top:var(--ag-advanced-filter-builder-button-bar-border);display:flex;justify-content:flex-end;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-left:calc(var(--ag-spacing)*2)}}.ag-rtl .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-right:calc(var(--ag-spacing)*2)}}.ag-advanced-filter-builder-item-wrapper{align-items:center;display:flex;flex:1 1 auto;justify-content:space-between;overflow:hidden}.ag-ltr .ag-advanced-filter-builder-item-wrapper{padding-left:calc(var(--ag-icon-size)/2);padding-right:var(--ag-icon-size)}.ag-rtl .ag-advanced-filter-builder-item-wrapper{padding-left:var(--ag-icon-size);padding-right:calc(var(--ag-icon-size)/2)}.ag-virtual-list-viewport .ag-advanced-filter-builder-item-wrapper .ag-tab-guard{position:absolute}.ag-advanced-filter-builder-item-tree-lines>*{width:var(--ag-advanced-filter-builder-indent-size)}.ag-advanced-filter-builder-item-tree-lines .ag-advanced-filter-builder-item-tree-line-root{width:var(--ag-icon-size);&:before{height:50%;top:50%}}.ag-advanced-filter-builder-item-tree-line-horizontal,.ag-advanced-filter-builder-item-tree-line-vertical,.ag-advanced-filter-builder-item-tree-line-vertical-bottom,.ag-advanced-filter-builder-item-tree-line-vertical-top{align-items:center;display:flex;height:100%;position:relative;&:after,&:before{content:"";height:100%;position:absolute}}.ag-advanced-filter-builder-item-tree-line-horizontal:after{border-bottom:1px solid var(--ag-border-color);height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size))}.ag-ltr .ag-advanced-filter-builder-item-tree-line-horizontal:after{left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-horizontal:after{right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical:before{top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-top:before{height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{height:calc(50% - var(--ag-icon-size)*1.5/2);top:calc(50% + var(--ag-icon-size)*1.5/2);width:calc(var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-condition{padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-advanced-filter-builder-item,.ag-advanced-filter-builder-item-buttons,.ag-advanced-filter-builder-item-condition,.ag-advanced-filter-builder-item-tree-lines,.ag-advanced-filter-builder-pill,.ag-advanced-filter-builder-pill-wrapper{align-items:center;display:flex;height:100%}.ag-advanced-filter-builder-pill-wrapper{margin:0 var(--ag-spacing)}.ag-advanced-filter-builder-pill{border-radius:var(--ag-border-radius);min-height:calc(100% - var(--ag-spacing)*3);min-width:calc(var(--ag-spacing)*2);padding:var(--ag-spacing) calc(var(--ag-spacing)*2);position:relative;.ag-advanced-filter-builder-value-number{font-family:monospace;font-weight:700}.ag-advanced-filter-builder-value-empty{color:var(--ag-subtle-text-color)}}.ag-ltr .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-right:var(--ag-spacing)}}.ag-rtl .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-left:var(--ag-spacing)}}.ag-advanced-filter-builder-item-button,.ag-advanced-filter-builder-pill{&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-advanced-filter-builder-pill-display{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-advanced-filter-builder-join-pill{background-color:var(--ag-advanced-filter-builder-join-pill-color);cursor:pointer}.ag-advanced-filter-builder-column-pill{background-color:var(--ag-advanced-filter-builder-column-pill-color);cursor:pointer}.ag-advanced-filter-builder-option-pill{background-color:var(--ag-advanced-filter-builder-option-pill-color);cursor:pointer}.ag-advanced-filter-builder-value-pill{background-color:var(--ag-advanced-filter-builder-value-pill-color);cursor:text;max-width:140px;.ag-advanced-filter-builder-pill-display{display:block}}.ag-advanced-filter-builder-item-buttons>*{margin:0 calc(var(--ag-spacing)*.5)}.ag-advanced-filter-builder-item-button{color:var(--ag-subtle-text-color);cursor:pointer;position:relative}.ag-advanced-filter-builder-item-button-disabled{cursor:default;opacity:.5}.ag-advanced-filter-builder-virtual-list-container{top:var(--ag-spacing)}.ag-advanced-filter-builder-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:hover{background-color:var(--ag-row-hover-color);.ag-advanced-filter-builder-item-button{opacity:100%}}}.ag-advanced-filter-builder-validation .ag-advanced-filter-builder-invalid,.ag-advanced-filter-builder-virtual-list-item-highlight .ag-advanced-filter-builder-item-button:focus-visible{opacity:100%}.ag-advanced-filter-builder-invalid{color:var(--ag-invalid-color);cursor:default;margin:0 var(--ag-spacing)}.ag-cell-inline-editing{border-radius:var(--ag-border-radius);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-editor .ag-wrapper,.ag-cell-editor input,.ag-cell-wrapper{height:100%;line-height:normal;width:100%}}.ag-autocomplete-list-popup,.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{height:auto;padding:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-large-text-input textarea{resize:none}.ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding)}.ag-chart{display:flex;height:100%;position:relative;width:100%}.ag-chart-components-wrapper{display:flex}.ag-chart-canvas-wrapper,.ag-chart-components-wrapper{flex:1 1 auto;position:relative}.ag-chart-menu{display:flex;flex-direction:column;position:absolute;top:16px}.ag-ltr .ag-chart-menu{right:20px}.ag-rtl .ag-chart-menu{left:20px}.ag-chart-docked-container{min-width:var(--ag-chart-menu-panel-width);position:relative}.ag-chart-menu-hidden~.ag-chart-docked-container{display:none}.ag-chart-tabbed-menu{display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.ag-chart-tabbed-menu-header{cursor:default;flex:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-tabbed-menu-body{align-items:stretch;display:flex;flex:1 1 auto;overflow:hidden}.ag-chart-tab{overflow:hidden;overflow-y:auto;width:100%}.ag-chart-settings{overflow-x:hidden}.ag-chart-settings-wrapper{display:flex;flex-direction:column;height:100%;overflow:hidden;position:relative;width:100%}.ag-chart-settings-nav-bar{align-items:center;display:flex;height:30px;padding:0 10px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-chart-settings-card-selector{align-items:center;display:flex;flex:1 1 auto;height:100%;justify-content:space-around;padding:0 10px}.ag-chart-settings-card-item{background-color:var(--ag-foreground-color);border-radius:4px;cursor:pointer;height:10px;height:8px;position:relative;width:10px;width:8px;&.ag-not-selected{opacity:.2}&:before{background-color:transparent;content:" ";display:block;height:20px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:50%;width:20px}&.ag-selected{background-color:var(--ag-accent-color)}}.ag-chart-settings-next,.ag-chart-settings-prev{flex:none;position:relative;&:focus-within{border-radius:1px;box-shadow:var(--ag-focus-shadow)}}.ag-chart-settings-next-button,.ag-chart-settings-prev-button{cursor:pointer;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.ag-chart-settings-mini-charts-container{flex:1 1 auto;overflow-x:hidden;overflow-y:auto;position:relative}.ag-chart-settings-mini-wrapper{display:flex;flex-direction:column;left:0;min-height:100%;overflow:hidden;position:absolute;top:0;width:100%;&.ag-animating{transition:left .3s;transition-timing-function:ease-in-out}}.ag-chart-mini-thumbnail{cursor:pointer}.ag-chart-mini-thumbnail-canvas{display:block}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper,.ag-chart-format-wrapper{display:flex;flex-direction:column;padding-bottom:16px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper{height:100%;overflow-y:auto}.ag-chart-advanced-settings{background-color:var(--ag-chrome-background-color)}.ag-chart-advanced-settings,.ag-chart-advanced-settings-wrapper{width:100%}.ag-chart-advanced-settings-wrapper{padding-bottom:0}.ag-chart-advanced-settings-section,.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-advanced-settings-section{border-bottom:1px solid var(--ag-border-color)}.ag-chart-empty-text{align-items:center;background-color:var(--ag-background-color);display:flex;height:100%;justify-content:center;top:0;width:100%}.ag-chart .ag-chart-menu{display:none}.ag-chart-menu-hidden:hover .ag-chart-menu{display:block}.ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{display:flex;flex-direction:row;gap:20px;top:8px;width:auto}}}.ag-ltr .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:right;right:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-rtl .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:left;left:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-charts-font-size-color{align-self:stretch;display:flex;justify-content:space-between}.ag-charts-data-group-item{position:relative}.ag-charts-data-group-item:not(:last-child){margin-bottom:var(--ag-spacing)}.ag-chart-menu{background:var(--ag-background-color);border-radius:var(--ag-border-radius)}.ag-chart-menu-icon{border-radius:var(--ag-border-radius);cursor:pointer;margin:2px 0;opacity:.5;opacity:.8;&:hover{opacity:1}}.ag-chart-menu-toolbar-button{background-color:unset;border:0;border-radius:1px;padding:0 2px}.ag-chart-mini-thumbnail{border:1px solid var(--ag-border-color);border-radius:5px;&.ag-selected{border-color:var(--ag-accent-color);border-width:2px}&:focus-visible{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}.ag-chart-data-column-drag-handle{margin-left:var(--ag-spacing)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{position:relative}.ag-charts-advanced-settings-top-level-group-title-bar{background-color:unset;position:relative}.ag-charts-advanced-settings-top-level-group-title-bar:focus-visible,.ag-charts-data-group-title-bar:focus-visible,.ag-charts-format-top-level-group-title-bar:focus-visible,.ag-charts-settings-group-title-bar:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-charts-data-group-container{padding:calc(var(--ag-widget-container-vertical-padding)*.5) var(--ag-widget-container-horizontal-padding);.ag-charts-data-group-item:not(.ag-charts-format-sub-level-group):not(.ag-pill-select):not(.ag-select){height:var(--ag-list-item-height)}.ag-charts-data-group-item.ag-picker-field{margin-top:var(--ag-spacing)}}.ag-charts-advanced-settings-top-level-group-container,.ag-charts-format-top-level-group-container{margin-left:calc(var(--ag-spacing)*2);padding:var(--ag-spacing)}.ag-charts-advanced-settings-top-level-group-item,.ag-charts-format-top-level-group-item{margin:var(--ag-spacing) 0}.ag-charts-format-sub-level-group-container{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-settings-group-container{display:grid;grid-template-columns:60px 1fr 60px 1fr 60px;padding:var(--ag-spacing);row-gap:8px;.ag-chart-mini-thumbnail:nth-child(3n+1){grid-column:1}.ag-chart-mini-thumbnail:nth-child(3n+2){grid-column:3}.ag-chart-mini-thumbnail:nth-child(3n+3){grid-column:5}}.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-menu-panel{background-color:var(--ag-chrome-background-color)}.ag-ltr .ag-chart-menu-panel{border-left:1px solid var(--ag-border-color)}.ag-rtl .ag-chart-menu-panel{border-right:1px solid var(--ag-border-color)}.ag-chart-tabbed-menu-body{position:relative;&:after{background:linear-gradient(var(--ag-background-color),transparent);content:"";display:block;height:16px;left:0;position:absolute;right:0;top:0}}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{border-top:none;font-weight:500;padding:0 calc(var(--ag-spacing)*1.5)}.ag-chart-settings-nav-bar{border-top:1px solid var(--ag-border-color)}.ag-charts-format-sub-level-group-title-bar{background:none;font-weight:500}.ag-chart-data-section,.ag-chart-format-section{.ag-label:not(.ag-group-title-bar){color:var(--ag-chart-menu-label-color)}.ag-label-align-top .ag-label{margin-bottom:var(--ag-widget-vertical-spacing);margin-top:calc(var(--ag-widget-vertical-spacing)*.5)}.ag-slider.ag-label-align-top .ag-label{margin-bottom:0}& label{display:inline-block}}.ag-chart-data-wrapper,.ag-chart-format-wrapper,.ag-charts-data-group-container,.ag-charts-data-group-title-bar,.ag-charts-format-sub-level-group,.ag-charts-format-sub-level-group-container,.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-group-item:last-child,.ag-charts-format-sub-level-group-title-bar,.ag-charts-format-top-level-group,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-format-top-level-group-item,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{margin:0;padding:0}.ag-charts-data-group,.ag-charts-format-top-level-group{border-top:1px solid var(--ag-border-color)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-data-group .ag-charts-data-group-container,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-settings-group .ag-charts-settings-group-container{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-charts-format-sub-level-group-title-bar{padding:var(--ag-widget-vertical-spacing) 0}.ag-charts-format-sub-level-group-container{padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-vertical-spacing)}.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-no-header-group-container>*,.ag-charts-format-top-level-group-container>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-chart-advanced-settings-section,.ag-chart-settings-mini-wrapper,.ag-charts-data-group-item{padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-chart-advanced-settings-section{padding-top:var(--ag-widget-container-vertical-padding)}.ag-charts-advanced-settings-top-level-group{.ag-charts-advanced-settings-top-level-group-container,.ag-charts-advanced-settings-top-level-group-title-bar{padding:0 var(--ag-widget-container-horizontal-padding)}}.ag-charts-advanced-settings-top-level-group-container{margin:0}.ag-charts-advanced-settings-top-level-group-item{margin-bottom:0;margin-top:calc(var(--ag-widget-vertical-spacing)*2)}.ag-chart-menu{--ag-icon-size:20px;background-color:color-mix(in srgb,transparent,var(--ag-background-color) 30%);padding:4px 2px}.ag-chart-settings-card-item.ag-not-selected:hover{opacity:.35}.ag-column-drop{align-items:center;display:inline-flex;overflow:auto;position:relative;width:100%}.ag-column-drop-cell,.ag-column-drop-list{align-items:center;display:flex}.ag-column-drop-cell{gap:var(--ag-spacing);position:relative}.ag-column-drop-cell-text{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-drop-vertical{align-items:stretch;display:flex;flex-direction:column;overflow:hidden}.ag-column-drop-vertical-title-bar{align-items:center;display:flex;flex:none}.ag-column-drop-vertical-list{align-items:stretch;flex-direction:column;flex-grow:1;overflow-x:auto;position:relative;>*{flex:none}}.ag-column-drop-empty .ag-column-drop-vertical-list{overflow:hidden}.ag-column-drop-vertical-empty-message{display:block}.ag-column-drop.ag-column-drop-horizontal{overflow:hidden;white-space:nowrap}.ag-column-drop-cell-button{cursor:pointer}.ag-column-drop-wrapper{display:flex}.ag-column-drop-horizontal-half-width{width:50%!important}.ag-column-drop-cell{background:var(--ag-column-drop-cell-background-color);border:var(--ag-column-drop-cell-border);border-radius:500px;padding:calc(var(--ag-spacing)*.5);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-column-drop-cell{padding-left:calc(var(--ag-spacing)*.75)}.ag-rtl .ag-column-drop-cell{padding-right:calc(var(--ag-spacing)*.75)}.ag-column-drop-cell-button{min-width:calc(var(--ag-spacing)*4)}.ag-column-drop-cell-ghost{opacity:.5}.ag-column-drop-horizontal{gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height)}.ag-ltr .ag-column-drop-horizontal{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-column-drop-horizontal{padding-right:var(--ag-cell-horizontal-padding)}.ag-column-drop-horizontal-list{gap:var(--ag-cell-widget-spacing)}.ag-column-drop-vertical-list{padding-bottom:var(--ag-spacing);padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-column-drop-vertical-cell{margin-top:var(--ag-spacing)}.ag-ltr .ag-column-drop-vertical-icon{margin-right:var(--ag-widget-horizontal-spacing)}.ag-rtl .ag-column-drop-vertical-icon{margin-left:var(--ag-widget-horizontal-spacing)}.ag-column-drop-vertical-empty-message{bottom:0;left:0;margin-top:var(--ag-spacing);overflow:hidden;position:absolute;right:0;top:0}.ag-select-agg-func-popup{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);height:calc(var(--ag-spacing)*5*3.5);padding:0;position:absolute}.ag-select-agg-func-virtual-list-item{cursor:default;&:hover{background-color:var(--ag-selected-row-background-color)}&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-select-agg-func-virtual-list-item{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-select-agg-func-virtual-list-item{padding-right:calc(var(--ag-spacing)*2)}.ag-sort-indicator-container{display:contents}.ag-ltr .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}.ag-rtl .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-column-drop-horizontal{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border)}.ag-ltr .ag-column-drop-horizontal-half-width:not(:last-child){border-right:var(--ag-column-border)}.ag-rtl .ag-column-drop-horizontal-half-width:not(:last-child){border-left:var(--ag-column-border)}.ag-column-drop-cell-button{min-width:0;opacity:.75;&:hover{opacity:1}}.ag-column-drop-vertical{min-height:75px}.ag-column-drop-vertical-title-bar{padding:var(--ag-widget-container-vertical-padding) calc(var(--ag-spacing)*2) 0}.ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);padding:calc(var(--ag-spacing)*2)}.ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{flex:none;height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding)}.ag-column-select-column,.ag-column-select-column-group,.ag-column-select-header{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);position:relative}.ag-column-select-column,.ag-column-select-column-group{height:100%}.ag-column-select-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}.ag-ltr .ag-column-select-column,.ag-ltr .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-rtl .ag-column-select-column,.ag-rtl .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-ltr .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-rtl .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column,.ag-column-select-column-group{&:not(:last-child){margin-bottom:var(--ag-widget-vertical-spacing)}}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}.ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}.ag-filter-body-wrapper{display:flex;flex-direction:column}.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-full-body>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-floating-filter-button{display:flex;flex:none}.ag-set-floating-filter-input input[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1}.ag-column-panel{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.ag-pivot-mode-panel{display:flex;height:var(--ag-header-height)}.ag-pivot-mode-select{align-items:center;display:flex}.ag-ltr .ag-pivot-mode-select{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-pivot-mode-select{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-column-panel-column-select{border-bottom:var(--ag-tool-panel-separator-border);border-top:var(--ag-tool-panel-separator-border)}:where(.ag-column-panel) .ag-column-drop-vertical{flex:1 1 0px;min-height:50px;&:where(:not(.ag-last-column-drop)){border-bottom:var(--ag-tool-panel-separator-border)}}.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;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);max-width:200px;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2))}.ag-dnd-ghost,.ag-header{display:flex;overflow:hidden;white-space:nowrap}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-header-row:not(:first-child){.ag-header-cell:not(.ag-header-span-height.ag-header-span-total),.ag-header-group-cell.ag-header-group-cell-with-group{border-top:var(--ag-header-row-border)}}.ag-header-row:not(.ag-header-row-column-group){overflow:hidden}.ag-header.ag-header-allow-overflow .ag-header-row{overflow:visible}.ag-header-cell,.ag-header-group-cell{align-items:center;display:inline-flex;gap:var(--ag-cell-widget-spacing);height:100%;overflow:hidden;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:not(.ag-floating-filter),.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)}&:hover:before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&.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-filter-button,.ag-header-cell.ag-header-active .ag-header-cell-menu-button{opacity:1}.ag-header-cell-menu-button:not(.ag-header-menu-always-show){opacity:0;transition:opacity .2s}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;gap:var(--ag-spacing);padding:5px 0}.ag-header-cell-label{overflow:hidden;text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;position:sticky}.ag-ltr .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}.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-group-cell .ag-header-cell-comp-wrapper{display:flex}.ag-header-cell:not(.ag-header-cell-auto-height) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-comp-wrapper{width:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-right-aligned-header .ag-header-cell-label{flex-direction:row-reverse}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-cell-sortable .ag-header-cell-label,.ag-header-expand-icon,.ag-panel-title-bar-button{cursor:pointer}.ag-advanced-filter-header-cell,.ag-header-cell,.ag-header-group-cell{&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}.ag-ltr :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-rtl :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}.ag-ltr :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}.ag-rtl :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell: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}.ag-ltr .ag-header-cell:after,.ag-ltr .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-right:var(--ag-header-column-border);right:0}.ag-rtl .ag-header-cell:after,.ag-rtl .ag-header-group-cell: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-accent-color);content:"";height:100%;position:absolute;width:1px}.ag-ltr .ag-header-highlight-before:after{left:0}.ag-ltr .ag-header-highlight-after:after,.ag-rtl .ag-header-highlight-before:after{right:0}.ag-rtl .ag-header-highlight-after:after{left:0}.ag-ltr .ag-pinned-left-header .ag-header-highlight-after:after{right:1px}.ag-rtl .ag-pinned-left-header .ag-header-highlight-after:after{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;&: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}}.ag-ltr .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-rtl .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}.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.ag-header-span-height .ag-header-cell-resize{display:none}.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%;min-width:180px;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}.ag-ltr .ag-compact-menu-option-icon,.ag-ltr .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-compact-menu-option-icon,.ag-rtl .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}.ag-ltr .ag-compact-menu-option-shortcut,.ag-ltr .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-shortcut,.ag-rtl .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}.ag-ltr .ag-compact-menu-option-popup-pointer,.ag-ltr .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-popup-pointer,.ag-rtl .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;.ag-column-select{height:100%}}.ag-menu.ag-tabs{min-width:290px}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}.ag-filter-select .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}.ag-ltr .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}.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)}.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))}.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-ltr .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-rtl .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-ltr .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.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}.ag-ltr .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;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:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}.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);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.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)}.ag-menu-option{cursor:pointer;font-weight:500}.ag-ltr .ag-menu-option-popup-pointer .ag-icon{text-align:right}.ag-rtl .ag-menu-option-popup-pointer .ag-icon{text-align:left}.ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-header-text-color);cursor:default;display:flex;flex:none;height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-ltr .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}.ag-rtl .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{color:var(--ag-header-text-color);flex:1 1 auto;font-weight:500}.ag-panel-title-bar-buttons{display:flex}.ag-panel-title-bar-button{cursor:pointer}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1;&.ag-resizer-topLeft{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{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;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;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-ltr .ag-resizer{&.ag-resizer-topLeft{cursor:nwse-resize}&.ag-resizer-topRight{cursor:nesw-resize}&.ag-resizer-bottomRight{cursor:nwse-resize}&.ag-resizer-bottomLeft{cursor:nesw-resize}}.ag-rtl .ag-resizer{&.ag-resizer-topLeft{cursor:nesw-resize}&.ag-resizer-topRight{cursor:nwse-resize}&.ag-resizer-bottomRight{cursor:nesw-resize}&.ag-resizer-bottomLeft{cursor:nwse-resize}}.ag-dragging-fill-handle .ag-dialog,.ag-dragging-range-handle .ag-dialog{opacity:.7;pointer-events:none}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{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{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-select{align-items:center;display:flex;flex-direction:row;.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}&.ag-disabled{opacity:.5}}.ag-ltr .ag-select{.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}.ag-rtl .ag-select{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-rich-select{cursor:default;height:100%}.ag-rich-select-value{align-items:center;background-color:var(--ag-input-background-color);display:flex;height:100%;padding:var(--ag-spacing);.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;&.ag-display-as-placeholder{opacity:.5}}}.ag-rich-select-list{background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);box-shadow:var(--ag-dropdown-shadow);height:auto;position:relative;width:100%;.ag-loading-text{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}}.ag-rich-select-row{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;padding:0 var(--ag-spacing);white-space:nowrap}.ag-rich-select-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-rich-select-row-highlighted,.ag-rich-select-row:hover{background-image:linear-gradient(var(--ag-row-hover-color),var(--ag-row-hover-color))}.ag-rich-select-row-text-highlight{font-weight:700}.ag-rich-select-field-input{flex:1 1 auto;.ag-input-field-input{border:none!important;box-shadow:none!important;padding:0!important;text-overflow:ellipsis;&::-moz-placeholder{opacity:.8}&::placeholder{opacity:.8}}}.ag-ltr .ag-rich-select-field-input{left:var(--ag-spacing)}.ag-rtl .ag-rich-select-field-input{right:var(--ag-spacing)}.ag-popup-editor .ag-rich-select-value{height:var(--ag-row-height);min-width:200px}.ag-rich-select-virtual-list-item{cursor:default;height:var(--ag-list-item-height)}.ag-pill-container{display:flex;flex-wrap:nowrap;gap:.25rem}.ag-pill{align-items:center;background:var(--ag-select-cell-background-color);border:var(--ag-select-cell-border);border-radius:var(--ag-border-radius);display:flex;padding:0 .25rem;white-space:nowrap;&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-pill .ag-pill-button{border:none;padding:0;&:hover{color:var(--ag-accent-color);cursor:pointer}}.ag-ltr .ag-pill .ag-pill-button{margin-left:var(--ag-spacing)}.ag-rtl .ag-pill .ag-pill-button{margin-right:var(--ag-spacing)}ag-grid,ag-grid-angular{display:block}.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);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-tool-panel-wrapper{cursor:default;display:flex;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-side-bar-panel-width)}.ag-select-agg-func-item{align-items:center;display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;height:100%;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;>*{flex:none}}.ag-tool-panel-horizontal-resize{cursor:ew-resize;height:100%;position:absolute;top:0;width:5px;z-index:1}.ag-ltr .ag-side-bar-left .ag-tool-panel-horizontal-resize{right:-3px}.ag-ltr .ag-side-bar-right .ag-tool-panel-horizontal-resize,.ag-rtl .ag-side-bar-left .ag-tool-panel-horizontal-resize{left:-3px}.ag-rtl .ag-side-bar-right .ag-tool-panel-horizontal-resize{right:-3px}.ag-side-bar{background-color:var(--ag-side-bar-background-color);display:flex;flex-direction:row-reverse;position:relative}.ag-side-bar-left{flex-direction:row;order:-1}.ag-side-buttons{position:relative;width:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-side-button{&.ag-selected{background-color:var(--ag-background-color);border-bottom:1px solid var(--ag-border-color);&:not(:first-of-type){border-top:1px solid var(--ag-border-color)}}}.ag-side-button-button{align-items:center;cursor:pointer;display:flex;flex-direction:column;gap:var(--ag-spacing);padding:calc(var(--ag-spacing)*3) 0;position:relative;white-space:nowrap;width:100%;&:focus{box-shadow:none}}.ag-side-button-button:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-side-button-label{writing-mode:vertical-lr}@media (max-resolution:1.5x){.ag-side-button-label{font-family:"Segoe UI",var(--ag-font-family)}.ag-ltr .ag-side-button-label{transform:rotate(.05deg)}.ag-rtl .ag-side-button-label{transform:rotate(-.05deg)}}.ag-ltr .ag-side-bar-left,.ag-rtl .ag-side-bar-right{border-right:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-left:var(--ag-side-panel-border)}}.ag-ltr .ag-side-bar-right,.ag-rtl .ag-side-bar-left{border-left:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-right:var(--ag-side-panel-border)}}.ag-ltr .ag-chart-menu-panel{border-left:var(--ag-side-panel-border)}.ag-rtl .ag-chart-menu-panel{border-right:var(--ag-side-panel-border)}.ag-button{border-radius:0}.ag-standard-button{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);cursor:pointer;font-family:inherit;padding:var(--ag-spacing) calc(var(--ag-spacing)*2);&:hover{background-color:var(--ag-row-hover-color)}&:active{border-color:var(--ag-accent-color)}&:disabled{background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}}:where(input[class^=ag-][type=button],button[class^=ag-]):focus-visible{box-shadow:var(--ag-focus-shadow)}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow-x:hidden;overflow-y:auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;& span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.ag-ltr .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}.ag-rtl .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-range-field{align-items:center;display:flex;.ag-input-wrapper{height:100%}}& input[class^=ag-][type=range]{-webkit-appearance:none;background:none;height:100%;overflow:visible;padding:0;width:100%;&::-webkit-slider-runnable-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-moz-range-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-webkit-slider-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&::-moz-ag-range-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&:focus{&::-webkit-slider-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}&::-moz-ag-range-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}&:active{&::-webkit-slider-runnable-track{background-color:var(--ag-accent-color)}&::-moz-ag-range-track{background-color:var(--ag-accent-color)}}&:disabled{opacity:.5}}.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:solid var(--ag-toggle-button-border-width) var(--ag-toggle-button-off-border-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;& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&:before{background-color:var(--ag-toggle-button-switch-background-color);border:var(--ag-toggle-button-border-width) solid var(--ag-toggle-button-switch-border-color);border-radius:100%;content:"";display:block;height:var(--ag-toggle-button-height);pointer-events:none;position:absolute;top:calc(0px - var(--ag-toggle-button-border-width));width:var(--ag-toggle-button-height)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);border-color:var(--ag-toggle-button-on-border-color);&:before{border-color:var(--ag-toggle-button-on-border-color)}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}.ag-ltr .ag-toggle-button-input-wrapper{&:before{left:calc(0px - var(--ag-toggle-button-border-width));transition:left .1s}&.ag-checked{&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-rtl .ag-toggle-button-input-wrapper{&:before{right:calc(0px - var(--ag-toggle-button-border-width));transition:right .1s}&.ag-checked{&:before{right:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-autocomplete{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-autocomplete-list-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-autocomplete-list{height:calc(var(--ag-row-height)*6.5);min-width:200px;position:relative;width:100%}.ag-autocomplete-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:focus-visible:after{content:none}&:hover{background-color:var(--ag-row-hover-color)}}.ag-autocomplete-row{align-items:center;display:flex;flex:1 1 auto;overflow:hidden}.ag-autocomplete-row-label{margin:0 var(--ag-widget-container-horizontal-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-autocomplete-row-selected{background-color:var(--ag-selected-row-background-color)}.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);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:not(.ag-tooltip-interactive),.ag-tooltip:not(.ag-tooltip-interactive){pointer-events:none}.ag-tooltip-custom.ag-tooltip-animate,.ag-tooltip.ag-tooltip-animate{transition:opacity 1s;&.ag-tooltip-hiding{opacity:0}}.ag-angle-select{align-items:center;display:flex}.ag-angle-select-wrapper{display:flex}.ag-angle-select-parent-circle{display:block;position:relative}.ag-angle-select-child-circle{position:absolute}.ag-slider-wrapper{display:flex;.ag-input-field{flex:1 1 auto}}.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-color-panel{display:flex;flex-direction:column;text-align:center;width:100%}.ag-spectrum-color{cursor:default;flex:1 1 auto;overflow:visible;position:relative}.ag-spectrum-fill{inset:0;position:absolute}.ag-spectrum-val{cursor:pointer}.ag-spectrum-dragger{cursor:pointer;pointer-events:none;position:absolute}.ag-spectrum-alpha,.ag-spectrum-hue{cursor:default}.ag-spectrum-hue-background{background:linear-gradient(270deg,red 3%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);height:100%;width:100%}.ag-spectrum-alpha-background{background:linear-gradient(to right,var(--ag-internal-spectrum-alpha-color-from),var(--ag-internal-spectrum-alpha-color-to)),url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>\') 0 0 /4px 4px;height:100%;width:100%}.ag-spectrum-tool{cursor:pointer;position:relative}.ag-spectrum-slider{pointer-events:none;position:absolute}.ag-spectrum-alpha .ag-spectrum-slider{background:linear-gradient(to bottom,var(--ag-internal-spectrum-alpha-color),var(--ag-internal-spectrum-alpha-color)) var(--ag-background-color)}.ag-recent-colors{display:flex;gap:6px;margin-top:10px}.ag-recent-color{cursor:pointer}.ag-angle-select[disabled]{opacity:.5;pointer-events:none}.ag-ltr .ag-angle-select-field,.ag-ltr .ag-slider-field{margin-right:calc(var(--ag-spacing)*2)}.ag-rtl .ag-angle-select-field,.ag-rtl .ag-slider-field{margin-left:calc(var(--ag-spacing)*2)}.ag-angle-select-parent-circle{background-color:var(--ag-background-color);border:1px solid;border-color:var(--ag-border-color);border-radius:12px;height:24px;width:24px}.ag-angle-select-child-circle{background-color:var(--ag-foreground-color);border-radius:3px;height:6px;left:12px;margin-left:-3px;margin-top:-4px;top:4px;width:6px}.ag-picker-field-wrapper{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{border:var(--ag-input-focus-border);box-shadow:var(--ag-focus-shadow)}}.ag-picker-field-button{background-color:var(--ag-background-color)}.ag-dialog.ag-color-dialog{border-radius:5px}.ag-color-picker{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-picker-field-display{align-items:center;display:flex;flex-direction:row;min-height:var(--ag-list-item-height)}}.ag-ltr .ag-color-picker-color,.ag-ltr .ag-color-picker-value{margin-right:var(--ag-spacing)}.ag-rtl .ag-color-picker-color,.ag-rtl .ag-color-picker-value{margin-left:var(--ag-spacing)}.ag-color-panel{padding:var(--ag-spacing)}.ag-spectrum-tools{padding-bottom:0;padding-left:0;padding-right:0}.ag-spectrum-tool{height:12px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:12px}.ag-spectrum-slider{border:3px solid #f8f8f8;border-radius:18px;height:18px;margin-top:-15px;width:18px}.ag-recent-colors{margin-bottom:2px;margin-left:var(--ag-spacing);margin-right:var(--ag-spacing)}.ag-color-input-color,.ag-color-picker-color,.ag-recent-color{border-radius:4px}.ag-recent-color{border:1px solid var(--ag-border-color)}.ag-spectrum-sat{background-image:linear-gradient(90deg,#fff,hsla(20,42%,65%,0))}.ag-spectrum-val{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.ag-spectrum-dragger{background:#000;border:3px solid #fff;border-radius:18px;box-shadow:0 0 2px 0 rgba(0,0,0,.24);height:18px;width:18px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:2px}.ag-spectrum-tool{border-radius:2px;height:11px;margin-bottom:10px}.ag-spectrum-slider{border:2px solid #fff;border-radius:13px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:13px;margin-top:-12px;width:13px}.ag-recent-color,.ag-spectrum-color,.ag-spectrum-slider{&:focus-visible:not(:disabled):not([readonly]){box-shadow:var(--ag-focus-shadow)}}.ag-color-input{.ag-color-input-color{position:absolute}}.ag-ltr .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-left:var(--ag-spacing)}}.ag-rtl .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-right:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-right:var(--ag-spacing)}}.ag-color-input-color,.ag-color-picker-color{border:1px solid var(--ag-border-color);border-radius:2px;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-pill-select{.ag-picker-field-display{font-weight:500}.ag-picker-field-display,.ag-picker-field-icon .ag-icon{color:var(--ag-chart-menu-label-color)}}.ag-filter-toolpanel{flex:1 1 0px;min-width:0}.ag-filter-toolpanel-header{position:relative}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{align-items:center;display:flex;>*{align-items:center;display:flex}}.ag-filter-toolpanel-header{height:calc(var(--ag-spacing)*6);&:focus-visible{border-radius:var(--ag-border-radius);box-shadow:inset var(--ag-focus-shadow)}}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{padding:0 var(--ag-spacing)}.ag-filter-toolpanel-group:not(.ag-has-filter)>.ag-group-title-bar .ag-filter-toolpanel-group-instance-header-icon{display:none}.ag-filter-toolpanel-group-level-0-header{height:calc(var(--ag-spacing)*8)}.ag-filter-toolpanel-group-item{margin-bottom:calc(var(--ag-spacing)*.5);margin-top:calc(var(--ag-spacing)*.5)}.ag-filter-toolpanel-search{margin-bottom:var(--ag-spacing);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-toolpanel-search-input{flex-grow:1;height:calc(var(--ag-spacing)*4)}.ag-ltr .ag-filter-toolpanel-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-filter-toolpanel-expand{cursor:pointer}.ag-ltr .ag-filter-toolpanel-expand{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-expand{margin-left:var(--ag-spacing)}.ag-ltr .ag-filter-toolpanel-group-title-bar,.ag-ltr .ag-filter-toolpanel-instance-header{padding-left:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-rtl .ag-filter-toolpanel-group-title-bar,.ag-rtl .ag-filter-toolpanel-instance-header{padding-right:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-ltr .ag-filter-toolpanel-instance-body{margin-left:var(--ag-filter-tool-panel-group-indent)}.ag-rtl .ag-filter-toolpanel-instance-body{margin-right:var(--ag-filter-tool-panel-group-indent)}.ag-ltr .ag-filter-toolpanel-group-instance-header-icon,.ag-ltr .ag-filter-toolpanel-instance-header-icon{margin-left:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-instance-header-icon,.ag-rtl .ag-filter-toolpanel-instance-header-icon{margin-right:var(--ag-spacing)}.ag-filter-toolpanel-instance-filter{background-color:var(--ag-chrome-background-color)}.ag-filter-toolpanel-group-level-0{border-top:none}.ag-filter-toolpanel-header{height:auto;padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-filter-toolpanel-group-item{margin:0}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{color:var(--ag-header-text-color);font-weight:500}.ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}.ag-paging-page-size .ag-wrapper{min-width:50px}.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;&:focus-visible{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-status-bar{border-top:var(--ag-footer-row-border);display:flex;justify-content:space-between;line-height:1.5;overflow:hidden;padding-left:calc(var(--ag-spacing)*4);padding-right:calc(var(--ag-spacing)*4)}.ag-status-panel{display:inline-flex}.ag-status-name-value{white-space:nowrap}.ag-status-bar-center,.ag-status-bar-left,.ag-status-bar-right{display:inline-flex}.ag-status-bar-center{text-align:center}.ag-status-name-value{margin-left:var(--ag-spacing);margin-right:var(--ag-spacing);padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-container-vertical-padding)}.ag-status-name-value-value{font-weight:500}.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-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}.ag-icon{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-column-select-column-group-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}}.ag-column-select-column-readonly .ag-icon-grip,.ag-column-select-column-readonly.ag-icon-grip{opacity:.35}.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-contracted .ag-icon,.ag-group-expanded .ag-icon,.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{&:hover{background-color:var(--ag-icon-button-hover-color);border-radius:1px;box-shadow:0 0 0 4px var(--ag-icon-button-hover-color)}}.ag-filter-active{--ag-icon-button-hover-color:color-mix(in srgb,transparent,var(--ag-accent-color) 28%);background-color:color-mix(in srgb,transparent,var(--ag-accent-color) 14%);border-radius:1px;box-shadow:0 0 0 4px color-mix(in srgb,transparent,var(--ag-accent-color) 14%);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}.ag-icon-filter{clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z")}}.ag-ltr .ag-filter-active{&:after{right:-1px}}.ag-rtl .ag-filter-active{&:after{left:-1px}}.ag-label-align-right{.ag-label{order:1}>*{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-label{white-space:nowrap}.ag-ltr .ag-label{margin-right:var(--ag-spacing)}.ag-rtl .ag-label{margin-left:var(--ag-spacing)}.ag-label-align-top .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}.ag-ltr .ag-label-align-right .ag-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-label-align-right .ag-label{margin-right:var(--ag-spacing)}',
188d4
vendor: 5,014 bytes, line 188
188={backgroundColor:"#FFF",foregroundColor:"#181d1f",textColor:{ref:"foregroundColor"},accentColor:"#2196f3",invalidColor:"#e02525",borderColor:{ref:"foregroundColor",mix:.15},wrapperBorder:!0,rowBorder:!0,browserColorScheme:"light",headerRowBorder:{ref:"rowBorder"},footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],chromeBackgroundColor:{ref:"foregroundColor",mix:.02,onto:"backgroundColor"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"backgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:{ref:"accentColor"},rangeSelectionBackgroundColor:{ref:"accentColor",mix:.2},rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:{ref:"accentColor",mix:.5},rowHoverColor:{ref:"accentColor",mix:.08},columnHoverColor:{ref:"accentColor",mix:.05},selectedRowBackgroundColor:{ref:"accentColor",mix:.12},modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:{ref:"backgroundColor"},borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:{radius:16,color:"#00000026"},dropdownShadow:{radius:4,spread:1,offsetY:1,color:"#babfc766"},dragAndDropImageBackgroundColor:{ref:"backgroundColor"},dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:{ref:"foregroundColor",mix:.7},focusShadow:{spread:3,color:{ref:"accentColor",mix:.5}},sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"iconSize + widgetVerticalSpacing"},iconSize:16,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonBorderWidth:2,toggleButtonOnBorderColor:{ref:"accentColor"},toggleButtonOnBackgroundColor:{ref:"accentColor"},toggleButtonOffBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonOffBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonSwitchBorderColor:{ref:"toggleButtonOffBorderColor"},toggleButtonSwitchBackgroundColor:{ref:"backgroundColor"},menuBorder:{color:{ref:"foregroundColor",mix:.2}},menuBackgroundColor:{ref:"foregroundColor",mix:.03,onto:"backgroundColor"},menuTextColor:{ref:"foregroundColor",mix:.95,onto:"backgroundColor"},menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:{ref:"foregroundColor",mix:.8},iconButtonHoverColor:{ref:"foregroundColor",mix:.1},dialogShadow:{ref:"popupShadow"},dialogBorder:{color:{ref:"foregroundColor",mix:.2}},panelBackgroundColor:{ref:"backgroundColor"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:{ref:"foregroundColor",mix:.07},columnDropCellBorder:{color:{ref:"foregroundColor",mix:.13}},selectCellBackgroundColor:{ref:"foregroundColor",mix:.07},selectCellBorder:{color:{ref:"foregroundColor",mix:.13}},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterToolPanelGroupIndent:{ref:"spacing"},iconButtonHoverBackgroundColor:{ref:"foregroundColor",mix:.1},rowLoadingSkeletonEffectColor:"rgba(66, 66, 66, 0.2)"},
188d6=e=>`--ag-${e.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase()}`,d5=e=>`var(${d6(e)})`,d8=(x=e=>{if(/Color$/.test(e))return"color";if(/Scale?$/.test(e))return"scale";if("spacing"===e||/(Padding|Spacing|Size|Width|Height|Radius|Indent|Start|End|Top|Bottom|Horizontal|Vertical)$/.test(e))return"length";if(/Border$/.test(e))return"border";if(/BorderStyle$/.test(e))return"borderStyle";if(/Shadow$/.test(e))return"shadow";if(/Image$/.test(e))return"image";if(/Family$/.test(e))return"fontFamily";if(/Weight$/.test(e))return"fontWeight";if(/Duration$/.test(e))return"duration";if(/ColorScheme$/.test(e))return"colorScheme";throw Error(`"${e}" is not a valid theme parameter.`)},a=new Map,e=>(a.has(e)||a.set(e,x(e)),a.get(e))),d7=e=>"string"==typeof e?e:"number"==typeof e&&String(e),d9=e=>{if("string"==typeof e)return e;if("ref"in e){let t=d5(e.ref);if(null==e.mix)return t;let i=e.onto?"var(--ag-background-color)":"transparent";return`color-mix(in srgb, ${i}, ${t} ${Math.max(0,Math.min(100,100*e.mix))}%)`}return!1},ue=e=>{if("string"==typeof e)return e;if("number"==typeof e)return`${e}px`;if("calc"in e){let t=e.calc.replace(/ ?[*/+] ?/g," $& ");return`calc(${t.replace(/-?[a-z][a-z0-9]*\b(?![-(])/gi,e=>"-"===e[0]?e:` ${d5(e)} `)})`}return"ref"in e&&d5(e.ref)},ut=e=>"string"==typeof e?e:"googleFont"in e?ut(e.googleFont):"ref"in e?d5(e.ref):!!Array.isArray(e)&&e.map(e=>("object"==typeof e&&"googleFont"in e&&(e=e.googleFont),/^[\w-]+$/.test(e)?e:JSON.stringify(e))).join(", "),ui=e=>"string"==typeof e?e:"url"in e?`url(${JSON.stringify(e.url)})`:"svg"in e?ui({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):"ref"in e&&d5(e.ref),us={color:d9,colorScheme:d7,length:ue,scale:d7,border:(e,t)=>{var i,s,r;return"string"==typeof e?e:!0===e?"solid 1px var(--ag-border-color)":!1===e?"columnBorder"===t?"solid 1px transparent":"none":"ref"in e?d5(e.ref):d7(null!=(i=e.style)?i:"solid")+" "+ue(null!=(s=e.width)?s:1)+" "+d9(null!=(r=e.color)?r:{ref:"borderColor"})},borderStyle:d7,shadow:e=>{var t,i,s,r,a;return"string"==typeof e?e:!1===e?"none":"ref"in e?d5(e.ref):[ue(null!=(t=e.offsetX)?t:0),ue(null!=(i=e.offsetY)?i:0),ue(null!=(s=e.radius)?s:0),ue(null!=(r=e.spread)?r:0),d9(null!=(a=e.color)?a:{ref:"foregroundColor"})].join(" ")},image:ui,fontFamily:ut,fontWeight:d7,duration:(e,t)=>"string"==typeof e?e:"number"==typeof e?(e>50&&eg(`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`),`${e}s`):"ref"in e&&d5(e.ref)},ur=(e,t)=>us[d8(e)](t,e),ua=0,uo=(e=`customTheme${++ua}`)=>new ud(e,[],{}),un="object"!=typeof window||!window||"object"!=typeof document||window.document!==document,ul=0,uh=!1,ud=class e{constructor(e,t=[],i={}){this.id=e,this.dependencies=t,this.defaults=i,this.useCount=0}withPart(t){return"function"==typeof t&&(t=t()),new e(this.id,this.dependencies.concat(t),this.defaults)}withParams(t){let i={...this.defaults};for(let[e,s]of Object.entries(t))null!=s&&(i[e]=s);return new e(this.id,this.dependencies,i)}getCSS(){return[d3,...this._getCSSChunks().map(e=>e.css)].join(`
189
190`)}startUse(e){++this.useCount,1===this.useCount&&this._install(e)}stopUse(){--this.useCount,0===this.useCount&&setTimeout(()=>{0===this.useCount&&ug(this.getCssClass(),this._installRoot)},1e3)}getCssClass(){return null==this._cssClass&&(this._cssClass=`ag-theme-${++ul}`),this._cssClass}getParams(){if(this._getParamsCache)return this._getParamsCache;let e={...d4};for(let t of this._getFlatUnits())for(let[i,s]of Object.entries(t.defaults)){let t=null!=s?s:d4[i];null!=t&&(e[i]=t)}return this._getParamsCache=e}async _install({container:e,loadThemeGoogleFonts:t}){if(un)return;!uh&&(uh=!0,ug("legacy",document.head),getComputedStyle(document.body).getPropertyValue("--ag-legacy-styles-loaded")&&eg("both Theming API and the ag-grid.css are used on the same page, styling will be incorrect"));let i=e.getRootNode();i instanceof ShadowRoot||(i=document.head),this._installRoot=i;let s=[];for(let e of(s.push(up({css:d3,part:"core",root:i})),uc(this)))t?uv(e):null==t&&ep(`theme uses google font ${e} but no value for loadThemeGoogleFonts was provided. Pass true to load fonts from ${uf} or false to silence this warning.`);for(let e of this._getCSSChunks())up({css:e.css,part:e.id,scope:this.getCssClass(),root:i});return Promise.all(s)}_getFlatUnits(){if(this._getFlatUnitsCache)return this._getFlatUnitsCache;let e={};for(let t of this.dependencies)delete e[t.feature],e[t.feature]=t;let t=[...Object.values(e),this];return this._getFlatUnitsCache=t}_getCSSChunks(){if(this._getCssChunksCache)return this._getCssChunksCache;let e=[];
190for(let t of(e.push(uu(this)),this._getFlatUnits()))if(t.css&&t.css.length>0){let i=`/* Part ${t.id} */`;i+=t.css.map(e=>"function"==typeof e?e():e).join(`
191`)+`
192`,i=`.${this.getCssClass()} {
193	${i}
194}`,e.push({css:i,id:t.id})}return this._getCssChunksCache=e}},uu=e=>{let t="",i="";for(let[s,r]of Object.entries(e.getParams())){let e=ur(s,r);if(!1===e)eg(`Invalid value for param ${s} - ${uy(r)}`);else{let r=d6(s),a=r.replace("--ag-","--ag-inherited-");t+=`	${r}: var(${a}, ${e});
195`,i+=`	${a}: var(${r});
196`}}let s=`:where(.${e.getCssClass()})`,r=`${s} {
197${t}}
198`;return{css:r+=`:has(> ${s}):not(${s}) {
199${i}}
200`,id:"variables"}},uc=e=>Array.from(new Set(Object.values(e.getParams()).flat().map(e=>null==e?void 0:e.googleFont).filter(e=>"string"==typeof e))).sort(),up=async({root:e,part:t,scope:i,css:s})=>{let r=`:scope > style[data-ag-part="${t}"]`;i&&(r+=`[data-ag-scope="${i}"]`);let a=e.querySelector(r);if(!a){(a=document.createElement("style")).dataset.agPart=t,i&&(a.dataset.agScope=i);let s=e.querySelectorAll(":scope > style[data-ag-part]"),r=s[s.length-1];r?r.insertAdjacentElement("afterend",a):e.firstElementChild?e.firstElementChild.insertAdjacentElement("beforebegin",a):e.appendChild(a)}if(a._agTextContent!==s)return a.textContent=s,a._agTextContent=s,uC(a)},ug=(e,t)=>{for(let i of Array.from(t.querySelectorAll(`:scope > style[data-ag-scope="${e}"]`)))i.remove()},um=new Set,uv=async e=>{if(!um.has(e))return um.add(e),up({css:`@import url('https://${uf}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
201`,part:`googleFont:${e}`,root:document.head})},uf="fonts.googleapis.com",uC=e=>new Promise(t=>{let i=()=>{e.removeEventListener("load",i),t()};e.addEventListener("load",i)}),uy=e=>null==e?String(e):`${typeof e} ${e}`,uw=((d1("checkboxStyle","default")).withAdditionalParams({checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:{ref:"backgroundColor"},checkboxUncheckedBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxCheckedBackgroundColor:{ref:"accentColor"},checkboxCheckedBorderColor:{ref:"accentColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:{ref:"backgroundColor"}
201,checkboxIndeterminateBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxIndeterminateBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:{ref:"backgroundColor"},radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}})).withCSS('.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);& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&: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-checked{background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:active,&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&.ag-checked:after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&.ag-indeterminate{background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&: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-radio-button-input-wrapper{border-radius:100%;&.ag-checked:after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}'),ub=d1("colorScheme","light"),uS=(d1("colorScheme","lightWarm")).withParams({foregroundColor:"#000000de",borderColor:"#60300026",chromeBackgroundColor:"#60300005"}),ux=(d1("colorScheme","lightCold")).withParams({foregroundColor:"#000",backgroundColor:"#fff",chromeBackgroundColor:"#f3f8f8"}),uM=(d1("colorScheme","dark")).withParams({backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:{ref:"foregroundColor",mix:.05,onto:"backgroundColor"},browserColorScheme:"dark"}),uD=(d1("colorScheme","darkWarm")).withParams({backgroundColor:"hsl(29, 10%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:{ref:"foregroundColor",mix:.05,onto:"backgroundColor"},browserColorScheme:"dark"}),uE=(d1("colorScheme","darkBlue")).withParams({backgroundColor:"#1f2836",foregroundColor:"#FFF",chromeBackgroundColor:{ref:"foregroundColor",mix:.07,onto:"backgroundColor"},browserColorScheme:"dark"}),uI=(d1("iconSet","alpine")
vendor: 53,500 bytes, line 201
201).withCSS(".ag-icon:before{background-color:currentColor;content:\"\";display:block;height:var(--ag-icon-size);-webkit-mask-image:linear-gradient(#0000,#0000);mask-image:linear-gradient(#0000,#0000);-webkit-mask-size:contain;mask-size:contain;width:var(--ag-icon-size)}.ag-icon-aggregation:before{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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-cancel:before{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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='matrix(.06285 0 0 .06285 3.934 -.054)'/%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\");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='matrix(.06285 0 0 .06285 3.934 -.054)'/%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{-webkit-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\");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,.ag-icon-down:before{-webkit-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\");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{-webkit-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='matrix(.06285 0 0 .06285 3.934 -.054)'/%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\");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='matrix(.06285 0 0 .06285 3.934 -.054)'/%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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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\")}"),
201uA=(d1("iconSet","material")
vendor: 43,996 bytes, line 201
201).withCSS(".ag-icon:before{background-color:currentColor;content:\"\";display:block;height:var(--ag-icon-size);-webkit-mask-image:linear-gradient(#0000,#0000);mask-image:linear-gradient(#0000,#0000);-webkit-mask-size:contain;mask-size:contain;width:var(--ag-icon-size)}.ag-icon-aggregation:before{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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-cancel:before{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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='matrix(.06285 0 0 .06285 3.934 -.054)'/%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\");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='matrix(.06285 0 0 .06285 3.934 -.054)'/%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{-webkit-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\");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,.ag-icon-down:before{-webkit-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\");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{-webkit-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='matrix(.06285 0 0 .06285 3.934 -.054)'/%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\");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='matrix(.06285 0 0 .06285 3.934 -.054)'/%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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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{-webkit-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\");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\")}"),
201uR={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-down":'<path d="m6 9 6 6 6-6"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',"small-up":'<path d="m18 15-6-6-6 6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},uT=(e={})=>{let t='.ag-icon:before{background-color:currentColor;content:"";display:block;height:var(--ag-icon-size);-webkit-mask-image:linear-gradient(#0000,#0000);mask-image:linear-gradient(#0000,#0000);-webkit-mask-size:contain;mask-size:contain;width:var(--ag-icon-size)}';
201for(let i of Object.keys(uR)){let s=uL(i,e.strokeWidth||1.5);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(s)}'); }
202`}return t},uL=(e,t)=>{let i=uR[e];if(!i)throw Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon ag-icon-${e}" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},uF=(e={})=>(d1("iconSet","quartz")).withCSS(()=>uT(e)),uP=(d1("iconSet","quartzLight")).withCSS(()=>uT({strokeWidth:1})),uk=(d1("iconSet","quartzRegular")).withCSS(uT),uN=(d1("iconSet","quartzBold")).withCSS(()=>uT({strokeWidth:2})),uO=((d1("inputStyle","base")).withAdditionalParams({inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},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"}})).withCSS(":where(input[class^=ag-][type=number]:not(.ag-number-field-input-stepper)){-moz-appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}}:where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);cursor:pointer;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)}&: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)}}&.ag-ltr :where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){padding-left:var(--ag-input-padding-start)}&.ag-rtl :where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){padding-right:var(--ag-input-padding-start)}"),uG=(dJ(uO,"bordered")).withParams({inputBackgroundColor:{ref:"backgroundColor"},inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:{ref:"accentColor"}},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:{ref:"foregroundColor",mix:.06,onto:"backgroundColor"},inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}}}),uB=((dJ(uO,"underlined")).withParams({inputBorder:{width:2,color:{ref:"foregroundColor",mix:.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}}})).withCSS(":where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){border-left:none;border-right:none;border-top:none}"),uz=((d1("tabStyle","base")).withAdditionalParams({tabBarBackgroun
202dColor:"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:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:"0",tabSelectedUnderlineTransitionDuration:"0",tabBarBorder:!1})).withCSS('.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;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-header{flex:1}}.ag-tabs-close-button-wrapper{border:0;padding:var(--ag-spacing)}&.ag-ltr .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}&.ag-rtl .ag-tabs-close-button-wrapper{border-left:1px solid 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;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&: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-selected:after{opacity:1}&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}&.ag-ltr .ag-tab{&.ag-tab-selected{&:not(:first-of-type){border-left-color:var(--ag-tab-selected-border-color)}&:not(:last-of-type){border-right-color:var(--ag-tab-selected-border-color)}}}&.ag-rtl .ag-tab{&.ag-tab-selected{&:not(:first-of-type){border-right-color:var(--ag-tab-selected-border-color)}&:not(:last-of-type){border-left-color:var(--ag-tab-selected-border-color)}}}'),uV=(dJ(uz,"quartz")).withParams({tabBarBorder:!0,tabBarBackgroundColor:{ref:"foregroundColor",mix:.05},tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:{ref:"backgroundColor"}}),uH=(dJ(uz,"material")).withParams({tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0"}),uj=(dJ(uz,"alpine")).withParams({tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:{ref:"accentColor"},tabSelectedTextColor:{ref:"accentColor"},tabSelectedUnderlineColor:{ref:"accentColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"}),uW=((dJ(uz,"rolodex")).withParams({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:{ref:"backgroundColor"}})).withCSS(".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:0;&.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)}}"),uU=e=>uo(e).withPart(uw),u_=(((((uU("quartz")).withPart(ub)).withPart(uF)).withPart(uV)).withPart(()=>uG)).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),u$=(((((uU("alpine")).withPart(ub)).withPart(uI)).withPart(uj)).withPart(uG)).withParams({accentColor:"#2196f3",selectedRowBackgroun
202dColor:{ref:"accentColor",mix:.3},inputFocusBorder:{color:{ref:"accentColor",mix:.4}},fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:{ref:"accentColor"},tabSelectedBorderWidth:2,tabSelectedUnderlineTransitionDuration:.3}),uY=(((((uU("balham")).withPart(ux)).withPart(uI)).withPart(uW)).withPart(uG)).withParams({spacing:4,borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},headerTextColor:{ref:"foregroundColor",mix:.5},fontSize:12,headerFontWeight:"bold"});rV.__registerModules([hL,db,dX,dF],!1,void 0);var uK=Object.defineProperty,uZ=Object.getOwnPropertyDescriptor,uq=(e,t)=>{for(var i in t)uK(e,i,{get:t[i],enumerable:!0})},uQ=(e,t,i,s)=>{for(var r,a=s>1?void 0:s?uZ(t,i):t,o=e.length-1;o>=0;o--)(r=e[o])&&(a=(s?r(t,i,a):r(a))||a);return s&&a&&uK(t,i,a),a},uX={ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceHierarchyChart:"hierarchy chart, ${caption}",ariaAnnounceGaugeChart:"gauge chart, ${caption}",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaDescriptionLegendItem:"Press Space or Enter to toggle visibility",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelAnnotationSettingsDialog:"Annotation Settings",ariaLabelColorPicker:"Color picker",ariaLabelFinancialCharts:"Financial Charts",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number]",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelSettingsTabBar:"Settings",ariaLabelZoomToolbar:"Zoom",ariaValuePanRange:"${min}[percent] to ${max}[percent]",iconAltTextLineStyleSolid:"Solid",iconAltTextLineStyleDashed:"Long-dashed",iconAltTextLineStyleDotted:"Short-dashed",iconAltTextPositionTop:"Top",iconAltTextPositionCenter:"Center",iconAltTextPositionBottom:"Bottom",iconAltTextAlignLeft:"Left",iconAltTextAlignCenter:"Center",iconAltTextAlignRight:"Right",iconAltTextClose:"Close",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsColor:"Color",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsLineStyle:"Line Style",toolbarAnnotationsLineStrokeWidth:"Line Stroke Width",toolbarAnnotationsSettings:"Settings",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsDragHandle:"Drag Toolbar",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsShapeAnnotations:"Arrows",toolbarAnnotationsMeasurerAnnotations:"Measurers",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarAnnotationsArrow:"Arrow",toolbarAnnotationsArrowUp:"Arrow Up",toolbarAnnotationsArrowDown:"Arrow Down",toolbarAnnotationsDateRange:"Date Range",toolbarAnnotationsPriceRange:"Price Range",toolbarAnnotationsDatePriceRange:"Date and Price",toolbarAnnotationsQuickDatePriceRange:"Measure",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here",dialogHeaderChannel:"Channel",dialogHeaderLine:"Line",dialogHeaderDateRange:"Date Range",dialogHeaderPriceRange:"Price Range",dialogHeaderDatePriceRange:"Date and Price",dialogHeaderText:"Text",dialogInputAlign:"Align",dialogInputColorPicker:"Color",dialogInputColorPickerAltText:"Text Color",dialogInputFillColorPicker:"Fill",dialogInputFillColorPickerAltText:"Fill Color",dialogInputExtendChannelStart:"Extend channel start",dialogInputExtendChannelEnd:"Extend channel end",dialogInputExtendLineStart:"Extend line start",dialogInputExtendLineEnd:"Extend line end",dialogInputExtendAbove:"Extend above",dialogInputExtendBelow:"Extend below",dialogInputExtendLeft:"Extend left",dialogInputExtendRight:"Extend right",dialogInputFontSize:"Size",dialogInputFontSizeAltText:"Font Size",dialogInputLineStyle:"Dash",dialogInputPosition:"Position",dialogInputStrokeWidth:"Weight",dialogInputStrokeWidthAltText:"Line Weight",inputTextareaPlaceholder:"Add Text",measurerDateRangeBars:"${value}[number] bars",measurerPriceRangeValue:"${value}[number]",measurerPriceRangePercent:"${value}[percent]",measurerVolume:"Vol ${value}"},uJ=["bar","line","scatter"],u0=["delete-legacy","disjoint-channel","disjoint-channel-legacy","horizontal-line-legacy","line-color-legacy","lock","lock-legacy","pan-end-legacy","pan-left-legacy","pan-right-legacy","pan-start-legacy","parallel-channel","parallel-channel-legacy","reset-legacy","trend-line","trend-line-legacy","unlock","unlock-legacy","vertical-line","vertical-line-legacy","zoom-in-legacy","zoom-in-alt","zoom-in-alt-legacy","zoom-out-legacy","zoom-out-alt","zoom-out-alt-legacy"],u1=((M=u1||{}).POINTER="pointer",M.NODE="node",M.TOP="top",M.RIGHT="right",M.BOTTOM="bottom",M.LEFT="left",M.TOP_LEFT="top-left",M.TOP_RIGHT="top-right",M.BOTTOM_RIGHT="bottom-right",M.BOTTOM_LEFT="bottom-left",M),u2={};uq(u2,{TimeInterval:()=>u7,day:()=>cn,friday:()=>cg,hour:()=>co,millisecond:()=>ce,minute:()=>cr,monday:()=>cd,month:()=>cv,saturday:()=>cm,second:()=>ci,sunday:()=>ch,thursday:()=>cp,tuesday:()=>cu,utcDay:()=>cw,utcHour:()=>cy,utcMinute:()=>cC,utcMonth:()=>cb,utcYear:()=>cS,wednesday:()=>cc,year:()=>cf});var u3=new Map;function u4(e,t){u3.has(t)||(u3.set(t,!0),e())}function u6(e){return e}function u5(e,t=0,i){let s,r,{leading:a=!0,trailing:o=!0}=null!=i?i:{},n=!1;function l(){o&&r?(s=setTimeout(l,t),e(...r)):n=!1,r=null}
202return Object.assign(function(...i){n?r=i:(n=!0,s=setTimeout(l,t),a?e(...i):r=i)},{cancel(){clearTimeout(s),n=!1,r=null}})}u4.clear=()=>u3.clear();var u8={log(...e){console.log(...e)},warn(e,...t){console.warn(`AG Charts - ${e}`,...t)},error(e,...t){"object"==typeof e?console.error("AG Charts error",e,...t):console.error(`AG Charts - ${e}`,...t)},table(...e){console.table(...e)},warnOnce(e,...t){u4(()=>u8.warn(e,...t),`Logger.warn: ${e}`)},errorOnce(e,...t){u4(()=>u8.error(e,...t),`Logger.error: ${e}`)}},u7=class{constructor(e,t,i){this._encode=e,this._decode=t,this._rangeCallback=i}floor(e){let t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){let t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}range(e,t,i){var s;let r=null==(s=this._rangeCallback)?void 0:s.call(this,e,t),a=this._encode(i?this.floor(e):this.ceil(e)),o=this._encode(i?this.ceil(t):this.floor(t));if(o<a)return[];let n=[];for(let e=a;e<=o;e++){let t=this._decode(e);n.push(t)}return null==r||r(),n}},u9=class extends u7{getOffset(e,t){return Math.floor("number"==typeof e||e instanceof Date?this._encode(new Date(e)):0)%t}every(e,t){let i,s=0,r=e;r!==(e=Math.max(1,Math.round(e)))&&u8.warnOnce(`interval step of [${r}] rounded to [${e}].`);let{snapTo:a="start"}=null!=t?t:{};if("string"==typeof a){let t=s;i=(i,r)=>(s=this.getOffset("start"===a?i:r,e),()=>s=t)}else"number"==typeof a?s=this.getOffset(new Date(a),e):a instanceof Date&&(s=this.getOffset(a,e));return new u7(t=>Math.floor((this._encode(t)-s)/e),t=>this._decode(t*e+s),i)}},ce=new u9(function(e){return e.getTime()},function(e){return new Date(e)});(new Date(0)).getFullYear();var ct=6e4*(new Date).getTimezoneOffset(),ci=new u9(function(e){return Math.floor((e.getTime()-ct)/1e3)},function(e){return new Date(ct+1e3*e)}),cs=6e4*(new Date).getTimezoneOffset(),cr=new u9(function(e){return Math.floor((e.getTime()-cs)/6e4)},function(e){return new Date(cs+6e4*e)}),ca=6e4*(new Date).getTimezoneOffset(),co=new u9(function(e){return Math.floor((e.getTime()-ca)/36e5)},function(e){return new Date(ca+36e5*e)}),cn=new u9(function(e){let t=6e4*e.getTimezoneOffset();return Math.floor((e.getTime()-t)/864e5)},function(e){let t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t});function cl(e){let t=(7+e-4)%7;return new u9(function(e){let i=6e4*e.getTimezoneOffset();return Math.floor((e.getTime()-i)/6048e5-t/7)},function(e){let i=new Date(1970,0,1);return i.setDate(i.getDate()+7*e+t),i})}var ch=cl(0),cd=cl(1),cu=cl(2),cc=cl(3),cp=cl(4),cg=cl(5),cm=cl(6),cv=new u9(function(e){return 12*e.getFullYear()+e.getMonth()},function(e){let t=Math.floor(e/12);return new Date(t,e-12*t,1)}),cf=new u9(function(e){return e.getFullYear()},function(e){let t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}),cC=new u9(function(e){return Math.floor(e.getTime()/6e4)},function(e){return new Date(6e4*e)}),cy=new u9(function(e){return Math.floor(e.getTime()/36e5)},function(e){return new Date(36e5*e)}),cw=new u9(function(e){return Math.floor(e.getTime()/864e5)},function(e){let t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}),cb=new u9(function(e){return 12*e.getUTCFullYear()+e.getUTCMonth()},function(e){let t=Math.floor(e/12);return new Date(Date.UTC(t,e-12*t,1))}),cS=new u9(function(e){return e.getUTCFullYear()},function(e){let t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}),cx={};uq(cx,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>p2,fromToMotion:()=>p3,staticFromToMotion:()=>p4});var cM=new Map;function cD(){cM.clear()}function cE(e){var t;let i=e.constructor,s=Object.hasOwn(i,"className")?i.className:i.name;if(!s)throw Error(`The ${i} is missing the 'className' property.`);let r=(null!=(t=cM.get(s))?t:0)+1;return cM.set(s,r),`${s}-${r}`}function cI(){var e,t,i;return null!=(e=null==(t=(i=crypto).randomUUID)?void 0:t.call(i))?e:function(){let e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;let t="";for(let i=0;i<e.length;i++)(4===i||6===i||8===i||10===i)&&(t+="-"),t+=e[i].toString(16).padStart(2,"0");return t}()}function*cA(...e){for(let t of e)yield*t}function cR(e){return null!=e&&"object"==typeof e&&Symbol.iterator in e?e:[e]}var cT=Symbol("interpolate"),cL=e=>null!=e[cT];function cF(e,t,i,s=1/0){let r={nearest:void 0,distanceSquared:s};for(let s of i){let i=s.distanceSquared(e,t);if(0===i)return{nearest:s,distanceSquared:0};i<r.distanceSquared&&(r.nearest=s,r.distanceSquared=i)}return r}function cP(e,t,i,s=1/0){var r,a;let{x:o=e,y:n=t}=null!=(r=null==(a=i.transformPoint)?void 0:a.call(i,e,t))?r:{},l={nearest:void 0,distanceSquared:s};for(let e of i.children){let{nearest:t,distanceSquared:i}=e.nearestSquared(o,n,l.distanceSquared);if(0===i)return{nearest:t,distanceSquared:i};i<l.distanceSquared&&(l.nearest=t,l.distanceSquared=i)}return l}var ck={};function cN(e){var t;return e?null==(t=ck.document)?void 0:t[e]:ck.document}function cO(e){var t;return e?null==(t=ck.window)?void 0:t[e]:ck.window}function cG(e,t,i){let s=cN().createElement(e);
202if("object"==typeof t&&(i=t,t=void 0),t)for(let e of t.split(" "))s.classList.add(e);return i&&Object.assign(s.style,i),s}function cB(e,t){return cN().createElementNS(e,t)}function cz(e,t){let{body:i}=cN(),s=cG("a",{display:"none"});s.href=e,s.download=t,i.appendChild(s),s.click(),setTimeout(()=>i.removeChild(s))}function cV(e){ck.document=e}function cH(e){ck.window=e}function cj(e,t){e&&(e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.left=`${t.x}px`,e.style.top=`${t.y}px`)}function cW(e){var t;if(e.focus({preventScroll:!0}),(null==(t=e.lastChild)?void 0:t.textContent)==null)return;let i=cN().createRange();i.setStart(e.lastChild,e.lastChild.textContent.length),i.setEnd(e.lastChild,e.lastChild.textContent.length);let s=cO().getSelection();null==s||s.removeAllRanges(),null==s||s.addRange(i)}"u">typeof window?ck.window=window:void 0!==i.g&&(ck.window=i.g.window),"u">typeof document?ck.document=document:void 0!==i.g&&(ck.document=i.g.document);var cU=0;function c_(e){return`${null!=e?e:"ag-charts-element"}-${cU++}`}function c$(e,t,i){return Math.min(i,Math.max(e,t))}function cY(e,t){let[i,s]=cK(t);return c$(i,e,s)}function cK(e){if(0===e.length)return[];let t=[1/0,-1/0];for(let i of e)i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i);return t}function cZ(e){let[t,i]=cK(e);return i-t}function cq(e,t,i=1e-10){return Math.abs(e-t)<i}function cQ(e){return -1===Math.sign(e)||Object.is(e,-0)}function cX(e,t=2){let i=10**t;return Math.round(e*i)/i}function cJ(e,t=2){let i=Math.floor(Math.log(Math.abs(e))/Math.LN10);return i>=0||!isFinite(i)?e.toFixed(t):e.toFixed(Math.abs(i)-1+t)}function c0(e,t){return Math.floor(e%t+(e<0?t:0))}function c1(e){var t,i;if(Math.floor(e)===e)return 0;let s=String(e),r=0;if(e<1e-6||e>=1e21){let e;[s,e]=s.split("e"),null!=e&&(r=Number(e))}return Math.max((null!=(t=null==(i=s.split(".")[1])?void 0:i.length)?t:0)-r,0)}function c2(e,t){return t=null!=t?t:cO("navigator").language,new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function c3(e,t){return c2(e/100,t)}var c4=class e{constructor(e,t,i,s){this.x=e,this.y=t,this.width=i,this.height=s}static fromDOMRect({x:t,y:i,width:s,height:r}){return new e(t,i,s,r)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON:()=>({})}}clone(){let{x:t,y:i,width:s,height:r}=this;return new e(t,i,s,r)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}intersection(t){if(!this.collidesBBox(t))return;let i=c$(t.x,this.x,t.x+t.width),s=c$(t.y,this.y,t.y+t.height);return new e(i,s,c$(t.x,this.x+this.width,t.x+t.width)-i,c$(t.y,this.y+this.height,t.y+t.height)-s)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,t){if(this.containsPoint(e,t))return 0;let i=e-c$(this.x,e,this.x+this.width),s=t-c$(this.y,t,this.y+this.height);return i*i+s*s}static nearestBox(e,t,i){return cF(e,t,i)}clip(e){if(void 0===e)return this;let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y),s=Math.min(this.x+this.width,e.x+e.width),r=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.y=i,this.width=Math.max(0,s-t),this.height=Math.max(0,r-i),this}shrink(e,t){let i=(e,t)=>{switch(e){case"top":this.y+=t;case"bottom":this.height-=t;break;case"left":this.x+=t;case"right":this.width-=t;break;case"vertical":this.y+=t,this.height-=2*t;break;case"horizontal":this.x+=t,this.width-=2*t;break;case void 0:this.x+=t,this.width-=2*t,this.y+=t,this.height-=2*t}};return"number"==typeof e?i(t,e):"object"==typeof e&&Object.entries(e).forEach(([e,t])=>i(e,t)),this}grow(e,t){if("number"==typeof e)this.shrink(-e,t);else{let t={...e};for(let e in t)t[e]*=-1;this.shrink(t)}return this}translate(e,t){return this.x+=e,this.y+=t,this}combine(e){let{x:t,y:i,width:s,height:r}=this;this.x=Math.min(t,e.x),this.y=Math.min(i,e.y),this.width=Math.max(t+s,e.x+e.width)-this.x,this.height=Math.max(i+r,e.y+e.height)-this.y}static merge(t){let i=1/0,s=1/0,r=-1/0,a=-1/0;for(let e of t)e.x<i&&(i=e.x),e.y<s&&(s=e.y),e.x+e.width>r&&(r=e.x+e.width),e.y+e.height>a&&(a=e.y+e.height);return new e(i,s,r-i,a-s)}[cT](t,i){return new e(this.x*(1-i)+t.x*i,this.y*(1-i)+t.y*i,this.width*(1-i)+t.width*i,this.height*(1-i)+t.height*i)}};c4.zero=Object.freeze(new c4(0,0,0,0)),c4.NaN=Object.freeze(new c4(0/0,0/0,0/0,0/0));var c6=((D=c6||{})[D.NONE=0]="NONE",D[D.TRIVIAL=1]="TRIVIAL",D[D.MINOR=2]="MINOR",D[D.MAJOR=3]="MAJOR",D);function c5(e){return function(t,i){let s=`__${i}`;t[i]||function(e,t,i,s){let r,{redraw:a=1,type:o="normal",changeCb:n,convertor:l,checkDirtyOnAssignment:h=!1}=null!=s?s:{},d={redraw:a,type:o,changeCb:n,checkDirtyOnAssignment:h,convertor:l};switch(o){case"normal":r=function(e,t){let{redraw:i=1,changeCb:s}=t;return function(t){return t!==this[e]?(this[e]=t,this.markDirty(i),null==s||s(this),t):c8}}(i,d);break;case"transform":r=function(e,t){let{redraw:i=1}=t;return function(t){return t!==this[e]?(this[e]=t,this.markDirtyTransform(i),t):c8}}(i,d);break;case"path":r=function(e,t){let{redraw:i=1}=t;return function(t){return t!==this[e]?(this[e]=t,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(i)),t):c8}}(i,d)}
202Object.defineProperty(e,t,{set:r=function(e,t){let{checkDirtyOnAssignment:i}=t;return i?function(t){let i=e.call(this,t);return i!==c8&&null!=t&&t._dirty>0&&this.markDirty(t._dirty),i}:e}(function(e,t){let{changeCb:i}=t;return i?function(t){let s=e.call(this,t);return s!==c8&&i.call(this,this),s}:e}(function(e,t){let{convertor:i}=t;return i?function(t){e.call(this,i(t))}:e}(r,d),d),d),get:function(){return this[i]},enumerable:!0,configurable:!0})}(t,i,s,e)}}var c8=Symbol("no-change"),c7=((E=c7||{})[E.All=0]="All",E[E.None=1]="None",E),c9=class e{constructor(t){var i,s,r;this.serialNumber=e._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0},this.id=cE(this),this.pointerEvents=0,this._dirty=3,this.dirtyZIndex=!1,this.virtualChildrenCount=0,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.zIndexSubOrder=void 0,this.name=null==t?void 0:t.name,this.isVirtual=null!=(i=null==t?void 0:t.isVirtual)&&i,this.tag=null!=(s=null==t?void 0:t.tag)?s:0/0,this.zIndex=null!=(r=null==t?void 0:t.zIndex)?r:0}static*extractBBoxes(e,t){for(let i of e)if(!t||i.visible&&!i.transitionOut){let e=i.getBBox();e&&(yield e)}}get datum(){var e,t;return null!=(e=this._datum)?e:null==(t=this.parentNode)?void 0:t.datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get layerManager(){return this._layerManager}get dirty(){return this._dirty}preRender(){for(let e of(this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1,this.children())){let t=e.preRender();this.childNodeCounts.groups+=t.groups,this.childNodeCounts.nonGroups+=t.nonGroups}return this.childNodeCounts}render(e){let{stats:t}=e;if(this._dirty=0,e.debugNodeSearch){var i,s;let t=null!=(i=this.name)?i:this.id;e.debugNodeSearch.some(e=>"string"==typeof e?e===t:e.test(t))&&(e.debugNodes[null!=(s=this.name)?s:this.id]=this)}t&&t.nodesRendered++}_setLayerManager(e){for(let t of(this._layerManager=e,this._debug=null==e?void 0:e.debug,this.children(!1)))t._setLayerManager(e)}sortChildren(e){if(this.dirtyZIndex=!1,!this.childNodes||this.hasVirtualChildren())return;let t=[...this.childNodes].sort(e);for(let e of(this.childNodes.clear(),t))this.childNodes.add(e)}*traverseUp(e){let t=this;for(e&&(yield t);t=t.parentNode;)yield t}*children(e=!0){if(!this.childNodes)return;let t=[];for(let i of this.childNodes)e&&i.isVirtual?t.push(i.children()):yield i;for(let e of t)yield*e}*virtualChildren(){if(this.childNodes&&this.virtualChildrenCount)for(let e of this.childNodes)e.isVirtual&&(yield e)}hasVirtualChildren(){return this.virtualChildrenCount>0}isLeaf(){var e;return!(null!=(e=this.childNodes)&&e.size)}isRoot(){return!this.parentNode}append(e){var t;for(let i of(null!=this.childNodes||(this.childNodes=new Set),cR(e)))null==(t=i.parentNode)||t.removeChild(i),this.childNodes.add(i),i.parentNode=this,i._setLayerManager(this.layerManager),i.isVirtual&&this.virtualChildrenCount++;this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty(3)}appendChild(e){return this.append(e),e}removeChild(e){var t;return!!(null!=(t=this.childNodes)&&t.delete(e))&&(delete e.parentNode,e._setLayerManager(),e.
202isVirtual&&this.virtualChildrenCount--,this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty(3),!0)}remove(){var e,t;return null!=(e=null==(t=this.parentNode)?void 0:t.removeChild(this))&&e}clear(){var e;for(let e of this.children(!1))delete e.parentNode,e._setLayerManager();null==(e=this.childNodes)||e.clear(),this.invalidateCachedBBox(),this.virtualChildrenCount=0}destroy(){var e;null==(e=this.parentNode)||e.removeChild(this)}setProperties(e,t){if(t)for(let i of t)this[i]=e[i];else Object.assign(this,e);return this}containsPoint(e,t){return!1}pickNode(e,t,i=!1){if(!this.visible||1===this.pointerEvents||!this.containsPoint(e,t))return;let s=[...this.children()];if(s.length>1e3)for(let i=s.length-1;i>=0;i--){let r=s[i],a=r.containsPoint(e,t)?r.pickNode(e,t):void 0;if(a)return a}else if(s.length)for(let i=s.length-1;i>=0;i--){let r=s[i].pickNode(e,t);if(r)return r}else if(!this.isContainerNode)return this}invalidateCachedBBox(){var e;this.cachedBBox=void 0,null==(e=this.parentNode)||e.invalidateCachedBBox()}getBBox(){return null==this.cachedBBox&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}markDirty(e=1,t=e){let{_dirty:i}=this,s=i>e||i===e&&e===t;(null!=this.cachedBBox||!s)&&(this.invalidateCachedBBox(),this._dirty=Math.max(i,e),this.parentNode?this.parentNode.markDirty(t):this.layerManager&&this.layerManager.markDirty())}markClean(e){let{force:t=!1,recursive:i=!0}=null!=e?e:{};if(0!==this._dirty||t)for(let e of(this._dirty=0,this.children(!1)))(e.isVirtual?!1!==i:!0===i)&&e.markClean({force:t})}onVisibleChange(){}onZIndexChange(){this.parentNode&&(this.parentNode.dirtyZIndex=!0)}toSVG(){}};c9._nextSerialNumber=0,uQ([c5({redraw:3,changeCb:e=>e.onVisibleChange()})],c9.prototype,"visible",2),uQ([c5({redraw:1,changeCb:e=>e.onZIndexChange()})],c9.prototype,"zIndex",2),uQ([c5({redraw:1,changeCb:e=>e.onZIndexChange()})],c9.prototype,"zIndexSubOrder",2);var pe=c9,pt=(e,t,i)=>e*(1-i)+t*i,pi=e=>{let t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4},ps=e=>{let t=Math.abs(e);return t>.0031308?(e<0?-1:1)*(1.055*t**(1/2.4)-.055):12.92*e},pr=class e{constructor(e,t,i,s=1){this.r=c$(0,e||0,1),this.g=c$(0,t||0,1),this.b=c$(0,i||0,1),this.a=c$(0,s||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!e.parseHex(t):t.indexOf("rgb")>=0?!!e.stringToRgba(t):!!e.nameToHex[t.toLowerCase()]}static fromString(t){if(t.indexOf("#")>=0)return e.fromHexString(t);let i=e.nameToHex[t.toLowerCase()];if(i)return e.fromHexString(i);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw Error(`Invalid color string: '${t}'`)}static parseHex(e){var t;let i;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:i=[];for(let t=0;t<e.length;t+=2)i.push(parseInt(`${e[t]}${e[t+1]}`,16));break;case 3:case 4:i=e.split("").map(e=>parseInt(e,16)).map(e=>e+16*e)}if((null==(t=i)?void 0:t.length)>=3&&i.every(e=>e>=0))return 3===i.length&&i.push(255),i}static fromHexString(t){let i=e.parseHex(t);if(i){let[t,s,r,a]=i;return new e(t/255,s/255,r/255,a/255)}throw Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(e){let t=-1,i=-1;for(let s=0;s<e.length;s++){let r=e[s];if(-1===t&&"("===r)t=s;else if(")"===r){i=s;break}}if(-1===t||-1===i)return;let s=e.substring(t+1,i).split(","),r=[];for(let e=0;e<s.length;e++){let t=s[e],i=parseFloat(t);if(!Number.isFinite(i))return;i=t.indexOf("%")>=0?c$(0,i,100)/100:3===e?c$(0,i,1):c$(0,i,255)/255,r.push(i)}return r}static fromRgbaString(t){let i=e.stringToRgba(t);if(i){if(3===i.length)return new e(i[0],i[1],i[2]);else if(4===i.length)return new e(i[0],i[1],i[2],i[3])}throw Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,s,r=1){let a=e.HSBtoRGB(t,i,s);return new e(a[0],a[1],a[2],r)}static fromHSL(t,i,s,r=1){let a=e.HSLtoRGB(t,i,s);return new e(a[0],a[1],a[2],r)}static fromOKLCH(t,i,s,r=1){let a=e.OKLCHtoRGB(t,i,s);return new e(a[0],a[1],a[2],r)}static padHex(e){return 1===e.length?"0"+e:e}toHexString(){let t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t}toRgbaString(e=3){let t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],i=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*i)/i),`rgba(${t.join(", ")})`):`rgb(${t.join(", ")})`}toString(){return 1===this.a?this.toHexString():this.toRgbaString()}toHSB(){return e.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,t,i){let s=pi(e),r=pi(t),a=pi(i),o=Math.cbrt(.4122214708*s+.5363325363*r+.0514459929*a),n=Math.cbrt(.2119034982*s+.6806995451*r+.1073969566*a
202),l=Math.cbrt(.0883024619*s+.2817188376*r+.6299787005*a),h=1.9779984951*o-2.428592205*n+.4505937099*l,d=.0259040371*o+.7827717662*n-.808675766*l,u=180*Math.atan2(d,h)/Math.PI;return[.2104542553*o+.793617785*n-.0040720468*l,Math.hypot(h,d),u>=0?u:u+360]}static OKLCHtoRGB(e,t,i){let s=t*Math.cos(i*Math.PI/180),r=t*Math.sin(i*Math.PI/180),a=(e+.3963377774*s+.2158037573*r)**3,o=(e-.1055613458*s-.0638541728*r)**3,n=(e-.0894841775*s-1.291485548*r)**3;return[ps(4.0767416621*a-3.3077115913*o+.2309699292*n),ps(-1.2684380046*a+2.6097574011*o-.3413193965*n),ps(-.0041960863*a-.7034186147*o+1.707614701*n)]}static RGBtoHSL(e,t,i){let s,r,a=Math.min(e,t,i),o=Math.max(e,t,i),n=(o+a)/2;if(o===a)s=0,r=0;else{let l=o-a;r=n>.5?l/(2-o-a):l/(o+a),s=(o===e?(t-i)/l+6*(t<i):o===t?(i-e)/l+2:(e-t)/l+4)*60}return[s,r,n]}static HSLtoRGB(e,t,i){if(e=(e%360+360)%360,0===t)return[i,i,i];let s=i<.5?i*(1+t):i+t-i*t,r=2*i-s;function a(e){return(e<0&&(e+=1),e>1&&(e-=1),e<1/6)?r+(s-r)*6*e:e<.5?s:e<2/3?r+(s-r)*(2/3-e)*6:r}return[a(e/360+1/3),a(e/360),a(e/360-1/3)]}static RGBtoHSB(e,t,i){let s=Math.min(e,t,i),r=Math.max(e,t,i),a=0;if(s!==r){let o=r-s,n=(r-e)/o,l=(r-t)/o,h=(r-i)/o;(a=(e===r?h-l:t===r?2+n-h:4+l-n)/6)<0&&(a+=1)}return[360*a,0===r?0:(r-s)/r,r]}static HSBtoRGB(e,t,i){e=(e%360+360)%360/360;let s=0,r=0,a=0;if(0===t)s=r=a=i;else{let o=(e-Math.floor(e))*6,n=o-Math.floor(o),l=i*(1-t),h=i*(1-t*n),d=i*(1-t*(1-n));switch(0|o){case 0:s=i,r=d,a=l;break;case 1:s=h,r=i,a=l;break;case 2:s=l,r=i,a=d;break;case 3:s=l,r=h,a=i;break;case 4:s=d,r=l,a=i;break;case 5:s=i,r=l,a=h}}return[s,r,a]}static mix(t,i,s){return new e(pt(t.r,i.r,s),pt(t.g,i.g,s),pt(t.b,i.b,s),pt(t.a,i.a,s))}};function pa(e,t){return i=>Number(e)*(1-i)+Number(t)*i}function po(e,t){if("string"==typeof e)try{e=pr.fromString(e)}catch{e=pr.fromArray([0,0,0])}if("string"==typeof t)try{t=pr.fromString(t)}catch{t=pr.fromArray([0,0,0])}return i=>pr.mix(e,t,i).toRgbaString()}pr.nameToHex={__proto__:null,aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",transparent:"#00000000",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};var pn=Symbol("BREAK"),pl="__decorator_config";function ph(e,t){null==Object.getOwnPropertyDescriptor(e,pl)&&Object.defineProperty(e,pl,{value:{}});let i=e[pl],s=t.toString();if(void 0!==i[s])return i[s];let r=new WeakMap;i[s]={setters:[],getters:[],observers:[],valuesMap:r};let a=Object.getOwnPropertyDescriptor(e,t),o=null==a?void 0:a.set,n=null==a?void 0:a.get;
202return Object.defineProperty(e,t,{set:function(e){let a,{setters:l,observers:h}=i[s];for(let i of(l.some(e=>e.length>2)&&(a=n?n.call(this):r.get(this)),l))if((e=i(this,t,e,a))===pn)return;for(let t of(o?o.call(this,e):r.set(this,e),h))t(this,e,a)},get:function(){let e=n?n.call(this):r.get(this);for(let r of i[s].getters)if((e=r(this,t,e))===pn)return;return e},enumerable:!0,configurable:!1}),i[s]}function pd(e,t,i){return(s,r)=>{let a=ph(s,r);a.setters.push(e),t&&a.getters.unshift(t),i&&Object.assign(a,i)}}function pu(e){return void 0!==e&&pl in e}function pc(e){let t=new Set;for(;pu(e);){var i;t.add(null==(i=e)?void 0:i[pl]),e=Object.getPrototypeOf(e)}return Array.from(t).flatMap(e=>Object.keys(e))}function pp(e){return pc(e).reduce((t,i)=>{var s;return t[i]=null!=(s=e[i])?s:null,t},{})}function pg(e){return null!=e}function pm(e){return Array.isArray(e)}function pv(e){return"boolean"==typeof e}function pf(e){return e instanceof Date}function pC(e){return pf(e)&&!isNaN(Number(e))}function py(e){return e instanceof RegExp}function pw(e){return"function"==typeof e}function pb(e){return"object"==typeof e&&null!==e&&!pm(e)}function pS(e){return pm(e)||px(e)}function px(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function pM(e){return"string"==typeof e}function pD(e){return"number"==typeof e}function pE(e){return Number.isFinite(e)}function pI(e){return"u">typeof window&&e instanceof HTMLElement}function pA(e,t){return pM(t)&&Object.keys(e).includes(t)}function pR(e,t){return Object.values(e).includes(t)}function pT(e){return"symbol"==typeof e}function pL(e,t){return e.type!==t}function pF(e,t,i){for(let i in t)if(!(i in e))return!1;for(let s in e)if(!(s in t)||!i(e[s],t[s]))return!1;return!0}function pP(...e){return pk(...e.reverse())}function pk(...e){let t={};for(let i of e)if(pb(i))for(let e of pu(i)?pc(i):Object.keys(i))if(px(t[e])&&px(i[e]))t[e]=pk(t[e],i[e]);else null!=t[e]||(t[e]=i[e]);return t}function pN(e,...t){return t&&pm(e)?e.map(e=>pk(e,...t)):e}function pO(e,t){return Object.entries(e).reduce((i,[s,r])=>(i[s]=t(r,s,e),i),{})}function pG(e,t){let i={...e};for(let e of t)delete i[e];return i}function pB(e,t){return(pm(t)?t:t.split(".")).reduce((e,t)=>e[t],e)}var pz=new Set(["__proto__","constructor","prototype"]);function pV(e,t,i){let s=pm(t)?t.slice():t.split("."),r=s.pop();if(s.some(e=>pz.has(e)))return;let a=s.reduce((e,t)=>e[t],e);return a[r]=i,a[r]}function pH(e,t,i){if(void 0===i)return t;for(let s of e){let e=i[s];void 0!==e&&(t[s]=e)}return t}var pj={};uq(pj,{easeIn:()=>pU,easeInOut:()=>p$,easeInOutQuad:()=>pZ,easeInQuad:()=>pY,easeOut:()=>p_,easeOutQuad:()=>pK,inverseEaseOut:()=>pq,linear:()=>pW});var pW=e=>e,pU=e=>1-Math.cos(e*Math.PI/2),p_=e=>Math.sin(e*Math.PI/2),p$=e=>-(Math.cos(e*Math.PI)-1)/2,pY=e=>e*e,pK=e=>1-(1-e)**2,pZ=e=>e<.5?2*e*e:1-(-2*e+2)**2/2,pq=e=>2*Math.asin(e)/Math.PI,pQ=["initial","remove","update","add","trailing","end","none"],pX={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:.2,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1.2,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},pJ=((I=pJ||{}).Loop="loop",I.Reverse="reverse",I);function p0(e){return e.every(e=>e instanceof pe)?{nodes:e,selections:[]}:{nodes:[],selections:e}}var p1=class{constructor(e){var t,i,s,r,a,o,n;this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=null==(t=e.autoplay)||t,this.ease=null!=(i=e.ease)?i:pW,this.phase=e.phase;let l=null!=(s=e.duration)?s:pX[this.phase].animationDuration;this.duration=l*e.defaultDuration,this.delay=(null!=(r=e.delay)?r:0)*e.defaultDuration,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),this.from=e.from,!0===e.skip&&(null==(a=this.onUpdate)||a.call(this,e.to,!1,this),null==(o=this.onStop)||o.call(this,this),null==(n=this.onComplete)||n.call(this,this),this.isComplete=!0),!1!==e.collapsable&&(this.duration=this.checkCollapse(e,this.duration))}checkCollapse(e,t){return!function e(t,i){return t===i||(Array.isArray(t)&&Array.isArray(i)?t.length===i.length&&t.every((t,s)=>e(t,i[s])):cL(t)&&cL(i)?t.equals(i):!!(px(t)&&px(i))&&pF(t,i,e))}
202(e.from,e.to)?t:0}play(e=!1){var t,i;this.isPlaying||this.isComplete||(this.isPlaying=!0,null==(t=this.onPlay)||t.call(this,this),!this.autoplay||(this.autoplay=!1,e&&(null==(i=this.onUpdate)||i.call(this,this.from,!0,this))))}pause(){this.isPlaying=!1}stop(){if(this.isPlaying=!1,!this.isComplete){var e;this.isComplete=!0,null==(e=this.onStop)||e.call(this,this)}}update(e){var t,i;if(this.isComplete)return e;!this.isPlaying&&this.autoplay&&this.play(!0);let s=this.elapsed;if(this.elapsed+=e,this.delay>this.elapsed)return 0;let r=this.interpolate(this.isReverse?1-this.delta:this.delta);null==(t=this.onUpdate)||t.call(this,r,!1,this);let a=this.delay+this.duration;return this.elapsed>=a?(this.stop(),this.isComplete=!0,null==(i=this.onComplete)||i.call(this,this),e-(a-s)):0}get delta(){return this.ease(c$(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if("object"!=typeof t||cL(t))return this.interpolateValue(e,t);let i=[];for(let s in t){let r=this.interpolateValue(e[s],t[s]);null!=r&&i.push([s,r])}return e=>{let t={};for(let[s,r]of i)t[s]=r(e);return t}}interpolateValue(e,t){if(null!=e&&null!=t){if(cL(e))return i=>e[cT](t,i);try{switch(typeof e){case"number":return pa(e,t);case"string":return po(e,t);case"boolean":if(e===t)return()=>e}}catch{}throw Error(`Unable to interpolate values: ${e}, ${t}`)}}},p2={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};function p3(e,t,i,s,r,a,o){let{fromFn:n,toFn:l,applyFn:h=(e,t)=>e.setProperties(t)}=r,{nodes:d,selections:u}=p0(s),c=(s,r)=>{let d,u=0,c=0;for(let g of r){var p;let m=s[u]===g,v={last:c>=r.length-1,lastLive:u>=s.length-1,prev:r[c-1],prevFromProps:d,prevLive:s[u-1],next:r[c+1],nextLive:s[u+ +!!m]},f=`${e}_${t}_${g.id}`;i.stopByAnimationId(f);let C="unknown";m?a&&o&&(C=function(e,t,i,s){let r=i(e,t);return s.added.has(r)?"added":s.removed.has(r)?"removed":"updated"}(g,g.datum,a,o)):C="removed",g.transitionOut="removed"===C;let{phase:y,start:w,finish:b,delay:S,duration:x,...M}=n(g,g.datum,C,v),{phase:D,start:E,finish:I,delay:A,duration:R,...T}=l(g,g.datum,C,v),L=null==b;i.animate({id:f,groupId:e,phase:null!=(p=null!=y?y:D)?p:"update",duration:null!=x?x:R,delay:null!=S?S:A,from:M,to:T,ease:p_,collapsable:L,onPlay:()=>{h(g,{...w,...E,...M})},onUpdate(e){h(g,e)},onStop:()=>{h(g,{...w,...E,...M,...T,...b,...I})}}),m&&u++,c++,d=M}},p=0;for(let s of u){let r=s.nodes();c(r.filter(e=>!s.isGarbage(e)),r),i.animate({id:`${e}_${t}_selection_${p}`,groupId:e,phase:"end",from:0,to:1,ease:p_,onStop(){s.cleanup()}}),p++}c(d,d)}function p4(e,t,i,s,r,a,o){let{nodes:n,selections:l}=p0(s),{start:h,finish:d,phase:u}=o;i.animate({id:`${e}_${t}`,groupId:e,phase:null!=u?u:"update",from:r,to:a,ease:p_,onPlay:()=>{if(h){for(let e of n)e.setProperties(h);for(let e of l)for(let t of e.nodes())t.setProperties(h)}},onUpdate(e){for(let t of n)t.setProperties(e);for(let t of l)for(let i of t.nodes())i.setProperties(e)},onStop:()=>{for(let e of n)e.setProperties({...a,...d});for(let e of l){for(let t of e.nodes())t.setProperties({...a,...d});e.cleanup()}}})}var p6=(e,t)=>{let i=Symbol(String(t));e[i]=void 0,Object.defineProperty(e,t,{get(){return this[i]},set(e){this[i]!==e&&(this[i]=e,this.invalid=!0)},enumerable:!0,configurable:!1})},p5=class e{constructor(t,i){this.invalid=!0,this.nice=!1,this.interval=void 0,this.tickCount=e.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.domain=t,this.range=i}static is(t){return t instanceof e}transform(e){return e}transformInvert(e){return e}calcBandwidth(e=1){let t=this.getDomain(),i=this.getPixelRange(),s=Math.min(Math.abs(t[1]-t[0])/e+1,Math.floor(i));return i/Math.max(1,s)}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(e,t){var i;let s=null!=(i=null==t?void 0:t.clampMode)?i:this.defaultClampMode;if(!this.domain||this.domain.length<2)return 0/0;this.refresh();let r=this.getDomain().map(e=>this.transform(e)),[a,o]=r,{range:n}=this,[l,h]=n;if(e=this.transform(e),"clamped"===s){let[t,i]=cK(r.map(Number));if(Number(e)<t)return l;if(Number(e)>i)return h}return a===o?(l+h)/2:e===a?l:e===o?h:l+(Number(e)-Number(a))/(Number(o)-Number(a))*(h-l)}invert(e){let t;this.refresh();let[i,s]=this.getDomain().map(e=>this.transform(e)),{range:r}=this,[a,o]=r,n=a>o;return e<(n?o:a)?n?s:i:e>(n?a:o)?n?i:s:(t=a===o?this.toDomain((Number(i)+Number(s))/2):this.toDomain(Number(i)+(e-a)/(o-a)*(Number(s)-Number(i))),this.transformInvert(t))}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&u8.warnOnce("Expected update to not invalidate scale"))}getPixelRange(){let[e,t]=this.range;return Math.abs(t-e)}};
202p5.defaultTickCount=5,p5.defaultMaxTickCount=6,uQ([p6],p5.prototype,"domain",2),uQ([p6],p5.prototype,"range",2),uQ([p6],p5.prototype,"nice",2),uQ([p6],p5.prototype,"interval",2),uQ([p6],p5.prototype,"tickCount",2),uQ([p6],p5.prototype,"minTickCount",2),uQ([p6],p5.prototype,"maxTickCount",2);var p8=p5;function p7(e){if(0===e.length)return null;let t=1/0,i=-1/0;for(let s of e)s instanceof Date&&(s=s.getTime()),"number"==typeof s&&(s<t&&(t=s),s>i&&(i=s));let s=[t,i];return s.every(isFinite)?s:null}function p9(e,t,i){let s=!1;if(e.length>2){var r;e=null!=(r=p7(e))?r:[0/0,0/0]}return isNaN(t)||(s||(s=t>e[0]),e=[t,e[1]]),isNaN(i)||(s||(s=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{extent:e,clipped:s}}function ge(e,t){if(null==e||null==t||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(Array.isArray(e[i])&&Array.isArray(t[i])){if(!ge(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function gt(e){return void 0===e?[]:Array.isArray(e)?e:[e]}function gi(e){return Array.from(new Set(e))}function gs(e,t){return e.reduce((e,i)=>{let s=t(i);return null!=e[s]||(e[s]=[]),e[s].push(i),e},{})}function gr(e,t,i=0){if(0===e.length)return[];let s=[];for(let r=0;r<t;r++)s.push(e.at((r+i)%e.length));return s}function ga(e,t){let i=new Map;return t.forEach((e,t)=>{i.set(e,t)}),e.sort((e,t)=>{var s,r;return(null!=(s=i.get(e))?s:1/0)-(null!=(r=i.get(t))?r:1/0)})}var go=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],gn=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],gl=["January","February","March","April","May","June","July","August","September","October","November","December"],gh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function gd(e,t=new Date(e.getFullYear(),0,1)){let i=e.getTimezoneOffset()-t.getTimezoneOffset();return Math.floor((e.getTime()-t.getTime()+6e4*i)/864e5)}function gu(e,t){let i=new Date(e.getFullYear(),0,1).getDay(),s=new Date(e.getFullYear(),0,(t-i+7)%7+1);return s<=e?Math.floor(gd(e,s)/7)+1:0}var gc={a:e=>gn[e.getDay()],A:e=>go[e.getDay()],b:e=>gh[e.getMonth()],B:e=>gl[e.getMonth()],c:"%x, %X",d:(e,t)=>gg(e.getDate(),2,null!=t?t:"0"),e:"%_d",f:(e,t)=>gg(1e3*e.getMilliseconds(),6,null!=t?t:"0"),H:(e,t)=>gg(e.getHours(),2,null!=t?t:"0"),I:(e,t)=>{let i=e.getHours()%12;return 0===i?"12":gg(i,2,null!=t?t:"0")},j:(e,t)=>gg(gd(e)+1,3,null!=t?t:"0"),m:(e,t)=>
202gg(e.getMonth()+1,2,null!=t?t:"0"),M:(e,t)=>gg(e.getMinutes(),2,null!=t?t:"0"),L:(e,t)=>gg(e.getMilliseconds(),3,null!=t?t:"0"),p:e=>12>e.getHours()?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>gg(e.getSeconds(),2,null!=t?t:"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>gg(gu(e,0),2,null!=t?t:"0"),V:(e,t)=>gg(function e(t,i=t.getFullYear()){let s=new Date(i,0,1).getDay(),r=new Date(i,0,(4-s+7)%7-3+1);return r<=t?Math.floor(gd(t,r)/7)+1:e(t,i-1)}(e),2,null!=t?t:"0"),w:(e,t)=>gg(e.getDay(),2,null!=t?t:"0"),W:(e,t)=>gg(gu(e,1),2,null!=t?t:"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>gg(e.getFullYear()%100,2,null!=t?t:"0"),Y:(e,t)=>gg(e.getFullYear(),4,null!=t?t:"0"),Z:e=>{let t,i;return i=Math.abs(t=e.getTimezoneOffset()),`${t>0?"-":"+"}${gg(Math.floor(i/60),2,"0")}${gg(Math.floor(i%60),2,"0")}`},"%":()=>"%"},gp={_:" ",0:"0","-":""};function gg(e,t,i){let s=String(Math.floor(e));return s.length>=t?s:`${i.repeat(t-s.length)}${s}`}function gm(e){let t=[];for(;e.length>0;){let i=e.indexOf("%");if(0!==i){let s=i>0?e.substring(0,i):e;t.push(s)}if(i<0)break;let s=gp[e[i+1]];null!=s&&i++;let r=e[i+1],a=gc[r];if("function"==typeof a)t.push([a,s]);else if("string"==typeof a){let e=gm(a);t.push([e,s])}else t.push(`${null!=s?s:""}${r}`);e=e.substring(i+2)}return e=>{let i="number"==typeof e?new Date(e):e;return t.map(e=>"string"==typeof e?e:e[0](i,e[1])).join("")}}function gv(e){return e instanceof Date?e.getTime():e}function gf(e,t,i){let s=gm(gC(e,t,i));return e=>s(e)}function gC(e=[],t=e,i=0){var s,r,a;let o,n,l,h,d,u=1/0;for(let t=1;t<e.length;t++)u=Math.min(u,Math.abs(e[t]-e[t-1]));let c=new Date(t[0]).getFullYear(),p=new Date(t.at(-1)).getFullYear();return s=Math.max((isFinite(u)?function(e,t){if(e<1e3)return 0;if(e<6e4)return 1;if(e<36e5)return 2;if(e<864e5)return 3;if(e<6048e5)return 4;else if(e<24192e5||e<26784e5&&function(e){let t=new Date(e[0]).getMonth();for(let i=1;i<e.length;i++){let s=new Date(e[i]).getMonth();if(t===s)return!0;t=s}return!1}(t))return 5;else if(e<31536e6)return 6;return 7}(u,e):function(e){if(ci.floor(e)<e)return 0;if(cr.floor(e)<e)return 1;if(co.floor(e)<e)return 2;if(cn.floor(e)<e)return 3;if(cv.floor(e)<e)return ch.floor(e)<e?4:5;else if(cf.floor(e)<e)return 6;return 7}(e[0]))-i,0),r=p-c>0,o=gv((a=e)[0]),h=(l=[["hour",216e5,12096e5,3,"%I %p"],["hour",6e4,216e5,3,"%I:%M"],["second",1e3,216e5,1,":%S"],["ms",0,216e5,0,".%L"],["am/pm",6e4,216e5,3,"%p"]," ",["day",864e5,6048e5,4,"%a"],["month",6048e5*(0!==(n=Math.abs(gv(a.at(-1))-o))),314496e5,5,"%b %d"],["month",3024e6,31536e7,6,"%B"]," ",["year",r||7===s?0:31536e6,1/0,7,"%Y"]].filter(e=>{if("string"==typeof e)return!0;let[t,i,r,a]=e;return a>=s&&i<=n&&n<r}).reduce((e,t)=>("string"==typeof t?e.result.push(t):e.used.has(t[0])||(e.result.push(t),e.used.add(t[0])),e),{result:[],used:new Set}).result).findIndex(e=>"string"!=typeof e),d=l.findLastIndex(e=>"string"!=typeof e),l.slice(h,d+1).map(e=>"string"==typeof e?e:e[4]).join("").replaceAll(/\s+/g," ").trim()}var gy=class e{constructor(){this.type="band",this.invalid=!0,this.range=[0,1],this.round=!1,this.interval=void 0,this.index=new Map,this.ordinalRange=[],this._domain=[],this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(t){return t instanceof e}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&u8.warnOnce("Expected update to not invalidate scale"))}set domain(e){for(let t of(this.index=new Map,this.invalid=!0,this._domain=[],e)){let e=gv(t);void 0===this.getIndex(e)&&this.index.set(e,this._domain.push(t)-1)}}get domain(){return this._domain}getDomain(){return this._domain}ticks(){return this.refresh(),this._domain}convert(e){var t;this.refresh();let i=this.getIndex(e);return null==i?0/0:null!=(t=this.ordinalRange[i])?t:0/0}invert(e){this.refresh();let t=this.ordinalRange.findIndex(t=>t===e);return this.domain[t]}invertNearest(e){var t;this.refresh();let i=-1,s=1/0,r=this.ordinalRange.findIndex((t,r)=>{if(t===e)return!0;let a=Math.abs(e-t);return a<s&&(s=a,i=r),!1});return null!=(t=this.domain[r])?t:this.domain[i]}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get inset(){return this.refresh(),this._inset}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=c$(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this._paddingInner=c$(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this._paddingOuter=c$(0,e,1)}get paddingOuter(){return this._paddingOuter}update(){let e,t=this._domain.length;if(0===t)return;let[i,s]=this.range,{_paddingInner:r}=this,{_paddingOuter:a,round:o}=this,n=s-i;1===t?(r=0,e=n*(1-2*a)):e=n/Math.max(1,t-r+2*a);let l=o?Math.floor(e):e,h=i+(n-l*(t-r))/2,d=l*(1-r);o&&(h=Math.round(h),d=Math.round(d)),this._step=l,this._inset=h,this._bandwidth=d,this._rawBandwidth=e*(1-r),this.ordinalRange=this._domain.map((e,t)=>h+l*t)}getIndex(e){return this.index.get(e instanceof Date?e.getTime():e)}};uQ([p6],gy.prototype,"range",2),uQ([p6],gy.prototype,"round",2),uQ([p6],gy.prototype,"interval",2);var gw=gy,gb=class{set(e){let{className:t=this.constructor.name}=this.constructor;if("object"!=typeof e)return u8.warn(`unable to set ${t} - expecting a properties object`),this;let i=new Set(Object.keys(e));for(let t of pc(this))if(i.has(t)){let s=e[t];if(gx(this[t]))if(this[t]instanceof gS){let e=this[t].reset(s);null!=e?this[t]=e:u8.warn(`unable to set [${t}] - expecting a properties array`)}else this[t].set(s);else this[t]=s;i.delete(t)}for(let e of i)u8.warn(`unable to set [${e}] in ${t} - property is unknown`);return this}isValid(e){return pc(this).every(t=>{let{optional:i}=function(e,t){let i=t.toString();for(;pu(e);){let t=e[pl];if(Object.hasOwn(t,i))return t[i];e=Object.getPrototypeOf(e)}}(this,t),s=!0===i||void 0!==this[t];return s||u8.warnOnce(`${null!=e?e:""}[${t}] is required.`),s})}toJson(){return pc(this).reduce((e,t)=>
202{let i=this[t];return e[t]=gx(i)?i.toJson():i,e},{})}},gS=class e extends Array{constructor(e,...t){var i;super(t.length),Object.defineProperty(this,"itemFactory",{value:(null==e||null==(i=e.prototype)||null==(i=i.constructor)?void 0:i.name)?t=>new e().set(t):e,enumerable:!1,configurable:!1}),this.set(t)}set(e){if(pm(e)){this.length=e.length;for(let t=0;t<e.length;t++)this[t]=this.itemFactory(e[t])}return this}reset(t){if(Array.isArray(t))return new e(this.itemFactory,...t)}toJson(){return this.map(e=>{var t,i;return null!=(t=null==e||null==(i=e.toJson)?void 0:i.call(e))?t:e})}};function gx(e){return e instanceof gb||e instanceof gS}function gM(e,t={}){let{optional:i=!1,property:s}=t;return pd((r,a,o)=>{var n;let l={...t,target:r,property:a};if(i&&void 0===o||e(o,l))return gx(r[a])&&!gx(o)?(r[a].set(o),r[a]):o;let h=null!=s?s:String(a).replace(/^_*/,""),d=null!=(n=r.constructor.className)?n:r.constructor.name.replace(/Properties$/,""),u=mu(o);if(null!=u&&u.length>50){let e=u.length-50;u=u.slice(0,50)+`... (+${e} characters)`}return u8.warn(`Property [${h}] of [${d}] cannot be set to [${u}]${e.message?`; expecting ${mh(e,l)}`:""}, ignoring.`),pn},void 0,{optional:i})}var gD=(...e)=>{let t=[];return ml((i,s)=>(t.length=0,e.every(e=>{let r=e(i,s);return r||t.push(mh(e,s)),r})),()=>t.filter(Boolean).join(" AND "))},gE=(...e)=>ml((t,i)=>e.some(e=>e(t,i)),t=>{var i;return e.map((i=t,e=>mh(e,i))).filter(Boolean).join(" OR ")}),gI=md(ml((e,t)=>gx(e)||pb(e)&&gx(t.target[t.property]),"a properties object")),gA=md(ml(e=>pb(e),"an object")),gR=ml(pv,"a boolean"),gT=ml(pw,"a function"),gL=ml(pM,"a string"),gF=Object.assign(ml(pE,"a number"),{restrict({min:e,max:t}={}){let i=["a number"],s=pD(e),r=pD(t);return s&&r?i.push(`between ${e} and ${t} inclusive`):s?i.push(`greater than or equal to ${e}`):r&&i.push(`less than or equal to ${t}`),ml(i=>pE(i)&&(!s||i>=e)&&(!r||i<=t),i.join(" "))}}),gP=ml(e=>pD(e)&&!isNaN(e),"a real number"),gk=ml(e=>pD(e)&&isNaN(e),"NaN"),gN=gF.restrict({min:0}),gO=gF.restrict({min:0,max:1}),gG=gF.restrict({min:-360,max:360}),gB=gE(gF,gk),gz=Object.assign(ml(pm,"an array"),{restrict({length:e,minLength:t}={}){let i="an array";return pD(t)&&t>0?i="a non-empty array":pD(e)&&(i=`an array of length ${e}`),ml(i=>pm(i)&&(!pD(e)||i.length===e)&&(!pD(t)||i.length>=t),i)}}),gV=(e,t)=>ml((t,i)=>pm(t)&&t.every(t=>e(t,i)),e=>{var i;let s=null!=(i=mh(gz,e))?i:"";return t?`${s} of ${t}`:s}),gH=e=>pE(e)||pC(e),gj=e=>ml((t,i)=>!gH(t)||!gH(i.target[e])||t<i.target[e],`to be less than ${e}`),gW=e=>ml((t,i)=>!gH(t)||!gH(i.target[e])||t>i.target[e],`to be greater than ${e}`),gU=ml(pC,"Date object"),g_=gE(gU,gN),g$="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",gY=ml(e=>pM(e)&&pr.validColorString(e),`color String. ${g$}`),gK=ml(gV(gY),`color strings. ${g$}`),gZ=gV(gR,"boolean values"),gq=gV(gF,"numbers"),gQ=gV(gL,"strings"),gX=ml(gV(gU),"Date objects"),gJ=ml(gV(gI),"objects"),g0=ma(["butt","round","square"],"a line cap"),g1=ma(["round","bevel","miter"],"a line join"),g2=ma(["s
202olid","dashed","dotted"],"a line style"),g3=ml(gV(gN),"numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),g4=ma(["top","right","bottom","left"],"a position"),g6=ma(["normal","italic","oblique"],"a font style"),g5=gE(ma(["normal","bold","bolder","lighter"],"a font weight"),gF.restrict({min:1,max:1e3})),g8=ma(["never","always","hyphenate","on-space"],"a text wrap strategy"),g7=ma(["left","center","right"],"a text align"),g9=ma(["top","middle","bottom"],"a vertical align"),me=ma(["ellipsis","hide"],"an overflow strategy"),mt=ma(["horizontal","vertical"],"a direction"),mi=ma(["inside","outside"],"a placement"),ms=gE(ma(["exact","nearest"],"interaction range"),gF),mr=ma(["top","bottom","left","right"]);function ma(e,t="a"){return ml((t,i)=>{let s=e.find(e=>t===("string"==typeof e?e:e.value));if(null==s)return!1;if("string"!=typeof s&&(!0===s.deprecated||null!=s.deprecatedTo)){let e=[`Property [%s] with value '${s.value}' is deprecated.`];s.deprecatedTo&&e.push(`Use ${s.deprecatedTo} instead.`),u8.warnOnce(e.join(" "),i.property)}return!0},`${t} keyword such as ${function(e){let t=e.filter(e=>"string"==typeof e||!0!==e.undocumented).map(e=>`'${"string"==typeof e?e:e.value}'`);if(1===t.length)return t[0];let i=t.pop();return`${t.join(", ")} or ${i}`}(e)}`)}var mo=gE(gD(gF.restrict({min:1}),gj("maxSpacing")),gk),mn=gE(gD(gF.restrict({min:1}),gW("minSpacing")),gk);function ml(e,t){return e.message=t,e}function mh(e,t){return pw(e.message)?e.message(t):e.message}function md(e){return Object.assign(e,{restrict:t=>ml(e=>e instanceof t,i=>{var s;return null!=(s=mh(e,i))?s:`an instance of ${t.name}`})})}function mu(e){if("number"==typeof e){if(isNaN(e))return"NaN";if(1/0===e)return"Infinity";if(-1/0===e)return"-Infinity"}return JSON.stringify(e)}var mc=((A=mc||{}).X="x",A.Y="y",A),mp=class{constructor(){this.moduleMap=new Map}*modules(){for(let e of this.moduleMap.values())yield e.moduleInstance}addModule(e,t){if(this.moduleMap.has(e.optionsKey))throw Error(`AG Charts - module already initialised: ${e.optionsKey}`);this.moduleMap.set(e.optionsKey,{module:e,moduleInstance:t(e)})}removeModule(e){var t;let i=pM(e)?e:e.optionsKey;null==(t=this.moduleMap.get(i))||t.moduleInstance.destroy(),this.moduleMap.delete(i)}getModule(e){var t;return null==(t=this.moduleMap.get(pM(e)?e:e.optionsKey))?void 0:t.moduleInstance}isEnabled(e){return this.moduleMap.has(pM(e)?e:e.optionsKey)}mapModules(e){return Array.from(this.moduleMap.values(),(t,i)=>e(t.moduleInstance,i))}destroy(){for(let t of this.moduleMap.keys()){var e;null==(e=this.moduleMap.get(t))||e.moduleInstance.destroy()}this.moduleMap.clear()}},mg={};function mm(e,t){let{nodes:i,selections:s}=p0(e);for(let e of s){for(let i of e.nodes()){let e=t(i,i.datum);i.setProperties(e)}e.cleanup()}for(let e of i){let i=t(e,e.datum);e.setProperties(i)}}function mv(e){let t,i,s=my.exec(e);s&&([,t,e,i]=s);let r=mC.exec(e);if(!r)throw Error(`The number formatter is invalid: ${e}`);let[,a,o,n,l,h,d,u,c,p,g]=r;return{fill:a,align:o,sign:n,symbol:l,zero:h,width:parseInt(d),comma:u,precision:parseInt(c),trim:!!p,type:g,prefix:t,suffix:i}}function mf(e){let t,i,s="string"==typeof e?mv(e):e,{fill:r,align:a,sign:o="-",symbol:n,zero:l,width:h,comma:d,type:u,prefix:c="",suffix:p="",precision:g}=s,{trim:m}=s,v=null==g||isNaN(g);if(u)if(u in mb&&u in mw)t=v?mw[u]:mb[u];else if(u in mb)t=mb[u];else if(u in mw)t=mw[u];else throw Error(`The number formatter type is invalid: ${u}`);else t=mb.g,m=!0;return i=null==g||v?u?6:12:g,e=>{let s=t(e,i);return m&&(s=s.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")),d&&(s=function(e,t){let i=e.indexOf(".");i<0&&(i=e.length);let s=e.substring(0,i).split(""),r=e.substring(i);for(let e=s.length-3;e>0;e-=3)s.splice(e,0,t);return`${s.join("")}${r}`}(s,d)),s=function(e,t,i=""){return"("===i?e>=0?t:`(${t})`:`${e>=0?"+"===i?"+":"":"−"}${t}`}(e,s,o),n&&"#"!==n&&(s=`${n}${s}`),"#"===n&&"x"===u&&(s=`0x${s}`),"s"===u&&(s=`${s}${mS[mM(e)]}`),("%"===u||"p"===u)&&(s=`${s}%`),null==h||isNaN(h)||(s=function(e,t,i=" ",s=">"){let r=e;if(">
202"!==s&&s){if("<"===s)r=r.padEnd(t,i);else if("^"===s){let e=Math.max(0,t-r.length),s=Math.ceil(e/2),a=Math.floor(e/2);r=(r=r.padStart(s+r.length,i)).padEnd(a+r.length,i)}}else r=r.padStart(t,i);return r}(s,h,null!=r?r:l,a)),s=`${c}${s}${p}`}}uq(mg,{resetMotion:()=>mm});var mC=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,my=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/,mw={b:e=>mx(e).toString(2),c:e=>String.fromCharCode(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>mx(e).toString(8),x:e=>mx(e).toString(16),X:e=>mw.x(e).toUpperCase(),n:e=>mw.d(e),"%":e=>`${mx(100*e).toFixed(0)}`},mb={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>mb.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>mb.f(e,t).toUpperCase(),g:(e,t)=>{if(0===e)return"0";let i=Math.abs(e),s=Math.floor(Math.log10(i));return s>=-4&&s<t?i.toFixed(t-1-s):i.toExponential(t-1)},G:(e,t)=>mb.g(e,t).toUpperCase(),n:(e,t)=>mb.g(e,t),p:(e,t)=>mb.r(100*e,t),r:(e,t)=>{if(0===e)return"0";let i=Math.abs(e),s=Math.floor(Math.log10(i))-(t-1);if(s<=0)return i.toFixed(-s);let r=10**s;return(Math.round(i/r)*r).toFixed()},s:(e,t)=>{let i=mM(e);return mb.r(e/10**i,t)},"%":(e,t)=>mb.f(100*e,t)},mS={[-24]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"µ",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y"};function mx(e){return Math.floor(Math.abs(e))}function mM(e){return c$(-24,e?3*Math.floor(Math.log10(Math.abs(e))/3):0,24)}var mD=(e,t,i)=>({duration:t*i,timeInterval:e,step:i}),mE=[mD(ci,1e3,1),mD(ci,1e3,5),mD(ci,1e3,15),mD(ci,1e3,30),mD(cr,6e4,1),mD(cr,6e4,5),mD(cr,6e4,15),mD(cr,6e4,30),mD(co,36e5,1),mD(co,36e5,3),mD(co,36e5,6),mD(co,36e5,12),mD(cn,864e5,1),mD(cn,864e5,2),mD(ch,6048e5,1),mD(ch,6048e5,2),mD(ch,6048e5,3),mD(cv,2592e6,1),mD(cv,2592e6,2),mD(cv,2592e6,3),mD(cv,2592e6,4),mD(cv,2592e6,6),mD(cf,31536e6,1)],mI=[1,2,5,10];function mA(e,t){return Math.abs(Math.round(e)-e)<t}function mR(e,t,i,s,r){if(i<2)return[e,t];let a=mL(e,t,i,s,r);return Number.isFinite(a)?(mA(e/a,1e-12)||(e=Math.ceil(e/a)*a),mA(t/a,1e-12)||(t=Math.floor(t/a)*a),mk(e,t,a)):[]}function mT(e,t,i,s,r,a){let o=null!=a?a:Math.abs(t-e)/Math.max(i,1),n=0;for(let e of mE){if(o<=e.duration)break;n++}if(0===n){let a=Math.max(mL(e,t,i,s,r),1);return ce.every(a)}if(n===mE.length){let o=null==a?mL(e/31536e6,t/31536e6,i,s,r):1;return cf.every(o)}let l=mE[n-1],h=mE[n],{timeInterval:d,step:u}=o-l.duration<h.duration-o?l:h;return d.every(u)}function mL(e,t,i,s=0,r=1/0){if(e===t)return c$(1,s,r);if(i<1)return 0/0;let a=Math.abs(t-e),o=10**Math.floor(Math.log10(a/i)),n=0/0,l=1/0,h=!1;for(let e of mI){let t=Math.ceil(a/(e*o)),d=t>=s&&t<=r;if(h&&!d)continue;let u=Math.abs(t-i);(l>u||h!==d)&&(h||(h=d),l=u,n=e)}return n*o}function mF(e){for(let t=e.length-1;t>=0;t-=1)if("0"!==e[t])return t+1;return 0}function mP(e,t){let i=mv(null!=t?t:",f");(null==i.precision||isNaN(i.precision))&&(!i.type||"eEFgGnprs".includes(i.type)?i.precision=Math.max(...e.map(e=>{if(!Number.isFinite(e))return 0;let[t,s]=e.toExponential((i.type?6:12)-1).split(/\.|e/g);return+("1"!==t&&"-1"!==t)+mF(s)+1})):"f%".includes(i.type)&&(i.precision=Math.max(...e.map(e=>{if(!Number.isFinite(e)||0===e)return 0;let t=Math.floor(Math.log10(Math.abs(e))),s=i.type?6:12;return Math.max(0,mF(e.toExponential(s-1).split(/\.|e/g)[1])-t)}))));let s=mf(i);return e=>s(Number(e))}function mk(e,t,i){if(!Number.isFinite(i)||i<=0)return[];let s=10**c1(i),r=Math.min(e,t),a=Math.max(e,t),o=[];for(let e=0;;e+=1){let t=Math.round((r+i*e)*s)/s;if(t<=a)o.push(t);else break}return o}function mN(e,t){return e>=t&&(u8.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0)}var mO=class e extends p8{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.baseLog=u6,this.basePow=u6,this.log=e=>Math.min(...this.domain)>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>Math.min(...this.domain)>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return Math.min(...this.domain)>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return Math.min(...this.domain)>=0?Math.exp(e):-Math.exp(-e)}refresh(){this.base<=0&&(this.base=0,u8.warnOnce("expecting a finite Number greater than to 0")),super.refresh()}update(){this.domain&&!(this.domain.length<2)&&(this.baseLog=e.getBaseLogMethod(this.base),this.basePow=e.getBasePowerMethod(this.base),this.nice&&this.updateNiceDomain())}updateNiceDomain(){let[e,t]=this.domain,i=e>t?Math.ceil:Math.floor,s=e>t?Math.floor:Math.ceil,r=this.pow(i(this.log(e))),a=this.pow(s(this.log(t)));this.niceDomain=[r,a]}ticks(){var e;let t=null!=(e=this.tickCount)?e:10;if(!this.domain||this.domain.length<2||t<1)return[];this.refresh();let i=this.base,[s,r]=this.getDomain(),a=Math.min(s,r),o=Math.max(s,r),n=this.log(a),l=this.log(o);if(this.interval){let e=Math.min(Math.abs(this.interval),Math.abs(l-n)),t=mk(n,l,e).map(this.pow).filter(e=>e>=a&&e<=o);if(!mN(t.length,this.getPixelRange()))return t}let h=l-n>=t;if(i%1!=0||h)return mR(n,l,Math.min(l-n,t)).map(this.pow);let d=[],u=a>0;n=Math.floor(n)-1,l=Math.round(l)+1;let c=cZ(this.range)/t,p=1/0;for(let e=n;e<=l;e++){let t=this.convert(this.pow(e+1));for(let s=1;s<i;s++){let r=u?s:i-s+1,n=this.pow(e)*r,l=this.convert(n),h=Math.abs(p-l),g=Math.abs(l-t),m=h>=c&&g>=c;n>=a&&n<=o&&(1===s||m||0===d.length)&&(d.push(n),p=l)}}return d}tickFormat({count:e,ticks:t,specifier:i}){return 1/0!==e&&null==t&&this.ticks(),null!=i||(i=10===this.base?".0e":","),pM(i)?mf(i):i}static getBaseLogMethod(e){switch(e){case 10:return Math.log10;case Math.E:return Math.log;case 2:return Math.log2;default:return t=>Math.log(t)/Math.log(e)}}static getBasePowerMethod(e){switch(e){case 10:return e=>e>=0?10**e:1/10**-e;case Math.E:return Math.exp;default:return t=>e**t}}};uQ([p6],mO.prototype,"base",2);var mG=class e extends p8{constructor(){super([],[0,1]),this.type="time"}toDomain(e){return new Date(e)}convert(e,t){return super.convert(new Date(e),t)}invert(e){return new Date(super.invert(e))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();let{interval:t,nice:i,tickCount:s,minTickCount:r,maxTickCount:a}=this,[o,n]=cK(this.getDomain().map(gv));if(null!=t){var l;return null!=(l=e.getTicksForInterval({start:o,stop:n,interval:t,availableRange:this.getPixelRange()}))?l:e.getDefaultTicks({start:o,stop:n,tickCount:s,minTickCount:r,maxTickCount:a})}return i&&2===s?this.niceDomain:i&&1===s?this.niceDomain.slice(0,1):e.getDefaultTicks({start:o,stop:n,tickCount:s,minTickCount:r,maxTickCount:a})}static getDefaultTicks({start:e,stop:t,tickCount:i,minTickCount:s,maxTickCount:r}){let a=mT(e,t,i,s,r);return a?a.range(new Date(e),new Date(t)):[]}static getTicksForInterval({start:e,stop:t,interval:i,availableRange:s}){if(!i)return[];if(i instanceof u7){let r=i.range(new Date(e),new Date(t));if(mN(r.length,s))return;return r}let r=Math.abs(i);if(mN((t-e)/r,s))return;let a=mE.findLast(e=>r%e.duration==0);if(a)return a.timeInterval.every(r/(a.duration/a.step)).range(new Date(e),new Date(t));let o=new Date(e),n=new Date(t),l=[];for(;o<=n;)l.push(o),(o=new Date(o)).setMilliseconds(o.getMilliseconds()+r);return l}tickFormat({ticks:e,domain:t,specifier:i,formatOffset:s}){return null==i?gf(e,t,s):gm(i)}update(){this.domain&&!(this.domain.length<2)&&this.nice&&this.updateNiceDomain()}updateNiceDomain(){let[e,t]=this.domain;for(let i=0;i<4;i++){this.updateNiceDomainIteration(e,t);let[i,s]=this.niceDomain;if(gv(e)===gv(i)&&gv(t)===gv(s))break;e=i,t=s}}updateNiceDomainIteration(e,t){let i,s=Math.min(gv(e),gv(t)),r=Math.max(gv(e),gv(t)),a=e>t,{interval:o}=this;if(o instanceof u7)i=o;else{let e="number"==typeof o?(r-s)/Math.max(o,1):this.tickCount;i=mT(s,r,e,this.minTickCount,this.maxTickCount)}if(i){let e=i.range(new Date(s),new Date(r),!0),t=a?[...e].reverse():e,o=t[0],n=t.at(-1);this.niceDomain=[o,n]}}};function mB(e,t){return e-t}var mz=class e extends gw{constructor(){super(...arguments),this.type="ordinal-time",this.tickCount=p8.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.interval=void 0,this._domain=[],this.timestamps=[],this.sortedTimestamps=[],this.visibleRange=[0,1]}static is(t){return t instanceof e}setVisibleRange(e){this.visibleRange=e}set domain(e){if(this.invalid=!0,0===e.length){this._domain=[];return}this._domain=e,this.timestamps=gi(e.map(gv)),this.sortedTimestamps=this.timestamps.slice().sort(mB)}get domain(){return this._domain}ticks(){let e;this.refresh();let[t,i]=[this.timestamps[0],this.timestamps.at(-1)],s=Math.min(t,i),r=Math.max(t,i);if(null==this.interval)e=this.getDefaultTicks(this.maxTickCount,t>i);else{var a;let[t,i]=this.range,o=Math.abs(i-t);e=null!=(a=mG.getTicksForInterval({start:s,stop:r,interval:this.interval,availableRange:o}))?a:[]}let o=new Set;return e.filter(e=>{let t=this.convert(e);return!(isNaN(t)||o.has(t))&&(o.add(t),!0)})}getDefaultTicks(e,t){let i=[],s=this.timestamps.length,r=Math.ceil(s*(this.visibleRange[1]-this.visibleRange[0])/e),a=Math.floor(r/2);for(let[e,o]of this.timestamps.entries())r>0&&(e+a)%r||(t?i.push(new Date(this.timestamps[s-e-1])):i.push(new Date(o)));return i}convert(e){var t;this.refresh();let i=Number(e);if(i<this.sortedTimestamps[0])return 0/0;let s=this.findInterval(i);return this.timestamps[0]!==this.sortedTimestamps[0]&&(s=this.timestamps.length-s-1),null!=(t=this.ordinalRange[s])?t:0/0}findInterval(e){let{sortedTimestamps:t}=this,i=0,s=t.length-1;for(;i<=s;){let r=Math.floor((i+s)/2);if(t[r]===e)return r;t[r]<e?i=r+1:s=r-1}return i}tickFormat({ticks:e,domain:t,specifier:i}){return null==i?gf(e,t):gm(i)}invert(e){this.refresh();let t=this.ordinalRange.findIndex(t=>e<=t);return this.domain[t]}invertNearest(e){return new Date(super.invertNearest(e))}};function mV(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;if("string"==typeof e&&"string"==typeof t)return e.localeCompare(t);if(null==e&&null==t)return 0;if(null==e)return -1;if(null==t)return 1;return String(e).localeCompare(String(t))}function mH(e){return"function"==typeof e?e():e}function mj(e,t,i){for(let s in e){let r=i(mH(e[s]),mH(t[s]));if(0!==r)return r}return 0}function mW(e){let t=1,i=+!!e.visible,s=+(e.dirty>0);for(let r of e.children(!1)){let e=mW(r);t+=e.count,s+=e.dirtyCount,i+=e.visibleCount}return{count:t,visibleCount:i,dirtyCount:s}}uQ([p6],mz.prototype,"tickCount",2),uQ([p6],mz.prototype,"minTickCount",2),uQ([p6],mz.prototype,"maxTickCount",2),uQ([p6],mz.prototype,"interval",2);var mU=Object.freeze([1,0,0,1,0,0]);function m_(e,t,i=1e-8){return e===t||Math.abs(t-e)<i}var m$=class e{get e(){return[...this.elements]}constructor(e=[...mU]){this.elements=e}setElements(e){let t=this.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],this}get identity(){let e=this.elements;return m_(e[0],1)&&m_(e[1],0)&&m_(e[2],0)&&m_(e[3],1)&&m_(e[4],0)&&m_(e[5],0)}AxB(e,t,i){let s=e[0]*t[0]+e[2]*t[1],r=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],n=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];(i=null!=i?i:e)[0]=s,i[1]=r,i[2]=a,i[3]=o,i[4]=n,i[5]=l}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(t){let i=Array(6);return t instanceof e?this.AxB(this.elements,t.elements,i):this.AxB(this.elements,[t.a,t.b,t.c,t.d,t.e,t.f],i),new e(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){let t=this.elements,i=t[0],s=t[1],r=t[2],a=t[3],o=t[4],n=t[5],l=1/(i*a-s*r);return i*=l,s*=l,r*=l,new e([a*=l,-s,-r,i,r*n-a*o,s*o-i*n])}inverseTo(e){let t=this.elements,i=t[0],s=t[1],r=t[2],a=t[3],o=t[4],n=t[5],l=1/(i*a-s*r);return i*=l,s*=l,r*=l,a*=l,e.setElements([a,-s,-r,i,r*n-a*o,s*o-i*n]),this}invertSelf(){let e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],a=e[4],o=e[5],n=1/(t*r-i*s);
202return t*=n,i*=n,s*=n,r*=n,e[0]=r,e[1]=-i,e[2]=-s,e[3]=t,e[4]=s*o-r*a,e[5]=i*a-t*o,this}transformPoint(e,t){let i=this.elements;return{x:e*i[0]+t*i[2]+i[4],y:e*i[1]+t*i[3]+i[5]}}transformBBox(e,t){let i=this.elements,s=i[0],r=i[1],a=i[2],o=i[3],n=.5*e.width,l=.5*e.height,h=e.x+n,d=e.y+l,u=Math.abs(n*s)+Math.abs(l*a),c=Math.abs(n*r)+Math.abs(l*o);return null!=t||(t=new c4(0,0,0,0)),t.x=h*s+d*a+i[4]-u,t.y=h*r+d*o+i[5]-c,t.width=u+u,t.height=c+c,t}toContext(e){if(this.identity)return;let t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}static flyweight(t){return e.instance.setElements(t.elements)}static updateTransformMatrix(e,t,i,s,r,a,o){var n,l,h,d;let u,c,p,g;1===t&&1===i?(u=0,c=0):(u=null!=(n=null==o?void 0:o.scalingCenterX)?n:0,c=null!=(l=null==o?void 0:o.scalingCenterY)?l:0);let m=Math.cos(s),v=Math.sin(s);0===s?(p=0,g=0):(p=null!=(h=null==o?void 0:o.rotationCenterX)?h:0,g=null!=(d=null==o?void 0:o.rotationCenterY)?d:0);let f=u*(1-t)-p,C=c*(1-i)-g;return e.setElements([m*t,v*t,-v*i,m*i,m*f-v*C+p+r,v*f+m*C+g+a]),e}static fromContext(t){let i=t.getTransform();return new e([i.a,i.b,i.c,i.d,i.e,i.f])}};function mY(e){return!0===e.constructor[mK]}m$.instance=new m$;var mK=Symbol("isMatrixTransform");function mZ(e){var t;let i=e;if(!0===e[mK])return e;let s=Symbol("matrix_combined_transform");class r extends i{constructor(){super(...arguments),this[t]=new m$,this._dirtyTransform=!0}markDirtyTransform(){this._dirtyTransform=!0,super.markDirty(3)}updateMatrix(e){}computeTransformMatrix(){this._dirtyTransform&&(this[s].setElements(mU),this.updateMatrix(this[s]),this._dirtyTransform=!1)}toParent(e){return(this.computeTransformMatrix(),this[s].identity)?e.clone():this[s].transformBBox(e)}toParentPoint(e,t){return(this.computeTransformMatrix(),this[s].identity)?{x:e,y:t}:this[s].transformPoint(e,t)}fromParent(e){return(this.computeTransformMatrix(),this[s].identity)?e.clone():this[s].inverse().transformBBox(e)}fromParentPoint(e,t){return(this.computeTransformMatrix(),this[s].identity)?{x:e,y:t}:this[s].inverse().transformPoint(e,t)}computeBBox(){let e=super.computeBBox();return e?this.toParent(e):e}computeBBoxWithoutTransforms(){return super.computeBBox()}pickNode(e,t,i=!1){return i||({x:e,y:t}=this.fromParentPoint(e,t)),super.pickNode(e,t)}render(e){this._dirtyTransform&&(this.computeTransformMatrix(),e.forceRender||(e={...e,forceRender:"dirtyTransform"}));let t=this[s],i=!1;t.identity||(e.ctx.save(),i=!0,t.toContext(e.ctx)),super.render(e),i&&e.ctx.restore()}toSVG(){let e=super.toSVG(),t=this[s];if(t.identity||null==e)return e;let i=document.createElementNS("http://www.w3.org/2000/svg","g");i.append(...e.elements);let[r,a,o,n,l,h]=t.e;return i.setAttribute("transform",`matrix(${r} ${a} ${o} ${n} ${l} ${h})`),{elements:[i],defs:e.defs}}}return t=s,r[mK]=!0,r}function mq(e){var t;let i=e,s=Symbol("matrix_rotation");class r extends mZ(i){constructor(){super(...arguments),this[t]=new m$,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0}updateMatrix(e){super.updateMatrix(e);let{rotation:t,rotationCenterX:i,rotationCenterY:r}=this;0!==t&&(m$.updateTransformMatrix(this[s],1,1,t,0,0,{rotationCenterX:i,rotationCenterY:r}),e.multiplySelf(this[s]))}}return t=s,uQ([c5({type:"transform"})],r.prototype,"rotationCenterX",2),uQ([c5({type:"transform"})],r.prototype,"rotationCenterY",2),uQ([c5({type:"transform"})],r.prototype,"rotation",2),r}function mQ(e){var t;let i=e,s=Symbol("matrix_scale");class r extends mZ(i){constructor(){super(...arguments),this[t]=new m$,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null}updateMatrix(e){super.updateMatrix(e);let{scalingX:t,scalingY:i,scalingCenterX:r,scalingCenterY:a}=this;(1!==t||1!==i)&&(m$.updateTransformMatrix(this[s],t,i,0,0,0,{scalingCenterX:r,scalingCenterY:a}),e.multiplySelf(this[s]))}}return t=s,uQ([c5({type:"transform"})],r.prototype,"scalingX",2),uQ([c5({type:"transform"})],r.prototype,"scalingY",2),uQ([c5({type:"transform"})],r.prototype,"scalingCenterX",2),uQ([c5({type:"transform"})],r.prototype,"scalingCenterY",2),r}function mX(e){var t;let i=e,s=Symbol("matrix_translation");class r extends mZ(i){constructor(){super(...arguments),this[t]=new m$,this.translationX=0,this.translationY=0}updateMatrix(e){super.updateMatrix(e);let{translationX:t,translationY:i}=this;(0!==t||0!==i)&&(m$.updateTransformMatrix(this[s],1,1,0,t,i),e.multiplySelf(this[s]))}}return t=s,uQ([c5({type:"transform"})],r.prototype,"translationX",2),uQ([c5({type:"transform"})],r.prototype,"translationY",2),r}var mJ=class{static fromCanvas(e,t){let i=[];for(let t of e.traverseUp())mY(t)&&i.unshift(t);for(let e of i)t=e.fromParent(t);return mY(e)&&(t=e.fromParent(t)),t}static toCanvas(e,t){for(let i of(null==t?t=e.getBBox():mY(e)&&(t=e.toParent(t)),e.traverseUp()))mY(i)&&(t=i.toParent(t));return t}static fromCanvasPoint(e,t,i){let s=[];for(let t of e.traverseUp())mY(t)&&s.unshift(t);for(let e of s)({x:t,y:i}=e.fromParentPoint(t,i));return mY(e)&&({x:t,y:i}=e.fromParentPoint(t,i)),{x:t,y:i}}static toCanvasPoint(e,t,i){for(let s of(mY(e)&&({x:t,y:i}=e.toParentPoint(t,i)),e.traverseUp()))mY(s)&&({x:t,y:i}=s.toParentPoint(t,i));return{x:t,y:i}}},m0=class e extends pe{constructor(e){super(e),this.opts=e,this.opacity=1,this.isContainerNode=!0,this.zIndexSubOrder=null==e?void 0:e.zIndexSubOrder}static is(t){return t instanceof e}static computeChildrenBBox(e,t=!0){return c4.merge(pe.extractBBoxes(e,t))}static compareChildren(e,t){var i,s;return mj([e.zIndex,...null!=(i=e.zIndexSubOrder)?i:[void 0,void 0],e.serialNumber],[t.zIndex,...null!=(s=t.zIndexSubOrder)?s:[void 0,void 0],t.serialNumber],mV)}containsPoint(e,t){return!0}computeBBox(){return e.computeChildrenBBox(this.children())}preRender(){let e=super.preRender();return e.groups+=1,e.nonGroups-=1,e}isDirty(e){var t,i;let{resized:s}=e,{dirty:r,dirtyZIndex:a}=this,o=r>=2||a||s,n=o,l=!1;for(let e of this.children())if(n||(n=null==e.layerManager&&e.dirty>=1),l||(l=null!=e.layerManager&&e.dirty>=1),n)break;return null!=(t=this.opts)&&t.name&&(null==(i=this._debug)||i.call(this,{name:this.opts.name,group:this,isDirty:o,isChildDirty:n,renderCtx:e})),{isDirty:o,isChildDirty:n,isChildLayerDirty:l}}
202debugSkip(e){var t,i;e.stats&&null!=(t=this.opts)&&t.name&&(null==(i=this._debug)||i.call(this,{name:this.opts.name,group:this,result:"skipping",counts:mW(this),renderCtx:e}))}render(t,i){var s;if(i)return super.render(t);let{opts:{name:r}={},_debug:a}=this,{isDirty:o,isChildDirty:n,isChildLayerDirty:l}=this.isDirty(t),{ctx:h,stats:d}=t,{forceRender:u}=t;if(!o&&!n&&!l&&!u){this.debugSkip(t),this.markClean({recursive:!1});return}"dirtyTransform"!==u&&(u||(u=this.dirtyZIndex)),h.globalAlpha*=this.opacity,this.dirtyZIndex&&this.sortChildren(e.compareChildren);let c=this.sortedChildren(),p=null!=(s=this.renderClip(t))?s:t.clipBBox,g=u!==t.forceRender||p!==t.clipBBox;for(let e of(this.renderChildren(c,g?{...t,forceRender:u,clipBBox:p}:t),super.render(t),this.clipRect&&h.restore(),this.virtualChildren()))e.markClean({recursive:"virtual"});r&&d&&(null==a||a({name:r,renderCtx:t,result:"rendered",skipped:d.nodesSkipped,counts:mW(this),group:this}))}sortedChildren(){let t=this.children();return this.hasVirtualChildren()&&(t=[...t].sort(e.compareChildren)),t}renderClip(e){var t;if(!this.clipRect)return;let{x:i,y:s,width:r,height:a}=this.clipRect,{ctx:o}=e;return o.save(),o.beginPath(),o.rect(i,s,r,a),o.clip(),null==(t=this._debug)||t.call(this,()=>{var t;return{name:null==(t=this.opts)?void 0:t.name,clipRect:this.clipRect,ctxTransform:o.getTransform(),renderCtx:e,group:this}}),mJ.toCanvas(this,this.clipRect)}renderChildren(e,t){let{ctx:i,forceRender:s,stats:r}=t;for(let a of e){if(!a.visible||!this.visible){a.markClean(),r&&(r.nodesSkipped+=mW(a).count);continue}if(!s&&0===a.dirty){r&&(r.nodesSkipped+=mW(a).count);continue}i.save(),a.render(t),i.restore()}}setClipRect(e){this.clipRect=e?mJ.fromCanvas(this,e):void 0}setClipRectCanvasSpace(e){this.clipRect=e}toSVG(){if(!this.visible)return;let e=[],t=[];for(let i of this.sortedChildren()){let s=i.toSVG();null!=s&&(t.push(...s.elements),null!=s.defs&&e.push(...s.defs))}return{elements:t,defs:e}}};m0.className="Group",uQ([c5({redraw:3,convertor:e=>c$(0,e,1)})],m0.prototype,"opacity",2);var m1=m0,m2=class extends mQ(m1){},m3=class extends mq(m1){},m4=class extends mX(m1){},m6=class extends mq(mX(m1)){},m5=Date.now(),m8={create:(...e)=>Object.assign((...t)=>{if(m8.check(...e)){"function"==typeof t[0]&&(t=gt(t[0]()));let e=Date.now()-m5;if(e>2e3){let t=(Math.floor(e/100)/10).toFixed(1);u8.log(`**** ${t}s since last log message ****`)}m5=Date.now(),u8.log(...t)}},{check:()=>m8.check(...e)}),check:(...e)=>(0===e.length&&e.push(!0),gt(cO("agChartsDebug")).some(t=>e.includes(t)))},m7=class e{constructor(e,t,i=!0){this.parentNode=e,this.autoCleanup=i,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=m8.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(pe,t)?()=>new t:t}static select(t,i,s=!0){return new e(t,i,s)}static selectAll(e,t){let i=[],s=e=>{for(let r of(t(e)&&i.push(e),e.children()))s(r)};return s(e),i}static selectByClass(t,...i){return e.selectAll(t,e=>i.some(t=>e instanceof t))}static selectByTag(t,i){return e.selectAll(t,e=>e.tag===i)}createNode(e,t,i){let s=this.nodeFactory(e);return s.datum=e,null==t||t(s),null==i?this._nodes.push(s):this._nodes.splice(i,0,s),this.parentNode.appendChild(s),s}update(e,t,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){let s=new Map(e.map((e,t)=>[i(e),[e,t]]));for(let[e,t]of this._nodesMap.entries())if(s.has(t)){let[i]=s.get(t);e.datum=i,this.garbageBin.delete(e),s.delete(t)}else this.garbageBin.add(e);for(let[e,[i,r]]of s.entries())this._nodesMap.set(this.createNode(i,t,r),e)}else{let i=Math.max(e.length,this.data.length);for(let s=0;s<i;s++)s>=e.length?this.garbageBin.add(this._nodes[s]):s>=this._nodes.length?this.createNode(e[s],t):(this._nodes[s].datum=e[s],this.garbageBin.delete(this._nodes[s]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return 0===this.garbageBin.size||(this._nodes=this._nodes.filter(e=>!this.garbageBin.has(e)||(this._nodesMap.delete(e),this.garbageBin.delete(e),e.destroy(),!1))),this}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}each(e){for(let t of this._nodes.entries())e(t[1],t[1].datum,t[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){let t=this._nodes[e];yield{node:t,datum:t.datum,index:e}}}select(t){return e.selectAll(this.parentNode,t)}selectByClass(t){return e.selectByClass(this.parentNode,t)}selectByTag(t){return e.selectByTag(this.parentNode,t)}nodes(){return this._nodes}at(e){return this._nodes.at(e)}},m9=2*Math.PI;function ve(e){return e%=m9,e+=m9,e%=m9}function vt(e){return e%=m9,(e+=m9)!==m9&&(e%=m9),e}function vi(e){return(e%=m9)<-Math.PI?e+=m9:e>=Math.PI&&(e-=m9),e}function vs(e,t,i){let s=ve(e),r=ve(t),a=ve(i);return r<a?r<=s&&s<=a:!(r>a)||r<=s||s<=a}function vr(e){return e/180*Math.PI}function va(e){return e/Math.PI*180}function vo(e,t,i){i&&([e,t]=[t,e]);let s=ve(e);return(ve(t)+m9-s)%m9}function vn(e,t){return e=ve(e),(t=ve(t))-e+(e>t?2*Math.PI:0)}
202function vl(e,t,i,s){return{x:e+i*Math.cos(s),y:t+i*Math.sin(s)}}function vh(e,t){return 1e-6>vn(e,t)?t:ve(e-t)+t}function vd(e,t,i=0){let s=Math.abs(t-e)>=2*Math.PI?2*Math.PI:ve(t-e);return t=(e=vh(e,i))+s,{startAngle:e,endAngle:t}}function vu(e,t,i,s){let r=e-i,a=t-s;return r*r+a*a}function vc(e,t,i,s,r,a,o){if(i===r&&s===a)return Math.min(o,vu(e,t,i,s));let n=r-i,l=a-s,h=Math.max(0,Math.min(1,((e-i)*n+(t-s)*l)/(n*n+l*l)));return Math.min(o,vu(e,t,i+h*n,s+h*l))}function vp(e,t,i,s,r,a,o,n,l){if(n&&([o,a]=[a,o]),!vs(Math.atan2(t-s,e-i),a,o)){let o=i+Math.cos(a)*r,n=s+Math.sin(a)*r,h=i+Math.cos(a)*r,d=s+Math.sin(a)*r;return Math.min(l,vu(e,t,o,n),vu(e,t,h,d))}let h=r-Math.sqrt(vu(e,t,i,s));return Math.min(l,h*h)}var vg=e=>{let t=pr.fromString(e),[i,s,r]=pr.RGBtoOKLCH(t.r,t.g,t.b);return{l:i,c:s,h:r,a:t.a}},vm=e=>e.c<1e-6||e.l<1e-6||e.l>1-1e-6,vv=class{constructor(){this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(vg)}update(){let{domain:e,range:t}=this;e.length<2&&(u8.warnOnce("`colorDomain` should have at least 2 values."),0===e.length?e.push(0,1):1===e.length&&e.push(e[0]+1));for(let t=1;t<e.length;t++)if(e[t-1]>=e[t]){u8.warnOnce("`colorDomain` values should be supplied in ascending order."),e.sort((e,t)=>e-t);break}if(t.length<e.length)for(let i=t.length;i<e.length;i++)t.push(t.length>0?t[0]:"black");this.parsedRange=this.range.map(vg)}convert(e){let t,i;this.refresh();let{domain:s,range:r,parsedRange:a}=this,o=s[0],n=s.at(-1),l=r[0],h=r[r.length-1];if(e<=o)return l;if(e>=n)return h;if(2===s.length){let s=(e-o)/(n-o),a=1/(r.length-1);t=r.length<=2?0:Math.min(Math.floor(s*(r.length-1)),r.length-2),i=(s-t*a)/a}else{for(t=0;t<s.length-2&&!(e<s[t+1]);t++);let r=s[t];i=(e-r)/(s[t+1]-r)}return((e,t,i)=>{let s;if(i=c$(0,i,1),vm(e))s=t.h;else if(vm(t))s=e.h;else{let r=e.h,a=t.h,o=t.h-e.h;o>180?a-=360:o<-180&&(a+=360),s=r*(1-i)+a*i}let r=e.c*(1-i)+t.c*i,a=e.l*(1-i)+t.l*i,o=e.a*(1-i)+t.a*i;return pr.fromOKLCH(a,r,s,o)})(a[t],a[t+1],i).toRgbaString()}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&u8.warnOnce("Expected update to not invalidate scale"))}};uQ([p6],vv.prototype,"domain",2),uQ([p6],vv.prototype,"range",2);var vf=class{constructor(e,t=[],i){this.colorSpace=e,this.stops=t,this.bbox=i,this._cache=void 0}createGradient(e,t){var i;let s=null!=(i=this.bbox)?i:t;if(null!=this._cache&&this._cache.ctx===e&&this._cache.bbox.equals(s))return this._cache.gradient;let{stops:r,colorSpace:a}=this;if(0===r.length)return;if(1===r.length)return r[0].color;let o=this.createCanvasGradient(e,s);if(null==o)return;let n="oklch"===a,l=r[0];o.addColorStop(l.offset,l.color);for(let e=1;e<r.length;e+=1){let t=r[e];if(n){let e=new vv;e.domain=[l.offset,t.offset],e.range=[l.color,t.color];for(let i=l.offset+.05;i<t.offset;i+=.05)o.addColorStop(i,e.convert(i))}o.addColorStop(t.offset,t.color),l=t}return"createPattern"in o&&(o=o.createPattern()),this._cache={ctx:e,bbox:s,gradient:o},o}},vC=class extends vf{constructor(e,t,i=0,s){super(e,t,s),this.angle=i}createCanvasGradient(e,t){let{angle:i}=this,s=ve(vr(i+90)),r=Math.cos(s),a=Math.sin(s),o=t.width,n=t.height,l=t.x+.5*o,h=t.y+.5*n,d=Math.sqrt(n*n+o*o)/2*Math.abs(Math.cos((s<Math.PI/2?s:s<Math.PI?Math.PI-s:s<1.5*Math.PI?s-Math.PI:2*Math.PI-s)-Math.atan2(n,o)));return e.createLinearGradient(l+r*d,h+a*d,l-r*d,h-a*d)}},vy=/^linear-gradient\((-?[\d.]+)deg,(.*?)\)$/i,vw=class e extends pe{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=e.defaultStyles.fill,this.stroke=e.defaultStyles.stroke,this.strokeWidth=e.defaultStyles.strokeWidth,this.lineDash=e.defaultStyles.lineDash,this.lineDashOffset=e.defaultStyles.lineDashOffset,this.lineCap=e.defaultStyles.lineCap,this.lineJoin=e.defaultStyles.lineJoin,this.miterLimit=void 0,this.opacity=e.defaultStyles.opacity,this.fillShadow=e.defaultStyles.fillShadow}restoreOwnStyles(){let{defaultStyles:e}=this.constructor;Object.assign(this,e)}onFillChange(){let e,{fill:t}=this;if(t instanceof vf)this.gradient=t;else if(null!=t&&t.startsWith("linear-gradient")&&(e=vy.exec(t))){let t,i=p
202arseFloat(e[1]),s=[],r=e[2],a=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi;for(;t=a.exec(r);)s.push(t[0]);this.gradient=new vC("rgb",s.map((e,t)=>({color:e,offset:t/(s.length-1)})),i)}else this.gradient=void 0}align(e,t){var i,s;let r=null!=(i=null==(s=this.layerManager)||null==(s=s.canvas)?void 0:s.pixelRatio)?i:1,a=Math.round(e*r)/r;return null==t?a:0===t?0:t<1?Math.ceil(t*r)/r:Math.round((t+e)*r)/r-a}fillStroke(e,t){this.renderFill(e,t),this.renderStroke(e,t)}renderFill(e,t){if(this.fill){let{globalAlpha:i}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),this.executeFill(e,t),e.globalAlpha=i}e.shadowColor="rgba(0, 0, 0, 0)"}executeFill(e,t){t?e.fill(t):e.fill()}applyFill(e){var t,i,s;e.fillStyle=null!=(t=null!=(i=null==(s=this.gradient)?void 0:s.createGradient(e,this.getBBox()))?i:"string"==typeof this.fill?this.fill:void 0)?t:"black"}applyFillAlpha(e){e.globalAlpha*=this.opacity*this.fillOpacity}applyShadow(e){var t,i;let s=null!=(t=null==(i=this.layerManager)?void 0:i.canvas.pixelRatio)?t:1,r=this.fillShadow;null!=r&&r.enabled&&(e.shadowColor=r.color,e.shadowOffsetX=r.xOffset*s,e.shadowOffsetY=r.yOffset*s,e.shadowBlur=r.blur*s)}renderStroke(e,t){if(this.stroke&&this.strokeWidth){let{globalAlpha:i}=e;e.strokeStyle=this.stroke,e.globalAlpha*=this.opacity*this.strokeOpacity,e.lineWidth=this.strokeWidth,this.lineDash&&e.setLineDash(this.lineDash),this.lineDashOffset&&(e.lineDashOffset=this.lineDashOffset),this.lineCap&&(e.lineCap=this.lineCap),this.lineJoin&&(e.lineJoin=this.lineJoin),null!=this.miterLimit&&(e.miterLimit=this.miterLimit),this.executeStroke(e,t),e.globalAlpha=i}}executeStroke(e,t){t?e.stroke(t):e.stroke()}containsPoint(e,t){return this.isPointInPath(e,t)}};vw.defaultStyles={fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0},uQ([c5({redraw:2})],vw.prototype,"fillOpacity",2),uQ([c5({redraw:2})],vw.prototype,"strokeOpacity",2),uQ([c5({redraw:2,changeCb:e=>e.onFillChange()})],vw.prototype,"fill",2),uQ([c5({redraw:2})],vw.prototype,"stroke",2),uQ([c5({redraw:2})],vw.prototype,"strokeWidth",2),uQ([c5({redraw:2})],vw.prototype,"lineDash",2),uQ([c5({redraw:2})],vw.prototype,"lineDashOffset",2),uQ([c5({redraw:2})],vw.prototype,"lineCap",2),uQ([c5({redraw:2})],vw.prototype,"lineJoin",2),uQ([c5({redraw:2})],vw.prototype,"miterLimit",2),uQ([c5({redraw:2,convertor:e=>c$(0,e,1)})],vw.prototype,"opacity",2),uQ([c5({redraw:2,checkDirtyOnAssignment:!0})],vw.prototype,"fillShadow",2);var vb=vw,vS=class extends vb{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(e){this.x1=e,this.x2=e}set y(e){this.y1=e,this.y2=e}get midPoint(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}}computeBBox(){return new c4(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(e,t){return(this.x1===this.x2||this.y1===this.y2)&&this.getBBox().clone().grow(this.strokeWidth/2).containsPoint(e,t)}distanceSquared(e,t){let{x1:i,y1:s,x2:r,y2:a}=this;return vc(e,t,i,s,r,a,1/0)}render(e){var t;let{ctx:i,forceRender:s,stats:r,devicePixelRatio:a}=e;if(0===this.dirty&&!s){r&&(r.nodesSkipped+=mW(this).count);return}let{x1:o,y1:n,x2:l,y2:h}=this;if(o===l){let{strokeWidth:e}=this,t=Math.round(o*a)/a+Math.trunc(e*a)%2/(2*a);o=t,l=t}else if(n===h){let{strokeWidth:e}=this,t=Math.round(n*a)/a+Math.trunc(e*a)%2/(2*a);n=t,h=t}i.beginPath(),i.moveTo(o,n),i.lineTo(l,h),this.fillStroke(i),null==(t=this.fillShadow)||t.markClean(),super.render(e)}toSVG(){var e;if(!this.visible)return;let t=document.createElementNS("http://www.w3.org/2000/svg","line");return t.setAttribute("x1",String(this.x1)),t.setAttribute("y1",String(this.y1)),t.setAttribute("x2",String(this.x2)),t.setAttribute("y2",String(this.y2)),t.setAttribute("stroke",null!=(e=this.stroke)?e:"none"),t.setAttribute("stroke-opacity",String(this.strokeOpacity)),t.setAttribute("stroke-width",String(this.strokeWidth)),{elements:[t]}}};vS.className="Line",vS.defaultStyles={...vb.defaultStyles,fill:void 0,strokeWidth:1},uQ([c5({redraw:3})],vS.prototype,"x1",2),uQ([c5({redraw:3})],vS.prototype,"y1",2),uQ([c5({redraw:3})],vS.prototype,"x2",2),uQ([c5({redraw:3})],vS.prototype,"y2",2);var vx=class{constructor(e=5){this.maxCacheSize=e,this.store=new Map}get(e){if(!this.store.has(e))return;let t=this.store.get(e);return this.store.delete(e),this.store.set(e,t),t}has(e){return this.store.has(e)}set(e,t){if(this.store.set(e,t),this.store.size>this.maxCacheSize){let e=this.store.keys(),t=this.store.size-this.maxCacheSize;
202for(;t>0;){let i=e.next();i.done||this.store.delete(i.value),t--}}return t}clear(){this.store.clear()}},vM=class{static measureText(e,t){return this.getMeasurer(t).measureText(e)}static measureLines(e,t){return this.getMeasurer(t).measureLines(e)}static getMeasurer(e){var t,i,s;let r="string"==typeof e.font?e.font:vE.toFontString(e.font),a=`${r}-${null!=(t=e.textAlign)?t:"start"}-${null!=(i=e.textBaseline)?i:"alphabetic"}`;return null!=(s=this.instanceMap.get(a))?s:this.createFontMeasurer(r,e,a)}static createFontMeasurer(e,t,i){var s,r;let a=function(e=0,t=0){let i=cG("canvas");return i.style.display="block",i.style.width=e+"px",i.style.height=t+"px",i.getContext("2d")}();a.font=e,a.textAlign=null!=(s=t.textAlign)?s:"start",a.textBaseline=null!=(r=t.textBaseline)?r:"alphabetic";let o=new vD(a,t);return this.instanceMap.set(i,o),o}};vM.instanceMap=new vx(10);var vD=class{constructor(e,t){var i;this.ctx=e,this.measureMap=new vx(100),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline),e.font="string"==typeof t.font?t.font:vE.toFontString(t.font),this.textMeasurer=new vI(e=>this.cachedCtxMeasureText(e),null!=(i=t.textBaseline)?i:"alphabetic")}textWidth(e,t){return this.textMeasurer.textWidth(e,t)}measureText(e){return this.textMeasurer.measureText(e)}measureLines(e){return this.textMeasurer.measureLines(e)}cachedCtxMeasureText(e){if(!this.measureMap.has(e)){let t=this.ctx.measureText(e);this.measureMap.set(e,{actualBoundingBoxAscent:t.actualBoundingBoxAscent,emHeightAscent:t.emHeightAscent,emHeightDescent:t.emHeightDescent,actualBoundingBoxDescent:t.actualBoundingBoxDescent,actualBoundingBoxLeft:t.actualBoundingBoxLeft,actualBoundingBoxRight:t.actualBoundingBoxRight,alphabeticBaseline:t.alphabeticBaseline,fontBoundingBoxAscent:t.fontBoundingBoxAscent,fontBoundingBoxDescent:t.fontBoundingBoxDescent,hangingBaseline:t.hangingBaseline,ideographicBaseline:t.ideographicBaseline,width:t.width})}return this.measureMap.get(e)}},vE=class{static toFontString({fontSize:e=10,fontStyle:t,fontWeight:i,fontFamily:s,lineHeight:r}){let a="";return t&&(a+=`${t} `),i&&(a+=`${i} `),a+=`${e}px`,r&&(a+=`/${r}px`),(a+=` ${s}`).trim()}static getLineHeight(e){return Math.ceil(e*this.defaultLineHeight)}static getVerticalModifier(e){switch(e){case"hanging":case"top":return 0;case"middle":return .5;default:return 1}}};vE.EllipsisChar="…",vE.defaultLineHeight=1.15,vE.lineSplitter=/\r?\n/g;var vI=class{constructor(e,t="alphabetic"){this.measureTextFn=e,this.textBaseline=t,this.charMap=new Map}getMetrics(e){let t=this.measureTextFn(e);return null!=t.fontBoundingBoxAscent||(t.fontBoundingBoxAscent=t.emHeightAscent),null!=t.fontBoundingBoxDescent||(t.fontBoundingBoxDescent=t.emHeightDescent),{width:t.width,height:t.actualBoundingBoxAscent+t.actualBoundingBoxDescent,lineHeight:t.fontBoundingBoxAscent+t.fontBoundingBoxDescent,offsetTop:t.actualBoundingBoxAscent,offsetLeft:t.actualBoundingBoxLeft}}getMultilineMetrics(e){let t=0,i=0,s=0,r=0,a=0,o=vE.getVerticalModifier(this.textBaseline),n=[],l=0,h=e.length;for(let o of e){let e=this.measureTextFn(o);null!=e.fontBoundingBoxAscent||(e.fontBoundingBoxAscent=e.emHeightAscent),null!=e.fontBoundingBoxDescent||(e.fontBoundingBoxDescent=e.emHeightDescent),t<e.width&&(t=e.width),r<e.actualBoundingBoxLeft&&(r=e.actualBoundingBoxLeft),0===l?(i+=e.actualBoundingBoxAscent,s+=e.actualBoundingBoxAscent):a+=e.fontBoundingBoxAscent,l===h-1?i+=e.actualBoundingBoxDescent:a+=e.fontBoundingBoxDescent,n.push({text:o,width:e.width,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,lineHeight:e.fontBoundingBoxAscent+e.fontBoundingBoxDescent,offsetTop:e.actualBoundingBoxAscent,offsetLeft:e.actualBoundingBoxLeft}),l++}return{width:t,height:i+=a,offsetTop:s+=a*o,offsetLeft:r,lineMetrics:n}}textWidth(e,t){var i;if(t){let t=0;for(let i=0;i<e.length;i++)t+=this.textWidth(e.charAt(i));return t}return e.length>1?this.measureTextFn(e).width:null!=(i=this.charMap.get(e))?i:this.charWidth(e)}measureText(e){return this.getMetrics(e)}measureLines(e){let t="string"==typeof e?e.split(vE.lineSplitter):e;return this.getMultilineMetrics(t)}charWidth(e){let{width:t}=this.measureTextFn(e);return this.charMap.set(e,t),t}},vA=class e extends vb{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=e.defaultStyles.textAlign,this.textBaseline=e.defaultStyles.textBaseline}onTextChange(){var e,t;this.lines=null!=(e=null==(t=this.text)?void 0:t.split(`
203`).map(e=>e.trim()))?e:[]}static computeBBox(e,t,i,s){let{offsetTop:r,offsetLeft:a,width:o,height:n}=vM.measureLines(e,s);return new c4(t-a,i-r,o,n)}computeBBox(){let{x:t,y:i,lines:s,textBaseline:r,textAlign:a}=this;return e.computeBBox(s,t,i,{font:this,textBaseline:r,textAlign:a})}isPointInPath(e,t){let i=this.getBBox();return!!i&&i.containsPoint(e,t)}render(e){let{ctx:t,forceRender:i,stats:s}=e;if(0===this.dirty&&!i||!this.lines.length||!this.layerManager){s&&(s.nodesSkipped+=mW(this).count);return}let{fill:r,stroke:a,strokeWidth:o}=this,{pixelRatio:n}=this.layerManager.canvas;if(t.font=vE.toFontString(this),t.textAlign=this.textAlign,t.textBaseline=this.textBaseline,r){this.applyFill(t),t.globalAlpha*=this.opacity*this.fillOpacity;let{fillShadow:e}=this;null!=e&&e.enabled&&(t.shadowColor=e.color,t.shadowOffsetX=e.xOffset*n,t.shadowOffsetY=e.yOffset*n,t.shadowBlur=e.blur*n),this.renderLines((e,i,s)=>t.fillText(e,i,s))}if(a&&o){t.strokeStyle=a,t.lineWidth=o,t.globalAlpha*=this.opacity*this.strokeOpacity;let{lineDash:e,lineDashOffset:i,lineCap:s,lineJoin:r}=this;e&&t.setLineDash(e),i&&(t.lineDashOffset=i),s&&(t.lineCap=s),r&&(t.lineJoin=r),this.renderLines((e,i,s)=>t.strokeText(e,i,s))}super.render(e)}renderLines(e){var t;let{lines:i,x:s,y:r}=this,a=null!=(t=this.lineHeight)?t:vE.getLineHeight(this.fontSize),o=(a-a*i.length)*vE.getVerticalModifier(this.textBaseline);for(let t of i)e(t,s,r+o),o+=a}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}toSVG(){var e,t,i,s,r,a,o;if(!this.visible||!this.text)return;let n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("font-family",null!=(e=null==(t=this.fontFamily)?void 0:t.split(",")[0])?e:""),n.setAttribute("font-size",String(this.fontSize)),n.setAttribute("font-style",null!=(i=this.fontStyle)?i:""),n.setAttribute("font-weight",String(null!=(s=this.fontWeight)?s:"")),n.setAttribute("text-anchor",{center:"middle",left:"start",right:"end",start:"start",end:"end"}[null!=(r=this.textAlign)?r:"start"]),n.setAttribute("alignment-baseline",{alphabetic:"alphabetic",top:"top",bottom:"bottom",hanging:"hanging",middle:"middle",ideographic:"ideographic"}[null!=(a=this.textBaseline)?a:"alphabetic"]),n.setAttribute("x",String(this.x)),n.setAttribute("y",String(this.y)),n.textContent=null!=(o=this.text)?o:"",{elements:[n]}}};vA.className="Text",vA.defaultStyles={...vb.defaultStyles,textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"},uQ([c5({redraw:3})],vA.prototype,"x",2),uQ([c5({redraw:3})],vA.prototype,"y",2),uQ([c5({redraw:3,changeCb:e=>e.onTextChange()})],vA.prototype,"text",2),uQ([c5()],vA.prototype,"fontStyle",2),uQ([c5()],vA.prototype,"fontWeight",2),uQ([c5()],vA.prototype,"fontSize",2),uQ([c5()],vA.prototype,"fontFamily",2),uQ([c5({redraw:3})],vA.prototype,"textAlign",2),uQ([c5({redraw:3})],vA.prototype,"textBaseline",2),uQ([c5({redraw:3})],vA.prototype,"lineHeight",2);var vR=vA,vT=class extends mq(vR){},vL=class extends mq(mX(vR)){};function vF(e,t,i,s,r){let a=e.x+e.width>t&&e.x<t+s,o=e.y+e.height>i&&e.y<i+r;return a&&o}var vP={top:{x:0,y:-1},bottom:{x:0,y:1}
203,left:{x:-1,y:0},right:{x:1,y:0},"top-left":{x:-1,y:-1},"top-right":{x:1,y:-1},"bottom-left":{x:-1,y:1},"bottom-right":{x:1,y:1}};function vk(e,t){return e.length===t.length&&e.every((e,i)=>Number(e)===Number(t[i]))}var vN="class-instance";function vO(e,t,i){if(pm(t)){if(!pm(e)||e.length!==t.length||t.some((t,i)=>null!=vO(e[i],t)))return t}else if(px(t)){if(!px(e))return t;let s={};for(let r of new Set([...Object.keys(e),...Object.keys(t)]))if(!(e[r]===t[r]||null!=i&&i.includes(r)))if(typeof e[r]==typeof t[r]){let i=vO(e[r],t[r]);null!==i&&(s[r]=i)}else s[r]=t[r];return Object.keys(s).length?s:null}else if(e!==t)return t;return null}function vG(e,t){return pm(e)?e.map(e=>vG(e,t)):px(e)?pO(e,(e,i)=>{var s;return null!=t&&null!=(s=t.shallow)&&s.includes(i)?vB(e):vG(e,t)}):e instanceof Map?new Map(vG(Array.from(e))):vB(e)}function vB(e){return pm(e)?[...e]:px(e)?{...e}:pf(e)?new Date(e):py(e)?new RegExp(e.source,e.flags):e}function vz(e,t,i,...s){if(pm(e))t(e,...s),e.forEach((e,r)=>{vz(e,t,i,...vH(s,r))});else if(px(e))for(let a of(t(e,...s),Object.keys(e))){var r;if(null!=i&&null!=(r=i.skip)&&r.includes(a))continue;let o=e[a];(pm(o)||px(o))&&vz(o,t,i,...vH(s,a))}}function vV(e,t,i={}){let{path:s,matcherPath:r=null==s?void 0:s.replace(/(\[[0-9+]+])/i,"[]"),skip:a=[]}=i;if(null==e)throw Error(`AG Charts - target is uninitialised: ${null!=s?s:"<root>"}`);if(null==t)return e;if(gx(e))return e.set(t);let o=vj(e);for(let n in t){if(pz.has(n))continue;let l=`${r?r+".":""}${n}`;if(a.includes(l))continue;let h=t[n],d=`${s?s+".":""}${n}`,u=e.constructor,c=e[n];try{let t=vj(c),s=vj(h);if(o===vN&&!(n in e)){u8.warn(`unable to set [${d}] in ${null==u?void 0:u.name} - property is unknown`);continue}if(null!=t&&null!=s&&s!==t&&(t!==vN||"object"!==s)){u8.warn(`unable to set [${d}] in ${null==u?void 0:u.name} - can't apply type of [${s}], allowed types are: [${t}]`);continue}gx(c)?e[n].set(h):"object"===s?(null==c&&(e[n]={}),vV(null!=c?c:e[n],h,{...i,path:d,matcherPath:l})):e[n]=h}catch(e){u8.warn(`unable to set [${d}] in [${null==u?void 0:u.name}]; nested error is: ${e.message}`)}}return e}function vH(e,t){return e.map(e=>null==e?void 0:e[t])}function vj(e){return null==e?null:pI(e)||pf(e)?"primitive":pm(e)?"array":pb(e)?px(e)?"object":vN:pw(e)?"function":"primitive"}function vW(e,t){let i=pm(e)?e:e.split(".");if(1===i.length){let[e]=i;return pd((t,i,s)=>t[e]=s,t=>t[e],t)}return pd((e,t,s)=>pV(e,i,s),e=>pB(e,i),t)}function vU(e){return pd((t,i,s)=>t[e]=s)}function v_(e,t){return pd((i,s,r)=>i[e][null!=t?t:s]=r)}function v$(e){let{newValue:t,oldValue:i,changeValue:s}=e;return pd((e,r,a,o)=>(a!==o&&(void 0!==o&&(null==i||i.call(e,o)),void 0!==a&&(null==t||t.call(e,a)),null==s||s.call(e,a,o)),a))}function vY(e){return(t,i)=>{ph(t,i).observers.push(e)}}var vK="color: green",vZ="color: grey",vq=class e{constructor(e,t,i){this.defaultState=e,this.states=t,this.enterEach=i,this.debug=m8.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,vK)}transition(t,i){var s,r,a,o,n;if(!this.transitionChild(t,i)||this.state===e.child||this.state===e.parent)return;let l=this.state,h=this.states[this.state],d=h[t],u=`%c${this.constructor.name} | ${this.state} -> ${t} ->`;if(Array.isArray(d))d=d.find(e=>{if(!e.guard)return!0;let t=e.guard(i);return t||this.debug(`${u} ${e.target} (guarded)`,vZ),t});else if("object"==typeof d&&!(d instanceof e)&&d.guard&&!d.guard(i))return void this.debug(`${u} ${d.target} (guarded)`,vZ);if(!d)return void this.debug(`${u} ${this.state}`,vZ);let c=this.getDestinationState(d),p=c===this.state?void 0:h.onExit;this.debug(`${u} ${c}`,vK),this.state=c,"function"==typeof d?d(i):"object"!=typeof d||d instanceof e||null==(r=(a=d).action)||r.call(a,i),null==p||p(),null==(s=this.enterEach)||s.call(this,l,c),c!==l&&c!==e.child&&c!==e.parent&&(null==(o=(n=this.states[c]).onEnter)||o.call(n,l,i))}transitionAsync(e,t){setTimeout(()=>{this.transition(e,t)},0)}is(t){return this.state===e.child&&this.childState?this.childState.is(t):this.state===t}resetHierarchy(){this.debug(`%c${this.constructor.name} | ${this.state} -> [resetHierarchy] -> ${this.defaultState}`,"color: green"),this.state=this.defaultState}transitionChild(t,i){var s,r;return this.state!==e.child||!this.childState||(this.childState.transition(t,i),!this.childState.is(e.parent)||(this.debug(`%c${this.constructor.name} | ${this.state} -> ${t} -> ${this.defaultState}`,vK),this.state=this.defaultState,null==(s=(r=this.states[this.state]).onEnter)||s.call(r),this.childState.resetHierarchy(),!1))}getDestinationState(t){let i=this.state;return"string"==typeof t?i=t:t instanceof e?(this.childState=t,i=e.child):"object"==typeof t&&(t.target instanceof e?(this.childState=t.target,i=e.child):null!=t.target&&(i=t.target)),i}};vq.child="__child",vq.parent="__parent";var vQ=class{static wrapText(e,t){return this.wrapLines(e,t).join(`
204`)}static wrapLines(e,t){let i=this.textWrap(e,t);return"hide"===t.overflow&&i.some(e=>
204e.endsWith(vE.EllipsisChar))?[]:i}static appendEllipsis(e){return e.replace(/[.,]{1,5}$/,"")+vE.EllipsisChar}static truncateLine(e,t,i,s){let r=t.textWidth(vE.EllipsisChar),a=0,o=0;for(;o<e.length;o++){let s=t.textWidth(e.charAt(o));if(a+s>i)break;a+=s}if(e.length===o&&(!s||a+r<=i))return s?e+vE.EllipsisChar:e;for(e=e.slice(0,o).trimEnd();e.length&&t.textWidth(e)+r>i;)e=e.slice(0,-1).trimEnd();return e+vE.EllipsisChar}static textWrap(e,t){let i=e.split(vE.lineSplitter),s=vM.getMeasurer(t);if("never"===t.textWrap)return i.map(e=>this.truncateLine(e.trimEnd(),s,t.maxWidth));let r=[],a="hyphenate"===t.textWrap,o=null==t.textWrap||"on-space"===t.textWrap;for(let e of i){if(""===(e=e.trimEnd())){r.push(e);continue}for(let i=0,n=0,l=0;i<e.length;i++){let h=e.charAt(i);if(n+=s.textWidth(h)," "===h&&(l=i),n>t.maxWidth){if(0===i)break;let h=s.textWidth(e.slice(0,i+1));if(h<=t.maxWidth){n=h;continue}if(l){let a=this.getWordAt(e,l+1),h=s.textWidth(a);if(h<=t.maxWidth){r.push(e.slice(0,l).trimEnd()),e=e.slice(l).trimStart(),i=-1,n=0,l=0;continue}o&&h>t.maxWidth&&r.push(e.slice(0,l).trimEnd(),this.truncateLine(e.slice(l).trimStart(),s,t.maxWidth,!0))}else o&&r.push(this.truncateLine(e,s,t.maxWidth,!0));if(o){e="";break}let d=a?"-":"",u=e.slice(0,i).trim();for(;u.length&&s.textWidth(u+d)>t.maxWidth;)u=u.slice(0,-1).trimEnd();if(r.push(u+d),!u.length){e="";break}e=e.slice(u.length).trimStart(),i=-1,n=0,l=0}}e&&r.push(e)}return this.avoidOrphans(r,s,t),this.clipLines(r,s,t)}static getWordAt(e,t){let i=e.indexOf(" ",t);return -1===i?e.slice(t):e.slice(t,i)}static clipLines(e,t,i){if(!i.maxHeight)return e;let{height:s,lineMetrics:r}=t.measureLines(e);if(s<=i.maxHeight)return e;for(let s=0,a=0;s<r.length;s++){let{lineHeight:o}=r[s];if((a+=o)>i.maxHeight){if("hide"===i.overflow)return[];let r=e.slice(0,s||1),a=r.pop();return r.concat(this.truncateLine(a,t,i.maxWidth,!0))}}return e}static avoidOrphans(e,t,i){if(!1===i.avoidOrphans||e.length<2)return;let{length:s}=e,r=e[s-1],a=e[s-2];if(a.length<r.length)return;let o=a.lastIndexOf(" ");if(-1===o||o===a.indexOf(" ")||r.includes(" "))return;let n=a.slice(o+1);t.textWidth(r+n)<=i.maxWidth&&(e[s-2]=a.slice(0,o),e[s-1]=n+" "+r)}},vX={isEnterprise:!1};function vJ(e,t,i){void 0===i||""===i?null==e||e.removeAttribute(t):null==e||e.setAttribute(t,i.toString())}function v0(e,t){let i;if(null!=t)for(i in t)"class"!==i&&vJ(e,i,t[i])}function v1(e,t,i){if(!(e instanceof HTMLElement))return;let s=e.getAttribute(t);if(null===s)return i;let r=typeof({})[t];return"boolean"===r?"true"===s:"number"===r?Number(s):"string"===r?s:void 0}function v2(e,t,i){null!=e&&(null==i?e.style.removeProperty(t):e.style.setProperty(t,i))}function v3(e,t,i,s){let{top:r,right:a,bottom:o,left:n,width:l,height:h}=s;return null!=n?null!=l?a=i.width-n+l:null!=a&&(l=i.width-n-a):null!=a&&null!=l&&(n=i.width-a-l),null!=r?null!=h?o=i.height-r-h:null!=o&&(h=i.height-o-r):null!=o&&null!=h&&(r=i.height-o-h),null==l?null==h?(l=e,h=t):l=Math.ceil(e*h/t):null==h&&(h=Math.ceil(t*l/e)),null==n&&(n=null==a?Math.floor((i.width-l)/2):i.width-a-l),null==r&&(r=null==o?Math.floor((i.height-h)/2):i.height-h-o),{x:n,y:r,width:l,height:h}}var v4="ag-chart-tooltip",v6="ag-chart-dark-tooltip",v5={html:"",ariaLabel:""};function v8(e,t){var i,s,r,a;let o;if("string"==typeof e)return{html:e,ariaLabel:e};let{content:n=null!=(i=null==t?void 0:t.content)?i:"",title:l=null==t?void 0:t.title,color:h=null!=(s=null==t?void 0:t.color)?s:"white",backgroundColor:d=null!=(r=null==t?void 0:t.backgroundColor)?r:"#888"}=e,u=l?`<div class="${v4}-title"
205        style="color: ${h}; background-color: ${d}">${l}</div>`:"",c=l?`${l}: `:"",p=n?`<div class="${v4}-content">${n}</div>`:"";return{html:`${u}${p}`,ariaLabel:(a=`${c}${n}`,o=(e,t,i)=>0===t||"."!==i[t-1]?". ":" ",a.replace(/<br\s*\/?>/g,o).replace(/<\/p\s+>/g,o).replace(/<\/li\s*>/g,o).replace(/<[^<>]+>/g,"").replace(/\n+/g," ").replace(/\s+/g," "))}}var v7=class extends gb{constructor(){super(...arguments),this.type="pointer",this.xOffset=0,this.yOffset=0}};uQ([gM(ma(["pointer","node","top","right","bottom","left","top-left","top-right","bottom-right","bottom-left",{value:"sparkline",undocumented:!0}],"a position type"))],v7.prototype,"type",2),uQ([gM(gF)],v7.prototype,"xOffset",2),uQ([gM(gF)],v7.prototype,"yOffset",2);var v9=class extends gb{constructor(){super(),this.enabled=!0,this.delay=0,this.range=void 0,this.wrapping="hyphenate",this.position=new v7,this.darkTheme=!1,this.bounds="extended",this.enableInteraction=!1,this.lastVisibilityChange=Date.now(),this.wrapTypes=["always","hyphenate","on-space","never"],this.showTimeout=0,this._showArrow=!0}get interactive(){return this.enableInteraction}setup(e){this.element=e.addChild("canvas-overlay",v4),this.element.classList.add(v4)}destroy(e){e.removeChild("canvas-overlay",v4)}isVisible(){var e;return!(null!=(e=this.element)&&e.classList.contains(v4+"-hidden"))}show(e,t,i,s,r=!1){var a,o,n,l,h,d,u,c;let{element:p}=this,g=null==p?void 0:p.getBoundingClientRect();if(null!=s&&null!=p)p.innerHTML=s.html;else if(!(null!=p&&p.innerHTML))return void this.toggle(!1);let m=null!=(a=null==(o=i.position)?void 0:o.type)?a:this.position.type,v=null!=(n=null==(l=i.position)?void 0:l.xOffset)?n:0,f=null!=(h=null==(d=i.position)?void 0:d.yOffset)?h:0,C=this.getTooltipBounds({positionType:m,meta:i,yOffset:f,xOffset:v,canvasRect:t}),y={x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height},w=v3(p.clientWidth,p.clientHeight,y,C),b=y.x,S=y.y,x=y.width-p.clientWidth-1+b,M=y.height-p.clientHeight+S,D=c$(b,w.x,x),E=c$(S,w.y,M),I=!1;if(null!=g){let e=y.width-g.width-1+b,t=y.height-g.height+S;I=e>x||t>M}let A=D!==w.x||E!==w.y,R=("node"===m||"pointer"===m||"sparkline"===m)&&!A&&!v&&!f,T=null!=(u=null!=(c=i.showArrow)?c:this.showArrow)?u:R;this.updateShowArrow(T),I&&(p.style.transition="none"),p.style.transform=`translate(${Math.round(D)}px, ${Math.round(E)}px)`,I&&(p.style.transition=""),i.enableInteraction?(this.enableInteraction=!0,p.style.pointerEvents="auto",vJ(p,"aria-hidden",void 0)):(this.enableInteraction=!1,p.style.pointerEvents="none",vJ(p,"aria-hidden",!0)),this.delay>0&&!r?(this.toggle(!1),this.showTimeout=setTimeout(()=>{this.toggle(!0)},this.delay)):this.toggle(!0)}toggle(e){if(!this.element)return;let{classList:t}=this.element,i=(e,i)=>t.toggle(`${v4}-${e}`,i),s=this.isVisible(),r=1/0;if(e||clearTimeout(this.showTimeout),s!==e){let e=Date.now();r=e-this.lastVisibilityChange,this.lastVisibilityChange=e}let a=!s&&e&&r>100;for(let s of(r>5&&i("no-animation",a),i("no-interaction",!this.enableInteraction),i("hidden",!e),i("arrow",this._showArrow),t.toggle(v6,this.darkTheme),this.wrapTypes))t.toggle(`${v4}-wrap-${s}`,s===this.wrapping)}updateShowArrow(e){this._showArrow=e}getTooltipBounds(e){if(!this.element)return{};let{positionType:t,meta:i,yOffset:s,xOffset:r,canvasRect:a}=e,{clientWidth:o,clientHeight:n}=this.element,l={width:o,height:n};switch(t){case"node":case"pointer":return l.top=i.offsetY+s-n-8,l.left=i.offsetX+r-o/2,l;case"top":return l.top=s,l.left=a.width/2-o/2+r,l;case"right":return l.top=a.height/2-n/2+s,l.left=a.width-o/2+r,l;case"left":return l.top=a.height/2-n/2+s,l.left=r,l;case"bottom":return l.top=a.height-n+s,l.left=a.width/2-o/2+r,l;case"top-left":return l.top=s,l.left=r,l;case"top-right":return l.top=s,l.left=a.width-o+r,l;case"bottom-right":return l.top=a.height-n+s,l.left=a.width-o+r,l;case"bottom-left":return l.top=a.height-n+s,l.left=r,l;case"sparkline":return vX.isEnterprise?l.top=s-n-8:l.top=i.offsetY+s-n-8,l.left=i.offsetX+r-o/2,l}}};uQ([gM(gR)],v9.prototype,"enabled",2),uQ([gM(gR,{optional:!0})],v9.prototype,"showArrow",2),uQ([vY((e,t,i)=>{var s,r;t&&(null==(s=e.element)||s.classList.add(t)),i&&(null==(r=e.element)||r.classList.remove(i))}),gM(gL,{optional:!0})],v9.prototype,"class",2),uQ([gM(gN)],v9.prototype,"delay",2),uQ([gM(ms,{optional:!0})],v9.prototype,"range",2),uQ([gM(g8)],v9.prototype,"wrapping",2),uQ([gM(gI)],v9.prototype,"position",2),uQ([gM(gR)],v9.prototype,"darkTheme",2),uQ([gM(ma(["extended","canvas"]))],v9.prototype,"bounds",2);var fe=class extends gb{constructor(){super(...arguments),this.id=cE(this),this.node=new vT({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.padding=0,this.layoutStyle="block",this.truncated=!1}registerInteraction(e,t){let{regionManager:i,proxyInteractionService:s,layoutManager:r}=e,a=i.getRegion("root");return function(...e){return()=>{for(let t of e)t()}}(r.addListener("layout:complete",()=>this.updateA11yText(s,t)),a.addListener("hover",t=>this.handleMouseMove(e,t)),a.addListener("leave",t=>this.handleMouseLeave(e,t)))}computeTextWrap(e,t){var i,s;let{text:r,padding:a,wrapping:o}=this,n=Math.min(null!=(i=this.maxWidth)?i:1/0,e)-2*a,l=null!=(s=this.maxHeight)?s:t-2*a;if(!isFinite(n)&&!isFinite(l)){this.node.text=r;return}let h=vQ.wrapText(null!=r?r:"",{maxWidth:n,maxHeight:l,font:this,textWrap:o});
205this.node.text=h,this.truncated=h.includes(vE.EllipsisChar)}updateA11yText(e,t){var i;if(this.enabled&&this.text){let i=mJ.toCanvas(this.node);if(i){let{id:s}=this;null!=this.proxyText||(this.proxyText=e.createProxyElement({type:"text",id:s,parent:t})),this.proxyText.textContent=this.text,this.proxyText.updateBounds(i)}}else null==(i=this.proxyText)||i.remove(),this.proxyText=void 0}handleMouseMove(e,t){if(void 0!==t&&this.enabled&&this.node.visible&&this.truncated){let{offsetX:i,offsetY:s}=t;e.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:s,lastPointerEvent:t,showArrow:!1},v8({content:this.text}))}}handleMouseLeave(e,t){e.tooltipManager.removeTooltip(this.id)}};fe.SMALL_PADDING=10,fe.LARGE_PADDING=20,uQ([gM(gR),v_("node","visible")],fe.prototype,"enabled",2),uQ([gM(gL,{optional:!0}),v_("node")],fe.prototype,"text",2),uQ([gM(g7,{optional:!0}),v_("node")],fe.prototype,"textAlign",2),uQ([gM(g6,{optional:!0}),v_("node")],fe.prototype,"fontStyle",2),uQ([gM(g5,{optional:!0}),v_("node")],fe.prototype,"fontWeight",2),uQ([gM(gN),v_("node")],fe.prototype,"fontSize",2),uQ([gM(gL),v_("node")],fe.prototype,"fontFamily",2),uQ([gM(gY,{optional:!0}),v_("node","fill")],fe.prototype,"color",2),uQ([gM(gN,{optional:!0})],fe.prototype,"spacing",2),uQ([gM(gN,{optional:!0})],fe.prototype,"maxWidth",2),uQ([gM(gN,{optional:!0})],fe.prototype,"maxHeight",2),uQ([gM(g8)],fe.prototype,"wrapping",2),uQ([gM(gN)],fe.prototype,"padding",2),uQ([gM(gL)],fe.prototype,"layoutStyle",2);var ft=class e extends m1{constructor(e){super(e),this.opts=e,this.lastBBox=void 0}static is(t){return t instanceof e}markDirty(e=1){super.markDirty(e,1)}preRender(){let e=super.preRender();if(e.nonGroups>0){var t,i;null!=this.layer||(this.layer=null==(t=this._layerManager)?void 0:t.addLayer({name:this.name,zIndex:this.zIndex,zIndexSubOrder:this.zIndexSubOrder,getComputedOpacity:()=>this.getComputedOpacity(),getVisibility:()=>this.getVisibility()})),null!=(i=this.opts)&&i.deriveZIndexFromChildren&&this.deriveZIndexFromChildren()}return e}debugSkip(e){super.debugSkip(e);let{stats:t}=e;t&&(t.layersSkipped++,t.nodesSkipped+=mW(this).count)}render(e){var t,i;if(!this.layer)return super.render(e);let{opts:{name:s}={},_debug:r,clipRect:a}=this,{isDirty:o,isChildDirty:n,isChildLayerDirty:l}=this.isDirty(e),{stats:h}=e,{forceRender:d,clipBBox:u}=e,c=this.getBBox();if(null!=(t=this.lastBBox)&&t.equals(c)||(d="dirtyTransform",this.lastBBox=c),!o&&!n&&!l&&!d){this.debugSkip(e),this.markClean({recursive:!1});return}"dirtyTransform"!==d&&(d=n||this.dirtyZIndex),d&&this.layer.clear(),this.dirtyZIndex&&this.sortChildren(m1.compareChildren);let p=this.sortedChildren(),g=e.ctx.getTransform(),{context:m}=this.layer;if(m.save(),u){let{width:t,height:i,x:a,y:o}=u;m.beginPath(),m.rect(a,o,t,i),m.clip(),null==r||r(()=>({name:s,clipBBox:u,renderCtx:e,group:this,ctxTransform:m.getTransform()}))}for(let t of(m.setTransform(g),this.clipRect&&(u=this.renderClip({...e,ctx:m})),this.renderChildren(p,{...e,ctx:m,forceRender:d,clipBBox:u}),super.render(e,!0),a&&m.restore(),this.virtualChildren()))t.markClean({recursive:"virtual"});h&&h.layersRendered++,m.restore(),null==(i=m.verifyDepthZero)||i.call(m),s&&h&&(null==r||r({name:s,renderCtx:e,result:"rendered",skipped:h.nodesSkipped,counts:mW(this),group:this}))}deriveZIndexFromChildren(){var e,t,i;let s;for(let e of this.children())e.childNodeCounts.nonGroups&&(!s||0>m1.compareChildren(s,e))&&(s=e);this.zIndex=null!=(e=null==(t=s)?void 0:t.zIndex)?e:-1/0,this.zIndexSubOrder=null==(i=s)?void 0:i.zIndexSubOrder}_setLayerManager(e){if(this.layer){var t;null==(t=this._layerManager)||t.removeLayer(this.layer),this.layer=void 0}super._setLayerManager(e)}getComputedOpacity(){let e=1;for(let t of this.traverseUp(!0))t instanceof m1&&(e*=t.opacity);return e}getVisibility(){for(let e of this.traverseUp(!0))if(!e.visible)return!1;return!0}onVisibleChange(){this.layer&&(this.layer.enabled=this.visible)}onZIndexChange(){if(super.onZIndexChange(),this.layer){var e;null==(e=this._layerManager)||e.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder)}}};ft.className="Layer";var fi=ft,fs=class extends mX(fi){},fr=class extends vb{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.isRange=!1,this.restoreOwnStyles()}computeBBox(){return new c4(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(e,t){return!1}render(e){var t;let{ctx:i,forceRender:s,stats:r}=e;if(0===this.dirty&&!s){r&&(r.nodesSkipped+=mW(this).count);return}let{x1:a,y1:o,x2:n,y2:l}=this;a=this.align(a),o=this.align(o),n=this.align(n),l=this.align(l);let{fill:h,opacity:d,isRange:u}=this;if(u&&h){let{fillOpacity:e}=this;this.applyFill(i),i.globalAlpha=d*e,i.beginPath(),i.moveTo(a,o),i.lineTo(n,o),i.lineTo(n,l),i.lineTo(a,l),i.closePath(),i.fill()}let{stroke:c,strokeWidth:p,startLine:g,endLine:m}=this;if((g||m)&&c&&p){let{strokeOpacity:e,lineDash:t,lineDashOffset:s,lineCap:r,lineJoin:h}=this;i.strokeStyle=c,i.globalAlpha=d*e,i.lineWidth=p,t&&i.setLineDash(t),s&&(i.lineDashOffset=s),r&&(i.lineCap=r),h&&(i.lineJoin=
205h),i.beginPath(),g&&(i.moveTo(a,o),i.lineTo(n,o)),m&&(i.moveTo(n,l),i.lineTo(a,l)),i.stroke()}null==(t=this.fillShadow)||t.markClean(),super.render(e)}};fr.className="Range",fr.defaultStyles={...vb.defaultStyles,strokeWidth:1},uQ([c5({redraw:2})],fr.prototype,"x1",2),uQ([c5({redraw:2})],fr.prototype,"y1",2),uQ([c5({redraw:2})],fr.prototype,"x2",2),uQ([c5({redraw:2})],fr.prototype,"y2",2),uQ([c5({redraw:2})],fr.prototype,"startLine",2),uQ([c5({redraw:2})],fr.prototype,"endLine",2),uQ([c5({redraw:2})],fr.prototype,"isRange",2);var fa=class extends gb{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return vE.toFontString(this)}};function fo(e){let{parallelFlipRotation:t=0,regularFlipRotation:i=0}=e,s=e.rotation?ve(vr(e.rotation)):0,r=!s&&t>=0&&t<=Math.PI?-1:1,a=!s&&i>=0&&i<=Math.PI?-1:1,o=0;return e.parallel?o=r*Math.PI/2:-1===a&&(o=Math.PI),{configuredRotation:s,defaultRotation:o,parallelFlipFlag:r,regularFlipFlag:a}}function fn(e,t,i,s,r){let a=t>0&&t<=Math.PI,o=i>0&&i<=Math.PI;if(e){if(!t&&!i)return"center";else if(s*(a||o?-1:1)==-1)return"end"}else if(s*r==-1)return"end";return"start"}uQ([gM(gR)],fa.prototype,"enabled",2),uQ([gM(gY,{optional:!0})],fa.prototype,"color",2),uQ([gM(g6,{optional:!0})],fa.prototype,"fontStyle",2),uQ([gM(g5,{optional:!0})],fa.prototype,"fontWeight",2),uQ([gM(gN)],fa.prototype,"fontSize",2),uQ([gM(gL)],fa.prototype,"fontFamily",2),uQ([gM(gT,{optional:!0})],fa.prototype,"formatter",2);var fl=((R=fl||{})[R.SERIES_BACKGROUND=0]="SERIES_BACKGROUND",R[R.AXIS_GRID=1]="AXIS_GRID",R[R.AXIS=2]="AXIS",R[R.SERIES_CROSSLINE_RANGE=3]="SERIES_CROSSLINE_RANGE",R[R.SERIES_LAYER=4]="SERIES_LAYER",R[R.SERIES_HIGHLIGHT=5]="SERIES_HIGHLIGHT",R[R.AXIS_FOREGROUND=6]="AXIS_FOREGROUND",R[R.SERIES_CROSSHAIR=7]="SERIES_CROSSHAIR",R[R.CHART_OVERLAY=8]="CHART_OVERLAY",R[R.SERIES_CROSSLINE_LINE=9]="SERIES_CROSSLINE_LINE",R[R.SERIES_ANNOTATION=10]="SERIES_ANNOTATION",R[R.CHART_ANNOTATION=11]="CHART_ANNOTATION",R[R.CHART_ANNOTATION_FOCUSED=12]="CHART_ANNOTATION_FOCUSED",R[R.STATUS_BAR=13]="STATUS_BAR",R[R.SERIES_LABEL=14]="SERIES_LABEL",R[R.LEGEND=15]="LEGEND",R[R.NAVIGATOR=16]="NAVIGATOR",R[R.FOREGROUND=17]="FOREGROUND",R);function fh(e){return null!=e&&Object.hasOwn(e,"toString")&&pM(e.toString())}function fd(e){return null!=e&&Object.hasOwn(e,"valueOf")&&pE(e.valueOf())}function fu(e){return pE(e)||pC(e)||fd(e)}function fc(e,t){return null!=e&&(!t||fu(e))}function fp(e){return fh(e)&&Object.hasOwn(e,"id")?e.id:e}var fg=e=>"value"===e?ml((e,t)=>"line"===t.target.type,e=>"range"===e.target.type?"crossLine type 'range' to have a 'range' property instead of 'value'":"crossLine property 'type' to be 'line'"):ml((e,t)=>"range"===t.target.type,e=>"line"===e.target.type?"crossLine type 'line' to have a 'value' property instead of 'range'":"crossLine property 'type' to be 'range'"),fm=(e,t,i,s,r)=>{let a="line"===e&&void 0!==t,o="range"===e&&void 0!==i;if(!a&&!o)return!0;let[n,l]=null!=i?i:[t,void 0],h=p8.is(s)||mz.is(s),d=fc(n,h)&&!isNaN(s.convert(n)),u=fc(l,h)&&!isNaN(s.convert(l));if(a&&d||o&&d&&u){var c;return null==(c=null==r?void 0:r())||c}let p=["Expecting crossLine"];return o?(d||p.push(`range start ${mu(n)}`),u||p.push(`${d?"":"and "}range end ${mu(l)}`)):p.push(`value ${mu(n)}`),p.push("to match the axis scale domain."),u8.warnOnce(p.join(" ")),!1},fv={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},topLeft:{xTranslationDirection:1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:-1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:1},bottomRight:{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:1,yTranslationDirection:0},insideRight:{xTranslationDirection:-1,yTranslationDirection:0},insideTop:{xTranslationDirection:0,yTranslationDirection:1},insideBottom:{xTranslationDirection:0,yTranslationDirection:-1},insideTopLeft:{xTranslationDirection:1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomRight:{xTranslationDirection:-1,yTranslationDirection:-1}},ff={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0}
205,left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},topLeft:{xTranslationDirection:-1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},bottomRight:{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:0,yTranslationDirection:1},insideRight:{xTranslationDirection:0,yTranslationDirection:-1},insideTop:{xTranslationDirection:-1,yTranslationDirection:0},insideBottom:{xTranslationDirection:1,yTranslationDirection:0},insideTopLeft:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:-1},insideBottomRight:{xTranslationDirection:1,yTranslationDirection:-1}};function fC({yDirection:e,padding:t=0,position:i="top",bbox:s}){let{xTranslationDirection:r,yTranslationDirection:a}=(e?fv:ff)[i];return{xTranslation:r*(t+s.width/2),yTranslation:a*(t+s.height/2)}}function fy({yDirection:e,bbox:t,padding:i=0,position:s="top"}){let r={};return s.startsWith("inside")||("top"!==s||e?"bottom"!==s||e?"left"===s&&e?r.left=i+t.width:"right"===s&&e&&(r.right=i+t.width):r.bottom=i+t.height:r.top=i+t.height),r}var fw=({direction:e,xEnd:t,yStart:i,yEnd:s})=>"y"===e?{x:t/2,y:i}:{x:t,y:isNaN(s)?i:(i+s)/2},fb=({direction:e,xStart:t,xEnd:i,yStart:s,yEnd:r})=>"y"===e?{x:t,y:isNaN(r)?s:(s+r)/2}:{x:i/2,y:s},fS=({direction:e,xEnd:t,yStart:i,yEnd:s})=>"y"===e?{x:t,y:isNaN(s)?i:(i+s)/2}:{x:t/2,y:isNaN(s)?i:s},fx=({direction:e,xStart:t,xEnd:i,yStart:s,yEnd:r})=>"y"===e?{x:i/2,y:isNaN(r)?s:r}:{x:t,y:isNaN(r)?s:(s+r)/2},fM=({direction:e,xStart:t,xEnd:i,yStart:s})=>"y"===e?{x:t/2,y:s}:{x:i,y:s},fD=({direction:e,xStart:t,yStart:i,yEnd:s})=>"y"===e?{x:t,y:isNaN(s)?i:s}:{x:t,y:i},fE=({direction:e,xEnd:t,yStart:i,yEnd:s})=>"y"===e?{x:t,y:i}:{x:t,y:isNaN(s)?i:s},fI=({direction:e,xStart:t,xEnd:i,yStart:s,yEnd:r})=>"y"===e?{x:i,y:isNaN(r)?s:r}:{x:t,y:isNaN(r)?s:r},fA={top:{c:fw},bottom:{c:fx},left:{c:fb},right:{c:fS},topLeft:{c:fM},topRight:{c:fE},bottomLeft:{c:fD},bottomRight:{c:fI},inside:{c:({xEnd:e,yStart:t,yEnd:i})=>({x:e/2,y:isNaN(i)?t:(t+i)/2})},insideLeft:{c:fb},insideRight:{c:fS},insideTop:{c:fw},insideBottom:{c:fx},insideTopLeft:{c:fM},insideBottomLeft:{c:fD},insideTopRight:{c:fE},insideBottomRight:{c:fI}},fR=ma(["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],"crossLine label position"),fT=class extends gb{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};uQ([gM(gR,{optional:!0})],fT.prototype,"enabled",2),uQ([gM(gL,{optional:!0})],fT.prototype,"text",2),uQ([gM(g6,{optional:!0})],fT.prototype,"fontStyle",2),uQ([gM(g5,{optional:!0})],fT.prototype,"fontWeight",2),uQ([gM(gN)],fT.prototype,"fontSize",2),uQ([gM(gL)],fT.prototype,"fontFamily",2),uQ([gM(gF)],fT.prototype,"padding",2),uQ([gM(gY,{optional:!0})],fT.prototype,"color",2),uQ([gM(fR,{optional:!0})],fT.prototype,"position",2),uQ([gM(gG,{optional:!0})],fT.prototype,"rotation",2),uQ([gM(gR,{optional:!0})],fT.prototype,"parallel",2);var fL=class e extends gb{constructor(){super(),this.id=cE(this),this.label=new fT,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction="x",this.group=new fi({name:this.id,zIndex:e.LINE_LAYER_ZINDEX}),this.labelGroup=new fi({name:this.id,zIndex:e.LABEL_LAYER_ZINDEX}),this.crossLineRange=new fr,this.crossLineLabel=new vL,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1,this.group.append(this.crossLineRange),this.labelGroup.append(this.crossLineLabel),this.crossLineRange.pointerEvents=1}update(e){let{enabled:t,data:i,type:s,value:r,range:a,scale:o}=this;if(!s||!o||!t||!e||!fm(s,r,a,o)||0===i.length){this.group.visible=!1,this.labelGroup.visible=!1;return}this.group.visible=e,this.labelGroup.visible=e,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()}calculateLayout(e,t){var i,s,r;if(!e)return;let{scale:a,gridLength:o,sideFlag:n,direction:l,label:{position:h="top"},clippedRange:d,strokeWidth:u=0}=this;if(this.data=[],!a)return;let c=null!=(i=a.bandwidth)?i:0,p=null!=(s=a.step)?s:0,g=(t?-1:1)*(a instanceof gw?(p-c)/2:0),[m,v]=[0,n*o],[f,C]=this.getRange(),y=void 0===C&&mz.is(a)?c/2+g:0,[w,b]=[Number(a.convert(f,{clampMode:"clamped"}))-g+y,a.convert(C,{clampMode:"clamped"})+c+g];w=cY(w,d),b=cY(b,d),[f,C]=[Number(a.convert(f))+y,a.convert(C)+c];let S=(f===w||C===b||w!==b)&&Math.abs(b-w)>0;if(S&&w>b&&([w,b]=[b,w],[f,C]=[C,f]),f-g>=w&&(f-=g),C+g<=b&&(C+=g),this.isRange=S,this.startLine=u>0&&f>=w&&f<=w+g,this.endLine=u>0&&C>=b-c-g&&C<=b,!S&&!this.startLine&&!this.endLine||(this.data=[w,b],!this.label.enabled))return;let{c:x=fw}
205=null!=(r=fA[h])?r:{},{x:M,y:D}=x({direction:l,xStart:m,xEnd:v,yStart:w,yEnd:b});this.labelPoint={x:M,y:D}}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}updateRangeNode(){var e;let{crossLineRange:t,sideFlag:i,gridLength:s,data:r,startLine:a,endLine:o,isRange:n,fill:l,fillOpacity:h,stroke:d,strokeWidth:u,lineDash:c}=this;t.x1=0,t.x2=i*s,t.y1=r[0],t.y2=r[1],t.startLine=a,t.endLine=o,t.isRange=n,t.fill=l,t.fillOpacity=null!=h?h:1,t.stroke=d,t.strokeWidth=null!=u?u:1,t.strokeOpacity=null!=(e=this.strokeOpacity)?e:1,t.lineDash=c}updateLabel(){let{crossLineLabel:e,label:t}=this;t.text&&(e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.color,e.text=t.text)}positionLabel(){let{crossLineLabel:e,labelPoint:{x:t,y:i}={},label:{parallel:s,rotation:r,position:a="top",padding:o=0},direction:n,parallelFlipRotation:l,regularFlipRotation:h}=this;if(void 0===t||void 0===i)return;let{defaultRotation:d,configuredRotation:u}=fo({rotation:r,parallel:s,regularFlipRotation:h,parallelFlipRotation:l});e.rotation=d+u,e.textBaseline="middle",e.textAlign="center";let c=e.getBBox();if(!c)return;let{xTranslation:p,yTranslation:g}=fC({yDirection:"y"===n,padding:o,position:a,bbox:c});e.translationX=t+p,e.translationY=i+g}getZIndex(t=!1){return t?e.RANGE_LAYER_ZINDEX:e.LINE_LAYER_ZINDEX}getRange(){var e;let{value:t,range:i,scale:s}=this,r=p8.is(s)||mz.is(s),a=null!=(e=null==i?void 0:i[0])?e:t,o=null==i?void 0:i[1];return r||void 0!==o||(o=a),r&&a===o&&(o=void 0),[a,o]}computeLabelBBox(){let{label:e}=this;if(!e.enabled)return;let t=new vL;t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=e.text;let{labelPoint:{x:i,y:s}={},label:{parallel:r,rotation:a,position:o="top",padding:n=0},direction:l,parallelFlipRotation:h,regularFlipRotation:d}=this;if(void 0===i||void 0===s)return;let{configuredRotation:u}=fo({rotation:a,parallel:r,regularFlipRotation:d,parallelFlipRotation:h});t.rotation=u,t.textBaseline="middle",t.textAlign="center";let c=t.getBBox();if(!c)return;let{xTranslation:p,yTranslation:g}=fC({yDirection:"y"===l,padding:n,position:o,bbox:c});return t.x=i+p,t.y=s+g,t.getBBox()}calculatePadding(e){var t,i,s,r,a,o,n,l;let{isRange:h,startLine:d,endLine:u,direction:c,label:{padding:p=0,position:g="top"}}=this;if(!h&&!d&&!u)return;let m=this.computeLabelBBox();if((null==m?void 0:m.x)==null||(null==m?void 0:m.y)==null)return;let v=fy({yDirection:"y"===c,padding:p,position:g,bbox:m});e.left=Math.max(null!=(t=e.left)?t:0,null!=(i=v.left)?i:0),e.right=Math.max(null!=(s=e.right)?s:0,null!=(r=v.right)?r:0),e.top=Math.max(null!=(a=e.top)?a:0,null!=(o=v.top)?o:0),e.bottom=Math.max(null!=(n=e.bottom)?n:0,null!=(l=v.bottom)?l:0)}};fL.LINE_LAYER_ZINDEX=9,fL.RANGE_LAYER_ZINDEX=3,fL.LABEL_LAYER_ZINDEX=14,fL.className="CrossLine",uQ([gM(gR,{optional:!0})],fL.prototype,"enabled",2),uQ([gM(ma(["range","line"],"a crossLine type"),{optional:!0})],fL.prototype,"type",2),uQ([gM(gD(fg("range"),gz.restrict({length:2})),{optional:!0})],fL.prototype,"range",2),uQ([gM(fg("value"),{optional:!0})],fL.prototype,"value",2),uQ([gM(gY,{optional:!0})],fL.prototype,"fill",2),uQ([gM(gO,{optional:!0})],fL.prototype,"fillOpacity",2),uQ([gM(gY,{optional:!0})],fL.prototype,"stroke",2),uQ([gM(gF,{optional:!0})],fL.prototype,"strokeWidth",2),uQ([gM(gO,{optional:!0})],fL.prototype,"strokeOpacity",2),uQ([gM(g3,{optional:!0})],fL.prototype,"lineDash",2),uQ([gM(gI)],fL.prototype,"label",2);var fF=["stroke","lineDash"],fP=gV(e=>pb(e)&&Object.keys(e).every(e=>fF.includes(e)),"objects with gridline style properties such as 'stroke' or 'lineDash'"),fk=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}};function fN(e,t=[void 0]){return pd((i,s,r)=>t.includes(r)?pw(e)?e(r):e:r)}uQ([gM(gR)],fk.prototype,"enabled",2),uQ([gM(gN)],fk.prototype,"width",2),uQ([gM(fP)
205],fk.prototype,"style",2);var fO=ml(e=>pE(e)&&e>0||e instanceof u7,"a non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),fG=class extends gb{constructor(){super(...arguments),this.minSpacing=0/0,this.maxSpacing=0/0}};uQ([gM(fO,{optional:!0})],fG.prototype,"step",2),uQ([gM(gz,{optional:!0})],fG.prototype,"values",2),uQ([gM(mo),fN(0/0)],fG.prototype,"minSpacing",2),uQ([gM(mn),fN(0/0)],fG.prototype,"maxSpacing",2);var fB=class extends gb{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=0/0,this.color="#575757",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1}getSideFlag(){return this.mirrored?1:-1}};uQ([gM(gR)],fB.prototype,"enabled",2),uQ([gM(g6,{optional:!0})],fB.prototype,"fontStyle",2),uQ([gM(g5,{optional:!0})],fB.prototype,"fontWeight",2),uQ([gM(gF.restrict({min:1}))],fB.prototype,"fontSize",2),uQ([gM(gL)],fB.prototype,"fontFamily",2),uQ([gM(gN)],fB.prototype,"padding",2),uQ([gM(gB),fN(0/0)],fB.prototype,"minSpacing",2),uQ([gM(gY,{optional:!0})],fB.prototype,"color",2),uQ([gM(gG,{optional:!0})],fB.prototype,"rotation",2),uQ([gM(gR)],fB.prototype,"avoidCollisions",2),uQ([gM(gR)],fB.prototype,"mirrored",2),uQ([gM(gR)],fB.prototype,"parallel",2),uQ([gM(gT,{optional:!0})],fB.prototype,"formatter",2),uQ([gM(gL,{optional:!0})],fB.prototype,"format",2);var fz=class{constructor(){this.enabled=!0,this.width=1,this.stroke=void 0}};uQ([gM(gR)],fz.prototype,"enabled",2),uQ([gM(gN)],fz.prototype,"width",2),uQ([gM(gY,{optional:!0})],fz.prototype,"stroke",2);var fV=class extends gb{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6}};uQ([gM(gR)],fV.prototype,"enabled",2),uQ([gM(gN)],fV.prototype,"width",2),uQ([gM(gN)],fV.prototype,"size",2),uQ([gM(gY,{optional:!0})],fV.prototype,"stroke",2);var fH=class extends gb{constructor(){super(...arguments),this.caption=new fe,this.enabled=!1,this.spacing=fe.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}};function fj(e){let[t,i]=cK(e.range),s=Math.floor(t),r=Math.ceil(i);return{min:s,max:r,visible:s!==r}}uQ([gM(gR)],fH.prototype,"enabled",2),uQ([gM(gL,{optional:!0})],fH.prototype,"text",2),uQ([gM(gN,{optional:!0})],fH.prototype,"spacing",2),uQ([gM(g6,{optional:!0})],fH.prototype,"fontStyle",2),uQ([gM(g5,{optional:!0})],fH.prototype,"fontWeight",2),uQ([gM(gN)],fH.prototype,"fontSize",2),uQ([gM(gL)],fH.prototype,"fontFamily",2),uQ([gM(gY,{optional:!0})],fH.prototype,"color",2),uQ([gM(g8)],fH.prototype,"wrapping",2),uQ([gM(gT,{optional:!0})],fH.prototype,"formatter",2);var fW=2*Math.PI,fU=fW/2;function f_(e){let t=(t,i)=>{let[s=e.min,r=e.max]=cK(null!=i?i:[]);return t<s||t>r};return{tick:{fromFn(e,i,s){let r=e.y1+e.translationY,a=e.opacity;return("added"===s||t(e.datum.translationY,e.datum.range))&&(r=i.translationY,a=0),{y:0,translationY:r,opacity:a,phase:p2[s]}},toFn(e,t,i){let s=t.translationY,r=1;return"removed"===i&&(r=0),{y:0,translationY:s,opacity:r,finish:{y:s,translationY:0}}},applyFn(e,i){e.setProperties(i),e.visible=!t(e.y)}},line:{fromFn(e,t){var i;return{...null!=(i=e.previousDatum)?i:t,phase:p2.updated}},toFn:(e,t)=>({...t})},label:{fromFn(e,i,s){var r;let a=null!=(r=e.previousDatum)?r:i,o=a.x,n=a.y,l=a.rotationCenterX,h=Math.round(e.translationY),d=a.rotation,u=e.opacity;return"removed"===s||t(a.y,a.range)?d=i.rotation:("added"===s||t(e.datum.y,e.datum.range))&&(h=Math.round(a.translationY),u=0,d=i.rotation),{x:o,y:n,rotationCenterX:l,translationY:h,rotation:d,opacity:u,phase:p2[s]}},toFn(e,t,i){let s=t.x,r=t.y,a=t.rotationCenterX,o=Math.round(t.translationY),n=0,l=1;if("added"===i)l=1,n=t.rotation;else if("removed"===i)l=0,n=t.rotation;else{var h,d,u,c;u=null!=(h=null==(d=e.previousDatum)?void 0:d.rotation)?h:t.rotation,n=Math.abs((c=t.rotation)-u)<fU?c:u>c?c+fW:c-fW}return{x:s,y:r,rotationCenterX:a,translationY:o,rotation:n,opacity:l,finish:{rotation:t.rotation}}}},group:{fromFn(e,t){let{rotation:i,translationX:s,translationY:r}=e;return{rotation:i,translationX:s,translationY:r,phase:p2.updated}},toFn(e,t){let{rotation:i,translationX:s,translationY:r}=t;return{rotation:i,translationX:s,translationY:r}}}}}function f$(){return(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})}function fY(e){let{visible:t,min:i,max:s}=e;return(e,r)=>{let a=r.translationY;return{y:a,translationY:0,opacity:1,visible:t&&a>=i&&a<=s}}}function fK(){return(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})}function fZ(){return(e,t)=>({...t})}var fq=class extends mX(vS){},fQ=class e{constructor(t,i){let s;this.moduleCtx=t,this.scale=i,this.id=cE(this),this.nice=!0,this.reverse=!1,this.keys=[],this.interval=new fG,this.dataDomain={domain:[],clipped:!1},this.layoutConstraints={stacked:!0,align:"start",width:100,unit:"percent"},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new m6({name:`${this.id}-axis`,zIndex:2}),this.lineNode=this.axisGroup.appendChild(new fq({name:`${this.id}-Axis-line`})),this.tickLineGroup=this.axisGroup.appendChild(new m1({name:`${this.id}-Axis-tick-lines`,zIndex:2})),this.tickLabelGroup=this.axisGroup.appendChild(new m1({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.crossLineGroup=new m6({name:`${this.id}-CrossLines`}),this.labelGroup=new m1({name:`${this.id}-Labels`,zIndex:10}),this.gridGroup=new m6({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new m1({name:`${this.id}-gridLines`,zIndex:1})),this.tickLineGroupSelection=m7.select(this.tickLineGroup,fq,!1),this.tickLabelGroupSelection=m7.select(this.tickLabelGroup,vL,!1),this.gridLineGroupSelection=m7.select(this.gridLineGroup,fq,!1),this._crossLines=[],this.line=new fz,this.tick=new fV,this.gridLine=new fk,this.label=this.createLabel(),this.defaultTickMinSpacing=e.defaultTickMinSpacing,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,padding:this.label.padding,format:this.label.format}},this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=new fH,this.gridLength=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.moduleMap=new mp,this.range=this.scale.range.slice(),this.crossLines.forEac
205h(e=>this.initCrossLine(e)),this.axisGroup.appendChild(this.title.caption.node),this.animationManager=t.animationManager,this.animationState=new vq("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:e=>this.animateReadyUpdate(e),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this.destroyFns.push(this.title.caption.registerInteraction(this.moduleCtx,"afterend"),t.layoutManager.addListener("layout:complete",e=>{null!=s&&null!=vO(e.chart,s)&&this.animationState.transition("resize"),s={...e.chart}}))}get type(){var e;return null!=(e=this.constructor.type)?e:""}set crossLines(e){let{CrossLineConstructor:t}=this.constructor;this._crossLines.forEach(e=>this.detachCrossLine(e)),this._crossLines=e.map(e=>{let i=new t;return i.set(e),i}),this._crossLines.forEach(e=>{this.attachCrossLine(e),this.initCrossLine(e)})}get crossLines(){return this._crossLines}resetAnimation(e){"initial"===e&&this.animationState.transition("reset")}attachCrossLine(e){this.crossLineGroup.appendChild(e.group),this.crossLineGroup.appendChild(e.labelGroup)}detachCrossLine(e){this.crossLineGroup.removeChild(e.group),this.crossLineGroup.removeChild(e.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach(e=>e())}updateRange(){var e;let{range:t,visibleRange:i,scale:s}=this,r=(t[1]-t[0])/(i[1]-i[0]),a=r*i[0],o=t[0]-a;null==(e=s.setVisibleRange)||e.call(s,i),s.range=[o,o+r],this.crossLines.forEach(e=>{e.clippedRange=[t[0],t[1]]})}setCrossLinesVisible(e){this.crossLineGroup.visible=e}attachAxis(e,t){t.appendChild(this.gridGroup),e.appendChild(this.axisGroup),e.appendChild(this.crossLineGroup),e.appendChild(this.labelGroup)}attachLabel(e){this.labelGroup.append(e)}detachAxis(e,t){t.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup),e.removeChild(this.labelGroup)}inRange(e,t=0){let[i,s]=cK(this.range);return e>=i-t&&e<=s+t}onFormatChange(e,t,i,s){let{scale:r}=this,a=r instanceof mO,o=e=>a?String:i=>"number"==typeof i?i.toFixed(t+e):String(i);if(s&&r&&r.tickFormat)try{let t=r.tickFormat({ticks:e,specifier:s});this.labelFormatter=t,this.datumFormatter=t}catch(e){this.labelFormatter=o(0),this.datumFormatter=o(1),u8.warnOnce(`the axis label format string ${s}
205 is invalid. No formatting will be applied`)}else this.labelFormatter=o(0),this.datumFormatter=o(1)}onGridLengthChange(e,t){t^e&&this.onGridVisibilityChange(),this.crossLines.forEach(e=>this.initCrossLine(e))}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}createLabel(){return new fB}update(e=!0){if(!this.tickGenerationResult)return;let{rotation:t,parallelFlipRotation:i,regularFlipRotation:s}=this.calculateRotations(),r=this.label.getSideFlag();this.updatePosition();let a=this.getAxisLineCoordinates(),{tickData:o,combinedRotation:n,textBaseline:l,textAlign:h,primaryTickCount:d}=this.tickGenerationResult,u=this.tickLabelGroupSelection.nodes().map(e=>e.datum.tickId);if(this.updateSelections(a,o.ticks,{combinedRotation:n,textAlign:h,textBaseline:l,range:this.scale.range}),!e||this.animationManager.isSkipped())this.resetSelectionNodes();else{let e=this.calculateUpdateDiff(u,o);this.animationState.transition("update",e)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(r),this.updateTickLines(),this.updateTitle({anyTickVisible:o.ticks.length>0}),this.updateCrossLines({rotation:t,parallelFlipRotation:i,regularFlipRotation:s}),this.updateLayoutState(o.fractionDigits),d}getAxisLineCoordinates(){let[e,t]=cK(this.range);return{x:0,y1:e,y2:t}}getTickLineCoordinates(e){let t=this.label.getSideFlag()*this.getTickSize(),i=Math.min(0,t),s=i+Math.abs(t);return{x1:i,x2:s,y:e.translationY}}getTickLabelProps(e,t){let{label:i}=this,{combinedRotation:s,textBaseline:r,textAlign:a,range:o}=t,n=e.tickLabel,l=i.getSideFlag()*(this.getTickSize()+i.padding+this.seriesAreaPadding);return{tickId:e.tickId,translationY:e.translationY,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,rotation:s,rotationCenterX:l,text:n,textAlign:a,textBaseline:r,visible:""!==n&&null!=n,x:l,y:0,range:o}}getTickSize(){return this.tick.enabled?this.tick.size:6}setTitleProps(e,t){var i;let{title:s}=this;if(!s.enabled){e.enabled=!1,e.node.visible=!1;return}e.color=s.color,e.fontFamily=s.fontFamily,e.fontSize=s.fontSize,e.fontStyle=s.fontStyle,e.fontWeight=s.fontWeight,e.enabled=s.enabled,e.wrapping=s.wrapping;let r=e.node,a=(null!=(i=s.spacing)?i:0)+t.spacing,o=this.label.getSideFlag(),n=ve(this.rotation),l=-1===o&&n>Math.PI&&n<2*Math.PI?-1:1,h=l*o*Math.PI/2,{range:d}=this,u=Math.floor(l*o*(d[0]+d[1])/2),c=-1===o?Math.floor(-(l*a)):Math.floor(-a),{callbackCache:p}=this.moduleCtx,{formatter:g=e=>e.defaultValue}=s,m=p.call(g,this.getTitleFormatterParams());e.text=m,r.setProperties({visible:!0,text:m,textBaseline:1===l?"bottom":"top",x:u,y:c,rotation:h})}calculateLayout(e,t){var i;let{rotation:s,parallelFlipRotation:r,regularFlipRotation:a}=this.calculateRotations(),o=this.label.getSideFlag(),n=o*(this.getTickSize()+this.label.padding+this.seriesAreaPadding);this.updateScale(e),this.tickGenerationResult=this.generateTicks({primaryTickCount:t,parallelFlipRotation:r,regularFlipRotation:a,labelX:n,sideFlag:o});let{tickData:l,combinedRotation:h,textBaseline:d,textAlign:u,...c}=this.tickGenerationResult;this.updateLayoutState(l.fractionDigits);let p=[],{x:g,y1:m,y2:v}=this.getAxisLineCoordinates(),f=new c4(g+Math.min(o*this.seriesAreaPadding,0),m,this.seriesAreaPadding,v-m);if(p.push(f),this.tick.enabled&&l.ticks.forEach(e=>{let{x1:t,x2:i,y:s}=this.getTickLineCoordinates(e),r=new c4(t,s,i-t,0);p.push(r)}),this.label.enabled){let e=new vL;l.ticks.forEach(t=>{let i=this.getTickLabelProps(t,{combinedRotation:h,textAlign:u,textBaseline:d,range:this.scale.range});if(!i.visible)return;e.setProperties({...i,translationY:Math.round(t.translationY)});let s=e.getBBox();s&&p.push(s)})}if(null!=(i=this.title)&&i.enabled){let e=new fe,t=c4.merge(p).width;this.setTitleProps(e,{spacing:t});let i=e.node.getBBox();i&&p.push(i)}let C=c4.merge(p),y=this.getTransformBox(C),w=this.isAnySeriesActive();return this.crossLines.forEach(e=>{var t,i;e.sideFlag=-o,e.direction=s===-Math.PI/2?"x":"y",e instanceof fL&&(null!=(i=e.label).parallel||(i.parallel=this.label.parallel)),e.parallelFlipRotation=r,e.regularFlipRotation=a,null==(t=e.calculateLayout)||t.call(e,w,this.reverse)}),{primaryTickCount:c.primaryTickCount,bbox:y}}updateLayoutState(e){this.layout.label={fractionDigits:e,padding:this.label.padding,format:this.label.format}}getTransformBox(e){let t=new m$,{rotation:i,translationX:s,translationY:r}=this.getAxisTransform();return m$.updateTransformMatrix(t,1,1,i,s,r),t.transformBBox(e)}setDomain(e){this.dataDomain=this.normaliseDataDomain(e),this.reverse&&this.dataDomain.domain.reverse(),this.scale.domain=this.dataDomain.domain}updateScale(e){e?this.setDomain(e):this.calculateDomain(),this.updateRange(),this.scale.interval=this.interval.step,p8.is(this.scale)&&(this.scale.nice=this.nice,this.scale.update(
205))}calculateRotations(){let e=vr(this.rotation),t=ve(e),i=ve(e-Math.PI/2);return{rotation:e,parallelFlipRotation:t,regularFlipRotation:i}}generateTicks({primaryTickCount:e,parallelFlipRotation:t,regularFlipRotation:i,labelX:s,sideFlag:r}){var a;let{scale:o,interval:{minSpacing:n,maxSpacing:l},label:{parallel:h,rotation:d,fontFamily:u,fontSize:c,fontStyle:p,fontWeight:g}}=this,m=void 0!==e,{defaultRotation:v,configuredRotation:f,parallelFlipFlag:C,regularFlipFlag:y}=fo({rotation:d,parallel:h,regularFlipRotation:i,parallelFlipRotation:t}),w=f+v,b=new m$,{maxTickCount:S}=this.estimateTickCount({minSpacing:n,maxSpacing:l}),x=!(p8.is(o)||mz.is(o))||isNaN(S)?10:S,M=fn(h,f,0,r,y),D=h&&!f?r*C==-1?"hanging":"bottom":"middle",E=vE.toFontString({fontFamily:u,fontSize:c,fontStyle:p,fontWeight:g}),I=vM.getMeasurer({font:E}),A={fontFamily:u,fontSize:c,fontStyle:p,fontWeight:g,textBaseline:D,textAlign:M},R={rawTicks:[],fractionDigits:0,ticks:[],labelCount:0},T=0,L=0,F=!0,P=[],k=!1;for(;F&&T<=x&&!k;)for(let t of(L=0,M=fn(h,f,0,r,y),this.getTickStrategies({secondaryAxis:m,index:T}))){({tickData:R,index:T,autoRotation:L,terminate:k}=t({index:T,tickData:R,textProps:A,labelOverlap:F,terminate:k,primaryTickCount:e}));let i=0!==f||0!==L,o=w+L,n=(a=this.label.minSpacing,isNaN(a)?10*!i:a);m$.updateTransformMatrix(b,1,1,o,0,0),M=fn(h,f,L,r,y),P=this.createLabelData(R.ticks,s,b,I),F=!!this.label.avoidCollisions&&function(e,t=0){let i=[];for(let s=0;s<e.length;s++){let r=e[s],{point:{x:a,y:o},label:{text:n}}=r,{width:l,height:h}=r.label;if(l+=t,h+=t,i.some(e=>vF(e,a,o,l,h)))return!0;i.push({index:s,text:n,x:a,y:o,width:l,height:h,datum:r})}return!1}(P,n)}let N=v+f+L;return!m&&R.rawTicks.length>0&&(e=R.rawTicks.length),{tickData:R,primaryTickCount:e,combinedRotation:N,textBaseline:D,textAlign:M,labelData:P}}getTickStrategies({index:e,secondaryAxis:t}){let i,{scale:s,label:r}=this,{minSpacing:a}=this.interval,o=p8.is(s)||mz.is(s),n=r.enabled&&r.avoidCollisions,l=!0===r.autoRotate&&void 0===r.rotation,h=[];i=this.interval.values?3:t?1:!o&&0!==e&&n?2:0;let d=({index:e,tickData:t,primaryTickCount:s,terminate:r})=>this.createTickData(i,e,t,r,s);if(h.push(d),!o&&!isNaN(a)){let e=({index:e,tickData:t,primaryTickCount:i,terminate:s})=>this.createTickData(2,e,t,s,i);h.push(e)}if(!n)return h;if(l){let e=({index:e,tickData:t,labelOverlap:i,terminate:s})=>({index:e,tickData:t,autoRotation:this.getAutoRotation(i),terminate:s});h.push(e)}return h}createTickData(e,t,i,s,r){let{scale:a}=this,{step:o,values:n,minSpacing:l,maxSpacing:h}=this.interval,{maxTickCount:d,minTickCount:u,defaultTickCount:c}=this.estimateTickCount({minSpacing:l,maxSpacing:h}),p=p8.is(a)||mz.is(a),g=!p||isNaN(d)?10:d,m=p?Math.max(c-t,u):d,v=void 0===o&&void 0===n&&m>u&&(p||2===e),f=!0;for(;f&&t<=g;){let s=i.rawTicks;m=p?Math.max(c-t,u):d;let{rawTicks:a,fractionDigits:o,ticks:n,labelCount:l}=this.getTicks({tickGenerationType:e,previousTicks:s,tickCount:m,minTickCount:u,maxTickCount:d,primaryTickCount:r});i.rawTicks=a,i.fractionDigits=o,i.ticks=n,i.labelCount=l,f=!!v&&vk(a,s),t++}return s||(s=void 0!==o||void 0!==n),{tickData:i,index:t,autoRotation:0,terminate:s}}createLabelData(e,t,i,s){let r=[];for(let{tickLabel:a,translationY:o}of e){if(!a)continue;let{width:e,height:n}=s.measureLines(a),l=function(e,t,i){let{x:s,y:r,width:a,height:o}=t,n=new c4(s,r,0,0);i.transformBBox(n,t);let{x:l,y:h}=t;return{point:{x:l,y:h},label:{text:e,width:a,height:o}}}(a,new c4(t,o,e,n),i);r.push(l)}return r}getAutoRotation(e){var t;return e?ve(vr(null!=(t=this.label.autoRotateAngle)?t:0)):0}getTicks({tickGenerationType:e,previousTicks:t,tickCount:i,minTickCount:s,maxTickCount:r,primaryTickCount:a}){var o;let n,{range:l,scale:h,visibleRange:d}=this;switch(e){case 3:if(n=this.interval.values,p8.is(h)){let[e,t]=cK(h.getDomain().map(Number));n=n.filter(i=>i>=e&&i<=t).sort((e,t)=>e-t)}break;case 1:n=p8.is(h)?this.updateSecondaryAxisTicks(a):this.createTicks(i,s,r);break;case 2:n=this.filterTicks(t,i);break;default:n=this.createTicks(i,s,r)}let u=n.reduce((e,t)=>Math.max(e,"number"==typeof t?c1(t):0),0),c=(null!=(o=h.bandwidth)?o:0)/2,p=[],g=0,m=new Map,v=Math.max(0,Math.floor(d[0]*n.length)),f=Math.min(n.length,Math.ceil(d[1]*n.length)),C=n.slice(v,f);this.onFormatChange(C,u,n,this.label.format);for(let e=0;e<C.length;e++){let t=C[e],i=h.convert(t)+c;if(l.length>0&&!this.inRange(i,.001))continue;let s=this.formatTick(t,u,v+e),r=s;if(m.has(r)){let e=m.get(r);m.set(r,e+1),r=`${r}_${e}`}else m.set(r,1);p.push({tick:t,tickId:r,tickLabel:s,translationY:Math.floor(i)}),""!==s&&null!=s&&g++}return{rawTicks:n,fractionDigits:u,ticks:p,labelCount:g}}filterTicks(e,t){let{minSpacing:i,maxSpacing:s}=this.interval,r=isNaN(i)&&isNaN(s)?2:Math.ceil(e.length/t);return e.filter((e,t)=>
205t%r==0)}createTicks(e,t,i){var s,r;let{scale:a}=this;return e&&(p8.is(a)||mz.is(a))&&(a.tickCount=e,a.minTickCount=null!=t?t:0,a.maxTickCount=null!=i?i:1/0),null!=(s=null==(r=a.ticks)?void 0:r.call(a))?s:[]}estimateTickCount({minSpacing:e,maxSpacing:t}){if(!this.label.avoidCollisions)return{minTickCount:p8.defaultMaxTickCount,maxTickCount:p8.defaultMaxTickCount,defaultTickCount:p8.defaultMaxTickCount};let i=this.calculateRangeWithBleed(),s=Math.max(this.defaultTickMinSpacing,i/p8.defaultMaxTickCount),r=!isNaN(t);isNaN(e)&&(e=s),isNaN(t)&&(t=i),e>t&&(e===s?e=t:t=e),r&&(r=2<s);let a=c$(1,Math.floor(i/e),r?Math.min(Math.floor(i/2),100):100),o=Math.min(a,Math.ceil(i/t)),n=c$(o,p8.defaultTickCount,a);return{minTickCount:o,maxTickCount:a,defaultTickCount:n}}updateVisibility(){this.moduleCtx.animationManager.isSkipped()&&this.resetSelectionNodes(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled}updateCrossLines({rotation:e,parallelFlipRotation:t,regularFlipRotation:i}){let s=this.label.getSideFlag(),r=this.isAnySeriesActive();this.crossLines.forEach(a=>{var o;a.sideFlag=-s,a.direction=e===-Math.PI/2?"x":"y",a instanceof fL&&(null!=(o=a.label).parallel||(o.parallel=this.label.parallel)),a.parallelFlipRotation=t,a.regularFlipRotation=i,a.update(r)})}updateTickLines(){let{tick:e,label:t}=this,i=t.getSideFlag();this.tickLineGroupSelection.each(t=>{t.strokeWidth=e.width,t.stroke=e.stroke,t.x1=i*this.getTickSize(),t.x2=0})}calculateAvailableRange(){return cZ(this.range)}calculateRangeWithBleed(){let e=1/cZ(this.visibleRange);return cX(this.calculateAvailableRange()*e,2)}calculateDomain(){let e=this.boundSeries.filter(e=>this.includeInvisibleDomains||e.isEnabled()).flatMap(e=>e.getDomain(this.direction));this.setDomain(e)}getAxisTransform(){return{rotation:vr(this.rotation),translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){let{crossLineGroup:e,axisGroup:t,gridGroup:i,translation:s}=this,{rotation:r}=this.calculateRotations(),a=Math.floor(s.x),o=Math.floor(s.y);e.setProperties({rotation:r,translationX:a,translationY:o}),i.setProperties({rotation:r,translationX:a,translationY:o}),t.datum=this.getAxisTransform()}updateSecondaryAxisTicks(e){throw Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")}updateSelections(e,t,i){let s=e=>e.tickId,r=t.map(e=>this.getTickLabelProps(e,i));this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLength?t:[],void 0,s),this.tickLineGroupSelection.update(t,void 0,s),this.tickLabelGroupSelection.update(r,void 0,s)}updateAxisLine(){let{enabled:e,stroke:t,width:i}=this.line;this.lineNode.setProperties({stroke:t,strokeWidth:e?i:0})}updateGridLines(e){let{gridLine:{style:t,width:i},gridPadding:s,gridLength:r}=this;0!==r&&0!==t.length&&this.gridLineGroupSelection.each((a,o,n)=>{let{stroke:l,lineDash:h}=t[n%t.length];a.setProperties({x1:s,x2:-e*r+s,stroke:l,strokeWidth:i,lineDash:h})})}updateLabels(){this.label.enabled&&this.tickLabelGroupSelection.each((e,t)=>{e.setProperties(t,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])})}updateTitle(e){let{title:t,lineNode:i,tickLineGroup:s,tickLabelGroup:r}=this,a=0;
205t.enabled&&e.anyTickVisible&&(a+=m1.computeChildrenBBox([s,r,i]).width+(this.tickLabelGroup.visible?0:this.seriesAreaPadding)),this.setTitleProps(t.caption,{spacing:a})}formatTick(e,t,i){return String(this.getFormatter(i,!0)(e,t))}formatDatum(e){return String(this.getFormatter()(e))}getFormatter(e=0,t){let{label:i,labelFormatter:s,datumFormatter:r,moduleCtx:{callbackCache:a}}=this;return i.formatter?(t,s)=>{var r;return null!=(r=a.call(i.formatter,{value:t,index:e,fractionDigits:s}))?r:t}:!t&&r?e=>{var t;return null!=(t=a.call(r,e))?t:String(e)}:s?e=>{var t;return null!=(t=a.call(s,e))?t:String(e)}:e=>String(e)}getBBox(){return this.axisGroup.getBBox()}getRegionNode(){}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(e=>this.includeInvisibleDomains||e.isEnabled())}clipTickLines(e,t,i,s){this.tickLineGroup.setClipRect(new c4(e,t,i,s))}clipGrid(e,t,i,s){this.gridGroup.setClipRect(new c4(e,t,i,s))}getTitleFormatterParams(){var e;let{direction:t}=this,i=[];for(let e of this.boundSeries){let s=e.getKeys(t),r=e.getNames(t);for(let e=0;e<s.length;e++)i.push({key:s[e],name:r[e]})}return{direction:t,boundSeries:i,defaultValue:null==(e=this.title)?void 0:e.text}}normaliseDataDomain(e){return{domain:[...e],clipped:!1}}getLayoutState(){return{id:this.id,rect:this.getBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale,...this.layout}}getModuleMap(){return this.moduleMap}createModuleContext(){return null!=this.axisContext||(this.axisContext=this.createAxisContext()),{...this.moduleCtx,parent:this.axisContext}}createAxisContext(){let{scale:e}=this;return{axisId:this.id,scale:this.scale,direction:this.direction,continuous:p8.is(e)||mz.is(e),keys:()=>this.boundSeries.flatMap(e=>e.getKeys(this.direction)),seriesKeyProperties:()=>this.boundSeries.reduce((e,t)=>(t.getKeyProperties(this.direction).forEach(t=>{0>e.indexOf(t)&&e.push(t)}),e),[]),scaleValueFormatter:e=>this.getScaleValueFormatter(e),scaleBandwidth:()=>{var t;return null!=(t=e.bandwidth)?t:0},scaleDomain:()=>{var t;return null==(t=e.getDomain)?void 0:t.call(e)},scaleConvert:t=>e.convert(t),scaleInvert:mz.is(e)?t=>{var i;return null==(i=e.invertNearest)?void 0:i.call(e,t)}:t=>{var i;return null==(i=e.invert)?void 0:i.call(e,t)},scaleInvertNearest:t=>{var i;return null==(i=e.invertNearest)?void 0:i.call(e,t)},scaleStep:()=>{var t;return null!=(t=e.step)?t:0},attachLabel:e=>this.attachLabel(e),inRange:(e,t)=>
205this.inRange(e,t)}}getScaleValueFormatter(e){let{scale:t}=this;if(e&&t&&t.tickFormat)try{return t.tickFormat({specifier:e})}catch(t){u8.warnOnce(`the format string ${e} is invalid, ignoring.`)}return this.getFormatter()}animateReadyUpdate(e){let{animationManager:t}=this.moduleCtx,i=f_(fj(this));p3(this.id,"axis-group",t,[this.axisGroup],i.group),p3(this.id,"line",t,[this.lineNode],i.line),p3(this.id,"line-paths",t,[this.gridLineGroupSelection,this.tickLineGroupSelection],i.tick,(e,t)=>t.tickId,e),p3(this.id,"tick-labels",t,[this.tickLabelGroupSelection],i.label,(e,t)=>t.tickId,e)}resetSelectionNodes(){let{gridLineGroupSelection:e,tickLineGroupSelection:t,tickLabelGroupSelection:i,lineNode:s}=this,r=fj(this);mm([this.axisGroup],f$()),mm([e,t],fY(r)),mm([i],fK()),mm([s],fZ())}calculateUpdateDiff(e,t){let i=new Set,s=new Set,r={},a=Math.max(e.length,t.ticks.length);for(let o=0;o<a;o++){let a=t.ticks[o],n=e[o],l=null==a?void 0:a.tickId;r[null!=l?l:n]=a,n!==l&&(s.has(l)?s.delete(l):l&&i.add(l),i.has(n)?i.delete(n):n&&s.add(n))}return{changed:i.size>0||s.size>0,added:i,removed:s}}isReversed(){return this.reverse}};fQ.defaultTickMinSpacing=50,fQ.CrossLineConstructor=fL,uQ([gM(gR)],fQ.prototype,"nice",2),uQ([gM(gR)],fQ.prototype,"reverse",2),uQ([gM(gQ)],fQ.prototype,"keys",2),uQ([gM(gI)],fQ.prototype,"interval",2),uQ([gM(gI)],fQ.prototype,"title",2),uQ([vY((e,t,i)=>e.onGridLengthChange(t,i))],fQ.prototype,"gridLength",2);var fX=fQ,fJ=class extends fB{constructor(){super(...arguments),this.autoRotateAngle=335}};uQ([gM(gR,{optional:!0})],fJ.prototype,"autoRotate",2),uQ([gM(gG)],fJ.prototype,"autoRotateAngle",2);var f0=class e extends fX{constructor(){super(...arguments),this.thickness=0}static is(t){return t instanceof e}get direction(){return"top"===this.position||"bottom"===this.position?"x":"y"}updateDirection(){switch(this.position){case"top":this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}update(e){return this.updateDirection(),super.update(e)}calculateLayout(e,t){return this.updateDirection(),super.calculateLayout(e,t)}createAxisContext(){return{...super.createAxisContext(),position:this.position}}createLabel(){return new fJ}getRegionNode(){return this.axisGroup}};uQ([gM(gN)],f0.prototype,"thickness",2),uQ([gM(g4)],f0.prototype,"position",2);var f1=f0,f2=class e extends f1{constructor(e,t=new gw){super(e,t),this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}static is(t){return t instanceof e}normaliseDataDomain(e){let t=[],i=new Set;for(let s of e){let e=s instanceof Date?s.getTime():s;i.has(e)||(i.add(e),t.push(s))}return{domain:t,clipped:!1}}updateScale(e){let{paddingInner:t,paddingOuter:i}=this;if(!pE(t)||!pE(i)){let e=this.reduceBandScalePadding();null!=t||(t=e.inner),null!=i||(i=e.outer)}this.scale.paddingInner=null!=t?t:0,this.scale.paddingOuter=null!=i?i:0,super.updateScale(e)}reduceBandScalePadding(){return this.boundSeries.reduce((e,t)=>{var i;let s=null==(i=t.getBandScalePadding)?void 0:i.call(t);return s&&(e.inner>s.inner&&(e.inner=s.inner),e.outer<s.outer&&(e.outer=s.outer)),e},{inner:1/0,outer:-1/0})}};f2.className="CategoryAxis",f2.type="category",uQ([gM(gO)],f2.prototype,"groupPaddingInner",2),uQ([gM(gO,{optional:!0})],f2.prototype,"paddingInner",2),uQ([gM(gO,{optional:!0})],f2.prototype,"paddingOuter",2);var f3=class{constructor(e="",t,i=0){this.x=0,this.y=0,this.subtreeLeft=0/0,this.subtreeRight=0/0,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=e,this.parent=t,this.depth=t?t.depth+1:0,this.number=i}getLeftSibling(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0}getLeftmostSibling(){return this.number>0&&this.parent?this.parent.children[0]:void 0}nextLeft(){return this.children?this.children[0]:this.thread}nextRight(){return this.children?this.children[this.children.length-1]:this.thread}getSiblings(){return this.parent?this.parent.children.filter((e,t)=>
205t!==this.number):[]}},f4=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(e,t){let{x:i,y:s}=t(e);i>this.right&&(this.right=i),i<this.left&&(this.left=i),s>this.bottom&&(this.bottom=s),s<this.top&&(this.top=s)}},f6=class{constructor(){this.dimensions=new f4,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}update(e){this.dimensions.update(e,e=>({x:e.x,y:e.y})),e.children.length?this.nonLeafNodes.push(e):(this.leafCount++,this.leafNodes.push(e)),e.depth>this.depth&&(this.depth=e.depth),this.nodes.push(e)}resize(e,t,i=0,s=0,r=!1){let a=this.leafCount-1,o=this.depth,n=this.dimensions,l=1,h=1;if(e>0&&a){let t=(n.right-n.left)/a;l=e/a/t,r&&(l=-l)}if(t>0&&o){let e=(n.bottom-n.top)/o;h=t/o/e}let d=new f4;this.nodes.forEach(e=>{e.screenX=e.x*l,e.screenY=e.y*h,d.update(e,e=>({x:e.screenX,y:e.screenY}))});let u=-d.left,c=-d.top;this.nodes.forEach(e=>{e.screenX+=u+i,e.screenY+=c+s})}},f5=class extends fB{constructor(){super(...arguments),this.grid=!1}};uQ([gM(gR)],f5.prototype,"grid",2);var f8=class extends f1{constructor(e){let t=new gw;t.paddingOuter=.1,t.paddingInner=2*t.paddingOuter,super(e,t),this.tickScale=new gw,this.line=new fz,this.label=new f5,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;let{tickLineGroup:i,tickLabelGroup:s,gridLineGroup:r,tickScale:a}=this;a.paddingInner=1,a.paddingOuter=0,this.gridLineSelection=m7.select(r,vS),this.axisLineSelection=m7.select(i,vS),this.separatorSelection=m7.select(i,vS),this.labelSelection=m7.select(s,vL),this.lineNode.visible=!1}updateRange(){let{range:e,visibleRange:t,scale:i}=this,s=(e[1]-e[0])/(t[1]-t[0]),r=s*t[0],a=e[0]-r;this.tickScale.range=i.range=[a,a+s],this.resizeTickTree()}resizeTickTree(){let e=this.scale,t=e.domain.length?[e.convert(e.domain[0]),e.convert(e.domain[e.domain.length-1])]:e.range,i=this.tickTreeLayout,s=this.lineHeight;if(i){var r;i.resize(Math.abs(t[1]-t[0]),i.depth*s,(Math.min(t[0],t[1])||0)+(null!=(r=e.bandwidth)?r:0)/2,-i.depth*s,t[1]-t[0]<0)}}get lineHeight(){return 1.5*this.label.fontSize}onGridVisibilityChange(){this.gridLineSelection.clear(),this.labelSelection.clear()}calculateDomain(){var e,t;let i,{direction:s}=this,r=null,a=this.boundSeries.filter(e=>e.visible).flatMap(e=>{if("y"===s||r)return e.getDomain(s);if(null===r){let t=e.getDomain(s);return r=pD(t[0]),t}return[]});this.setDomain(null!=(e=p7(a))?e:gi(a));let{domain:o}=this.dataDomain;this.tickTreeLayout=(t=function(e,t=!0){let i=new f3,s=0;return t&&e.forEach(e=>s=Math.max(s,e.labels.length)),e.forEach(e=>{var r;let a,o;if(t)for(;e.labels.length<s;)e.labels.unshift("");r=i,o=(a=e.labels.slice().reverse()).length-1,a.forEach((e,t)=>{let i=r.children,s=i.find(t=>t.label===e),a=t!==o;if(s&&a)r=s;else{let t=new f3(e,r);t.number=i.length,i.push(t),a&&(r=t)}})}),i}(o),i=new f6,!function e(t,i){let s=t.children;if(s.length){let r=s[0];s.forEach(t=>{e(t,i),r=function(e,t,i){let s=e.getLeftSibling();if(s){let o=e,n=e,l=s,h=n.getLeftmostSibling(),d=n.mod,u=o.mod,c=l.mod,p=h.mod;for(;l.nextRight()&&n.nextLeft();){l=l.nextRight(),n=n.nextLeft(),h=h.nextLeft(),(o=o.nextRight()).ancestor=e;let s=l.prelim+c-(n.prelim+d)+i;if(s>0){var r,a;!function(e,t,i){let s=i/(t.number-e.number);t.change-=s,t.shift+=i,e.change+=s,t.prelim+=i,t.mod+=i}((r=l,a=t,e.getSiblings().indexOf(r.ancestor)>=0?r.ancestor:a),e,s),d+=s,u+=s}c+=l.mod,d+=n.mod,p+=h.mod,u+=o.mod}l.nextRight()&&!o.nextRight()?(o.thread=l.nextRight(),o.mod+=c-u):(n.nextLeft()&&!h.nextLeft()&&(h.thread=n.nextLeft(),h.mod+=d-p),t=e)}return t}(t,r,i)}),function(e){let t=e.children;if(t){let e=0,i=0;for(let s=t.length-1;s>=0;s--){let r=t[s];r.prelim+=e,r.mod+=e,i+=r.change,e+=r.shift+i}}}(t);let a=(s[0].prelim+s.at(-1).prelim)/2,o=t.getLeftSibling();o?(t.prelim=o.prelim+i,t.mod=t.prelim-a):t.prelim=a}else{let e=t.getLeftSibling();t.prelim=e?e.prelim+i:0}}(t,1),!function e(t,i,s){t.x=t.prelim+i,t.y=t.depth,s.update(t),t.children.forEach(r=>e(r,i+t.mod,s))}(t,-t.prelim,i),!function e(t){let i=t.children,s=0;i.forEach(t=>{e(t),t.children.length?s+=t.leafCount:s++}),t.leafCount=s,i.length?(t.subtreeLeft=i[0].subtreeLeft,t.subtreeRight=i[t.children.length-1].subtreeRight,t.x=(t.subtreeLeft+t.subtreeRight)/2):(t.subtreeLeft=t.x,t.subtreeRight=t.x)}(t),i),this.tickScale.domain=o.concat(""),this.resizeTickTree()}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){this.title.caption.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;let{tickLabelLayout:e}=this.computedLayout;this.labelSelection.update(e).each((e,t)=>{e.setProperties(t)})}updateSeparators(){if(!this.computedLayout)return;let{separatorLayout:e}=this.computedLayout,{range:t}=this;this.separatorSelection.update(e).each((e,i)=>{e.x1=i.x1,e.x2=i.x2,e.y1=i.y,e.y2=i.y,e.visible=this.tick.enabled&&i.y>=t[0]-1e-7&&i.y<=t[1]+1e-7,e.stroke=this.tick.stroke,e.strokeWidth=1})}
205updateAxisLines(){if(!this.computedLayout)return;let{axisLineLayout:e}=this.computedLayout;this.axisLineSelection.update(e).each((e,t)=>{e.setProperties(t),e.stroke=this.line.stroke,e.strokeWidth=this.line.width})}updateCategoryGridLines(){let{gridLength:e,gridLine:t,label:i,range:s,tickScale:r}=this,a=r.ticks(),o=i.getSideFlag(),n=this.gridLineSelection.update(e?a:[]);if(e){let{width:i,style:a}=t,l=a.length;n.each((n,h,d)=>{let u=Math.round(r.convert(h)),{stroke:c,lineDash:p}=a[d%l];n.visible=t.enabled&&u>=s[0]&&u<=s[1],n.x1=0,n.x2=-o*e,n.y1=u,n.y2=u,n.stroke=c,n.strokeWidth=i,n.lineDash=p})}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();let{scale:e,label:t,label:{parallel:i},moduleCtx:{callbackCache:s},range:r,title:a,title:{formatter:o=e=>e.defaultValue}={}}=this,n=e.range[0],l=e.range[1],h=Math.abs(l-n)/e.domain.length||0,d=Math.ceil(t.fontSize/h),u=vr(this.rotation),c=1e-8>Math.abs(Math.cos(u)),p=t.getSideFlag(),g=this.lineHeight,m=this.tickTreeLayout,v=e.ticks(),f=m?m.nodes:[],C=!!m&&m.depth>1,y=(null==a?void 0:a.enabled)&&v.length>0,{defaultRotation:w,configuredRotation:b,parallelFlipFlag:S}=fo({rotation:t.rotation,parallel:i,regularFlipRotation:ve(u-Math.PI/2),parallelFlipRotation:ve(u)}),x=[],M=new Map,D=0,E=new vL,I=(e,i)=>{if(0===i){if(y){let t=s.call(o,this.getTitleFormatterParams());return E.setProperties({text:t,fill:a.color,fontFamily:a.fontFamily,fontSize:a.fontSize,fontStyle:a.fontStyle,fontWeight:a.fontWeight,textAlign:"center",textBaseline:"hanging",translationX:e.screenY-.25*a.fontSize,translationY:e.screenX}),!0}return!1}if(E.setProperties({fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,textAlign:"center",textBaseline:-1===S?"bottom":"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX}),i%d!=0||e.screenX<r[0]||e.screenX>r[1])return!1;if(t.formatter){var n;E.text=null!=(n=s.call(t.formatter,{value:String(e.label),index:i}))?n:String(e.label)}else E.text=String(e.label);return!0};f.forEach((e,t)=>{if(!I(e,t))return;let i=E.getBBox();i&&(M.set(t,i),!e.children.length&&i.width>D&&(D=i.width))});let A=p*t.padding,R=this.label.grid,T=[];f.forEach((e,t)=>{var i;let s,r=!e.children.length,o=I(e,t);if(E.x=A,E.y=0===t&&y&&null!=(i=a.spacing)?i:0,E.rotationCenterX=A,r)E.rotation=b,E.textAlign="end",E.textBaseline="middle";else{let i=e.leafCount*h,s=M.get(t);E.translationX-=D-g+this.label.padding,s&&s.width>i?(o=!1,M.delete(t)):E.rotation=c?w:-Math.PI/2}if(e.parent&&C){let t=r?e.screenX-h/2:e.screenX-e.leafCount*h/2;if(r)(e.number!==e.children.length-1||R)&&T.push({y:t,x1:0,x2:-D-2*this.label.padding});else{let i=-D-2*this.label.padding+e.screenY;T.push({y:t,x1:i+g,x2:i})}}if(o){let e=mJ.toCanvas(E);e&&M.set(t,e),s={...{fill:E.fill,fontFamily:E.fontFamily,fontSize:E.fontSize,fontStyle:E.fontStyle,fontWeight:E.fontWeight,rotation:E.rotation,rotationCenterX:E.rotationCenterX,rotationCenterY:E.rotationCenterY,text:E.text,textAlign:E.textAlign,textBaseline:E.textBaseline,translationX:E.translationX,translationY:E.translationY,visible:E.visible,x:E.x,y:E.y},visible:o}}else M.delete(t),s={visible:o};x.push(s)});let L=0;T.forEach(e=>L=Math.min(L,e.x2)),T.push({y:Math.max(n,l),x1:0,x2:L});let F=[],P=[];T.forEach(e=>{if(e.y>=r[0]-1e-7&&e.y<=r[1]+1e-7){let{x1:t,x2:i,y:s}=e,r=new c4(Math.min(t,i),s,Math.abs(t-i),0);P.push(r),F.push({x1:t,x2:i,y:s})}});let k=[],N=[],O=m?m.depth+1:1;for(let e=0;e<O;e++){let t=v.length>0&&(0===e||R&&C),i=e>0?-D-2*this.label.padding-(e-1)*g:0,s=new c4(i,Math.min(...r),0,Math.abs(r[1]-r[0]));N.push(s),k.push({x:i,y1:r[0],y2:r[1],visible:t})}let G=c4.merge(cA(M.values(),P,N));return{bbox:this.getTransformBox(G),tickLabelLayout:x,separatorLayout:F,axisLineLayout:k}}calculateLayout(){let{axisLineLayout:e,separatorLayout:t,tickLabelLayout:i,bbox:s}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:t,tickLabelLayout:i},{bbox:s,primaryTickCount:void 0}}};f8.className="GroupedCategoryAxis",f8.type="grouped-category",uQ([gM(gY,{optional:!0})],f8.prototype,"labelColor",2);var f7=class{constructor(){this.destroyFns=[]}destroy(){for(let e of this.destroyFns)e()}},f9=class{constructor(){this.modules=[],this.dependencies=new Map,this.dependents=new Map}register(...e){for(let t of e){this.registerDependencies(t);let e=this.modules.find(e=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier);if(e){if("enterprise"===t.packageType&&"community"===e.packageType){let i=this.modules.indexOf(e);this.modules.splice(i,1,t)}}else this.modules.push(t)}}hasEnterpriseModules(){return this.modules.some(e=>"enterprise"===e.packageType)}*byType(...e){let{dependents:t}=this,i=new Set,s=0,r=this.modules.filter(t=>e.includes(t.type));do{for(let e of r)if(!(i.has(e.optionsKey)||t.has(e.optionsKey)))for(let[s,r]of(yield e,i.add(e.optionsKey),t.entries()))r.delete(e.optionsKey),0===r.size&&t.delete(s);s++}while(i.size<r.length&&s<3)if(t.size>0)throw Error(`Could not resolve module dependencies: [${[...t.keys()]}]`)}registerDependencies(e){if(null!=e.dependencies&&0!==e.dependencies.length){for(let i of e.dependencies){var t;let s=null!=(t=this.dependencies.get(i))?t:new Set;s.add(e.optionsKey),this.dependencies.set(i,s)}
205this.dependents.set(e.optionsKey,new Set(e.dependencies))}}},Ce=new f9,Ct=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(e){return new Promise(t=>{this.acquireQueue.push([e,t]),this.available&&this.dispatchNext().catch(e=>u8.errorOnce(e))})}async acquireImmediately(e){return!!this.available&&(await this.acquire(e),!0)}async waitForClearAcquireQueue(){return this.acquire(async()=>void 0)}async dispatchNext(){var e,t,i,s;this.available=!1;let[r,a]=null!=(e=this.acquireQueue.shift())?e:[];for(;r;){try{await r(),null==(i=a)||i()}catch(e){u8.error("mutex callback error",e),null==(s=a)||s()}[r,a]=null!=(t=this.acquireQueue.shift())?t:[]}this.available=!0}},Ci=class{constructor(){this.eventListeners=new Map}addEventListener(e,t){if("function"!=typeof t)throw Error("AG Charts - listener must be a Function");let i=this.eventListeners.get(e);i?i.add(t):this.eventListeners.set(e,new Set([t]))}removeEventListener(e,t){var i;null==(i=this.eventListeners.get(e))||i.delete(t),0===this.eventListeners.size&&this.eventListeners.delete(e)}hasEventListener(e){return this.eventListeners.has(e)}clearEventListeners(){this.eventListeners.clear()}fireEvent(e){var t;null==(t=this.eventListeners.get(e.type))||t.forEach(t=>t(e))}},Cs=class extends gb{constructor(e=0,t=e,i=e,s=t){super(),this.top=e,this.right=t,this.bottom=i,this.left=s}};function Cr(e,t){let i,s,r=0,a=!1,o=()=>a,n=()=>{var t;a=!1,null==(t=s)||t(),s=void 0,i=void 0,r>0&&e(l)},l=()=>{let e=r;r=0,a=!0;let i=t({count:e});i?i.then(n,n):n()};return{schedule(t){0!==r||o()||e(l,t),r++},async await(){if(o())for(null==i&&(i=new Promise(e=>{s=e}));o();)await i}}}uQ([gM(gN)],Cs.prototype,"top",2),uQ([gM(gN)],Cs.prototype,"right",2),uQ([gM(gN)],Cs.prototype,"bottom",2),uQ([gM(gN)],Cs.prototype,"left",2);var Ca=class{constructor(){this.events=new Map}on(e,t){var i;return this.events.has(e)||this.events.set(e,new Set),null==(i=this.events.get(e))||i.add(t),()=>this.off(e,t)}off(e,t){let i=this.events.get(e);i&&(i.delete(t),0===i.size&&this.events.delete(e))}emit(e,t){var i;null==(i=this.events.get(e))||i.forEach(e=>e(t))}clear(e){e?this.events.delete(e):this.events.clear()}},Co=((T=Co||{})[T.Caption=0]="Caption",T[T.Legend=1]="Legend",T[T.Toolbar=2]="Toolbar",T[T.Navigator=3]="Navigator",T[T.Overlay=4]="Overlay",T),Cn=class{constructor(){this.events=new Ca,this.elements=new Map}addListener(e,t){return this.events.on(e,t)}registerElement(e,t){return this.elements.has(e)?this.elements.get(e).add(t):this.elements.set(e,new Set([t])),()=>{var i;return null==(i=this.elements.get(e))?void 0:i.delete(t)}}createContext(e,t){let i=new Cl(e,t);for(let e of Object.values(Co)){var s;"number"==typeof e&&(null==(s=this.elements.get(e))||s.forEach(e=>e(i)))}return i}emitLayoutComplete(e,t){var i,s;let r="layout:complete",{width:a,height:o}=e;this.events.emit(r,{type:r,axes:null!=(i=t.axes)?i:[],chart:{width:a,height:o},clipSeries:null!=(s=t.clipSeries)&&s,series:t.series})}},Cl=class{constructor(e,t){this.width=e,this.height=t,this.layoutBox=new c4(0,0,e,t)}},Ch=class{constructor(){this.title=new fe,this.subtitle=new fe,this.footnote=new fe}positionCaptions(e){let{title:t,subtitle:i,footnote:s}=this,r=e.layoutBox.height/10;if(t.enabled){let{spacing:s=i.enabled?fe.SMALL_PADDING:fe.LARGE_PADDING}=t;this.positionCaption("top",t,e.layoutBox,r),this.shrinkLayoutByCaption("top",t,e.layoutBox,s)}i.enabled&&(this.positionCaption("top",i,e.layoutBox,r),this.shrinkLayoutByCaption("top",i,e.layoutBox,i.spacing)),s.enabled&&(this.positionCaption("bottom",s,e.layoutBox,r),this.shrinkLayoutByCaption("bottom",s,e.layoutBox,s.spacing))}positionAbsoluteCaptions(e){let{title:t,subtitle:i,footnote:s}=this,{rect:r}=e.series;for(let e of[t,i,s])if("overlay"===e.layoutStyle){if("left"===e.textAlign)e.node.x=r.x+e.padding;else if("right"===e.textAlign){let t=e.node.getBBox();e.node.x=r.x+r.width-t.width-e.padding}}}computeX(e,t){return"left"===e?t.x:"right"===e?t.x+t.width:t.x+t.width/2}positionCaption(e,t,i,s){let r=Math.max(vE.getLineHeight(t.fontSize),s);t.node.x=this.computeX(t.textAlign,i)+t.padding,t.node.y=i.y+("top"===e?0:i.height)+t.padding,t.node.textBaseline=e,t.computeTextWrap(i.width,r)}shrinkLayoutByCaption(e,t,i,s=0){if("block"===t.layoutStyle){let r=t.node.getBBox();i.shrink("top"===e?Math.ceil(r.y-i.y+r.height+s):Math.ceil(i.y+i.height-r.y+s),e)}}};uQ([gM(gI)],Ch.prototype,"title",2),uQ([gM(gI)],Ch.prototype,"subtitle",2),uQ([gM(gI)],Ch.prototype,"footnote",2);var Cd=class{constructor(){this.registeredListeners=new Map}
205addListener(e,t){let i={symbol:Symbol(e),handler:t};return this.registeredListeners.has(e)?this.registeredListeners.get(e).push(i):this.registeredListeners.set(e,[i]),()=>this.removeListener(i.symbol)}removeListener(e){for(let[t,i]of this.registeredListeners.entries()){let s=i.findIndex(t=>t.symbol===e);if(s>=0){i.splice(s,1),0===i.length&&this.registeredListeners.delete(t);break}}}dispatch(e,...t){for(let i of this.getListenersByType(e))try{i.handler(...t)}catch(e){u8.errorOnce(e)}}dispatchWrapHandlers(e,t,...i){for(let s of this.getListenersByType(e))try{t(s.handler,...i)}catch(e){u8.errorOnce(e)}}getListenersByType(e){var t;return null!=(t=this.registeredListeners.get(e))?t:[]}destroy(){this.registeredListeners.clear()}},Cu=class{constructor(){this.listeners=new Cd,this.destroyFns=[]}addListener(e,t){return this.listeners.addListener(e,t)}destroy(){this.listeners.destroy(),this.destroyFns.forEach(e=>e())}},Cc=((L=Cc||{})[L.Default=32]="Default",L[L.ZoomDrag=16]="ZoomDrag",L[L.Annotations=8]="Annotations",L[L.ContextMenu=4]="ContextMenu",L[L.Animation=2]="Animation",L[L.AnnotationsSelected=1]="AnnotationsSelected",L[L.All=63]="All",L),Cp=class extends Cu{addListener(e,t,i=32){return super.addListener(e,e=>{this.getState()&i&&t(e)})}},Cg=class{constructor(){this.destroyFns=[]}destroy(){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0}setFns(e){this.destroy(),this.destroyFns=e}},Cm="10.3.9",Cv=Symbol("previous-memento-not-found"),Cf=class{constructor(e){this.history=[],this.historyIndex=-1,this.originators=new Map,this.clearState=new Map,this.maxHistoryLength=100,this.debug=m8.create(!0,"history"),this.destroyFns=new Cg,this.destroyFns.setFns([e.addListener("undo",this.undo.bind(this),63),e.addListener("redo",this.redo.bind(this),63)])}destroy(){this.destroyFns.destroy()}addMementoOriginator(e){this.originators.set(e.mementoOriginatorKey,e),this.clearState.set(e.mementoOriginatorKey,e.createMemento()),this.debugEvent("History add originator:",e.mementoOriginatorKey)}clear(){for(let[e,t]of(this.debug("History clear:",Object.keys(this.originators)),this.history=[],this.historyIndex=-1,this.originators.entries()))this.clearState.set(e,t.createMemento())}record(e,...t){this.historyIndex<this.history.length-1&&(this.history=this.history.slice(0,this.historyIndex+1)),this.history.length>this.maxHistoryLength&&(this.history=this.history.slice(-this.maxHistoryLength));let i=new Map;for(let e of t){if(!this.originators.has(e.mementoOriginatorKey))throw Error(`Originator [${e.mementoOriginatorKey}] has not been added to the HistoryManager.`);i.set(e.mementoOriginatorKey,e.createMemento())}this.history.push({label:e,mementos:i}),this.historyIndex=this.history.length-1,this.debugEvent(`History record: [${e}]`)}undo(){let e=this.history[this.historyIndex];if(e){for(let t of e.mementos.keys()){let e=this.findPreviousMemento(t);if(e===Cv)throw Error(`Could not find previous memento for [${t}].`);this.restoreMemento(t,e)}this.historyIndex-=1,this.debugEvent(`History undo: [${e.label}]`)}}redo(){let e=this.history[this.historyIndex+1];if(e){for(let[t,i]of e.mementos.entries())this.restoreMemento(t,i);this.historyIndex+=1,this.debugEvent(`History redo: [${e.label}]`)}}findPreviousMemento(e){for(let t=this.historyIndex-1;t>=0;t--)if(this.history[t].mementos.has(e))return this.history[t].mementos.get(e);return this.clearState.has(e)?this.clearState.get(e):Cv}restoreMemento(e,t){var i;null==(i=this.originators.get(e))||i.restoreMemento(Cm,Cm,t)}debugEvent(...e){this.debug(...e,this.history.map((e,t)=>t===this.historyIndex?`** ${e.label} **`:e.label))}},CC=class{constructor(e){this.version=e.split("-")[0]}save(...e){let t={version:this.version};for(let i of Object.values(e))t[i.mementoOriginatorKey]=this.encode(i,i.createMemento());return t}restore(e,...t){if("object"!=typeof e)return void u8.warnOnce(`Could not restore data of type [${typeof e}], expecting an object, ignoring.`);if(null==e)return void u8.warnOnce("Could not restore data of type [null], expecting an object, ignoring.");if(!("version"in e)||"string"!=typeof e.version)return void u8.warnOnce("Could not restore data, missing [version] string in object, ignoring.");for(let i of t){if(!(i.mementoOriginatorKey in e))continue;let t=this.decode(i,e[i.mementoOriginatorKey]);if(!i.guardMemento(t))return void u8.warnOnce(`Could not restore [${i.mementoOriginatorKey}
205] data, value was invalid, ignoring.`,t);i.restoreMemento(this.version,e.version,t)}}encode(e,t){try{return JSON.parse(JSON.stringify(t,this.encodeTypes))}catch(t){throw Error(`Failed to encode [${e.mementoOriginatorKey}] value [${t}].`,{cause:t})}}decode(e,t){try{return JSON.parse(JSON.stringify(t),this.decodeTypes)}catch(t){throw Error(`Failed to decode [${e.mementoOriginatorKey}] value [${t}].`,{cause:t})}}encodeTypes(e,t){return pf(this[e])?{__type:"date",value:String(this[e])}:t}decodeTypes(e,t){return pb(this[e])&&"__type"in this[e]&&"date"===this[e].__type?new Date(this[e].value):t}},Cy=class{constructor(){this.caretaker=new CC(Cm),this.state=new Map}setState(e,t){null!=vO(this.state.get(e.mementoOriginatorKey),t)&&(this.state.set(e.mementoOriginatorKey,t),this.restoreState(e))}restoreState(e){let{caretaker:t,state:i}=this;if(!i.has(e.mementoOriginatorKey))return;let s=i.get(e.mementoOriginatorKey);t.restore({version:t.version,[e.mementoOriginatorKey]:s},e)}},Cw=`
vendor: 59,552 bytes, line 205
205.ag-charts-wrapper,.ag-charts-wrapper:focus,.ag-charts-wrapper:after,.ag-charts-wrapper:before,.ag-charts-wrapper *,.ag-charts-wrapper *:focus,.ag-charts-wrapper *:after,.ag-charts-wrapper *:before{box-sizing:border-box;outline:none}.ag-charts-wrapper{position:relative;user-select:none}.ag-charts-canvas-center{width:100%;height:100%;position:absolute;touch-action:auto;display:flex;align-items:var(--ag-charts-align);justify-content:var(--ag-charts-justify)}.ag-charts-canvas-container,.ag-charts-canvas{position:relative;user-select:none}.ag-charts-canvas-container>*,.ag-charts-canvas>*{display:block;pointer-events:none}.ag-charts-series-area{opacity:0;pointer-events:auto;position:absolute}.ag-charts-series-area:focus-visible{opacity:1}.ag-charts-canvas-proxy,.ag-charts-canvas-overlay{inset:0;pointer-events:none;position:absolute;user-select:none}.ag-charts-canvas-overlay>*{position:absolute;pointer-events:auto}.ag-charts-theme-default,.ag-charts-theme-default-dark{--ag-charts-active-color: var(--ag-active-color, #2196f3);--ag-charts-background-color: var(--ag-background-color, #fff);--ag-charts-foreground-color: var(--ag-foreground-color, #181d1f);--ag-charts-border-color: var(--ag-border-color, #dddddd);--ag-charts-hover-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12%);--ag-charts-font-family: "Verdana", sans-serif;--ag-charts-font-size: var(--ag-font-size, 14px);--ag-charts-size: var(--ag-grid-size, 8px);--ag-charts-border: var(--ag-charts-border-color) var(--ag-borders, solid 1px);--ag-charts-border-critical: var(--ag-borders-critical, solid 1px);--ag-charts-layer-ui-overlay: 5;--ag-charts-layer-tooltip: 4;--ag-charts-layer-toolbar: 3;--ag-charts-layer-crosshair: 2;--ag-charts-layer-annotations: 1;--ag-charts-align: center;--ag-charts-justify: center;--ag-charts-axis-label-background-color: #474747;--ag-charts-axis-label-color: #ffffff;--ag-charts-toolbar-foreground-color: var(--ag-header-foreground-color, var(--ag-charts-foreground-color));--ag-charts-toolbar-background-color: var( --ag-header-background-color, color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 2%) );--ag-charts-toolbar-size: 34px;--ag-charts-toolbar-size-small: 24px;--ag-charts-toolbar-border: var(--ag-charts-border-critical, solid 1px) var(--ag-charts-border-color);--ag-charts-toolbar-hover-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12% );--ag-charts-toolbar-focus-color: var(--ag-charts-active-color);--ag-charts-toolbar-active-background-color: var(--ag-charts-toolbar-hover-color);--ag-charts-toolbar-active-color: var(--ag-charts-active-color);--ag-charts-toolbar-disabled-foreground-color: var( --ag-disabled-foreground-color, color-mix(in srgb, transparent, var(--ag-charts-toolbar-foreground-color) 50%) );--ag-charts-toolbar-disabled-background-color: color-mix( in srgb, var(--ag-charts-toolbar-background-color), var(--ag-charts-toolbar-foreground-color) 6% );--ag-charts-toolbar-gap: var(--ag-charts-size);--ag-charts-toolbar-font-size: 13px;--ag-charts-toolbar-font-size-small: 12px;--ag-charts-toolbar-button-padding: 6px;--ag-charts-toolbar-button-padding-small: 1px;--ag-charts-popover-background-color: var(--ag-charts-toolbar-background-color);--ag-charts-popover-foreground-color: var(--ag-charts-toolbar-foreground-color);--ag-charts-popover-border: var(--ag-charts-toolbar-border);--ag-charts-popover-border-radius: var(--ag-border-radius, 4px);--ag-charts-popover-active-color: var(--ag-charts-toolbar-active-color);--ag-charts-popover-hover-color: var(--ag-charts-toolbar-hover-color);--ag-charts-popover-active-background-color: var(--ag-charts-toolbar-active-background-color);--ag-charts-popover-font-size: 14px;--ag-charts-popover-font-size-small: var(--ag-charts-toolbar-font-size-small);--ag-charts-dialog-input-group-label-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color) 55%);--ag-charts-dialog-tab-color--inactive: color-mix(in srgb, transparent, var(--ag-charts-foreground-color) 55%);--ag-charts-button-radius: var(--ag-border-radius, 4px);--ag-charts-focus-border-color: var(--ag-input-focus-border-color, var(--ag-charts-active-color));--ag-charts-focus-border: solid 1px var(--ag-charts-focus-border-color);--ag-charts-focus-border-shadow: var( --ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color, var(--ag-charts-active-color)) 20%) );--ag-charts-focus-box-shadow: var(--box-shadow), 0 0 0 2px #fff8, var(--ag-charts-focus-border-shadow);--ag-charts-icon-font-family: "agChartsDefault";--ag-charts-icon-font-weight: normal;--ag-charts-icon-font-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color), 90%);--ag-charts-icon-size: 20px;--ag-charts-input-background-color: var(--ag-charts-background-color);--ag-charts-input-background-color--hover: var(--ag-charts-hover-color);--ag-charts-input-background-color--active: var(--ag-charts-hover-color);--ag-charts-input-border-color: var(--ag-charts-border-color);--ag-charts-input-border-color--active: var(--ag-charts-active-color);--ag-charts-input-border-radius: var(--ag-border-radius, 4px);--ag-charts-input-color--active: var(--ag-charts-active-color);--ag-charts-input-focus-outline: var(--ag-charts-focus-border);--ag-charts-input-focus-box-shadow: var(--ag-charts-focus-border-shadow);--ag-charts-input-font-family: var(--ag-charts-font-family);--ag-charts-input-font-size: var(--ag-charts-font-size);--ag-charts-input-padding: 8px;--ag-charts-input-padding-large: 10px;--ag-charts-input-placeholder-color: #888888;--ag-charts-input-spacing: 8px;--ag-charts-input-transition-duration: .25s;--ag-charts-input-transition-duration--fast: .1s;--ag-charts-input-transition-timing-function: ease-out;--ag-charts-input-checkbox-background-color: #babbbc;--ag-charts-input-checkbox-background-color--checked: var(--ag-charts-active-color)}.ag-charts-theme-default-dark{--ag-charts-background-color: var(--ag-background-color, color-mix(in srgb, #fff, #182230 97%));--ag-charts-foreground-color: var(--ag-foreground-color, #fff);--ag-charts-border-color: var(--ag-border-color, rgba(255, 255, 255, .16));--ag-charts-hover-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 18%);--ag-charts-axis-label-background-color: #9caebb;--ag-charts-axis-label-color: #000000;--ag-charts-toolbar-background-color: var(--ag-header-background-color, color-mix(in srgb, #fff, #182230 93%));--ag-charts-toolbar-hover-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 18% );--ag-charts-dialog-input-group-label-text-color: #ffffff;--ag-charts-focus-border-shadow: var( --ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color, var(--ag-charts-active-color)) 20%) );--ag-charts-input-placeholder-color: #aaaaaa}.ag-charts-icon{display:block;width:var(--ag-charts-icon-size);height:var(--ag-charts-icon-size);speak:none;speak:never;mask:var(--icon) center / contain no-repeat;background-color:currentColor;transition:background-color .25s ease-in-out}.ag-charts-icon-align-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNyAxMGg2djFIN3pNNCA3aDEydjFINHptMSA2aDEwdjFINXoiLz48L3N2Zz4=)}.ag-charts-icon-align-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNCAxMGg2djFINHptMC0zaDEydjFINHptMCA2aDEwdjFINHoiLz48L3N2Zz4=)}.ag-charts-icon-align-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTAgMTBoNnYxaC02ek00IDdoMTJ2MUg0em0yIDZoMTB2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-arrow-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1LjI5MyA0LjVIMTIuNXYtMUgxN3Y0aC0xVjUuMjA3bC05LjY0NiA5LjY0Ny0uNzA4LS43MDh6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDE2YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwbS0yLjUgMS41YTEuNSAxLjUgMCAxIDAgMC0zIDEuNSAxLjUgMCAwIDAgMCAzIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-arrow-down-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDhMMS41IDhMMTAgMThMMTguNSA4TDE0IDhMMTQgM0w2IDNMNiA4Wk03IDRMNyA5SDMuNjYyNDRMMTAgMTYuNDU2TDE2LjMzNzYgOUwxMyA5TDEzIDRMNyA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-arrow-up-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNCAxMkgxOC41TDEwIDJMMS41IDEySDZMNi4wMDAwMiAxN0gxNFYxMlpNMTMgMTZWMTFIMTYuMzM3NkwxMCAzLjU0NDA1TDMuNjYyNDQgMTFIN0w3LjAwMDAyIDE2SDEzWiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-callout-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtNC41MTRhMjYgMjYgMCAwIDAtMi4wMTcgMS41NGwtLjMxNC4yNmMtLjU1LjQ1Ny0xLjExNS45MjYtMS43NiAxLjQtLjY2OS40OTEtMS41NjItLjAxMi0xLjU2Mi0uOFYxNEg0LjVBMS41IDEuNSAwIDAgMSAzIDEyLjV6TTQuNSA0YS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWgxLjgzM3YzLjM3MmEzNiAzNiAwIDAgMCAxLjY3OC0xLjMzOGwuMzItLjI2NWEyNiAyNiAwIDAgMSAyLjIyNS0xLjY4NWwuMTI2LS4wODRIMTUuNWEuNS41IDAgMCAwIC41LS41di04YS41LjUgMCAwIDAtLjUtLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyAxdjNoMnYxMkg3djNINnYtM0g0VjRoMlYxek01IDVoM3YxMEg1ek0xMSAxNFY2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6bTEtN2gzdjZoLTN6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-close{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNSA1IDEwIDEwTTUgMTUgMTUgNSIgc3Ryb2tlPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-comment-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy41MTMgMy45OTVhNi41IDYuNSAwIDAgMSA2LjA5OCAxMS40MWMtLjU4OC4zOTMtMS4yMTcuNTM2LTEuODI5LjU4NWExMyAxMyAwIDAgMS0xLjI3LjAxN0EyNyAyNyAwIDAgMCAxMCAxNkg0LjVhLjUuNSAwIDAgMS0uNS0uNVYxMHEwLS4yNDctLjAwNy0uNTEzYy0uMDA4LS40MTYtLjAxNi0uODU3LjAxNy0xLjI2OS4wNS0uNjEyLjE5Mi0xLjI0LjU4NS0xLjgzYTYuNSA2LjUgMCAwIDEgMi45MTgtMi4zOTNtMy41Ni42MWE1LjUgNS41IDAgMCAwLTUuNjQ2IDIuMzRjLS4yNjYuMzk3LS4zNzkuODQyLS40MiAxLjM1NC0uMDMuMzYtLjAyMi43MTgtLjAxNSAxLjEwOFE1IDkuNjg5IDUgMTB2NWg1cS4zMTEuMDAxLjU5My4wMDhjLjM5LjAwNy43NDcuMDE1IDEuMTA4LS4wMTUuNTEyLS4wNDEuOTU3LS4xNTQgMS4zNTUtLjQyYTUuNSA1LjUgMCAwIDAtMS45ODMtOS45NjciIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-crosshair-add-line{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-date-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAyaDF2MTZIMnptMTUgMGgxdjE2aC0xeiIgZmlsbD0iIzE4MUQxRiIvPjxwYXRoIGQ9Ik0xMy4xNTcgMTFINXYtMWg3Ljc5M0wxMSA4LjIwN2wuNzA3LS43MDcgMy4xODIgMy4xODItMy4xODIgMy4xODItLjcwNy0uNzA3eiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-date-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMyAySDJ2MTZoMXptMy41MDcgNC44OUw4LjUgNC44OTVWMTBINXYxaDMuNXY3aDF2LTdoNS4wODhsLTEuOTU3IDEuOTU3LjcwNy43MDcgMy4xODItMy4xODJMMTMuMzM4IDcuM2wtLjcwNy43MDdMMTQuNjI0IDEwSDkuNVY0LjkzMmwxLjk1NyAxLjk1Ny43MDctLjcwN0w4Ljk4MiAzIDUuOCA2LjE4MnoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-delete{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTguNDk2IDguOTk2QS41LjUgMCAwIDEgOSA5LjQ5MnY0YS41LjUgMCAxIDEtMSAuMDA4di00YS41LjUgMCAwIDEgLjQ5Ni0uNTA0TTEyIDkuNWEuNS41IDAgMCAwLTEgMHY0YS41LjUgMCAwIDAgMSAweiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTYgNVYzLjVBMi41IDIuNSAwIDAgMSA4LjUgMWgzQTIuNSAyLjUgMCAwIDEgMTQgMy41VjVoMi44MzNhLjUuNSAwIDAgMSAwIDFIMTV2MTAuMjVjMCAuNDE1LS4wNjYuODYzLS4zIDEuMjIxLS4yNTcuMzk0LS42NzIuNjEyLTEuMi42MTJoLTdjLS41MjggMC0uOTQzLS4yMTgtMS4yLS42MTItLjIzNC0uMzU4LS4zLS44MDYtLjMtMS4yMjFWNkgzLjMzM2EuNS41IDAgMCAxIDAtMXptMS0xLjVBMS41IDEuNSAwIDAgMSA4LjUgMmgzQTEuNSAxLjUgMCAwIDEgMTMgMy41VjVIN3pNNiAxNi4yNVY2aDh2MTAuMjVjMCAuMzM1LS4wNTkuNTU0LS4xMzguNjc1LS4wNTUuMDg1LS4xNC4xNTgtLjM2Mi4xNThoLTdjLS4yMjIgMC0uMzA3LS4wNzMtLjM2Mi0uMTU4LS4wOC0uMTIxLS4xMzgtLjM0LS4xMzgtLjY3NSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-disjoint-channel,.ag-charts-icon-disjoint-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTkuMDI4IDE3LjQ2YTIuMjUgMi4yNSAwIDAgMC00LjA5Mi0xLjg1bC05LjUxMS0yLjM3OGEyLjI1IDIuMjUgMCAxIDAtLjIyNS45NzRsOS40NzUgMi4zNjlhMi4yNTEgMi4yNTEgMCAwIDAgNC4zNTMuODg2bS0xLjY2Mi0xLjk2NWExLjI1IDEuMjUgMCAxIDEtLjg4NSAyLjMzOCAxLjI1IDEuMjUgMCAwIDEgLjg4NS0yLjMzOE00LjM0MyAxMy42NjlhMS4yNSAxLjI1IDAgMSAwLTIuMzM4LS44ODUgMS4yNSAxLjI1IDAgMCAwIDIuMzM4Ljg4NU0zLjk3IDguNzY5YTIuMjUgMi4yNSAwIDAgMCAxLjQ1NS0yLjExbDkuNTExLTIuMzc4YTIuMjUgMi4yNSAwIDEgMC0uMjYtLjk2NUw1LjIgNS42ODVhMi4yNSAyLjI1IDAgMSAwLTEuMjMgMy4wODRtLjM3My0yLjU0N2ExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjc1LTMuNDM4YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-drag-handle{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjcuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjxjaXJjbGUgY3g9IjEzLjc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iMTMuNzUiIGN5PSIxMS43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjExLjc1IiByPSIuNzUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjUiLz48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iMTEuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjwvc3ZnPg==)}.ag-charts-icon-fill-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtOC4wNzEgNC4wNi0uOTI0LS45MjQuNzA3LS43MDcgNy4yODggNy4yODgtNC45NSA0Ljk1YTMuNSAzLjUgMCAwIDEtNC45NSAwbC0xLjQxNC0xLjQxNGEzLjUgMy41IDAgMCAxIDAtNC45NXptLjcwNy43MDhMNC41MzYgOS4wMWEyLjUgMi41IDAgMCAwIDAgMy41MzZMNS45NSAxMy45NmEyLjUgMi41IDAgMCAwIDMuNTM1IDBsNC4yNDMtNC4yNDN6bTYuOSA3LjIwMi0uMzQ1LjM2My0uMzQ0LS4zNjNhLjUuNSAwIDAgMSAuNjg4IDBtLS4zNDUgMS4wOGE4IDggMCAwIDAtLjI4LjMyMyA0LjMgNC4zIDAgMCAwLS40MDkuNTgyYy0uMTEzLjIwMS0uMTQ0LjMyNi0uMTQ0LjM3OGEuODMzLjgzMyAwIDAgMCAxLjY2NyAwYzAtLjA1Mi0uMDMxLS4xNzctLjE0NC0uMzc4YTQuMyA0LjMgMCAwIDAtLjQxLS41ODIgOCA4IDAgMCAwLS4yOC0uMzIybS0uMzQ0LTEuMDguMzQ0LjM2My4zNDQtLjM2My4wMDIuMDAyLjAwNC4wMDQuMDEzLjAxMmE2IDYgMCAwIDEgLjIwNi4yMDhjLjEzMS4xMzYuMzA4LjMyNy40ODUuNTQ1LjE3Ni4yMTUuMzYzLjQ2Ny41MDcuNzI0LjEzNy4yNDMuMjczLjU1My4yNzMuODY4YTEuODMzIDEuODMzIDAgMSAxLTMuNjY3IDBjMC0uMzE1LjEzNi0uNjI1LjI3My0uODY4LjE0NC0uMjU3LjMzLS41MDkuNTA3LS43MjRhOSA5IDAgMCAxIC42NDUtLjcwOGwuMDQ2LS4wNDUuMDEzLS4wMTIuMDA0LS4wMDR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-hollow-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1vcGFjaXR5PSIuMTUiIGQ9Ik01IDVoM3YxMEg1eiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMXYzaDJ2MTJIN3YzSDZ2LTNINFY0aDJWMXpNNSA1aDN2MTBINXptNyAyaDN2NmgtM3ptLTEgN1Y2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-horizontal-line,.ag-charts-icon-horizontal-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNLjUgOS41aDcuMzA2YTIuMjUgMi4yNSAwIDAgMSA0LjM4OCAwSDE5LjV2MWgtNy4zMDZhMi4yNSAyLjI1IDAgMCAxLTQuMzg4IDBILjV6bTkuNSAxLjc1YTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQuMjQyIDIuNzIyYy0uNjEyIDAtMS4yLjI0My0xLjYzMi42NzVsLTEuMzQzIDEuMzQ0YS41LjUgMCAwIDAtLjExMi4xMTJMNC4wNSAxMS45NTljLS4yMDcuMjA3LS4zNi40Ni0uNDQ2Ljc0di4wMDFsLS42OSAyLjc2N3YuMDAyYS44Mi44MiAwIDAgMCAxLjAyMiAxLjAyMWguMDAybDIuNjM0LS44MjJjLjI4LS4wODUuNTM0LS4yMzcuNzQtLjQ0M2w3LjEwNy03LjEwOGEuNS41IDAgMCAwIC4xMTItLjExMmwxLjM0My0xLjM0M2EyLjMwOCAyLjMwOCAwIDAgMC0xLjYzMi0zLjk0TTE0LjEyMiA3bDEuMDQ0LTEuMDQ1YTEuMzA4IDEuMzA4IDAgMSAwLTEuODQ5LTEuODVMMTIuMjcxIDUuMTV6bS0yLjU1OC0xLjE0Mi02LjgwNyA2LjgwOWEuOC44IDAgMCAwLS4xOTYuMzI1bC0uNzUgMi40NjggMi40Ny0uNzQ5YS44LjggMCAwIDAgLjMyNS0uMTk0bDYuODA4LTYuODF6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTcuMzYyIDQuODczLTQuNTk0IDYuNjU0LTQuODUtMy4zMTctNC4yNTEgNi45NzctLjg1NC0uNTJMNy42MTIgNi43OWw0Ljg5OSAzLjM1IDQuMDI4LTUuODM2eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-line-style-dashed{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDR2MUgyem0xMiAwaDR2MWgtNHpNOCA5aDR2MUg4eiIvPjwvc3ZnPg==)}.ag-charts-icon-line-style-dotted{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIyLjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTAuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSIxMi41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjE0LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-line-style-solid{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDE2djFIMnoiLz48L3N2Zz4=)}.ag-charts-icon-line-with-markers-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTk4IDQuODg4LTMuNTU2IDQuOTE4YTIuMjUgMi4yNSAwIDEgMS0zLjg2Ni43NWwtMS40MzItLjlhMi4yNCAyLjI0IDAgMCAxLTIuMDA5LjQzNWwtMy44MjggNi40MjgtLjg2LS41MTJMNi40NSA5LjYyM2EyLjI1IDIuMjUgMCAxIDEgMy41MS0uNzYxbDEuMzI5LjgzNWEyLjI0IDIuMjQgMCAwIDEgMi41NTctLjQ5N2wzLjU0Mi00Ljg5OHptLTQuOTYgNS4xNTNhMS4yNSAxLjI1IDAgMSAwLS42NCAyLjQxOSAxLjI1IDEuMjUgMCAwIDAgLjY0LTIuNDE5TTkuMSA4LjMyMXEuMDY2LS4xOTIuMDY3LS40MDRhMS4yNSAxLjI1IDAgMSAwLS4wNjcuNDA0IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-lock,.ag-charts-icon-locked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuMjA3IDMuNzY0YTIuODk0IDIuODk0IDAgMCAwLTIuODk1IDIuODk0VjloNS43ODlWNi42NThhMi44OTQgMi44OTQgMCAwIDAtMi44OTUtMi44OTRNMTQuMSA5VjYuNjU4YTMuODk0IDMuODk0IDAgMSAwLTcuNzg5IDB2Mi4zNDlBMi41IDIuNSAwIDAgMCA0IDExLjV2M0EyLjUgMi41IDAgMCAwIDYuNSAxN2g4YTIuNSAyLjUgMCAwIDAgMi41LTIuNXYtM0EyLjUgMi41IDAgMCAwIDE0LjUgOXpNNi41IDEwQTEuNSAxLjUgMCAwIDAgNSAxMS41djNBMS41IDEuNSAwIDAgMCA2LjUgMTZoOGExLjUgMS41IDAgMCAwIDEuNS0xLjV2LTNhMS41IDEuNSAwIDAgMC0xLjUtMS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-measurer-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibTQuNDYxIDEyLjcxIDEuNTMyLTEuNTMxIDEuNDE0IDEuNDE0LjcwNy0uNzA3TDYuNyAxMC40NzJsMS41MzItMS41MzMgMiAyIC43MDctLjcwNy0yLTIgNi4wMS02LjAxIDIuODMgMi44MjhMNS4wNSAxNy43NzggMi4yMjIgMTQuOTVsMS41MzItMS41MzIgMS40MTQgMS40MTQuNzA3LS43MDd6TS44MDggMTQuOTVsLjcwNy0uNzA3TDE0LjI0MyAxLjUxNWwuNzA3LS43MDcuNzA3LjcwNyAyLjgyOCAyLjgyOC43MDcuNzA3LS43MDcuNzA3TDUuNzU3IDE4LjQ4NWwtLjcwNy43MDctLjcwNy0uNzA3LTIuODI4LTIuODI4em0xMS4wNzgtNi44MzVMMTAuNDcgNi43bC43MDctLjcwNyAxLjQxNSAxLjQxNHptLjgyNC0zLjY1NCAxIDEgLjcwOC0uNzA3LTEtMXoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-note-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtMy4yMWwtMS40NjkgMi41N2ExIDEgMCAwIDEtMS42ODIuMDg1TDcuMjQzIDE0SDQuNUExLjUgMS41IDAgMCAxIDMgMTIuNXpNNC41IDRhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDMuMjU3bDIuMTk2IDMuMDc0TDExLjcxIDEzaDMuNzlhLjUuNSAwIDAgMCAuNS0uNXYtOGEuNS41IDAgMCAwLS41LS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi41IDYuNUEuNS41IDAgMCAxIDcgNmg2YS41LjUgMCAwIDEgMCAxSDdhLjUuNSAwIDAgMS0uNS0uNU02LjUgOS41QS41LjUgMCAwIDEgNyA5aDZhLjUuNSAwIDAgMSAwIDFIN2EuNS41IDAgMCAxLS41LS41IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-ohlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTEzIDExaC0zdi0xaDNWM2gxdjJoNHYxaC00djExaC0xek02IDE3di0yaDN2LTFINlY0SDV2MUgydjFoM3YxMXoiLz48L3N2Zz4=)}.ag-charts-icon-pan-end{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0ibTYuNjQ2IDEzLjgxMy0uMzUzLjM1NC43MDcuNzA3LjM1NC0uMzU0ek0xMS4xNjYgMTBsLjM1NC4zNTQuMzU0LS4zNTQtLjM1NC0uMzU0ek03LjM1NSA1LjQ4IDcgNS4xMjZsLS43MDcuNzA3LjM1My4zNTR6bTAgOS4wNCA0LjE2Ni00LjE2Ni0uNzA3LS43MDgtNC4xNjcgNC4xNjd6bTQuMTY2LTQuODc0TDcuMzU0IDUuNDhsLS43MDguNzA3IDQuMTY3IDQuMTY3ek0xMy4wODMgNXYxMGgxVjV6Ii8+PC9zdmc+)}.ag-charts-icon-pan-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuNzkgNS44MzMgOC42MjUgMTBsNC4xNjYgNC4xNjctLjcwNy43MDdMNy4yMSAxMGw0Ljg3My00Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy4yMSAxNC4xNjcgMTEuMzc2IDEwIDcuMjEgNS44MzNsLjcwNy0uNzA3TDEyLjc5IDEwbC00Ljg3MyA0Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-start{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgNXYxMGgxVjV6TTkuNjI0IDEwbDQuMTY2LTQuMTY3LS43MDctLjcwN0w4LjIxIDEwbDQuODc0IDQuODc0LjcwNy0uNzA3eiIvPjwvc3ZnPg==)}.ag-charts-icon-parallel-channel,.ag-charts-icon-parallel-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzIgNS4zMzFBMi4yNSAyLjI1IDAgMSAwIDE0LjcwNSAzLjZsLTkuNDkgNC41NjJhMi4yNSAyLjI1IDAgMSAwIC4yMDkgMS4wMWw5LjY2Mi00LjY0NmEyLjI1IDIuMjUgMCAwIDAgMi42MzQuODA1bS4zNzMtMi41NDdhMS4yNSAxLjI1IDAgMSAxLTIuMzM4Ljg4NSAxLjI1IDEuMjUgMCAwIDEgMi4zMzgtLjg4NU00LjM0MyA4LjY3YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODVNNS4zMDcgMTYuNzI4YTIuMjUgMi4yNSAwIDEgMS0uNTI1LS44NThsOS45MjMtNC43N2EyLjI1IDIuMjUgMCAxIDEgLjM4MS45MjZ6bS0uOTY0LjI3NGExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjAyMy01LjEwNmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-position-bottom{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzem0zLTNoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgMTNoOHYxSDZ6Ii8+PC9zdmc+)}.ag-charts-icon-position-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMyAxMGgxNHYxSDN6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDdoOHYxSDZ6bTAgNmg4djFINnoiLz48L3N2Zz4=)}.ag-charts-icon-position-top{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzeiIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik02IDdoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDEzaDh2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-price-label-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNC41IDNBMS41IDEuNSAwIDAgMCAzIDQuNVYxM2ExLjUgMS41IDAgMCAwIDEuNSAxLjVoLjgzM3YuMDU3Yy4yNDItLjI5OS41OTctLjUwMyAxLS41NDhWMTMuNUg0LjVBLjUuNSAwIDAgMSA0IDEzVjQuNWEuNS41IDAgMCAxIC41LS41aDExYS41LjUgMCAwIDEgLjUuNXY4YS41LjUgMCAwIDEtLjUuNWgtNC44MThsLS4xMjYuMDg0YTI2IDI2IDAgMCAwLTIuMjI1IDEuNjg1bC0uMzIuMjY1LS4wNjguMDU2YTEuNSAxLjUgMCAwIDEtMi42MDkgMS4zNTRjLjAzMy43NjMuOTA1IDEuMjM4IDEuNTYuNzU2LjY0Ni0uNDc0IDEuMjEtLjk0MyAxLjc2MS0xLjRsLjMxMy0uMjZBMjYgMjYgMCAwIDEgMTAuOTg2IDE0SDE1LjVhMS41IDEuNSAwIDAgMCAxLjUtMS41di04QTEuNSAxLjUgMCAwIDAgMTUuNSAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43MTYgMTQuODE1YTIuMjUgMi4yNSAwIDEgMS00LjIxIDEuNTkzIDIuMjUgMi4yNSAwIDAgMSA0LjIxLTEuNTkzbS0xLjY2MiAxLjk2NmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS41IDYuMjI4IDcuMTY3IDguMzc2IDYuNSA3Ljc2MiA5LjUgNWwzIDIuNzYyLS42NjcuNjE0eiIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik0yIDE4di0xaDE2djF6TTIgM1YyaDE2djF6IiBmaWxsPSIjMTgxRDFGIi8+PC9zdmc+)}.ag-charts-icon-reset{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuMDQgNC40NDVhNS44MSA1LjgxIDAgMCAwLTcuMjU3IDIuNDUzLjUuNSAwIDAgMS0uODY1LS41MDJBNi44MSA2LjgxIDAgMSAxIDMgOS44MTNhLjUuNSAwIDAgMSAxIDAgNS44MSA1LjgxIDAgMSAwIDguMDQtNS4zNjgiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjg5IDMuMDAyYS41LjUgMCAwIDEgLjUuNXYyLjY1NWgyLjY1NWEuNS41IDAgMCAxIDAgMUg0LjI5YS41LjUgMCAwIDEtLjUtLjVWMy41MDJhLjUuNSAwIDAgMSAuNS0uNSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-settings{--icon: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkIj48cGF0aCBkPSJNMTAgMTNhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2bTAtMWEyIDIgMCAxIDEtLjAwMS0zLjk5OUEyIDIgMCAwIDEgMTAgMTIiLz48cGF0aCBkPSJNMi4zMSAxNC4zNDVjLS44MTctMS40OTEuMDI3LTIuNDk5LjQ3NC0yLjg2NS41MzEtLjQzNC45NjktLjM2NS45NzItMS40OC0uMDAzLTEuMTE1LS40NDEtMS4wNDYtLjk3Mi0xLjQ4MS0uNDU0LS4zNzEtMS4zMTctMS40MDUtLjQzNC0yLjkzNmwuMDA1LS4wMDljLjg4NC0xLjUyIDIuMjA3LTEuMjkgMi43NTUtMS4wODMuNjQxLjI0My44MDEuNjU2IDEuNzY4LjEwMS45NjQtLjU2LjY4Ni0uOTA0Ljc5Ni0xLjU4Mi4wOTQtLjU3OC41NTktMS44NDMgMi4zMjYtMS44NDNoLjAxYzEuNzU5LjAwNSAyLjIyMiAxLjI2NiAyLjMxNiAxLjg0My4xMS42NzgtLjE2OCAxLjAyMi43OTYgMS41ODIuOTY3LjU1NSAxLjEyNy4xNDIgMS43NjgtLjEwMS41NDktLjIwOCAxLjg3Ni0uNDM4IDIuNzYgMS4wOTJzLjAyIDIuNTY1LS40MzQgMi45MzZjLS41MzEuNDM1LS45NjkuMzY2LS45NzIgMS40ODEuMDAzIDEuMTE1LjQ0MSAxLjA0Ni45NzIgMS40OC40NTQuMzcyIDEuMzE3IDEuNDA2LjQzNCAyLjkzN2wtLjAwNS4wMDljLS44ODQgMS41Mi0yLjIwNyAxLjI5LTIuNzU1IDEuMDgzLS42NDEtLjI0My0uODAxLS42NTYtMS43NjgtLjEwMS0uOTY0LjU2LS42ODYuOTA0LS43OTYgMS41ODEtLjA5NC41NzktLjU1OSAxLjg0NC0yLjMyNiAxLjg0NGgtLjAxYy0xLjc1OS0uMDA1LTIuMjIyLTEuMjY2LTIuMzE2LTEuODQ0LS4xMS0uNjc3LjE2OC0xLjAyMS0uNzk2LTEuNTgxLS45NjctLjU1NS0xLjEyNy0uMTQyLTEuNzY4LjEwMS0uNTQ5LjIwOC0xLjg3Ni40MzgtMi43Ni0xLjA5MmwtLjAyLS4wMzZ6TTkuOTg0IDIuMTYySDEwYzEuMzU1IDAgMS4zNDIgMS4wMzkgMS4zNTMgMS40MjUuMDA4LjMxMi4wNCAxLjE2IDEuMjU5IDEuODcybC4wMTUuMDA4YzEuMjI1LjcgMS45NzYuMzA0IDIuMjUxLjE1NS4zMzctLjE4MyAxLjIyNi0uNzExIDEuOTAyLjQ0NWwuMDA4LjAxNGMuNjc4IDEuMTczLS4yMjkgMS42ODItLjU1OCAxLjg4NC0uMjY2LjE2My0uOTg0LjYxNS0uOTkxIDIuMDI3di4wMTZjLjAwNyAxLjQxMi43MjUgMS44NjQuOTkxIDIuMDI3LjMyOC4yMDEgMS4yMjkuNzA3LjU2NiAxLjg3bC0uMDA4LjAxNGMtLjY3NyAxLjE3NC0xLjU3MS42NDMtMS45MS40NTktLjI3NS0uMTQ5LTEuMDI2LS41NDUtMi4yNTEuMTU0bC0uMDE1LjAwOWMtMS4yMTkuNzEyLTEuMjUxIDEuNTYtMS4yNTkgMS44NzItLjAxMS4zODYuMDAyIDEuNDI1LTEuMzUzIDEuNDI1cy0xLjM0Mi0xLjAzOS0xLjM1My0xLjQyNWMtLjAwOC0uMzEyLS4wNC0xLjE2LTEuMjU5LTEuODcybC0uMDE1LS4wMDljLTEuMjI1LS42OTktMS45NzYtLjMwMy0yLjI1MS0uMTU0LS4zMzYuMTgzLTEuMjE5LjcwNi0xLjg5NC0uNDMybC0uMDE2LS4wMjdjLS42NzgtMS4xNzQuMjI5LTEuNjgyLjU1OC0xLjg4NC4yNjYtLjE2My45ODQtLjYxNS45OTEtMi4wMjd2LS4wMTZjLS4wMDctMS40MTItLjcyNS0xLjg2NC0uOTkxLTIuMDI3LS4zMjgtLjIwMS0xLjIyOS0uNzA3LS41NjYtMS44N2wuMDA4LS4wMTRjLjY3Ny0xLjE3NCAxLjU3MS0uNjQzIDEuOTEtLjQ1OS4yNzUuMTQ5IDEuMDI2LjU0NSAyLjI1MS0uMTU1bC4wMTUtLjAwOGMxLjIxOS0uNzEyIDEuMjUxLTEuNTYgMS4yNTktMS44NzIuMDEtLjM4NC0uMDAyLTEuNDE3IDEuMzM3LTEuNDI1Ii8+PC9zdmc+)}.ag-charts-icon-step-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzE4MUQxRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNiA0aDV2OGgzVjhoNXYxaC00djRoLTVWNUg3djEwSDJ2LTFoNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-text-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00IDRIMTZWN0gxNVY1SDEwLjVWMTVIMTRWMTZINlYxNUg5LjVWNUg1VjdINFY0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-trend-line,.ag-charts-icon-trend-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS4zMTQgMTAuOTM4YTIuMjUgMi4yNSAwIDEgMSAuMDEtMWg5LjM1MmEyLjI1IDIuMjUgMCAxIDEgLjAxIDF6bS0yLjE4OS43MjlhMS4yNSAxLjI1IDAgMSAwIDAtMi41IDEuMjUgMS4yNSAwIDAgMCAwIDIuNW0xMy43NSAwYTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock,.ag-charts-icon-unlocked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNjUxIDMuNWEyLjg5NCAyLjg5NCAwIDAgMC0yLjg5NCAyLjg5NFY5SDE0LjVhMi41IDIuNSAwIDAgMSAyLjUgMi41djNhMi41IDIuNSAwIDAgMS0yLjUgMi41aC04QTIuNSAyLjUgMCAwIDEgNCAxNC41di0zQTIuNSAyLjUgMCAwIDEgNi41IDloLjI1N1Y2LjM5NGEzLjg5NCAzLjg5NCAwIDEgMSA3Ljc4OSAwIC41LjUgMCAwIDEtMSAwQTIuODk0IDIuODk0IDAgMCAwIDEwLjY1IDMuNU02LjUgMTBBMS41IDEuNSAwIDAgMCA1IDExLjV2M0ExLjUgMS41IDAgMCAwIDYuNSAxNmg4YTEuNSAxLjUgMCAwIDAgMS41LTEuNXYtM2ExLjUgMS41IDAgMCAwLTEuNS0xLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-vertical-line,.ag-charts-icon-vertical-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNSA3LjgwNmEyLjI1IDIuMjUgMCAwIDEgMCA0LjM4OFYxOS41aC0xdi03LjMwNmEyLjI1IDIuMjUgMCAwIDEgMC00LjM4OFYuNWgxem0tLjUuOTQ0YTEuMjUgMS4yNSAwIDEgMSAwIDIuNSAxLjI1IDEuMjUgMCAwIDEgMC0yLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-zoom-in{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS41IDEwYS41LjUgMCAwIDEgLjUtLjVoOGEuNS41IDAgMCAxIDAgMUg2YS41LjUgMCAwIDEtLjUtLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-high-low-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyA0aDJ2MTJINFY0aDNNNSA1aDN2MTBINXpNMTEgMTRWNmg1djhoLTVtMS03aDN2NmgtM3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTYzIDEuODM3LTUuMzM0IDExLjYyMUw2Ljk1NyA4LjEybC00LjE5OSA5LjYyMi0uOTE2LS40IDQuNzU2LTEwLjlMMTIuNDkgMTEuOCAxNy4yNTQgMS40MnoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODI1IDIuNzA0LjU1IDEzLjc4NWwuOTAyLjQzIDQuNzI0LTkuOTE5IDYuMDM0IDUuMDI5IDMuMjU1LTguMTQtLjkyOC0uMzctMi43NDUgNi44NnptNy44NTIgMTQuNjM2IDUuNzgtMTMuMTM5LS45MTUtLjQwMi01LjIxOSAxMS44Ni02LjAwNS01LjUwNC0zLjI3OCA3LjY0OC45Mi4zOTQgMi43MjItNi4zNTJ6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljc1IDQuNWEuNzUuNzUgMCAwIDAtMS41IDB2Mi43NUg0LjVhLjc1Ljc1IDAgMCAwIDAgMS41aDIuNzV2Mi43NWEuNzUuNzUgMCAwIDAgMS41IDBWOC43NWgyLjc1YS43NS43NSAwIDAgMCAwLTEuNUg4Ljc1VjQuNVoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjc1IDhhLjc1Ljc1IDAgMCAxIC43NS0uNzVoN2EuNzUuNzUgMCAwIDEgMCAxLjVoLTdBLjc1Ljc1IDAgMCAxIDMuNzUgOFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-alt,.ag-charts-icon-zoom-in-alt-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+)}.ag-charts-icon-zoom-out-alt,.ag-charts-icon-zoom-out-alt-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=)}.ag-charts-icon-reset-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00LjQxMiA0LjA1OCAyLjc1IDIuMzk2VjYuNzVoLjc0NGEuNzYuNzYgMCAwIDAgLjAxMiAwaDMuNTk4TDUuNDc4IDUuMTI1YTQuMTI1IDQuMTI1IDAgMCAxIDIuNTIzLS44NzUgMy43NSAzLjc1IDAgMSAxLTMuMTE5IDUuODMzLjc1Ljc1IDAgMCAwLTEuMjQ3LjgzNEE1LjI1IDUuMjUgMCAxIDAgOCAyLjc1aC0uMDAzYTUuNjI1IDUuNjI1IDAgMCAwLTMuNTg1IDEuMzA4WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-left-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC4wMyA0LjQ3YS43NS43NSAwIDAgMSAwIDEuMDZMNy41NiA4bDIuNDcgMi40N2EuNzUuNzUgMCAxIDEtMS4wNiAxLjA2bC0zLTNhLjc1Ljc1IDAgMCAxIDAtMS4wNmwzLTNhLjc1Ljc1IDAgMCAxIDEuMDYgMFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-pan-right-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01Ljk3IDExLjUzYS43NS43NSAwIDAgMSAwLTEuMDZMOC40NCA4IDUuOTcgNS41M2EuNzUuNzUgMCAwIDEgMS4wNi0xLjA2bDMgM2EuNzUuNzUgMCAwIDEgMCAxLjA2bC0zIDNhLjc1Ljc1IDAgMCAxLTEuMDYgMFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-pan-start-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZmlyc3QiPjxwYXRoIGQ9Im0xNyAxOC02LTYgNi02Ii8+PHBhdGggZD0iTTcgNnYxMiIvPjwvc3ZnPg==)}.ag-charts-icon-pan-end-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tbGFzdCI+PHBhdGggZD0ibTcgMTggNi02LTYtNiIvPjxwYXRoIGQ9Ik0xNyA2djEyIi8+PC9zdmc+)}.ag-charts-icon-trend-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMi41IiBjeT0iOCIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxjaXJjbGUgY3g9IjEzLjUiIGN5PSI4IiByPSIxLjc1IiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMS41Ii8+PHBhdGggc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTQgOGg4Ii8+PC9zdmc+)}.ag-charts-icon-horizontal-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC4zODYgOC43NWEyLjUwMSAyLjUwMSAwIDAgMS00Ljc3MiAwSC43NWEuNzUuNzUgMCAwIDEgMC0xLjVoNC44NjRhMi41MDEgMi41MDEgMCAwIDEgNC43NzIgMGg0Ljg2NGEuNzUuNzUgMCAwIDEgMCAxLjVoLTQuODY0Wk05IDhhMSAxIDAgMSAxLTIgMCAxIDEgMCAwIDEgMiAwWiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-vertical-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljc1IDUuNjE0YTIuNTAxIDIuNTAxIDAgMCAxIDAgNC43NzJ2NC44NjRhLjc1Ljc1IDAgMCAxLTEuNSAwdi00Ljg2NGEyLjUwMSAyLjUwMSAwIDAgMSAwLTQuNzcyVi43NWEuNzUuNzUgMCAwIDEgMS41IDB2NC44NjRaTTggN2ExIDEgMCAxIDEgMCAyIDEgMSAwIDAgMSAwLTJaIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-parallel-channel-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC40MjQgNC45MmEyLjUgMi41IDAgMSAwLTMuMzc3LTIuMTRsLTYuNjMgMi45YTIuNTAxIDIuNTAxIDAgMSAwIC42MDcgMS4zNzJsNi41ODUtMi44OGEyLjUwMSAyLjUwMSAwIDAgMCAyLjgxNS43NDhabS4wNS0yLjY5M2ExIDEgMCAxIDEtMS44Ny43MDggMSAxIDAgMCAxIDEuODctLjcwOFptLTExIDQuNzVhMSAxIDAgMSAxLTEuODcuNzA4IDEgMSAwIDAgMSAxLjg3LS43MDhabTEuNTUgNi4wNzVhMi41MDEgMi41MDEgMCAxIDEtLjYwNy0xLjM3Mmw2LjYzLTIuOWEyLjUwMSAyLjUwMSAwIDEgMSAuNTYyIDEuMzkxbC02LjU4NSAyLjg4Wm0tMS41NS0uMDc1YTEgMSAwIDEgMS0xLjg3LjcwOCAxIDEgMCAwIDEgMS44Ny0uNzA4Wm0xMC40Mi0zLjQ2YTEgMSAwIDEgMC0uNzA5LTEuODcgMSAxIDAgMCAwIC43MDggMS44N1oiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-disjoint-channel-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC40MjQgNC45MmEyLjUgMi41IDAgMSAwLTMuMzgzLTIuNDUzTDQuNjkgNC4wNTVhMi41IDIuNSAwIDEgMCAuMzQ0IDEuNDZsNi4zOTItMS41OThhMi41MDEgMi41MDEgMCAwIDAgMyAxLjAwM1ptLjA1LTIuNjkzYTEgMSAwIDEgMS0xLjg3LjcwOCAxIDEgMCAwIDEgMS44Ny0uNzA4Wm0tMTEgMi43NWExIDEgMCAxIDEtMS44Ny43MDggMSAxIDAgMCAxIDEuODctLjcwOFptMS41NiA1LjQyYTIuNSAyLjUgMCAxIDAtLjM0NSAxLjQ2MWw2LjM1MiAxLjU4OGEyLjUgMi41IDAgMSAwIC4zODQtMS40NWwtNi4zOTItMS41OThabS0xLjU2LjUzOGExIDEgMCAxIDAtMS44Ny0uNzA4IDEgMSAwIDAgMCAxLjg3LjcwOFptMTAuNDIgMS40NjFhMSAxIDAgMSAxLS43MDkgMS44NyAxIDEgMCAwIDEgLjcwOC0xLjg3WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjc4OC41ODNhMi42MyAyLjYzIDAgMCAwLTEuODYuNzdMOS41NDQgMi43MzhhLjc1Ny43NTcgMCAwIDAtLjE0LjE0TDIuMDMyIDEwLjI1di4wMDFjLS4yNDIuMjQxLS40Mi41MzgtLjUyLjg2NGwtLjAwMi4wMDItLjg4IDIuOTAyLS4wMDEuMDAzYTEuMDgzIDEuMDgzIDAgMCAwIDEuMzUgMS4zNDdoLjAwMWwyLjkwMi0uODhoLjAwMWMuMzI2LS4xLjYyMy0uMjc3Ljg2NS0uNTE4di0uMDAxbDcuMzc1LTcuMzc2YS43NjMuNzYzIDAgMCAwIC4xMzktLjEzOWwxLjM4NC0xLjM4NEEyLjYzIDIuNjMgMCAwIDAgMTIuNzg4LjU4M1ptLS4xMjYgNC4zNTIuOTI0LS45MjRhMS4xMyAxLjEzIDAgMCAwLTEuNTk3LTEuNTk3bC0uOTI0LjkyNCAxLjU5NyAxLjU5N1ptLTIuNjU3LS41MzYtNi45MTMgNi45MTRIMy4wOWEuNTgzLjU4MyAwIDAgMC0uMTQ2LjI0MmwtLjY1MyAyLjE1MyAyLjE1NS0uNjU0YS41ODMuNTgzIDAgMCAwIC4yNDEtLjE0NGw2LjkxNC02LjkxNC0xLjU5Ny0xLjU5N1oiIGZpbGw9IiMwMDAiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDE2djE2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+)}.ag-charts-icon-delete-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjA4MyAyLjY2N2MwLS4wOS4wNTMtLjI0Mi4xOTctLjM4Ny4xNDUtLjE0NC4yOTctLjE5Ny4zODctLjE5N2gyLjY2N2MuMDg5IDAgLjI0MS4wNTMuMzg2LjE5Ny4xNDUuMTQ1LjE5Ny4yOTcuMTk3LjM4N3YuNTgzSDYuMDg0di0uNTgzWk01LjMzIDQuNzVIMTEuOTE3djguNTgzYzAgLjA5LS4wNTIuMjQyLS4xOTcuMzg3LS4xNDUuMTQ0LS4yOTcuMTk3LS4zODYuMTk3SDQuNjY3Yy0uMDkgMC0uMjQyLS4wNTMtLjM4Ny0uMTk3LS4xNDQtLjE0NS0uMTk3LS4yOTctLjE5Ny0uMzg3VjQuNzVINS4zM1ptLS43NDUtMS41di0uNTgzYzAtLjU3OC4yOC0xLjA5Mi42MzYtMS40NDcuMzU1LS4zNTYuODctLjYzNyAxLjQ0Ny0uNjM3aDIuNjY3Yy41NzcgMCAxLjA5MS4yODEgMS40NDcuNjM3LjM1NS4zNTUuNjM2Ljg3LjYzNiAxLjQ0N3YuNTgzSDE0YS43NS43NSAwIDAgMSAwIDEuNWgtLjU4M3Y4LjU4M2MwIC41NzgtLjI4MSAxLjA5Mi0uNjM2IDEuNDQ3LS4zNTYuMzU2LS44Ny42MzctMS40NDcuNjM3SDQuNjY3Yy0uNTc3IDAtMS4wOTItLjI4MS0xLjQ0Ny0uNjM3LS4zNTUtLjM1NS0uNjM3LS44Ny0uNjM3LTEuNDQ3VjQuNzVIMmEuNzUuNzUgMCAwIDEgMC0xLjVoMi41ODNabTIuMDgzIDMuMzMzYS43NS43NSAwIDAgMSAuNzUuNzV2NGEuNzUuNzUgMCAxIDEtMS41IDB2LTRhLjc1Ljc1IDAgMCAxIC43NS0uNzVabTMuNDE3Ljc1YS43NS43NSAwIDAgMC0xLjUgMHY0YS43NS43NSAwIDEgMCAxLjUgMHYtNFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-lock-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjE3MyAyLjg0YTIuNTgzIDIuNTgzIDAgMCAxIDQuNDEgMS44Mjd2MS45MTZINS40MTZWNC42NjdjMC0uNjg1LjI3My0xLjM0My43NTctMS44MjdaTTMuOTE3IDYuNTgzVjQuNjY3YTQuMDgzIDQuMDgzIDAgMCAxIDguMTY2IDB2MS45MTZoLjU4NGMxLjE1IDAgMi4wODMuOTMzIDIuMDgzIDIuMDg0djQuNjY2YzAgMS4xNS0uOTMzIDIuMDg0LTIuMDgzIDIuMDg0SDMuMzMzYTIuMDgzIDIuMDgzIDAgMCAxLTIuMDgzLTIuMDg0VjguNjY3YzAtMS4xNTEuOTMzLTIuMDg0IDIuMDgzLTIuMDg0aC41ODNabTcuNDE2IDEuNWgtOGEuNTgzLjU4MyAwIDAgMC0uNTgzLjU4NHY0LjY2NmMwIC4zMjIuMjYxLjU4NC41ODMuNTg0aDkuMzM0YS41ODMuNTgzIDAgMCAwIC41ODMtLjU4NFY4LjY2N2EuNTgzLjU4MyAwIDAgMC0uNTgzLS41ODRoLTEuMzM0WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjkyMyAyLjg0YTIuNTgzIDIuNTgzIDAgMCAxIDMuNjUzIDAgMyAzIDAgMCAxIC41Ny43OThjLjEzNC4yNzguMTcuNDc0LjE3LjU0NWEuNzUuNzUgMCAwIDAgMS41IDBjMC0uMzgxLS4xMzItLjgwOS0uMzItMS4xOThhNC41MDEgNC41MDEgMCAwIDAtLjg1OS0xLjIwNiA0LjA4MyA0LjA4MyAwIDAgMC02Ljk3IDIuODg4djEuOTE2aC0uNTg0QzIuOTMzIDYuNTgzIDIgNy41MTYgMiA4LjY2N3Y0LjY2NmMwIDEuMTUuOTMzIDIuMDg0IDIuMDgzIDIuMDg0aDkuMzM0YzEuMTUgMCAyLjA4My0uOTMzIDIuMDgzLTIuMDg0VjguNjY3YzAtMS4xNTEtLjkzMy0yLjA4NC0yLjA4My0yLjA4NGgtNy4yNVY0LjY2N2MwLS42ODUuMjcyLTEuMzQzLjc1Ni0xLjgyN1pNNS40MTcgOC4wODNINC4wODJhLjU4My41ODMgMCAwIDAtLjU4My41ODR2NC42NjZjMCAuMzIyLjI2MS41ODQuNTgzLjU4NGg5LjMzNGEuNTgzLjU4MyAwIDAgMCAuNTgzLS41ODRWOC42NjdhLjU4My41ODMgMCAwIDAtLjU4My0uNTg0aC04WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-plus-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXBsdXMiPjxwYXRoIGQ9Ik01IDEyaDE0Ii8+PHBhdGggZD0iTTEyIDV2MTQiLz48L3N2Zz4=)}.ag-charts-icon-crossline-add-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43NSA0LjVhLjc1Ljc1IDAgMCAwLTEuNSAwdjIuNzVINC41YS43NS43NSAwIDAgMCAwIDEuNWgyLjc1djIuNzVhLjc1Ljc1IDAgMCAwIDEuNSAwVjguNzVoMi43NWEuNzUuNzUgMCAwIDAgMC0xLjVIOC43NXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-input{--input-layer-active: 1;--input-layer-focus: 2;color:inherit;font-family:var(--ag-charts-input-font-family);font-size:var(--ag-charts-input-font-size);transition-duration:var(--ag-charts-input-transition-duration);transition-property:none;transition-timing-function:var(--ag-charts-input-transition-timing-function)}.ag-charts-input:focus-visible{outline:var(--ag-charts-input-focus-outline);box-shadow:var(--ag-charts-input-focus-box-shadow);z-index:var(--input-layer-focus)}.ag-charts-button{background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);cursor:pointer;padding:var(--ag-charts-input-padding);transition-property:background,border-color}.ag-charts-button:hover{background:var(--ag-charts-input-background-color--hover)}.ag-charts-button:has(.ag-charts-icon){padding:2px}.ag-charts-checkbox{appearance:none;background:var(--ag-charts-input-checkbox-background-color);border-radius:9px;cursor:pointer;height:18px;margin:0;transition-duration:var(--ag-charts-input-transition-duration--fast);transition-property:margin;width:29px}.ag-charts-checkbox:before{display:block;background:var(--ag-charts-input-background-color);border-radius:7px;content:" ";height:14px;margin:2px;transition-duration:var(--ag-charts-input-transition-duration--fast);transition-property:margin;transition-timing-function:var(--ag-charts-input-transition-easing);width:14px}.ag-charts-checkbox:checked{background:var(--ag-charts-input-checkbox-background-color--checked)}.ag-charts-checkbox:checked:before{margin-left:13px}.ag-charts-select{background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);padding:3px 2px 4px;font-size:inherit}.ag-charts-textarea{--line-height: 1.38;background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);line-height:var(--line-height);font-family:var(--ag-charts-input-font-family);font-size:var(--ag-charts-input-font-size);padding:var(--ag-charts-input-padding-large) var(--ag-charts-input-padding)}.ag-charts-textarea[placeholder]:empty:before{color:var(--ag-charts-input-placeholder);content:attr(placeholder)}.ag-charts-proxy-container{pointer-events:none;position:absolute}.ag-charts-proxy-elem{-webkit-appearance:none;appearance:none;background:none;border:none;color:#0000;overflow:hidden;pointer-events:none;position:absolute}.ag-charts-proxy-elem::-moz-range-thumb,.ag-charts-proxy-elem::-moz-range-track{opacity:0}.ag-charts-proxy-elem::-webkit-slider-runnable-track,.ag-charts-proxy-elem::-webkit-slider-thumb{opacity:0}.ag-charts-proxy-elem:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus-indicator{position:absolute;display:block;pointer-events:none;user-select:none;width:100%;height:100%}.ag-charts-focus-indicator>div{position:absolute;outline:var(--ag-charts-focus-border);outline-width:2px;box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus-indicator>svg{width:100%;height:100%;fill:none;stroke:var(--ag-charts-focus-border-color);stroke-width:2px}.ag-charts-toolbar{align-items:center;background:none;border:none;display:flex;flex-wrap:nowrap;opacity:1;position:absolute;transform:translateY(0);transition:opacity .2s ease-in-out,transform .2s ease-in-out}.ag-charts-toolbar--hidden,.ag-charts-toolbar--prevent-flash{visibility:hidden}.ag-charts-toolbar--floating-hidden{opacity:0;transition:opacity .4s ease-in-out}.ag-charts-toolbar--small{--ag-charts-toolbar-size: var(--ag-charts-toolbar-size-small);--ag-charts-toolbar-font-size: var(--ag-charts-toolbar-font-size-small);--ag-charts-toolbar-button-padding: var(--ag-charts-toolbar-button-padding-small)}.ag-charts-toolbar--top,.ag-charts-toolbar--bottom{flex-direction:row;width:100%}.ag-charts-toolbar--left,.ag-charts-toolbar--right{flex-direction:column}.ag-charts-toolbar--floating,.ag-charts-toolbar--floating-top,.ag-charts-toolbar--floating-bottom{background:none;border:none;flex-direction:row;pointer-events:none;width:100%}.ag-charts-toolbar--floating{padding:0;width:auto;z-index:var(--ag-charts-layer-toolbar)}.ag-charts-toolbar--floating-top{height:calc(var(--ag-charts-toolbar-size) + 10px);padding-top:10px}.ag-charts-toolbar--floating-bottom{height:calc(var(--ag-charts-toolbar-size) + 10px);padding-bottom:10px;overflow:hidden}.ag-charts-toolbar__align{display:flex;flex-direction:inherit;flex-wrap:inherit;gap:var(--ag-charts-toolbar-gap);max-width:100%;width:100%}.ag-charts-toolbar__align--start{justify-content:start}.ag-charts-toolbar__align--center{justify-content:center}.ag-charts-toolbar__align--end{justify-content:end}.ag-charts-toolbar__align--center,.ag-charts-toolbar__align--end{margin-left:auto}.ag-charts-toolbar--left .ag-charts-toolbar__align--center,.ag-charts-toolbar--left .ag-charts-toolbar__align--end,.ag-charts-toolbar--right .ag-charts-toolbar__align--center,.ag-charts-toolbar--right .ag-charts-toolbar__align--end{margin-left:0;margin-top:auto}.ag-charts-toolbar--floating-top .ag-charts-toolbar__align,.ag-charts-toolbar--floating-bottom .ag-charts-toolbar__align{transition:transform .4s ease-in-out;width:auto}.ag-charts-toolbar__section{display:inherit;flex-direction:inherit;flex-wrap:inherit;justify-content:inherit;max-width:inherit;width:inherit}.ag-charts-toolbar__button{align-items:center;background:var(--ag-charts-toolbar-background-color);border:var(--ag-charts-toolbar-border);color:var(--ag-charts-toolbar-foreground-color);display:flex;font:var(--ag-charts-toolbar-font-size) var(--ag-charts-font-family);justify-content:center;margin:0 0 0 -1px;min-height:var(--ag-charts-toolbar-size);min-width:var(--ag-charts-toolbar-size);padding:var(--ag-charts-toolbar-button-padding);pointer-events:all;position:relative;white-space:nowrap;--stroke-width-color: var(--ag-charts-toolbar-foreground-color)}.ag-charts-toolbar__no-pointer-events{pointer-events:none}.ag-charts-toolbar__button--drag-handle{min-width:24px;padding-left:0;padding-right:0}.ag-charts-toolbar__button--with-transition{transition:background-color .25s ease-in-out,border-color .25s ease-in-out,color .25s ease-in-out}.ag-charts-toolbar__button[data-toolbar-group=ranges]{padding:var(--ag-charts-toolbar-button-padding) calc(var(--ag-charts-toolbar-button-padding) * 1.5)}.ag-charts-toolbar--top,.ag-charts-toolbar--bottom,.ag-charts-toolbar--floating,.ag-charts-toolbar--floating-top,.ag-charts-toolbar--floating-bottom{.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-button-radius);border-top-left-radius:var(--ag-charts-button-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-button-radius);border-top-right-radius:var(--ag-charts-button-radius)}}.ag-charts-toolbar--left,.ag-charts-toolbar--right{.ag-charts-toolbar__button{border-radius:0;margin:-1px 0 0;max-width:100%}.ag-charts-toolbar__button--first{border-top-left-radius:var(--ag-charts-button-radius);border-top-right-radius:var(--ag-charts-button-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-left-radius:var(--ag-charts-button-radius);border-bottom-right-radius:var(--ag-charts-button-radius)}}.ag-charts-toolbar__button--hidden-value,.ag-charts-toolbar__button--hidden-toggled{display:none}.ag-charts-toolbar__button:hover:not([aria-disabled=true],.ag-charts-toolbar__button--drag-handle){background:var(--ag-charts-toolbar-hover-color);z-index:1}.ag-charts-toolbar__button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-toolbar__button.ag-charts-toolbar__button--active{background:var(--ag-charts-toolbar-active-background-color);border-color:var(--ag-charts-toolbar-active-color);color:var(--ag-charts-toolbar-active-color);z-index:2;--stroke-width-color: var(--ag-charts-toolbar-active-color)}.ag-charts-toolbar__button[aria-disabled=true]{background:var(--ag-charts-toolbar-disabled-background-color);color:var(--ag-charts-toolbar-disabled-foreground-color)}.ag-charts-toolbar__button:not([aria-disabled=true]){cursor:pointer}.ag-charts-toolbar__button.ag-charts-toolbar__button--drag-handle{cursor:grab}.ag-charts-toolbar__button.ag-charts-toolbar__button--dragging{cursor:grabbing}.ag-charts-toolbar__button--fill-visible:after{content:"";display:block;position:absolute;bottom:3px;left:5px;right:5px;height:4px;border-radius:99px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ag-charts-foreground-color) 10%,transparent);background:var(--fill)}.ag-charts-toolbar__button--fill-visible[aria-disabled=true]:after{filter:grayscale(1);opacity:.5}.ag-charts-toolbar__button--stroke-width-visible:before{content:"";height:min(var(--strokeWidth),20px);width:12px;background:var(--stroke-width-color);margin-right:var(--ag-charts-toolbar-button-padding)}.ag-charts-toolbar__button--stroke-width-visible[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{margin-left:var(--ag-charts-toolbar-gap)}.ag-charts-toolbar__icon,.ag-charts-toolbar__label{pointer-events:none}.ag-chart-overlay{color:#181d1f;pointer-events:none}.ag-chart-overlay.ag-chart-dark-overlay{color:#fff}.ag-chart-overlay--loading{color:#8c8c8c}.ag-chart-overlay__loading-background{background:#fff;pointer-events:none}.ag-chart-overlay.ag-chart-dark-overlay .ag-chart-overlay__loading-background{background:#192232}.ag-chart-tooltip{transition:transform .1s ease;width:max-content;z-index:99999;font:12px Verdana,sans-serif;color:#464646;box-shadow:0 4px 8px #00000014}.ag-chart-tooltip-wrap-always{overflow-wrap:break-word;word-break:break-word;hyphens:none}.ag-chart-tooltip-wrap-hyphenate{overflow-wrap:break-word;word-break:break-word;hyphens:auto}.ag-chart-tooltip-wrap-on-space{overflow-wrap:normal;word-break:normal}.ag-chart-tooltip-wrap-never{white-space:pre;text-overflow:ellipsis}.ag-chart-tooltip-no-interaction{pointer-events:none;user-select:none}.ag-chart-tooltip-no-animation{transition:none!important}.ag-chart-tooltip-hidden{visibility:hidden}.ag-chart-tooltip-title{overflow:hidden;position:relative;padding:8px 14px;border-top-left-radius:2px;border-top-right-radius:2px;color:#fff;background-color:#888;z-index:1;text-overflow:inherit}.ag-chart-tooltip-title:only-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.ag-chart-tooltip-content{overflow:hidden;padding:6px 14px;line-height:1.7em;background:#fff;border-bottom-left-radius:2px;border-bottom-right-radius:2px;border:1px solid rgba(0,0,0,.15);text-overflow:inherit}.ag-chart-tooltip-arrow:before{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid #d9d9d9;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;width:0;height:0;margin:0 auto}.ag-chart-tooltip-arrow:after{content:"";position:absolute;top:calc(100% - 1px);left:50%;transform:translate(-50%);border:5px solid white;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;width:0;height:0;margin:0 auto}
205
206`;function Cb(e,t,i,s){t.addEventListener(i,s);let r=()=>t.removeEventListener(i,s);return e.push(r),r}function CS(e,t,i){Cb(e,t,"keydown",e=>{"Escape"===e.key&&i(e)})}function Cx(e){return!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)}function CM(e,t,...i){return Cx(e)&&(e.key===t||i.some(t=>e.key===t))}function CD(e,t,i,s){i&&Cb(e,t,"keydown",e=>{CM(e,s)&&i.focus()})}var CE={horizontal:{nextKey:"ArrowRight",prevKey:"ArrowLeft"},vertical:{nextKey:"ArrowDown",prevKey:"ArrowUp"}};function CI(e){return e.toolbar.role="toolbar",e.toolbar.ariaOrientation=e.orientation,e.toolbar.ariaHidden=(0===e.buttons.length).toString(),CA(e)}function CA(e){let{orientation:t,buttons:i,wrapAround:s=!1,onEscape:r,onFocus:a,onBlur:o}=e,{nextKey:n,prevKey:l}=CE[t],h=e=>{e.target&&"tabIndex"in e.target&&(i.forEach(e=>e.tabIndex=-1),e.target.tabIndex=0)},[d,u]=s?[i.length,i.length]:[0,1/0],c=[];for(let e=0;e<i.length;e++){let t=i[(d+e-1)%u],s=i[e],p=i[(d+e+1)%u];Cb(c,s,"focus",h),a&&Cb(c,s,"focus",a),o&&Cb(c,s,"blur",o),r&&CS(c,s,r),function(e,t,i,s,r,a){CD(e,t,r,a),CD(e,t,i,s),Cb(e,t,"keydown",e=>{CM(e,s,a)&&e.preventDefault()})}(c,s,t,l,p,n),s.tabIndex=0===e?0:-1}return c}var CR=class{constructor(e,t,i){var s,r;let a;this.lastFocus=t,this.closeCallback=i,this.destroyFns=[],this.destroyFns.push((s=this.destroyFns,r=()=>this.close(),a=Cb(s,window,"mousedown",t=>{[0,2].includes(t.button)&&!function(e,t){if(t.target instanceof Element){let{x:i,y:s,width:r,height:a}=e.getBoundingClientRect(),{clientX:o,clientY:n}=t;return o>=i&&n>=s&&o<=i+r&&n<=s+a}return!1}(e,t)&&(r(),a())})))}close(){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0,this.closeCallback(),this.finishClosing()}finishClosing(){var e;this.destroyFns.forEach(e=>e()),this.destroyFns.length=0,vJ(this.lastFocus,"aria-expanded",!1),null==(e=this.lastFocus)||e.focus(),this.lastFocus=void 0}};function CT(e){var t;let{sourceEvent:i,orientation:s,menu:r,buttons:a,closeCallback:o,autoCloseOnBlur:n=!1}=e,{nextKey:l,prevKey:h}=CE[s],d=CP(i);vJ(d,"aria-expanded",!0);let u=new CR(r,d,o),c=()=>u.close(),{destroyFns:p}=u;if(r.role="menu",r.ariaOrientation=s,p.push(...CA({orientation:s,buttons:a,onEscape:c,wrapAround:!0})),r.tabIndex=-1,CS(p,r,c),Cb(p,r,"keydown",e=>{if(e.target===r&&(e.key===l||e.key===h)){var t;e.preventDefault(),null==(t=a[0])||t.focus()}}),n){let e=e=>{a.includes(e.relatedTarget)||c()};for(let t of a)Cb(p,t,"blur",e)}return null==(t=a[0])||t.focus(),u}function CL(e,t){return i=>{if("true"===e.ariaDisabled)return i.preventDefault();t(i)}}function CF(e){return"button"in e?0===e.button:Cx(e)&&("Space"===e.code||"Enter"===e.key)}function CP(e){if((null==e?void 0:e.target)instanceof HTMLElement&&"tabindex"in e.target.attributes)return e.target}function Ck(e){let t=e=>{e.defaultPrevented||v1(e.target,"data-preventdefault",!0)&&CM(e,"ArrowRight","ArrowLeft","ArrowDown","ArrowUp")&&e.preventDefault()};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}var CN=class{constructor(){if(this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach(([e,t])=>this.observe(e,t)),this.queuedObserveRequests=[]},"u"<typeof ResizeObserver)return;if(this.resizeObserver=new ResizeObserver(e=>{for(let{target:t,contentRect:{width:i,height:s}}of e){let e=this.elements.get(t);this.checkSize(e,t,i,s)}}),this.documentReady="complete"===cN("readyState"),!this.documentReady){var e;null==(e=cO())||e.addEventListener("load",this.onLoad)}}destroy(){var e,t;null==(e=cO())||e.removeEventListener("load",this.onLoad),null==(t=this.resizeObserver)||t.disconnect(),this.resizeObserver=null}checkSize(e,t,i,s){var r,a;e&&(i!==(null==(r=e.size)?void 0:r.width)||s!==(null==(a=e.size)?void 0:a.height))&&(e.size={width:i,height:s},e.cb(e.size,t))}observe(e,t){if(!this.documentReady)return void this.queuedObserveRequests.push([e,t]);if(this.elements.has(e))this.removeFromQueue(e);else{var i;null==(i=this.resizeObserver)||i.observe(e)}this.elements.set(e,{cb:t})}unobserve(e){var t;null==(t=this.resizeObserver)||t.unobserve(e),this.elements.delete(e),this.removeFromQueue(e),this.elements.size||this.destroy()}removeFromQueue(e){this.queuedObserveRequests=this.queuedObserveRequests.filter(([t])=>t!==e)}},CO=["styles","canvas","canvas-center","canvas-overlay","canvas-proxy","series-area"],CG=new Map([["styles",{childElementType:"style"}],["canvas",{childElementType:"canvas"}],["canvas-proxy",{childElementType:"div"}],["canvas-overlay",{childElementType:"div"}],["canvas-center",{childElementType:"div"}],["series-area",{childElementType:"div"}]]),CB={x:0,y:0,width:0,height:0,top:0,bottom:0,left:0,right:0,toJSON:()=>CB}
206,Cz=class extends Cu{constructor(e,t){super(),this.styles=new Map,this.container=void 0,this.containerSize=void 0,this.sizeMonitor=new CN;let i=cG("div");i.innerHTML='<div role="presentation" class="ag-charts-wrapper ag-charts-styles" data-ag-charts><div role="presentation" class="ag-charts-canvas-center"><div role="presentation" class="ag-charts-canvas-container"><div role="presentation" class="ag-charts-canvas" aria-hidden="true"></div><div role="figure" class="ag-charts-canvas-proxy"><div role="img" class="ag-charts-series-area" tabindex="-1"></div></div><div role="presentation" class="ag-charts-canvas-overlay"></div></div></div></div>',this.element=i.children.item(0),this.styleRootElement=t,this.rootElements=CO.reduce((e,t)=>{let i=`ag-charts-${t}`,s=this.element.classList.contains(i)?this.element:this.element.querySelector(`.${i}`);if(!s)throw Error(`AG Charts - unable to find DOM element ${i}`);return e[t]={element:s,children:new Map,listeners:[]},e},{});let s=!1;this.observer=function(e,t){if("u"<typeof IntersectionObserver)return;let i=new IntersectionObserver(i=>{for(let s of i)s.target===e&&t(s.intersectionRatio)},{root:e});return i.observe(e),i}(this.element,e=>{0!==e||s||this.listeners.dispatch("hidden",{type:"hidden"}),s=0===e}),this.setSizeOptions(),this.addStyles("ag-charts-community",Cw),e&&this.setContainer(e),this.destroyFns.push(Ck(this.element))}destroy(){var e;super.destroy(),null==(e=this.observer)||e.unobserve(this.element),this.container&&this.sizeMonitor.unobserve(this.container),Object.values(this.rootElements).forEach(e=>{e.children.forEach(e=>e.remove()),e.element.remove()}),this.element.remove()}setSizeOptions(e=300,t=300,i,s){let{style:r}=this.element;r.width=`${null!=i?i:e}px`,r.height=`${null!=s?s:t}px`}updateContainerSize(){var e,t,i,s;let{style:r}=this.rootElements["canvas-center"].element;r.width=`${null!=(e=null==(t=this.containerSize)?void 0:t.width)?e:0}px`,r.height=`${null!=(i=null==(s=this.containerSize)?void 0:s.height)?i:0}px`}setContainer(e){if(e!==this.container){if(this.container&&(this.container.removeChild(this.element),this.sizeMonitor.unobserve(this.container)),null==this.getShadowDocumentRoot(e))for(let e of this.rootElements.styles.children.keys())this.removeChild("styles",e);for(let[t,i]of(this.container=e,this.styles))this.addStyles(t,i);e.appendChild(this.element),this.sizeMonitor.observe(e,e=>{this.containerSize=e,this.updateContainerSize(),this.listeners.dispatch("resize",{type:"resize"})}),this.listeners.dispatch("container-changed",{type:"container-changed"})}}setThemeClass(e){this.element.classList.forEach(t=>{t.startsWith("ag-charts-theme-")&&t!==e&&this.element.classList.remove(t)}),this.element.classList.add(e)}setTabIndex(e){this.rootElements["series-area"].element.tabIndex=e}updateCanvasLabel(e){vJ(this.rootElements["canvas-proxy"].element,"aria-label",e)}getEventElement(e,t){return["focus","blur","keydown","keyup"].includes(t)?this.rootElements["series-area"].element:e}addEventListener(e,t,i){this.getEventElement(this.element,e).addEventListener(e,t,i)}removeEventListener(e,t,i){this.getEventElement(this.element,e).removeEventListener(e,t,i)}getBoundingClientRect(){return this.rootElements.canvas.element.getBoundingClientRect()}getOverlayClientRect(){var e,t;let i=cO(),s=new c4(0,0,i.innerWidth,i.innerHeight),r=this.getRawOverlayClientRect(),a=c4.fromDOMRect(null!=r?r:this.getBoundingClientRect());return null!=(e=null==(t=s.intersection(a))?void 0:t.toDOMRect())?e:CB}getRawOverlayClientRect(){let e=this.element;for(;null!=e;){var t,i,s,r;let a=null==(t=(i=e).computedStyleMap)?void 0:t.call(i),o=null==a||null==(s=a.get("overflow-x"))?void 0:s.toString(),n=null==a||null==(r=a.get("overflow-y"))?void 0:r.toString();if(null!=o&&"visible"!==o||n&&"visible"!==n)return e.getBoundingClientRect();e=e.parentElement}let a=this.getShadowDocumentRoot();if(a)return a.getBoundingClientRect()}getShadowDocumentRoot(e=this.container){var t,i;let s=null!=(t=null==(i=e)||null==(i=i.ownerDocument)?void 0:i.body)?t:cN("body");for(;null!=e;){if(e===s)return;if(e.parentNode instanceof DocumentFragment)return e;e=e.parentNode}return this.container}getChildBoundingClientRect(e){let{children:t}=this.rootElements[e],i=[];for(let e of t.values())i.push(c4.fromDOMRect(e.getBoundingClientRect()));return c4.merge(i)}calculateCanvasPosition(e){var t;let i=0,{x:s=0,y:r=0}=null!=(t=this.getChildBoundingClientRect("canvas"))?t:{},a=e.getBoundingClientRect();return{x:i=a.x-s,y:a.y-r}}isManagedChildDOMElement(e,t,i){let{children:s}=this.rootElements[t],r=null==s?void 0:s.get(i);return null!=r&&e.contains(r)}isEventOverElement(e){let t=e.target;return null!=t&&this.element.contains(t)}addStyles(e,t){let i,s="data-ag-charts";if(this.styles.set(e,t),null==this.container)return;let r=t=>t.getAttribute(s)===e,a=e=>{for(let t of e.children)if(r(t))return;let t=cG("style");return e.appendChild(t),t};null==(i=this.styleRootElement?a(this.styleRootElement):null!=this.getShadowDocumentRoot(this.container)?this.addChild("styles",e):a(cN("head")))||r(i)||(i.setAttribute(s,e),i.innerHTML=t)}removeStyles(e){this.removeChild("styles",e)}updateCursor(e){this.element.style.cursor=e}getCursor(){return this.element.style.cursor}addChild(e,t,i,s){var r;let{element:a,children:o,listeners:n}=this.rootElements[e];if(!o)throw Error("AG Charts - unable to create DOM elements after destroy()");if(o.has(t))return o.get(t);let{childElementType:l="div"}=null!=(r=CG.get(e))?r:{};if(i&&i.tagName.toLowerCase()!==l.toLowerCase())throw Error("AG Charts - mismatching DOM element type");let h=null!=i?i:cG(l);for(let[e,t,i]of n)h.addEventListener(e,t,i);if(o.set(t,h),s){let e=a.querySelector(s.query);if(null==e)throw Error(`AG Charts - addChild query failed ${s.query}`);e.insertAdjacentElement(s.where,h)}else null==a||a.appendChild(h);return h}removeChild(e,t){var i;let{children:s}=this.rootElements[e];s&&(null==(i=s.get(t))||i.remove(),s.delete(t))}incrementDataCounter(e){let{dataset:t}=this.element;null!=t[e]||(t[e]="0"),t[e]=String(Number(t[e])+1)}setDataBoolean(e,t){this.element.dataset[e]=String(t)}getIconClassNames(e){return`ag-charts-icon ag-charts-icon-${e}`}};function CV(e,t,i,s,r,a,o,n){let l=(i-e)*(n-a)-(s-t)*(o-r);if(0===l)return 0;let h=((o-r)*(t-a)-(e-r)*(n-a))/l,d=((i-e)*(t-a)-(s-t)*(e-r))/l;return+(h>=0&&h<=1&&d>=0&&d<=1)}function CH(e,t,i,s){return[-e+3*t-3*i+s,3*e-6*t+3*i,-3*e+3*t,e]}function Cj(e,t,i,s,r,a,o,n,l,h){if(isNaN(e)||isNaN(t))return 0;a&&([r,s]=[s,r]);let d=(h-n)/(l-o),u=n-d*o,c=Math.pow(d,2)+1,p=2*(d*(u-t)-e),g=Math.pow(p,2)-4*c*(Math.pow(e,2)+Math.pow(u-t,2)-Math.pow(i,2));if(g<0)return 0;let m=0;
206return[(-p+Math.sqrt(g))/2/c,(-p-Math.sqrt(g))/2/c].forEach(i=>{!(i>=Math.min(o,l)&&i<=Math.max(o,l))||vs(Math.atan2(d*i+u-t,i-e),s,r)&&m++}),m}function CW(e,t,i,s,r){return(1-r)**3*e+3*(1-r)**2*r*t+3*(1-r)*r**2*i+r**3*s}function CU(e,t,i,s,r){if(r<=Math.min(e,s))return e<s?0:1;if(r>=Math.max(e,s))return+(e<s);let a=0,o=1,n=0/0;for(let l=0;l<12;l+=1)CW(e,t,i,s,n=(a+o)/2)<r?a=n:o=n;return n}function C_(e,t,i,s,r,a,o,n,l){let h=(1-l)*e+l*i,d=(1-l)*t+l*s,u=(1-l)*i+l*r,c=(1-l)*s+l*a,p=(1-l)*r+l*o,g=(1-l)*a+l*n,m=(1-l)*h+l*u,v=(1-l)*d+l*c,f=(1-l)*u+l*p,C=(1-l)*c+l*g,y=(1-l)*m+l*f,w=(1-l)*v+l*C;return[[{x:e,y:t},{x:h,y:d},{x:m,y:v},{x:y,y:w}],[{x:y,y:w},{x:f,y:C},{x:p,y:g},{x:o,y:n}]]}function C$(e,t,i,s){let r=-e+3*t-3*i+s,a=3*e-6*t+3*i,o=-3*e+3*t;if(0===r){if(0!==a){let e=-o/a;if(e>0&&e<1)return[e]}return[]}let n=a*a-4*r*o;if(n>=0){let e=Math.sqrt(n);return[(-a+e)/(2*r),(-a-e)/(2*r)].filter(e=>e>0&&e<1)}return[]}function CY(e,t,i,s,r,a,o,n){return[...C$(e,i,r,o),...C$(t,s,a,n)]}var CK=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(e,t){this.openedPath=!0,this.path2d.moveTo(e,t),this.commands.push(0),this.params.push(e,t)}lineTo(e,t){this.openedPath?(this.path2d.lineTo(e,t),this.commands.push(1),this.params.push(e,t)):this.moveTo(e,t)}rect(e,t,i,s){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+s),this.lineTo(e,t+s),this.closePath()}roundRect(e,t,i,s,r){r=Math.min(r,i/2,s/2),this.moveTo(e,t+r),this.arc(e+r,t+r,r,Math.PI,1.5*Math.PI),this.lineTo(e+r,t),this.lineTo(e+i-r,t),this.arc(e+i-r,t+r,r,1.5*Math.PI,2*Math.PI),this.lineTo(e+i,t+r),this.lineTo(e+i,t+s-r),this.arc(e+i-r,t+s-r,r,0,Math.PI/2),this.lineTo(e+i-r,t+s),this.lineTo(e+r,t+s),this.arc(e+ +r,t+s-r,r,Math.PI/2,Math.PI),this.lineTo(e,t+s-r),this.closePath()}arc(e,t,i,s,r,a){this.openedPath=!0,this.path2d.arc(e,t,i,s,r,a),this.commands.push(2),this.params.push(e,t,i,s,r,+!!a)}cubicCurveTo(e,t,i,s,r,a){this.openedPath||this.moveTo(e,t),this.path2d.bezierCurveTo(e,t,i,s,r,a),this.commands.push(3),this.params.push(e,t,i,s,r,a)}closePath(){this.openedPath&&(this.path2d.closePath(),this.commands.push(4),this.openedPath=!1,this.closedPath=!0)}clear(e){e&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(e,t){let i=this.commands,s=this.params,r=i.length,a=0/0,o=0/0,n=0,l=0,h=0;for(let d=0,u=0;d<r;d++)switch(i[d]){case 0:h+=CV(a,o,n,l,-1e4,-1e4,e,t),a=n=s[u++],o=l=s[u++];break;case 1:h+=CV(n,l,s[u++],s[u++],-1e4,-1e4,e,t),n=s[u-2],l=s[u-1];break;case 3:h+=function(e,t,i,s,r,a,o,n,l,h){let d=0,u=-1e4-h,c=l- -1e4,p=CH(e,i,r,o),g=CH(t,s,a,n);for(let e of function(e,t,i,s){if(0===e)return function(e,t,i){if(0===e){let e;return e=-i/t,0!==t&&e>=0&&e<=1?[e]:[]}let s=t*t-4*e*i,r=[];if(0===s){let i=-t/(2*e);i>=0&&i<=1&&r.push(i)}else if(s>0){let i=Math.sqrt(s),a=(-t-i)/(2*e),o=(-t+i)/(2*e);a>=0&&a<=1&&r.push(a),o>=0&&o<=1&&r.push(o)}return r}(t,i,s);let r=t/e,a=i/e,o=(3*a-r*r)/9,n=(9*r*a-s/e*27-2*r*r*r)/54,l=o*o*o+n*n,h=1/3,d=[];if(l>=0){let e=Math.sqrt(l),t=Math.sign(n+e)*Math.pow(Math.abs(n+e),h),i=Math.sign(n-e)*Math.pow(Math.abs(n-e),h),s=Math.abs(Math.sqrt(3)*(t-i)/2),a=-h*r+(t+i);if(a>=0&&a<=1&&d.push(a),0===s){let e=-h*r-(t+i)/2;e>=0&&e<=1&&d.push(e)}}else{let e=Math.acos(n/Math.sqrt(-o*o*o)),t=h*r,i=2*Math.sqrt(-o),s=i*Math.cos(h*e)-t,a=i*Math.cos(h*(e+2*Math.PI))-t,l=i*Math.cos(h*(e+4*Math.PI))-t;s>=0&&s<=1&&d.push(s),a>=0&&a<=1&&d.push(a),l>=0&&l<=1&&d.push(l)}return d}(u*p[0]+c*g[0],u*p[1]+c*g[1],u*p[2]+c*g[2],u*p[3]+c*g[3]+(-1e4*(h- -1e4)- -1e4*(l- -1e4)))){let t,i=e*e,s=e*i,r=p[0]*s+p[1]*i+p[2]*e+p[3],a=g[0]*s+g[1]*i+g[2]*e+g[3];(t=-1e4===l?(a- -1e4)/(h- -1e4):(r- -1e4)/(l- -1e4))>=0&&t<=1&&d++}return d}(n,l,s[u++],s[u++],s[u++],s[u++],s[u++],s[u++],e,t),n=s[u-2],l=s[u-1];break;case 2:{let i=s[u++],r=s[u++],o=s[u++],d=s[u++],c=s[u++];
206h+=Cj(i,r,o,d,c,!!s[u++],-1e4,-1e4,e,t),isNaN(a)||(h+=CV(n,l,i+Math.cos(d)*o,r+Math.sin(d)*o,-1e4,-1e4,e,t)),n=i+Math.cos(c)*o,l=r+Math.sin(c)*o;break}case 4:h+=CV(a,o,n,l,-1e4,-1e4,e,t)}return h%2==1}distanceSquared(e,t){let i=1/0,s=this.commands,r=this.params,a=s.length,o=0/0,n=0/0,l=0,h=0;for(let d=0,u=0;d<a;d++)switch(s[d]){case 0:l=o=r[u++],h=n=r[u++];break;case 1:i=vc(e,t,l,h,r[u++],r[u++],i);break;case 3:u8.error("Command.Curve distanceSquare not implemented");break;case 2:{let s=r[u++],a=r[u++],o=r[u++],n=r[u++],d=r[u++],c=s+Math.cos(n)*o,p=a+Math.sin(n)*o,g=!!r[u++];i=vc(e,t,l,h,c,p,i),i=vp(e,t,s,a,o,n,d,g,i),l=s+Math.cos(d)*o,h=a+Math.sin(d)*o;break}case 4:i=vc(e,t,l,h,o,n,i)}return i}getPoints(){let{commands:e,params:t}=this,i=[],s=0;for(let r of e)switch(r){case 0:case 1:i.push({x:t[s++],y:t[s++]});break;case 3:s+=4,i.push({x:t[s++],y:t[s++]});break;case 2:i.push({x:t[s++],y:t[s++]}),s+=4}return i}toSVG(e=(e,t)=>({x:e,y:t})){let t=[],{commands:i,params:s}=this,r=(i,...s)=>{t.push(i);for(let i=0;i<s.length;i+=2){let{x:r,y:a}=e(s[i],s[i+1]);t.push(r,a)}},a=0;for(let e of i)switch(e){case 0:r("M",s[a++],s[a++]);break;case 1:r("L",s[a++],s[a++]);break;case 3:r("C",s[a++],s[a++],s[a++],s[a++],s[a++],s[a++]);break;case 2:{let e=s[a++],i=s[a++],o=s[a++],n=s[a++],l=s[a++],h=s[a++],d=h?n-l:l-n;d<0&&(d+=2*Math.ceil(-d/(2*Math.PI))*Math.PI),h&&(d=-d);let u=Math.max(Math.ceil(Math.abs(d)/(Math.PI/2)),1),c=d/u,p=4/3*Math.tan(c/4);r(0===t.length?"M":"L",e+Math.cos(n)*o,i+Math.sin(n)*o);for(let t=0;t<u;t+=1){let s=n+c*(t+0),a=n+c*(t+1),l=o*Math.sin(s),h=o*Math.cos(s),d=o*Math.sin(a),u=o*Math.cos(a);r("C",e+h-p*l,i+l+p*h,e+u+p*d,i+d-p*u,e+u,i+d)}break}case 4:t.push("Z")}return t.join(" ")}computeBBox(){let{commands:e,params:t}=this,[i,s,r,a]=[1/0,1/0,-1/0,-1/0],[o,n]=[0/0,0/0],[l,h]=[0/0,0/0],d=(e,t,l)=>{i=Math.min(t,i),s=Math.min(e,s),r=Math.max(e,r),a=Math.max(t,a),l&&([o,n]=[e,t])},u=0;for(let i of e)switch(i){case 0:d(t[u++],t[u++],!0),[l,h]=[o,n];break;case 1:d(t[u++],t[u++],!0);break;case 3:{let e=t[u++],i=t[u++],s=t[u++],r=t[u++],a=t[u++],l=t[u++];d(a,l,!0),CY(o,n,e,i,s,r,a,l).forEach(t=>{d(CW(o,e,s,a,t),CW(n,i,r,l,t))});break}case 2:{let e=t[u++],i=t[u++],s=t[u++],r=ve(t[u++]),a=ve(t[u++]);t[u++]&&([r,a]=[a,r]);let o=(t,r)=>{d(e+s*Math.cos(t),i+s*Math.sin(t),r)};for(let e of(o(r),o(a,!0),[0,Math.PI/2,Math.PI,3*Math.PI/2]))(r<a&&r<=e&&e<=a||r>a&&(r<=e||e<=a))&&o(e);break}case 4:[o,n]=[l,h]}return new c4(s,i,r-s,a-i)}};function CZ(e){let{redraw:t=3,changeCb:i,convertor:s}=null!=e?e:{};return c5({redraw:t,type:"path",convertor:s,changeCb:i})}var Cq=class extends vb{constructor(){super(...arguments),this.path=new CK,this._clipX=0/0,this._clipY=0/0,this.clip=!1,this._dirtyPath=!0}set clipX(e){this._clipX=e,this.dirtyPath=!0}set clipY(e){this._clipY=e,this.dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(3))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){var e,t,i,s;this._dirtyPath||(this.dirtyPath=this.path.isDirty()||null!=(e=null==(t=this.fillShadow)?void 0:t.isDirty())&&e||null!=(i=null==(s=this._clipPath)?void 0:s.isDirty())&&i)}isPointInPath(e,t){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(e,t)}distanceSquared(e,t){return this.distanceSquaredTransformedPoint(e,t)}svgPathData(e){return this.dirtyPath&&(this.updatePath(),this.dirtyPath=!1),this.path.toSVG(e)}distanceSquaredTransformedPoint(e,t){return(this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(e,t))?0:this.path.distanceSquared(e,t)}isDirtyPath(){return!1}updatePath(){}updatePathIfDirty(){(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1)}preRender(){return this.updatePathIfDirty(),super.preRender()}render(e){var t,i;let{ctx:s,forceRender:r,stats:a}=e;if(0===this.dirty&&!r){a&&(a.nodesSkipped+=mW(this).count);return}if(!this.clip||isNaN(this._clipX)||isNaN(this._clipY))this._clipPath=void 0,this.drawPath(s);else{s.save();let e=this.strokeWidth/2;null!=this._clipPath||(this._clipPath=new CK),this._clipPath.clear(),this._clipPath.rect(-e,-e,this._clipX+e,this._clipY+e+e),s.clip(null==(i=this._clipPath)?void 0:i.getPath2D()),this._clipX>0&&this._clipY>
2060&&this.drawPath(s),s.restore()}null==(t=this.fillShadow)||t.markClean(),super.render(e)}drawPath(e){this.fillStroke(e,this.path.getPath2D())}toSVG(){if(!this.visible)return;let e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("d",this.svgPathData()),e.setAttribute("fill","string"==typeof this.fill?this.fill:"none"),e.setAttribute("fill-opacity",String(this.fillOpacity)),null!=this.stroke&&(e.setAttribute("stroke",this.stroke),e.setAttribute("stroke-opacity",String(this.strokeOpacity)),e.setAttribute("stroke-width",String(this.strokeWidth))),{elements:[e]}}};Cq.className="Path",uQ([CZ()],Cq.prototype,"clip",2),uQ([CZ()],Cq.prototype,"clipX",1),uQ([CZ()],Cq.prototype,"clipY",1);var CQ="ag-charts-focus-indicator",CX=class{constructor(e){this.domManager=e,this.div=cN().createElement("div"),this.svg=cN().createElementNS("http://www.w3.org/2000/svg","svg"),this.path=cN().createElementNS("http://www.w3.org/2000/svg","path"),this.svg.append(this.path),this.element=e.addChild("series-area",CQ),this.element.classList.add(CQ),this.element.ariaHidden="true",this.element.append(this.svg)}destroy(){this.domManager.removeStyles(CQ),this.domManager.removeChild("series-area",CQ)}updateBounds(e){void 0===e||(e instanceof Cq?(this.path.setAttribute("d",e.svgPathData((t,i)=>mJ.toCanvasPoint(e,t,i))),this.show(this.svg)):(cj(this.div,e),this.show(this.div)))}show(e){this.element.innerHTML="",this.element.append(e)}getFocusableElement(){let e=this.element.parentElement;if(null==e||0!==e.tabIndex&&-1!==e.tabIndex)throw Error("AG Charts - the focus indicator must be a child of a focusable element");return e}overrideFocusVisible(e){this.getFocusableElement().style.setProperty("opacity",{true:"1",false:"0",undefined:""}[`${e}`])}isFocusVisible(){let e=this.getFocusableElement();return null!=e&&"1"===cO().getComputedStyle(e).opacity}},CJ=class{set textContent(e){var t;this.textElement.textContent=e;let i=this.textElement,s=null==(t=i.getBBox)?void 0:t.call(i);s&&this.svgElement.setAttribute("viewBox",`${s.x} ${s.y} ${s.width} ${s.height}`)}get textContent(){return this.textElement.textContent}constructor(){this.textElement=cB("http://www.w3.org/2000/svg","text"),this.textElement.role="presentation",this.svgElement=cB("http://www.w3.org/2000/svg","svg"),this.svgElement.appendChild(this.textElement),this.svgElement.style.width="100%",this.svgElement.style.opacity="0",this.svgElement.role="presentation",this.boundedContainer=cG("div"),this.boundedContainer.appendChild(this.svgElement),this.boundedContainer.role="presentation"}remove(){this.boundedContainer.remove()}getContainer(){return this.boundedContainer}updateBounds(e){cj(this.boundedContainer,e)}};function C0(e,t){var i;return(null==(i=t.params)?void 0:i.type)===e}function C1(e){let t={params:e,result:void 0};return t.result=function(e){if("button"===e)return cG("button");if("slider"===e)return cG("input");if(["toolbar","group","list"].includes(e))return cG("div");if("text"===e)return new CJ;if("listswitch"===e)return{button:cG("button"),listitem:cG("div")};else throw Error("AG Charts - error allocating meta")}(t.params.type),t}var C2=class{constructor(e,t){this.localeManager=e,this.domManager=t,this.destroyFns=[]}destroy(){this.destroyFns.forEach(e=>e())}addLocalisation(e){e(),this.destroyFns.push(this.localeManager.addListener("locale-changed",e))}createProxyContainer(e){let{params:t,result:i}=C1(e);return this.domManager.addChild("canvas-proxy",t.id,i),i.classList.add(...t.classList,"ag-charts-proxy-container"),i.role=t.type,"ariaOrientation"in t&&(i.ariaOrientation=t.ariaOrientation),"boolean"==typeof t.ariaHidden&&(i.ariaHidden=t.ariaHidden.toString()),this.addLocalisation(()=>{i.ariaLabel=this.localeManager.t(t.ariaLabel.id,t.ariaLabel.params)}),i}createProxyElement(e){let t=C1(e);if(C0("button",t)){let{params:e,result:i}=t;if(this.initInteract(e,i),i.style.pointerEvents="auto","string"==typeof e.textContent)i.textContent=e.textContent;else{let{textContent:t}=e;this.addLocalisation(()=>{i.textContent=this.localeManager.t(t.id,t.params)})}this.setParent(e,i)}if(C0("slider",t)){let{params:e,result:i}=t;this.initInteract(e,i),i.type="range",i.role="presentation",i.style.margin="0px",i.ariaOrientation=e.ariaOrientation,this.addLocalisation(()=>{i.ariaLabel=this.localeManager.t(e.ariaLabel.id,e.ariaLabel.params)}),this.setParent(e,i)}if(C0("text",t)){let{params:e,result:i}=t;this.initElement(e,i.getContainer()),this.setParent(e,i.getContainer())}if(C0("listswitch",t)){let{params:e,result:{button:i,listitem:s}}=t;this.initInteract(e,i),i.style.width="100%",i.style.height="100%",i.textContent=e.textContent,i.role="switch",i.ariaChecked=e.ariaChecked.toString(),i.style.pointerEvents="auto",i.setAttribute("aria-describedby",e.ariaDescribedBy),s.role="listitem",s.style.position="absolute",s.replaceChildren(i),this.setParent(e,s)}return t.result}initElement(e,t){let{id:i}=e;t.id=i,t.classList.toggle("ag-charts-proxy-elem",!0)}initInteract(e,t){let{onclick:i,ondblclick:s,onmouseenter:r,onmouseleave:a,oncontextmenu:o,onchange:n,onfocus:l,onblur:h,tabIndex:d}=e;this.initElement(e,t),void 0!==d&&(t.tabIndex=d),i&&t.addEventListener("click",i),s&&t.addEventListener("dblclick",
206s),r&&t.addEventListener("mouseenter",r),a&&t.addEventListener("mouseleave",a),o&&t.addEventListener("contextmenu",o),l&&t.addEventListener("focus",l),h&&t.addEventListener("blur",h),n&&t.addEventListener("change",n)}setParent(e,t){let{id:i,parent:s}=e;"string"==typeof s?this.domManager.addChild("canvas-proxy",i,t,{where:s,query:".ag-charts-series-area"}):s.appendChild(t)}},C3=/\$\{(\w+)}(?:\[(\w+)])?/gi,C4={number:new Intl.NumberFormat("en-US"),percent:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}),date:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}),time:new Intl.DateTimeFormat("en-US",{timeStyle:"full"}),datetime:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeStyle:"full"})},C6=class extends Cd{constructor(){super(...arguments),this.localeText=void 0,this.getLocaleText=void 0}setLocaleText(e){this.localeText!==e&&(this.localeText=e,this.dispatch("locale-changed"))}setLocaleTextFormatter(e){this.getLocaleText=e,this.getLocaleText!==e&&(this.getLocaleText=e,this.dispatch("locale-changed"))}t(e,t={}){var i,s;let{localeText:r=uX,getLocaleText:a}=this,o=r[e];return null!=(i=null!=(s=null==a?void 0:a({key:e,defaultValue:o,variables:t}))?s:(({defaultValue:e,variables:t})=>null==e?void 0:e.replaceAll(C3,(e,i,s)=>{let r=t[i],a=null!=s?C4[s]:null;return(null!=s&&null==a&&u8.warnOnce(`Format style [${s}] is not supported`),null!=a)?a.format(r):"number"==typeof r?C4.number.format(r):r instanceof Date?C4.datetime.format(r):String(r)}))({key:e,defaultValue:o,variables:t}))?i:e}},C5=class e{constructor(t){this.enabled=!0,this.width=600,this.height=300;let{width:i,height:s,pixelRatio:r,canvasElement:a,willReadFrequently:o=!1}=t;this.pixelRatio=!function(){if("u"<typeof navigator)return!1;let e=/\(iPhone; CPU iPhone OS (\d+_\d+_\d+) like Mac OS X\)/.exec(navigator.userAgent);if(null==e)return!1;let[t,i]=e[1].split("_").map(Number);return t<16||16===t&&i<6}()?null!=r?r:cO("devicePixelRatio"):1,this.element=null!=a?a:cG("canvas"),this.element.style.display="block",this.element.style.width=(null!=i?i:this.width)+"px",this.element.style.height=(null!=s?s:this.height)+"px",this.element.width=Math.round((null!=i?i:this.width)*this.pixelRatio),this.element.height=Math.round((null!=s?s:this.height)*this.pixelRatio),this.context=this.element.getContext("2d",{willReadFrequently:o}),this.onEnabledChange(),this.resize(null!=i?i:0,null!=s?s:0),e.debugContext(this.context)}static is(t){return t instanceof e}drawImage(e,t=0,i=0){return e.drawImage(this.context.canvas,t,i)}toDataURL(e){return this.element.toDataURL(e)}resize(e,t){if(!(e>0&&t>0))return;let{element:i,context:s,pixelRatio:r}=this;i.width=Math.round(e*r),i.height=Math.round(t*r),s.setTransform(r,0,0,r,0,0),i.style.width=e+"px",i.style.height=t+"px",this.width=e,this.height=t}clear(){this.context.save(),this.context.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"":"none")}static debugContext(e){if(m8.check("canvas")){let t=e.save.bind(e),i=e.restore.bind(e),s=0;Object.assign(e,{save(){t(),s++},restore(){if(0===s)throw Error("AG Charts - Unable to restore() past depth 0");i(),s--},verifyDepthZero(){if(0!==s)throw Error(`AG Charts - Save/restore depth is non-zero: ${s}`)}})}}};uQ([vY(e=>e.onEnabledChange())],C5.prototype,"enabled",2);var C8=class e{constructor(e,t){this.canvas=e,this.markDirty=t,this.debug=m8.create(!0,"scene"),this.layersMap=new Map,this.nextZIndex=0,this.nextLayerId=0}static sortLayers(e,t){var i,s;return mj([e.zIndex,...null!=(i=e.zIndexSubOrder)?i:[void 0,void 0],e.id],[t.zIndex,...null!=(s=t.zIndexSubOrder)?s:[void 0,void 0],t.id],mV)}get size(){return this.layersMap.size}forEach(t){Array.from(this.layersMap.values()).sort(e.sortLayers).forEach(t)}resize(e,t){this.canvas.resize(e,t),this.layersMap.forEach(({canvas:i})=>i.resize(e,t))}addLayer(e){let{width:t,height:i,pixelRatio:s}=this.canvas,{zIndex:r=this.nextZIndex++,name:a,zIndexSubOrder:o,getComputedOpacity:n,getVisibility:l}=e,h=new C5({width:t,height:i,pixelRatio:s});return r>=this.nextZIndex&&(this.nextZIndex=r+1),this.layersMap.set(h,{id:this.nextLayerId++,name:a,canvas:h,zIndex:r,zIndexSubOrder:o,getComputedOpacity:n,getVisibility:l}),this.debug("Scene.addLayer() - layers",this.layersMap),h}removeLayer(e){this.layersMap.has(e)&&(this.layersMap.delete(e),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() 
206-  layers",this.layersMap))}moveLayer(e,t,i){let s=this.layersMap.get(e);s&&(s.zIndex=t,s.zIndexSubOrder=i,this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layersMap))}clear(){this.layersMap.clear()}},C7=class e{constructor(){this.offscreenCanvas="u">typeof OffscreenCanvas?new OffscreenCanvas(0,0):cG("canvas"),e.offscreenCanvasCount++;let t=this.offscreenCanvas.getContext("2d");if(null==t)throw TypeError("AG Charts - invalid 2d context");this.renderCtx={ctx:t,devicePixelRatio:1,forceRender:!0,resized:!1,debugNodes:{}}}resize({spritePixelRatio:e,spriteWidth:t,spriteHeight:i}){this.offscreenCanvas.width=Math.max(t,0)*e,this.offscreenCanvas.height=Math.max(i,0)*e}renderSprite(e,t){var i;e=cR(e);let{renderCtx:s,renderCtx:{ctx:r},offscreenCanvas:a}=this,{scale:o=1,translateX:n=0,translateY:l=0}=null!=t?t:{};for(let t of(r.resetTransform(),r.clearRect(0,0,a.width,a.height),r.save(),r.beginPath(),r.setTransform(o,0,0,o,n,l),e))t.preRender(),t.render(s);if(r.closePath(),r.restore(),"transferToImageBitmap"in this.offscreenCanvas)return this.offscreenCanvas.transferToImageBitmap();let h=cG("canvas");return h.style.display="block",h.style.width=a.width+"px",h.style.height=a.height+"px",null==(i=h.getContext("2d"))||i.putImageData(r.getImageData(0,0,a.width,a.height),0,0),h}};function C9(e,t,i,s,r={},a=c4.zero){if(!m8.check("scene:stats","scene:stats:verbose"))return;let{layersRendered:o=0,layersSkipped:n=0,nodesRendered:l=0,nodesSkipped:h=0}=null!=s?s:{},d=performance.now(),{start:u,...c}=t,p=Object.entries(c).map(([e,t])=>yr(e,t)).filter(e=>null!=e).join(" + "),g=Object.entries(r).map(([e,t])=>`${e}: ${t}`).join(" ; "),m=m8.check("scene:stats:verbose"),v=[`${yr("⏱️",u,d)} (${p})`,`${g}`,`Layers: ${m?ys(o,n):e.size}; Sprites: ${C7.offscreenCanvasCount}`,m?`Nodes: ${ys(l,h)}`:null].filter(pM),f=new vI(e=>i.measureText(e)),C=new Map(v.map(e=>[e,f.measureLines(e)])),y=Math.max(...Array.from(C.values(),e=>e.width)),w=function(e,t){let i=0;for(let s of e)i+=t(s);return i}(C.values(),e=>e.height),b=2+a.x;i.save(),i.fillStyle="white",i.fillRect(b,0,y,w),i.fillStyle="black";let S=0;for(let[e,t]of C.entries())S+=t.height,i.fillText(e,b,S);i.restore()}C7.offscreenCanvasCount=0;var ye=new Set,yt=new Set(["gradient","zIndex","clipRect","cachedBBox","childNodeCounts","path","__zIndex","name","__scalingCenterX","__scalingCenterY","__rotationCenterX","__rotationCenterY","_previousDatum","__fill","__lineDash","borderPath","borderClipPath","_clipPath"]);function yi(e,t){var i;if(!m8.check(!0,"scene"))return{};let{parentNode:s}=e,r=0;return{node:"json"===t?function(e){let{...t}=e;for(let e in t)yt.has(e)||"number"==typeof t[e]||"string"==typeof t[e]||"boolean"!=typeof t[e]&&(ye.add(e),delete t[e]);return t}(e):e,name:null!=(i=e.name)?i:e.id,dirty:c6[e.dirty],...null!=s&&s.isVirtual?{virtualParentDirty:c6[s.dirty],virtualParent:s}:{},...Array.from(e.children(!1),e=>yi(e,t)).reduce((e,t)=>{let{name:i}=t,{node:{visible:s,opacity:a,zIndex:o,zIndexSubOrder:n,translationX:l,translationY:h,rotation:d,scalingX:u,scalingY:c},node:p,virtualParent:g}=t;(!s||a<=0)&&(i=`(${i})`),fi.is(p)&&(i=`*${i}*`);let m=null==n?void 0:n.map(e=>"function"==typeof e?`${e()} (fn)`:e).join(" / "),v=[`${(r++).toString().padStart(3,"0")}|`,`${null!=i?i:"<unknown>"}`,`z: ${o}`,m&&`zo: ${m}`,g&&"(virtual parent)",l&&`x: ${l}`,h&&`y: ${h}`,d&&`r: ${d}`,null!=u&&1!==u&&`sx: ${u}`,null!=c&&1!==c&&`sy: ${c}`].filter(e=>!!e).join(" "),f=v,C=1;for(;null!=e[f]&&C<100;)f=`${v} (${C++})`;return e[f]=t,e},{})}}function ys(e,t){let i=e+t;return`${e} / ${i} (${Math.round(100*e/i)}%)`}function yr(e,t,i){return`${e}: ${Math.round(100*(null!=i?i-t:t))/100}ms`}var ya=class{constructor(e){this.debug=m8.create(!0,"scene"),this.id=cE(this),this.root=null,this.pendingSize=null,this.isDirty=!1,this.canvas=new C5(e),this.layersManager=new C8(this.canvas,()=>{this.isDirty=!0})}get width(){var e,t;return null!=(e=null==(t=this.pendingSize)?void 0:t[0])?e:this.canvas.width}get height(){var e,t;return null!=(e=null==(t=this.pendingSize)?void 0:t[1])?e:this.canvas.height}setContainer(e){var t;let{element:i}=this.canvas;return null==(t=i.parentElement)||t.removeChild(i),e.appendChild(i),this}setRoot(e){var t;return this.root===e||(this.isDirty=!0,null==(t=this.root)||t._setLayerManager(),this.root=e,e&&(e.visible=!0,e._setLayerManager(this.layersManager))),this}attachNode(e){return this.appendChild(e),()=>this.removeChild(e)}appendChild(e){var t;return null==(t=this.root)||t.appendChild(e),this}removeChild(e){var t;return null==(t=this.root)||t.removeChild(e),this}download(e,t){var i;cz(this.canvas.toDataURL(t),null!=(i=null==e?void 0:e.trim())?i:"image")}getDataURL(e){return this.canvas.toDataURL(e)}resize(e,t){return e=Math.round(e),t=Math.round(t),e>0&&t>0&&(e!==this.width||t!==this.height)&&(this.pendingSize=[e,t],this.isDirty=!0,!0)}async render(e){let{debugSplitTimes:t={start:performance.now()},extraDebugStats:i,seriesRect:s}=null!=e?e:{},{canvas:r,canvas:{context:a}={},root:o,pendingSize:n}=this;if(!a)return;let l=performance.now();if(n&&(this.layersManager.resize(...n),this.pendingSize=null),o&&!o.visible){this.isDirty=!1;return}if(o&&!this.isDirty){this.debug.check()&&this.debug("Scene.render() - no-op",{redrawType:c6[o.dirty],tree:yi(o,"console")}),C9(this.layersManager,t,a,void 0,i,s);return}let h={ctx:a,devicePixelRatio:null!=(p=this.canvas.pixelRatio)?p:1,forceRender:!0,resized:!!n,debugNodes:{}};m8.check("scene:stats:verbose")&&(h.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0});let d=gt(cO("agChartsSceneDebug")),u=[];for(let e of d)"layout"===e?u.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):u.push(e);h.debugNodeSearch=u;let c=!1;if((!o||o.dirty>
206=1)&&(c=!0,r.clear()),o&&m8.check("scene:dirtyTree")){let{dirtyTree:e,paths:t}=function e(t){var i;if(0===t.dirty)return{dirtyTree:{},paths:[]};let s=Array.from(t.children(),t=>e(t)).filter(e=>e.paths.length>0),r=m1.is(t)&&null!=(i=t.name)?i:t.id,a=s.length?s.flatMap(e=>e.paths).map(e=>`${r}.${e}`):[r];return{dirtyTree:{name:r,node:t,dirty:c6[t.dirty],...s.map(e=>e.dirtyTree).filter(e=>null!=e.dirty).reduce((e,t)=>{var i;return e[null!=(i=t.name)?i:"<unknown>"]=t,e},{})},paths:a}}(o);m8.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:e,paths:t})}if(o&&c){if(o.visible&&o.preRender(),this.debug.check()){let e=yi(o,"console");this.debug("Scene.render() - before",{redrawType:c6[o.dirty],canvasCleared:c,tree:e})}o.visible&&(a.save(),o.render(h),a.restore())}if(t["✍️"]=performance.now()-l,this.layersManager.size&&c){let e=performance.now();a.save(),a.resetTransform(),this.layersManager.forEach(e=>{e.canvas.enabled&&e.getVisibility()&&(a.globalAlpha=e.getComputedOpacity(),e.canvas.drawImage(a))}),a.restore(),t["⛙"]=performance.now()-e}null==(g=a.verifyDepthZero)||g.call(a),this.isDirty=!1,C9(this.layersManager,t,a,h.stats,i,s);var p,g,m=h.debugNodes;for(let[e,t]of(a.save(),Object.entries(m))){let i=mJ.toCanvas(t);if(!i){u8.log(`Scene.render() - no bbox for debugged node [${e}].`);continue}a.globalAlpha=.8,a.strokeStyle="red",a.lineWidth=1,a.strokeRect(i.x,i.y,i.width,i.height),a.fillStyle="red",a.strokeStyle="white",a.font="16px sans-serif",a.textBaseline="top",a.textAlign="left",a.lineWidth=2,a.strokeText(e,i.x,i.y,i.width),a.fillText(e,i.x,i.y,i.width)}a.restore(),o&&this.debug.check()&&this.debug("Scene.render() - after",{redrawType:c6[o.dirty],tree:yi(o,"console"),canvasCleared:c})}toSVG(){var e;let t=null==(e=this.root)?void 0:e.toSVG();if(null==t)return;let i=document.createElementNS("http://www.w3.org/2000/svg","svg");if(i.setAttribute("width",String(this.width)),i.setAttribute("height",String(this.height)),null!=t.defs){let e=document.createElementNS("http://www.w3.org/2000/svg","defs");e.append(...t.defs),i.append(e)}return i.append(...t.elements),i.outerHTML}strip(){let{context:e,pixelRatio:t}=this.canvas;e.setTransform(t,0,0,t,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1}destroy(){this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0})}};ya.className="Scene";var yo=class{constructor(){this.cache=new WeakMap}call(e,...t){let i,s=this.cache.get(e);try{i=JSON.stringify(t)}catch{return this.invoke(e,t,s)}return(null==s&&(s=new Map,this.cache.set(e,s)),s.has(i))?s.get(i):this.invoke(e,t,s,i)}invoke(e,t,i,s){try{let r=e(...t);return i&&null!=s&&i.set(s,r),r}catch(e){u8.warnOnce("User callback errored, ignoring",e);return}}invalidateCache(){this.cache=new WeakMap}},yn=class extends Cu{constructor(e){super(),this.annotationRoot=e,this.mementoOriginatorKey="annotations",this.annotations=[]}createMemento(){return this.annotations}guardMemento(e){return pm(e)}restoreMemento(e,t,i){this.annotations=this.cleanData(i).map(e=>{let t=this.getAnnotationTypeStyles(e.type);return pk(e,t)}),this.listeners.dispatch("restore-annotations",{type:"restore-annotations",annotations:this.annotations})}updateData(e){this.annotations=this.cleanData(null!=e?e:[])}attachNode(e){return this.annotationRoot.append(e),()=>{var t;return null==(t=this.annotationRoot)||t.removeChild(e),this}}setAnnotationStyles(e){this.styles=e}getAnnotationTypeStyles(e){var t;return null==(t=this.styles)?void 0:t[e]}cleanData(e){for(let t of e)"textAlign"in t&&delete t.textAlign;return e}},yl=class{constructor(e){this.sceneRoot=e,this.axes=new Map,this.axisGridGroup=new fi({name:"Axes-Grids",zIndex:1}),this.axisGroup=new fi({name:"Axes",zIndex:2}),this.sceneRoot.appendChild(this.axisGroup),this.sceneRoot.appendChild(this.axisGridGroup)}updateAxes(e,t){for(let i of e)t.includes(i)||(i.detachAxis(this.axisGroup,this.axisGridGroup),i.destroy());for(let i of t)null!=e&&e.includes(i)||i.attachAxis(this.axisGroup,this.axisGridGroup);for(let e of(this.axes.clear(),t)){let t=e.createAxisContext();if(this.axes.has(t.direction)){var i;null==(i=this.axes.get(t.direction))||i.push(t)}else this.axes.set(t.direction,[t])}}getAxisContext(e){var t;return null!=(t=this.axes.get(e))?t:[]}destroy(){this.axes.clear(),this.sceneRoot.removeChild(this.axisGroup),this.sceneRoot.removeChild(this.axisGri
206dGroup)}},yh=class extends Cd{constructor(e){super(),this.animationManager=e,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.debug=m8.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(e){"function"==typeof e&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=e,this.isLoadingInitialData=!0,this.animationManager.skip(),this.dispatch("data-source-change"))}clearCallback(){this.dataSourceCallback=void 0}load(e){this.isLoadingData=!0,this.throttledFetch(e)}isLazy(){return null!=this.dataSourceCallback}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}createThrottledFetch(e){return u5(e=>this.fetch(e),e,{leading:!1,trailing:!0})}createThrottledDispatch(e){return u5((e,t)=>{this.debug(`DataService - dispatching 'data-load' | ${e}`),this.dispatch("data-load",{type:"data-load",data:t})},e,{leading:!0,trailing:!0})}async fetch(e){let t;if(!this.dataSourceCallback)throw Error("DataService - [dataSource.getData] callback not initialised");let i=performance.now(),s=this.requestCounter++;this.debug(`DataService - requesting | ${s}`),this.freshRequests.push(s);try{t=await this.dataSourceCallback(e),this.debug(`DataService - response | ${performance.now()-i}ms | ${s}`)}catch(e){this.debug(`DataService - request failed | ${s}`),u8.errorOnce(`DataService - request failed | [${e}]`)}this.isLoadingInitialData=!1;let r=this.freshRequests.findIndex(e=>e===s);-1===r||this.dispatchOnlyLatest&&r!==this.freshRequests.length-1?this.debug(`DataService - discarding stale request | ${s}`):(this.freshRequests=this.freshRequests.slice(r+1),0===this.freshRequests.length&&(this.isLoadingData=!1),Array.isArray(t)?this.throttledDispatch(s,t):this.dispatch("data-error"))}};uQ([v$({newValue(e){this.throttledDispatch=this.createThrottledDispatch(e)}})],yh.prototype,"dispatchThrottle",2),uQ([v$({newValue(e){this.throttledFetch=this.createThrottledFetch(e)}})],yh.prototype,"requestThrottle",2);var yd=class{constructor(e){this.maxAnimationTime=e,this.debug=m8.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(pQ.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){var e;return null!=(e=this.phases.get(pQ[this.currentPhase]))?e:[]}checkOverlappingId(e){null!=e&&this.controllers.has(e)&&(this.controllers.get(e).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${e}`),this.skip())}addAnimation(e){var t;if(!e.isComplete){if(pQ.indexOf(e.phase)<this.currentPhase){this.debug("Skipping animation due to being for an earlier phase",e.id),e.stop();return}this.controllers.set(e.id,e),null==(t=this.phases.get(e.phase))||t.push(e)}}removeAnimation(e){this.controllers.delete(e.id);let t=this.phases.get(e.phase),i=null==t?void 0:t.indexOf(e);null!=i&&i>=0&&(null==t||t.splice(i,1))}progress(e){var t;if(!this.isReady)return;let i=0===e?.01:e,s=()=>{let e=pQ[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:e,phaseMeta:pX[e]}},{phase:r,phaseControllers:a,phaseMeta:o}=s(),n=()=>null==pQ[this.currentPhase],l=()=>{for({phase:r,phaseControllers:a,phaseMeta:o}=s();!n()&&0===a.length;)this.currentPhase++,({phase:r,phaseControllers:a,phaseMeta:o}=s()),this.debug(`AnimationBatch - phase changing to ${r}`,{unusedTime:i},a)},h=this.controllers.size;this.debug(`AnimationBatch - ${e}ms; phase ${r} with ${null==(t=a)?void 0:t.length} of ${h}`);do{let e=i,t=o.skipIfNoEarlierAnimations&&0===this.animationTimeConsumed,s=0;for(let r of a)t?r.stop():i=Math.min(r.update(e),i),r.isComplete&&(s++,this.removeAnimation(r));this.animationTimeConsumed+=e-i,this.debug(`AnimationBatch - updated ${a.length} controllers; ${s} completed`),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),l()}while(i>0&&!n())this.animationTimeConsumed>this.maxAnimationTime&&(this.debug("Animation batch exceeded max animation time, skipping",[...this.controllers]),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let e=!0;for(let[,t]of this.controllers)if(t.duration>0&&!0!==pX[t.phase].skipIfNoEarlierAnimations){e=!1;break}if(!e)for(let[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(e=!0){if(!1===this.skipAnimations&&!0===e){for(let e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=e}play(){for(let e of this.controllers.values())e.play()}pause(){for(let e of this.controllers.values())e.pause()}stop(){for(let e of this.controllers.values())try{e.stop(),this.removeAnimation(e)}catch(e){u8.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(e){if(null!=e&&this.controllers.has(e)){let t=this.controllers.get(e);t&&(t.stop(),this.removeAnimation(t))}}stopByAnimationGroupId(e){for(let t of this.controllers.values())t.groupId===e&&this.stopByAnimationId(t.id)}
206dispatchStopped(){this.stoppedCbs.forEach(e=>e()),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}destroy(){this.stop(),this.controllers.clear()}};function yu(e){let t={...e,preventDefault(){var e;null==(e=t.sourceEvent)||e.preventDefault()}};return t}function yc(e,t){e.dispatchWrapHandlers(t.type,(e,t)=>e(t),yu(t))}var yp=["drag-start","drag","drag-end"],yg=[...yp,"click","dblclick","contextmenu","hover","leave","enter","page-left","wheel"],ym=["blur","focus"],yv=["keydown","keyup"],yf=["mousemove","mouseup"],yC=["pagehide","mousemove","mouseup"],yy=["dblclick","contextmenu","mousedown","mouseleave","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel","blur","focus","keydown","keyup"],yw=class e extends Cp{constructor(e,t){for(let i of(super(),this.keyboardOptions=e,this.domManager=t,this.debug=m8.create(!0,"interaction"),this.eventHandler=e=>this.processEvent(e),this.mouseDown=!1,this.touchDown=!1,this.clickHistory=[{offsetX:0/0,offsetY:0/0,type:"mousedown"}],this.dblclickHistory=[{offsetX:0/0,offsetY:0/0,type:"mousedown"},{offsetX:0/0,offsetY:0/0,type:"mouseup"},{offsetX:0/0,offsetY:0/0,type:"mousedown"}],this.stateQueue=34,this.rootElement=this.domManager.getShadowDocumentRoot(),yy))i.startsWith("touch")||"wheel"===i?this.domManager.addEventListener(i,this.eventHandler,{passive:!1}):this.domManager.addEventListener(i,this.eventHandler);for(let e of yC)cO().addEventListener(e,this.eventHandler);this.containerChanged(!0),this.domManager.addListener("container-changed",()=>this.containerChanged())}containerChanged(e=!1){var t,i;let s=this.domManager.getShadowDocumentRoot();if(e||s!==this.rootElement){for(let e of yf)null==(t=this.rootElement)||t.removeEventListener(e,this.eventHandler);for(let e of(this.rootElement=s,this.debug("[InteractionManager] Switching rootElement to:",this.rootElement),yf))null==(i=this.rootElement)||i.addEventListener(e,this.eventHandler)}}destroy(){for(let e of(super.destroy(),yC))cO().removeEventListener(e,this.eventHandler);for(let t of yf){var e;null==(e=this.rootElement)||e.removeEventListener(t,this.eventHandler)}for(let e of yy)this.domManager.removeEventListener(e,this.eventHandler);this.domManager.removeStyles("interactionManager")}pushState(e){this.stateQueue|=e}popState(e){this.stateQueue&=~e}getState(){return this.stateQueue&-this.stateQueue}processEvent(e){this.debug("Received raw event",e);let t=this.decideInteractionEventTypes(e);for(let i of(null==t||Array.isArray(t)||(t=[t]),null!=t?t:[]))this.dispatchEvent(e,i).catch(e=>u8.errorOnce(e))}async dispatchEvent(e,t){if(yg.includes(t))return void this.dispatchPointerEvent(e,t);let{relatedElement:i,targetElement:s}=this.extractElements(e);ym.includes(t)?this.dispatchTypedEvent(this.listeners,{type:t,sourceEvent:e,relatedElement:i,targetElement:s}):yv.includes(t)&&this.dispatchTypedEvent(this.listeners,{type:t,sourceEvent:e,relatedElement:i,targetElement:s})}dispatchTypedEvent(e,t){let i=yu(t);this.debug("Dispatching typed event",i,this.getState()),e.dispatchWrapHandlers(t.type,(e,t)=>e(t),i)}extractElements(e){let t,i;return"relatedTarget"in e&&e.relatedTarget instanceof HTMLElement&&(t=e.relatedTarget),"target"in e&&e.target instanceof HTMLElement&&(i=e.target),{relatedElement:t,targetElement:i}}dispatchPointerEvent(e,t){let i=this.calculateCoordinates(e);if(null==i)return;let s=this.buildPointerEvent({type:t,event:e,...i});this.debug("Dispatching pointer event",s,this.getState()),yc(this.listeners,s)}getEventHTMLTarget(e){return e.target instanceof HTMLElement?e.target:e.currentTarget instanceof HTMLElement?e.currentTarget:void 0}recordDown(e){e instanceof MouseEvent&&(pH(["offsetX","offsetY"],this.clickHistory[0],e),pH(["offsetX","offsetY"],this.dblclickHistory[2],this.dblclickHistory[0]),pH(["offsetX","offsetY"],this.dblclickHistory[0],e)),this.dragPreStartElement=this.getEventHTMLTarget(e)}recordUp(e){return e instanceof MouseEvent&&pH(["offsetX","offsetY"],this.dblclickHistory[1],e),this.dragPreStartElement=void 0,!!this.dragStartElement&&(this.dragStartElement=void 0,!0)}decideInteractionEventTypes(e){switch(e.type){case"blur":case"focus":case"keydown":case"keyup":return this.keyboardOptions.enabled?e.type:void 0;case"dblclick":case"contextmenu":case"wheel":return e.type;case"mousedown":if(!this.isEventOverElement(e))return;this.mouseDown=!0,this.recordDown(e);return;case"touchstart":if(!this.isEventOverElement(e))return;this.touchDown=!0,this.recordDown(e);return;case"touchmove":case"mousemove":if(!this.mouseDown&&!this.touchDown&&!this.isEventOverElement(e))return;if(!this.mouseDown&&!this.touchDown)return"hover";if(this.dragStartElement)return"drag";return this.dragStartElement=this.dragPreStartElement,this.dragPreStartElement=void 0,["drag-start","drag"];case"mouseup":if(!this.mouseDown&&!this.isEventOverElement(e))return;return this.mouseDown=!1,this.recordUp(e)?"drag-end":"click";case"touchend":if(!this.touchDown&&!this.isEventOverElement(e))return;return this.touchDown=!1,this.recordUp(e)?"drag-end":"click";case"mouseleave":case"touchcancel":return"leave";case"mouseenter":return"enter";case"pagehide":return"page-left"}}isEventOverElement(e){return this.domManager.isEventOverElement(e)}calculateCoordinates(t){if(t instanceof MouseEvent)return this.getMouseEventC
206oords(t);if("u">typeof TouchEvent&&t instanceof TouchEvent){var i;let{clientX:s,clientY:r,pageX:a,pageY:o}=null!=(i=t.touches[0])?i:t.changedTouches[0];return{...e.NULL_COORDS,clientX:s,clientY:r,pageX:a,pageY:o}}if(t instanceof PageTransitionEvent){if(t.persisted)return;return e.NULL_COORDS}}getMouseEventCoords(e){let{clientX:t,clientY:i,pageX:s,pageY:r}=e,{offsetX:a,offsetY:o}=e,n=this.getEventHTMLTarget(e),{x:l=0,y:h=0}=n?this.domManager.calculateCanvasPosition(n):{};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){let e=this.domManager.calculateCanvasPosition(this.dragStartElement);a-=e.x-l,o-=e.y-h}else a+=l,o+=h;return{clientX:t,clientY:i,pageX:s,pageY:r,offsetX:a,offsetY:o}}isWheelEvent(e){return"wheel"===e.type}buildPointerEvent(e){let{type:t,event:i,clientX:s,clientY:r}=e,{offsetX:a,offsetY:o,pageX:n,pageY:l}=e;if(!pE(a)||!pE(o)){let e=this.domManager.getBoundingClientRect();a=s-e.left,o=r-e.top}if(!pE(n)||!pE(l)){var h,d,u;let e=null==(h=this.rootElement)?void 0:h.getBoundingClientRect();n=s-(null!=(d=null==e?void 0:e.left)?d:0),l=r-(null!=(u=null==e?void 0:e.top)?u:0)}let[c,p]=[0/0,0/0];if(this.isWheelEvent(i)){let e=0===i.deltaMode?.01:1;c=i.deltaX*e,p=i.deltaY*e}let g=[];"click"===i.type?g=this.clickHistory:"dblclick"===i.type&&(g=this.dblclickHistory);let{relatedElement:m,targetElement:v}=this.extractElements(i),f={type:t,offsetX:a,offsetY:o,pageX:n,pageY:l,deltaX:c,deltaY:p,button:"button"in i?Number(i.button):0,pointerHistory:g,sourceEvent:i,relatedElement:m,targetElement:v};return this.debug("InteractionManager - builtEvent: ",f,this.getState()),f}};function yb(e){return null==e||!isNaN(e)&&e>=0&&e<=2}yw.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};var yS=class{constructor(e,t){this.interactionManager=e,this.chartUpdateMutex=t,this.defaultDuration=1e3,this.batch=new yd(1.5*this.defaultDuration),this.debug=m8.create(!0,"animation"),this.events=new Ca,this.rafAvailable="u">typeof requestAnimationFrame,this.isPlaying=!0,this.requestId=null,this.skipAnimations=!0,this.currentAnonymousAnimationId=0}addListener(e,t){return this.events.on(e,t)}animate(e){let t=this.batch;try{t.checkOverlappingId(e.id)}catch(e){this.failsafeOnError(e);return}let{id:i}=e;null==i&&(i=`__${this.currentAnonymousAnimationId}`,this.currentAnonymousAnimationId+=1);let s=this.isSkipped()||"none"===e.phase;s&&this.debug("AnimationManager - skipping animation");let{delay:r,duration:a}=e;if(!yb(r))throw Error(`Animation delay of ${r} is unsupported (${i})`);if(!yb(a))throw Error(`Animation duration of ${a} is unsupported (${i})`);let o=new p1({...e,id:i,skip:s,autoplay:!!this.isPlaying&&e.autoplay,phase:e.phase,defaultDuration:this.defaultDuration});if(!this.forceTimeJump(o,this.defaultDuration))return this.batch.addAnimation(o),o}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");try{this.batch.pause()}catch(e){this.failsafeOnError(e)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(e){try{this.batch.stopByAnimationId(e)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(e){try{this.batch.stopByAnimationGroupId(e)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(e=!0){this.skipAnimations=e}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:Error().stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(e){this.requestId=cO().requestAnimationFrame(e)}forceTimeJump(e,t){return!1}requestAnimation(){let e;if(!this.rafAvailable||!this.batch.isActive()||null!==this.requestId)return;let t=async i=>{let s=async()=>{let t=i-(null!=e?e:i);e=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.size,deltaTime:t}),this.interactionManager.pushState(2);try{this.batch.progress(t)}catch(e){this.failsafeOnError(e)}this.events.emit("animation-frame",{type:"animation-frame",deltaMs:t})};this.isSkippingFrames()?await this.chartUpdateMutex.acquireImmediately(s):await this.chartUpdateMutex.acquire(s),this.batch.isActive()?this.scheduleAnimationFrame(t):(this.batch.stop(),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))};this.events.emit("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(t)}cancelAnimation(){null!==this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(e,t=!0){u8.error("Error during animation, skipping animations",e),t&&this.cancelAnimation()}startBatch(e){this.debug(`AnimationManager - startBatch() with skipAnimations=${e}.`),this.reset(),this.batch.destroy(),this.batch=new yd(1.5*this.defaultDuration),!0===e&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(2),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(e){this.batch.stoppedCbs.add(e)}destroy(){this.stop(),this.events.clear()}},yx=class extends Cu{legendItemClick(e,t,i,s){this.listeners.dispatch("legend-item-click",{type:"legend-item-click",series:e,itemId:t,enabled:i,legendItemName:s})}legendItemDoubleClick(e,t,i,s,r){this.listeners.dispatch("legend-item-double-click",{type:"legend-item-double-click",series:e,itemId:t,enabled:i,legendItemName:r,numVisibleItems:s})}axisHover(e,t){this.listeners.dispatch("axis-hover",{type:"axis-hover",axisId:e,direction:t})}},yM=class e{constructor(e){this.defaultActions=[],this.disabledActions=new Set,this.hiddenActions=new Set,this.listeners=new Cd;let{Default:t,ContextMenu:i}=Cc;this.destroyFns=[e.listenAll("contextmenu",e=>this.onContextMenu(e),t|i)]}
206destroy(){this.destroyFns.forEach(e=>e())}onContextMenu(t){"all"===e.toContextType(t.region)&&this.dispatchContext("all",t,{})}static toContextType(e){return"legend"===e||"series"===e?e:"all"}static check(e,t){return t.type===e}static checkCallback(e,t,i){return e===t}dispatchContext(e,t,i,s){var r,a;let{sourceEvent:o}=t,n=null!=(r=null==s?void 0:s.x)?r:t.offsetX,l=null!=(a=null==s?void 0:s.y)?a:t.offsetY;o.stopPropagation(),this.listeners.dispatch("",yu({type:e,x:n,y:l,context:i,sourceEvent:o}))}addListener(e){return this.listeners.addListener("",e)}filterActions(e){return this.defaultActions.filter(t=>t.id&&!this.hiddenActions.has(t.id)&&["all",e].includes(t.type))}registerDefaultAction(e){let t=null!=e.id&&!this.defaultActions.some(({id:t})=>t===e.id);return t&&this.defaultActions.push(e),()=>{let i=t?this.defaultActions.findIndex(({id:t})=>t===e.id):-1;-1!==i&&this.defaultActions.splice(i,1)}}enableAction(e){this.disabledActions.delete(e)}disableAction(e){this.disabledActions.add(e)}showAction(e){this.hiddenActions.add(e)}hideAction(e){this.hiddenActions.delete(e)}isDisabled(e){return this.disabledActions.has(e)}},yD=class extends Map{constructor(e,t){super(),this.defaultValue=e,this.defaultState=t}set(e,t){return this.delete(e),void 0!==t&&super.set(e,t),this}stateId(){var e;return null!=(e=Array.from(this.keys()).pop())?e:this.defaultState}stateValue(){var e;return null!=(e=Array.from(this.values()).pop())?e:this.defaultValue}},yE=((F=yE||{}).Auto="auto",F.Default="default",F.Grab="grab",F.Grabbing="grabbing",F.Move="move",F.NotAllowed="not-allowed",F.Pointer="pointer",F.EWResize="ew-resize",F.NSResize="ns-resize",F.ZoomIn="zoom-in",F.ZoomOut="zoom-out",F),yI=class{constructor(e){this.domManager=e,this.stateTracker=new yD("default")}updateCursor(e,t){this.stateTracker.set(e,t),this.domManager.updateCursor(this.stateTracker.stateValue())}getCursor(){return this.domManager.getCursor()}};function yA(e,t){let i,s;return Math.sqrt((i=e.screenX-t.screenX,i*i+(s=e.screenY-t.screenY)*s))}var yR=class extends Cu{constructor(e){super(),this.domManager=e,this.touchstart=e=>this.onTouchStart(e),this.touchmove=e=>this.onTouchMove(e),this.touchend=e=>this.onTouchEnd(e),this.touchcancel=e=>this.onTouchCancel(e),this.pinch={finger1:{identifier:0/0,screenX:0/0,screenY:0/0},finger2:{identifier:0/0,screenX:0/0,screenY:0/0},origin:{x:0/0,y:0/0},distance:0/0,status:0},this.domManager.addEventListener("touchstart",this.touchstart,{passive:!0}),this.domManager.addEventListener("touchmove",this.touchmove,{passive:!1}),this.domManager.addEventListener("touchend",this.touchend),this.domManager.addEventListener("touchcancel",this.touchcancel)}destroy(){this.domManager.removeEventListener("touchstart",this.touchstart),this.domManager.removeEventListener("touchmove",this.touchmove),this.domManager.removeEventListener("touchend",this.touchend),this.domManager.removeEventListener("touchcancel",this.touchcancel)}findPinchTouches(e){let{touches:t}=e,{finger1:i,finger2:s}=this.pinch;if(0!==this.pinch.status&&2===t.length){if(t[0].identifier===i.identifier&&t[1].identifier===s.identifier)return[t[0],t[1]];if(t[0].identifier===s.identifier&&t[1].identifier===i.identifier)return[t[1],t[0]]}}copyTouchData(e){let t=["identifier","screenX","screenY"];pH(t,this.pinch.finger1,e.touches[0]),pH(t,this.pinch.finger2,e.touches[1]),this.pinch.distance=yA(this.pinch.finger1,this.pinch.finger2)}
206dispatchPinchEvent(e,t,i){let{finger1:s,finger2:r,origin:a}=this.pinch;this.listeners.dispatch(e,yu({sourceEvent:i,type:e,finger1:s,finger2:r,deltaDistance:t,origin:a}))}onTouchStart(e){this.stopPinchTracking(e);let{pinch:t}=this;2===e.touches.length&&(t.status=1,this.copyTouchData(e),t.origin.x=(e.touches[0].clientX+e.touches[1].clientX)/2,t.origin.y=(e.touches[0].clientY+e.touches[1].clientY)/2)}onTouchMove(e){let t=this.findPinchTouches(e);if(void 0!==t){let[i,s]=t,{pinch:r}=this,a=yA(i,s),o=a-r.distance;1===r.status?Math.abs(o)>1&&(r.status=2,this.copyTouchData(e),this.dispatchPinchEvent("pinch-start",0,e)):2===r.status?(r.distance=a,this.copyTouchData(e),this.dispatchPinchEvent("pinch-move",o,e)):u8.error(`unexpected pinch.status: ${r.status}`)}}onTouchEnd(e){this.stopPinchTracking(e)}onTouchCancel(e){this.stopPinchTracking(e)}stopPinchTracking(e){let{pinch:t}=this;2===t.status&&this.dispatchPinchEvent("pinch-end",0,e),this.pinch.status=0}},yT=class extends Cu{constructor(){super(...arguments),this.highlightStates=new yD}updateHighlight(e,t){let{activeHighlight:i}=this;this.highlightStates.set(e,t),this.activeHighlight=this.highlightStates.stateValue(),this.isEqual(this.activeHighlight,i)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:i,callerId:e})}getActiveHighlight(){return this.activeHighlight}isEqual(e,t){return e===t||null!=e&&null!=t&&(null==e?void 0:e.series)===(null==t?void 0:t.series)&&(null==e?void 0:e.itemId)===(null==t?void 0:t.itemId)&&(null==e?void 0:e.datum)===(null==t?void 0:t.datum)}},yL=class extends Cp{constructor(e,t,i){super(),this.focusIndicator=e,this.interactionManager=t,this.previousInputDevice="keyboard",this.destroyFns.push(t.addListener("click",()=>this.onClick(),41),t.addListener("hover",()=>this.onMouse(),41),t.addListener("drag-start",()=>this.onMouse(),41),t.addListener("blur",e=>this.onBlur(e),63),t.addListener("focus",e=>this.onFocus(e),63),t.addListener("keydown",e=>this.onKeyDown(e),63)),this.focusIndicator.overrideFocusVisible("integrated"!==i&&void 0)}getState(){return this.interactionManager.getState()}destroy(){super.destroy()}onClick(){this.focusIndicator.overrideFocusVisible(!1),this.previousInputDevice="mouse"}onMouse(){this.previousInputDevice="mouse"}onBlur(e){this.focusIndicator.overrideFocusVisible(void 0),this.dispatch("blur",0,e)}onFocus(e){this.dispatch("focus",0,e)}onKeyDown(e){let t=this.getState(),{key:i,code:s,altKey:r,shiftKey:a,metaKey:o,ctrlKey:n}=e.sourceEvent;if(n||o){if("y"===i||"z"===i&&a)return this.focusIndicator.overrideFocusVisible("keyboard"===this.previousInputDevice),this.dispatch("redo",0,e);else if("z"===i)return this.focusIndicator.overrideFocusVisible("keyboard"===this.previousInputDevice),this.dispatch("undo",0,e)}if(9&t)return void this.focusIndicator.overrideFocusVisible(!1);switch(i){case"+":return this.dispatch("nav-zoom",1,e);case"-":return this.dispatch("nav-zoom",-1,e)}if(!r&&!a&&!o&&!n)switch(this.focusIndicator.overrideFocusVisible(!0),s){case"ArrowDown":return this.dispatch("nav-vert",1,e);case"ArrowUp":return this.dispatch("nav-vert",-1,e);case"ArrowLeft":return this.dispatch("nav-hori",-1,e);case"ArrowRight":return this.dispatch("nav-hori",1,e);case"ZoomIn":case"Add":return this.dispatch("nav-zoom",1,e);case"ZoomOut":case"Substract":return this.dispatch("nav-zoom",-1,e);case"Space":case"Enter":return this.dispatch("submit",0,e)}}dispatch(e,t,i){let{previousInputDevice:s}=this;yc(this.listeners,{type:e,delta:t,sourceEvent:i,previousInputDevice:s}),"keydown"!==i.type||["redo","undo","nav-zoom"].includes(e)||(this.previousInputDevice="keyboard")}},yF=((P=yF||{}).NAVIGATOR="navigator",P.ROOT="root",P.SERIES="series",P.HORIZONTAL_AXES="horizontal-axes",P.VERTICAL_AXES="vertical-axes",P),yP=class{constructor(e,t){this.node=e,this.overrideId=t}get id(){var e;return null!=(e=this.overrideId)?e:this.node.id}get visible(){return this.node.visible}toCanvasBBox(){return mJ.toCanvas(this.node)}fromCanvasPoint(e,t){return mJ.fromCanvasPoint(this.node,e,t)}},yk=class extends yP{constructor(e,t,i){super(e,i),this.bboxFn=t}toCanvasBBox(){return this.bboxFn()}},yN=class extends Cd{};function yO(e,t,i,s,r=32){var a;return null!=(a=null==e?void 0:e.addListener(i,e=>{t.getState()&r&&s(e)}))?a:()=>{}}function yG(e){return e instanceof pe?new yP(e):e instanceof yP?e:new yP(e.node,e.id)}var yB=class{constructor(e){this.interactionManager=e,this.debug=m8.create(!0,"region"),this.isDragging=!1,this.leftCanvas=!1,this.regions=new Map,this.destroyFns=[],this.allRegionsListeners=new yN,this.destroyFns.push(...yg.map(t=>e.addListener(t,this.processPointerEvent.bind(this),63)))}
206destroy(){for(let e of(this.destroyFns.forEach(e=>e()),this.current=void 0,this.regions.values()))e.listeners.destroy();this.regions.clear()}addRegion(e,...t){if(this.regions.has(e))throw Error(`AG Charts - Region: ${e} already exists`);let i={properties:{name:e,bboxproviders:t.map(yG)},listeners:new yN};return this.regions.set(e,i),this.makeObserver(i)}updateRegion(e,...t){let i=this.regions.get(e);if(i)i.properties.bboxproviders=t.map(yG);else throw Error("AG Charts - unknown region: "+e)}getRegion(e){return this.makeObserver(this.regions.get(e))}listenAll(e,t,i=32){return yO(this.allRegionsListeners,this.interactionManager,e,t,i)}makeObserver(e){let{interactionManager:t}=this;return new class{addListener(i,s,r=32){return yO(null==e?void 0:e.listeners,t,i,s,r)}}}checkPointerHistory(e,t){for(let s of t.pointerHistory){var i;let{region:t}=null!=(i=this.pickRegion(s.offsetX,s.offsetY))?i:{};if(e.properties.name!==(null==t?void 0:t.properties.name))return!1}return!0}dispatch(e,t){var i;if(null==e)return;let s=e.region.properties.bboxproviders[0],r=0,a=0;if("offsetX"in t&&"offsetY"in t)({x:r,y:a}=s.fromCanvasPoint(t.offsetX,t.offsetY));else{let e=s.toCanvasBBox();r=e.width/2,a=e.height/2}let o=yu({...t,region:e.region.properties.name,bboxProviderId:null==(i=e.bboxProvider)?void 0:i.id,regionOffsetX:r,regionOffsetY:a});this.debug("Dispatching region event: ",o),this.allRegionsListeners.dispatch(o.type,o),e.region.listeners.dispatch(o.type,o)}handleDragging(e){let{current:t}=this;switch(e.type){case"drag-start":this.isDragging=!0,this.leftCanvas=!1;break;case"leave":return this.leftCanvas=!0,this.isDragging;case"enter":return this.leftCanvas=!1,this.isDragging;case"drag":if(this.isDragging)return this.dispatch(t,e),!0;break;case"drag-end":if(this.isDragging)return this.isDragging=!1,this.dispatch(t,e),this.leftCanvas&&this.dispatch(t,{...e,type:"leave"}),!0}return!1}processPointerEvent(e){var t;let i;if(this.handleDragging(e))return;let{current:s}=this;switch(function(e){var t;let{type:i,sourceEvent:s}=e,{id:r,className:a,classList:o,ariaHidden:n}=null!=(t=null==s?void 0:s.target)?t:{};return o instanceof DOMTokenList?o.contains("ag-charts-annotations__axis-button-icon")&&!yp.includes(i)||"ag-charts-series-area"===a||"ag-charts-canvas-proxy"===a||"ag-charts-proxy-elem"===a&&!(null!=r&&r.toString().startsWith("ag-charts-legend-item-"))||(null==s?void 0:s.target)instanceof HTMLCanvasElement?"none":function(e){if(null==e||!(e instanceof HTMLElement))return;let t=e;for(;null!=t&&!(null!=(i=t)&&i.classList.contains("ag-charts-wrapper"));){var i;if(t.classList.contains("ag-chart-tooltip"))return t;t=t.parentElement}}(s.target)&&"true"!==n?"wait":"leave":"leave"}(e)){case"wait":return;case"none":i=this.pickRegion(e.offsetX,e.offsetY);break;case"leave":i=void 0}let r=null==(t=i)?void 0:t.region;void 0!==s&&(null==r?void 0:r.properties.name)!==s.region.properties.name&&this.dispatch(s,{...e,type:"leave"}),void 0!==r&&r.properties.name!==(null==s?void 0:s.region.properties.name)&&this.dispatch(i,{...e,type:"enter"}),void 0!==r&&this.checkPointerHistory(r,e)&&this.dispatch(i,e),this.current=i}pickRegion(e,t){let i,s,r=1/0;for(let a of this.regions.values())for(let o of a.properties.bboxproviders){if(!1===o.visible)continue;let n=o.toCanvasBBox(),l=n.width*n.height;l<r&&n.containsPoint(e,t)&&(r=l,i=a,s=o)}return i?{region:i,bboxProvider:s}:void 0}},yz=["start","center","end"],yV=["seriesType","annotations","annotationOptions","ranges","zoom"],yH={seriesType:0,annotations:1,annotationOptions:2,ranges:3,zoom:4},yj=((k=yj||{}).Top="top",k.Left="left",k.Right="right",k.Bottom="bottom",k.Floating="floating",k.FloatingTop="floating-top",k.FloatingBottom="floating-bottom",k),yW=Object.values(yj);function yU(e){return["floating-top","floating-bottom"].includes(e)}var y_=class extends Cu{static isGroup(e,t){return t.group===e}static isChildElement(e,t){for(let i of yW)if(e.isManagedChildDOMElement(t,"canvas-overlay",`toolbar-${i}`))return!0;return!1}pressButton(e,t,i,s,r){this.listeners.dispatch("button-pressed",{type:"button-pressed",group:e,id:t,value:i,rect:s,sourceEvent:r})}cancel(e){this.listeners.dispatch("cancelled",{type:"cancelled",group:e})}toggleButton(e,t,i){let{active:s=!1,enabled:r=!0,visible:a=!0,checked:o=!1}=i;this.listeners.dispatch("button-toggled",{type:"button-toggled",group:e,id:t,active:s,enabled:r,visible:a,checked:o})}updateButton(e,t,i){this.listeners.dispatch("button-updated",{type:"button-updated",group:e,id:t,...i})}toggleGroup(e,t,i){let{active:s,visible:r}=i;this.listeners.dispatch("group-toggled",{type:"group-toggled",caller:e,group:t,active:s,visible:r})}updateGroup(e){this.listeners.dispatch("group-updated",{type:"group-updated",group:e})}groupMoved(e){this.listeners.dispatch("group-moved",{type:"group-moved",group:e})}changeFloatingAnchor(e,t){this.listeners.dispatch("floating-anchor-changed",{type:"floating-anchor-changed",group:e,anchor:t})}buttonMoved(e,t,i,s){this.listeners.dispatch("button-moved",{type:"button-moved",group:e,value:t,rect:i,groupRect:s})}proxyGroupOptions(e,t,i){this.listeners.dispatch("proxy-group-options",{type:"proxy-group-options",caller:e,group:t,options:i})}},y$=class{constructor(e,t){this.domManager=e,this.tooltip=t,this.stateTracker=new yD,this.suppressState=new yD(!1),this.appliedState=null,t.setup(e),e.addListener("hidden",()=>this.tooltip.toggle(!1))}updateTooltip(e,t,i){var s;this.tooltip.enabled&&(null!=i||(i=null==(s=this.stateTracker.get(e))?void 0:s.content),this.stateTracker.set(e,{content:i,meta:t}),this.applyStates())}removeTooltip(e){this.tooltip.enabled&&(this.stateTracker.delete(e),this.applyStates())}suppressTooltip(e){this.suppressState.set(e,!0)}unsuppressTooltip(e){this.suppressState.delete(e)}getTooltipMeta(e){var t;return null==(t=this.stateTracker.get(e))?void 0:t.meta}destroy(){this.domManager.removeStyles("tooltip")}applyStates(){var e;let t=this.stateTracker.stateId(),i=t?this.stateTracker.get(t):null;if(this.suppressState.stateValue()||(null==i?void 0:i.meta)==null||(null==i?void 0:i.content)==null){this.appliedState=null,this.tooltip.toggle(!1);return}let s=this.domManager.getBoundingClientRect(),r="extended"===this.tooltip.bounds?this.domManager.getOverlayClientRect():s;if((null==(e=this.appliedState)?void 0:e.content)===(null==i?void 0:i.content)){let e=this.tooltip.isVisible();this.tooltip.show(r,s,null==i?void 0:i.meta,null,e)}else this.tooltip.show(r,s,null==i?void 0:i.meta,null==i?void 0:i.content);this.appliedState=i}static makeTooltipMeta(e,t){var i,s,r,a,o,n,l;let{offsetX:h,offsetY:d}=e,u=t.series.properties.tooltip,c={offsetX:h,offsetY:d,enableInteraction:null!=(i=null==(s=u.interaction)?void 0:s.enabled)&&i,lastPointerEvent:{type:e.type,offsetX:h,offsetY:d},showArrow:u.showArrow,position:{type:u.position.type,xOffset:u.position.xOffset,yOffset:u.position.yOffset}},p=null!=(r=null!=(a=null==(o=t.yBar)?void 0:o.upperPoint)?a:t.midPoint)?r:null==(n=(l=t.series).datumMidPoint)?void 0:n.call(l,t);if(("node"===u.position.type||"sparkline"===u.position.type)&&p){let{x:e,y:i}=p,s=mJ.toCanvasPoint(t.series.contentGroup,e,i);return{...c,offsetX:Math.round(s.x),offsetY:Math.round(s.y)}}return c}}
206,yY=class extends Cu{constructor(){super(...arguments),this.mementoOriginatorKey="zoom",this.axisZoomManagers=new Map,this.state=new yD(void 0,"initial"),this.rejectCallbacks=new Map}addLayoutListeners(e){this.destroyFns.push(e.addListener("layout:complete",e=>{this.axes=e.axes}))}createMemento(){let e=this.getDefinedZoom();return{rangeX:this.getRangeDirection(e,"x"),rangeY:this.getRangeDirection(e,"y"),ratioX:{start:e.x.min,end:e.x.max},ratioY:{start:e.y.min,end:e.y.max}}}guardMemento(e){return pb(e)&&(null!=e.ratioX||null!=e.ratioY||null!=e.rangeX||null!=e.rangeY)}restoreMemento(e,t,i){this.listeners.dispatch("restore-zoom",{...i,type:"restore-zoom"})}updateAxes(e){let t=new Map(e.map(e=>[e.id,this.axisZoomManagers.get(e.id)]));for(let s of(this.axisZoomManagers.clear(),e)){var i;this.axisZoomManagers.set(s.id,null!=(i=t.get(s.id))?i:new yK(s))}this.state.size>0&&e.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}updateZoom(e,t,i=!0,s){if(s&&this.rejectCallbacks.set(e,s),0===this.axisZoomManagers.size){let a=this.state.stateId();if("initial"===a||a===e||i){if(this.state.set(e,t),a!==e){var r;null==(r=this.rejectCallbacks.get(a))||r(e)}}else null==s||s(a);return}this.state.set(e,t),this.axisZoomManagers.forEach(i=>{i.updateZoom(e,null==t?void 0:t[i.getDirection()])}),this.applyChanges(e)}updateAxisZoom(e,t,i){var s;null==(s=this.axisZoomManagers.get(t))||s.updateZoom(e,i),this.applyChanges(e)}fireZoomPanStartEvent(e){this.listeners.dispatch("zoom-pan-start",{type:"zoom-pan-start",callerId:e})}getZoom(){let e,t;if(this.axisZoomManagers.forEach(i=>{"x"===i.getDirection()?null!=e||(e=i.getZoom()):"y"===i.getDirection()&&(null!=t||(t=i.getZoom()))}),e||t)return{x:e,y:t}}getAxisZoom(e){var t,i;return null!=(t=null==(i=this.axisZoomManagers.get(e))?void 0:i.getZoom())?t:{min:0,max:1}}getAxisZooms(){let e={};for(let[t,i]of this.axisZoomManagers.entries())e[t]={direction:i.getDirection(),zoom:i.getZoom()};return e}applyChanges(e){if(!Array.from(this.axisZoomManagers.values(),e=>e.applyChanges()).some(Boolean))return;let t={};for(let[e,i]of this.axisZoomManagers.entries())t[e]=i.getZoom();this.listeners.dispatch("zoom-change",{type:"zoom-change",...this.getZoom(),axes:t,callerId:e})}getRangeDirection(e,t){for(let f of null!=(i=this.axes)?i:[]){var i,s,r,a,o,n,l,h,d,u,c,p,g,m,v;let C,y;if(f.direction!==t)continue;let w=null==(s=(r=f.scale).getDomain)?void 0:s.call(r),b=null==(a=(o=f.scale).convert)?void 0:a.call(o,null==w?void 0:w.at(0)),S=null==(n=(l=f.scale).convert)?void 0:n.call(l,null==w?void 0:w.at(-1));if(!pE(b)||!pE(S))return;if(b<=S){let i=S-b;C=null==(h=(d=f.scale).invert)?void 0:h.call(d,0),y=null==(u=(c=f.scale).invert)?void 0:u.call(c,b+i*e[t].max)}else{let i=b-S;C=null==(p=(g=f.scale).invert)?void 0:p.call(g,b-i*e[t].min),y=null==(m=(v=f.scale).invert)?void 0:m.call(v,0)}return{start:C,end:y}}}getDefinedZoom(){var e,t,i,s,r,a,o,n;let l=this.getZoom();return{x:{min:null!=(e=null==l||null==(t=l.x)?void 0:t.min)?e:0,max:null!=(i=null==l||null==(s=l.x)?void 0:s.max)?i:1},y:{min:null!=(r=null==l||null==(a=l.y)?void 0:a.min)?r:0,max:null!=(o=null==l||null==(n=l.y)?void 0:n.max)?o:1}}}},yK=class{constructor(e){this.axis=e;let[t=0,i=1]=e.visibleRange;this.state=new yD({min:t,max:i}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(e,t){this.state.set(e,t)}getZoom(){return vG(this.state.stateValue())}applyChanges(){let e=this.currentZoom;return this.currentZoom=this.state.stateValue(),e.min!==this.currentZoom.min||e.max!==this.currentZoom.max}},yZ=class{constructor(){this.groups={}}registerSeries({internalId:e,seriesGrouping:t,visible:i,type:s}){var r;t&&(null!=(r=this.groups)[s]||(r[s]={}),this.groups[s][e]={grouping:t,visible:i})}updateSeries({internalId:e,seriesGrouping:t,visible:i,type:s}){var r;if(!t)return;let a=null==(r=this.groups[s])?void 0:r[e];a&&(a.grouping=t,a.visible=i)}deregisterSeries({internalId:e,type:t}){this.groups[t]&&delete this.groups[t][e],this.groups[t]&&0===Object.keys(this.groups[t]).length&&delete this.groups[t]}getVisiblePeerGroupIndex({type:e,seriesGrouping:t,visible:i}){if(!t)return{visibleGroupCount:+!!i,visibleSameStackCount:+!!i,index:0};let s=new Set,r=new Set;for(let i of Object.values(null!=(a=this.groups[e])?a:{})){var a;i.visible&&(s.add(i.grouping.groupIndex),i.grouping.groupIndex===t.groupIndex&&r.add(i.grouping.stackIndex))}let o=Array.from(s);return o.sort((e,t)=>
206e-t),{visibleGroupCount:o.length,visibleSameStackCount:r.size,index:o.indexOf(t.groupIndex)}}},yq=((N=yq||{})[N.FULL=0]="FULL",N[N.UPDATE_DATA=1]="UPDATE_DATA",N[N.PROCESS_DATA=2]="PROCESS_DATA",N[N.PERFORM_LAYOUT=3]="PERFORM_LAYOUT",N[N.SERIES_UPDATE=4]="SERIES_UPDATE",N[N.PRE_SCENE_RENDER=5]="PRE_SCENE_RENDER",N[N.SCENE_RENDER=6]="SCENE_RENDER",N[N.NONE=7]="NONE",N),yQ=class extends Cd{constructor(e){super(),this.updateCallback=e}update(e=0,t){this.updateCallback(e,t)}dispatchUpdateComplete(e){this.dispatch("update-complete",{type:"update-complete",minRect:null==e?void 0:e.minRect,minVisibleRect:null==e?void 0:e.minVisibleRect})}dispatchPreDomUpdate(){this.dispatch("pre-dom-update",{type:"pre-dom-update"})}dispatchPreSceneRender(e){this.dispatch("pre-scene-render",{type:"pre-scene-render",...e})}},yX=class{constructor(e,t){this.callbackCache=new yo,this.chartEventManager=new yx,this.highlightManager=new yT,this.layoutManager=new Cn,this.localeManager=new C6,this.seriesStateManager=new yZ,this.stateManager=new Cy,this.toolbarManager=new y_,this.zoomManager=new yY;let{scene:i,root:s,syncManager:r,container:a,updateCallback:o,updateMutex:n,pixelRatio:l,styleContainer:h}=t;this.chartService=e,this.syncManager=r,this.domManager=new Cz(a,h);let d=this.domManager.addChild("canvas","scene-canvas",null==i?void 0:i.canvas.element);this.scene=null!=i?i:new ya({pixelRatio:l,canvasElement:d}),this.scene.setRoot(s),this.axisManager=new yl(s),this.annotationManager=new yn(e.annotationRoot),this.cursorManager=new yI(this.domManager),this.interactionManager=new yw(e.keyboard,this.domManager),this.focusIndicator=new CX(this.domManager),this.keyNavManager=new yL(this.focusIndicator,this.interactionManager,e.mode),this.regionManager=new yB(this.interactionManager),this.contextMenuRegistry=new yM(this.regionManager),this.gestureDetector=new yR(this.domManager),this.updateService=new yQ(o),this.proxyInteractionService=new C2(this.localeManager,this.domManager),this.historyManager=new Cf(this.keyNavManager),this.animationManager=new yS(this.interactionManager,n),this.dataService=new yh(this.animationManager),this.tooltipManager=new y$(this.domManager,e.tooltip),this.zoomManager.addLayoutListeners(this.layoutManager)}destroy(){this.animationManager.destroy(),this.highlightManager.destroy(),this.axisManager.destroy(),this.callbackCache.invalidateCache(),this.chartEventManager.destroy(),this.contextMenuRegistry.destroy(),this.domManager.destroy(),this.highlightManager.destroy(),this.interactionManager.destroy(),this.keyNavManager.destroy(),this.focusIndicator.destroy(),this.proxyInteractionService.destroy(),this.regionManager.destroy(),this.syncManager.destroy(),this.tooltipManager.destroy(),this.zoomManager.destroy()}},yJ=class extends gb{constructor(){super(...arguments),this.range="tooltip"}};uQ([gM(ma(["tooltip","node"],"a range"))],yJ.prototype,"range",2);var y0=class e{constructor(){this.domain=new Set}static is(t){return t instanceof e}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},y1=class e{constructor(){this.domain=[1/0,-1/0]}static is(t){return t instanceof e}static extendDomain(e,t=[1/0,-1/0]){for(let i of e)"number"==typeof i&&(t[0]>i&&(t[0]=i),t[1]<i&&(t[1]=i));return t}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}};function y2(e){if(null==e)return[];let[t,i]=e.map(Number);return 0===t&&0===i?[0,1]:pE(t)&&pE(i)?[t,i]:[]}function y3(e,t){var i;return null!=(i=null==t?void 0:t.get(e.id))?i:0}var y4=Symbol("invalid");function y6(e){let t,i=[],s=0,r=/((?:(?:^|\.)\s*\w+|\[\s*(?:'(?:[^']|\\')*'|"(?:[^"]|\\")*"|-?\d+)\s*\])\s*)/g;for(;t=r.exec(e);){if(t.index!==s)return;s=t.index+t[0].length;let e=t[1].trim();if(e.startsWith("."))i.push(e.slice(1).trim());else if(e.startsWith("[")){let t=e.slice(1,-1).trim();t.startsWith("'")?i.push(t.slice(1,-1).replace(/\\'/g,"'")):t.startsWith('"')?i.push(t.slice(1,-1).replace(/\\"/g,'"')):i.push(t)}else i.push(e)}if(s===e.length)return i}var y5=class{constructor(e,t="standalone"){this.opts=e,this.mode=t,this.debug=m8.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[];let i=!0;for(let t of e.props){if("key"===t.type&&!i)throw Error("AG Charts - internal 
206config error: keys must come before values.");"value"===t.type&&i&&(i=!1)}let s=({matchGroupIds:e=[]})=>{for(let t of e)if(this.values.every(e=>e.groupId!==t))throw Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)};for(let t of e.props)switch(t.type){case"key":this.keys.push({...t,index:this.keys.length,missing:new Map});break;case"value":if(null==t.property)throw Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(t)}`);this.values.push({...t,index:this.values.length,missing:new Map});break;case"aggregate":s(t),this.aggregates.push({...t,index:this.aggregates.length});break;case"group-value-processor":s(t),this.groupProcessors.push({...t,index:this.groupProcessors.length});break;case"property-value-processor":this.propertyProcessors.push({...t,index:this.propertyProcessors.length});break;case"reducer":this.reducers.push({...t,index:this.reducers.length});break;case"processor":this.processors.push({...t,index:this.processors.length})}}resolveProcessedDataDefById(e,t){var i;let s=null==(i=this.scopeCache.get(e.id))?void 0:i.get(t);if(!s)throw Error(`AG Charts - didn't find property definition for [${t}, ${e.id}]`);return{index:s.index,def:s}}resolveProcessedDataIndexById(e,t){return this.resolveProcessedDataDefById(e,t).index}resolveProcessedDataDefsByIds(e,t){return t.map(t=>[t,this.resolveProcessedDataDefById(e,t)])}resolveProcessedDataDefsValues(e,{keys:t,values:i}){let s={};for(let[r,{index:a,def:o}]of e){let e="key"===o.type?t:i;s[r]=e[a]}return s}getDomain(e,t,i="value",s){var r;let a=this.getDomainsByType(i,s);return null!=(r=null==a?void 0:a[this.resolveProcessedDataIndexById(e,t)])?r:[]}getDomainsByType(e,t){switch(e){case"key":return t.domain.keys;case"value":return t.domain.values;case"aggregate":return t.domain.aggValues;case"group-value-processor":return t.domain.groups;default:return null}}processData(e,t){var i,s,r,a;let o,{opts:{groupByKeys:n,groupByFn:l},aggregates:h,groupProcessors:d,reducers:u,processors:c,propertyProcessors:p}=this,g=performance.now();if(n&&0===this.keys.length)return;let m=this.extractData(e,t);if(n?m=this.groupData(m):l&&(m=this.groupData(m,l(m))),d.length>0&&this.postProcessGroups(m),h.length>0&&this.aggregateData(m),p.length>0&&this.postProcessProperties(m),u.length>0&&this.reduceData(m),c.length>0&&this.postProcessData(m),e.length>0){for(let t of cA(this.keys,this.values))for(let[i,s]of t.missing)if(s>=e.length){let e=null==i?"":` for ${i}`;u8.warnOnce(`the key '${t.property}' was not found in any data element${e}.`)}}let v=performance.now();for(let e of(m.time=v-g,this.debug.check()&&(i=m,o=(e,t)=>{t.length>0&&(u8.log(`DataModel.processData() - ${e}`),u8.table(t))},u8.log("DataModel.processData() - processedData",i),o("Key Domains",i.domain.keys),o("Group Domains",null!=(s=i.domain.groups)?s:[]),o("Value Domains",i.domain.values),o("Aggregate Domains",null!=(r=i.domain.aggValues)?r:[]),o("Values","grouped"===i.type?i.data.reduce((e,t)=>{var i,s;let r=null!=(i=t.keys)?i:[],a=null!=(s=t.aggValues)?s:[],o=t.keys.map(()=>void 0),n=null==a?void 0:a.map(()=>void 0);return e.push(...t.values.map((e,t)=>[...0===t?r:o,...null!=e?e:[],...0==t?a:n])),e},[]):i.data.reduce((e,t)=>{var i;let s=null!=(i=t.aggValues)?i:[];return e.push([...t.keys,...t.values,...s]),e},[]))),this.scopeCache.clear(),cA(this.keys,this.values,this.aggregates)))if(e.idsMap)for(let[t,i]of e.idsMap)for(let s of i){if(this.scopeCache.has(t))if(null!=(a=this.scopeCache.get(t))&&a.has(s))throw Error("duplicate definition ids on the same scope are not allowed.");else this.scopeCache.get(t).set(s,e);else this.scopeCache.set(t,new Map([[s,e]]))}return m}valueGroupIdxLookup({matchGroupIds:e}){let t=[];for(let[i,s]of this.values.entries())(!e||s.groupId&&e.includes(s.groupId))&&t.pu
206sh(i);return t}valueIdxLookup(e,t){let i=null==e||0===e.length,s="string"==typeof t?t:t.id,r=this.values.findIndex(t=>(null==t.scopes||i&&!t.scopes.length||t.scopes.some(t=>null==e?void 0:e.includes(t)))&&(t.property===s||t.id===s||(t=>{if(t.idsMap){for(let[i,r]of t.idsMap)if(null!=e&&e.includes(i)&&r.has(s))return!0}return!1})(t)));if(-1===r)throw Error(`AG Charts - configuration error, unknown property ${JSON.stringify(t)} in scope(s) ${JSON.stringify(e)}`);return r}extractData(e,t){let{dataDomain:i,processValue:s,scopes:r,allScopesHaveSameDefs:a}=this.initDataDomainProcessor(),o=new Map(null==t?void 0:t.map(e=>[e.id,e])),{keys:n,values:l}=this,h=Array(e.length),d=0,u=0;for(let[t,i]of e.entries()){let e,m,v={},f=r.size>0?new Set(r):void 0,C=Array(n.length),y=0;for(let t of n){if((e=s(t,i,e))===y4)break;C&&(C[y++]=e)}if(e===y4)continue;let w=l.length>0?Array(l.length):void 0;for(let[e,n]of l.entries()){var c,p,g;for(let a of null!=(c=n.scopes)?c:r){let r=o.get(a);if((m=s(n,null!=(p=null==r?void 0:r.data[t])?p:i,m,a))!==y4&&w){if(null!=r&&!1!==n.includeProperty){let e=n.includeProperty&&null!=n.id?n.id:n.property;null!=v[a]||(v[a]={}),v[a][e]=m}w[e]=m}}if(m===y4){if(a)break;for(let e of null!=(g=n.scopes)?g:r)null==f||f.delete(e);if((null==f?void 0:f.size)===0)break}}if(m===y4&&a||(null==f?void 0:f.size)===0)continue;let b={datum:{...i,...v},keys:C,values:w};!a&&f&&f.size<r.size&&(u++,b.validScopes=new Set(f)),h[d++]=b}h.length=d;let m=e=>{let t=i.get(e),s=t.getDomain();return y1.is(t)&&s[0]>s[1]?[]:s};return{type:"ungrouped",input:{count:e.length},data:h,domain:{keys:n.map(m),values:l.map(m)},defs:{allScopesHaveSameDefs:a,keys:n,values:l},partialValidDataCount:u,time:0}}groupData(e,t){let i=new Map;for(let r of e.data){var s;let{keys:e,values:a,datum:o,validScopes:n}=r,l=null!=(s=null==t?void 0:t(r))?s:e,h=l.map(e=>pb(e)?JSON.stringify(e):e).join("-");if(i.has(h)){let e=i.get(h);if(e.values.push(a),e.datum.push(o),null!=n&&null!=e.validScopes)for(let t of e.validScopes)n.has(t)||e.validScopes.delete(t)}else i.set(h,{keys:l,values:[a],datum:[o],validScopes:n})}let r=Array(i.size),a=Array(i.size),o=0;for(let{keys:e,values:t,datum:s,validScopes:n}of i.values())(null==n?void 0:n.size)!==0&&(a[o]=e,r[o++]={keys:e,values:t,datum:s,validScopes:n});return{...e,type:"grouped",data:r,domain:{...e.domain,groups:a}}}aggregateData(e){let t="ungrouped"===e.type;for(let[l,h]of(e.domain.aggValues=[],this.aggregates.entries())){let d=this.valueGroupIdxLookup(h),u=[1/0,-1/0];for(let c of e.data){var i,s,r,a,o,n;if(null!=c.aggValues||(c.aggValues=Array(this.aggregates.length)),c.validScopes)continue;let e=t?[c.values]:c.values,p=null!=(i=null==(s=h.groupAggregateFunction)?void 0:s.call(h))?i:[1/0,-1/0];for(let t of e){let e=d.map(e=>t[e]),i=h.aggregateFunction(e,c.keys);i&&(p=null!=(o=null==(n=h.groupAggregateFunction)?void 0:n.call(h,i,p))?o:y1.extendDomain(i,p))}let g=(null!=(r=null==(a=h.finalFunction)?void 0:a.call(h,p))?r:p).map(e=>Number.isInteger(e)?e:Math.abs(e)>1e4?Math.trunc(e):Math.round(1e4*e)/1e4);c.aggValues[l]=g,y1.extendDomain(g,u)}e.domain.aggValues.push(u)}}postProcessGroups(e){let{groupProcessors:t}=this,i=new Set,s=new Map,r=new Map,a=new Map;for(let e of t){let t=this.valueGroupIdxLookup(e);for(let o of(r.set(e,t),a.set(e,e.adjust()),t)){let e="category"===this.values[o].valueType;i.add(o),s.set(o,e?new y0:new y1)}}let o=e=>{for(let r of i){var t;null==(t=s.get(r))||t.extend(e[r])}};for(let i of e.data){for(let s of t){var n,l;if(i.validScopes)continue;let t=null!=(n=r.get(s))?n:[],o=null==(l=a.get(s))?void 0:l();if(o)if("grouped"===e.type)for(let e of i.values)e&&o(e,t);else i.values&&o(i.values,t)}if("grouped"===e.type)for(let e of i.values)o(e);else o(i.values)}for(let[t,i]of s)e.domain.values[t]=i.getDomain()}postProcessProperties(e){for(let{adjust:t,property:i,scopes:s}of this.propertyProcessors)t()(e,this.valueIdxLookup(s,i))}reduceData(e){var t;for(let i of(null!=e.reduced||(e.reduced={}),this.reducers)){let s=i.reducer(),r=i.initialValue;for(let a of e.data)(!a.validScopes||null!=(t=i.scopes)&&t.some(e=>{var t;return null==(t=a.validScopes)?void 0:t.has(e)}))&&(r=s(r,a));e.reduced[i.property]=r}}postProcessData(e){for(let t of(null!=e.reduced||(e.reduced={}),this.processors))e.reduced[t.property]=t.calculate(e)}initDataDomainProcessor(){let{keys:e,values:t}=this,i=new Set;for(let e of t)if(e.scopes)for(let t of e.scopes)i.add(t);let s=new Map,r=new Map,a=!0,o=()=>{for(let o of cA(e,t))if("category"===o.valueType)s.set(o,new y0);else{var r;s.set(o,new y1),a&&(a=(null!=(r=o.scopes)?r:[]).length===i.size)}};o();let n=this.buildAccessors(cA(e,t)),l=(e,t,i,a)=>{var l,h,d,u;let c,p;if(n.has(e.property)){try{p=n.get(e.property)(t)}catch{}c=null!=p}else p=(c=e.property in t)?t[e.property]:e.missingValue;null!=e.forceValue&&(p=c&&cQ(p)?-1*e.forceValue:e.forceValue,c=!0);let g="missingValue"in e;if(!c&&!g){let t=null!=(d=e.missing.get(a))?d:0;e.missing.set(a,t+1)}if(s.has(e)||o(),c&&(null==(l=e.validation)?void 0:l.call(e,p,t))===!1)if(!("invalidValue"in e))return"integrated"!==this.mode&&u8.warnOnce(`invalid value of type [${typeof p}] for [${e.scopes} / ${e.id}] ignored:`,`[${p}]`),y4;else p=e.invalidValue;return e.processor&&(r.has(e)||r.set(e,e.processor()),p=null==(u=r.get(e))?void 0:u(p,i===y4?void 0:i)),null==(h=s.get(e))||h.extend(p),p};return{dataDomain:s,processValue:l,initDataDomain:o,scopes:i,allScopesHaveSameDefs:a}}buildAccessors(e){let t=new Map;if("integrated"===this.mode)return t;for(let i of e){if(!(i.property.includes(".")||i.property.includes("[")))continue;let e=y6(i.property);
206if(null==e){u8.warnOnce("Invalid property path [%s]",i.property);continue}let s=function(e){return t=>{let i=t;for(let t of e)i=i[t];return i}}(e);t.set(i.property,s)}return t}},y8=class e{constructor(e){this.mode=e,this.debug=m8.create(!0,"data-model"),this.requested=[],this.status="setup"}async request(e,t,i){if("setup"!==this.status)throw Error("AG Charts - data request after data setup phase.");return new Promise((s,r)=>{this.requested.push({id:e,opts:i,data:t,resolve:s,reject:r})})}execute(){if("setup"!==this.status)throw Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);let e=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",e);let t=this.mergeRequested(e);this.debug("DataController.execute() - merged",t),this.debug.check()&&(cO().processedData=[]);let i=this.requested.map(({id:e})=>e),s=this.hasMultipleDataSources(e);for(let{opts:r,data:a,resolves:o,rejects:n,ids:l}of t)try{let t=new y5(r,this.mode),h=t.processData(a,e);this.debug.check()&&cO("processedData").push(h),(null==h?void 0:h.partialValidDataCount)===0?o.forEach((e,r)=>e({dataModel:t,processedData:this.processScopedData(l[r],h,i,s)})):h?this.splitResult(t,h,l,o):n.forEach(e=>e(Error("AG Charts - no processed data generated")))}catch(e){n.forEach(t=>t(e))}}hasMultipleDataSources(e){if(e.length){let[{data:t},...i]=e;return i.some(e=>t!==e.data)}return!1}processScopedData(e,t,i,s){let r=t=>{if(Array.isArray(t))return t.map(r);let a=s?{...t,...t[e]}:t;for(let e of i)delete a[e];return a},a=t=>{var i;return Array.isArray(t)?t.map(a):null!=(i=null==t?void 0:t[e])?i:t};return{...t,data:t.data.map(e=>{var t;return{...e,datum:r(e.datum),values:s?null==(t=e.values)?void 0:t.map(a):e.values}})}}validateRequests(e){let t=[];for(let[i,s]of e.entries())i>0&&s.data.length!==e[0].data.length&&!1===s.opts.groupByData?s.reject(Error("all series[].data arrays must be of the same length and have matching keys.")):t.push(s);return t}mergeRequested(t){let i=[];for(let s of t){let t=i.find(e.groupMatch(s));t?t.push(s):i.push([s])}return i.map(e.mergeRequests)}splitResult(e,t,i,s){for(let r=0;r<i.length;r++){let a=i[r];(0,s[r])({dataModel:e,processedData:{...t,data:t.data.filter(({validScopes:e})=>{var t;return null==(t=null==e?void 0:e.has(a))||t})}})}}static groupMatch({data:e,opts:t}){function i(e){return e.filter(e=>"key"===e.type).map(e=>e.property).join(";")}return([s])=>(!1===t.groupByData||s.data===e)&&s.opts.groupByKeys===t.groupByKeys&&s.opts.groupByFn===t.groupByFn&&i(s.opts.props)===i(t.props)}static mergeRequests(t){return t.reduce((t,{id:i,data:s,resolve:r,reject:a,opts:{props:o,...n}})=>{var l,h;for(let d of(t.ids.push(i),t.rejects.push(a),t.resolves.push(r),null!=t.data||(t.data=s),null!=t.opts||(t.opts={...n,props:[]}),o)){let s={...d,scopes:[i]};e.createIdsMap(i,s);let r=t.opts.props.find(t=>t.type===s.type&&e.deepEqual(t,s));if(!r){t.opts.props.push(s);continue}null!=r.scopes||(r.scopes=[]),r.scopes.push(...null!=(l=s.scopes)?l:[]),("key"===r.type||"value"===r.type)&&null!=(h=s.idsMap)&&h.size&&e.mergeIdsMap(s.idsMap,r.idsMap)}return t},{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(e,t){for(let[i,s]of e){let e=t.get(i);if(null!=e)for(let t of s)e.add(t);else t.set(i,new Set(s))}}static createIdsMap(e,t){null!=t.id&&(null!=t.idsMap||(t.idsMap=new Map),t.idsMap.has(e)?t.idsMap.get(e).add(t.id):t.idsMap.set(e,new Set([t.id])))}static deepEqual(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){let s,r;if(t.constructor!==i.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!==i.length)return!1;for(s=r-1;s>=0;s--)if(!e.deepEqual(t[s],i[s]))return!1;return!0}let a=Object.keys(t);if((r=a.length)!==Object.keys(i).length)return!1;for(s=r-1;s>=0;s--){let r=a[s];if(!e.skipKeys.has(r)&&(!Object.hasOwn(i,r)||!e.deepEqual(t[r],i[r])))return!1}return!0}return!1}};y8.skipKeys=new Set(["id","idsMap","type","scopes"]);var y7=new class{constructor(){this.axesMap=new Map,this.hidden=new Set,this.themeTemplates=new Map}register(e,t){this.axesMap.set(e,t.moduleFactory),t.themeTemplate&&this.setThemeTemplate(e,t.themeTemplate),t.hidden&&this.hidden.add(e)}create(e,t){let i=this.axesMap.get(e);if(i)return i(t);throw Error(`AG Charts - unknown axis type: ${e}`)}has(e){return this.axesMap.has(e)}keys(){return this.axesMap.keys()}publicKeys(){return[...this.keys()].filter(e=>!this.hidden.has(e))}setThemeTemplate(e,t){return this.themeTemplates.set(e,t),this}getThemeTemplate(e){return this.themeTemplates.get(e)}},y9=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"foreground",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"chartToolbar",chartTypes:["cartesian"]},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"statusBar",chartTypes:["cartesian"],identifier:"status-bar"},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]}
206,{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"],optionsInnerKey:"miniChart"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"cone-funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bullet"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"chord"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"sankey"},{type:"series",optionsKey:"series[]",chartTypes:["standalone"],identifier:"pyramid"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"linear-gauge"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"radial-gauge"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"}];function we(e){var t;return null==(t=y9.find(t=>"series"===t.type&&t.identifier===e))?void 0:t.chartTypes}var wt=new class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(e,{optionsKey:t,moduleFactory:i,themeTemplate:s}){this.legendMap.set(e,{optionsKey:t,moduleFactory:i}),this.themeTemplates.set(t,s)}create(e,t){var i;let s=null==(i=this.legendMap.get(e))?void 0:i.moduleFactory;if(s)return s(t);throw Error(`AG Charts - unknown legend type: ${e}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce((e,[t,i])=>(e[t]=i.optionsKey,e),{})}},wi=class extends Map{get(e){var t;return null!=(t=super.get(e))?t:"unknown"}isCartesian(e){return"cartesian"===this.get(e)}isPolar(e){return"polar"===this.get(e)}isHierarchy(e){return"hierarchy"===this.get(e)}isTopology(e){return"topology"===this.get(e)}isFlowProportion(e){return"flow-proportion"===this.get(e)}isStandalone(e){return"standalone"===this.get(e)}isGauge(e){return"gauge"===this.get(e)}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter(e=>this.isCartesian(e))}get polarTypes(){return this.seriesTypes.filter(e=>this.isPolar(e))}get hierarchyTypes(){return this.seriesTypes.filter(e=>this.isHierarchy(e))}get topologyTypes(){return this.seriesTypes.filter(e=>this.isTopology(e))}get flowProportionTypes(){return this.seriesTypes.filter(e=>this.isFlowProportion(e))}get standaloneTypes(){return this.seriesTypes.filter(e=>this.isStandalone(e))}get gaugeTypes(){return this.seriesTypes.filter(e=>this.isGauge(e))}},ws=class extends Map{set(e,t){return super.set(e,pk(t,this.get(e)))}},wr=new wi,wa=new wi,wo=new ws,wn=new class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(e,{chartTypes:[t],moduleFactory:i,tooltipDefaults:s,defaultAxes:r,themeTemplate:a,paletteFactory:o,solo:n,stackable:l,groupable:h,stackedByDefault:d,hidden:u}){this.setThemeTemplate(e,a),this.seriesMap.set(e,{moduleFactory:i,tooltipDefaults:s,defaultAxes:r,paletteFactory:o,solo:n,stackable:l,groupable:h,stackedByDefault:d}),wr.set(e,t),u||wa.set(e,t)}create(e,t){var i;let s=null==(i=this.seriesMap.get(e))?void 0:i.moduleFactory;if(s)return s(t);throw Error(`AG Charts - unknown series type: ${e}`)}cloneDefaultAxes(e,t){var i;let s=null==(i=this.seriesMap.get(e))?void 0:i.defaultAxes;return null==s?null:{axes:vG("function"==typeof s?s(t):s)}}setThemeTemplate(e,t){let i=this.themeTemplates.get(e);this.themeTemplates.set(e,pk(t,i))}getThemeTemplate(e){return this.themeTemplates.get(e)}getPaletteFactory(e){var t;return null==(t=this.seriesMap.get(e))?void 0:t.paletteFactory}getTooltipDefauls(e){var t;return null==(t=this.seriesMap.get(e))?void 0:t.tooltipDefaults}isSolo(e){var t,i;return null!=(t=null==(i=this.seriesMap.get(e))?void 0:i.solo)&&t}isGroupable(e){var t,i;return null!=(t=null==(i=this.seriesMap.get(e))?void 0:i.groupable)&&t}isStackable(e){var t,i;return null!=(t=null==(i=this.seriesMap.get(e))?void 0:i.stackable)&&t}isStackedByDefault(e){var t,i;return null!=(t=null==(i=this.seriesMap.get(e))?void 0:i.stackedByDefault)&&t}}
206,wl=class e extends Cu{constructor(e){super(),this.chart=e}subscribe(t=e.DEFAULT_GROUP){let i=this.get(t);return i||(i=new Set,e.chartsGroups.set(t,i)),i.add(this.chart),this}unsubscribe(t=e.DEFAULT_GROUP){var i;return null==(i=this.get(t))||i.delete(this.chart),this}getChart(){return this.chart}getGroup(t=e.DEFAULT_GROUP){let i=this.get(t);return i?Array.from(i):[]}getGroupSiblings(t=e.DEFAULT_GROUP){return this.getGroup(t).filter(e=>e!==this.chart)}get(t){return e.chartsGroups.get(t)}};wl.chartsGroups=new Map,wl.DEFAULT_GROUP=Symbol("sync-group-default");var wh=class extends gb{constructor(){super(...arguments),this.enabled=!1}};uQ([gM(gR)],wh.prototype,"enabled",2),uQ([gM(gF)],wh.prototype,"tabIndex",2);var wd=["top","right","bottom","left"],wu=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo"];function wc(e){var t,i;let{series:s}=e;if(s)return null!=(t=null==(i=s[0])?void 0:i.type)?t:"line"}function wp(e){var t;let i=wc(e);return null!=i&&(wr.isCartesian(i)||"cartesian"===(null==(t=we(i))?void 0:t.find(e=>"cartesian"===e)))}function wg(e){var t;let i=wc(e);return null!=i&&("polar"===i?(u8.warnOnce(`type '${i}' is deprecated, use a series type instead`),!0):wr.isPolar(i)||"polar"===(null==(t=we(i))?void 0:t.find(e=>"polar"===e)))}function wm(e){var t;let i=wc(e);return null!=i&&("hierarchy"===i?(u8.warnOnce(`type '${i}' is deprecated, use a series type instead`),!0):wr.isHierarchy(i)||"hierarchy"===(null==(t=we(i))?void 0:t.find(e=>"hierarchy"===e)))}function wv(e){var t;let i=wc(e);return null!=i&&("topology"===i?(u8.warnOnce(`type '${i}' is deprecated, use a series type instead`),!0):wr.isTopology(i)||"topology"===(null==(t=we(i))?void 0:t.find(e=>"topology"===e)))}function wf(e){var t;let i=wc(e);return null!=i&&("flow-proportion"===i?(u8.warnOnce(`type '${i}' is deprecated, use a series type instead`),!0):wr.isFlowProportion(i)||"flow-proportion"===(null==(t=we(i))?void 0:t.find(e=>"flow-proportion"===e)))}function wC(e){var t;let i=wc(e);return null!=i&&("standalone"===i?(u8.warnOnce(`type '${i}' is deprecated, use a series type instead`),!0):wr.isStandalone(i)||"standalone"===(null==(t=we(i))?void 0:t.find(e=>"standalone"===e)))}function wy(e){var t;let i=wc(e);return null!=i&&("gauge"===i?(u8.warnOnce(`type '${i}' is deprecated, use a series type instead`),!0):wr.isGauge(i)||"gauge"===(null==(t=we(i))?void 0:t.find(e=>"gauge"===e)))}var ww=class extends mp{applyOptions(e){for(let t of this.moduleMap.values())t.module.optionsKey in e&&gx(t.moduleInstance)&&t.moduleInstance.set(e[t.module.optionsKey])}*legends(){for(let{module:e,moduleInstance:t}of this.moduleMap.values())"legend"===e.type&&(yield{legendType:e.identifier,legend:t})}},wb="ag-chart-overlay",wS="ag-chart-dark-overlay",wx=class extends gb{constructor(e,t){super(),this.className=e,this.defaultMessageId=t}getText(e){var t;return e.t(null!=(t=this.text)?t:this.defaultMessageId)}getElement(e,t,i){var s;if(null==(s=this.content)||s.remove(),this.focusBox=i,this.renderer){let e=this.renderer();if(e instanceof HTMLElement)this.content=e;else{let t=cG("div");t.innerHTML=e,this.content=t.firstElementChild}}else{let i=cG("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",font:"12px Verdana, sans-serif"});i.innerText=this.getText(t),this.content=i,null==e||e.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){i.style.opacity="1"}})}return this.content}removeElement(e=()=>{var e;return null==(e=this.content)?void 0:e.remove()},t){if(this.content){if(t){let{content:i}=this;t.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){null==e||e()}})}else null==e||e();this.content=void 0,this.focusBox=void 0}}};uQ([gM(gL,{optional:!0})],wx.prototype,"text",2),uQ([gM(gT,{optional:!0})],wx.prototype,"renderer",2);var wM=class extends gb{constructor(){super(...arguments),this.darkTheme=!1,this.loading=new wx("ag-chart-loading-overlay","overlayLoadingData"),this.noData=new wx("ag-chart-no-data-overlay","overlayNoData"),this.noVisibleSeries=new wx("ag-chart-no-visible-series","overlayNoVisibleSeries")}getFocusInfo(e){for(let t of[this.loading,this.noData,this.noVisibleSeries])if(void 0!==t.focusBox)return{text:t.getText(e),rect:t.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement()}};uQ([gM(gR)],wM.prototype,"darkTheme",2),uQ([gM(gI)],wM.prototype,"loading",2),uQ([gM(gI)],wM.prototype,"noData",2),uQ([gM(gI)],wM.prototype,"noVisibleSeries",2);var wD=((O=wD||{})[O.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",O[O.NEAREST_NODE=1]="NEAREST_NODE",O[O.AXIS_ALIGNED=2]="AXIS_ALIGNED",O),wE=class{constructor(e,t,{datum:i},s){this.type=e,this.event=t,this.datum=i,this.seriesId=s.id}},wI=class{constructor(e,t,i){this.series=e,this.seriesGrouping=t,this.oldGrouping=i,this.type="groupingChanged"}},wA=class extends Ci{constructor(e){super(),this.destroyFns=[],this.seriesGrouping=void 0,this.NodeEvent=wE,this.internalId=cE(this),this.rootGroup=new m1({name:"seriesRoot",isVirtual:!0}),this.axes={x:void 0,y:void 0},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new mp,this._declarationOrder=-1,this.seriesListeners=new Cd,this._pickNodeCache=new vx;
206let{moduleCtx:t,pickModes:i,directionKeys:s={},directionNames:r={},contentGroupVirtual:a=!0,canHaveAxes:o=!1}=e;this.ctx=t,this.directionKeys=s,this.directionNames=r,this.canHaveAxes=o,this.contentGroup=this.rootGroup.appendChild(new m4({name:`${this.internalId}-content`,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new m4({name:`${this.internalId}-highlight`,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}),this.highlightNode=this.highlightGroup.appendChild(new m1({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new m1({name:"highlightLabel",zIndex:10})),this.pickModes=i,this.labelGroup=this.rootGroup.appendChild(new m4({name:`${this.internalId}-series-labels`,zIndex:14})),this.annotationGroup=new m1({name:`${this.id}-annotation`,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}get pickModeAxis(){return"main"}get id(){var e,t;return null!=(e=null==(t=this.properties)?void 0:t.id)?e:this.internalId}get type(){var e;return null!=(e=this.constructor.type)?e:""}get data(){var e;return null!=(e=this._data)?e:this._chartData}set visible(e){this.properties.visible=e,this.visibleMaybeChanged()}get visible(){return this.properties.visible}get hasData(){return null!=this.data&&this.data.length>0}get tooltipEnabled(){var e,t;return null!=(e=null==(t=this.properties.tooltip)?void 0:t.enabled)&&e}onDataChange(){this.nodeDataRefresh=!0,this._pickNodeCache.clear()}setOptionsData(e){this._data=e,this.onDataChange()}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}onSeriesGroupingChange(e,t){let{internalId:i,type:s,visible:r}=this;e&&this.ctx.seriesStateManager.deregisterSeries(this),t&&this.ctx.seriesStateManager.registerSeries({internalId:i,type:s,visible:r,seriesGrouping:t}),this.fireEvent(new wI(this,t,e))}getBandScalePadding(){return{inner:1,outer:0}}getGroupZIndexSubOrder(e,t=0){let i=0;switch(e){case"data":case"paths":break;case"labels":i+=2e4;break;case"marker":i+=1e4;break;case"highlight":t+=15e3;break;case"annotation":i+=15e3}return[()=>this._declarationOrder+i,t]}addListener(e,t){return this.seriesListeners.addListener(e,t)}dispatch(e,t){this.seriesListeners.dispatch(e,t)}addChartEventListeners(){}destroy(){this.destroyFns.forEach(e=>e()),this.destroyFns=[],this.ctx.seriesStateManager.deregisterSeries(this)}getDirectionValues(e,t){let i=this.resolveKeyDirection(e),s=null==t?void 0:t[i],r=[];if(!s)return r;let a=(...e)=>{for(let t of e)Array.isArray(t)?a(...t):"object"==typeof t?a(...Object.values(t)):r.push(t)};return a(...s.map(e=>this.properties[e])),r}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getKeyProperties(e){var t;return null!=(t=this.directionKeys[this.resolveKeyDirection(e)])?t:[]}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){let t=this.getSeriesDomain(e),i=this.moduleMap.mapModules(t=>t.getDomain(e));return t.concat(i.flat())}markNodeDataDirty(){this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.visibleMaybeChanged()}visibleMaybeChanged(){this.ctx.seriesStateManager.updateSeries(this)}getOpacity(){let{dimOpacity:e=1,enabled:t=!0}=this.properties.highlightStyle.series;if(!t||1===e)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;default:return e}}getStrokeWidth(e){let{strokeWidth:t,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||void 0===t)return e;switch(this.isItemIdHighlighted()){case 1:return t;case 0:case 2:return e}}isItemIdHighlighted(){var e;let t=null==(e=this.ctx.highlightManager)||null==(e=e.getActiveHighlight())?void 0:e.series;return null==t?0:t!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapModules(e=>e.getTooltipParams()).reduce((e,t)=>Object.assign(e,t),{})}pickNode(e,t,i=!1){let{pickModes:s,pickModeAxis:r,visible:a,rootGroup:o}=this;if(!a||!o.visible||"highlight"===t&&!this.properties.highlight.enabled||"highlight-tooltip"===t&&!this.properties.highlight.enabled)return;let n=1/0;if("tooltip"===t||"highlight-tooltip"===t){let{tooltip:e}=this.properties;n="number"==typeof e.range?e.range:1/0,i||(i="exact"===e.range)}else if("event"===t||"context-menu"===t){let{nodeClickRange:e}=this.properties;n="number"==typeof e?e:1/0,i||(i="exact"===e)}let l=s.filter(e=>!i||0===e),{x:h,y:d}=e,u=JSON.stringify({x:h,y:d,maxDistance:n,selectedPickModes:l});if(this._pickNodeCache.has(u))return this._pickNodeCache.get(u);for(let t of l){let i;switch(t){case 0:i=this.pickNodeExactShape(e);break;case 1:i=this.pickNodeClosestDatum(e);break;case 2:i=null!=t?this.pickNodeMainAxisFirst(e,"main-category"===r):void 0}if(i&&i.distance<=n)return this._pickNodeCache.set(u,{pickMode:t,match:i.datum,distance:i.distance})}return this._pickNodeCache.set(u,void 0)}pickNodeExactShape(e){let t=this.contentGroup.pickNode(e.x,e.y);if(t&&!0!==t.datum.missing)return{datum:t.datum,distance:0}}pickNodeClosestDatum(e){throw Error("AG Charts - Series.pickNodeClosestDatum(
206) not implemented")}pickNodeNearestDistantObject(e,t){let i=cF(e.x,e.y,t);if(void 0!==i.nearest&&!0!==i.nearest.datum.missing)return{datum:i.nearest.datum,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(e,t){throw Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeClick",e,t,this))}fireNodeDoubleClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeDoubleClick",e,t,this))}createNodeContextMenuActionEvent(e,t){return new this.NodeEvent("nodeContextMenuAction",e,t,this)}toggleSeriesItem(e,t){this.visible=t,this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.dispatch("visibility-changed",{itemId:e,enabled:t})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return{...this.ctx,series:this}}getLabelText(e,t,i=String){if(e.formatter){var s;return null!=(s=this.ctx.callbackCache.call(e.formatter,{seriesId:this.id,...t}))?s:i(t.value)}return i(t.value)}getMarkerStyle(e,t,i=e.getStyle()){var s,r;let a=pk({size:null!=(s=null==(r=t.datum.point)?void 0:r.size)?s:0},i);return e.itemStyler?pk(this.ctx.callbackCache.call(e.itemStyler,{seriesId:this.id,...a,...t,datum:t.datum.datum}),a):a}updateMarkerStyle(e,t,i,s=t.getStyle(),{applyTranslation:r=!0,selected:a=!0}={}){let{point:o}=i.datum,n=this.getMarkerStyle(t,i,s),l=this.visible&&n.size>0&&o&&!isNaN(o.x)&&!isNaN(o.y);if(r?e.setProperties({visible:l,...n,translationX:null==o?void 0:o.x,translationY:null==o?void 0:o.y}):e.setProperties({visible:l,...n}),a||(e.fillOpacity*=.25,e.strokeOpacity*=.125),"function"==typeof t.shape&&!e.dirtyPath){e.path.clear(!0),e.updatePath(),e.checkPathDirty();let t=e.getBBox();if(void 0!==o&&t.isFinite()){let e=t.computeCenter(),[i,s]=["x","y"].map(t=>{var i;return(null!=(i=n.strokeWidth)?i:0)+Math.abs(e[t]-o[t])});o.focusSize=Math.max(t.width+i,t.height+s)}}}getMinRects(e,t){}get nodeDataDependencies(){var e;return null!=(e=this._nodeDataDependencies)?e:{seriesRectWidth:0/0,seriesRectHeight:0/0}}checkResize(e){let{width:t,height:i}=null!=e?e:{width:0/0,height:0/0},s=e?{seriesRectWidth:t,seriesRectHeight:i}:void 0,r=null!=vO(this.nodeDataDependencies,s);return r&&(this._nodeDataDependencies=s,this.markNodeDataDirty()),r}pickFocus(e){}};function wR({defs:e,values:t,xAxis:i,yAxis:s}){if(!(i&&s))throw Error("Axes must be defined");let r={};for(let[a,{def:o}]of e)if(Object.hasOwn(t,a)){let{scale:e}="key"===o.type?i:s;r[a]=Math.round(e.convert(t[a]))}return r}function wT(e,t,i,s){let r;for(let o of[...e].reverse()){var a;if(!o.visible||!o.rootGroup.visible)continue;let{match:e,distance:n}=null!=(a=o.pickNode(t,i,s))?a:{};if(e&&null!=n&&((!r||r.distance>n)&&(r={series:o,distance:n,datum:e}),0===n))break}return r}wA.highlightedZIndex=1e12,uQ([v$({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}})],wA.prototype,"seriesGrouping",2);var wL=class{constructor(e,t){this.element=e,this.id=t,e.id=t,e.style.display="none",vJ(e.parentElement,"aria-labelledby",t)}layoutComplete(e){this.element.parentElement.style.width=`${e.chart.width}px`,this.element.parentElement.style.height=`${e.chart.height}px`}set text(e){this.element.textContent=e}},wF=class extends Cu{constructor(e){super(),this.chart=e,this.id=cE(this),this.series=[],this.highlight={pendingHoverEvent:void 0,appliedHoverEvent:void 0,stashedHoverEvent:void 0},this.tooltip={lastHover:void 0},this.hoverDevice="mouse",this.focus={sortedSeries:[],series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.hoverScheduler=Cr((e,t)=>cO().requestAnimationFrame(e),()=>{if(this.tooltip.lastHover||this.highlight.pendingHoverEvent){if(4>=this.chart.getUpdateType())return void this.hoverScheduler.schedule();this.highlight.pendingHoverEvent&&this.handleHoverHighlight(!1),this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!1)}});let t=e.ctx.regionManager.getRegion("series"),i=e.ctx.regionManager.getRegion("horizontal-axes"),s=e.ctx.regionManager.getRegion("vertical-axes"),r=e.ctx.domManager.addChild("series-area","series-area-aria-label");this.ariaLabel=new wL(r,`${this.id}-aria-label`),this.destroyFns.push(()=>e.ctx.domManager.removeChild("series-area","series-area-aria-label"),t.addListener("contextmenu",e=>this.onContextMenu(e),63),t.addListener("drag",e=>this.onHoverLikeEvent(e),41),t.addListener("hover",e=>this.onHover(e),41),t.addListener("leave",()=>this.onLeave(),41),i.addListener("hover",e=>this.onHover(e),41),i.addListener("leave",()=>this.onLeave()),s.addListener("hover",e=>this.onHover(e),41),s.addListener("leave",()=>this.onLeave()),e.ctx.animationManager.addListener("animation-start",()=>this.clearAll()),e.ctx.domManager.addListener("resize",()=>this.clearAll()),e.ctx.highlightManager.addListener("highlight-change",e=>this.changeHighlightDatum(e)),e.ctx.keyNavManager.addListener("blur",()=>this.onBlur()),e.ctx.keyNavManager.addListener("focus",e=>this.onFocus(e),34),e.ctx.keyNavManager.addListener("nav-hori",e=>this.onNavHori(e),34),e.ctx.keyNavManager.addListener("nav-vert",e=>this.onNavVert(e),34),e.ctx.keyNavManager.addListener("submit",e=>this.onSubmit(e),34),e.ctx.layoutManager.addListener("layout:complete",e=>this.layoutComplete(e)),e.ctx.regionManager.listenAll("click",e=>this.onClick(e)),e.ctx.regionManager.listenAll("dblclick",e=>this.onClick(e)),e.ctx.updateService.addListener("pre-scene-render",()=>this.preSceneRender()),e.ctx.zoomManager.addListener("zoom-change",()=>this.clearAll()),e.ctx.zoomManager.addListener("zoom-pan-start",()=>this.clearAll()))}dataChanged(){var e;null!=(e=this.highlight).stashedHoverEvent||(e.stashedHoverEvent=this.highlight.appliedHoverEvent),this.chart.ctx.tooltipManager.removeTooltip(this.id),this.chart.ctx.focusIndicator.updateBounds(void 0),this.clearHighlight()}preSceneRender(){this.refreshFocus(),null!=this.highlight.stashedHoverEvent&&(this.highlight.pendingHoverEvent=this.highlight.stashedHoverEvent,this.highlight.stashedHoverEvent=void 0,this.handleHoverHighlight(!0)),null!=this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!0)}update(e,t){this.chart.ctx.updateService.update(e,t)}seriesChanged(e){this.focus.sortedSeries=[...e].sort((e,t)=>
206{var i,s;let r=null!=(i=e.properties.focusPriority)?i:1/0,a=null!=(s=t.properties.focusPriority)?s:1/0;return(r===a&&([r,a]=[e._declarationOrder,t._declarationOrder]),r<a)?-1:+(r>a)}),this.series=e}layoutComplete(e){this.seriesRect=e.series.rect,this.hoverRect=e.series.paddedRect,this.ariaLabel.layoutComplete(e)}onContextMenu(e){let t,i,{Default:s,ContextMenu:r}=Cc;if(this.chart.ctx.focusIndicator.isFocusVisible())(t=this.chart.ctx.highlightManager.getActiveHighlight())&&this.seriesRect&&t.midPoint&&(i=mJ.toCanvasPoint(t.series.contentGroup,t.midPoint.x,t.midPoint.y));else if(this.chart.ctx.interactionManager.getState()&(s|r)){let i=wT(this.series,{x:e.regionOffsetX,y:e.regionOffsetY},"context-menu");i&&(this.chart.ctx.highlightManager.updateHighlight(this.id),t=i.datum)}this.clearAll(),this.chart.ctx.contextMenuRegistry.dispatchContext("series",e,{pickedNode:t},i)}onLeave(){this.chart.ctx.cursorManager.updateCursor(this.id),this.chart.ctx.focusIndicator.isFocusVisible()||this.clearAll()}onHover(e){this.hoverDevice="mouse",this.onHoverLikeEvent(e)}onHoverLikeEvent(e){if(pL(e,"drag")&&(this.tooltip.lastHover=e),this.highlight.pendingHoverEvent=e,this.hoverScheduler.schedule(),32===this.chart.ctx.interactionManager.getState()){let{regionOffsetX:t,regionOffsetY:i}=e,s=wT(this.series,{x:t,y:i},"event");null!=s&&s.series.hasEventListener("nodeClick")||null!=s&&s.series.hasEventListener("nodeDoubleClick")?this.chart.ctx.cursorManager.updateCursor(this.id,"pointer"):this.chart.ctx.cursorManager.updateCursor(this.id)}}onClick(e){var t;if(this.hoverDevice="mouse",this.onHoverLikeEvent(e),null!=(t=this.seriesRect)&&t.containsPoint(e.offsetX,e.offsetY)&&this.checkSeriesNodeClick(e)){this.update(4),e.preventDefault();return}let i={type:"click"===e.type?"click":"doubleClick",event:e.sourceEvent};this.chart.fireEvent(i)}onFocus(e){this.hoverDevice=this.chart.ctx.focusIndicator.isFocusVisible()?"keyboard":"mouse",this.handleFocus(0,0),e.preventDefault()}onBlur(){this.hoverDevice="mouse",this.clearAll()}onNavVert(e){this.hoverDevice="keyboard",this.focus.seriesIndex+=e.delta,this.handleFocus(e.delta,0),e.preventDefault()}onNavHori(e){this.hoverDevice="keyboard",this.focus.datumIndex+=e.delta,this.handleFocus(0,e.delta),e.preventDefault()}onSubmit(e){let{series:t,datum:i}=this.focus,s=e.sourceEvent.sourceEvent;void 0!==t&&void 0!==i?t.fireNodeClickEvent(s,i):this.chart.fireEvent({type:"click",event:s}),e.preventDefault()}checkSeriesNodeClick(e){let t={x:e.regionOffsetX,y:e.regionOffsetY};"series"!==e.region&&(t=mJ.fromCanvasPoint(this.chart.seriesRoot,e.offsetX,e.offsetY));let i=wT(this.series,t,"event");return null!=i&&("click"===e.type?(i.series.fireNodeClickEvent(e.sourceEvent,i.datum),!0):"dblclick"===e.type&&(e.preventZoomDblClick=0===i.distance,i.series.fireNodeDoubleClickEvent(e.sourceEvent,i.datum),!0))}refreshFocus(){this.chart.ctx.focusIndicator.isFocusVisible()&&this.handleSeriesFocus(0,0)}handleFocus(e,t){let i=this.chart.overlays.getFocusInfo(this.chart.ctx.localeManager);null==i?this.handleSeriesFocus(e,t):this.chart.ctx.focusIndicator.updateBounds(i.rect)}handleSeriesFocus(e,t){if("hierarchy"===this.chart.chartType)return void this.handleHierarchySeriesFocus(e,t);let{focus:i,seriesRect:s}=this,r=i.sortedSeries.filter(e=>e.visible);if(0===r.length)return;i.seriesIndex=c$(0,i.seriesIndex,r.length-1),i.series=r[i.seriesIndex];let{datumIndex:a,seriesIndex:o}=i,n=i.series.pickFocus({datumIndex:a,datumIndexDelta:t,otherIndex:o,otherIndexDelta:e,seriesRect:s});this.updatePickedFocus(n)}handleHierarchySeriesFocus(e,t){this.focus.series=this.focus.sortedSeries[0];let{focus:{series:i,seriesIndex:s,datumIndex:r},seriesRect:a}=this;if(void 0===i)return;let o=i.pickFocus({datumIndex:r,datumIndexDelta:t,otherIndex:s,otherIndexDelta:e,seriesRect:a});this.updatePickedFocus(o)}updatePickedFocus(e){let{focus:t}=this;if(void 0===e||void 0===t.series)return;let{datum:i,datumIndex:s}=e;t.datumIndex=s,t.datum=i,this.chart.ctx.focusIndicator.isFocusVisible()&&this.chart.ctx.animationManager.reset();let r=function(e,t){var i;!function(e,t){let{bounds:i,showFocusBox:s}=t;s&&(null==e||e.updateBounds(i))}(e,t);let{x:s,y:r}=null!=(i=function(e){if(null!=e)return e instanceof c4?e.computeCenter():mJ.toCanvas(e).computeCenter()}(t.bounds))?i:{};if(void 0!==s&&void 0!==r)return{type:"keyboard",offsetX:s,offsetY:r}}(this.chart.ctx.focusIndicator,e);if(void 0!==r&&"keyboard"===this.hoverDevice){this.tooltip.lastHover=void 0,this.highlight.appliedHoverEvent=void 0,this.highlight.pendingHoverEvent=void 0,this.highlight.stashedHoverEvent=void 0;let e=t.series.getTooltipHtml(i),s=y$.makeTooltipMeta(r,i);this.chart.ctx.highlightManager.updateHighlight(this.id,i),this.chart.ctx.tooltipManager.updateTooltip(this.id,s,e),this.ariaLabel.text=this.getDatumAriaText(i,e)}}getDatumAriaText(e,t){var i,s,r;let a=t.ariaLabel;return this.chart.ctx.localeManager.t("ariaAnnounceHoverDatum",{datum:null!=(i=null==(s=(r=e.series).getDatumAriaText)?void 0:s.call(r,e,a))?i:a})}clearHighlight(){this.highlight.pendingHoverEvent=void 0,this.highlight.appliedHoverEvent=void 0,this.chart.ctx.highlightManager.updateHighlight(this.id
206)}clearTooltip(){this.chart.ctx.tooltipManager.removeTooltip(this.id),this.tooltip.lastHover=void 0}clearAll(){this.clearHighlight(),this.clearTooltip(),this.chart.ctx.focusIndicator.updateBounds(void 0)}handleHoverHighlight(e){var t;this.highlight.appliedHoverEvent=this.highlight.pendingHoverEvent,this.highlight.pendingHoverEvent=void 0;let i=this.highlight.appliedHoverEvent;if(!i)return;let s=this.chart.ctx.interactionManager.getState();if(32!==s&&8!==s&&1!==s)return;let{offsetX:r,offsetY:a}=i;if(e?this.chart.ctx.animationManager.isActive():!(null!=(t=this.hoverRect)&&t.containsPoint(r,a)))return void this.clearHighlight();let o={x:i.regionOffsetX,y:i.regionOffsetY};"series"!==i.region&&(o=mJ.fromCanvasPoint(this.chart.seriesRoot,r,a));let{range:n}=this.chart.highlight,l=wT(this.series,o,"tooltip"===n?"highlight-tooltip":"highlight");if(l){this.chart.ctx.highlightManager.updateHighlight(this.id,l.datum),this.hoverDevice="mouse";return}this.chart.ctx.highlightManager.updateHighlight(this.id)}handleHoverTooltip(e,t){var i;let s=this.chart.ctx.interactionManager.getState();if(32!==s&&8!==s&&1!==s)return;let{offsetX:r,offsetY:a,targetElement:o,regionOffsetX:n,regionOffsetY:l}=e;if(t?this.chart.ctx.animationManager.isActive():!(null!=(i=this.hoverRect)&&i.containsPoint(r,a))){"mouse"==this.hoverDevice&&this.clearTooltip();return}if(o&&this.chart.tooltip.interactive&&this.chart.ctx.domManager.isManagedChildDOMElement(o,"canvas-overlay",v4))return;let h={x:n,y:l};"series"!==e.region&&(h=mJ.fromCanvasPoint(this.chart.seriesRoot,r,a));let d=wT(this.series,h,"tooltip");if(!d){"mouse"==this.hoverDevice&&this.clearTooltip();return}this.hoverDevice="mouse";let u=d.series.getTooltipHtml(d.datum);if(this.chart.tooltip.enabled&&d.series.tooltipEnabled&&null!=u){let t=y$.makeTooltipMeta(e,d.datum);this.chart.ctx.tooltipManager.updateTooltip(this.id,t,u)}}changeHighlightDatum(e){var t,i;let s=new Set,{series:r,datum:a}=null!=(t=e.currentHighlight)?t:{},{series:o,datum:n}=null!=(i=e.previousHighlight)?i:{};o&&s.add(o),r&&s.add(r),null!=o&&o.properties.cursor&&n&&this.chart.ctx.cursorManager.updateCursor(o.id),null!=r&&r.properties.cursor&&(null==r?void 0:r.properties.cursor)!=="default"&&a&&this.chart.ctx.cursorManager.updateCursor(r.id,r.properties.cursor),null==r||null==o?this.update(4):this.update(4,{seriesToUpdate:s})}},wP=class{constructor(e,t,i){this.seriesRoot=e,this.highlightRoot=t,this.annotationRoot=i,this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(e){this.expectedSeriesCount=e}requestGroup(e){var t,i,s;let{internalId:r,type:a,rootGroup:o,highlightGroup:n,annotationGroup:l,seriesGrouping:h}=e,{groupIndex:d=r}=null!=h?h:{};if(null!=this.series[r])throw Error(`AG Charts - series already has an allocated layer: ${this.series[r]}`);0===Object.keys(this.series).length&&(this.mode=this.expectedSeriesCount>=30?"aggressive-grouping":"normal"),null!=(i=this.groups)[a]||(i[a]={});let u=this.lookupIdx(d),c=null!=(t=(s=this.groups[a])[u])?t:s[u]={type:a,id:u,seriesIds:[],group:this.seriesRoot.appendChild(new fi({name:`${a}-content`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("data")})),highlight:this.highlightRoot.appendChild(new m1({name:`${a}-highlight`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("highlight")})),annotation:this.annotationRoot.appendChild(new m1({name:`${a}-annotation`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("annotation")}))};return this.series[r]={layerState:c,seriesConfig:e},c.seriesIds.push(r),c.group.appendChild(o),c.highlight.appendChild(n),c.annotation.appendChild(l),c.group}changeGroup(e){var t;let{internalId:i,seriesGrouping:s,type:r,rootGroup:a,highlightGroup:o,annotationGroup:n,oldGrouping:l}=e,{groupIndex:h=i}=null!=s?s:{};null!=(t=this.groups[r])&&null!=(t=t[h])&&t.seriesIds.includes(i)||(null!=this.series[i]&&this.releaseGroup({internalId:i,seriesGrouping:l,type:r,rootGroup:a,highlightGroup:o,annotationGroup:n}),this.requestGroup(e))}releaseGroup(e){var t,i,s;let{internalId:r,rootGroup:a,highlightGroup:o,annotationGroup:n,type:l}=e;if(null==this.series[r])throw Error(`AG Charts - series doesn't have an allocated layer: ${r}`);let h=null==(t=this.series[r])?void 0:t.layerState;if(h&&(h.seriesIds=h.seriesIds.filter(e=>e!==r),h.group.removeChild(a),h.highlight.removeChild(o),h.annotation.removeChild(n)),(null==h?void 0:h.seriesIds.length)===0)this.seriesRoot.removeChild(h.group),this.highlightRoot.removeChild(h.highlight),this.annotationRoot.removeChild(h.annotation),delete this.groups[h.type][h.id],delete this.groups[l][r];else if((null==h?void 0:h.seriesIds.length)>0){let e=null==(i=this.series[null==h||null==(s=h.seriesIds)?void 0:s[0]])?void 0:i.seriesConfig;h.group.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("data"),h.highlight.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("highlight"),h.annotation.zIndexSubOrder=null==e?void 0:e.getGroupZIndexSubOrder("annotation")}delete this.series[r]}lookupIdx(e){return"normal"===this.mode?e:"string"!=typeof e||(e=Number(e.split("-").at(-1)))?Math.floor(30*c$(0,e/this.expectedSeriesCount,1)):0}destroy(){for(let e of Object.values(this.groups))for(let t of Object.values(e))this.seriesRoot.removeChild(t.group),this.highlightRoot.removeChild(t.highlight),this.annotationRoot.removeChild(t.annotation);this.groups={},this.series={}}},wk=class{constructor(e,t,i,s){this.chart=e,this.dataService=t,this.updateService=i,this.zoomManager=s,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.destroyFns=[],this.destroyFns.push(this.dataService.addListener("data-source-change",()=>this.onDataSourceChange()),this.dataService.addListener("data-load",()=>this.onDataLoad()),this.dataService.addListener("data-error",()=>this.onDataError()),this.updateService.addListener("update-complete",()=>this.onUpdateComplete()),this.zoomManager.addListener("zoom-change",()=>this.onZoomChange()))}
206destroy(){this.destroyFns.forEach(e=>e())}onDataLoad(){this.updateService.update(1)}onDataError(){this.updateService.update(3)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(){(this.dirtyZoom||this.dirtyDataSource)&&this.updateWindow().catch(e=>u8.errorOnce(e))}onZoomChange(){this.dirtyZoom=!0}async updateWindow(){var e,t;let i;if(!this.dataService.isLazy())return;let s=this.getValidAxis(),r=!0;if(s){let e=this.zoomManager.getAxisZoom(s.id);i=this.getAxisWindow(s,e),r=this.shouldRefresh(s,e)}this.dirtyZoom=!1,this.dirtyDataSource=!1,r&&this.dataService.load({windowStart:null==(e=i)?void 0:e.min,windowEnd:null==(t=i)?void 0:t.max})}getValidAxis(){return this.chart.axes.find(e=>"time"===e.type)}shouldRefresh(e,t){if(this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;let i=this.lastAxisZooms.get(e.id);return(!i||t.min!==i.min||t.max!==i.max)&&(this.lastAxisZooms.set(e.id,t),!0)}getAxisWindow(e,t){var i,s;let r=null==(i=(s=e.scale).getDomain)?void 0:i.call(s);if(!t||!r||0===r.length||isNaN(Number(r[0])))return;let a=Number(r[1])-Number(r[0]);return{min:new Date(Number(r[0])+a*t.min),max:new Date(Number(r[0])+a*t.max)}}},wN=class{constructor(e,t,i,s,r,a,o){this.chartLike=e,this.overlays=t,this.dataService=i,this.layoutManager=s,this.localeManager=r,this.animationManager=a,this.domManager=o,this.destroyFns=[],this.overlayElem=this.domManager.addChild("canvas-overlay","overlay"),this.overlayElem.role="status",this.overlayElem.ariaAtomic="false",this.overlayElem.ariaLive="polite",this.overlayElem.classList.toggle(wb),this.destroyFns.push(this.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)))}destroy(){this.destroyFns.forEach(e=>e()),this.domManager.removeStyles("overlays"),this.domManager.removeChild("canvas-overlay","overlay")}onLayoutComplete({series:{rect:e}}){let t=this.dataService.isLoading(),i=this.chartLike.series.some(e=>e.hasData),s=this.chartLike.series.some(e=>e.visible);this.overlays.darkTheme?this.overlayElem.classList.add(wS):this.overlayElem.classList.remove(wS),this.overlayElem.style.left=`${e.x}px`,this.overlayElem.style.top=`${e.y}px`,this.overlayElem.style.width=`${e.width}px`,this.overlayElem.style.height=`${e.height}px`;let r=!t&&!i,a=i&&!s;t?this.showOverlay(this.overlays.loading,e):this.hideOverlay(this.overlays.loading),r?this.showOverlay(this.overlays.noData,e):this.hideOverlay(this.overlays.noData),a?this.showOverlay(this.overlays.noVisibleSeries,e):this.hideOverlay(this.overlays.noVisibleSeries),vJ(this.overlayElem,"aria-hidden",!(t||r||a))}showOverlay(e,t){let i=e.getElement(this.animationManager,this.localeManager,t);this.overlayElem.appendChild(i)}hideOverlay(e){e.removeElement(()=>{this.overlayElem.innerText=" "},this.animationManager)}},wO=m8.create(!0,"opts"),wG=class extends gb{constructor(){super(...arguments),this.padding=new Cs(0)}};uQ([gM(gR,{optional:!0})],wG.prototype,"clip",2),uQ([gM(gI)],wG.prototype,"padding",2);var wB=class e extends Ci{constructor(e,t){var i,s,r,a,o;super(),this.id=cE(this),this.seriesRoot=new m4({name:`${this.id}-series-root`}),this.highlightRoot=new fs({name:`${this.id}-highlight-root`,zIndex:5,deriveZIndexFromChildren:!0}),this.annotationRoot=new fs({name:`${this.id}-annotation-root`,zIndex:10}),this.debug=m8.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this.padding=new Cs(20),this.seriesArea=new wG,this.keyboard=new wh,this.mode="standalone",this.chartCaptions=new Ch,this.destroyed=!1,this._destroyFns=[],this.skipSync=!1,this.chartAnimationPhase="initial",this.modulesManager=new ww,this.processors=[],this.queuedUserOptions=[],this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateSkipAnimations=!1,this.performUpdateType=7,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new Ct,this.updateRequestors={},this.performUpdateTrigger=Cr((e,t=0)=>setTimeout(e,t),async({count:e})=>{this.destroyed||this.updateMutex.acquire(async()=>{try{await this.performUpdate(e)}catch(e){u8.error("update error",e)}}).catch(e=>u8.errorOnce(e))}),this._performUpdateSplits={},this.axes=[],this.series=[],this.onSeriesNodeClick=e=>{this.fireEvent({...e,type:"seriesNodeClick"})},this.onSeriesNodeDoubleClick=e=>{this.fireEvent({...e,type:"seriesNodeDoubleClick"})},this.seriesGroupingChanged=e=>{if(!(e instanceof wI))return;let{series:t,seriesGrouping:i,oldGrouping:s}=e;t.rootGroup.isRoot()||this.seriesLayerManager.changeGroup({internalId:t.internalId,type:t.type,rootGroup:t.rootGroup,highlightGroup:t.highlightGroup,annotationGroup:t.annotationGroup,getGroupZIndexSubOrder:e=>t.getGroupZIndexSubOrder(e),seriesGrouping:i,oldGrouping:s})},this.chartOptions=e;let n=null==t?void 0:t.scene,l=null!=(i=null!=(s=null==t?void 0:t.container)?s:e.processedOptions.container)?i:void 0,h=null!=(r=null==t?void 0:t.styleContainer)?r:e.specialOverrides.styleContainer,d=new m1({name:"root"}),u=new fi({name:"titles",zIndex:14});d.visible=!1,d.append(u),d.append(this.seriesRoot),d.append(this.highlightRoot),d.append(this.annotationRoot),u.append(this.title.node),u.append(this.subtitle.node),u.append(this.footnote.node),this.tooltip=new v9,this.seriesLayerManager=new wP(this.seriesRoot,this.highlightRoot,this.annotationRoot),this.mode=null!=(a=e.userOptions.mode)?a:this.mode;
206let c=this.ctx=new yX(this,{scene:n,root:d,container:l,styleContainer:h,syncManager:new wl(this),pixelRatio:e.specialOverrides.overrideDevicePixelRatio,updateCallback:(e=0,t)=>this.update(e,t),updateMutex:this.updateMutex});this._destroyFns.push(c.domManager.addListener("resize",()=>this.parentResize(c.domManager.containerSize))),this.overlays=new wM,null!=(o=this.overlays.loading).renderer||(o.renderer=()=>(function(e,t){let{animationDuration:i}=pX.add,s=cG("div",`${wb}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${i*t}ms linear 50ms both`}),r=cG("span",{width:"45px",height:"40px",backgroundImage:"linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)",backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),a=cG("p",{marginTop:"1em"});a.innerText=e;let o=cG("div",`${wb}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),n=cG("style");return n.innerText="@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } } @keyframes ag-charts-loading-matrix { 0% { background-position: 0% 0%, 50% 0%, 100% 0%; } 100% { background-position: 0% 100%, 50% 100%, 100% 100%; } }",s.replaceChildren(n,r,a,o),s})(this.overlays.loading.getText(c.localeManager),c.animationManager.defaultDuration)),this.processors=[new wk(this,c.dataService,c.updateService,c.zoomManager),new wN(this,this.overlays,c.dataService,c.layoutManager,c.localeManager,c.animationManager,c.domManager)],this.highlight=new yJ,this.container=l;let p=this.getModuleContext();c.regionManager.addRegion("series",this.seriesRoot,new yk(this.seriesRoot,()=>{var e;return null!=(e=this.seriesRect)?e:c4.zero}),this.ctx.axisManager.axisGridGroup),c.regionManager.addRegion("horizontal-axes"),c.regionManager.addRegion("vertical-axes"),c.regionManager.addRegion("root",d),c.domManager.setDataBoolean("animating",!1),this.seriesAreaManager=new wF(this.initSeriesAreaDependencies()),this._destroyFns.push(c.layoutManager.registerElement(0,e=>{e.layoutBox.shrink(this.padding.toJson()),this.chartCaptions.positionCaptions(e)}),c.layoutManager.addListener("layout:complete",e=>this.chartCaptions.positionAbsoluteCaptions(e)),c.dataService.addListener("data-load",e=>{this.data=e.data}),this.title.registerInteraction(p,"beforebegin"),this.subtitle.registerInteraction(p,"beforebegin"),this.footnote.registerInteraction(p,"afterend"),c.interactionManager.addListener("page-left",()=>this.destroy()),c.animationManager.addListener("animation-frame",()=>{this.update(6)}),c.animationManager.addListener("animation-start",()=>c.domManager.setDataBoolean("animating",!0)),c.animationManager.addListener("animation-stop",()=>c.domManager.setDataBoolean("animating",!1)),c.zoomManager.addListener("zoom-change",()=>{this.series.forEach(e=>{var t;return null==(t=e.animationState)?void 0:t.transition("updateData")});let e="initial"!==this.chartAnimationPhase;this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})})),this.parentResize(c.domManager.containerSize)}static getInstance(t){return e.chartsInstances.get(t)}get canvasElement(){return this.ctx.scene.canvas.element}download(e,t){this.ctx.scene.download(e,t)}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}toSVG(){return this.ctx.scene.toSVG()}getOptions(){var e;return null!=(e=this.queuedUserOptions.at(-1))?e:this.chartOptions.userOptions}initSeriesAreaDependencies(){let{ctx:e,tooltip:t,highlight:i,overlays:s,seriesRoot:r}=this,a=this.getChartType();return{fireEvent:this.fireEvent.bind(this),getUpdateType:()=>this.performUpdateType,chartType:a,ctx:e,tooltip:t,highlight:i,overlays:s,seriesRoot:r}}getModuleContext(){return this.ctx}getCaptionText(){return[this.title,this.subtitle,this.footnote].filter(e=>e.enabled&&e.text).map(e=>e.text).join(". ")}getAriaLabel(){return this.ctx.localeManager.t("ariaAnnounceChart",{seriesCount:this.series.length})}resetAnimations(){for(let e of(this.chartAnimationPhase="initial",this.series))e.resetAnimation(this.chartAnimationPhase);for(let e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}destroy(e){let t;if(this.destroyed)return;let i=null==e?void 0:e.keepTransferableResources;
206return this.performUpdateType=7,this._destroyFns.forEach(e=>e()),this.processors.forEach(e=>e.destroy()),this.tooltip.destroy(this.ctx.domManager),this.overlays.destroy(),this.modulesManager.destroy(),i?(this.ctx.scene.strip(),t={container:this.container,scene:this.ctx.scene}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach(e=>e.destroy()),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.destroyed=!0,Object.freeze(this),t}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(async()=>{this.destroyed||(await e(this),!this.destroyed&&this._pendingFactoryUpdatesCount--)}).catch(e=>u8.errorOnce(e)))}update(e=0,t){var i,s;let{forceNodeDataRefresh:r=!1,skipAnimations:a,seriesToUpdate:o=this.series,newAnimationBatch:n}=null!=t?t:{};for(let e of(r&&this.series.forEach(e=>e.markNodeDataDirty()),o))this.seriesToUpdate.add(e);if(a&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),n&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this.skipSync=null!=(i=null==t?void 0:t.skipSync)&&i,this.debug.check()){let t=null!=(s=Error().stack)?s:"<unknown>";t=t.replace(/\([^)]*/g,""),this.updateRequestors[t]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.ctx.domManager.setDataBoolean("updatePending",!0),this.performUpdateTrigger.schedule(null==t?void 0:t.backOffMs))}async performUpdate(e){let{performUpdateType:t,extraDebugStats:i,_performUpdateSplits:s,ctx:r}=this,a=[...this.seriesToUpdate];this.performUpdateType=7,this.seriesToUpdate.clear(),0===this.updateShortcutCount&&t<6&&(r.animationManager.startBatch(this._performUpdateSkipAnimations),r.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.debug("Chart.performUpdate() - start",yq[t]);let o=performance.now();null!=s.start||(s.start=o);let n=e=>{null!=s[e]||(s[e]=0),s[e]+=performance.now()-o,o=performance.now()},l=!1;switch(t){case 0:this.ctx.updateService.dispatchPreDomUpdate(),this.updateDOM();case 1:await this.updateData(),n("⬇️");case 2:await this.processData(),this.seriesAreaManager.dataChanged(),n("🏭");case 3:if(this.checkUpdateShortcut(3))break;if(!this.checkFirstAutoSize(a)){l=!0;break}await this.processLayout(),n("⌖");case 4:{if(this.checkUpdateShortcut(4))break;let{seriesRect:e}=this;await Promise.all(a.map(t=>t.update({seriesRect:e}))),n("🤔"),this.updateAriaLabels()}case 5:if(this.checkUpdateShortcut(5))break;r.updateService.dispatchPreSceneRender(this.getMinRects()),n("↖");case 6:if(this.checkUpdateShortcut(6))break;for(let e in r.animationManager.endBatch(),i.updateShortcutCount=this.updateShortcutCount,await r.scene.render({debugSplitTimes:s,extraDebugStats:i,seriesRect:this.seriesRect}),this.extraDebugStats={},s)delete s[e];this.ctx.domManager.incrementDataCounter("sceneRenders");case 7:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,r.animationManager.endBatch()}l||(r.updateService.dispatchUpdateComplete(this.getMinRects()),this.ctx.domManager.setDataBoolean("updatePending",!1));let h=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round((h-s.start)*100)/100,count:e,performUpdateType:yq[t]})}updateThemeClassName(){let{theme:e}=this.chartOptions.processedOptions,t="ag-charts-theme-",i=[`${t}default`,`${t}default-dark`],s=i[0],r=!1;"string"==typeof e?(s=e.replace("ag-",t),r=e.includes("-dark")):"string"==typeof(null==e?void 0:e.baseTheme)&&(s=e.baseTheme.replace("ag-",t),r=e.baseTheme.includes("-dark")),i.includes(s)||(s=r?i[1]:i[0]),this.ctx.domManager.setThemeClass(s)}updateDOM(){this.updateThemeClassName();let{enabled:e,tabIndex:t}=this.keyboard;this.ctx.domManager.setTabIndex(e?null!=t?t:0:-1)}updateAriaLabels(){this.ctx.domManager.updateCanvasLabel(this.getAriaLabel())}checkUpdateShortcut(e){return this.updateShortcutCount>3?(u8.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e&&(this.updateShortcutCount++,!0)}checkFirstAutoSize(e){if(null!=this.width&&null!=this.height);else if(!this._lastAutoSize){let t=this._performUpdateNoRenderCount++,i=(t+1)**2*40;if(t<8)return this.update(3,{seriesToUpdate:e,backOffMs:i}),this.debug("Chart.checkFirstAutoSize() - backing off until first size update",i),!1;this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}return this._performUpdateNoRenderCount=0,!0}onAxisChange(e,t){(null!=t||0!==e.length)&&this.ctx.axisManager.updateAxes(null!=t?t:[],e)}onSeriesChange(e,t){var i,s,r;let a=null!=(i=null==t?void 0:t.filter(t=>!e.includes(t)))?i:[];for(let i of(this.destroySeries(a),null==(s=this.seriesLayerManager)||s.setSeriesCount(e.length),e)){if(null!=t&&t.includes(i))continue;i.rootGroup.isRoot()&&this.seriesLayerManager.requestGroup(i);let e=this;i.chart={get mode(){return e.mode},get isMiniChart(){return!1},get seriesRect(){return e.seriesRect},placeLabels:t=>e.placeLabels(t)},i.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(i),i.addChartEventListeners()}null==(r=this.seriesAreaManager)||r.seriesChanged(e)}
206destroySeries(e){null==e||e.forEach(e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.removeEventListener("groupingChanged",this.seriesGroupingChanged),e.destroy(),this.seriesLayerManager.releaseGroup(e),e.chart=void 0})}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}assignSeriesToAxes(){for(let e of this.axes)e.boundSeries=this.series.filter(t=>t.axes[e.direction]===e)}assignAxesToSeries(){let e=gs(this.axes,e=>e.direction);this.series.forEach(t=>{t.directions.forEach(i=>{let s=e[i];if(!s)return void u8.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);let r=t.getKeys(i),a=s.find(e=>!e.keys.length||r.some(t=>e.keys.includes(t)));a?t.axes[i]=a:u8.warnOnce(`no matching axis for direction [${i}] and keys [${r}]; check series and axes configuration.`)})})}parentResize(e){var t;if(null==e||null!=this.width&&null!=this.height)return;let{width:i,height:s}=e;if(i=Math.floor(i),s=Math.floor(s),0===i&&0===s)return;let[r=0,a=0]=null!=(t=this._lastAutoSize)?t:[];(r!==i||a!==s)&&(this._lastAutoSize=[i,s],this.resize("SizeMonitor",{}))}resize(e,t){var i,s,r,a;let{scene:o,animationManager:n}=this.ctx,{inWidth:l,inHeight:h,inMinWidth:d,inMinHeight:u}=t;this.ctx.domManager.setSizeOptions(null!=d?d:this.minWidth,null!=u?u:this.minHeight,null!=l?l:this.width,null!=h?h:this.height);let c=null!=(i=null!=l?l:this.width)?i:null==(s=this._lastAutoSize)?void 0:s[0],p=null!=(r=null!=h?h:this.height)?r:null==(a=this._lastAutoSize)?void 0:a[1];if(this.debug(`Chart.resize() from ${e}`,{width:c,height:p,stack:Error().stack}),null!=c&&null!=p&&pE(c)&&pE(p)&&o.resize(c,p)){n.reset();let e=!0;(null==this.width||null==this.height)&&this._firstAutoSize&&(e=!1,this._firstAutoSize=!1),this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})}}async updateData(){this.series.forEach(e=>e.setChartData(this.data));let e=this.modulesManager.mapModules(e=>{var t;return null==(t=e.updateData)?void 0:t.call(e,this.data)});await Promise.all(e)}async processData(){this.series.some(e=>e.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes());let e=new y8(this.mode),t=this.series.map(t=>t.processData(e)),i=this.modulesManager.mapModules(t=>{var i;return null==(i=t.processData)?void 0:i.call(t,e)});for(let{legendType:s,legend:r}of(e.execute(),await Promise.all([...t,...i]),this.modulesManager.legends()))r.data=this.getLegendData(s,"integrated"!==this.mode)}placeLabels(e){let t=[],i=[];for(let e of this.series){var s;if(!e.visible)continue;let r=e.getLabelData();null!=(s=null==r?void 0:r[0])&&"object"==typeof s.point&&"object"==typeof s.label&&(i.push(r),t.push(e))}let{seriesRect:r}=this,{top:a,right:o,bottom:n,left:l}=this.seriesArea.padding;return new Map((r&&i.length>0?function(e,t,i=5){let s=[];e=e.map(e=>e.slice().sort((e,t)=>t.point.size-e.point.size));for(let o=0;o<e.length;o++){let n=s[o]=[],l=e[o];if(null!=l&&l.length&&l[0].label)for(let o=0,h=l.length;o<h;o++){var r,a;let h=l[o],{point:d,label:u,marker:c}=h,{text:p,width:g,height:m}=u,v=.5*d.size,f=0,C=0;if(v>0&&null!=h.placement){let e=vP[h.placement];f=(.5*g+v+i)*e.x,C=(.5*m+v+i)*e.y}let y=d.x-.5*g+f-((null!=(r=null==c?void 0:c.center.x)?r:.5)-.5)*d.size,w=d.y-.5*m+C-((null!=(a=null==c?void 0:c.center.y)?a:.5)-.5)*d.size;!(!(!t||y+g<t.x+t.width&&y>t.x&&w>t.y&&w+m<t.y+t.height)||e.some(e=>e.some(e=>{var t;return function(e,t,i,s,r,a){if(0===e.size)return!1;let o=e.x,n=e.y;null!=t&&(o-=(t.x-.5)*e.size,n-=(t.y-.5)*e.size);let l=o;o<i?l=i:o>i+r&&(l=i+r);let h=n;n<s?h=s:n>s+a&&(h=s+a);let d=o-l,u=n-h;return Math.sqrt(d*d+u*u)<=.5*e.size}(e.point,null==(t=e.marker)?void 0:t.center,y,w,g,m)})))&&(s.some(e=>e.some(e=>vF(e,y,w,g,m)))||n.push({index:o,text:p,x:y,y:w,width:g,height:m,datum:h}))}}return s}(i,{x:-l,y:-a,width:r.width+l+o,height:r.height+a+n},e):[]).map((e,i)=>[t[i],e]))}getLegendData(e,t){var i,s;let r=this.series.filter(e=>
206e.properties.showInLegend).flatMap(t=>t.getLegendData(e));if(t&&r.every(e=>"category"===e.legendType)){let e={},t=new Map(this.series.map(e=>[e.id,e.type]));for(let{seriesId:a,symbols:[{marker:o}],label:n}of r){if(null==o.fill)continue;let r=t.get(a),l=null!=(s=e[r])?s:e[r]={};null!=l[i=n.text]||(l[i]=o.fill),l[n.text]!==o.fill&&u8.warnOnce(`legend item '${n.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}return r}async processLayout(){var e;let t=this.animationRect,{width:i,height:s}=this.ctx.scene,r=this.ctx.layoutManager.createContext(i,s);await this.performLayout(r),t&&!(null!=(e=this.animationRect)&&e.equals(t))&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}async waitForUpdate(e=1e4,t=!1){let i=performance.now();for(this._pendingFactoryUpdatesCount>0&&await this.updateMutex.waitForClearAcquireQueue();7!==this.performUpdateType;){if(performance.now()-i>e){let i=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(t)throw Error(i);u8.warnOnce(i)}await new Promise(e=>{setTimeout(()=>e(void 0),50)})}await this.updateMutex.waitForClearAcquireQueue()}getMinRects(){let{width:e,height:t}=this.ctx.scene,i=this.series.map(i=>i.getMinRects(e,t)).filter(pg);if(0===i.length)return;let s=0,r=0,a=0,o=0;for(let{minRect:e,minVisibleRect:t}of i)s=Math.max(s,e.width),r=Math.max(r,e.height),a=Math.max(a,t.width),o=Math.max(o,t.height);let n=new c4(0,0,s,r),l=n.clone();return a>0&&o>0&&(l=new c4(0,0,a,o)),{minRect:n,minVisibleRect:l}}filterMiniChartSeries(e){return null==e?void 0:e.filter(e=>!1!==e.showInMiniChart)}applyOptions(e){var t,i,s,r,a;let o=e!==this.chartOptions?this.chartOptions.processedOptions:{},n=e.processedOptions,l=e.diffOptions(o);if(null==l)return;wO("Chart.applyOptions() - applying delta",l);let h=this.applyModules(n);l.listeners&&this.registerListeners(this,l.listeners),vV(this,l,{skip:["type","data","series","listeners","preset","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","locale.localeText","axes","topology","nodes","initialState","styleContainer"]});let d=!1,u="no-op";null!=l.series&&(u=this.applySeries(this,l.series,null==o?void 0:o.series),d=!0),"replaced"===u&&this.resetAnimations(),this.applyAxes(this,n,o,u,[],!0)&&(d=!0),l.data&&(this.data=l.data),null!=(t=l.legend)&&t.listeners&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,l.legend.listeners),null!=(i=l.locale)&&i.localeText&&(this.modulesManager.getModule("locale").localeText=null==(a=l.locale)?void 0:a.localeText),this.chartOptions=e;let c=this.modulesManager.getModule("navigator"),p=this.modulesManager.getModule("zoom");null!=c&&c.enabled||null!=p&&p.enabled||this.ctx.zoomManager.updateZoom("chart");let g=null==c?void 0:c.miniChart,m=null!=(s=null==(r=n.navigator)||null==(r=r.miniChart)?void 0:r.series)?s:n.series;(null==g?void 0:g.enabled)===!0&&null!=m?this.applyMiniChartOptions(g,m,n,o):(null==g?void 0:g.enabled)===!1&&(g.series=[],g.axes=[]),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),d||(d=this.shouldForceNodeDataRefresh(l,u));let v=3*!(d||h);this.maybeResetAnimations(u),wO("Chart.applyOptions() - update type",yq[v],{seriesStatus:u,forceNodeDataRefresh:d}),this.update(v,{forceNodeDataRefresh:d,newAnimationBatch:!0}),(l.initialState||l.theme)&&this.applyInitialState(e.userOptions.initialState)}applyInitialState(e){let{ctx:{annotationManager:t,historyManager:i,stateManager:s}}=this;if((null==e?void 0:e.annotations)!=null){let i=e.annotations.map(e=>{let i=t.getAnnotationTypeStyles(e.type);return pk(e,i)});s.setState(t,i)}null!=e&&i.clear()}maybeResetAnimations(e){if("standalone"===this.mode)switch(e){case"series-grouping-change":case"replaced":this.resetAnimations()}}shouldForceNodeDataRefresh(e,t){let i=!!e.data||"data-change"===t||"replaced"===t,s=Object.values(wt.getKeys()).some(t=>null!=e[t]),r=null!=e.title&&null!=e.subtitle;return i||s||r}applyMiniChartOptions(e,t,i,s){var r,a,o,n;let l=null!=(r=null==s||null==(a=s.navigator)||null==(a=a.miniChart)?void 0:a.series)?r:null==s?void 0:s.series,h=this.applySeries(e,this.filterMiniCh
206artSeries(t),this.filterMiniChartSeries(l));for(let t of(this.applyAxes(e,i,s,h,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]),e.series))t.properties.id=void 0;let d=e.axes,u=d.find(e=>"x"===e.direction);for(let e of d)e.gridLine.enabled=!1,e.label.enabled=e===u,e.tick.enabled=!1,e.interactionEnabled=!1;if(null!=u){let e=null==(o=i.navigator)?void 0:o.miniChart,t=null==e?void 0:e.label,s=null==e||null==(n=e.label)?void 0:n.interval;u.line.enabled=!1,u.label.set(pG(t,["interval","rotation","minSpacing","autoRotate","autoRotateAngle"])),u.tick.set(pG(s,["enabled","width","size","color","interval","step"]));let r=null==s?void 0:s.step;null!=r&&(u.interval.step=r)}}applyModules(e){let{type:t}=this.constructor,i=!1;for(let r of Ce.byType("root","legend")){let a=null!=e[r.optionsKey]&&r.chartTypes.includes(t);if(a!==this.modulesManager.isEnabled(r)){if(a){if(this.modulesManager.addModule(r,e=>e.moduleFactory(this.getModuleContext())),"legend"===r.type){var s;null==(s=this.modulesManager.getModule(r))||s.attachLegend(this.ctx.scene)}this[r.optionsKey]=this.modulesManager.getModule(r)}else this.modulesManager.removeModule(r),delete this[r.optionsKey];i=!0}}return i}initSeriesDeclarationOrder(e){for(let t=0;t<e.length;t++)e[t]._declarationOrder=t}applySeries(e,t,i){if(!t)return"no-change";let s=function(e,t,i){var s,r,a,o;let n=(e,t,i)=>{let s=[e];for(let e of wu)e in t&&null!=t[e]&&s.push(`${e}=${t[e]}`);return null!=i&&i.seriesGrouping&&s.push(`seriesGrouping.groupId=${null==i?void 0:i.seriesGrouping.groupId}`),s.join(";")},l=new Map,h=0;for(let t of e){let e=n(t.type,t.properties,null==i?void 0:i[h]);l.has(e)||l.set(e,[]),null==(s=l.get(e))||s.push([t,h++])}let d=new Map;for(let e of t){let t=n(e.type,e,e);d.has(t)||d.set(t,[]),null==(r=d.get(t))||r.push(e)}if(![...l.keys()].some(e=>d.has(e)))return{status:"no-overlap",oldKeys:l.keys(),newKeys:d.keys()};let u=[],c=-1;for(let[e,t]of d.entries())for(let s of t){c++;let t=l.get(e);if(null==t||t.length<1){u.push({opts:s,idx:c,status:"add"}),l.delete(e);continue}let[r,n]=t.shift(),h=vO(null!=(a=null==i?void 0:i[n])?a:{},null!=s?s:{}),{groupIndex:d,stackIndex:p}=null!=(o=null==h?void 0:h.seriesGrouping)?o:{};null!=d||null!=p?u.push({opts:s,series:r,diff:h,idx:n,status:"series-grouping"}):h?u.push({opts:s,series:r,diff:h,idx:n,status:"update"}):u.push({opts:s,series:r,idx:n,status:"no-op"}),0===t.length&&l.delete(e)}for(let e of l.values())for(let[t,i]of e)u.push({series:t,idx:i,status:"remove"});return{status:"overlap",changes:u}}(e.series,t,i);if("no-overlap"===s.status)return wO(`Chart.applySeries() - creating new series instances, status: ${s.status}`,s),e.series=t.map(e=>this.createSeries(e)),this.initSeriesDeclarationOrder(e.series),"replaced";wO("Chart.applySeries() - matchResult",s);let r=[],a=!1,o=!1,n=!1;for(let e of s.changes){var l;switch(o||(o="series-grouping"===e.status),a||(a=(null==(l=e.diff)?void 0:l.data)!=null),n||(n="no-op"!==e.status),e.status){case"add":{let t=this.createSeries(e.opts);r.push(t),wO("Chart.applySeries() - created new series",t);break}case"remove":wO(`Chart.applySeries() - removing series at previous idx ${e.idx}`,e.series);break;case"no-op":r.push(e.series),wO(`Chart.applySeries() - no change to series at previous idx ${e.idx}`,e.series);break;default:{let{series:t,diff:i,idx:s}=e;wO(`Chart.applySeries() - applying series diff previous idx ${s}`,i,t),this.applySeriesValues(t,i),t.markNodeDataDirty(),r.push(t)}}}return(this.initSeriesDeclarationOrder(r),wO("Chart.applySeries() - final series instances",r),e.series=r,o)?"series-grouping-change":a?"data-change":n?"updated":"no-op"}applyAxes(e,t,i,s,r=[],a=!1){if(!("axes"in t)||!t.axes)return!1;r=["axes[].type",...r];let{axes:o}=t;if("replaced"!==s&&e.axes.length===o.length&&e.axes.every((e,t)=>e.type===o[t].type)&&wp(i))return e.axes.forEach((e,t)=>{var s,a;let n=vO(null!=(s=null==(a=i.axes)?void 0:a[t])?s:{},o[t]);wO(`Chart.applyAxes() - applying axis diff idx ${t}`,n),vV(e,n,{path:`axes[${t}]`,skip:r})}),!0;wO(`Chart.applyAxes() - creating new axes instances; seriesStatus: ${s}`),e.axes=this.createAxis(o,r);let n={x:[],y:[]};
206return e.axes.forEach(e=>{let{id:t}=e,i=e.getRegionNode();null!=i&&n[e.direction].push({id:t,node:i})}),a&&(this.ctx.regionManager.updateRegion("horizontal-axes",...n.x),this.ctx.regionManager.updateRegion("vertical-axes",...n.y)),!0}createSeries(e){let t=wn.create(e.type,this.getModuleContext());return this.applySeriesOptionModules(t,e),this.applySeriesValues(t,e),t}applySeriesOptionModules(e,t){let i=e.createModuleContext(),s=e.getModuleMap();for(let r of Ce.byType("series-option"))r.optionsKey in t&&r.seriesTypes.includes(e.type)&&s.addModule(r,e=>e.moduleFactory(i))}applySeriesValues(e,t){let i=e.getModuleMap(),{type:s,data:r,listeners:a,seriesGrouping:o,showInMiniChart:n,...l}=t;for(let e of y9)if("series-option"===e.type&&e.optionsKey in l){let t=i.getModule(e.optionsKey);if(t){let i=l[e.optionsKey];delete l[e.optionsKey],t.properties.set(i)}}e.properties.set(l),"data"in t&&e.setOptionsData(r),a&&this.registerListeners(e,a),"seriesGrouping"in t&&(null==o?e.seriesGrouping=void 0:e.seriesGrouping={...e.seriesGrouping,...o})}createAxis(e,t){let i=[],s=this.getModuleContext();for(let r=0;r<e.length;r++){let a=e[r],o=y7.create(a.type,s);this.applyAxisModules(o,a),vV(o,a,{path:`axes[${r}]`,skip:t}),i.push(o)}return!function(e){let t=[],i=[],s=[...wd];for(let s of e)if(s instanceof f1){var r;"string"==typeof(r=s.position)&&wd.includes(r)?i.push(s.position):t.push(s)}for(let e of t){let t;do t=s.pop();while(t&&i.includes(t))if(null==t)break;e.position=t}}(i),i}applyAxisModules(e,t){let i=e.createModuleContext(),s=e.getModuleMap();for(let r of Ce.byType("axis-option")){let a=null!=t[r.optionsKey];a!==s.isEnabled(r)&&(a?(s.addModule(r,e=>e.moduleFactory(i)),e[r.optionsKey]=s.getModule(r)):(s.removeModule(r),delete e[r.optionsKey]))}}registerListeners(e,t){for(let[i,s]of(e.clearEventListeners(),Object.entries(t)))pw(s)&&e.addEventListener(i,s)}};wB.chartsInstances=new WeakMap,uQ([v$({newValue(e){this.destroyed||(this.ctx.domManager.setContainer(e),wB.chartsInstances.set(e,this))},oldValue(e){wB.chartsInstances.delete(e)}})],wB.prototype,"container",2),uQ([v$({newValue(e){this.resize("width option",{inWidth:e})}})],wB.prototype,"width",2),uQ([v$({newValue(e){this.resize("height option",{inHeight:e})}})],wB.prototype,"height",2),uQ([v$({newValue(e){this.resize("minWidth option",{inMinWidth:e})}})],wB.prototype,"minWidth",2),uQ([v$({newValue(e){this.resize("minHeight option",{inMinHeight:e})}})],wB.prototype,"minHeight",2),uQ([gM(gI)],wB.prototype,"padding",2),uQ([gM(gI)],wB.prototype,"seriesArea",2),uQ([gM(gI)],wB.prototype,"keyboard",2),uQ([gM(ma(["standalone","integrated"],"a chart mode"))],wB.prototype,"mode",2),uQ([vW("chartCaptions.title")],wB.prototype,"title",2),uQ([vW("chartCaptions.subtitle")],wB.prototype,"subtitle",2),uQ([vW("chartCaptions.footnote")],wB.prototype,"footnote",2),uQ([v$({changeValue(e,t){this.onAxisChange(e,t)}})],wB.prototype,"axes",2),uQ([v$({changeValue(e,t){this.onSeriesChange(e,t)}})],wB.prototype,"series",2);var wz=wB,wV=class{constructor(e,t,i){this.root=new wW(e,t,i)}clear(e){this.root.clear(e)}addValue(e,t){this.root.addElem({hitTester:e,value:t,distanceSquared:(t,i)=>e.distanceSquared(t,i)})}find(e,t){let i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(e,t,i),i.best}},wH=class{constructor(e,t,i,s){this.nw=e,this.ne=t,this.sw=i,this.se=s}addElem(e){this.nw.addElem(e),this.ne.addElem(e),this.sw.addElem(e),this.se.addElem(e)}find(e,t,i){this.nw.find(e,t,i),this.ne.find(e,t,i),this.sw.find(e,t,i),this.se.find(e,t,i)}},wj=class{constructor(e,t,i){this.capacity=e,this.maxdepth=t,this.boundary=null!=i?i:c4.NaN,this.elems=[],this.subdivisions=void 0}clear(e){this.elems.length=0,this.boundary=e,this.subdivisions=void 0}addElem(e){this.addCondition(e)&&(void 0===this.subdivisions?0===this.maxdepth||this.elems.length<this.capacity?this.elems.push(e):this.subdivide(e):this.subdivisions.addElem(e))}find(e,t,i){this.findCondition(e,t,i)&&(void 0===this.subdivisions?this.findAction(e,t,i):this.subdivisions.find(e,t,i))}subdivide(e){for(let e of(this.subdivisions=this.makeSubdivisions(),this.elems))this.subdivisions.addElem(e);this.subdivisions.addElem(e),this.elems.length=0}makeSubdivisions(){let{x:e,y:t,width:i,height:s}=this.boundary,{capacity:r}=this,a=this.maxdepth-1,o=i/2,n=s/2,l=new c4(e,t,o,n),h=new c4(e+o,t,o,n),d=new c4(e,t+n,o,n),u=new c4(e+o,t+n,o,n);return new wH(this.child(r,a,l),this.child(r,a,h),this.child(r,a,d),this.child(r,a,u))}},wW=class e extends wj{addCondition(e){let{x:t,y:i}=e.hitTester.midPoint;return this.boundary.containsPoint(t,i)}findCondition(e,t,i){let{best:s}=i;return 0!==s.distanceSquared&&this.boundary.distanceSquared(e,t)<s.distanceSquared}findAction(e,t,i){let s=cF(e,t,this.elems,i.best.distanceSquared);void 0!==s.nearest&&s.distanceSquared<i.best.distanceSquared&&(i.best=s)}child(t,i,s){return new e(t,i,s)}}
206,wU=["ArrowDown","ArrowUp","Circle","Cross","Diamond","Heart","MapPin","Plus","Square","Star","Triangle"],w_=Object.freeze({x:.5,y:.5}),w$=class extends Cq{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}isBuiltIn(){var e;return wU.includes(null!=(e=this.constructor.className)?e:"")}computeBBox(){if(!this.isBuiltIn())return this.path.computeBBox();let{x:e,y:t,size:i}=this,{center:s}=this.constructor;return new c4(e-i*s.x,t-i*s.y,i,i)}applyPath(e,t){let{path:i}=this,{x:s,y:r}=this;for(let{x:a,y:o,t:n}of(i.clear(),t))s+=a*e,r+=o*e,"move"===n?i.moveTo(s,r):i.lineTo(s,r);i.closePath()}executeFill(e,t){if(t)return super.executeFill(e,t)}executeStroke(e,t){if(t)return super.executeStroke(e,t)}};uQ([CZ()],w$.prototype,"x",2),uQ([CZ()],w$.prototype,"y",2),uQ([CZ({convertor:Math.abs})],w$.prototype,"size",2);var wY=class extends mq(mQ(mX(w$))){};wY.center=w_;var wK=class extends wY{updatePath(){let{x:e,y:t,path:i,size:s}=this;i.clear(),i.arc(e,t,s/2,0,2*Math.PI),i.closePath()}};wK.className="Circle";var wZ=class e extends wY{updatePath(){let t=this.size/4.2;super.applyPath(t,e.moves)}};wZ.className="Cross",wZ.moves=[{x:-1,y:0,t:"move"},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:-1,y:1},{x:-1,y:-1}];var wq=class e extends wY{updatePath(){let t=this.size/2;super.applyPath(t,e.moves)}};wq.className="Diamond",wq.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}];var wQ=class extends wY{rad(e){return e/180*Math.PI}updatePath(){let{x:e,path:t,size:i,rad:s}=this,r=i/4,a=this.y+r/2;t.clear(),t.arc(e-r,a-r,r,s(130),s(330)),t.arc(e+r,a-r,r,s(220),s(50)),t.lineTo(e,a+r),t.closePath()}};wQ.className="Heart";var wX=class extends wY{updatePath(){let{path:e,x:t,y:i}=this,s=this.size;e.clear(),e.moveTo(t+-.34375*s,i+-.65625*s),e.cubicCurveTo(t+-.34375*s,i+-.848509*s,t+-.192259*s,i+-1*s,t+0*s,i+-1*s),e.cubicCurveTo(t+(.692259-.5)*s,i+-1*s,t+.34375*s,i+-.848509*s,t+.34375*s,i+-.65625*s),e.cubicCurveTo(t+.34375*s,i+-.506176*s,t+.284625*s,i+(.600181-1)*s,t+(.716461-.5)*s,i+(.695393-1)*s),e.cubicCurveTo(t+.199009*s,i+-.280231*s,t+(.681271-.5)*s,i+-.256896*s,t+(.663785-.5)*s,i+(.766105-1)*s),e.cubicCurveTo(t+(.611893-.5)*s,i+(.834367-1)*s,t+(.562228-.5)*s,i+(.899699-1)*s,t+(.528896-.5)*s,i+(.980648-1)*s),e.cubicCurveTo(t+(.524075-.5)*s,i+(.992358-1)*s,t+(.512663-.5)*s,i+0*s,t+0*s,i+0*s),e.cubicCurveTo(t+(.487337-.5)*s,i+0*s,t+(.475925-.5)*s,i+(.992358-1)*s,t+(.471104-.5)*s,i+(.980648-1)*s),e.cubicCurveTo(t+(.487337-.5)*s,i+0*s,t+(.475925-.5)*s,i+(.992358-1)*s,t+(.471104-.5)*s,i+(.980648-1)*s),e.cubicCurveTo(t+(.437772-.5)*s,i+(.899699-1)*s,t+(.388107-.5)*s,i+(.834367-1)*s,t+(.336215-.5)*s,i+(.766105-1)*s),e.cubicCurveTo(t+(.318729-.5)*s,i+-.256896*s,t+-.199009*s,i+-.280231*s,t+(.283539-.5)*s,i+(.695393-1)*s),e.cubicCurveTo(t+-.284625*s,i+(.600181-1)*s,t+-.34375*s,i+-.506176*s,t+-.34375*s,i+-.65625*s),e.closePath()}};wX.className="MapPin",wX.center={x:.5,y:1};var wJ=class e extends wY{updatePath(){let t=this.size/3;super.applyPath(t,e.moves)}};wJ.className="Plus",wJ.moves=[{x:-.5,y:-.5,t:"move"},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:-1},{x:-1,y:0},{x:0,y:-1}];var w0=class extends wY{updatePath(){let{path:e,x:t,y:i}=this,s=this.size/2;e.clear(),e.moveTo(this.align(t-s),this.align(i-s)),e.lineTo(this.align(t+s),this.align(i-s)),e.lineTo(this.align(t+s),this.align(i+s)),e.lineTo(this.align(t-s),this.align(i+s)),e.closePath()}};w0.className="Square";var w1=class extends wY{updatePath(){let{x:e,y:t,path:i,size:s}=this,r=s/2,a=Math.PI/2;i.clear();for(let o=0;o<10;o++){let n=o%2==0?s:r,l=o*Math.PI/5-a,h=e+Math.cos(l)*n,d=t+Math.sin(l)*n;i.lineTo(h,d)}i.closePath()}};w1.className="Star";var w2=class e extends wY{updatePath(){let t=1.1*this.size;super.applyPath(t,e.moves)}};w2.className="Triangle",w2.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}];var w3={circle:wK,cross:wZ,diamond:wq,heart:wQ,pin:wX,plus:wJ,square:w0,star:w1,triangle:w2},w4=Object.keys(w3);function w6(e){return"string"==typeof e&&w4.includes(e)}function w5(e=w0){return w6(e)?w3[e]:"function"==typeof e?e:w0}var w8=class extends wA{constructor(){super(...arguments),this.show
206FocusBox=!0}getScaleInformation({xScale:e,yScale:t}){return{isContinuousX:p8.is(e),isContinuousY:p8.is(t),xScaleType:null==e?void 0:e.type,yScaleType:null==t?void 0:t.type}}getModulePropertyDefinitions(){var e,t;let i=null==(e=this.axes.x)?void 0:e.scale,s=null==(t=this.axes.y)?void 0:t.scale;return this.moduleMap.mapModules(e=>e.getPropertyDefinitions(this.getScaleInformation({xScale:i,yScale:s}))).flat()}async requestDataModel(e,t,i){i.props.push(...this.getModulePropertyDefinitions());let{dataModel:s,processedData:r}=await e.request(this.id,null!=t?t:[],i);return this.dataModel=s,this.processedData=r,this.dispatch("data-processed",{dataModel:s,processedData:r}),{dataModel:s,processedData:r}}isProcessedDataAnimatable(){var e;let t=null==(e=this.processedData)||null==(e=e.reduced)?void 0:e.animationValidation;if(!t)return!0;let{orderedKeys:i,uniqueKeys:s}=t;return i&&s}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(e){let t=this.getNodeData();if(void 0===t||0===t.length)return;let i=this.computeFocusDatumIndex(e,t);if(void 0===i)return;let{showFocusBox:s}=this,r=t[i],a={...e,datumIndex:i},o=this.computeFocusBounds(a);if(void 0!==o)return{bounds:o,showFocusBox:s,datum:r,datumIndex:i}}computeFocusDatumIndex(e,t){let i,s=e=>{let{missing:i=!1,enabled:s=!0,focusable:r=!0}=t[e];return!i&&s&&r},r=e=>{for(;e>=0&&!s(e);)e--;return -1===e?void 0:e},a=e=>{for(;e<t.length&&!s(e);)e++;return e===t.length?void 0:e},o=c$(0,e.datumIndex,t.length-1);if(e.datumIndexDelta<0)i=r(o);else if(e.datumIndexDelta>0)i=a(o);else{var n;i=null!=(n=a(o))?n:r(o)}return void 0!==i?i:0===e.datumIndexDelta?void 0:e.datumIndex-e.datumIndexDelta}},w7=class extends gb{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}};uQ([gM(gY,{optional:!0})],w7.prototype,"fill",2),uQ([gM(gO,{optional:!0})],w7.prototype,"fillOpacity",2),uQ([gM(gY,{optional:!0})],w7.prototype,"stroke",2),uQ([gM(gN,{optional:!0})],w7.prototype,"strokeWidth",2),uQ([gM(gO,{optional:!0})],w7.prototype,"strokeOpacity",2),uQ([gM(g3,{optional:!0})],w7.prototype,"lineDash",2),uQ([gM(gN,{optional:!0})],w7.prototype,"lineDashOffset",2);var w9=class extends gb{};uQ([gM(gN,{optional:!0})],w9.prototype,"strokeWidth",2),uQ([gM(gO,{optional:!0})],w9.prototype,"dimOpacity",2),uQ([gM(gR,{optional:!0})],w9.prototype,"enabled",2);var be=class extends gb{constructor(){super(...arguments),this.color="black"}};uQ([gM(gY,{optional:!0})],be.prototype,"color",2);var bt=class extends gb{constructor(){super(...arguments),this.enabled=!0}};uQ([gM(gR,{optional:!0})],bt.prototype,"enabled",2);var bi=class extends gb{constructor(){super(...arguments),this.item=new w7,this.series=new w9,this.text=new be}};uQ([gM(gI)],bi.prototype,"item",2),uQ([gM(gI)],bi.prototype,"series",2),uQ([gM(gI)],bi.prototype,"text",2);var bs=class extends gb{constructor(){super(...arguments),this.visible=!0,this.focusPriority=1/0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlight=new bt,this.highlightStyle=new bi}};uQ([gM(gL,{optional:!0})],bs.prototype,"id",2),uQ([gM(gR)],bs.prototype,"visible",2),uQ([gM(gP,{optional:!0})],bs.prototype,"focusPriority",2),uQ([gM(gR)],bs.prototype,"showInLegend",2),uQ([gM(gL)],bs.prototype,"cursor",2),uQ([gM(ms)],bs.prototype,"nodeClickRange",2),uQ([gM(gI)],bs.prototype,"highlight",2),uQ([gM(gI)],bs.prototype,"highlightStyle",2);var br={x:["xKey"],y:["yKey"]},ba={x:["xName"],y:["yName"]},bo=class extends wE{constructor(e,t,i,s){super(e,t,i,s),this.xKey=s.properties.xKey,this.yKey=s.properties.yKey}},bn=class extends bs{constructor(){super(...arguments),this.pickOutsideVisibleMinorAxis=!1}};uQ([gM(gL,{optional:!0})],bn.prototype,"legendItemName",2),uQ([gM(gR,{optional:!0})],bn.prototype,"pickOutsideVisibleMinorAxis",2);var bl=class extends w8{constructor({pathsPerSeries:e=["path"],hasMarkers:t=!1,hasHighlightedLabels:i=!1,pathsZIndexSubOrderOffset:s=[],datumSelectionGarbageCollection:r=!0,markerSelectionGarbageCollection:a=!0,animationAlwaysUp
206dateSelections:o=!1,animationResetFns:n,directionKeys:l,directionNames:h,...d}){if(super({directionKeys:l,directionNames:h,canHaveAxes:!0,...d}),this.NodeEvent=bo,this.dataNodeGroup=this.contentGroup.appendChild(new m1({name:`${this.id}-series-dataNodes`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.markerGroup=this.contentGroup.appendChild(new m1({name:`${this.id}-series-markers`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("marker")})),this.labelGroup=this.contentGroup.appendChild(new m4({name:`${this.id}-series-labels`,zIndex:14,zIndexSubOrder:this.getGroupZIndexSubOrder("labels")})),this.labelSelection=m7.select(this.labelGroup,vR),this.highlightSelection=m7.select(this.highlightNode,()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory()),this.highlightLabelSelection=m7.select(this.highlightLabel,vR),this.annotationSelections=new Set,this.minRectsCache={dirtyNodeData:!0},this.debug=m8.create(),!l||!h)throw Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:e,hasMarkers:t,hasHighlightedLabels:i,pathsZIndexSubOrderOffset:s,directionKeys:l,directionNames:h,animationResetFns:n,animationAlwaysUpdateSelections:o,datumSelectionGarbageCollection:r,markerSelectionGarbageCollection:a},this.paths=[];for(let t=0;t<e.length;t++)this.paths[t]=new Cq({name:`${this.id}-${e[t]}`}),this.paths[t].zIndex=4,this.paths[t].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",t),this.contentGroup.appendChild(this.paths[t]);this.datumSelection=m7.select(this.dataNodeGroup,()=>this.nodeFactory(),r),this.markerSelection=m7.select(this.markerGroup,()=>this.markerFactory(),a),this.animationState=new vq("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:e=>{this.ctx.animationManager.isSkipped()?this.resetAllAnimation(e):this.animateWaitingUpdateReady(e)}},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:e=>this.resetAllAnimation(e),reset:"empty"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData}getNodeData(){var e;return null==(e=this.contextNodeData)?void 0:e.nodeData}
206resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e?this.animationState.transition("skip"):"disabled"===e&&this.animationState.transition("disable")}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",e=>this.onLegendItemClick(e)),this.ctx.chartEventManager.addListener("legend-item-double-click",e=>this.onLegendItemDoubleClick(e)))}destroy(){super.destroy(),this._contextNodeData=void 0}async update({seriesRect:e}){var t;let{visible:i,_contextNodeData:s}=this,r=(null==(t=this.ctx.highlightManager)||null==(t=t.getActiveHighlight())?void 0:t.series)===this,a=this.checkResize(e),o=await this.updateHighlightSelection(r);await this.updateSelections(i),await this.updateNodes(o,r,i);let n=this.getAnimationData(e,s);n&&(a&&this.animationState.transition("resize",n),this.animationState.transition("update",n))}async updateSelections(e){var t;let i=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if((e||!i)&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=await this.createNodeData();let e=this.isProcessedDataAnimatable();this._contextNodeData&&(null!=(t=this._contextNodeData).animationValid||(t.animationValid=e)),this.minRectsCache.dirtyNodeData=!0;let{dataModel:i,processedData:s}=this;void 0!==i&&void 0!==s&&this.dispatch("data-update",{dataModel:i,processedData:s})}await this.updateSeriesSelections()}}async updateSeriesSelections(e){let{datumSelection:t,labelSelection:i,markerSelection:s,paths:r}=this,a=this._contextNodeData;if(!a)return;let{nodeData:o,labelData:n,itemId:l}=a;await this.updatePaths({seriesHighlighted:e,itemId:l,contextData:a,paths:r}),this.datumSelection=await this.updateDatumSelection({nodeData:o,datumSelection:t}),this.labelSelection=await this.updateLabelSelection({labelData:n,labelSelection:i}),this.opts.hasMarkers&&(this.markerSelection=await this.updateMarkerSelection({nodeData:o,markerSelection:s}))}markerFactory(){return new(w5())}getGroupZIndexSubOrder(e,t=0){let i=super.getGroupZIndexSubOrder(e,t);if("paths"===e){var s;let[e]=i,r=null!=(s=this.opts.pathsZIndexSubOrderOffset[t])?s:0;i[0]=pw(e)?()=>Number(e())+r:Number(e)+r}return i}async updateNodes(e,t,i){var s;let{highlightSelection:r,highlightLabelSelection:a,opts:{hasMarkers:o,hasHighlightedLabels:n}}=this,l=!this.ctx.animationManager.isSkipped(),h=this.visible&&null!=this._contextNodeData&&i;this.rootGroup.visible=l||h,this.contentGroup.visible=l||h,this.highlightGroup.visible=(l||h)&&t;let d=this.getOpacity();o?(await this.updateMarkerNodes({markerSelection:r,isHighlight:!0}),this.animationState.transition("highlightMarkers",r)):(await this.updateDatumNodes({datumSelection:r,isHighlight:!0}),this.animationState.transition("highlight",r)),n&&await this.updateLabelNodes({labelSelection:a});let{dataNodeGroup:u,markerGroup:c,datumSelection:p,labelSelection:g,markerSelection:m,paths:v,labelGroup:f}=this,{itemId:C}=null!=(s=this.contextNodeData)?s:{};u.opacity=d,u.visible=l||h,f.visible=h,o&&(c.opacity=d,c.zIndex=u.zIndex>=4?u.zIndex:u.zIndex+1,c.visible=h),f&&(f.opacity=d),await this.updatePathNodes({seriesHighlighted:t,itemId:C,paths:v,opacity:d,visible:h,animationEnabled:l}),u.visible&&(await this.updateDatumNodes({datumSelection:p,highlightedItems:e,isHighlight:!1}),await this.updateLabelNodes({labelSelection:g}),o&&await this.updateMarkerNodes({markerSelection:m,isHighlight:!1}))}getHighlightLabelData(e,t){let i=e.filter(e=>e.datum===t.datum&&e.itemId===t.itemId);return 0===i.length?void 0:i}getHighlightData(e,t){return t?[t]:void 0}async updateHighlightSelection(e){var t;let i,s,{highlightSelection:r,highlightLabelSelection:a,_contextNodeData:o}=this;if(!o)return;let n=null==(t=this.ctx.highlightManager)?void 0:t.getActiveHighlight(),l=e&&null!=n&&n.datum?n:void 0;if(null!=l){let e=this.isLabelEnabled(),{labelData:t,nodeData:r}=o;s=this.getHighlightData(r,l),i=e?this.getHighlightLabelData(t,l):void 0}return this.highlightSelection=await this.updateHighlightSelectionItem({items:s,highlightSelection:r}),this.highlightLabelSelection=await this.updateHighlightSelectionLabel({items:i,highlightLabelSelection:a}),s}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(let{node:e}of this.datumSelection)!0!==e.datum.missing&&(yield e)}getQuadTree(){if(void 0===this.quadtree){let{width:e,height:t}=this.ctx.scene.canvas,i=new c4(0,0,e,t);this.quadtree=new wV(100,10,i),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(e){}pickNodeExactShape(e){let t,i=super.pickNodeExactShape(e);if(i)return i;let{x:s,y:r}=e,{opts:{hasMarkers:a}}=this,{dataNodeGroup:o,markerGroup:n}=this;if((t=o.pickNode(s,r))||!a||(t=null==n?void 0:n.pickNode(s,r)),t&&!0!==t.datum.missing)return{datum:t.datum,distance:0};for(let t of this.moduleMap.modules()){var l;let{datum:i}=null!=(l=t.pickNodeExact(e))?l:{};if(null!=i&&(null==i?void 0:i.missing)!==!0)return{datum:i,distance:0}}}pickNodeClosestDatum(e){let t,{x:i,y:s}=e,{axes:r,_contextNodeData:a}=this;if(!a)return;let o=r.x,n=r.y,l=1/0;for(let e of a.nodeData){let{point:{x:r=0/0,y:a=0/0}={}}=e;if(isNaN(r)||isNaN(a)||!((null==o?void 0:o.inRange(r))&&(null==n?void 0:n.inRange(a))))continue;let h=Math.max((i-r)**2+(s-a)**2,0);h<l&&(l=h,t=e)}for(let i of this.moduleMap.modules()){let s=i.pickNodeNearest(e);
206if(void 0!==s&&s.distanceSquared<l){l=s.distanceSquared,t=s.datum;break}}if(t){var h,d;let e=Math.max(Math.sqrt(l)-(null!=(h=null==(d=t.point)?void 0:d.size)?h:0),0);return{datum:t,distance:e}}}pickNodeMainAxisFirst(e,t){var i,s,r,a;let o,{x:n,y:l}=e,{axes:h,_contextNodeData:d}=this,{pickOutsideVisibleMinorAxis:u}=this.properties;if(!d)return;let c=h.x,p=h.y,g=[c,p].filter(f2.is).map(e=>e.direction);if(t&&0===g.length)return;let[m="x"]=g,v=[n,l];"x"!==m&&v.reverse();let f=[1/0,1/0];for(let e of d.nodeData){let{x:t=0/0,y:r=0/0}=null!=(i=null!=(s=e.point)?s:e.midPoint)?i:{};if(isNaN(t)||isNaN(r)||!0===e.missing)continue;let a=[null==c?void 0:c.inRange(t),null==p?void 0:p.inRange(r)];if("x"!==m&&a.reverse(),!a[0]||!u&&!a[1])continue;let n=[t,r];"x"!==m&&n.reverse();let l=!0;for(let e=0;e<n.length;e++){let t=Math.abs(n[e]-v[e]);if(t>f[e]){l=!1;break}t<f[e]&&(f[e]=t,f.fill(1/0,e+1,f.length))}l&&(o=e)}if(o){let t=Math.max(f[0]**2+f[1]**2-(null!=(r=null==(a=o.point)?void 0:a.size)?r:0),0);for(let i of this.moduleMap.modules()){let s=i.pickNodeMainAxisFirst(e);if(void 0!==s&&s.distanceSquared<t){o=s.datum,t=s.distanceSquared;break}}return{datum:o,distance:Math.sqrt(t)}}}onLegendItemClick(e){let{legendItemName:t}=this.properties,{enabled:i,itemId:s,series:r}=e,a=null!=t&&t===e.legendItemName;(r.id===this.id||a)&&this.toggleSeriesItem(s,i)}onLegendItemDoubleClick(e){let{enabled:t,itemId:i,series:s,numVisibleItems:r}=e,{legendItemName:a}=this.properties,o=null!=a&&a===e.legendItemName;s.id===this.id||o||t&&1===r?this.toggleSeriesItem(i,!0):this.toggleSeriesItem(i,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRects(e,t){let{dirtyNodeData:i,sizeCache:s,minRect:r,minVisibleRect:a}=this.minRectsCache,o=JSON.stringify({width:e,height:t});if(o===s&&!i&&r&&a)return{minRect:r,minVisibleRect:a};let n=this.computeMinRects(e,t);return this.minRectsCache={dirtyNodeData:!1,sizeCache:o,minRect:null==n?void 0:n.minRect,minVisibleRect:null==n?void 0:n.minVisibleRect},n}computeMinRects(e,t){let i,s,r,a,o=this._contextNodeData;if(!(null!=o&&o.nodeData.length))return;let{nodeData:n}=o,l=Array(n.length),h=Array(n.length);for(let[e,{midPoint:t}]of n.entries()){var d,u;l[e]=null!=(d=null==t?void 0:t.x)?d:0,h[e]=null!=(u=null==t?void 0:t.y)?u:0}l.sort((e,t)=>e-t),h.sort((e,t)=>e-t);let c=0,p=0;for(let o=1;o<n.length;o++)l[o]>=0&&(null!=i||(i=o)),l[o]>e&&(null!=s||(s=o)),h[o]>=0&&(null!=r||(r=o)),h[o]>t&&(null!=a||(a=o)),c=Math.max(c,l[o]-l[o-1]),p=Math.max(p,h[o]-h[o-1]);null!=s||(s=n.length),null!=a||(a=n.length);let g=null!=i&&null!=s?l.slice(i,s):[],m=null!=r&&null!=a?h.slice(r,a):[],v=0,f=0;for(let e=1;e<Math.max(g.length,m.length);e++){let t=g[e],i=g[e-1],s=m[e],r=m[e-1];null!=t&&null!=i&&(v=Math.max(v,t-i)),null!=s&&null!=r&&(f=Math.max(f,s-r))}return{minRect:new c4(0,0,c,p),minVisibleRect:new c4(0,0,v,f)}}updateHighlightSelectionItem(e){let{opts:{hasMarkers:t}}=this,{items:i,highlightSelection:s}=e,r=null!=i?i:[];return t?this.updateMarkerSelection({nodeData:r,markerSelection:s}):this.updateDatumSelection({nodeData:r,datumSelection:s})}updateHighlightSelectionLabel(e){var t;return this.updateLabelSelection({labelData:null!=(t=e.items)?t:[],labelSelection:e.highlightLabelSelection})}async updateDatumSelection(e){return e.datumSelection}async updateDatumNodes(e){}async updateMarkerSelection(e){return e.markerSelection}async updateMarkerNodes(e){}async updatePaths(e){e.paths.forEach(e=>e.visible=!1)}async updatePathNodes(e){let{paths:t,opacity:i,visible:s}=e;for(let e of t)e.opacity=i,e.visible=s}resetPathAnimation(e){var t,i;let{path:s}=null!=(t=null==(i=this.opts)?void 0:i.animationResetFns)?t:{};s&&e.paths.forEach(e=>{mm([e],s)})}resetDatumAnimation(e){var t,i;let{datum:s}=null!=(t=null==(i=this.opts)?void 0:i.animationResetFns)?t:{};s&&mm([e.datumSelection],s)}resetLabelAnimation(e){var t,i;let{label:s}=null!=(t=null==(i=this.opts)?void 0:i.animationResetFns)?t:{};s&&mm([e.labelSelection],s)}resetMarkerAnimation(e){var t,i;let{marker:s}=null!=(t=null==(i=this.opts)?void 0:i.animationResetFns)?t:{};s&&this.opts.hasMarkers&&mm([e.markerSelection],s)}resetAllAnimation(e){var t;this.ctx.animationManager.stopByAnimationGroupId(this.id),this.resetPathAnimation(e),this.resetDatumAnimation(e),this.resetLabelAnimation(e),this.resetMarkerAnimation(e),(null==(t=e.contextData)?void 0:t.animationValid)===!1&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t,i;let{datum:s}=null!=(t=null==(i=this.opts)?void 0:i.animationResetFns)?t:{};s&&mm([e],s)}animateReadyHighlightMarkers(e){var t,i;let{marker:s}=null!=(t=null==(i=this.opts)?void 0:i.animationResetFns)?t:{};s&&mm([e],s)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){let e=this.getAnimationData();e&&this.animationState.transition("clear",e)}getAnimationData(e,t){let{_contextNodeData:i}=this;if(i)return{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:t,paths:this.paths,seriesRect:e}}calculateScaling(){let e={};for(let t of Object.values(mc)){let i=this.axes[t];if(i){if(i.scale instanceof mO){let{range:s,domain:r}=i.scale;e[t]={type:"log",convert:e=>i.scale.convert(e),domain:[r[0],r[1]],range:[s[0],s[1]]}}else if(i.scale instanceof p8){let{range:s}=i.scale,r=i.scale.getDomain();e[t]={type:"continuous",domain:[r[0],r[1]],range:[s[0],s[1]]}}else if(i.scale){let{domain:s}=i.scale;e[t]={type:"category",domain:s,range:s.map(e=>i.scale.convert(e))}}}}return e}},bh=["top","right","bottom","left"],bd=class extends wz{constructor(e,t){super(e,t),this.paired=!0,this.firstSeriesTranslation=!0,this.lastUpdateClipRect=void 0,this._lastCrossLineIds=void 0,this._lastAxisAreaWidths=new Map,this._lastClipSeries=!1,this._lastVisibility={crossLines:!0,series:!0}}onAxisChange(e,t){var i;super.onAxisChange(e,t),null==(i=this.ctx)||i.zoomManager.updateAxes(e)}destroySeries(e){super.destroySeries(e),this.firstSeriesTranslation=!0}getChartType(){return"cartesian"}setRootClipRects(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this;t.setClipRect(e),s.setClipRect(e),i.setClipRect(e)}performLayout(e){let{firstSeriesTranslation:t,seriesRoot:i,annotationRoot:s,highlightRoot:r}=this,{seriesRect:a,visibility:o,clipSeries:n}=this.updateAxes(e.layoutBox);this.seriesRoot.visible=o.series,this.seriesRect=a,this.animationRect=e.layoutBox;let{x:l,y:h}=a;if(t){for(let e of[i,s,r])e.translationX=Math.floor(l),e.translationY=Math.floor(h);this.firstSeriesTranslation=!1}else{let{translationX:e,translationY:t}=i;p4(this.id,"seriesRect",this.ctx.animationManager,[i,r,s],{translationX:e,translationY:t},{translationX:Math.floor(l),translationY:Math.floor(h)},{phase:"update"})}let d=a.clone().grow(this.seriesArea.padding),u=this.seriesArea.clip||n?d:void 0,{lastUpdateClipRect:c}=this;this.lastUpdateClipRect=u,this.ctx.animationManager.isActive()&&null!=c?this.ctx.animationManager.animate({id:this.id,groupId:"clip-rect",phase:"update",from:c,to:d,onUpdate:e=>this.setRootClipRects(e),onComplete:()=>this.setRootClipRects(u)}):this.setRootClipRects(u),this.ctx.layoutManager.emitLayoutComplete(e,{axes:this.axes.map(e=>e.getLayoutState()),series:{rect:a,paddedRect:d,visible:o.series,shouldFlipXY:this.shouldFlipXY()},clipSeries:n})}updateAxes(e){var t;let i,s,r,a=this.axes.flatMap(e=>{var t;return null!=(t=e.crossLines)?t:[]}).map(e=>e.id);null!=this._lastCrossLineIds&&this._lastCrossLineIds.length===a.length&&this._lastCrossLineIds.every((e,t)=>a[t]===e)?(i=new Map(this._lastAxisAreaWidths.entries()),s=this._lastClipSeries,r={...this._lastVisibility}):(i=new Map,s=!1,r={crossLines:!0,series:!0},this._lastCrossLineIds=a);let o=new Set(this.axes.map(e=>e.position));for(let e of i.keys())o.has(e)||i.delete(e);let n=(e,t,a)=>{if([...e.keys()].some(e=>!i.has(e))||r.crossLines!==a.crossLines||r.series!==a.series||s!==t)return!1;for(let[t,s]of i.entries()){let i=e.get(t);if((null!=s||null!=i)&&s!==i)return!1}return!0},l=e=>{for(let[t,i]of e.entries()){if(i&&1/0===Math.abs(i)){e.set(t,0);continue}e.set(t,null!=i?Math.ceil(i):i)}return e},h=new Map,d={}
206,u=!1,c=null==(t=this.seriesRect)?void 0:t.clone(),p=0;do{i=new Map(h.entries()),s=u,Object.assign(r,d);let t=this.updateAxesPass(i,e.clone(),c);if(h=l(t.axisAreaWidths),d=t.visibility,u=t.clipSeries,{seriesRect:c}=t,p++>10){u8.warn("unable to find stable axis layout.");break}}while(!n(h,u,d))return this.axes.forEach(e=>{e.update()}),this.axes.forEach(t=>{if(t.setCrossLinesVisible(r.crossLines),c)switch(t.clipGrid(c.x,c.y,c.width+5,c.height+5),t.position){case"left":case"right":t.clipTickLines(e.x,c.y,e.width+5,c.height+5);break;case"top":case"bottom":t.clipTickLines(c.x,e.y,c.width+5,e.height+5)}}),this._lastAxisAreaWidths=i,this._lastVisibility=r,this._lastClipSeries=s,{seriesRect:c,visibility:r,clipSeries:s}}updateAxesPass(e,t,i){let s=new Map,r=new Map,a={series:!0,crossLines:!0},o=!1,n={},l=this.applySeriesPadding(t),h=i?this.buildCrossLinePadding(e):{},d=this.buildAxisBound(l,e,h,a),u=this.buildSeriesRect(d,e);for(let e of this.axes){var c;let{position:t="left"}=e,{clipSeries:i,axisThickness:a}=this.calculateAxisDimensions({axis:e,seriesRect:u,primaryTickCounts:n,clipSeries:o});s.set(e.id,a),r.has(t)||r.set(t,[]),null==(c=r.get(t))||c.push(e),o=o||i}let p=new Map,g=new Map;for(let[e,t]of r.entries()){let i="left"===e||"right"===e;p.set(e,this.calculateAxisArea(t,s,g,i))}for(let[e,t]of r.entries())this.positionAxes({axes:t,position:e,axisWidths:s,axisOffsets:g,axisAreaWidths:p,axisBound:d,seriesRect:u});return{clipSeries:o,seriesRect:u,axisAreaWidths:p,visibility:a}}buildCrossLinePadding(e){let t={};for(let[s,r=0]of(this.axes.forEach(e=>{var i;null==(i=e.crossLines)||i.forEach(e=>{var i;null==(i=e.calculatePadding)||i.call(e,t)})}),Object.entries(t))){var i;t[s]=Math.max(r-(null!=(i=e.get(s))?i:0),0)}return t}applySeriesPadding(e){let t=e.clone();return bh.forEach(e=>{let i=this.seriesArea.padding[e],s=this.axes.findLast(t=>t.position===e);s?s.seriesAreaPadding=i:t.shrink(i,e)}),t}buildAxisBound(e,t,i,s){var r,a,o,n;let l=e.clone(),{top:h=0,right:d=0,bottom:u=0,left:c=0}=i,p=c+d,g=h+u,m=(null!=(r=t.get("left"))?r:0)+(null!=(a=t.get("right"))?a:0)+p,v=(null!=(o=t.get("top"))?o:0)+(null!=(n=t.get("bottom"))?n:0)+g;return l.width<=m||l.height<=v?(s.crossLines=!1,s.series=!1):(l.x+=c,l.y+=h,l.width-=p,l.height-=g),l}buildSeriesRect(e,t){var i,s,r,a,o,n;let l=e.clone();return l.x+=null!=(i=t.get("left"))?i:0,l.y+=null!=(s=t.get("top"))?s:0,l.width-=(null!=(r=t.get("left"))?r:0)+(null!=(a=t.get("right"))?a:0),l.height-=(null!=(o=t.get("top"))?o:0)+(null!=(n=t.get("bottom"))?n:0),l.width=Math.max(0,l.width),l.height=Math.max(0,l.height),l}clampToOutsideSeriesRect(e,t,i,s){let{x:r,y:a,width:o,height:n}=e,l=[r,a,r+o,a+n][+("x"!==i)+2*(1!==s)];return(1===s?Math.min:Math.max)(t,l)}calculateAxisDimensions(e){let{axis:t,seriesRect:i,primaryTickCounts:s}=e,{clipSeries:r}=e,{position:a="left",direction:o}=t;this.sizeAxis(t,i,a);let n=this.getSyncedDomain(t),l=t.calculateLayout(n,t.nice?s[o]:void 0);return null!=s[o]||(s[o]=l.primaryTickCount),r||(r=t.dataDomain.clipped||t.visibleRange[0]>0||t.visibleRange[1]<1),{clipSeries:r,axisThickness:Math.ceil(null!=t.thickness&&t.thickness>0?t.thickness:"y"===o?l.bbox.width:l.bbox.height)}}getSyncedDomain(e){let t=this.modulesManager.getModule("sync");if(!(null!=t&&t.enabled))return;let i=t.getSyncedDomain(e);if(i&&e.dataDomain.domain.length){let s,{domain:r}=e.scale;if(p8.is(e.scale)){let[e,t]=cK(i);s=e!==r[0]||t!==r[1]}else s=!ge(i,r);s&&!this.skipSync&&t.updateSiblings()}return i}sizeAxis(e,t,i){let s=e instanceof f2||e instanceof f8,r="left"===i||"right"===i,{min:a,max:o}=this.ctx.zoomManager.getAxisZoom(e.id),{width:n,height:l}=t,h=r?l:n,d=0,u=h,{width:c,unit:p,align:g}=e.layoutConstraints;u="px"===p?d+c:u*c/100,"end"===g&&(d=h-(u-d),u=h),s&&r?[a,o]=[1-o,1-a]:r&&([d,u]=[u,d]),e.range=[d,u],e.visibleRange=[a,o],e.gridLength=r?n:l}calculateAxisArea(e,t,i,s){let{width:r,height:a,canvas:o}=this.ctx.scene,n=s?a%o.pixelRatio:r%o.pixelRatio,l=0;for(let s of e){var h;i.set(s.id,n);let e=null!=(h=t.get(s.id))?h:0;l=Math.max(l,n+e),s.layoutConstraints.stacked&&(n+=e+15)}return l}positionAxes(e){var t,i,s,r;let{axes:a,axisBound:o,axisWidths:n,axisOffsets:l,axisAreaWidths:h,seriesRect:d,position:u}=e,c=null!=(t=h.get(u))?t:0,p="x",g="y",m=1,v=0;for(let e of(("top"===u||"bottom"===u)&&(p="y",g="x",v+=1),v+=o[p],("right"===u||"bottom"===u)&&(m=-1,v+="x"===p?o.width:o.height),a)){let t=null!=(i=h.get("x"===g?"left":"top"))?i:0;e.translation[g]=o[g]+t;let a=null!=(s=n.get(e.id))?s:0,u=null!=(r=l.get(e.id))?r:0;e.translation[p]=this.clampToOutsideSeriesRect(d,v+m*(u+a),p,m),e.gridPadding=c-u-a,e.updatePosition()}}shouldFlipXY(){return this.series.every(e=>e instanceof bl&&e.shouldFlipXY())}};
206bd.className="CartesianChart",bd.type="cartesian";var bu=class e{constructor(e,t,i){this.factoryApi=t,this.licenseManager=i,this.chart=e}static isInstance(t){var i;return t instanceof e||(null==(i=t.constructor)?void 0:i.name)==="AgChartInstanceProxy"&&null!=t.chart||null!=t.chart&&this.validateImplementation(t)}static validateImplementation(e){var t;let i=Object.keys(null!=(t=Object.getPrototypeOf(e))?t:{});return["getOptions","destroy"].every(e=>i.includes(e))}async update(e){this.factoryApi.update(e,this),await this.chart.waitForUpdate()}async updateDelta(e){this.factoryApi.updateUserDelta(this,e),await this.chart.waitForUpdate()}getOptions(){let e=vG(this.chart.getOptions());for(let t in e)t.startsWith("_")&&delete e[t];return e}waitForUpdate(){return this.chart.waitForUpdate()}async download(e){let t=await this.prepareResizedChart(this,e);try{t.chart.download(null==e?void 0:e.fileName,null==e?void 0:e.fileFormat)}finally{t.destroy()}}async __toSVG(e){let t=await this.prepareResizedChart(this,{width:600,height:300,...e});try{return t.chart.toSVG()}finally{t.destroy()}}async getImageDataURL(e){let t=await this.prepareResizedChart(this,e);try{return t.chart.getCanvasDataURL(null==e?void 0:e.fileFormat)}finally{t.destroy()}}getState(){let{factoryApi:{caretaker:e},chart:{ctx:{annotationManager:t}}}=this;return e.save(t)}async setState(e){let{factoryApi:{caretaker:t},chart:{ctx:{annotationManager:i}}}=this;t.restore(e,i),await this.chart.waitForUpdate()}resetAnimations(){this.chart.resetAnimations()}skipAnimations(){this.chart.skipAnimations()}destroy(){this.chart.publicApi=void 0,this.chart.destroy()}async prepareResizedChart(e,t={}){var i,s,r,a,o;let{chart:n}=e,l=null!=(i=null!=(s=t.width)?s:n.width)?i:n.ctx.scene.canvas.width,h=null!=(r=null!=(a=t.height)?a:n.height)?r:n.ctx.scene.canvas.height,d=e.getState(),u=Ce.hasEnterpriseModules(),c={...n.chartOptions.processedOverrides,container:document.createElement("div"),width:l,height:h},p=n.getOptions();u&&(c.animation={enabled:!1},wp(p)&&(c.toolbar={enabled:!1}),null!=(o=this.licenseManager)&&o.isDisplayWatermark()&&(c.foreground={text:this.licenseManager.getWatermarkMessage(),image:{url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5I
206DMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=",width:170,height:25,right:25,bottom:50,opacity:.7}}));let g={...n.chartOptions.specialOverrides},m={...n.chartOptions.optionMetadata};null!=t.width&&null!=t.height&&(g.overrideDevicePixelRatio=1);let v=await this.factoryApi.create(p,c,g,m);
206return await v.setState(d),v.chart.ctx.zoomManager.updateZoom("chartProxy",n.ctx.zoomManager.getZoom()),n.series.forEach((e,t)=>{e.visible||(v.chart.series[t].visible=!1)}),v.chart.update(0,{forceNodeDataRefresh:!0}),await v.waitForUpdate(),v}};bu.chartInstances=new WeakMap,uQ([v$({oldValue(e){e.destroyed||(e.publicApi=void 0),bu.chartInstances.delete(e)},newValue(e){e.publicApi=this,bu.chartInstances.set(e,this)}})],bu.prototype,"chart",2);var bc=class extends f7{constructor(e){super(),this.ctx=e,this.localeText=void 0}};uQ([vY(e=>{e.ctx.localeManager.setLocaleText(e.localeText)}),gM(gA,{optional:!0})],bc.prototype,"localeText",2),uQ([vY(e=>{e.ctx.localeManager.setLocaleTextFormatter(e.getLocaleText)}),gM(gT,{optional:!0})],bc.prototype,"getLocaleText",2);var bp={type:"root",optionsKey:"locale",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new bc(e)},bg=class extends p8{constructor(){super([0,1],[0,1]),this.type="number"}toDomain(e){return e}ticks(){var e;let t=null!=(e=this.tickCount)?e:p8.defaultTickCount;if(!this.domain||this.domain.length<2||t<1||!this.domain.every(isFinite))return[];this.refresh();let[i,s]=this.getDomain();if(this.interval){let e=Math.abs(this.interval);if(!mN((s-i)/e,this.getPixelRange()))return mk(i,s,e)}return mR(i,s,t,this.minTickCount,this.maxTickCount)}update(){this.domain&&!(this.domain.length<2)&&this.nice&&this.updateNiceDomain()}getTickStep(e,t){var i;return null!=(i=this.interval)?i:mL(e,t,this.tickCount,this.minTickCount,this.maxTickCount)}updateNiceDomain(){let e=this.tickCount;if(e<1){this.niceDomain=[...this.domain];return}let[t,i]=this.domain;if(1===e)[t,i]=function(e,t){let i=Math.abs(t-e),s=10**Math.floor(Math.log10(i)),r=1/0,a=[e,t];for(let o of mI){let n=o*s,l=Math.floor(e/n)*n,h=Math.ceil(t/n)*n,d=1-i/Math.abs(h-l);r>d&&(r=d,a=[l,h])}return a}(t,i);else{let e=t>i?Math.ceil:Math.floor,s=i<t?Math.floor:Math.ceil;for(let r=0;r<4;r++){let r=t,a=i,o=this.getTickStep(t,i),[n,l]=this.domain;if(o>=1)t=e(n/o)*o,i=s(l/o)*o;else{let r=1/o;t=e(n*r)/r,i=s(l*r)/r}if(t===r&&i===a)break}}this.niceDomain=[t,i]}tickFormat({ticks:e,specifier:t}){return mP(null!=e?e:this.ticks(),t)}},bm=class extends f1{constructor(e,t=new bg){super(e,t),this.min=0/0,this.max=0/0}normaliseDataDomain(e){let{min:t,max:i}=this,{extent:s,clipped:r}=p9(e,t,i);return{domain:s,clipped:r}}updateSecondaryAxisTicks(e){if(null==this.dataDomain)throw Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(0===this.dataDomain.domain.length)return[];let{domain:t,ticks:i}=function(e,t,i){var s,r,a;let o,n,l,[h,d]=cK(e),u=(r=(o=Math.pow(10,Math.floor(Math.log10(Math.abs(d-(s=Math.floor(h)))/(t-1)))),h=Math.floor(s/o)*o),n=Math.pow(10,Math.floor(Math.log10(a=(d-r)/(t-1)))),(l=a/n*10)>0&&l<=1?n/10:l>1&&l<=2?2*n/10:l>1&&l<=5?5*n/10:l>5&&l<=10?10*n/10:l>10&&l<=20?20*n/10:l>20&&l<=40?40*n/10:l>40&&l<=50?50*n/10:l>50&&l<=100?100*n/10:l);return d=h+(t-1)*u,{domain:i?[d,h]:[h,d],ticks:function(e,t,i){let s=Math.floor(Math.log10(t)),r=Math.pow(10,t>0&&t<1?Math.abs(s):0),a=[];for(let s=0;s<i;s++){let i=e+t*s;a[s]=Math.round(i*r)/r}return a}(h,u,t)}}(this.dataDomain.domain,null!=e?e:0,this.reverse);return this.scale.nice=!1,this.scale.domain=t,this.scale.update(),i}};bm.className="NumberAxis",bm.type="number",uQ([gM(gD(gB,gj("max"))),fN(0/0)],bm.prototype,"min",2),uQ([gM(gD(gB,gW("min"))),fN(0/0)],bm.prototype,"max",2);var bv=ml(e=>pD(e)&&0!==e,"a non-zero number"),bf=class extends bm{constructor(e){super(e,new mO),this.min=0/0,this.max=0/0}normaliseDataDomain(e){let{min:t,max:i}=this,{extent:s,clipped:r}=p9(e,t,i),a=s[0]>s[1],o=s[0]<0&&s[1]>0,n=0===s[0]&&0===s[1];return(a||o||n)&&(o?u8.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):n&&u8.warn("the data domain has 0 extent, no data is rendered.")),0===s[0]&&(s[0]=1),0===s[1]&&(s[1]=-1),{domain:s,clipped:r}}set base(e){this.scale.base=e}get base(){return this.scale.base}};bf.className="LogAxis",bf.type="log",uQ([gM(gD(gB,bv,gj("max"))),fN(0/0)],bf.prototype,"min",2),uQ([gM(gD(gB,bv,gW("min"))),fN(0/0)],bf.prototype,"max",2);var bC=class extends f1{constructor(e){super(e,new mG),this.min=void 0,this.max=void 0}normaliseDataDomain(e){let{min:t,max:i}=this,s=!1;if("number"==typeof t&&(t=new Date(t)),"number"==typeof i&&(i=new Date(i)),e.length>2){var r,a;e=null!=(r=null==(a=p7(e))?void 0:a.map(e=>new Date(e)))?r:[]}return t instanceof Date&&(s||(s=t>e[0]),e=[t,e[1]]),i instanceof Date&&(s||(s=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{domain:e,clipped:s}}onFormatChange(e,t,i,s){s?super.onFormatChange(e,t,i,s):(this.labelFormatter=this.scale.tickFormat({ticks:e,domain:i}),this.datumFormatter=this.scale.tickFormat({ticks:e,domain:i,formatOffset:1}))}};
206bC.className="TimeAxis",bC.type="time",uQ([gM(gD(g_,gj("max")),{optional:!0})],bC.prototype,"min",2),uQ([gM(gD(g_,gW("min")),{optional:!0})],bC.prototype,"max",2);var by=(e,{x0:t,y0:i,x1:s,y1:r,cx:a,cy:o},n,l)=>{if(l&&e.moveTo(t,i),t!==s||i!==r){let l=Math.atan2(i-o,t-a),h=Math.atan2(r-o,s-a);e.arc(a,o,n,l,h)}else e.lineTo(t,i)},bw=(e,t,i,s,r)=>{let a=!1,o=!1,n=s-Math.sqrt(Math.max(r**2-i**2,0)),l=0,h=0,d=i-Math.sqrt(Math.max(r**2-s**2,0));return n>e?(a=!0,n=e,l=i-Math.sqrt(Math.max(r**2-(s-e)**2))):n<1e-6&&(n=0),d>t?(o=!0,h=s-Math.sqrt(Math.max(r**2-(i-t)**2)),d=t):d<1e-6&&(d=0),{leading0:n,leading1:l,trailing0:h,trailing1:d,leadingClipped:a,trailingClipped:o}},bb=(e,t,i,s,r,a,o)=>{let n,l,h,d,{topLeft:u,topRight:c,bottomRight:p,bottomLeft:g}=a,m=Math.max(u+g,c+p),v=Math.max(u+c,g+p);if(m<=0&&v<=0)return void(null==o?e.rect(t,i,s,r):e.rect(o.x,o.y,o.width,o.height));if(null==o&&u===c&&u===p&&u===g)return void e.roundRect(t,i,s,r,u);if(s<0&&(t+=s,s=Math.abs(s)),r<0&&(i+=r,r=Math.abs(r)),s<=0||r<=0)return;if(null==o)o=new c4(t,i,s,r);else{let e=Math.max(t,o.x),a=Math.min(t+s,o.x+o.width),n=Math.max(i,o.y);o=new c4(e,n,a-e,Math.min(i+r,o.y+o.height)-n)}let f=Math.max(m/r,v/s,1);f>1&&(u/=f,c/=f,p/=f,g/=f);let C=!0,y=!0,w=!0,b=!0;{let e=bw(o.height,o.width,Math.max(t+u-o.x,0),Math.max(i+u-o.y,0),u);e.leadingClipped&&(b=!1),e.trailingClipped&&(y=!1);let s=Math.max(o.x+e.leading1,o.x),r=Math.max(o.y+e.leading0,o.y),a=Math.max(o.x+e.trailing1,o.x),l=Math.max(o.y+e.trailing0,o.y);n={x0:s,y0:r,x1:a,y1:l,cx:t+u,cy:i+u}}if(y){let e=bw(o.width,o.height,Math.max(i+c-o.y,0),Math.max(o.x+o.width-(t+s-c),0),c);e.leadingClipped&&(C=!1),e.trailingClipped&&(w=!1);let r=Math.min(o.x+o.width-e.leading0,o.x+o.width),a=Math.max(o.y+e.leading1,o.y),n=Math.min(o.x+o.width-e.trailing0,o.x+o.width),h=Math.max(o.y+e.trailing1,o.y);l={x0:r,y0:a,x1:n,y1:h,cx:t+s-c,cy:i+c}}if(w){let e=bw(o.height,o.width,Math.max(o.x+o.width-(t+s-p),0),Math.max(o.y+o.height-(i+r-p),0),p);e.leadingClipped&&(y=!1),e.trailingClipped&&(b=!1);let a=Math.min(o.x+o.width-e.leading1,o.x+o.width),n=Math.min(o.y+o.height-e.leading0,o.y+o.height),l=Math.min(o.x+o.width-e.trailing1,o.x+o.width),d=Math.min(o.y+o.height-e.trailing0,o.y+o.height);h={x0:a,y0:n,x1:l,y1:d,cx:t+s-p,cy:i+r-p}}if(b){let e=bw(o.width,o.height,Math.max(o.y+o.height-(i+r-g),0),Math.max(t+g-o.x,0),g);e.leadingClipped&&(w=!1),e.trailingClipped&&(C=!1);let s=Math.max(o.x+e.leading0,o.x),a=Math.min(o.y+o.height-e.leading1,o.y+o.height),n=Math.max(o.x+e.trailing0,o.x),l=Math.min(o.y+o.height-e.trailing1,o.y+o.height);d={x0:s,y0:a,x1:n,y1:l,cx:t+g,cy:i+r-g}}let S=!1;C&&null!=n&&(by(e,n,u,!S),S||(S=!0)),y&&null!=l&&(by(e,l,c,!S),S||(S=!0)),w&&null!=h&&(by(e,h,p,!S),S||(S=!0)),b&&null!=d&&(by(e,d,g,!S),S||(S=!0)),e.closePath()},bS=class extends Cq{constructor(){super(...arguments),this.borderPath=new CK,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=vb.defaultStyles.strokeWidth,this.effectiveStrokeWidth=vb.defaultStyles.strokeWidth,this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint,this.microPixelEffectOpacity=1}set cornerRadius(e){this.topLeftCornerRadius=e,this.topRightCornerRadius=e,this.bottomRightCornerRadius=e,this.bottomLeftCornerRadius=e}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){var e,t,i,s;let{path:r,borderPath:a,crisp:o,topLeftCornerRadius:n,topRightCornerRadius:l,bottomRightCornerRadius:h,bottomLeftCornerRadius:d}=this,{x:u,y:c,width:p,height:g,strokeWidth:m,clipBBox:v}=this,f=1/(null!=(e=null==(t=this.layerManager)?void 0:t.canvas.pixelRatio)?e:1),C=1;if(r.clear(!0),a.clear(!0),o&&(p<=f&&(C*=p/f),g<=f&&(C*=g/f),p=this.align(u,p),g=this.align(c,g),u=this.align(u),c=this.align(c),v=null!=v?new c4(this.align(v.x),this.align(v.y),this.align(v.x,v.width),this.align(v.y,v.height)):void 0),m)if(p<f){let e=u+f/2;a.moveTo(e,c),a.lineTo(e,c+g),m=f,this.borderClipPath=void 0}else if(g<f){let e=c+f/2;a.moveTo(u,e),a.lineTo(u+p,e),m=f,this.borderClipPath=void 0}else if(m<p&&m<g){let e=m/2;u+=e,c+=e,p-=m,g-=m;let t=null==(i=v)?void 0:i.clone().shrink(e),s={topLeft:n>0?n-m:0,topRight:l>0?l-m:0,bottomRight:h>0?h-m:0,bottomLeft:d>0?d-m:0};this.borderClipPath=void 0,p>0&&g>0&&(null==t||(null==t?void 0:t.width)>0&&(null==t?void 0:t.height)>0)&&(bb(r,u,c,p,g,s,t),bb(a,u,c,p,g,s,t))}else this.borderClipPath=null!=(s=this.borderClipPath)?s:new CK,this.borderClipPath.clear(!0),this.borderClipPath.rect(u,c,p,g),a.rect(u,c,p,g);else this.borderClipPath=void 0,bb(r,u,c,p,g,{topLeft:n,topRight:l,bottomRight:h,bottomLeft:d},v);if([n,l,h,d].every(e=>0===e)){let e=this.getBBox();this.hittester=e.containsPoint.bind(e),this.distanceSquared=(e,t)=>this.getBBox().distanceSquared(e,t)}else this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint;this.effectiveStrokeWidth=m,this.lastUpdatePathStrokeWidth=m,this.microPixelEffectOpacity=C}computeBBox(){var e;let{x:t,y:i,width:s,height:r,clipBBox:a}=this;return null!=(e=null==a?void 0:a.clone())?e:new c4(t,i,s,r)}isPointInPath(e,t){return this.hittester(e,t)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(e,t){return this.distanceCalculator(e,t)}applyFillAlpha(e){let{fillOpacity:t,microPixelEffectOpacity:i,opacity:s}=this;e.globalAlpha*=s*t*i}renderStroke(e){let{stroke:t,effectiveStrokeWidth:i}=this;if(t&&i){let{globalAlpha:s}=e,{strokeOpacity:r,lineDash:a,lineDashOffset:o,lineCap:n,lineJoin:l,borderPath:h,borderClipPath:d,opacity:u,microPixelEffectOpacity:c}=this;d&&e.clip(d.getPath2D()),e.strokeStyle=t,e.globalAlpha*=u*r*c,e.lineWidth=i,a&&e.setLineDash(a),o&&(e.lineDashOffset=o),n&&(e.lineCap=n),l&&(e.lineJoin=l),e.stroke(h.getPath2D()),e.globalAlpha=s}}};bS.className="Rect",uQ([CZ()],bS.prototype,"x",2),uQ([CZ()],bS.prototype,"y",2),uQ([CZ()],bS.prototype,"width",2),uQ([CZ()],bS.prototype,"height",2),uQ([CZ()],bS.prototype,"topLeftCornerRadius",2),uQ([CZ()],bS.prototype,"topRightCornerRadius",2),uQ([CZ()],bS.prototype,"bottomRightCornerRadius",2),uQ([CZ()],bS.prototype,"bottomLeftCornerRadius",2),uQ([CZ()],bS.prototype,"clipBBox",2),uQ([CZ()],bS.prototype,"crisp",2);var bx=class extends f7{constructor(e){super(),this.ctx=e,this.rectNode=new bS,this.textNode=new vR,this.fill="white",this.node=this.createNode(),this.node.append([this.rectNode,this.textNode]),this.visible=!0,this.destroyFns.push(e.scene.attachNode(this.node),e.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)))}createNode(){return new m1({name:"background",zIndex:0})}onLayoutComplete(e){let{width:t,height:i}=e.chart;this.rectNode.width=t,this.rectNode.height=i}};uQ([gM(gR),v_("node","visible")],bx.prototype,"visible",2),uQ([gM(gY,{optional:!0}),v_("rectNode","fill")],bx.prototype,"fill",2),uQ([gM(gI,{optional:!0})],bx.prototype,"image",2),uQ([gM(gL,{optional:!0}),v_("textNode")],bx.prototype,"text",2);var bM={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new bx(e)},bD=class extends pe{constructor(e){super(),this.sourceImage=e,this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1}updateBitmap(e,t,i,s){this.sourceImage=e,this.width=e.width/t,this.height=e.height/t,this.x=i/t,this.y=s/t,this.markDirty(3)}render(e){let{ctx:t,forceRender:i,stats:s}=e;if(0===this.dirty&&!i){s&&s.nodesSkipped++;return}let r=this.sourceImage;r&&(t.globalAlpha=this.opacity,t.drawImage(r,0,0,r.width,r.height,this.x,this.y,this.width,this.height),super.render(e))}};uQ([c5({redraw:3})],bD.prototype,"x",2),uQ([c5({redraw:3})],bD.prototype,"y",2),uQ([c5({redraw:3})],bD.prototype,"width",2),uQ([c5({redraw:3})],bD.prototype,"height",2),uQ([c5({redraw:3})],bD.prototype,"opacity",2);var bE=class extends mX(m1){constructor(){super({name:"markerLabelGroup"}),this.label=new vR,this.symbolsGroup=new m1({name:"legend-markerLabel-symbols"}),this.bitmap=new bD,this.bitmapDirty=!0,this.enabled=!0,this.pageIndex=0/0,this._markers=[],this._lines=[];let{markers:e,label:t,lines:i}=this;t.textBaseline="middle",t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.y=1,this.updateSymbols(e,i),this.append([this.symbolsGroup,t])}destroy(){super.destroy(),this.destroyProxyButton()}destroyProxyButton(){var e,t;null==(e=this.proxyButton)||e.button.remove(),null==(t=this.proxyButton)||t.listitem.remove(),this.proxyButton=void 0}get markers(){return this._markers}get lines(){return this._lines}updateSymbols(e,t){ge(this._markers,e)&&ge(this._lines,t)||(this.bitmapDirty=!0,this._markers=e,this._lines=t,this.symbolsGroup.clear(),this.symbolsGroup.append([this.bitmap,...t,...e]))}setEnabled(e){this.enabled=e,this.refreshVisibilities()}refreshVisibilities(){let e=this.enabled?1:.5;
206this.label.opacity=e,this.opacity=e,this.bitmap.opacity=e,this.setBitmapVisibility(!this.enabled)}setBitmapVisibility(e){let{lines:t,markers:i}=this;[t,i].forEach(t=>t.forEach(t=>t.visible=!e)),this.bitmap.visible=e}update(e,{spriteAAPadding:t,spritePixelRatio:i},s){var r,a,o,n,l,h,d;let{markers:u,lines:c}=this,p=0,g=0,m=0;for(let e=0;e<Math.max(u.length,c.length);e++){let{length:t,spacing:i,isCustomMarker:r}=null!=(h=s[e])?h:0,a=u[e],o=c[e],n=null!=(d=null==a?void 0:a.size)?d:0,l=1/0,v=1/0,f=1/0,C=1/0,y=1/0;if(a){let e=a.constructor.center,i=(n+a.strokeWidth)/2;r?(a.x=0,a.y=0,a.translationX=(e.x-.5)*n+t/2+m,a.translationY=(e.y-.5)*n,C=a.translationY-i,y=a.translationX-i):(a.x=(e.x-.5)*n+t/2+m,a.y=(e.y-.5)*n,C=a.y-i,y=a.x-i)}o&&(o.x1=m,o.x2=m+t,o.y1=0,o.y2=0,o.markDirty(3),l=-o.strokeWidth/2,v=o.x1,f=o.x2),m+=i+Math.max(t,n),p=Math.min(p,v,f,y),g=Math.min(g,l,C)}let v=s.at(-1),f=this.lines.at(-1),C=this.markers.at(-1),y=f?f.x2:-1/0,w=(null!=(r=null==C?void 0:C.x)?r:0)+(null!=(a=null==C?void 0:C.size)?a:0)/2;if(this.label.x=Math.max(y,w)+(null!=(o=null==v?void 0:v.spacing)?o:0),this.bitmapDirty){this.setBitmapVisibility(!1);let s=(t+p)*i,r=(t-g)*i,a=e.renderSprite(this.symbolsGroup,{scale:i,translateX:Math.floor(s),translateY:Math.floor(r)});this.bitmap.updateBitmap(a,i,Math.ceil(-s),Math.ceil(-r)),this.bitmapDirty=!1,this.refreshVisibilities()}if(s.length<2)return;let b=this.symbolsGroup.getBBox(),S=Math.max(null!=(n=null==C?void 0:C.size)?n:0,null!=(l=null==v?void 0:v.length)?l:0),x=new c4(b.x+S/2,b.y,S,b.height);this.symbolsGroup.setClipRect(x)}computeBBox(){let{label:e,lines:t,markers:i}=this;return this.toParent(m1.computeChildrenBBox(cA([e],t,i),!1))}};bE.className="MarkerLabel",uQ([v_("label")],bE.prototype,"text",2),uQ([v_("label")],bE.prototype,"fontStyle",2),uQ([v_("label")],bE.prototype,"fontWeight",2),uQ([v_("label")],bE.prototype,"fontSize",2),uQ([v_("label")],bE.prototype,"fontFamily",2),uQ([v_("label","fill")],bE.prototype,"color",2);var bI=class extends gb{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};uQ([gM(gY)],bI.prototype,"color",2),uQ([gM(g6,{optional:!0})],bI.prototype,"fontStyle",2),uQ([gM(g5,{optional:!0})],bI.prototype,"fontWeight",2),uQ([gM(gN)],bI.prototype,"fontSize",2),uQ([gM(gL)],bI.prototype,"fontFamily",2);var bA=class extends gb{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};uQ([gM(gN)],bA.prototype,"size",2),uQ([gM(gY,{optional:!0})],bA.prototype,"fill",2),uQ([gM(gO,{optional:!0})],bA.prototype,"fillOpacity",2),uQ([gM(gY,{optional:!0})],bA.prototype,"stroke",2),uQ([gM(gN)],bA.prototype,"strokeWidth",2),uQ([gM(gO)],bA.prototype,"strokeOpacity",2);var bR=class extends gb{constructor(e){super(),this.parent=e,this.shape=w2,this.size=15,this.padding=8}};uQ([v$({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],bR.prototype,"shape",2),uQ([gM(gN)],bR.prototype,"size",2),uQ([gM(gN)],bR.prototype,"padding",2);var bT=class extends gb{constructor(e,t){super(),this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.id=cE(this),this.marker=new bR(this),this.activeStyle=new bA,this.inactiveStyle=new bA,this.highlightStyle=new bA,this.label=new bI,this.group=new m4({name:"pagination"}),this.labelNode=new vR,this.destroyFns=[],this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this._nextButton=new w2,this._previousButton=new w2,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]),this.update(),this.updateMarkers()}destroy(){this.destroyFns.forEach(e=>e())}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(e){this._orientation=e,"horizontal"===e?(this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2):(this.previousButton.rotation=0,this.nextButton.rotation=Math.PI)}get orientation(){return this._orientation}set nextButton(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))}get nextButton(){return this._nextButton}set previousButton(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))}get previousButton(){return this._previousButton}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){let{size:e,padding:t}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+t}updateNextButtonPosition(){let e=this.labelNode.getBBox();this.nextButton.translationX=e.width+(this.marker.size/2+this.marker.padding)*2}updateLabel(){let{currentPage:e,totalPages:t,labelNode:i,label:{color:s,fontStyle:r,fontWeight:a,fontSize:o,fontFamily:n}}=this;i.text=`${e+1} / ${t}`,i.fill=s,i.fontStyle=r,i.fontWeight=a,i.fontSize=o,i.fontFamily=n}updateMarkers(){let{nextButton:e,previousButton:t,nextButtonDisabled:i,previousButtonDisabled:s,activeStyle:r,inactiveStyle:a,highlightStyle:o,highlightActive:n}=this,l=(e,t)=>
206t?a:e===n?o:r;this.updateMarker(e,l("next",i)),this.updateMarker(t,l("previous",s))}updateMarker(e,t){var i;let{size:s}=this.marker;e.size=s,e.fill=t.fill,e.fillOpacity=null!=(i=t.fillOpacity)?i:1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}enableOrDisableButtons(){let{currentPage:e,totalPages:t}=this,i=0===t;this.nextButtonDisabled=e===t-1||i,this.previousButtonDisabled=0===e||i}setPage(e){e=c$(0,e,this.totalPages-1),this.currentPage!==e&&(this.currentPage=e,this.onPaginationChanged())}getCursor(e){return({previous:this.previousButtonDisabled,next:this.nextButtonDisabled})[e]?void 0:"pointer"}onClick(e,t){e.preventDefault(),"next"!==t||this.nextButtonDisabled?"previous"!==t||this.previousButtonDisabled||(this.decrementPage(),this.onPaginationChanged()):(this.incrementPage(),this.onPaginationChanged())}onMouseHover(e){this.highlightActive=e,this.updateMarkers(),this.chartUpdateCallback(6)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){let e=mq(w5(this.marker.shape||w2));this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(6)}attachPagination(e){e.append(this.group)}getBBox(){return this.group.getBBox()}computeCSSBounds(){return{prev:mJ.toCanvas(this.previousButton),next:mJ.toCanvas(this.nextButton)}}};bT.className="Pagination",uQ([gM(gI)],bT.prototype,"marker",2),uQ([gM(gI)],bT.prototype,"activeStyle",2),uQ([gM(gI)],bT.prototype,"inactiveStyle",2),uQ([gM(gI)],bT.prototype,"highlightStyle",2),uQ([gM(gI)],bT.prototype,"label",2);var bL=class extends gb{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};uQ([gM(gN,{optional:!0})],bL.prototype,"maxLength",2),uQ([gM(gY)],bL.prototype,"color",2),uQ([gM(g6,{optional:!0})],bL.prototype,"fontStyle",2),uQ([gM(g5,{optional:!0})],bL.prototype,"fontWeight",2),uQ([gM(gN)],bL.prototype,"fontSize",2),uQ([gM(gL)],bL.prototype,"fontFamily",2),uQ([gM(gT,{optional:!0})],bL.prototype,"formatter",2);var bF=class extends gb{constructor(){super(...arguments),this.size=15,this.padding=8}};uQ([vY(e=>{var t;return null==(t=e.parent)?void 0:t.onMarkerShapeChange()})],bF.prototype,"shape",2),uQ([gM(gN)],bF.prototype,"size",2),uQ([gM(gN)],bF.prototype,"padding",2),uQ([gM(gN,{optional:!0})],bF.prototype,"strokeWidth",2),uQ([gM(gR)],bF.prototype,"enabled",2);var bP=class extends gb{};uQ([gM(gN,{optional:!0})],bP.prototype,"strokeWidth",2),uQ([gM(gN,{optional:!0})],bP.prototype,"length",2);var bk=class extends gb{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.showSeriesStroke=!1,this.marker=new bF,this.label=new bL,this.line=new bP}};uQ([gM(gN,{optional:!0})],bk.prototype,"maxWidth",2),uQ([gM(gN)],bk.prototype,"paddingX",2),uQ([gM(gN)],bk.prototype,"paddingY",2),uQ([gM(gR)],bk.prototype,"showSeriesStroke",2),uQ([gM(gI)],bk.prototype,"marker",2),uQ([gM(gI)],bk.prototype,"label",2),uQ([gM(gI)],bk.prototype,"line",2);var bN=class extends gb{};uQ([gM(gT,{optional:!0})],bN.prototype,"legendItemClick",2),uQ([gM(gT,{optional:!0})],bN.prototype,"legendItemDoubleClick",2);var bO="legend-visibility",bG="legend-other-series",bB=class{constructor(e,t,i,s,r){this.type=e,this.enabled=t,this.itemId=i,this.seriesId=s,this.event=r,this.defaultPrevented=!1}preventDefault(){this.defaultPrevented=!0}},bz=class extends gb{constructor(e){super(),this.ctx=e,this.id=cE(this),this.group=new fs({name:"legend",zIndex:15}),this.itemSelection=m7.select(this.group,bE),this.spriteRenderer=void 0,this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this._symbolsDirty=!0,this.toggleSeries=!0,this.item=new bk,this.listeners=new bN,this.enabled=!0,this.position="bottom",this.spacing=20,this.destroyFns=[],this.proxyLegendDirty=!0,this.proxyLegendToolbarDestroyFns=new Cg,this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new bT(t=>e.updateService.update(t),e=>this.updatePageNumber(e)),this.pagination.attachPagination(this.group),this.destroyFns.push(e.contextMenuRegistry.registerDefaultAction({id:bO,type:"legend",label:"contextMenuToggleSeriesVisibility",action:e=>this.contextToggleVisibility(e)}),e.contextMenuRegistry.registerDefaultAction({id:bG,type:"legend",label:"contextMenuToggleOtherSeries",action:e=>this.contextToggleOtherSeries(e)})),this.destroyFns.push(e.layoutManager.registerElement(1,e=>this.positionLegend(e)),e.localeManager.addListener("locale-changed",()=>this.onLocaleChanged()),()=>this.group.remove()),this.proxyLegendToolbar=this.ctx.proxyInteractionService.createProxyContainer({type:"list",id:`${this.id}-toolbar`,classList:["ag-charts-proxy-legend-toolbar"],ariaLabel:{id:"ariaLabelLegend"},ariaHidden:!0}),this.proxyLegendPagination=this.ctx.proxyInteractionService.createProxyContainer({type:"group",id:`${this.id}-pagination`,classList:["ag-charts-proxy-legend-pagination"],ariaLabel:{id:"ariaLabelLegendPagination"},ariaOrientation:"horizontal",ariaHidden:!0}),this.proxyLegendItemDescription=cG("p"),this.proxyLegendItemDescription.style.display="none",this.proxyLegendItemDescription.id=`${this.id}-ariaDescription`,this.proxyLegendItemDescription.textContent=this.getItemAriaDescription(),this.proxyLegendToolbar.append(this.proxyLegendItemDescription)}set data(e){this.onDataUpdate(this._data,e),this._data=e,this._symbolsDirty=!0,this.updateGroupVisibility()}get data(){return this._data}destroy(){this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-toolbar`),this.ctx.domManager.removeChild("canvas-overlay",`${this.id}
206-pagination`),this.destroyFns.forEach(e=>e()),this.pagination.destroy(),this.itemSelection.clear(),this.proxyLegendToolbarDestroyFns.destroy()}initLegendItemToolbar(){if(!this.proxyLegendDirty)return;this.itemSelection.each((e,t,i)=>{e.destroyProxyButton(),null!=e.proxyButton||(e.proxyButton=this.ctx.proxyInteractionService.createProxyElement({type:"listswitch",id:`ag-charts-legend-item-${i}`,textContent:this.getItemAriaText(i),ariaChecked:!!e.datum.enabled,ariaDescribedBy:this.proxyLegendItemDescription.id,parent:this.proxyLegendToolbar,onclick:t=>this.onClick(t,e.datum,e.proxyButton.button),ondblclick:t=>this.onDoubleClick(t,e.datum),onmouseenter:t=>this.onHover(t,e),onmouseleave:()=>this.onLeave(),oncontextmenu:t=>this.onContextClick(t,e),onblur:()=>this.onLeave(),onfocus:t=>this.onHover(t,e)}))});let e=this.itemSelection.nodes().map(e=>{var t;return null==(t=e.proxyButton)?void 0:t.button}).filter(pg);this.proxyLegendToolbarDestroyFns.setFns([...CA({orientation:"horizontal",buttons:e}),...CA({orientation:"vertical",buttons:e})]),this.proxyLegendToolbar.ariaHidden=(0===e.length).toString(),this.proxyLegendDirty=!1}onDataUpdate(e,t){this.proxyLegendDirty=e.length!==t.length||e.some((i,s,r)=>{let[a,o]=[t[s],e[s]];return a.id!==o.id})}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(2)}getOrientation(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(e){e.appendChild(this.group)}getItemLabel(e){let{ctx:{callbackCache:t}}=this,{formatter:i}=this.item.label;return i?t.call(i,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId}):e.label.text}calcLayout(e,t){let{paddingX:i,paddingY:s,label:r,maxWidth:a,label:{maxLength:o=1/0,fontStyle:n,fontWeight:l,fontSize:h,fontFamily:d}}=this.item,u=[...this.data];this.reverseOrder&&u.reverse(),this.itemSelection.update(u),this.initLegendItemToolbar();let c=[],p=vE.toFontString(r),g=null!=a?a:.8*e,m=this.calculateSpriteDimensions();if(null!=this.spriteRenderer||(this.spriteRenderer=new C7),this.spriteRenderer.resize(m),this.itemSelection.each((e,t)=>{var i;e.fontStyle=n,e.fontWeight=l,e.fontSize=h,e.fontFamily=d;let s=this.updateMarkerLabel(this.spriteRenderer,e,t,m),r=null!=(i=t.itemId)?i:t.id,a=this.getItemLabel(t),u=(null!=a?a:"<unknown>").replace(/\r?\n/g," ");e.text=this.truncate(u,o,g,s,p,r),c.push(e.getBBox())}),this._symbolsDirty=!1,e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return{};let v=this.size,f=this.oldSize;v[0]=e,v[1]=t,(v[0]!==f[0]||v[1]!==f[1])&&(f[0]=v[0],f[1]=v[1]);let{pages:C,maxPageHeight:y,maxPageWidth:w}=this.updatePagination(c,e,t),b=this.pages;this.pages=C,this.maxPageSize=[w-i,y-s];let S=this.pagination.currentPage,x=this.pages[S];return this.pages.length<1||!x?this.visible=!1:(this.visible=!0,this.updatePositions(S),this.update()),{oldPages:b}}isCustomMarker(e,t){return e&&void 0!==t&&"string"!=typeof t}calcSymbolsEnabled(e){var t;let{showSeriesStroke:i,marker:s}=this.item,r=!!s.enabled||!i||null==(t=e.marker.enabled)||t,a=!!(e.line&&i),o=this.isCustomMarker(r,e.marker.shape);return{markerEnabled:r,lineEnabled:a,isCustomMarker:o}}calcSymbolsLengths(e){var t;let i,{marker:s,line:r}=this.item,{markerEnabled:a,lineEnabled:o}=this.calcSymbolsEnabled(e),{strokeWidth:n}=this.getMarkerStyles(e),{strokeWidth:l}=o?this.getLineStyles(e):{strokeWidth:0},{shape:h}=e.marker;if(this.isCustomMarker(a,h)){let e=new h;e.updatePath();let t=e.getBBox();i=Math.max(t.width,t.height)}return{markerLength:a?s.size:0,markerStrokeWidth:n,lineLength:o?null!=(t=r.length)?t:25:0,lineStrokeWidth:l,customMarkerSize:i}}calculateSpriteDimensions(){let e=0,t=0,i=0,s=0;return this.itemSelection.each((r,a)=>{a.symbols.forEach(r=>{let{markerLength:a,markerStrokeWidth:o,lineLength:n,lineStrokeWidth:l,customMarkerSize:h=-1/0}=this.calcSymbolsLengths(r),d=a+o;s=Math.max(s,n,h,a),t=Math.max(t,n,h,d),i=Math.max(i,l,d),e=Math.max(e,o+.5)})}),t+=2*e,i+=2*e,{spritePixelRatio:cO().devicePixelRatio,spriteAAPadding:e,spriteWidth:t,spriteHeight:i,markerWidth:s}}updateMarkerLabel(e,t,i,s){let{marker:r,paddingX:a}=this.item,{markerWidth:o}=s,n=[],l=a;if(this._symbolsDirty){let e=[],s=[];
206i.symbols.forEach(t=>{let{shape:i=t.marker.shape}=r,a=w5(i);s.push(new vS({zIndex:0})),e.push(new a({zIndex:1}))}),t.updateSymbols(e,s)}return i.symbols.forEach((e,i)=>{var s;let a=null!=(s=e.marker.padding)?s:r.padding,{markerEnabled:h,lineEnabled:d,isCustomMarker:u}=this.calcSymbolsEnabled(e);t.markers[i].size=h||!d?r.size:0,n.push({length:o,spacing:a,isCustomMarker:u}),(h||d)&&(l+=a+o);let c=t.markers[i],p=t.lines[i];if(c){let{strokeWidth:t,fill:i,stroke:s,fillOpacity:r,strokeOpacity:a}=this.getMarkerStyles(e);c.fill=i,c.stroke=s,c.strokeWidth=t,c.fillOpacity=r,c.strokeOpacity=a}if(p){let t=this.getLineStyles(e);p.stroke=t.stroke,p.strokeOpacity=t.strokeOpacity,p.strokeWidth=t.strokeWidth,p.lineDash=t.lineDash}}),t.update(e,s,n),l}truncate(e,t,i,s,r,a){let o=!1;e.length>t&&(e=e.substring(0,t),o=!0);let n=vM.getMeasurer({font:r}),l=vQ.truncateLine(e,n,i-s,o);return l.endsWith(vE.EllipsisChar)?this.truncatedItems.add(a):this.truncatedItems.delete(a),l}updatePagination(e,t,i){let s=this.getOrientation(),r=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=s,this.pagination.translationX=0,this.pagination.translationY=0;let{pages:a,maxPageHeight:o,maxPageWidth:n,paginationBBox:l,paginationVertical:h}=this.calculatePagination(e,t,i),d=a.findIndex(e=>e.endIndex>=r);this.pagination.currentPage=c$(0,d,a.length-1);let{paddingX:u,paddingY:c}=this.item,p=o-c,g=0,m=-l.y-this.item.marker.size/2;h?m+=p+8:(g+=-l.x+(n-u)+8,m+=(p-l.height)/2),this.pagination.translationX=g,this.pagination.translationY=m,this.pagination.update(),this.pagination.updateMarkers();let v=0;return this.itemSelection.each((e,t,i)=>{var s,r;i>(null!=(s=null==(r=a[v])?void 0:r.endIndex)?s:1/0)&&v++,e.pageIndex=v}),{maxPageHeight:o,maxPageWidth:n,pages:a}}updateItemProxyButtons(){let e=this.toggleSeries?"pointer":void 0,t=Math.max(...this.itemSelection.nodes().map(e=>e.getBBox().height));this.itemSelection.each(i=>{if(i.proxyButton){let{listitem:s,button:r}=i.proxyButton,a=i.pageIndex===this.pagination.currentPage,o=mJ.toCanvas(i);if(o.height!==t){let e=(t-o.height)/2;o={x:o.x,y:o.y-e,height:t,width:o.width}}v2(r,"pointer-events",a?"auto":"none"),v2(r,"cursor",e),cj(s,o)}})}updatePaginationProxyButtons(e){var t,i,s;this.proxyLegendPagination.style.display=this.pagination.visible?"block":"none";let r=(null!=(t=null==e?void 0:e.length)?t:this.pages.length)>1,a=this.pages.length>1;r!==a&&(a?(this.proxyPrevButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`${this.id}-prev-page`,textContent:{id:"ariaLabelLegendPagePrevious"},tabIndex:0,parent:this.proxyLegendPagination,onclick:e=>this.pagination.onClick(e,"previous"),onmouseenter:()=>this.pagination.onMouseHover("previous"),onmouseleave:()=>this.pagination.onMouseHover(void 0)}),null!=this.proxyNextButton||(this.proxyNextButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`${this.id}-next-page`,textContent:{id:"ariaLabelLegendPageNext"},tabIndex:0,parent:this.proxyLegendPagination,onclick:e=>this.pagination.onClick(e,"next"),onmouseenter:()=>this.pagination.onMouseHover("next"),onmouseleave:()=>this.pagination.onMouseHover(void 0)})),this.proxyLegendPagination.ariaHidden="false"):(null==(i=this.proxyNextButton)||i.remove(),null==(s=this.proxyPrevButton)||s.remove(),[this.proxyNextButton,this.proxyPrevButton]=[void 0,void 0],this.proxyLegendPagination.ariaHidden="true"));let{prev:o,next:n}=this.pagination.computeCSSBounds();cj(this.proxyPrevButton,o),cj(this.proxyNextButton,n),v2(this.proxyNextButton,"cursor",this.pagination.getCursor("next")),v2(this.proxyPrevButton,"cursor",this.pagination.getCursor("previous"))}calculatePagination(e,t,i){let{paddingX:s,paddingY:r}=this.item,a=this.getOrientation(),o=["left","right"].includes(this.position),n=this.pagination.getBBox(),l=new c4(0,0,0,0),h=[],d=0,u=0,c=0,p=e=>e.width===n.width&&e.height===n.height,g=void 0!==this.maxWidth&&void 0!==this.maxHeight;do{var m,v,f;if(c++>10){u8.warn("unable to find stable legend layout.");break}n=l;let p=t-(o?0:n.width),C=function({orientation:e,bboxes:t,maxHeight:i,maxWidth:s,itemPaddingY:r=0,itemPaddingX:a=0,forceResult:o=!1}){let n="horizontal"===e,l={max:n?s:i,fn:n?e=>e.width:e=>e.height,padding:n?a:r},h={max:n?i:s,fn:n?e=>e.height:e=>e.width,padding:n?r:a},d=0,u=[];for(;d<t.length;){let e=function(e,t,i,s,r){let a=function(e,t){let i=e.length,s=0;for(let r=0;r<i;r++)if((s+=t.fn(e[r])+t.padding)>t.max){if(i/r<2)return Math.ceil(i/2);return r}return i}(e,i);if(a<1){if(!r)return;a=1}let o=a;for(;o>=1;){let a=function(e,t,i,s,r,a){let o=[],n=0,l=0,h=[],d=[];for(let c=0;c<e.length;c++){var u;let p=(c+i)%i;0===p&&(n+=l,l=0,h.length>0&&o.push(h),h=[]);let g=s.fn(e[c])+s.padding;d[p]=Math.max(null!=(u=d[p])?u:0,g);let m=n+(l=Math.max(l,r.fn(e[c])+r.padding)),v=!a||o.length>0;if(m>r.max&&v){h=[];break}if(d.reduce((e,t)=>
206e+t,0)>s.max&&!a){if(d.length<i)return d.length;return}h.push(c+t)}return h.length>0&&o.push(h),o.length>0?o:void 0}(e,t,o,i,s,r);if(null==a&&o<=1)return;if(null==a){o--;continue}if("number"==typeof a){if(a<=1)return;o=a<o&&a>1?a:o,o--;continue}return{processedBBoxCount:a.length*a[0].length,pageIndices:a}}}(t.slice(d),d,l,h,o);if(!e)return;d+=e.processedBBoxCount,u.push(e.pageIndices)}return function(e,t,i,s,r){let a=0,o=0;return{pages:e.map(e=>{"horizontal"===t&&(e=function(e){let t=[];for(let i of e[0])t.push([]);return e.forEach((e,i)=>{e.forEach((e,s)=>{t[s][i]=e})}),t}(e));let n=0,l=e.map(e=>{let t=e.map(e=>(n=Math.max(e,n),i[e])),a=0,o=0;return t.forEach(e=>{a+=e.height+s,o=Math.max(o,e.width+r)}),{indices:e,bboxes:t,columnHeight:Math.ceil(a),columnWidth:Math.ceil(o)}}),h=0,d=0;return l.forEach(e=>{h+=e.columnWidth,d=Math.max(d,e.columnHeight)}),a=Math.max(h,a),o=Math.max(d,o),{columns:l,startIndex:e[0][0],endIndex:n,pageWidth:h,pageHeight:d}}),maxPageWidth:a,maxPageHeight:o}}(u,e,t,r,a)}({orientation:a,bboxes:e,maxHeight:i-(o?n.height:0),maxWidth:p,itemPaddingY:r,itemPaddingX:s,forceResult:g});h=null!=(m=null==C?void 0:C.pages)?m:[],d=null!=(v=null==C?void 0:C.maxPageWidth)?v:0,u=null!=(f=null==C?void 0:C.maxPageHeight)?f:0;let y=h.length;if(this.pagination.visible=y>1,this.pagination.totalPages=y,this.pagination.update(),this.pagination.updateMarkers(),l=this.pagination.getBBox(),!this.pagination.visible)break}while(!p(l))return{maxPageWidth:d,maxPageHeight:u,pages:h,paginationBBox:l,paginationVertical:o}}updatePositions(e=0){let{item:{paddingY:t},itemSelection:i,pages:s}=this;if(s.length<1||!s[e])return;let{columns:r,startIndex:a,endIndex:o}=s[e],n=0,l=0,h=r.length,d=r[0].indices.length,u="horizontal"===this.getOrientation(),c=r[0].bboxes[0].height+t,p=[];i.each((e,t,i)=>{var s,g;let m,v;if(i<a||i>o){e.visible=!1;return}let f=i-a;u?(m=f%h,v=Math.floor(f/h)):(m=Math.floor(f/d),v=f%d),e.visible=!0;let C=r[m];C&&(l=Math.floor(c*v),n=Math.floor(null!=(s=p[v])?s:0),p[v]=(null!=(g=p[v])?g:0)+C.columnWidth,e.translationX=n,e.translationY=l)}),this.updateItemProxyButtons()}updatePageNumber(e){let{pages:t}=this,{startIndex:i,endIndex:s}=t[e];0===i?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=s:this.paginationTrackingIndex=Math.floor((i+s)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),v2(this.proxyNextButton,"cursor",this.pagination.getCursor("next")),v2(this.proxyPrevButton,"cursor",this.pagination.getCursor("previous")),this.ctx.updateService.update(6)}update(){let{label:{color:e}}=this.item;this.itemSelection.each((t,i)=>{t.setEnabled(i.enabled),t.color=e}),this.updateContextMenu()}updateContextMenu(){let{toggleSeries:e,ctx:{contextMenuRegistry:t}}=this;e?(t.hideAction(bO),t.hideAction(bG)):(t.showAction(bO),t.showAction(bG))}getLineStyles(e){var t,i;let{stroke:s,strokeOpacity:r=1,strokeWidth:a,lineDash:o}=null!=(t=e.line)?t:{},n=Math.min(2,null!=a?a:1);return{stroke:s,strokeOpacity:r,strokeWidth:null!=(i=this.item.line.strokeWidth)?i:n,lineDash:o}}getMarkerStyles(e){var t;let{fill:i,stroke:s,strokeOpacity:r=1,fillOpacity:a=1,strokeWidth:o}=e.marker,n=Math.min(2,null!=o?o:1);return{fill:i,stroke:s,strokeOpacity:r,fillOpacity:a,strokeWidth:null!=(t=this.item.marker.strokeWidth)?t:n}}computePagedBBox(){let e=m1.computeChildrenBBox(this.group.children());if(this.pages.length>1){let[t,i]=this.maxPageSize;e.height=Math.max(i,e.height),e.width=Math.max(t,e.width)}return e}findNode(e){var t;let{datum:i,proxyButton:s}=null!=(t=this.itemSelection.select(t=>{var i;return(null==(i=t.datum)?void 0:i.itemId)===e.itemId})[0])?t:{};if(void 0===i||void 0===s)throw Error(`AG Charts - Missing required properties { datum: ${i}, proxyButton: ${s} }`);return{datum:i,proxyButton:s}}contextToggleVisibility(e){let{datum:t,proxyButton:i}=this.findNode(e);this.doClick(e.event,t,i.button)}contextToggleOtherSeries(e){this.doDoubleClick(e.event,this.findNode(e).datum)}onContextClick(e,t){var i;let s=t.datum;this.preventHidingAll&&null!=(i=this.contextMenuDatum)&&i.enabled&&1>=this.getVisibleItemCount()?this.ctx.contextMenuRegistry.disableAction(bO):this.ctx.contextMenuRegistry.enableAction(bO);let{button:r,offsetX:a,offsetY:o}=e,{x:n,y:l}=mJ.toCanvasPoint(t,a,o);this.ctx.contextMenuRegistry.dispatchContext("legend",{type:"contextmenu",sourceEvent:e,button:r,offsetX:n,offsetY:l,deltaX:0,deltaY:0,pageX:0/0,pageY:0/0,preventDefault:()=>e.preventDefault(),pointerHistory:[]},{legendItem:s})}onClick(e,t,i){this.doClick(e,t,i)&&e.preventDefault()}getVisibleItemCount(){return this.ctx.chartService.series.flatMap(e=>e.getLegendData("category")).filter(e=>e.enabled).length}doClick(e,t,i){let{listeners:{legendItemClick:s},ctx:{chartService:r,highlightManager:a},preventHidingAll:o,toggleSeries:n}=this;if(!t)return!1;let{id:l,itemId:h,enabled:d}=t,u=r.series.find(e=>e.id===l);if(!u)return!1;
206let c=d,p=new bB("click",c,h,u.id,e);return null==s||s(p),!!p.defaultPrevented||(n&&(c=!d,o&&!c&&2>this.getVisibleItemCount()&&(c=!0),i.ariaChecked=c.toString(),this.ctx.chartEventManager.legendItemClick(u,h,c,t.legendItemName)),c?a.updateHighlight(this.id,{series:u,itemId:h,datum:void 0}):a.updateHighlight(this.id),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),!0)}onDoubleClick(e,t){this.doDoubleClick(e,t)&&e.preventDefault()}doDoubleClick(e,t){let{listeners:{legendItemDoubleClick:i},ctx:{chartService:s},toggleSeries:r}=this;if("integrated"===s.mode||!t)return!1;let{id:a,itemId:o,seriesId:n}=t,l=s.series.find(e=>e.id===a);if(!l)return!1;let h=new bB("dblclick",!0,o,l.id,e);if(null==i||i(h),h.defaultPrevented)return!0;if(r){var d;let e=s.series.flatMap(e=>e.getLegendData("category")),t=e.filter(e=>e.enabled).length,i=e.find(e=>e.itemId===o&&e.seriesId===n);this.ctx.chartEventManager.legendItemDoubleClick(l,o,null!=(d=null==i?void 0:i.enabled)&&d,t,null==i?void 0:i.legendItemName)}return this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),!0}toTooltipMeta(e,t){let i;if(e instanceof FocusEvent){let{x:e,y:s}=mJ.toCanvas(t).computeCenter();i={type:"keyboard",offsetX:e,offsetY:s}}else{e.preventDefault();let{x:s,y:r}=mJ.toCanvasPoint(t,e.offsetX,e.offsetY);i={type:"hover",offsetX:s,offsetY:r}}let{offsetX:s,offsetY:r}=i;return{offsetX:s,offsetY:r,lastPointerEvent:i,showArrow:!1}}onHover(e,t){var i;if(!this.enabled)throw Error("AG Charts - onHover handler called on disabled legend");this.pagination.setPage(t.pageIndex);let s=t.datum,r=s?this.ctx.chartService.series.find(e=>e.id===(null==s?void 0:s.id)):void 0;if(s&&this.truncatedItems.has(null!=(i=s.itemId)?i:s.id)){let i=this.toTooltipMeta(e,t);this.ctx.tooltipManager.updateTooltip(this.id,i,v8({content:this.getItemLabel(s)}))}else this.ctx.tooltipManager.removeTooltip(this.id);null!=s&&s.enabled&&r?this.updateHighlight({series:r,itemId:null==s?void 0:s.itemId,datum:void 0}):this.updateHighlight()}onLeave(){this.ctx.tooltipManager.removeTooltip(this.id),this.updateHighlight()}updateHighlight(e){let t=this.ctx.interactionManager.getState();32===t?this.ctx.highlightManager.updateHighlight(this.id,e):2===t&&(this.pendingHighlightDatum=e,this.ctx.animationManager.onBatchStop(()=>{this.ctx.highlightManager.updateHighlight(this.id,this.pendingHighlightDatum)}))}onLocaleChanged(){this.itemSelection.each(({proxyButton:e},t,i)=>{(null==e?void 0:e.button)!=null&&(e.button.textContent=this.getItemAriaText(i))}),this.proxyLegendItemDescription.textContent=this.getItemAriaDescription()}getItemAriaText(e){let t=this.data[e],i=t&&this.getItemLabel(t),s=this.ctx.localeManager;if(e>=0&&i){let t=this.data.length;return s.t("ariaLabelLegendItem",{label:i,index:e+1,count:t})}return s.t("ariaLabelLegendItemUnknown")}getItemAriaDescription(){return this.ctx.localeManager.t("ariaDescriptionLegendItem")}positionLegend(e){if(v2(this.proxyLegendToolbar,"display",this.visible&&this.enabled?void 0:"none"),!this.enabled||!this.data.length)return;let{layoutBox:t}=e,{x:i,y:s,width:r,height:a}=t,[o,n]=this.calculateLegendDimensions(t),{oldPages:l}=this.calcLayout(o,n),h=this.computePagedBBox(),d=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return a-h.height;default:return r-h.width}};if(this.visible){let e,o,n=this.spacing;switch(this.position){case"top":case"bottom":e=(r-h.width)/2,o=d(),t.shrink(h.height+n,this.position);break;default:e=d(),o=(a-h.height)/2,t.shrink(h.width+n,this.position)}this.group.translationX=Math.floor(i+e-h.x),this.group.translationY=Math.floor(s+o-h.y),this.proxyLegendToolbar.ariaOrientation=this.getOrientation()}this.updateItemProxyButtons(),this.updatePaginationProxyButtons(l)}calculateLegendDimensions(e){let t,i,{width:s,height:r}=e,a=s/r;switch(this.position){case"top":case"bottom":{let e=a<1?Math.min(.5,1/a*.2):.2;t=this.maxWidth?Math.min(this.maxWidth,s):s,i=this.maxHeight?Math.min(this.maxHeight,r):Math.round(r*e);break}default:{let e=a>1?Math.min(.5,.25*a):.25;t=this.maxWidth?Math.min(this.maxWidth,s):Math.round(s*e),i=this.maxHeight?Math.min(this.maxHeight,r):r}}return[t,i]}};bz.className="Legend",uQ([gM(gR)],bz.prototype,"toggleSeries",2),uQ([gM(gI)],bz.prototype,"pagination",2),uQ([gM(gI)],bz.prototype,"item",2),uQ([gM(gI)],bz.prototype,"listeners",2),uQ([vY(e=>e.updateGroupVisibility()),gM(gR)],bz.prototype,"enabled",2),uQ([vY(e=>e.proxyLegendDirty=!0),gM(g4)],bz.prototype,"position",2),uQ([gM(gN,{optional:!0})],bz.prototype,"maxWidth",2),uQ([gM(gN,{optional:!0})],bz.prototype,"maxHeight",2),uQ([gM(gR,{optional:!0})],bz.prototype,"reverseOrder",2),uQ([gM(ma(["horizontal","vertical"],"an orientation"),{optional:!0})],bz.prototype,"orientation",2),uQ([gM(gR,{optional:!0})],bz.prototype,"preventHidingAll",2),uQ([gM(gN)],bz.prototype,"spacing",2);
206var bV={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:e=>new bz(e),packageType:"community"},bH=class extends Cq{constructor(){super(...arguments),this.zIndex=3,this.centerX=0,this.centerY=0,this.width=8,this.height=16,this.gripLineGap=2,this.gripLineLength=8}setCenter(e,t){this.dirtyPath=!0,(this.centerX!==e||this.centerY!==t)&&(this.centerX=e,this.centerY=t,this.markDirty(3))}static align(e,t,i,s,r,a,o,n){let l=e.strokeWidth/2,h=e.align(i+r*o)+l,d=h+e.align(i+r*o,r*(n-o))-2*l,u=e.align(s+a/2)+l;e.setCenter(h,u),t.setCenter(d,u)}computeBBox(){let{centerX:e,centerY:t,width:i,height:s}=this;return new c4(e-i/2,t-s/2,i,s)}isPointInPath(e,t){return this.getBBox().containsPoint(e,t)}updatePath(){var e,t;let{centerX:i,centerY:s,path:r,strokeWidth:a,gripLineGap:o,gripLineLength:n}=this,l=null!=(e=null==(t=this.layerManager)||null==(t=t.canvas)?void 0:t.pixelRatio)?e:1;r.clear();let h=Math.floor(this.width/2*l)/l,d=Math.floor(this.height/2*l)/l;r.moveTo(i-h,s-d),r.lineTo(i+h,s-d),r.lineTo(i+h,s+d),r.lineTo(i-h,s+d),r.closePath();let u=Math.floor((o+a)/2*l)/l,c=Math.floor(n/2*l)/l;r.moveTo(i-u,s-c),r.lineTo(i-u,s+c),r.moveTo(i+u,s-c),r.lineTo(i+u,s+c)}};bH.className="RangeHandle",uQ([gM(gN),c5({redraw:3,type:"path"})],bH.prototype,"width",2),uQ([gM(gN),c5({redraw:3,type:"path"})],bH.prototype,"height",2),uQ([gM(gN),c5({redraw:3,type:"path"})],bH.prototype,"gripLineGap",2),uQ([gM(gN),c5({redraw:3,type:"path"})],bH.prototype,"gripLineLength",2);var bj=class extends Cq{constructor(){super(...arguments),this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1}layout(e,t,i,s){(e!==this.x||t!==this.y||i!==this.width||this.height!==s)&&(this.x=e,this.y=t,this.width=i,this.height=s,this.dirtyPath=!0,this.markDirty(3))}update(e,t){e=isNaN(e)?this.min:e,t=isNaN(t)?this.max:t,(e!==this.min||t!==this.max)&&(this.min=e,this.max=t,this.dirtyPath=!0,this.markDirty(3))}computeBBox(){let{x:e,y:t,width:i,height:s}=this;return new c4(e,t,i,s)}computeVisibleRangeBBox(){let{x:e,y:t,width:i,height:s,min:r,max:a}=this,o=e+i*r;return new c4(o,t,e+i*a-o,s)}updatePath(){let{path:e,x:t,y:i,width:s,height:r,min:a,max:o,strokeWidth:n}=this,l=n/2;e.clear();let h=this.align(t)+l,d=this.align(i)+l,u=h+this.align(t,s)-2*l,c=d+this.align(i,r)-2*l;e.moveTo(h,d),e.lineTo(u,d),e.lineTo(u,c),e.lineTo(h,c),e.closePath();let p=this.align(t+s*a)+l,g=p+this.align(t+s*a,s*(o-a))-2*l;e.moveTo(p,d),e.lineTo(p,c),e.lineTo(g,c),e.lineTo(g,d),e.closePath()}};bj.className="RangeMask";var bW=class extends fi{constructor(e){super({name:"rangeSelectorGroup",zIndex:16}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.background=this.appendChild(new m4({name:"navigator-background",zIndex:1})),this.append(e)}layout(e,t,i,s,r,a){this.x=e,this.y=t,this.width=i,this.height=s,this.lOffset=r,this.rOffset=a,this.background.translationX=e,this.background.translationY=t,this.markDirty(3)}
206updateBackground(e,t){null!=e&&this.background.removeChild(e),null!=t&&this.background.appendChild(t),this.markDirty(3)}computeBBox(){let{x:e,y:t,width:i,height:s,lOffset:r,rOffset:a}=this;return new c4(e-r,t,i+(r+a),s)}},bU=class extends f7{constructor(e){super(),this.ctx=e,this.miniChart=void 0,this.enabled=!1,this.mask=new bj,this.minHandle=new bH,this.maxHandle=new bH,this.maskVisibleRange={id:"navigator-mask-visible-range",getBBox:()=>this.mask.computeVisibleRangeBBox(),toCanvasBBox:()=>this.mask.computeVisibleRangeBBox(),fromCanvasPoint:(e,t)=>({x:e,y:t})},this.height=30,this.spacing=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new bW([this.mask,this.minHandle,this.maxHandle]),this._min=0,this._max=1,this.minRange=.001;let t=e.regionManager.addRegion("navigator",this.rangeSelector);this.destroyFns.push(e.scene.attachNode(this.rangeSelector),t.addListener("hover",e=>this.onHover(e),50),t.addListener("drag-start",e=>this.onDragStart(e),50),t.addListener("drag",e=>this.onDrag(e),50),t.addListener("drag-end",e=>this.onDragEnd(e),50),t.addListener("leave",e=>this.onLeave(e),50),this.ctx.localeManager.addListener("locale-changed",()=>this.updateZoom()),this.ctx.layoutManager.registerElement(3,e=>this.onLayoutStart(e)),this.ctx.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),e.zoomManager.addListener("zoom-change",e=>this.onZoomChange(e))),this.proxyNavigatorToolbar=this.ctx.proxyInteractionService.createProxyContainer({type:"toolbar",id:"navigator-toolbar",classList:["ag-charts-proxy-navigator-toolbar"],ariaOrientation:"vertical",ariaLabel:{id:"ariaLabelNavigator"}}),this.updateGroupVisibility(),this.proxyNavigatorElements=[this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-min",ariaLabel:{id:"ariaLabelNavigatorMinimum"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,onchange:e=>this.onMinSliderChange(e)}),this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-pan",ariaLabel:{id:"ariaLabelNavigatorRange"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,onchange:e=>this.onPanSliderChange(e)}),this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-max",ariaLabel:{id:"ariaLabelNavigatorMaximum"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,onchange:e=>this.onMaxSliderChange(e)})],this.proxyNavigatorElements.forEach(e=>vJ(e,"data-preventdefault",!1)),this.setSliderRatio(this.proxyNavigatorElements[0],this._min),this.setSliderRatio(this.proxyNavigatorElements[2],this._max),this.setPanSliderValue(this._min,this._max),CI({orientation:"vertical",toolbar:this.proxyNavigatorToolbar,buttons:this.proxyNavigatorElements}),this.destroyFns.push(()=>{this.proxyNavigatorElements.forEach(e=>e.remove()),this.proxyNavigatorToolbar.remove()})}
206updateBackground(e,t){var i;null==(i=this.rangeSelector)||i.updateBackground(e,t)}updateGroupVisibility(){let{enabled:e}=this;null!=this.rangeSelector&&e!==this.rangeSelector.visible&&(this.rangeSelector.visible=e,this.proxyNavigatorToolbar.ariaHidden=(!e).toString(),e?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}onLayoutStart(e){if(this.enabled){let{layoutBox:t}=e,i=this.height+this.spacing;t.shrink(i,"bottom"),this.y=t.y+t.height+this.spacing}else this.y=0}onLayoutComplete(e){let{x:t,width:i}=e.series.rect;if(this.enabled){let{y:e,height:s}=this;this.layoutNodes(t,e,i,s),cj(this.proxyNavigatorToolbar,{x:t,y:e,width:i,height:s}),this.proxyNavigatorToolbar.style.removeProperty("display")}else this.proxyNavigatorToolbar.style.display="none";this.x=t,this.width=i}onHover(e){this.enabled&&this.updateCursor(e)}updateCursor(e){if(!this.enabled)return;let{mask:t,minHandle:i,maxHandle:s}=this,{regionOffsetX:r,regionOffsetY:a}=e;i.containsPoint(r,a)||s.containsPoint(r,a)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):t.computeVisibleRangeBBox().containsPoint(r,a)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator")}onDragStart(e){if(!this.enabled)return;this.updateCursor(e);let{mask:t,minHandle:i,maxHandle:s,x:r,width:a,_min:o}=this,{regionOffsetX:n,regionOffsetY:l}=e;i.zIndex<s.zIndex?s.containsPoint(n,l)?this.dragging="max":i.containsPoint(n,l)&&(this.dragging="min"):i.containsPoint(n,l)?this.dragging="min":s.containsPoint(n,l)&&(this.dragging="max"),null==this.dragging&&t.computeVisibleRangeBBox().containsPoint(n,l)&&(this.dragging="pan",this.panStart=(n-r)/a-o),null!=this.dragging&&this.ctx.zoomManager.fireZoomPanStartEvent("navigator")}onDrag(e){if(!this.enabled||null==this.dragging)return;let{dragging:t,minRange:i,panStart:s,x:r,width:a}=this,{_min:o,_max:n}=this,{regionOffsetX:l}=e,h=(l-r)/a;if("min"===t)o=c$(0,h,n-i);else if("max"===t)n=c$(o+i,h,1);else if("pan"===t&&null!=s){let e=n-o;n=(o=c$(0,h-s,1-e))+e}this._min=o,this._max=n,this.updateZoom()}onDragEnd(e){this.dragging=void 0,this.updateCursor(e)}onLeave(e){this.ctx.cursorManager.updateCursor("navigator")}onZoomChange(e){let{x:t}=e;t&&(this._min=t.min,this._max=t.max,this.updateNodes(t.min,t.max),this.setPanSliderValue(t.min,t.max),this.setSliderRatio(this.proxyNavigatorElements[0],t.min),this.setSliderRatio(this.proxyNavigatorElements[2],t.max))}onPanSliderChange(e){let t=this.getSliderRatio(this.proxyNavigatorElements[1]),i=this._max-this._min;this._min=c$(0,t,1-i),this._max=this._min+i,this.updateZoom()}onMinSliderChange(e){let t=this.proxyNavigatorElements[0];this._min=this.setSliderRatioClamped(t,0,this._max-this.minRange),this.updateZoom()}onMaxSliderChange(e){let t=this.proxyNavigatorElements[2];this._max=this.setSliderRatioClamped(t,this._min+this.minRange,1),this.updateZoom()}setPanSliderValue(e,t){this.proxyNavigatorElements[1].value=`${Math.round(100*e)}`,this.proxyNavigatorElements[1].ariaValueText=this.ctx.localeManager.t("ariaValuePanRange",{min:e,max:t})}setSliderRatioClamped(e,t,i){let s=this.getSliderRatio(e),r=c$(t,s,i);return r!==s&&this.setSliderRatio(e,r),r}setSliderRatio(e,t){let i=Math.round(100*t);e.value=`${i}`,e.ariaValueText=c3(i)}getSliderRatio(e){return parseFloat(e.value)/100}layoutNodes(e,t,i,s){let{rangeSelector:r,mask:a,minHandle:o,maxHandle:n,_min:l,_max:h}=this;r.layout(e,t,i,s,o.width/2,n.width/2),a.layout(e,t,i,s),bH.align(o,n,e,t,i,s,l,h),l+(h-l)/2<.5?(o.zIndex=3,n.zIndex=4):(o.zIndex=4,n.zIndex=3),[o,this.maskVisibleRange,n].forEach((i,s)=>{let r=i.getBBox(),a={x:r.x-e,y:r.y-t,height:r.height,width:r.width};cj(this.proxyNavigatorElements[s],a)})}updateNodes(e,t){this.mask.update(e,t)}updateZoom(){if(!this.enabled)return;let{_min:e,_max:t}=this;if(null==e||null==t)return;let i=e=>{(null!=this.min||null!=this.max)&&u8.warnOnce(`Could not apply [navigator.min] or [navigator.max] as [${e}] has modified the initial zoom state.`)};return this.ctx.zoomManager.updateZoom("navigator",{x:{min:e,max:t}},!1,i)}};uQ([gM(gI,{optional:!0})],bU.prototype,"miniChart",2),uQ([gM(gR),vY(e=>e.updateGroupVisibility())],bU.prototype,"enabled",2),uQ([gM(gN)],bU.prototype,"height",2),uQ([gM(gN)],bU.prototype,"spacing",2),uQ([v$({newValue(e){this._min=e,this.updateZoom()}}),gM(gD(gO,gj("max")),{optional:!0})],bU.prototype,"min",2),uQ([v$({newValue(e){this._max=e,this.updateZoom()}}),gM(gD(gO,gW("min")),{optional:!0})],bU.prototype,"max",2);var b_={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],moduleFactory:e=>new bU(e),themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8}}}};function b$({takeColors:e}){let{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}}function bY(e){return{marker:b$(e)}}var bK=((G=bK||{})[G.SMALL=12]="SMALL",G[G.MEDIUM=13]="MEDIUM",G[G.LARGE=17]="LARGE",G),bZ=((B=bZ||{}).NORMAL="normal",B.BOLD="bold",B.BOLDER="bolder",B.LIGHTER="lighter",B),bq=((z=bq||{}).TOP="top",z.RIGHT="right",z.BOTTOM="bottom",z.LEFT="left",z),bQ=((V=bQ||{}).CATEGORY="category",V.ORDINAL_TIME="ordinal-time",V.NUMBER="number",V.TIME="time",V.LOG="log",V),bX=((H=bX||{}).ANGLE_CATEGORY="angle-category",H.ANGLE_NUMBER="angle-number",H.RADIUS_CATEGORY="radius-category",H.RADIUS_NUMBER="radius-number",H),bJ=((j=bJ||{}).CIRCLE="circle",j.POLYGON="polygon",j),b0=Symbol("is-dark-theme"),b1=Symbol("is-community"),b2
206=Symbol("is-enterprise"),b3=Symbol("default-font"),b4=Symbol("default-label-colour"),b6=Symbol("default-inverted-label-colour"),b5=Symbol("default-inside-series-label-colour"),b8=Symbol("default-muted-label-colour"),b7=Symbol("default-axis-grid-colour"),b9=Symbol("default-axis-line-colour"),Se=Symbol("default-cross-lines-colour"),St=Symbol("default-background-colour"),Si=Symbol("default-shadow-colour"),Ss=Symbol("default-colours"),Sr=Symbol("default-padding"),Sa=Symbol("default-caption-layout-style"),So=Symbol("default-caption-alignment"),Sn=Symbol("palette-up-stroke"),Sl=Symbol("palette-down-stroke"),Sh=Symbol("palette-up-fill"),Sd=Symbol("palette-down-fill"),Su=Symbol("palette-neutral-stroke"),Sc=Symbol("palette-neutral-fill"),Sp=Symbol("palette-alt-up-stroke"),Sg=Symbol("palette-alt-down-stroke"),Sm=Symbol("palette-alt-up-fill"),Sv=Symbol("palette-alt-down-fill"),Sf=Symbol("palette-gray-fill"),SC=Symbol("palette-gray-stroke"),Sy=Symbol("default-polar-series-stroke"),Sw=Symbol("default-diverging-series-colour-range"),Sb=Symbol("default-gauge-series-colour-range"),SS=Symbol("default-funnel-series-colour-range"),Sx=Symbol("default-hierarchy-fills"),SM=Symbol("default-hierarchy-strokes"),SD=Symbol("default-annotation-stroke"),SE=Symbol("default-text-annotation-color"),SI=Symbol("default-annotation-background-fill"),SA=Symbol("default-annotation-handle-fill"),SR=Symbol("default-annotation-statistics-fill"),ST=Symbol("default-annotation-statistics-stroke"),SL=Symbol("default-annotation-statistics-color"),SF=Symbol("default-annotation-statistics-divider-stroke"),SP=Symbol("default-annotation-statistics-fill"),Sk=Symbol("default-annotation-statistics-stroke"),SN=Symbol("default-textbox-fill"),SO=Symbol("default-textbox-stroke"),SG=Symbol("default-textbox-color"),SB=Symbol("default-toolbar-position"),Sz=Symbol("default-gridline-enabled");function SV(e,t,i,s,r){let{addPhaseFn:a,updatePhaseFn:o,removePhaseFn:n}=r,l=(s,r,a)=>{i.animate({id:`${e}_${t}_${r.id}_${s}`,groupId:e,from:0,to:1,ease:p_,collapsable:!1,onUpdate(e,t){t&&"removed"!==s||(r.path.clear(!0),a(e,r),r.checkPathDirty())},onStop(){"added"===s&&(r.path.clear(!0),a(1,r),r.checkPathDirty())},phase:p2[s]})};for(let e of s)i.isSkipped()||(l("removed",e,n),l("updated",e,o)),l("added",e,a)}function SH(e){return"number"==typeof e?e.toFixed(2):String(null!=e?e:"")}var Sj=null;function SW(e){return null==e?void 0:""===e?"":(null!=Sj||(Sj=cG("div")),Sj.textContent=String(e),Sj.innerHTML)}var SU=new WeakMap;function S_(e,t){var i,s,r;let a=JSON.stringify(e,null,0);return SU.has(t)||SU.set(t,new Map),null!=(i=SU.get(t))&&i.has(a)||null==(r=SU.get(t))||r.set(a,t(e)),null==(s=SU.get(t))?void 0:s.get(a)}function S$(e,t=[0,0]){for(let i of e)"number"==typeof i&&(i<0&&(t[0]+=i),i>0&&(t[1]+=i));return t}function SY(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>S$(e)}}function SK(e,t){return{id:e,type:"aggregate",matchGroupIds:t?[t]:void 0,aggregateFunction:e=>S$(e),groupAggregateFunction:(e,t=[0,0])=>{var i,s;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(s=null==e?void 0:e[1])?s:0,t}}}function SZ(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>y1.extendDomain(e)}}function Sq(e){return{id:e,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,t=[0,0])=>{var i,s;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(s=null==e?void 0:e[1])?s:0,t}}}function SQ(e,t){return{id:e,matchGroupIds:t?[t]:void 0,type:"aggregate",aggregateFunction:e=>S$(e),groupAggregateFunction:(e,t=[0,0,-1])=>{var i,s;return t[0]+=null!=(i=null==e?void 0:e[0])?i:0,t[1]+=null!=(s=null==e?void 0:e[1])?s:0,t[2]++,t},finalFunction:(e=[0,0,0])=>{let t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}}}function SX(e,t,i){let s={id:e,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(e,i=[])=>{let s=i[1]-i[0];return t.aggregateFunction(e).map(e=>e/s)}};return t.groupAggregateFunction&&(s.groupAggregateFunction=t.groupAggregateFunction),s}function SJ(e){return()=>{let t=0;return i=>pE(i)?t+=e?Math.max(0,i):i:i}}function S0(){return()=>{let e=0;return t=>{if(!pE(t))return t;let i=e;return e+=t,i}}}function S1(e){return null!=e&&fu(e)}function S2(e){return null!=e}function S3(e){switch(e){case"number":case"log":case"ordinal-time":case"time":case"color":return S1;default:return S2}}function S4(e){switch(e){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function S6(e,t,i={}){return{property:e,type:"key",valueType:S4(t),validation:S3(t),...i}}function S5(e,t,i={}){return{property:e,type:"value",valueType:S4(t),validation:S3(t),...i}}function S8(e,t={}){let{min:i=-1/0,max:s=1/0,...r}=t;return{type:"value",property:e,valueType:"range",validation:S1,processor:()=>e=>pE(e)?c$(i,e,s):e,...r}}function S7(e,t,i={}){let{onlyPositive:s,...r}=i;return{...S5(e,t,r),processor:SJ(s)}}function S9(e,t,i={}){return{...S5(e,t,i),processor:S0()}}function xe(e,t,i="current",s,r){return[S5(e,r,s),xc(s.groupId,t,i,s.separateNegative),...null!=s.rangeId?[SZ(s.rangeId,s.groupId)]:[]]}function xt(e,t,i){return[S5(e,t,i),xg(i.groupId)]}var xi={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let e=0/0;return(t=1/0,i)=>
206{let s=i.keys[0],r=Math.abs(s-e);return(e=s,!isNaN(r)&&r>0&&r<t)?r:t}}},xs={type:"reducer",property:"largestKeyInterval",initialValue:-1/0,reducer:()=>{let e=0/0;return(t=-1/0,i)=>{let s=i.keys[0],r=Math.abs(s-e);return(e=s,!isNaN(r)&&r>0&&r>t)?r:t}}},xr={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:e}})=>null==e?void 0:e.slice().sort((e,t)=>{for(let i=0;i<e.length;i++){let s=e[i]-t[i];if(0!==s)return s}return 0})};function xa({normaliseTo:e,mode:t}){let i=(t,i)=>{let s=t*e/i;return s>=0?Math.min(e,s):Math.max(-e,s)};return()=>()=>(e,s)=>{let r=[0,0];for(let i of s){let s=e[i],a="number"==typeof s?s:Math.max(...s),o=a<0?0:1;"sum"===t?r[o]+=a:0===o?r[o]=Math.min(r[o],a):r[o]=Math.max(r[o],a)}let a=Math.max(Math.abs(r[0]),r[1]);for(let t of s){let s=e[t];e[t]="number"==typeof s?i(s,a):s.map(e=>i(e,a))}}}function xo(e,t,i="sum"){return{type:"group-value-processor",matchGroupIds:e,adjust:S_({normaliseTo:t,mode:i},xa)}}function xn({normaliseTo:e,zeroDomain:t,rangeMin:i,rangeMax:s}){let r=e[1]-e[0],a=(i,s,a)=>{let o=e[0]+(i-s)/a*r;return 0===a?t:o>=e[1]?e[1]:o<e[0]?e[0]:o};return()=>(t,r)=>{let[o,n]=t.domain.values[r];null!=i&&(o=i),null!=s&&(n=s);let l=n-o;for(let i of(t.domain.values[r]=[e[0],e[1]],t.data)){let e=i.values;for(let i of("ungrouped"===t.type&&(e=[e]),e))i[r]=a(i[r],o,l)}}}function xl(e,t,i,s,r){return{type:"property-value-processor",property:e,adjust:S_({normaliseTo:t,rangeMin:s,rangeMax:r,zeroDomain:i},xn)}}function xh(e){return{type:"processor",property:"animationValidation",calculate(t){let{keys:i,values:s}=t.defs,{input:r,data:a}=t,o=!0,n=!0,l=[];for(let t=0;t<s.length;t++)null!=e&&e.includes(s[t].id)&&l.push([t,s[t]]);let h=(e,i,s)=>{var l;if("category"===i.valueType){let i=t.domain[s][e];o&&(o=i.length===r.count);return}let h=null==(l=a[0])?void 0:l[s][e];for(let t=1;(o||n)&&t<a.length;t++){let i=a[t][s][e];n&&(n=h<=i),o&&(o=h!==i),h=i}};for(let e=0;(o||n)&&e<i.length;e++)h(e,i[e],"keys");for(let e=0;(o||n)&&e<l.length;e++){let[t,i]=l[e];h(t,i,"values")}return{uniqueKeys:o,orderedKeys:n}}}}function xd({mode:e,separateNegative:t}){return()=>()=>(i,s)=>{let r=[0,0];for(let a of s){let s=i[a],o=cQ(s)&&t?0:1;pE(s)&&("normal"===e&&(r[o]+=s),i[a]=r[o],"trailing"===e&&(r[o]+=s))}}}function xu({mode:e,sum:t}){return()=>{let i=[],s=!0;return()=>(r,a)=>{let o=0;for(let n of a){let a=r[n],l=s&&"current"===t?0:i[n];i[n]=a;let h="current"===t?a:l;if(!pE(a)||!pE(l)){r[n]=o;continue}"normal"===e&&(o+=h),r[n]=o,"trailing"===e&&(o+=h)}s=!1}}}function xc(e,t,i,s=!1){return{type:"group-value-processor",matchGroupIds:[e],adjust:t.startsWith("window")?S_({mode:t.endsWith("-trailing")?"trailing":"normal",sum:i},xu):S_({mode:t,separateNegative:s},xd)}}function xp(){return()=>(e,t)=>{let i=new Float64Array(32),s=0;for(let r of t){let t=e[r];i[s]=Number.isFinite(t)?t:0/0,s+=1,e[r]=i.subarray(0,s)}}}function xg(e){return{type:"group-value-processor",matchGroupIds:[e],adjust:xp}}function xm(e,t=!0){return{type:"processor",property:"diff",calculate:i=>{let s=new Map,r=new Map,a=new Map,o=new Map,n=Math.max(e.data.length,i.data.length);for(let l=0;l<n;l++){let n=e.data[l],h=i.data[l],d=n?xv(n.keys):"",u=h?xv(h.keys):"";if(h&&n&&d===u){ge(n.values,h.values)||a.set(u,h);continue}o.has(u)?((t||!ge(o.get(u).values,h.values))&&(a.set(u,h),s.set(u,h)),o.delete(u)):h&&r.set(u,h),r.has(d)?((t||!ge(r.get(d).values,n.values))&&(a.set(d,n),s.set(d,n)),r.delete(d)):n&&(a.delete(d),o.set(d,n))}return{changed:r.size>0||a.size>0||o.size>0,added:r,updated:a,removed:o,moved:s}}}}function xv(e,...t){let i;return("string"==typeof(i=pm(e)?e.map(e=>fp(e)).join("___"):fp(e))||"number"==typeof i||"boolean"==typeof i||i instanceof Date)&&t.length>0&&(i+=`___${t.join("___")}`),i}function xf({id:e},t,i,...s){p4(e,t,i,s,{opacity:0},{opacity:1},{phase:"trailing"})}function xC({id:e},t,i,...s){p4(e,t,i,s,{opacity:1},{opacity:0},{phase:"remove"})}function xy(e){return{opacity:1}}var xw=class extends gb{constructor(){super(...arguments),this._dirty=3}markDirty(e=1){this._dirty<e&&(this._dirty=e)}markClean(e){this._dirty=0}isDirty(){return this._dirty>0}},xb=class extends xw{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};uQ([gM(gR),c5({redraw:3})],xb.prototype,"enabled",2),uQ([gM(gY),c5({redraw:3})],xb.prototype,"color",2),uQ([gM(gF),c5({redraw:3})],xb.prototype,"xOffset",2),uQ([gM(gF),c5({redraw:3})],xb.prototype,"yOffset",2),uQ([gM(gN),c5({redraw:3})],xb.prototype,"blur",2);var xS=ml(e=>w6(e)||"function"==typeof e&&Object.create(e.prototype)instanceof wY,"a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),xx=class extends xw{constructor(){super(...arguments),this.enabled=!0,this.shape=wK,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){let{size:e,shape:t,fill:i,fillOpacity:s,stroke:r,strokeWidth:a,strokeOpacity:o}=this;return{size:e,shape:t,fill:i,fillOpacity:s,stroke:r,strokeWidth:a,strokeOpacity:o}}getDiameter(){return this.size+this.strokeWidth}};uQ([gM(gR),c5({redraw:3})],xx.prototype,"enabled",2),uQ([gM(xS),c5({redraw:3})],xx.prototype,"shape",2),uQ([gM(gN),c5({redraw:3})],xx.prototype,"size",2),uQ([gM(gY,{optional:!0}),c5({redraw:3})],xx.prototype,"fill",2),uQ([gM(gO),c5({redraw:3})],xx.prototype,"fillOpacity",2),uQ([gM(gY,{optional:!0}),c5({redraw:3})],xx.prototype,"stroke",2),uQ([gM(gN),c5({redraw:3})],xx.prototype,"strokeWidth",2),uQ([gM(gO),c5({redraw:3})],xx.prototype,"strokeOpacity",2),uQ([gM(gT,{optional:!0}),c5({redraw:3})],xx.prototype,"itemStyler",2);var xM=class extends gb{constructor(){super(...arguments),this.enabled=!1}};uQ([gM(gR)],xM.prototype,"enabled",2);var xD=class extends gb{constructor(){super(...arguments),this.enabled=!0,this.interaction=new xM,this.position=new v7,this.range=void 0}toTooltipHtml(e,t){return this.renderer?v8(this.renderer(t),e):v8(e)}};uQ([gM(gR)],xD.prototype,"enabled",2),uQ([gM(gR,{optional:!0})],xD.prototype,"showArrow",2),uQ([gM(gT,{optional:!0})],xD.prototype,"renderer",2),uQ([gM(gI)],xD.prototype,"interaction",2),uQ([gM(gI)],xD.prototype,"position",2),uQ([gM(ms,{optional:!0})],xD.prototype,"range",2);var xE=ma(["linear","smooth","step"],"a line style"),xI=ma(["start","middle","end"]),xA=class extends gb{constructor(){super(...arguments),this.type="linear",this.tension=1,this.position="end"}};uQ([gM(xE)],xA.prototype,"type",2),uQ([gM(gO)],xA.prototype,"tension",2),uQ([gM(xI)],xA.prototype,"position",2);var xR=class extends bn{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new xA,this.shadow=new xb,this.marker=new xx,this.label=new fa,this.tooltip=new xD,this.connectMissingData=!1}};function xT(e){switch(e.type){case"linear":case"step":return[{x:e.x0,y:e.y0},{x:e.x1,y:e.y1}];case"cubic":return[{x:e.cp0x,y:e.cp0y},{x:e.cp3x,y:e.cp3y}]}}function xL(e,t,i){let[s,r]=xT(e),a=r.x!==s.x?(i.x-t.x)/(r.x-s.x):0,o=r.y!==s.y?(i.y-t.y)/(r.y-s.y):0;switch(e.type){case"linear":return{type:"linear",moveTo:e.moveTo,x0:t.x,y0:t.y,x1:i.x,y1:i.y};case"cubic":return{type:"cubic",moveTo:e.moveTo,cp0x:t.x,cp0y:t.y,cp1x:i.x-(e.cp2x-s.x)*a,cp1y:i.y-(e.cp2y-s.y)*o,cp2x:i.x-(e.cp1x-s.x)*a,cp2y:i.y-(e.cp1y-s.y)*o,cp3x:i.x,cp3y:i.y};case"step":return{type:"step",moveTo:e.moveTo,x0:t.x,y0:t.y,x1:i.x,y1:i.y,stepX:i.x-(e.stepX-s.x)*a}}}function xF(e,t,i){let s,{moveTo:r}=e,[a,o]=((s=xT(e))[0].x>s[1].x&&s.reverse(),s),{x:n,y:l}=a,{x:h,y:d}=o;if(i<n)return xL(e,a,a);if(t>h)return xL(e,o,o);switch(e.type){case"linear":{let e=l===d?void 0:(d-l)/(h-n),s=null==e?l:e*(t-n)+l,a=null==e?l:e*(i-n)+l;return{type:"linear",moveTo:r,x0:t,y0:s,x1:i,y1:a}}case"step":if(i<=e.stepX){let s=e.y0;return{type:"step",moveTo:r,x0:t,y0:s,x1:i,y1:s,stepX:i}}if(t>=e.stepX){let s=e.y1;return{type:"step",moveTo:r,x0:t,y0:s,x1:i,y1:s,stepX:t}}{let{y0:s,y1:a,stepX:o}=e;return{type:"step",moveTo:r,x0:t,y0:s,x1:i,y1:a,stepX:o}}case"cubic":{let s=CU(e.cp0x,e.cp1x,e.cp2x,e.cp3x,t),[a,o]=C_(e.cp0x,e.cp0y,e.cp1x,e.cp1y,e.cp2x,e.cp2y,e.cp3x,e.cp3y,s),n=CU(o[0].x,o[1].x,o[2].x,o[3].x,i);return[o,a]=C_(o[0].x,o[0].y,o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y,n),{type:"cubic",moveTo:r,cp0x:o[0].x,cp0y:o[0].y,cp1x:o[1].x,cp1y:o[1].y,cp2x:o[2].x,cp2y:o[2].y,cp3x:o[3].x,cp3y:o[3].y}}}}uQ([gM(gL)],xR.prototype,"xKey",2),uQ([gM(gL,{optional:!0})],xR.prototype,"xName",2),uQ([gM(gL)],xR.prototype,"yKey",2),uQ([gM(gL,{optional:!0})],xR.prototype,"yName",2),uQ([gM(gL,{optional:!0})],xR.prototype,"yFilterKey",2),uQ([gM(gN,{optional:!0})],xR.prototype,"normalizedTo",2),uQ([gM(gY)],xR.prototype,"fill",2),uQ([gM(gO)],xR.prototype,"fillOpacity",2),uQ([gM(gY)],xR.prototype,"stroke",2),uQ([gM(gN)],xR.prototype,"strokeWidth",2),uQ([gM(gO)],xR.prototype,"strokeOpacity",2),uQ([gM(g3)],xR.prototype,"lineDash",2),uQ([gM(gN)],xR.prototype,"lineDashOffset",2),uQ([gM(gI)],xR.prototype,"interpolation",2),uQ([gM(gI)],xR.prototype,"shadow",2),uQ([gM(gI)],xR.prototype,"marker",2),uQ([gM(gI)],xR.prototype,"label",2),uQ([gM(gI)],xR.prototype,"tooltip",2),uQ([gM(gR)],xR.prototype,"connectMissingData",2);var xP={start:0,middle:.5,end:1};function xk(e,t){return"linear"===e.type?function(e,t){let{x0:i,y0:s,x1:r,y1:a}=e,o=(a-s)/(r-i)*(t-i)+s;return{leftCp1x:i,leftCp1y:s,leftCp2x:t,leftCp2y:o,stepX:t,stepY0:o,stepY1:o,rightCp1x:t,rightCp1y:o,rightCp2x:r,rightCp2y:a}}(e,t):"cubic"===e.type?function(e,t){let{cp0x:i,cp0y:s,cp1x:r,cp1y:a,cp2x:o,cp2y:n,cp3x:l,cp3y:h}=e,d=CU(i,r,o,l,t),[u,c]=C_(i,s,r,a,o,n,l,h,d),p=u[3].y;return{leftCp1x:u[1].x,leftCp1y:u[1].y,leftCp2x:u[2].x,leftCp2y:u[2].y,stepX:t,stepY0:p,stepY1:p,rightCp1x:c[1].x,rightCp1y:c[1].y,rightCp2x:c[2].x,rightCp2y:c[2].y}}(e,t):function(e){let{x0:t,y0:i,x1:s,y1:r,stepX:a}=e;return{leftCp1x:(t+a)/2,leftCp1y:i,leftCp2x:(t+a)/2,leftCp2y:i,stepX:a,stepY0:i,stepY1:r,rightCp1x:(a+s)/2,rightCp1y:r,rightCp2x:(a+s)/2,rightCp2y:r}}(e)}function xN(e,t,i,s,r,a,o){switch(t){case 1:o?e.moveTo(r,a):e.moveTo(i,s);break;case 2:o?e.lineTo(r,a):e.lineTo(i,s)}}function xO(e,t,i,s,r,a){a?e.lineTo(t,i):e.lineTo(s,r)}function xG(e,t,i,s,r,a,o,n,l,h){h?e.cubicCurveTo(a,o,s,r,t,i):e.cubicCurveTo(s,r,a,o,n,l)}function xB(e,t,i,s,r,a,o){o?(e.lineTo(a,r),e.lineTo(a,i),e.lineTo(t,i)):(e.lineTo(a,i),e.lineTo(a,r),e.lineTo(s,r))}function xz(e,t,i,s){let[r,a]=xT(t);switch(xN(e,i,r.x,r.y,a.x,a.y,s),t.type){case"linear":xO(e,t.x0,t.y0,t.x1,t.y1,s);break;case"cubic":xG(e,t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,s);break;case"step":xB(e,t.x0,t.y0,t.x1,t.y1,t.stepX,s)}}function xV(e,t,i,s,r,a){var o,n,l,h,d,u,c,p,g,m,v,f,C,y,w,b,S,x,M,D;let[E,I]=xT(t),[A,R]=xT(i),T=(o=E.x,(A.x-o)*s+o),L=(n=E.y,(A.y-n)*s+n),F=(l=I.x,(R.x-l)*s+l),P=(h=I.y,(R.y-h)*s+h);
206if(xN(e,r,T,L,F,P,a),"cubic"===t.type&&"cubic"===i.type)xG(e,T,L,(d=t.cp1x,(i.cp1x-d)*s+d),(u=t.cp1y,(i.cp1y-u)*s+u),(c=t.cp2x,(i.cp2x-c)*s+c),(p=t.cp2y,(i.cp2y-p)*s+p),F,P,a);else if("step"===t.type&&"step"===i.type)xB(e,T,L,F,P,(g=t.stepX,(i.stepX-g)*s+g),a);else if("linear"===t.type&&"linear"===i.type)xO(e,T,L,F,P,a);else{let r;r="step"===t.type?t.stepX:"step"===i.type?i.stepX:(T+F)/2;let o=xk(t,r),n=xk(i,r),l=(m=o.leftCp1x,(n.leftCp1x-m)*s+m),h=(v=o.leftCp1y,(n.leftCp1y-v)*s+v),d=(f=o.leftCp2x,(n.leftCp2x-f)*s+f),u=(C=o.leftCp2y,(n.leftCp2y-C)*s+C),c=(y=o.stepX,(n.stepX-y)*s+y),p=(w=o.stepY0,(n.stepY0-w)*s+w),g=(b=o.stepY1,(n.stepY1-b)*s+b),E=(S=o.rightCp1x,(n.rightCp1x-S)*s+S),I=(x=o.rightCp1y,(n.rightCp1y-x)*s+x),A=(M=o.rightCp2x,(n.rightCp2x-M)*s+M),R=(D=o.rightCp2y,(n.rightCp2y-D)*s+D);a?(e.cubicCurveTo(A,R,E,I,c,g),e.lineTo(c,p),e.cubicCurveTo(d,u,l,h,T,L)):(e.cubicCurveTo(l,h,d,u,c,p),e.lineTo(c,g),e.cubicCurveTo(E,I,A,R,F,P))}}function xH({id:e},t,i,...s){p4(e,"markers",t,s,{opacity:0},{opacity:1},{phase:i?p2[i]:"trailing"}),s.forEach(e=>e.cleanup())}function xj({id:e},t,...i){p4(e,"markers",t,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),i.forEach(e=>e.cleanup())}function xW({id:e,nodeDataDependencies:t},i,...s){let r=t.seriesRectWidth;p3(e,"markers",i,s,{fromFn:(e,t)=>{var i,s;let a=c$(0,pq((null!=(i=null==(s=t.midPoint)?void 0:s.x)?i:r)/r),1);return isNaN(a)&&(a=0),{scalingX:0,scalingY:0,delay:a,duration:.2,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function xU(e){return{opacity:1,scalingX:1,scalingY:1}}function x_(e,t){var i,s,r,a;return{translationX:null!=(i=null==(s=t.point)?void 0:s.x)?i:0/0,translationY:null!=(r=null==(a=t.point)?void 0:a.y)?r:0/0}}function x$(e,t){let i=(t,i)=>{let s=e[i][t];return Array.isArray(s)?s[0]:s},s=t=>{let{xValue:s}=t;return e.moved[s]?{point:i(s,"moved"),status:"updated"}:e.removed[s]?{point:i(s,"removed"),status:"removed"}:e.added[s]?{point:i(s,"added"),status:"added"}:{status:"unknown"}};return{fromFn:(e,i)=>{var r,a,o,n,l,h;let{status:d,point:u}=s(i);if("unknown"===d)return{opacity:0}
206;let c={translationX:null!=(r=null==u||null==(a=u.from)?void 0:a.x)?r:e.translationX,translationY:null!=(o=null==u||null==(n=u.from)?void 0:n.y)?o:e.translationY,opacity:e.opacity,phase:p2[d]};return"added"===t?{...c,opacity:0,translationX:null==u||null==(l=u.to)?void 0:l.x,translationY:null==u||null==(h=u.to)?void 0:h.y,phase:p2.added}:("added"===d&&(c.opacity=0),c)},toFn:(e,i)=>{let{status:r,point:a}=s(i);if("unknown"===r)return{opacity:0};let o={translationX:i.point.x,translationY:i.point.y,opacity:1,phase:p2[r]};if("removed"===r||"removed"===t){var n,l;return{...o,translationX:null==a||null==(n=a.to)?void 0:n.x,translationY:null==a||null==(l=a.to)?void 0:l.y,opacity:0,phase:p2.removed}}return o}}}function xY(e,{datumIndex:t}){var i;let s=e.getNodeData();if(void 0===s)return;let r=s[t],{point:a}=r;if(null==r||null==a)return;let o=null!=(i=a.focusSize)?i:e.getFormattedMarkerStyle(r).size,n=o/2,l=r.point.x-n,h=r.point.y-n;return mJ.toCanvas(e.contentGroup,new c4(l,h,o,o))}function xK(e){return e.reduce(({min:e,max:t},i)=>((null==e||e.point.x>i.point.x)&&(e=i),(null==t||t.point.x<i.point.x)&&(t=i),{min:e,max:t}),{})}function xZ(e,t,i){let s=(t.y-e.y)/(t.x-e.x),r=(i-e.x)*s+e.y;return{x:i,y:r}}function xq(e,t,i,s){let r=-1,a=0,o=[];for(;a<e.length;){if(e[a].change===t){o.push(e[a]),a++;continue}if(e[a].change===i){a++;continue}o.length>0&&(s(o,r,a),o.length=0),r=a,a++}o.length>0&&s(o,r,a)}function xQ(e,t){xq(e,"out","in",(i,s,r)=>{var a,o;-1===s&&e[r]?i.forEach(t=>t.to=e[r].from):r===e.length&&e[s]?i.forEach(t=>t.to=e[s].from):"intersect"===t&&null!=(a=e[s])&&a.from&&null!=(o=e[r])&&o.from?i.forEach(t=>t.to=xZ(e[s].from,e[r].from,t.from.x)):i.forEach(e=>e.to=e.from)}),xq(e,"in","out",(i,s,r)=>{var a,o;-1===s&&e[r]?i.forEach(t=>t.from=e[r].to):r===e.length&&e[s]?i.forEach(t=>t.from=e[s].to):"intersect"===t&&null!=(a=e[s])&&a.to&&null!=(o=e[r])&&o.to?i.forEach(t=>t.from=xZ(e[s].to,e[r].to,t.to.x)):i.forEach(e=>e.from=e.to)})}function xX(e,t,i){let s=isNaN(e.x)?t.x:e.x,r=isNaN(e.y)?t.y:e.y,a=t.x-e.x,o=t.y-e.y;return{x:s+(isNaN(a)?0:a*i),y:r+(isNaN(o)?0:o*i)}}var xJ={start:0,middle:.5,end:1};function x0(e,t,i,s=!1){var r,a;let{path:o}=t;if((null==i?void 0:i.type)==="smooth")!function(e,t,i,s){let r=Array.isArray(t)?t:Array.from(t);if(0===r.length||(s?e.lineTo(r[0].x,r[0].y):e.moveTo(r[0].x,r[0].y),r.length<=1))return;let a=r.map((e,t)=>{let i=0===t?e:r[t-1],s=t===r.length-1?e:r[t+1],a=0===t||t===r.length-1;if(Math.sign(i.y-e.y)===Math.sign(s.y-e.y))return 0;if(!a){let t=Math.abs(i.y-s.y),r=Math.abs(e.y-i.y)/t,a=Math.abs(e.y-s.y)/t;if(r<=.05||1-r<=.05||a<=.05||1-a<=.05)return 0}return(s.y-i.y)/(s.x-i.x)});0===a[1]&&(a[0]*=2),0===a[a.length-2]&&(a[a.length-1]*=2);for(let t=1;t<r.length;t+=1){let s=r[t-1],o=a[t-1],n=r[t],l=a[t],h=n.x-s.x,d=n.y-s.y,u=h*i/3,c=h*o*i/3,p=h*i/3,g=h*l*i/3;0===l&&Math.abs(c)>Math.abs(d)&&(u*=Math.abs(d/c),c=Math.sign(c)*Math.abs(d)),0===o&&Math.abs(g)>Math.abs(d)&&(p*=Math.abs(d/g),g=Math.sign(g)*Math.abs(d)),e.cubicCurveTo(s.x+u,s.y+c,n.x-p,n.y-g,n.x,n.y)}}(o,e,null!=(r=i.tension)?r:1,s);else if((null==i?void 0:i.type)==="step")!function(e,t,i,s){let r;for(let n of t){if(null!=r){var a,o;let t=r.x<n.x?i:1-i,s=(n.x-r.x)*t+r.x;e.lineTo(s,null!=(a=null==(o=r)?void 0:o.y)?a:n.y),e.lineTo(s,n.y),e.lineTo(n.x,n.y)}else s?e.lineTo(n.x,n.y):e.moveTo(n.x,n.y);r=n}}(o,e,xJ[null!=(a=i.position)?a:"end"],s);else{let t=s;for(let{x:i,y:s}of e)t?o.lineTo(i,s):(o.moveTo(i,s),t=!0)}}function x1(e,t){let i,s,r=[],a=()=>{null!=s&&(r.push(s),s=void 0)};for(let r of e){let{from:e,to:o}=r,n=t[r.change];if(null==n||null==e||null==o)continue;let l=xX(e,o,n);if(!1===r.moveTo)null!=s||(s=[]),s.push(l);else if(!0!==r.moveTo&&i){if(i){let{x:e,y:t}=xX(i,l,"in"===r.moveTo?n:1-n);null!=s||(s=[]),s.push({x:e,y:t}),a(),s=[l]}}else a(),s=[l];i=l}return a(),r}function x2(e,t,i,s){x1(e,t).forEach(e=>{x0(e,i,s)})}function x3({id:e,visible:t,nodeDataDependencies:i},s,...r){let{seriesRectWidth:a,seriesRectHeight:o}=i;p4(e,"path_properties",s,r,{clipX:0},{clipX:a},{phase:"initial",start:{clip:!0,clipY:o,visible:t},finish:{clip:!1,visible:t}})}function x4({id:e},t,i,s="add",...r){p4(e,t,i,r,{opacity:0}
206,{opacity:1},{phase:s})}function x6({id:e},t,i,...s){p4(e,t,i,s,{opacity:1},{opacity:0},{phase:"remove"})}function x5(e){return t=>({visible:e.getVisible(),opacity:e.getOpacity(),clipScalingX:1,clip:!1})}function x8({nodeDataDependencies:e},t){let i=e=>isFinite(e)?e:0;t.clipX=i(e.seriesRectWidth),t.clipY=i(e.seriesRectHeight)}function x7(e){return"continuous"===e.type||"log"===e.type}function x9(e){return"category"===e.type}function Me(e,t){return e.domain.length===t.domain.length&&e.range.length===t.range.length&&e.domain.every((e,i)=>e===t.domain[i])&&e.range.every((e,i)=>e===t.range[i])}function Mt(e,t){return void 0===e||void 0===t?void 0!==e||void 0!==t:x7(e)&&x7(t)?e.type===t.type&&Me(e,t):!!(x9(e)&&x9(t))&&Me(e,t)}function Mi(e){return null!=e&&!!e.range.every(e=>Number.isFinite(e))&&("category"===e.type?e.domain.every(e=>null!=e):e.domain.every(e=>Number.isFinite(e)||e instanceof Date))}function*Ms(e){let t=-1,i=0;for(let{point:s}of e){if(s.moveTo){let e=t>=0?{start:t,end:i}:void 0;i=t=i,void 0!==e&&(yield e)}i+=1}-1!==t&&(yield{start:t,end:i})}function*Mr(e,{start:t,end:i}){for(let s=t;s<i;s+=1)yield e[s].point}function*Ma(e,{start:t,end:i}){for(let s=i-1;s>=t;s-=1)yield e[s].point}function Mo(e,t){if(!t)return 0/0;if(e instanceof Date&&(e=e.getTime()),"continuous"===t.type&&"number"==typeof e)return(e-t.domain[0])/(t.domain[1]-t.domain[0])*(t.range[1]-t.range[0])+t.range[0];if("log"===t.type&&"number"==typeof e)return t.convert(e);let i=t.domain.findIndex(t=>t===e);if(i>=0)return t.range[i];let s=t.domain.findIndex(t=>{var i;return null!=(i=e)&&null!=t&&"object"==typeof i&&"object"==typeof t&&("id"in i&&"id"in t?i.id===t.id:i.toString()===t.toString())});return s>=0?t.range[s]:0/0}function Mn(e=!1,t=!1){return e===t?!!e:e?"in":"out"}function Ml(e,t,i={}){let{backfillSplitMode:s="intersect"}=i,r=[],a={added:{},moved:{},removed:{}},o=(e,t,i,s="move")=>{var o,n;e&&(isNaN(e.point.x)||isNaN(e.point.y))&&(e=t);let l={from:null==(o=e)?void 0:o.point,to:null==t?void 0:t.point,moveTo:Mn(null==(n=e)?void 0:n.point.moveTo,null==t?void 0:t.point.moveTo),change:s};"move"===s?(a.moved[i]=l,u++,c++):"in"===s?(a.added[i]=l,c++):"out"===s&&(a.removed[i]=l,u++),r.push(l)},{min:n,max:l}=xK(t.nodeData),{min:h,max:d}=xK(e.nodeData),u=0,c=0;for(;u<t.nodeData.length||c<e.nodeData.length;){var p,g,m,v,f,C;let i=t.nodeData[u],s=e.nodeData[c],r=i?Mo(null!=(p=i.xValue)?p:0/0,e.scales.x):void 0,a=s?Mo(null!=(g=s.xValue)?g:0/0,t.scales.x):void 0,y;if(null!=r&&function(e,t){let i=Number(e),s=Number(t);return isNaN(i)||isNaN(s)?e===t:.25>Math.abs(s-i)}(r,null==s?void 0:s.point.x))o(i,s,s.xValue,"move");else if(null!=r&&r<(null!=(m=null==h?void 0:h.point.x)?m:-1/0))o(i,y,i.xValue,"out");else if(null!=r&&r>(null!=(v=null==d?void 0:d.point.x)?v:1/0))o(i,y,i.xValue,"out");else if(null!=a&&a<(null!=(f=null==n?void 0:n.point.x)?f:-1/0))o(y,s,s.xValue,"in");else if(null!=a&&a>(null!=(C=null==l?void 0:l.point.x)?C:1/0))o(y,s,s.xValue,"in");else if(null!=r&&r<(null==s?void 0:s.point.x))o(i,y,i.xValue,"out");else if(null!=a&&a<(null==i?void 0:i.point.x))o(y,s,s.xValue,"in");else if(i)o(i,y,i.xValue,"out");else if(s)o(y,s,s.xValue,"in");else throw Error("Unable to process points")}return xQ(r,s),{result:r,resultMap:a}}function Mh(e,t,i,s={}){let r,a,{backfillSplitMode:o="intersect",multiDatum:n=!1}=s,l=[],h={added:{},moved:{},removed:{}},d={added:{},moved:{},removed:{}},u={in:"added",move:"moved",out:"removed"},c=(e,t)=>{var i;let s=u[t.change];n?(null!=(i=d[s])[e]||(i[e]=[]),d[s][e].push(t)):h[s][e]=t,r=t,a=fp(e)},p=0,g=0,m=!1;for(;p<t.nodeData.length||g<e.nodeData.length;){var v,f,C;let s,o=t.nodeData[p],h=e.nodeData[g],d=fp(null==o?void 0:o.xValue),u=fp(null==h?void 0:h.xValue);if(d===u)s={change:"move",moveTo:Mn(null!=(v=o.point.moveTo)&&v,h.point.moveTo),from:o.point,to:h.point},c(null==o?void 0:o.xValue,s),p++,g++;else if(null!=i&&i.removed.has(String(d)))s={change:"out",moveTo:null!=(f=o.point.moveTo)&&f,from:o.point},c(null==o?void 0:o.xValue,s),p++;else if(null!=i&&i.added.has(String(u)))s={change:"in",moveTo:null!=(C=h.point.moveTo)&&C,to:h.point},c(null==h?void 0:h.xValue,s),g++;else if(n&&r&&a===d)s={...r},c(null==o?void 0:o.xValue,s),p++;else if(n&&r&&a===u)s={...r},c(null==h?void 0:h.xValue,s),g++;else{m=!0;break}l.push(s)}let y=-1/0;return(m||(m=l.some(e=>{let{change:t,to:{x:i=-1/0}={}}=e;if("out"===t)return;let s=i<y;return y=i,s})),m)?{result:void 0,resultMap:void 0}:(xQ(l,o),{result:l,resultMap:n?d:h})}function Md(e,t,i){let s="updated";if(!t.visible&&e.visible)s="added";else if(t.visible&&!e.visible)s="removed";else for(let e=0;e<i.length;e++){var r,a,o,n;if("move"!==i[e].change||(null==(r=i[e].from)?void 0:r.x)!==(null==(a=i[e].to)?void 0:a.x)||(null==(o=i[e].from)?void 0:o.y)!==(null==(n=i[e].to)?void 0:n.y))break;if(e===i.length-1)return"no-op"}return s}function Mu(e,t){let i="none"===t?"updated":e,s={fromFn:t=>{let s;return s="removed"===e?{finish:{visible:!1}}:"added"===e?{start:{visible:!0}}:{},{phase:p2[i],...s}},toFn:e=>({phase:p2[i]})};return"fade"===t?{fromFn:t=>({opacity:"added"===e?0:t.opacity,...s.fromFn(t)}),toFn:t=>({opacity:+("removed"!==e),...s.toFn(t)})}:s}function Mc(e,t,i,s,r,a){let o=Md(e,t,i),n=Mu(o,s);return{status:o,path:{addPhaseFn:(e,t)=>{a(i,{move:1,in:e},t,r)},updatePhaseFn:(e,t)=>{a(i,{move:e},t,r)},removePhaseFn:(e,t)=>{a(i,{move:0,out:e},t,r)}},pathProperties:n}}function Mp(e,t,i,s){var r,a,o;let n=(null==(r=e.scales.x)?void 0:r.type)==="category";if(n!==((null==(a=t.scales.x)?void 0:a.type)==="category")||!Mi(e.scales.x)||!Mi(t.scales.x))return;let{result:l,resultMap:h}=n?Mh(e,t,i):Ml(e,t),d="updated";if(t.visible&&!e.visible?d="removed":!t.visible&&e.visible&&(d="added"),void 0===l||void 0===h)return;let u=null==(o=null==i?void 0:i.changed)||o||!Mt(e.scales.x,t.scales.x)||!Mt(e.scales.y,t.scales.y)||"updated"!==d,c=Mc(e,t,l,"fade",s,x2),p=x$(h,d);return{...c,marker:p,hasMotion:u}}function Mg(e){return fp(e).valueOf()}function Mm({data:e},t){return e.map((e,i)=>({xValue0Index:t.indexOf(Mg(e.xValue0)),xValue1Index:t.indexOf(Mg(e.xValue1)),datumIndex:i}))}function Mv(e,t,i){if(i.xValue1Index===i.xValue0Index+1)return e;let s=xT(e),r=(s[1].x-s[0].x)/(i.xValue1Index-i.xValue0Index),a=s[0].x+(t-i.xValue0Index)*r;return xF(e,a,a+r)}function Mf(e,t){let[i,s]=xT(e),r=Mo(0,t.scales.y);return xL(e,{x:i.x,y:r},{x:s.x,y:r})}function MC(e,t,i,s,r){var a,o;let n,l;if(s.xValue0Index>=r.xValue1Index){let e=null==(a=i.findLast(e=>e.xValue1Index<=r.xValue1Index))?void 0:a.datumIndex,s=null!=e?t.data[e]:void 0;n=null==s?void 0:s.xValue1,l=null==s?void 0:s.yValue1}else if(s.xValue0Index<=r.xValue0Index){let e=null==(o=i.find(e=>e.xValue0Index>=r.xValue0Index))?void 0:o.datumIndex,s=null!=e?t.data[e]:void 0;n=null==s?void 0:s.xValue0,l=null==s?void 0:s.yValue0}if(null==n||null==l)return Mf(e,t);let h={x:Mo(n,t.scales.x),y:Mo(l,t.scales.y)};return xL(e,h,h)}function My(e,t){var i;let s=Mg(e.xValue0),r=Mg(e.xValue1);return null==t||null==(i=t.find(e=>Mg(e.xValue0)===s&&Mg(e.xValue1)===r))?void 0:i.span}function Mw(e,t,i,s,r,a){let o=e.data[i.datumIndex],n=o.span,l=My(o,s);if(null!=l)a.removed.push({from:l,to:l}),a.moved.push({from:l,to:n}),a.added.push({from:n,to:n});else{let s=MC(n,e,t,i,r);a.added.push({from:s,to:n})}}function Mb(e,t,i,s,r,a){let o=e.data[i.datumIndex],n=o.span,l=My(o,s);if(null!=l)a.removed.push({from:n,to:n}),a.moved.push({from:n,to:l}),a.added.push({from:l,to:l});else{let s=MC(n,e,t,i,r);a.removed.push({from:n,to:s})}}function MS(e,t,i,s,r){let a=t[r.xValue0Index],o=i.data.find(e=>Mg(e.xValue0)===a),n=t[r.xValue1Index],l=i.data.find(e=>Mg(e.xValue1)===n);if(null==o||null==l)return;let[{x:h},{x:d}]=xT(e),u=Mo(o.xValue0,i.scales.x),c=Mo(o.yValue0,i.scales.y),p=Mo(l.xValue1,i.scales.x),g=Mo(l.yValue1,i.scales.y),m=s.data[r.datumIndex].span;return xF(m=xL(m,{x:u,y:c},{x:p,y:g}),h,d)}function Mx(e,t){let i={removed:[],moved:[],added:[]},s=function(e,t){let i=new Set;for(let{xValue0:t,xValue1:s}of e.data){let e=Mg(t),r=Mg(s);i.add(e).add(r)}let s=Array.from(i).sort((t,i)=>
206Mo(t,e.scales.x)-Mo(i,e.scales.x)),r=[];for(let{xValue0:e,xValue1:s}of t.data){let t=Mg(e),a=Mg(s);i.has(t)||(i.add(t),r.push(t)),i.has(a)||(i.add(a),r.push(a))}r.sort((e,i)=>Mo(e,t.scales.x)-Mo(i,t.scales.x));let a=0;for(let e of r){for(let i=s.length;i>a;i-=1)if(Mo(e,t.scales.x)>Mo(s[i],t.scales.x)){a=i+1;break}s.splice(a,0,e),a+=1}if(!function(e,t){let i=-1/0;for(let s of e){let e=Mo(s,t.scales.x);if(Number.isFinite(e)){if(e<i)return!1;i=e}}return!0}(s,t))return;let o=Mm(t,s),n=Mm(e,s);return{axisValues:s,oldDataAxisIndices:o,newDataAxisIndices:n}}(e,t);return null==s?!function(e,t,i){var s,r;for(let e of t.data){let r=e.span,a=null!=(s=My(e,t.zeroData))?s:Mf(r,t);i.removed.push({from:r,to:a})}for(let t of e.data){let s=t.span,a=null!=(r=My(t,e.zeroData))?r:Mf(s,e);i.added.push({from:a,to:s})}}(e,t,i):!function(e,t,i,s){var r,a,o,n,l,h,d,u;let{axisValues:c,oldDataAxisIndices:p,newDataAxisIndices:g}=e,m={xValue0Index:Math.max(null!=(r=null==(a=p.at(0))?void 0:a.xValue0Index)?r:-1/0,null!=(o=null==(n=g.at(0))?void 0:n.xValue0Index)?o:-1/0),xValue1Index:Math.min(null!=(l=null==(h=p.at(-1))?void 0:h.xValue1Index)?l:1/0,null!=(d=null==(u=g.at(-1))?void 0:u.xValue1Index)?d:1/0)};for(let e=0;e<c.length-1;e+=1)!function(e,t,i,s,r,a,o,n){let l,h=s+1,d=a.find(e=>e.xValue0Index<=s&&e.xValue1Index>=h),u=r.find(e=>e.xValue0Index<=s&&e.xValue1Index>=h),c=t.zeroData,p=e.zeroData;if(null==d&&null!=u)return Mw(e,r,u,c,o,n);if(null!=d&&null==u)return Mb(t,a,d,p,o,n);if(null==d||null==u)return;l=d.xValue0Index===u.xValue0Index&&d.xValue1Index===u.xValue1Index?0:d.xValue0Index<=u.xValue0Index&&d.xValue1Index>=u.xValue1Index?-1:+(d.xValue0Index>=u.xValue0Index&&d.xValue1Index<=u.xValue1Index);let g=Mv(t.data[d.datumIndex].span,s,d),m=Mv(e.data[u.datumIndex].span,s,u);if(1===l){let s=MS(g,i,t,e,u);null!=s?(n.removed.push({from:g,to:s}),n.moved.push({from:s,to:m}),n.added.push({from:m,to:m})):Mb(t,a,d,p,o,n)}else if(-1===l){let s=MS(m,i,e,t,d);null!=s?(n.removed.push({from:g,to:g}),n.moved.push({from:g,to:s}),n.added.push({from:s,to:m})):Mw(e,r,u,c,o,n)}else n.removed.push({from:g,to:g}),n.moved.push({from:g,to:m}),n.added.push({from:m,to:m})}(t,i,c,e,g,p,m,s)}(s,e,t,i),i}function MM(e,t,i,s){for(let r=0;r<i.length;r+=1){let a=i[r],o=s[r];xV(t.path,a.from,a.to,e,1,!1),xV(t.path,o.from,o.to,e,2,!0),t.path.closePath()}}function MD(e,t,i){for(let s of i)xV(t.path,s.from,s.to,e,1,!1)}function ME(e,t){var i,s,r,a;let o,n;if((null==(i=e.scales.x)?void 0:i.type)==="category"!=((null==(s=t.scales.x)?void 0:s.type)==="category")||!Mi(e.scales.x)||!Mi(t.scales.x))return;let l="updated";t.visible&&!e.visible?l="removed":!t.visible&&e.visible&&(l="added");let h=Mx({scales:e.scales,data:e.fillData.spans,visible:e.visible},{scales:t.scales,data:t.fillData.spans,visible:t.visible}),d=Mx({scales:e.scales,data:e.fillData.phantomSpans,visible:e.visible},{scales:t.scales,data:t.fillData.phantomSpans,visible:t.visible}),u=Mx({scales:e.scales,data:e.strokeData.spans,visible:e.visible,zeroData:e.fillData.phantomSpans},{scales:t.scales,data:t.strokeData.spans,visible:t.visible,zeroData:t.fillData.phantomSpans}),c="none",p=(o=Mu(r=l,c),{status:r,path:{addPhaseFn:(e,t)=>MM(e,t,h.added,d.added),updatePhaseFn:(e,t)=>MM(e,t,h.moved,d.moved),removePhaseFn:(e,t)=>MM(e,t,h.removed,d.removed)},pathProperties:o}),g=(n=Mu(a=l,c),{status:a,path:{addPhaseFn:(e,t)=>MD(e,t,u.added),updatePhaseFn:(e,t)=>MD(e,t,u.moved),removePhaseFn:(e,t)=>MD(e,t,u.removed)},pathProperties:n});return{status:l,fill:p,stroke:g}}var MI=class extends bl{constructor(e){super({moduleCtx:e,directionKeys:br,directionNames:ba,pathsPerSeries:["fill","stroke"],pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[2,0],animationResetFns:{path:x5({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:xy,marker:(e,t)=>({...xU(e),...x_(e,t)})}}),this.properties=new xR}async processData(e){var t,i;if(null==this.data||!this.properties.isValid())return;let{data:s,visible:r,seriesGrouping:{groupIndex:a=this.id,stackCount:o=1}={}}=this,{xKey:n,yKey:l,yFilterKey:h,connectMissingData:d,normalizedTo:u}=this.properties,c=!this.ctx.animationManager.isSkipped(),p=null==(t=this.axes.x)?void 0:t.scale,g=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:m,yScaleType:v}=this.getScaleInformation({xScale:p,yScale:g}),f={value:`area-stack-${a}-yValue`,values:`area-stack-${a}-yValues`,stack:`area-stack-${a}-yValue-stack`,marker:`area-stack-${a}-yValues-marker`},C=[];pg(u)&&C.push(xo(Object.values(f),u,"range")),c&&C.push(xh());let y={invalidValue:null};d&&o>1&&(y.invalidValue=0),r||(y.forceValue=0),await this.requestDataModel(e,s,{props:[S6(n,m,{id:"xValue"}),S5(l,v,{id:"yValueRaw",...y}),...null!=h?[S5(h,v,{id:"yFilterRaw"})]:[],...xt(l,v,{id:"yValueStack",...y,groupId:f.stack}),S5(l,v,{id:"yValue",...y,groupId:f.value}),...xe(l,"window","current",{id:"yValueEnd",...y,groupId:f.values},v),...xe(l,"normal","current",{id:"yValueCumulative",...y,groupId:f.marker},v),...C],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}getSeriesDomain(e){let{processedData:t,dataModel:i,axes:s}=this;if(!t||!i||0===t.data.length)return[];let r=s.y,a=i.resolveProcessedDataDefById(this,"xValue"),o=i.getDomain(this,"xValue","key",t),n=i.getDomain(this,"yValueEnd","value",t);return"x"===e?(null==a?void 0:a.def.type)==="key"&&"category"===a.def.valueType?o:y2(p7(o)):r instanceof bf||r instanceof bC?y2(n):y2([n[0]>0?0:n[0],n[1]<0?0:n[1]])}async createNodeData(){var e,t,i;let{axes:s,data:r,processedData:{data:a}={},dataModel:o}=this,n=s.x,l=s.y;if(!n||!l||!r||!o||!this.properties.isValid())return;let{yKey:h,xKey:d,yFilterKey:u,marker:c,label:p,fill:g,stroke:m,connectMissingData:v}=this.properties,{scale:f}=n,{scale:C}=l,{isContinuousY:y}=this.getScaleInformation({xScale:f,yScale:C}),w=(null!=(e=f.bandwidth)?e:0)/2,b=o.resolveProcessedDataDefsByIds(this,["yValueEnd","yValueRaw","yValueCumulative"]),S=null!=u?o.resolveProcessedDataIndexById(this,"yFilterRaw"):void 0,x=o.resolveProcessedDataIndexById(this,"yValueStack"),M=(e,t,i)=>{let s;
206return(pg(this.properties.normalizedTo)?y&&fu(i):!isNaN(i))&&(s=t),{x:f.convert(e)+w,y:C.convert(s),size:c.size}},D=[],E=[],{visibleSameStackCount:I}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this),A=-1,R=!1;null==a||a.forEach(e=>{let{keys:t,keys:[i],datum:s,values:r}=e;r.forEach((e,r)=>{A++;let a=s[r],{yValueRaw:n,yValueCumulative:l,yValueEnd:u}=o.resolveProcessedDataDefsValues(b,{keys:t,values:e}),v=Number.isFinite(n),f=M(i,+l,n),C=null!=S?e[S]===n:void 0;if(!1===C&&(R=!0),v&&c){var y,w,x;E.push({index:A,series:this,itemId:h,datum:a,midPoint:{x:f.x,y:f.y},cumulativeValue:u,yValue:n,xValue:i,yKey:h,xKey:d,point:f,fill:null!=(y=c.fill)?y:g,stroke:null!=(w=c.stroke)?w:m,strokeWidth:null!=(x=c.strokeWidth)?x:this.getStrokeWidth(this.properties.strokeWidth),selected:C})}if(v&&p){let e=this.getLabelText(p,{value:n,datum:a,xKey:d,yKey:h,xName:this.properties.xName,yName:this.properties.yName},SH);D.push({index:A,series:this,itemId:h,datum:a,x:f.x,y:f.y,labelText:e})}})});let{interpolation:T}=this.properties,L=e=>{let t,i=e.map(e=>e.point);switch(T.type){case"linear":t=function(e){let t=[],i=0,s=0/0,r=0/0;for(let{x:a,y:o}of e){if(i>0){let e=1===i;t.push({type:"linear",moveTo:e,x0:s,y0:r,x1:a,y1:o})}i+=1,s=a,r=o}return t}(i);break;case"smooth":t=function(e,t){let i=Array.isArray(e)?e:Array.from(e);if(i.length<=1)return[];let s=i.map((e,t)=>{let s=0===t?e:i[t-1],r=t===i.length-1?e:i[t+1],a=0===t||t===i.length-1;if(Math.sign(s.y-e.y)===Math.sign(r.y-e.y))return 0;if(!a){let t=Math.abs(s.y-r.y),i=Math.abs(e.y-s.y)/t,a=Math.abs(e.y-r.y)/t;if(i<=.05||1-i<=.05||a<=.05||1-a<=.05)return 0}return(r.y-s.y)/(r.x-s.x)});0===s[1]&&(s[0]*=2),0===s[s.length-2]&&(s[s.length-1]*=2);let r=[];for(let e=1;e<i.length;e+=1){let a=i[e-1],o=s[e-1],n=i[e],l=s[e],h=n.x-a.x,d=n.y-a.y,u=h*t/3,c=h*o*t/3,p=h*t/3,g=h*l*t/3;0===l&&Math.abs(c)>Math.abs(d)&&(u*=Math.abs(d/c),c=Math.sign(c)*Math.abs(d)),0===o&&Math.abs(g)>Math.abs(d)&&(p*=Math.abs(d/g),g=Math.sign(g)*Math.abs(d)),r.push({type:"cubic",moveTo:1===e,cp0x:a.x,cp0y:a.y,cp1x:a.x+u,cp1y:a.y+c,cp2x:n.x-p,cp2y:n.y-g,cp3x:n.x,cp3y:n.y})}return r}(i,T.tension);break;case"step":t=function(e,t){let i=[],s=0,r=0/0,a=0/0,o="number"==typeof t?t:xP[t];for(let{x:t,y:n}of e){if(s>0){let e=1===s,l=r+(t-r)*o;i.push({type:"step",moveTo:e,x0:r,y0:a,x1:t,y1:n,stepX:l})}s+=1,r=t,a=n}return i}(i,T.position)}return t.map((t,i)=>({span:t,xValue0:e[i].xDatum,yValue0:e[i].yDatum,xValue1:e[i+1].xDatum,yValue1:e[i+1].yDatum}))},F=null==a?void 0:a.flatMap(e=>{let{keys:[t],values:i}=e;return i.map(e=>({xDatum:t,values:e}))}),P=(e,t)=>({point:{x:f.convert(e)+w,y:C.convert(t)},xDatum:e,yDatum:t}),k=e=>{let t=[];if(null==F)return[];for(let r=0;r<F.length;r+=1){var i,s;let{xDatum:a,values:o}=F[r],n=o[x],l=Number.isFinite(n[e]);if(v&&!l)continue;let h=null==(i=F[r-1])?void 0:i.values[x],d=null==(s=F[r+1])?void 0:s.values[x],u=0,c=0;for(let t=0;t<=e;t+=1){let e=n[t];if(Number.isFinite(e)){let i=null==h||Number.isFinite(h[t]),s=null==d||Number.isFinite(d[t]);i&&(u+=e),s&&(c+=e)}}let p=t[t.length-1];if(v||u===c&&l){let e=P(a,Math.max(u,c));Array.isArray(p)?p.push(e):(null!=p&&(p.skip+=1),t.push([e]))}else if(!l&&Array.isArray(p)&&1===p.length)t[t.length-1]={skip:1};else{let e=P(a,u),i=P(a,c);Array.isArray(p)?p.push(e):null!=p&&(p.skip+=1),t.push(l?[i]:{skip:0})}}return t.flatMap(e=>Array.isArray(e)?L(e):Array(e.skip).fill(null))},N=null!=(t=null==(i=this.seriesGrouping)?void 0:i.stackIndex)?t:0,O=()=>null==F?[]:L(F.map(({xDatum:e,values:t})=>{let i=t[x][N];if(!v||Number.isFinite(i))return P(e,0)}).filter(e=>null!=e)),G=k(N),B=G.map(()=>null);for(let e=N-1;e>=-1;e-=1){let t;for(let i=0;i<B.length;i+=1)null==B[i]&&(null!=t||(t=-1!==e?k(e):O()),B[i]=t[i])}return{itemId:h,fillData:{itemId:h,spans:G.map((e,t)=>null!=e?e:B[t]),phantomSpans:B},strokeData:{itemId:h,spans:G.filter(e=>null!=e)},labelData:D,nodeData:E,scales:this.calculateScaling(),visible:this.visible,stackVisible:I>0,crossFiltering:R}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){let{shape:e}=this.properties.marker;return new(w5(e))}async updatePathNodes(e){var t;let{opacity:i,visible:s,animationEnabled:r}=e,[a,o]=e.paths,n=(null==(t=this.contextNodeData)?void 0:t.crossFiltering)===!0,l=this.getStrokeWidth(this.properties.strokeWidth);o.setProperties({fill:void 0,lineJoin:o.lineCap="round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:l,strokeOpacity:this.properties.strokeOpacity*(n?.25:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:i,visible:s||r}),a.setProperties({stroke:void 0,lineJoin:"round",pointerEvents:1,fill:this.properties.fill,fillOpacity:this.properties.fillOpacity*(n?.125:1),fillShadow:this.properties.shadow,opacity:i,visible:s||r}),x8(this,o),x8(this,a)}async updatePaths(e){this.updateAreaPaths(e.paths,e.contextData)}updateAreaPaths(e,t){for(let i of e)i.visible=t.visible;if(t.visible)this.updateFillPath(e,t),this.updateStrokePath(e,t);else for(let t of e)t.path.clear(),t.checkPathDirty()}updateFillPath(e,t){let{spans:i,phantomSpans:s}=t.fillData,[r]=e,{path:a}=r;a.clear(!0);for(let e=0;e<i.length;e+=1){let{span:t}=i[e],r=s[e].span;xz(a,t,1,!1),xz(a,r,2,!0),a.closePath()}r.checkPathDirty()}updateStrokePath(e,t){let{spans:i}=t.strokeData,[,s]=e,{path:r}=s;for(let{span:e}of(r.clear(!0),i))xz(r,e,1,!1);s.checkPathDirty()}async updateMarkerSelection(e){var t;let{nodeData:i,markerSelection:s}=e,r=this.properties.marker.enabled||(null==(t=this.contextNodeData)?void 0:t.crossFiltering)===!0;return this.properties.marker.isDirty()&&(s.clear(),s.cleanup()),s.update(r?i:[])}async updateMarkerNodes(e){let{markerSelection:t,isHighlight:i}=e,{xKey:s,yKey:r,marker:a,fill:o,stroke:n,strokeWidth:l,fillOpacity:h,strokeOpacity:d,highlightStyle:u}
206=this.properties,c=pk(i&&u.item,a.getStyle(),{fill:o,stroke:n,strokeWidth:l,fillOpacity:h,strokeOpacity:d});t.each((e,t)=>{this.updateMarkerStyle(e,a,{datum:t,highlighted:i,xKey:s,yKey:r},c,{selected:t.selected})}),i||this.properties.marker.markClean()}async updateLabelSelection(e){let{labelData:t,labelSelection:i}=e;return i.update(t)}async updateLabelNodes(e){let{labelSelection:t}=e,{enabled:i,fontStyle:s,fontWeight:r,fontSize:a,fontFamily:o,color:n}=this.properties.label;t.each((e,t)=>{let{x:l,y:h,labelText:d}=t;d&&i&&this.visible?(e.fontStyle=s,e.fontWeight=r,e.fontSize=a,e.fontFamily=o,e.textAlign="center",e.textBaseline="bottom",e.text=d,e.x=l,e.y=h-10,e.fill=n,e.visible=!0):e.visible=!1})}getTooltipHtml(e){let{id:t,axes:i,dataModel:s}=this,{xKey:r,xName:a,yName:o,tooltip:n,marker:l}=this.properties,{yKey:h,xValue:d,yValue:u,datum:c,itemId:p}=e,g=i.x,m=i.y;if(!this.properties.isValid()||!(g&&m&&pE(u))||!s)return v5;let v=g.formatDatum(d),f=m.formatDatum(u),C=SW(o),y=SW(v+": "+f),w=pk({fill:this.properties.fill},l.getStyle(),{stroke:this.properties.stroke,strokeWidth:this.properties.strokeWidth}),{fill:b}=this.getMarkerStyle(l,{datum:e,xKey:r,yKey:h,highlighted:!1},w);return n.toTooltipHtml({title:C,content:y,backgroundColor:b},{datum:c,itemId:p,xKey:r,xName:a,yKey:h,yName:o,color:b,title:C,seriesId:t})}getLegendData(e){var t,i,s,r,a;if(!(null!=(t=this.data)&&t.length)||!this.properties.isValid()||!this.properties.showInLegend||"category"!==e)return[];let{yKey:o,yName:n,fill:l,stroke:h,fillOpacity:d,strokeOpacity:u,strokeWidth:c,lineDash:p,marker:g,visible:m,legendItemName:v}=this.properties,f=!g.enabled||void 0===g.fill;return[{legendType:e,id:this.id,itemId:o,seriesId:this.id,enabled:m,label:{text:null!=(i=null!=v?v:n)?i:o},symbols:[{marker:{shape:g.shape,fill:f?l:g.fill,fillOpacity:f?d:g.fillOpacity,stroke:null!=(s=g.stroke)?s:h,strokeOpacity:null!=(r=g.strokeOpacity)?r:u,strokeWidth:null!=(a=g.strokeWidth)?a:0,enabled:g.enabled||c<=0},line:{stroke:h,strokeOpacity:u,strokeWidth:c,lineDash:p}}],legendItemName:v}]}animateEmptyUpdateReady(e){let{markerSelection:t,labelSelection:i,contextData:s,paths:r}=e,{animationManager:a}=this.ctx;this.updateAreaPaths(r,s),x3(this,a,...r),mm([t],x_),xW(this,a,t),xf(this,"labels",a,i)}animateReadyResize(e){let{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){let{animationManager:t}=this.ctx,{markerSelection:i,labelSelection:s,contextData:r,paths:a,previousContextData:o}=e,[n,l]=a;if(null==n&&null==l)return;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);let h=()=>{this.resetPathAnimation(e),this.updateAreaPaths(a,r)},d=()=>{t.skipCurrentBatch(),h()};if(null==r||null==o){h(),xH(this,t,"added",i),x4(this,"fill_path_properties",t,"add",n),x4(this,"stroke_path_properties",t,"add",l),xf(this,"labels",t,s);return}if(r.crossFiltering!==o.crossFiltering)return void d();let u=ME(r,o);void 0===u?d():"no-op"===u.status||(xH(this,t,void 0,i),p3(this.id,"fill_path_properties",t,[n],u.fill.pathProperties),SV(this.id,"fill_path_update",t,[n],u.fill.path),p3(this.id,"stroke_path_properties",t,[l],u.stroke.pathProperties),SV(this.id,"stroke_path_update",t,[l],u.stroke.path),xf(this,"labels",t,s),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(a,r)}))}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new m1}getFormattedMarkerStyle(e){let{xKey:t,yKey:i}=e;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return xY(this,e)}};MI.className="AreaSeries",MI.type="area";var MA={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",moduleFactory:e=>new MI(e),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{nodeClickRange:"nearest",tooltip:{position:{type:"node"}},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:Si,xOffset:3,yOffset:3,blur:5},interpolation:{type:"linear",tension:1,position:"end"},marker:{enabled:!1,shape:"circle",size:7,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:b3,color:b4}}},paletteFactory:e=>{let{marker:t}=bY(e);return{fill:t.fill,stroke:t.stroke,marker:t}}};function MR(e,t){return i=>t(i)?[{...e[0],position:e[1].position},{...e[1],position:e[0].position}]:e}function MT(e,t){for(let i of t){let t=i.datum;void 0===t?u8.error("undefined datum"):e.addValue(i,t)}}function ML(e,t){let{x:i,y:s}=t,{nearest:r,distanceSquared:a}=e.getQuadTree().find(i,s);if(void 0!==r)return{datum:r.value,distance:Math.sqrt(a)}}var MF=class extends bn{constructor(){super(...arguments),this.direction="vertical"}};uQ([gM(mt)],MF.prototype,"direction",2);var MP=class extends bl{constructor(){super(...arguments),this.groupScale=new gw,this.smallestDataInterval=void 0,this.largestDataInterval=void 0}padBandExtent(e,t){var i;let s=pE(this.smallestDataInterval)?this.smallestDataInterval*("boolean"==typeof t?1:.5):0,r=null!=(i=p7(e))?i:[0/0,0/0];return"boolean"==typeof t?r[+!t]-=(t?1:-1)*s:(r[0]-=s,r[1]+=s),y2(r)}getBandScalePadding(){return{inner:.3,outer:.15}}shouldFlipXY(){return!this.isVertical()}isVertical(){return"vertical"===this.properties.direction}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){let e=this.getBarDirection();return this.axes[e]}getCategoryAxis(){let e=this.getCategoryDirection();return this.axes[e]}getBandwidth(e){return p8.is(e.scale)?e.scale.calcBandwidth(this.smallestDataInterval):e.scale.bandwidth}updateGroupScale(e){let t=[],{groupScale:i}=this,s=this.getBandwidth(e),{index:r,visibleGroupCount:a}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);for(let e=0;e<a;e++)t.push(String(e));return i.domain=t,i.range=[0,null!=s?s:0],e instanceof f2?i.paddingInner=e.groupPaddingInner:e instanceof f8?i.padding=.1:i.padding=0,i.roun
206d=0!==i.padding,{barWidth:i.bandwidth>=1?i.bandwidth:i.rawBandwidth,groupIndex:r}}resolveKeyDirection(e){return"x"===this.getBarDirection()?"x"===e?"y":"x":e}initQuadTree(e){MT(e,this.datumNodesIter())}pickNodeClosestDatum(e){return ML(this,e)}},Mk=class extends fa{constructor(){super(...arguments),this.placement="inside-center",this.padding=0}};uQ([gM(ma(["inside-center","inside-start","inside-end","outside-start","outside-end",{value:"inside",deprecatedTo:"inside-center"},{value:"outside",deprecatedTo:"outside-end"}],"a placement"))],Mk.prototype,"placement",2),uQ([gM(gF)],Mk.prototype,"padding",2);var MN=class extends MF{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.crisp=void 0,this.shadow=new xb,this.label=new Mk,this.tooltip=new xD,this.sparklineMode=!1}};function MO(e,t){var i,s,r,a,o,n;e.crisp=null==(i=t.crisp)||i,e.fill=t.fill,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineDash=t.lineDash,e.lineDashOffset=t.lineDashOffset,e.fillShadow=t.fillShadow,e.topLeftCornerRadius=!1!==t.topLeftCornerRadius&&null!=(s=t.cornerRadius)?s:0,e.topRightCornerRadius=!1!==t.topRightCornerRadius&&null!=(r=t.cornerRadius)?r:0,e.bottomRightCornerRadius=!1!==t.bottomRightCornerRadius&&null!=(a=t.cornerRadius)?a:0,e.bottomLeftCornerRadius=!1!==t.bottomLeftCornerRadius&&null!=(o=t.cornerRadius)?o:0,e.visible=null==(n=t.visible)||n}function MG({datum:e,isHighlighted:t,style:i,highlightStyle:s,itemStyler:r,seriesId:a,ctx:{callbackCache:o},...n}){var l,h,d,u,c,p,g,m,v,f,C,y,w,b,S,x;let M,{fill:D,fillOpacity:E,stroke:I,strokeWidth:A,strokeOpacity:R,lineDash:T,lineDashOffset:L,cornerRadius:F=0}=pk(t&&s,i);return r&&(M=o.call(r,{datum:e.datum,xKey:e.xKey,fill:D,fillOpacity:E,stroke:I,strokeWidth:A,strokeOpacity:R,lineDash:T,lineDashOffset:L,cornerRadius:F,highlighted:t,seriesId:a,...n})),{fill:null!=(l=null==(h=M)?void 0:h.fill)?l:D,fillOpacity:null!=(d=null==(u=M)?void 0:u.fillOpacity)?d:E,stroke:null!=(c=null==(p=M)?void 0:p.stroke)?c:I,strokeWidth:null!=(g=null==(m=M)?void 0:m.strokeWidth)?g:A,strokeOpacity:null!=(v=null==(f=M)?void 0:f.strokeOpacity)?v:R,lineDash:null!=(C=null==(y=M)?void 0:y.lineDash)?C:T,lineDashOffset:null!=(w=null==(b=M)?void 0:b.lineDashOffset)?w:L,cornerRadius:null!=(S=null==(x=M)?void 0:x.cornerRadius)?S:F,topLeftCornerRadius:i.topLeftCornerRadius,topRightCornerRadius:i.topRightCornerRadius,bottomRightCornerRadius:i.bottomRightCornerRadius,bottomLeftCornerRadius:i.bottomLeftCornerRadius,fillShadow:i.fillShadow}}function MB(e,t,i,s){if(null!=t){let[e,i]=t;if(0!==e||1!==i)return!1}if(p8.is(e)){let t=e.calcBandwidth(s)-e.calcBandwidth(i);if(t>0&&t<1)return!1}return!0}uQ([gM(gL)],MN.prototype,"xKey",2),uQ([gM(gL,{optional:!0})],MN.prototype,"xName",2),uQ([gM(gL)],MN.prototype,"yKey",2),uQ([gM(gL,{optional:!0})],MN.prototype,"yName",2),uQ([gM(gL,{optional:!0})],MN.prototype,"yFilterKey",2),uQ([gM(gL,{optional:!0})],MN.prototype,"stackGroup",2),uQ([gM(gF,{optional:!0})],MN.prototype,"normalizedTo",2),uQ([gM(gY)],MN.prototype,"fill",2),uQ([gM(gO)],MN.prototype,"fillOpacity",2),uQ([gM(gY)],MN.prototype,"stroke",2),uQ([gM(gN)],MN.prototype,"strokeWidth",2),uQ([gM(gO)],MN.prototype,"strokeOpacity",2),uQ([gM(g3)],MN.prototype,"lineDash",2),uQ([gM(gN)],MN.prototype,"lineDashOffset",2),uQ([gM(gN)],MN.prototype,"cornerRadius",2),uQ([gM(gR,{optional:!0})],MN.prototype,"crisp",2),uQ([gM(gT,{optional:!0})],MN.prototype,"itemStyler",2),uQ([gM(gI,{optional:!0})],MN.prototype,"shadow",2),uQ([gM(gI)],MN.prototype,"label",2),uQ([gM(gI)],MN.prototype,"tooltip",2),uQ([gM(gR)],MN.prototype,"sparklineMode",2);var Mz=e=>{var t;return cQ(null!=(t=e.yValue)?t:0)};function MV(e,t,i){var s;let r,a,o,{startingX:n,startingY:l}=(r=t[(s=e)?"y":"x"],a=1/0,o=0,r&&(s?o=r.scale.convert(p8.is(r.scale)?0:Math.max(...r.range)):a=r.scale.convert(p8.is(r.scale)?0:Math.min(...r.range))),{startingX:a,startingY:o});return{isVertical:e,calculate:(t,i)=>{let s,r=e?t.x:n,a=e?l:t.y,o=e?t.width:0,h=e?0:t.height,{opacity:d}=t;return i&&(isNaN(r)||isNaN(a))&&({x:r,y:a}=i,o=e?i.width:0,h=e?0:i.height,e&&!Mz(i)?a+=i.height:!e&&Mz(i)&&(r+=i.width)),s=null==t.clipBBox?void 0:Mz(t)?e?new c4(r,a-h,o,h):new c4(r-o,a,o,h):new c4(r,a,o,h),{x:r,y:a,width:o,height:h,clipBBox:s,opacity:d}},mode:i}}function MH(e,t){return{isVertical:e,calculate:t=>({x:e?t.x:t.x+t.width/2,y:e?t.y+t.height/2:t.y,width:e?t.width:0,height:e?0:t.height,clipBBox:t.clipBBox,opacity:t.opacity}),mode:t}}function Mj(e){let t=e=>null==e||isNaN(e.x)||isNaN(e.y);return{toFn:(i,s,r)=>
206"removed"===r&&null==i.datum&&"fade"===e.mode?{...MW(i,s),opacity:0}:"removed"===r||t(s)?e.calculate(s,i.previousDatum):{x:s.x,y:s.y,width:s.width,height:s.height,clipBBox:s.clipBBox,opacity:s.opacity},fromFn:(i,s,r)=>{let a;"updated"===r&&t(s)?r="removed":"updated"===r&&t(i.previousDatum)&&(r="added"),a="added"===r&&null==i.previousDatum&&"fade"===e.mode?{...MW(i,s),opacity:0}:"unknown"===r||"added"===r?e.calculate(s,i.previousDatum):{x:i.x,y:i.y,width:i.width,height:i.height,clipBBox:i.clipBBox,opacity:i.opacity};let o=p2[r];return{...a,phase:o}}}}function MW(e,{x:t,y:i,width:s,height:r,clipBBox:a,opacity:o}){return{x:t,y:i,width:s,height:r,clipBBox:a,opacity:o}}function MU(e,t,i){if(void 0===e)return;let{x:s,y:r,width:a,height:o}=e;return mJ.toCanvas(t,new c4(s,r,a,o)).clip(i)}function M_(e,t,i){if(t.enabled&&i){let{x:s,y:r,text:a,textAlign:o,textBaseline:n}=i,{color:l,fontStyle:h,fontWeight:d,fontSize:u,fontFamily:c}=t;e.setProperties({visible:!0,x:s,y:r,text:a,fill:l,fontStyle:h,fontWeight:d,fontSize:u,fontFamily:c,textAlign:o,textBaseline:n})}else e.visible=!1}var M$={"inside-start":{inside:!0,direction:-1,textAlignment:1},"inside-end":{inside:!0,direction:1,textAlignment:-1},"outside-start":{inside:!1,direction:-1,textAlignment:-1},"outside-end":{inside:!1,direction:1,textAlignment:1}};function MY({isUpward:e,isVertical:t,placement:i,padding:s=0,rect:r}){let a=r.x+r.width/2,o=r.y+r.height/2,n="center",l="middle";if("inside-center"!==i){let h=(e?1:-1)*(t?-1:1),{direction:d,textAlignment:u}=M$[i],c=(d+1)*.5;t?(o=(e?r.y+r.height:r.y)+r.height*h*c+s*u*h,l=u===h?"top":"bottom"):(a=(e?r.x:r.x+r.width)+r.width*h*c+s*u*h,n=u===h?"left":"right")}return{x:a,y:o,textAlign:n,textBaseline:l}}var MK={"inside-center":"inside-center","inside-start":"inside-start","inside-end":"inside-end","outside-start":"outside-start","outside-end":"outside-end",inside:"inside-center",outside:"outside-end"},MZ=class extends MP{constructor(e){super({moduleCtx:e,directionKeys:br,directionNames:ba,pickModes:[2,1,0],pathsPerSeries:[],hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:MW,label:xy}}),this.properties=new MN}get pickModeAxis(){return this.properties.sparklineMode?"main":void 0}crossFilteringEnabled(){return null!=this.properties.yFilterKey&&(null==this.seriesGrouping||0===this.seriesGrouping.stackIndex)}async processData(e){var t,i,s,r;if(!this.properties.isValid()||!this.data)return;let{seriesGrouping:{groupIndex:a=this.id}={},data:o=[]}=this,{xKey:n,yKey:l,yFilterKey:h,normalizedTo:d}=this.properties,u=!this.ctx.animationManager.isSkipped(),c=null==(t=this.getCategoryAxis())?void 0:t.scale,p=null==(i=this.getValueAxis())?void 0:i.scale,{isContinuousX:g,xScaleType:m,yScaleType:v}=this.getScaleInformation({xScale:c,yScale:p}),f=`bar-stack-${a}-yValues`,C=`${f}-trailing`,y=[];pE(d)&&y.push(xo([f,C],Math.abs(d),"range")),u&&this.processedData&&y.push(xm(this.processedData)),u&&y.push(xh());let w=this.visible?{}:{forceValue:0},{processedData:b}=await this.requestDataModel(e,o,{props:[S6(n,m,{id:"xValue"}),S5(l,v,{id:"yValue-raw",invalidValue:null,...w}),...this.crossFilteringEnabled()?[S5(h,v,{id:"yFilterValue",invalidValue:null,...w})]:[],...xe(l,"normal","current",{id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:f,separateNegative:!0,...w},v),...xe(l,"trailing","current",{id:"yValue-start",invalidValue:null,missingValue:0,groupId:C,separateNegative:!0,...w},v),...g?[xi,xs]:[],...y],groupByKeys:!0,groupByData:!1});this.smallestDataInterval=null==(s=b.reduced)?void 0:s.smallestKeyInterval,this.largestDataInterval=null==(r=b.reduced)?void 0:r.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(e){let{processedData:t,dataModel:i}=this;if(!i||!(null!=t&&t.data.length))return[];let s=i.resolveProcessedDataDefById(this,"xValue"),r=i.getDomain(this,"xValue","key",t),a=i.getDomain(this,"yValue-end","value",t),o=this.crossFilteringEnabled()?i.getDomain(this,"yFilterValue","value",t):void 0;return(null!=o&&(a=[Math.min(a[0],o[0]),Math.max(a[1],o[1])]),e===this.getCategoryDirection())?(null==s?void 0:s.def.type)==="key"&&"category"===s.def.valueType?r:this.padBandExtent(r):this.getValueAxis()instanceof bf?y2(a):y2([Math.min(0,a[0]),Math.max(0,a[1])])}async createNodeData(){let{dataModel:e}=this,t=this.getCategoryAxis(),i=this.getValueAxis();if(!e||!t||!i||!this.properties.isValid())return;let s=t.scale,r=i.scale,{xKey:a,yKey:o,xName:n,yName:l,fill:h,stroke:d,strokeWidth:u,cornerRadius:c,legendItemName:p,label:g}=this.properties,m=i.isReversed(),{barWidth:v,groupIndex:f}=this.updateGroupScale(t),C=p8.is(s)?-.5*v:0,y=e.resolveProcessedDataIndexById(this,"xValue"),w=e.resolveProcessedDataIndexById(this,"yValue-raw"),b=this.crossFilteringEnabled()?e.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,S=e.resolveProcessedDataIndexById(this,"yValue-start"),x=e.resolveProcessedDataIndexById(this,"yValue-end"),M=e.resolveProcessedDataIndexById(this,"yValue-range"),D=!this.ctx.animationManager.isSkipped(),E=({datum:e,valueIndex:t,xValue:i,yValue:n,cumulativeValue:l,phantom:p,currY:y,prevY:w,isPositive:b,yRange:S,labelText:x,crossScale:M=1})=>{let D=s.convert(i),E=b!==m,A=D+I.convert(String(f))+C,R=r.convert(y),T=r.convert(w),L="x"===this.getBarDirection(),F=r.convert(S),P=r.convert(0),k=.5*v*(1-M),N={x:L?Math.min(R,T):A+k,y:L?A+k:Math.min(R,T),width:L?Math.abs(T-R):v*M,height:L?v*M:Math.abs(T-R)},O=new c4(N.x,N.y,N.width,N.height),G={x:L?Math.min(P,F):A+k,y:L?A+k:Math.min(P,F),width:L?Math.abs(P-F):v*M,height:L?v*M:Math.abs(P-F)},B=this.shouldFlipXY()?N.height:N.width;return{series:this,itemId:p?xv(o,p):o,datum:e,valueIndex:t,cumulativeValue:l,phantom:p,xValue:i,yValue:n,yKey:o,xKey:a,capDefaults:{lengthRatioMultiplier:B,lengthMax:B},x:G.x,y:G.y,width:G.width,height:G.height,midPoint:{x:N.x+N.width/2,y:N.y+N.height/2},fill:h,stroke:d,opacity:1,strokeWidth:u,cornerRadius:c,topLeftCornerRadius:L!==E,topRightCornerRadius:E,bottomRightCornerRadius:L===E,bottomLeftCornerRadius:!E,clipBBox:O,label:null!=x?{text:x,...MY({isU
206pward:E,isVertical:!L,placement:MK[g.placement],padding:g.padding,rect:N})}:void 0,missing:null==n,focusable:!p}},{groupScale:I,processedData:A}=this,R=[],T=[],L=[];return null==A||A.data.forEach(({keys:e,datum:t,values:i,aggValues:s})=>{i.forEach((i,r)=>{var h;let d=e[y],u=i[w],c=Number(i[S]),g=null!=b?Number(i[b]):void 0,m=Number(i[x]),v=u>=0&&!Object.is(u,-0),f=null!=(h=null==s?void 0:s[M][+!!v])?h:0;if(!Number.isFinite(m)||null!=g&&!Number.isFinite(g))return;let C=null!=u?this.getLabelText(this.properties.label,{datum:t[r],value:null!=g?g:u,xKey:a,yKey:o,xName:n,yName:l,legendItemName:p},SH):void 0,D=null!=g&&g>u,I=E({datum:t[r],valueIndex:r,xValue:d,yValue:null!=g?g:u,cumulativeValue:null!=g?g:m,phantom:!1,currY:null!=g?c+g:m,prevY:c,isPositive:v,yRange:Math.max(c+(null!=g?g:-1/0),f),labelText:C,crossScale:D?.6:void 0});if(T.push(I),L.push(I),null!=g){let e=E({datum:t[r],valueIndex:r,xValue:d,yValue:g,cumulativeValue:g,phantom:!0,currY:m,prevY:c,isPositive:v,yRange:f,labelText:void 0,crossScale:void 0});R.push(e)}})}),{itemId:o,nodeData:R.length>0?[...R,...T]:T,labelData:L,scales:this.calculateScaling(),visible:this.visible||D}}nodeFactory(){return new bS}getHighlightData(e,t){let i=e.find(e=>e.datum===t.datum&&!e.phantom);return null!=i?[i]:void 0}async updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>xv(e.xValue,e.valueIndex,e.phantom))}async updateDatumNodes(e){var t;if(!this.properties.isValid())return;let{yKey:i,stackGroup:s,fill:r,fillOpacity:a,stroke:o,strokeWidth:n,strokeOpacity:l,lineDash:h,lineDashOffset:d,itemStyler:u,shadow:c,highlightStyle:{item:p}}=this.properties,g=this.axes.x,m=null!=(t=this.properties.crisp)?t:MB(null==g?void 0:g.scale,null==g?void 0:g.visibleRange,this.smallestDataInterval,this.largestDataInterval),v="x"===this.getCategoryDirection(),f={fill:r,stroke:o,lineDash:h,lineDashOffset:d,fillShadow:c,strokeWidth:this.getStrokeWidth(n),fillOpacity:0,strokeOpacity:0},C={datum:void 0,ctx:this.ctx,seriesId:this.id,isHighlighted:e.isHighlight,highlightStyle:p,yKey:i,style:f,itemStyler:u,stackGroup:s};e.datumSelection.each((e,t)=>{var i,s,r,o;f.fillOpacity=a*(t.phantom?.2:1),f.strokeOpacity=l*(t.phantom?.2:1),f.cornerRadius=t.cornerRadius,f.topLeftCornerRadius=t.topLeftCornerRadius,f.topRightCornerRadius=t.topRightCornerRadius,f.bottomRightCornerRadius=t.bottomRightCornerRadius,f.bottomLeftCornerRadius=t.bottomLeftCornerRadius;let n=v?(null!=(i=null==(s=t.clipBBox)?void 0:s.width)?i:t.width)>0:(null!=(r=null==(o=t.clipBBox)?void 0:o.height)?r:t.height)>0;C.datum=t;let h=MG(C);h.crisp=m,h.visible=n,MO(e,h)})}async updateLabelSelection(e){let t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t,e=>{e.pointerEvents=1})}async updateLabelNodes(e){e.labelSelection.each((e,t)=>{M_(e,this.properties.label,t.label)})}getTooltipHtml(e){var t,i,s;let r,{id:a,processedData:o,ctx:{callbackCache:n}}=this,l=this.getCategoryAxis(),h=this.getValueAxis();if(!o||!this.properties.isValid()||!l||!h)return v5;let{xKey:d,yKey:u,xName:c,yName:p,fill:g,stroke:m,strokeWidth:v,tooltip:f,itemStyler:C,stackGroup:y,legendItemName:w}=this.properties,{xValue:b,yValue:S,datum:x,itemId:M}=e,D=l.formatDatum(b),E=h.formatDatum(S),I=SW(p),A=SW(D+": "+E);C&&(r=n.call(C,{seriesId:a,datum:x,xKey:d,yKey:u,stackGroup:y,fill:g,stroke:m,strokeWidth:this.getStrokeWidth(v),highlighted:!1,cornerRadius:this.properties.cornerRadius,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,lineDash:null!=(s=this.properties.lineDash)?s:[],lineDashOffset:this.properties.lineDashOffset}));let R=null!=(t=null==(i=r)?void 0:i.fill)?t:g;return f.toTooltipHtml({title:I,content:A,backgroundColor:R},{seriesId:a,itemId:M,datum:x,xKey:d,yKey:u,xName:c,yName:p,stackGroup:y,title:I,color:R,legendItemName:w,...this.getModuleTooltipParams()})}getLegendData(e){var t,i;let{showInLegend:s}=this.properties;if("category"!==e||!(null!=(t=this.data)&&t.length)||!this.properties.isValid()||!s)return[];let{yKey:r,yName:a,fill:o,stroke:n,strokeWidth:l,fillOpacity:h,strokeOpacity:d,legendItemName:u,visible:c}=this.properties;
206return[{legendType:"category",id:this.id,itemId:r,seriesId:this.id,enabled:c,label:{text:null!=(i=null!=u?u:a)?i:r},symbols:[{marker:{fill:o,fillOpacity:h,stroke:n,strokeWidth:l,strokeOpacity:d}}],legendItemName:u}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t,annotationSelections:i}){let s=Mj(MV(this.isVertical(),this.axes,"normal"));p3(this.id,"nodes",this.ctx.animationManager,[e],s),xf(this,"labels",this.ctx.animationManager,t),xf(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(e){var t,i;let{datumSelection:s,labelSelection:r,annotationSelections:a,previousContextData:o}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);let n=null==(t=this.processedData)||null==(t=t.reduced)?void 0:t.diff,l=Mj(MV(this.isVertical(),this.axes,null==o?"fade":"normal"));p3(this.id,"nodes",this.ctx.animationManager,[s],l,(e,t)=>xv(t.xValue,t.valueIndex,t.phantom),n),(null==(i=null==n?void 0:n.changed)||i)&&(xf(this,"labels",this.ctx.animationManager,r),xf(this,"annotations",this.ctx.animationManager,...a))}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:t}){var i;return MU(null==(i=this.contextNodeData)?void 0:i.nodeData[e].clipBBox,this.contentGroup,t)}};MZ.className="BarSeries",MZ.type="bar";var Mq={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",moduleFactory:e=>new MZ(e),stackable:!0,groupable:!0,tooltipDefaults:{range:"exact"},defaultAxes:MR([{type:"number",position:"left"},{type:"category",position:"bottom"}],e=>(null==e?void 0:e.direction)==="horizontal"),themeTemplate:{series:{direction:"vertical",fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:"normal",fontSize:12,fontFamily:b3,color:b5,placement:"inside-center"},shadow:{enabled:!1,color:Si,xOffset:3,yOffset:3,blur:5},errorBar:{cap:{lengthRatio:.3}}}},paletteFactory:b$},MQ=class extends xx{constructor(){super(...arguments),this.maxSize=30}};uQ([gM(gN),c5({redraw:3})],MQ.prototype,"maxSize",2),uQ([gM(gq,{optional:!0}),c5({redraw:3})],MQ.prototype,"domain",2);var MX=class extends fa{constructor(){super(...arguments),this.placement="top"}};uQ([gM(mr)],MX.prototype,"placement",2);var MJ=class extends bn{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.label=new MX,this.tooltip=new xD,this.marker=new MQ}};uQ([gM(gL)],MJ.prototype,"xKey",2),uQ([gM(gL)],MJ.prototype,"yKey",2),uQ([gM(gL)],MJ.prototype,"sizeKey",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"labelKey",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"colorKey",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"xFilterKey",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"yFilterKey",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"sizeFilterKey",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"xName",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"yName",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"sizeName",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"labelName",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"colorName",2),uQ([gM(gq,{optional:!0})],MJ.prototype,"colorDomain",2),uQ([gM(gK)],MJ.prototype,"colorRange",2),uQ([gM(gL,{optional:!0})],MJ.prototype,"title",2),uQ([vW("marker.shape")],MJ.prototype,"shape",2),uQ([vW("marker.size")],MJ.prototype,"size",2),uQ([vW("marker.maxSize")],MJ.prototype,"maxSize",2),uQ([vW("marker.domain",{optional:!0})],MJ.prototype,"domain",2),uQ([vW("marker.fill",{optional:!0})],MJ.prototype,"fill",2),uQ([vW("marker.fillOpacity")],MJ.prototype,"fillOpacity",2),uQ([vW("marker.stroke",{optional:!0})],MJ.prototype,"stroke",2),uQ([vW("marker.strokeWidth")],MJ.prototype,"strokeWidth",2),uQ([vW("marker.strokeOpacity")],MJ.prototype,"strokeOpacity",2),uQ([vW("marker.itemStyler",{optional:!0})],MJ.prototype,"itemStyler",2),uQ([gM(gI)],MJ.prototype,"label",2),uQ([gM(gI)],MJ.prototype,"tooltip",2);var M0=class extends bo{constructor(e,t,i,s){super(e,t,i,s),this.sizeKey=s.properties.sizeKey}},M1=class extends bl{constructor(e){super({moduleCtx:e,directionKeys:br,directionNames:ba,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:xy,marker:xU}}),this.NodeEvent=M0,this.properties=new MJ,this.sizeScale=new bg,this.colorScale=new vv}get pickModeAxis(){return"main-category"}async processData(e){var t,i,s,r;if(!this.properties.isValid()||null==this.data||!this.visible)return;let a=null==(t=this.axes.x)?void 0:t.scale,o=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:n,yScaleType:l}=this.getScaleInformation({xScale:a,yScale:o}),h=this.colorScale.type,d=this.sizeScale.type,{xKey:u,yKey:c,sizeKey:p,xFilterKey:g,yFilterKey:m,sizeFilterKey:v,labelKey:f,colorDomain:C,colorRange:y,colorKey:w,marker:b}=this.properties,{dataModel:S,processedData:x}=await this.requestDataModel(e,this.data,{props:[S5(u,n,{id:"xValue"}),S5(c,l,{id:"yValue"}),...null!=g?[S5(g,n,{id:"xFilterValue"})]:[],...null!=m?[S5(m,l,{id:"yFilterValue"})]:[],...null!=v?[S5(v,d,{id:"sizeFilterValue"})]:[],S5(p,d,{id:"sizeValue"}),...w?[S5(w,h,{id:"colorValue"})]:[],...f?[S5(f,"band",{id:"labelValue"})]:[]]}),M=S.resolveProcessedDataIndexById(this,"sizeValue"),D=null!=(s=x.domain.values[M])?s:[];if(this.sizeScale.domain=b.domain?b.domain:D,w){let e=S.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=null!=(r=null!=C?C:x.domain.values[e])?r:[],this.colorScale.range=y,this.colorScale.update(
206)}this.animationState.transition("updateData")}getSeriesDomain(e){let{dataModel:t,processedData:i}=this;if(!i||!t)return[];let s="x"===e?"xValue":"yValue",r=t.resolveProcessedDataDefById(this,s),a=t.getDomain(this,s,"value",i);return(null==r?void 0:r.def.type)==="value"&&(null==r?void 0:r.def.valueType)==="category"?a:y2(p7(a))}async createNodeData(){var e,t,i;let{axes:s,dataModel:r,processedData:a,colorScale:o,sizeScale:n}=this,{xKey:l,yKey:h,sizeKey:d,xFilterKey:u,yFilterKey:c,sizeFilterKey:p,labelKey:g,xName:m,yName:v,sizeName:f,labelName:C,label:y,colorKey:w,marker:b,visible:S}=this.properties,x=w5(b.shape),{placement:M}=y,D=s.x,E=s.y;if(!(r&&a&&S&&D&&E))return;let I=r.resolveProcessedDataIndexById(this,"xValue"),A=r.resolveProcessedDataIndexById(this,"yValue"),R=null!=d?r.resolveProcessedDataIndexById(this,"sizeValue"):void 0,T=null!=w?r.resolveProcessedDataIndexById(this,"colorValue"):-1,L=null!=g?r.resolveProcessedDataIndexById(this,"labelValue"):-1,F=null!=u?r.resolveProcessedDataIndexById(this,"xFilterValue"):void 0,P=null!=c?r.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,k=null!=p?r.resolveProcessedDataIndexById(this,"sizeFilterValue"):void 0,N=D.scale,O=E.scale,G=(null!=(e=N.bandwidth)?e:0)/2,B=(null!=(t=O.bandwidth)?t:0)/2,z=[];n.range=[b.size,b.maxSize];let V=y.getFont(),H=vM.getMeasurer({font:V});for(let{values:e,datum:t}of null!=(i=a.data)?i:[]){let i,s=e[I],r=e[A],a=null!=R?e[R]:void 0,u=N.convert(s)+G,c=O.convert(r)+B;null!=F&&null!=P&&(i=e[F]===s&&e[P]===r,null!=k&&i&&(i=e[k]===a));let p=this.getLabelText(y,{value:g?e[L]:r,datum:t,xKey:l,yKey:h,sizeKey:d,labelKey:g,xName:m,yName:v,sizeName:f,labelName:C}),S=H.measureText(String(p)),D=a?n.convert(a):b.size,E=w?o.convert(e[T]):void 0;z.push({series:this,itemId:h,yKey:h,xKey:l,datum:t,xValue:s,yValue:r,sizeValue:a,point:{x:u,y:c,size:D},midPoint:{x:u,y:c},fill:E,label:{text:p,...S},marker:x,placement:M,selected:i})}return{itemId:h,nodeData:z,labelData:z,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){var e,t;return null!=(e=null==(t=this.contextNodeData)?void 0:t.labelData)?e:[]}markerFactory(){let{shape:e}=this.properties.marker;return new(w5(e))}async updateMarkerSelection(e){let{nodeData:t,markerSelection:i}=e;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());let s=this.properties.marker.enabled?t:[];return i.update(s,void 0,e=>xv([e.xValue,e.yValue,e.label.text]))}async updateMarkerNodes(e){let{markerSelection:t,isHighlight:i}=e,{xKey:s,yKey:r,sizeKey:a,labelKey:o,marker:n}=this.properties,{size:l,shape:h,fill:d,fillOpacity:u,stroke:c,strokeWidth:p,strokeOpacity:g}=pk(i&&this.properties.highlightStyle.item,n.getStyle()),m={size:l,shape:h,fill:d,fillOpacity:u,stroke:c,strokeWidth:p,strokeOpacity:g};this.sizeScale.range=[n.size,n.maxSize],t.each((e,t)=>{this.updateMarkerStyle(e,n,{datum:t,highlighted:i,xKey:s,yKey:r,sizeKey:a,labelKey:o},m,{selected:t.selected})}),i||this.properties.marker.markClean()}async updateLabelSelection(e){var t,i;let s=this.properties.label.enabled&&null!=(t=null==(i=this.chart)?void 0:i.placeLabels().get(this))?t:[];return e.labelSelection.update(s.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})))}async updateLabelNodes(e){let{label:t}=this.properties;e.labelSelection.each((e,i)=>{var s,r,a,o;e.text=i.label.text,e.fill=t.color,e.x=null!=(s=null==(r=i.point)?void 0:r.x)?s:0,e.y=null!=(a=null==(o=i.point)?void 0:o.y)?a:0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})}getTooltipHtml(e){var t;let i=this.axes.x,s=this.axes.y;if(!this.properties.isValid()||!i||!s)return v5;let{xKey:r,yKey:a,sizeKey:o,labelKey:n,xName:l,yName:h,sizeName:d,labelName:u,marker:c,tooltip:p}=this.properties,g=null!=(t=this.properties.title)?t:h,m=pk({fill:e.fill,strokeWidth:this.getStrokeWidth(c.strokeWidth)},c.getStyle()),{fill:v="gray"}=this.getMarkerStyle(c,{datum:e,highlighted:!1,xKey:r,yKey:a,sizeKey:o,labelKey:n},m),{datum:f,xValue:C,yValue:y,sizeValue:w,label:{text:b},itemId:S}=e,x=SW(i.formatDatum(C)),M=SW(s.formatDatum(y)),D=`<b>${SW(null!=l?l:r)}</b>: ${x}<br><b>${SW(null!=h?h:a)}</b>: ${M}`;return o&&(D+=`<br><b>${SW(null!=d?d:o)}</b>: ${SW(String(w))}`),n&&(D=`<b>${SW(null!=u?u:n)}</b>: ${SW(b)}<br>`+D),p.toTooltipHtml({title:g,content:D,backgroundColor:v},{datum:f,itemId:S,xKey:r,xName:l,yKey:a,yName:h,sizeKey:o,sizeName:d,labelKey:n,labelName:u,title:g,color:v,seriesId:this.id})}getLegendData(){var e,t;if(!(null!=(e=this.data)&&e.length)||!this.properties.isValid())return[];let{yKey:i,yName:s,title:r,marker:a,visible:o}=this.properties,{shape:n,fill:l,stroke:h,fillOpacity:d,strokeOpacity:u,strokeWidth:c}=a;
206return[{legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:o,label:{text:null!=(t=null!=r?r:s)?t:i},symbols:[{marker:{shape:n,fill:null!=l?l:"rgba(0, 0, 0, 0)",stroke:null!=h?h:"rgba(0, 0, 0, 0)",fillOpacity:null!=d?d:1,strokeOpacity:null!=u?u:1,strokeWidth:null!=c?c:0}}]}]}animateEmptyUpdateReady({markerSelection:e,labelSelection:t}){xj(this,this.ctx.animationManager,e),xf(this,"labels",this.ctx.animationManager,t)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new m1}getFormattedMarkerStyle(e){let{xKey:t,yKey:i,sizeKey:s,labelKey:r}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,sizeKey:s,labelKey:r,highlighted:!1})}computeFocusBounds(e){return xY(this,e)}};M1.className="BubbleSeries",M1.type="bubble";var M2={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",moduleFactory:e=>new M1(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,maxSize:30,fillOpacity:.8,tooltip:{position:{type:"node"}},label:{enabled:!1,fontSize:12,fontFamily:b3,color:b4}}},paletteFactory:b$},M3=class extends bn{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new xb,this.label=new fa,this.tooltip=new xD}};uQ([gM(gL)],M3.prototype,"xKey",2),uQ([gM(gL,{optional:!0})],M3.prototype,"yKey",2),uQ([gM(gL,{optional:!0})],M3.prototype,"xName",2),uQ([gM(gL,{optional:!0})],M3.prototype,"yName",2),uQ([gM(gY,{optional:!0})],M3.prototype,"fill",2),uQ([gM(gO)],M3.prototype,"fillOpacity",2),uQ([gM(gY,{optional:!0})],M3.prototype,"stroke",2),uQ([gM(gN)],M3.prototype,"strokeWidth",2),uQ([gM(gO)],M3.prototype,"strokeOpacity",2),uQ([gM(g3)],M3.prototype,"lineDash",2),uQ([gM(gN)],M3.prototype,"lineDashOffset",2),uQ([gM(gN)],M3.prototype,"cornerRadius",2),uQ([gM(gR)],M3.prototype,"areaPlot",2),uQ([gM(gz,{optional:!0})],M3.prototype,"bins",2),uQ([gM(ma(["count","sum","mean"],"a histogram aggregation"))],M3.prototype,"aggregation",2),uQ([gM(gN,{optional:!0})],M3.prototype,"binCount",2),uQ([gM(gI)],M3.prototype,"shadow",2),uQ([gM(gI)],M3.prototype,"label",2),uQ([gM(gI)],M3.prototype,"tooltip",2);var M4=class extends bl{constructor(e){super({moduleCtx:e,directionKeys:br,directionNames:ba,pickModes:[1,0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:MW,label:xy}}),this.properties=new M3,this.calculatedBins=[]}deriveBins(e){let t=mR(e[0],e[1],10),i=mL(e[0],e[1],10),[s]=t;return[[s-i,s],...t.map(e=>[e,e+i])]}calculateNiceBins(e,t){let i=Math.floor(e[0]),s=e[1],r=t||1,{start:a,binSize:o}=this.calculateNiceStart(i,s,r);return this.getBins(a,s,o,r)}getBins(e,t,i,s){let r=[],a=this.calculatePrecision(i);for(let o=0;o<s;o++){let n=Math.round((e+o*i)*a)/a,l=Math.round((e+(o+1)*i)*a)/a;o===s-1&&(l=Math.max(l,t)),r[o]=[n,l]}return r}calculatePrecision(e){let t=10;if(isFinite(e)&&e>0)for(;e<1;)t*=10,e*=10;return t}calculateNiceStart(e,t,i){let s=Math.abs(t-e)/i,r=Math.pow(10,Math.floor(Math.log10(s)));return{start:Math.floor(e/r)*r,binSize:s}}async processData(e){var t,i;this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));let{xKey:s,yKey:r,areaPlot:a,aggregation:o}=this.properties,n=null==(t=this.axes.x)?void 0:t.scale,l=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:h,yScaleType:d}=this.getScaleInformation({yScale:l,xScale:n}),u=[S6(s,h),xr];if(r){let e=Sq("groupAgg");"count"===o||("sum"===o?e=SK("groupAgg"):"mean"===o&&(e=SQ("groupAgg"))),a&&(e=SX("groupAgg",e)),u.push(S5(r,d,{invalidValue:void 0}),e)}else{let e=Sq("groupAgg");a&&(e=SX("groupAgg",e)),u.push(e)}let c=e=>{var t;let i=y2(e.domain.keys[0]);if(0===i.length)return e.domain.groups=[],()=>[];let s=pD(this.properties.binCount)?this.calculateNiceBins(i,this.properties.binCount):null!=(t=this.properties.bins)?t:this.deriveBins(i),r=s.length;return this.calculatedBins=[...s],e=>{let t=e.keys[0];for(let e=0;e<r;e++){let i=s[e];if(t>=i[0]&&t<i[1]||e===r-1&&t<=i[1])return i}return[]}};!this.ctx.animationManager.isSkipped()&&this.processedData&&u.push(xm(this.processedData,!1)),await this.requestDataModel(e,this.data,{props:u,groupByFn:c}),this.animationState.transition("updateData")}getSeriesDomain(e){var t,i,s,r;let{processedData:a,dataModel:o}=this;if(!a||!o||!this.calculatedBins.length)return[];let n=o.getDomain(this,"groupAgg","aggregate",a),l=null==(t=this.calculatedBins)?void 0:t[0][0],h=null==(i=this.calculatedBins)?void 0:i[(null!=(s=null==(r=this.calculatedBins)?void 0:r.length)?s:0)-1][1];return"x"===e?y2([l,h]):y2(n)}async createNodeData(){var e,t;let{id:i,axes:s,processedData:r,ctx:{callbackCache:a}}=this,o=s.x,n=s.y;if(!o||!n)return;let{scale:l}=o,{scale:h}=n,{xKey:d,yKey:u,xName:c,yName:p,fill:g,stroke:m,strokeWidth:v,cornerRadius:f}=this.properties,C=null!=(e=this.properties.label.formatter)?e:e=>String(e.value),y=[],w={itemId:null!=(t=this.properties.yKey)?t:this.id,nodeData:y,labelData:y,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};
206return this.visible&&r&&"grouped"===r.type&&(r.data.forEach(e=>{let t,{aggValues:[[s,r]]=[[0,0]],datum:o,datum:{length:w},keys:b,keys:[S,x]}=e,M=l.convert(S),D=l.convert(x),E=s+r,I=h.convert(0),A=h.convert(E),R=Math.abs(D-M),T=Math.abs(A-I),L=Math.min(M,D),F=Math.min(I,A);if(0!==E){var P;t={x:L+R/2,y:F+T/2,text:null!=(P=a.call(C,{value:E,datum:o,seriesId:i,xKey:d,yKey:u,xName:c,yName:p}))?P:String(E)}}let k=n.isReversed();y.push({series:this,datum:o,aggregatedValue:E,frequency:w,domain:b,yKey:u,xKey:d,x:L,y:F,xValue:M,yValue:A,width:R,height:T,midPoint:{x:L+R/2,y:F+T/2},fill:g,stroke:m,cornerRadius:f,topLeftCornerRadius:!k,topRightCornerRadius:!k,bottomRightCornerRadius:k,bottomLeftCornerRadius:k,opacity:1,strokeWidth:v,label:t})}),y.sort((e,t)=>e.x-t.x)),w}nodeFactory(){return new bS}async updateDatumSelection(e){let{nodeData:t,datumSelection:i}=e;return i.update(t,e=>{e.crisp=!0},e=>e.domain.join("_"))}async updateDatumNodes(e){let{isHighlight:t}=e,{fillOpacity:i,strokeOpacity:s,lineDash:r,lineDashOffset:a,shadow:o,highlightStyle:{item:{fill:n,fillOpacity:l=i,stroke:h,strokeWidth:d}}}=this.properties;e.datumSelection.each((e,u,c)=>{var p,g;let{cornerRadius:m,topLeftCornerRadius:v,topRightCornerRadius:f,bottomRightCornerRadius:C,bottomLeftCornerRadius:y}=u,w=t&&void 0!==d?d:u.strokeWidth;e.fill=null!=(p=t?n:void 0)?p:u.fill,e.stroke=null!=(g=t?h:void 0)?g:u.stroke,e.fillOpacity=t?l:i,e.strokeOpacity=s,e.strokeWidth=w,e.lineDash=r,e.lineDashOffset=a,e.topLeftCornerRadius=v?m:0,e.topRightCornerRadius=f?m:0,e.bottomRightCornerRadius=C?m:0,e.bottomLeftCornerRadius=y?m:0,e.fillShadow=o,e.zIndex=t?wA.highlightedZIndex:c,e.visible=u.height>0})}async updateLabelSelection(e){let{labelData:t,labelSelection:i}=e;return i.update(t,e=>{e.pointerEvents=1,e.textAlign="center",e.textBaseline="middle"})}async updateLabelNodes(e){let{fontStyle:t,fontWeight:i,fontFamily:s,fontSize:r,color:a}=this.properties.label,o=this.isLabelEnabled();e.labelSelection.each((e,n)=>{o&&null!=n&&n.label?(e.text=n.label.text,e.x=n.label.x,e.y=n.label.y,e.fontStyle=t,e.fontWeight=i,e.fontFamily=s,e.fontSize=r,e.fill=a,e.visible=!0):e.visible=!1})}initQuadTree(e){let{value:t}=this.contentGroup.children().next();t&&MT(e,t.children())}pickNodeClosestDatum(e){return ML(this,e)}getTooltipHtml(e){let t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return v5;let{xKey:s,yKey:r,xName:a,yName:o,fill:n,aggregation:l,tooltip:h}=this.properties,{aggregatedValue:d,frequency:u,domain:[c,p],itemId:g}=e,m=`${SW(null!=a?a:s)}: ${t.formatDatum(c)} - ${t.formatDatum(p)}`,v=r?`<b>${SW(null!=o?o:r)} (${l})</b>: ${i.formatDatum(d)}<br>`:"",f={title:m,backgroundColor:n,content:v+=`<b>Frequency</b>: ${u}`};return h.toTooltipHtml(f,{datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},itemId:g,xKey:s,xName:a,yKey:r,yName:o,color:n,title:m,seriesId:this.id})}getLegendData(e){var t,i;if(!(null!=(t=this.data)&&t.length)||"category"!==e)return[];let{xKey:s,yName:r,fill:a,fillOpacity:o,stroke:n,strokeWidth:l,strokeOpacity:h,visible:d}=this.properties;return[{legendType:"category",id:this.id,itemId:s,seriesId:this.id,enabled:d,label:{text:null!=(i=null!=r?r:s)?i:"Frequency"},symbols:[{marker:{fill:null!=a?a:"rgba(0, 0, 0, 0)",stroke:null!=n?n:"rgba(0, 0, 0, 0)",fillOpacity:o,strokeOpacity:h,strokeWidth:l}}]}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t}){let i=Mj(MV(!0,this.axes,"normal"));p3(this.id,"datums",this.ctx.animationManager,[e],i),xf(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(e){var t;let i=null==(t=this.processedData)||null==(t=t.reduced)?void 0:t.diff,s=Mj(MV(!0,this.axes,"normal"));p3(this.id,"datums",this.ctx.animationManager,[e.datumSelection],s,(e,t)=>xv(t.domain),i),xf(this,"labels",this.ctx.animationManager,e.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:t}){var i;return MU(null==(i=this.contextNodeData)?void 0:i.nodeData[e],this.contentGroup,t)}};M4.className="HistogramSeries",M4.type="histogram";var M6={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",moduleFactory:e=>new M4(e),tooltipDefaults:{range:"exact"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:12,fontFamily:b3,color:b5},shadow:{enabled:!1,color:Si,xOffset:3,yOffset:3,blur:5}}},paletteFactory:({takeColors:e})=>{let{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}}},M5=class extends bn{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new xA,this.marker=new xx,this.label=new fa,this.tooltip=new xD,this.connectMissingData=!1}};uQ([gM(gL)],M5.prototype,"xKey",2),uQ([gM(gL)],M5.prototype,"yKey",2),uQ([gM(gL,{optional:!0})],M5.prototype,"xName",2),uQ([gM(gL,{optional:!0})],M5.prototype,"yName",2),uQ([gM(gL,{optional:!0})],M5.prototype,"yFilterKey",2),uQ([gM(gL,{optional:!0})],M5.prototype,"stackGroup",2),uQ([gM(gN,{optional:!0})],M5.prototype,"normalizedTo",2),uQ([gM(gL,{optional:!0})],M5.prototype,"title",2),uQ([gM(gY)],M5.prototype,"stroke",2),uQ([gM(gN)],M5.prototype,"strokeWidth",2),uQ([gM(gO)],M5.prototype,"strokeOpacity",2),uQ([gM(g3)],M5.prototype,"lineDash",2),uQ([gM(gN)],M5.prototype,"lineDashOffset",2),uQ([gM(gI)],M5.prototype,"interpolation",2),uQ([gM(gI)],M5.prototype,"marker",2),uQ([gM(gI)],M5.prototype,"label",2),uQ([gM(gI)],M5.prototype,"tooltip",2),uQ([gM(gR)],M5.prototype,"connectMissingData",2);var M8=class extends bl{constructor(e){super({moduleCtx:e,directionKeys:br,directionNames:ba,hasMarkers:!0,pickModes:[2,1,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:x5({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:xy,marker:(e,t)=>({...xU(e),...x_(e,t)})}}),this.properties=new M5}get pickModeAxis(){return"main-category"}async processData(e){var t,i;if(null==this.data||!this.properties.isValid())return;let{data:s,visible:r,seriesGrouping:{groupIndex:a=this.id,stackCount:o=1}={}}=this,{xKey:n,yKey:l,yFilterKey:h,connectMissingData:d,normalizedTo:u}=this.properties,c=!this.ctx.animationManager.isSkipped(),p=null==(t=this.axes.x)?void 0:t.scale,g=null==(i=this.axes.y)?void 0:i.scale,{isContinuousX:m,xScaleType:v,yScaleType:f}=this.getScaleInformation({xScale:p,yScale:g}),C={invalidValue:null};d&&o>1&&(C.invalidValue=0),r||(C.forceValue=0);let y=[];if(m||y.push(S6(n,v,{id:"xKey"})),y.push(S5(n,v,{id:"xValue"}),S5(l,f,{id:"yValueRaw",...C,invalidValue:void 0})),null!=h&&y.push(S5(h,f,{id:"yFilterRaw"})),o>1){let e=[`line-stack-${a}-yValues`,`line-stack-${a}-yValues-trailing`,`line-stack-${a}-yValues-marker`];y.push(...xe(l,"window","current",{id:"yValueEnd",...C,groupId:e[0]},f),...xe(l,"window-trailing","current",{id:"yValueStart",...C,groupId:e[1]},f),...xe(l,"normal","current",{id:"yValueCumulative",...C,groupId:e[2]},f)),pg(u)&&y.push(xo([e[0],e[1],e[2]],u,"range"))}c&&(y.push(xh(m?["xValue"]:void 0)),this.processedData&&y.push(xm(this.processedData))),await this.requestDataModel(e,s,{props:y}),this.animationState.transition("updateData")}getSeriesDomain(e){var t,i;let{dataModel:s,processedData:r}=this;if(!s||!(null!=r&&r.data.length))return[];let a=s.resolveProcessedDataDefById(this,"xValue");if("x"===e){let e=s.getDomain(this,"xValue","value",r);return(null==a?void 0:a.def.type)==="value"&&"category"===a.def.valueType?e:y2(p7(e))}return y2((null!=(t=null==(i=this.seriesGrouping)?void 0:i.stackCount)?t:1)>1?s.getDomain(this,"yValueEnd","value",r):s.getDomain(this,"yValueRaw","value",r))}async createNodeData(){var e,t,i,s,r;let{processedData:a,dataModel:o,axes:n}=this,l=n.x,h=n.y;if(!a||!o||!l||!h)return;let{xKey:d,yKey:u,yFilterKey:c,xName:p,yName:g,marker:m,label:v,connectMissingData:f,legendItemName:C}=this.properties,y=(null!=(e=null==(t=this.seriesGrouping)?void 0:t.stackCount)?e:1)>1,w=l.scale,b=h.scale,S=(null!=(i=w.bandwidth)?i:0)/2,x=(null!=(s=b.bandwidth)?s:0)/2,M=[],D=m.enabled?m.size:0,E=o.resolveProcessedDataIndexById(this,"xValue"),I=o.resolveProcessedDataIndexById(this,"yValueRaw"),A=null!=c?o.resolveProcessedDataIndexById(this,"yFilterRaw"):void 0,R=y?o.resolveProcessedDataIndexById(this,"yValueCumulative"):I,T=y?o.resolveProcessedDataIndexById(this,"yValueEnd"):void 0,L=!0,F=!1;return null==(r=a.data)||r.forEach(({datum:e,values:t})=>{let i=t[E],s=t[I],r=t[R],a=null!=T?t[T]:void 0;if(null==s){L||(L=!f);return}let o=w.convert(i)+S;if(isNaN(o)){L||(L=!f);return}let n=b.convert(r)+x,l=null!=A?t[A]===s:void 0;!1===l&&(F=!0);let h=this.getLabelText(v,{value:s,datum:e,xKey:d,yKey:u,xName:p,yName:g,legendItemName:C},SH);M.push({series:this,datum:e,yKey:u,xKey:d,point:{x:o,y:n,moveTo:L,size:D},midPoint:{x:o,y:n},cumulativeValue:a,yValue:s,xValue:i,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},labelText:h,selected:l}),L=!1}),{itemId:u,nodeData:M,labelData:M,scales:this.calculateScaling(),visible:this.visible,crossFiltering:F}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){let{shape:e}=this.properties.marker;return new(w5(e))}async updatePathNodes(e){var t;let{paths:[i],opacity:s,visible:r,animationEnabled:a}=e,o=(null==(t=this.contextNodeData)?void 0:t.crossFiltering)===!0;i.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:s,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity*(o?.25:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),a||(i.visible=r),x8(this,i)}async updateMarkerSelection(e){var t;let{nodeData:i}=e,{markerSelection:s}=e;return i=this.properties.marker.enabled||(null==(t=this.contextNodeData)?void 0:t.crossFiltering)===!0?i:[],this.properties.marker.isDirty()&&(s.clear(),s.cleanup()),s.update(i,void 0,e=>xv(e.xValue))}async updateMarkerNodes(e){let{markerSelection:t,isHighlight:i}=e,{xKey:s,yKey:r,stroke:a,strokeWidth:o,strokeOpacity:n,marker:l,highlightStyle:h}=this.properties,d=pk(i&&h.item,l.getStyle(),{stroke:a,strokeWidth:o,strokeOpacity:n}
206),u=this.ctx.animationManager.isSkipped();t.each((e,t)=>{this.updateMarkerStyle(e,l,{datum:t,highlighted:i,xKey:s,yKey:r},d,{applyTranslation:u,selected:t.selected})}),i||l.markClean()}async updateLabelSelection(e){return e.labelSelection.update(this.isLabelEnabled()?e.labelData:[])}async updateLabelNodes(e){let{enabled:t,fontStyle:i,fontWeight:s,fontSize:r,fontFamily:a,color:o}=this.properties.label;e.labelSelection.each((e,n)=>{t&&null!=n&&n.labelText?(e.fontStyle=i,e.fontWeight=s,e.fontSize=r,e.fontFamily=a,e.textAlign="center",e.textBaseline="bottom",e.text=n.labelText,e.x=n.point.x,e.y=n.point.y-10,e.fill=o,e.visible=!0):e.visible=!1})}getTooltipHtml(e){var t;let i=this.axes.x,s=this.axes.y;if(!this.properties.isValid()||!i||!s)return v5;let{xKey:r,yKey:a,xName:o,yName:n,strokeWidth:l,marker:h,tooltip:d}=this.properties,{datum:u,xValue:c,yValue:p,itemId:g}=e,m=i.formatDatum(c),v=s.formatDatum(p),f=SW(null!=(t=this.properties.title)?t:n),C=SW(m+": "+v),y=pk({fill:h.stroke},h.getStyle(),{strokeWidth:l}),{fill:w}=this.getMarkerStyle(h,{datum:e,xKey:r,yKey:a,highlighted:!1},y);return d.toTooltipHtml({title:f,content:C,backgroundColor:w},{datum:u,itemId:g,xKey:r,xName:o,yKey:a,yName:n,title:f,color:w,seriesId:this.id,...this.getModuleTooltipParams()})}getLegendData(e){var t,i,s,r,a,o,n,l,h,d;if(!(null!=(t=this.data)&&t.length&&this.properties.isValid()&&"category"===e))return[];let{yKey:u,yName:c,stroke:p,strokeOpacity:g,strokeWidth:m,lineDash:v,title:f,marker:C,visible:y,legendItemName:w}=this.properties,b="rgba(0, 0, 0, 0)";return[{legendType:"category",id:this.id,itemId:u,legendItemName:w,seriesId:this.id,enabled:y,label:{text:null!=(i=null!=(s=null!=w?w:f)?s:c)?i:u},symbols:[{marker:{shape:C.shape,fill:null!=(r=C.fill)?r:b,stroke:null!=(a=null!=(o=C.stroke)?o:p)?a:b,fillOpacity:null!=(n=C.fillOpacity)?n:1,strokeOpacity:null!=(l=null!=(h=C.strokeOpacity)?h:g)?l:1,strokeWidth:null!=(d=C.strokeWidth)?d:0,enabled:C.enabled},line:{stroke:null!=p?p:b,strokeOpacity:g,strokeWidth:m,lineDash:v}}]}]}async updatePaths(e){this.updateLinePaths(e.paths,e.contextData)}updateLinePaths(e,t){let{interpolation:i}=this.properties,{nodeData:s}=t,[r]=e;for(let e of(r.path.clear(!0),Ms(s)))x0(Mr(s,e),r,i);r.checkPathDirty()}animateEmptyUpdateReady(e){let{markerSelection:t,labelSelection:i,annotationSelections:s,contextData:r,paths:a}=e,{animationManager:o}=this.ctx;this.updateLinePaths(a,r),x3(this,o,...a),mm([t],x_),xW(this,o,t),xf(this,"labels",o,i),xf(this,"annotations",o,...s)}animateReadyResize(e){let{contextData:t,paths:i}=e;this.updateLinePaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){let t,{animationManager:i}=this.ctx,{markerSelection:s,labelSelection:r,annotationSelections:a,contextData:o,paths:n,previousContextData:l}=e,[h]=n;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);let d=()=>{this.resetPathAnimation(e),this.updateLinePaths(n,o)},u=()=>{i.skipCurrentBatch(),d()};if(null==o||null==l){d(),xH(this,i,"added",s),x4(this,"path_properties",i,"add",h),xf(this,"labels",i,r),xf(this,"annotations",i,...a);return}if(o.crossFiltering!==l.crossFiltering)return void u();try{var c;t=Mp(o,l,null==(c=this.processedData)||null==(c=c.reduced)?void 0:c.diff,this.properties.interpolation)}catch{t=void 0}void 0===t?u():"no-op"===t.status||(xH(this,i,void 0,s),p3(this.id,"path_properties",i,[h],t.pathProperties),"added"===t.status?this.updateLinePaths(n,o):"removed"===t.status?this.updateLinePaths(n,l):SV(this.id,"path_update",i,[h],t.path),t.hasMotion&&(xf(this,"labels",i,r),xf(this,"annotations",i,...a)))}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new m1}getFormattedMarkerStyle(e){let{xKey:t,yKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return xY(this,e)}};M8.className="LineSeries",M8.type="line";var M7={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",moduleFactory:e=>new M8(e),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{tooltip:{position:{type:"node"}},strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,interpolation:{type:"linear",tension:1,position:"end"},marker:{shape:"circle",size:7,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:b3,color:b4},errorBar:{cap:{lengthRatio:1}}}},paletteFactory:e=>{let{marker:t}=bY(e);return{stroke:t.fill,marker:t}}},M9=class extends fa{constructor(){super(...arguments),this.placement="top"}};uQ([gM(mr)],M9.prototype,"placement",2);var De=class extends bn{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.label=new M9,this.tooltip=new xD,this.marker=new xx}};uQ([gM(gL)],De.prototype,"xKey",2),uQ([gM(gL)],De.prototype,"yKey",2),uQ([gM(gL,{optional:!0})],De.prototype,"labelKey",2),uQ([gM(gL,{optional:!0})],De.prototype,"colorKey",2),uQ([gM(gL,{optional:!0})],De.prototype,"xFilterKey",2),uQ([gM(gL,{optional:!0})],De.prototype,"yFilterKey",2),uQ([gM(gL,{optional:!0})],De.prototype,"xName",2),uQ([gM(gL,{optional:!0})],De.prototype,"yName",2),uQ([gM(gL,{optional:!0})],De.prototype,"labelName",2),uQ([gM(gL,{optional:!0})],De.prototype,"colorName",2),uQ([gM(gq,{optional:!0})],De.prototype,"colorDomain",2),uQ([gM(gK)],De.prototype,"colorRange",2),uQ([gM(gL,{optional:!0})],De.prototype,"title",2),uQ([vW("marker.shape")],De.prototype,"shape",2),uQ([vW("marker.size")],De.prototype,"size",2),uQ([vW("marker.fill")],De.prototype,"fill",2),uQ([vW("marker.fillOpacity")],De.prototype,"fillOpacity",2),uQ([vW("marker.stroke")],De.prototype,"stroke",2),uQ([vW("marker.strokeWidth")],De.prototype,"strokeWidth",2),uQ([vW("marker.strokeOpacity")],De.prototype,"strokeOpacity",2),uQ([vW("marker.itemStyler",{optional:!0})],De.prototype,"itemStyler",2),uQ([gM(gI)],De.prototype,"label",2),uQ([gM(gI)],De.prototype,"tooltip",2);var Dt=class extends bl{constructor(e){super({moduleCtx:e,directionKeys:br,directionNames:ba,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:xU,label:
206xy}}),this.properties=new De,this.colorScale=new vv}get pickModeAxis(){return"main-category"}async processData(e){var t,i,s;if(!this.properties.isValid()||null==this.data||!this.visible)return;let r=null==(t=this.axes.x)?void 0:t.scale,a=null==(i=this.axes.y)?void 0:i.scale,{xScaleType:o,yScaleType:n}=this.getScaleInformation({xScale:r,yScale:a}),l=this.colorScale.type,{xKey:h,yKey:d,xFilterKey:u,yFilterKey:c,labelKey:p,colorKey:g,colorDomain:m,colorRange:v}=this.properties,{dataModel:f,processedData:C}=await this.requestDataModel(e,this.data,{props:[S5(h,o,{id:"xValue"}),S5(d,n,{id:"yValue"}),...null!=u?[S5(u,o,{id:"xFilterValue"})]:[],...null!=c?[S5(c,n,{id:"yFilterValue"})]:[],...g?[S5(g,l,{id:"colorValue"})]:[],...p?[S5(p,"band",{id:"labelValue"})]:[]]});if(g){let e=f.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=null!=(s=null!=m?m:C.domain.values[e])?s:[],this.colorScale.range=v,this.colorScale.update()}this.animationState.transition("updateData")}getSeriesDomain(e){let{dataModel:t,processedData:i}=this;if(!i||!t)return[];let s="x"===e?"xValue":"yValue",r=t.resolveProcessedDataDefById(this,s),a=t.getDomain(this,s,"value",i);return(null==r?void 0:r.def.type)==="value"&&(null==r?void 0:r.def.valueType)==="category"?a:y2(p7(a))}async createNodeData(){var e,t,i;let{axes:s,dataModel:r,processedData:a,colorScale:o}=this,{xKey:n,yKey:l,xFilterKey:h,yFilterKey:d,labelKey:u,colorKey:c,xName:p,yName:g,labelName:m,marker:v,label:f,visible:C}=this.properties,{placement:y}=f,w=w5(v.shape),b=s.x,S=s.y;if(!(r&&a&&C&&b&&S))return;let x=r.resolveProcessedDataIndexById(this,"xValue"),M=r.resolveProcessedDataIndexById(this,"yValue"),D=null!=c?r.resolveProcessedDataIndexById(this,"colorValue"):-1,E=null!=u?r.resolveProcessedDataIndexById(this,"labelValue"):-1,I=null!=h?r.resolveProcessedDataIndexById(this,"xFilterValue"):void 0,A=null!=d?r.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,R=b.scale,T=S.scale,L=(null!=(e=R.bandwidth)?e:0)/2,F=(null!=(t=T.bandwidth)?t:0)/2,P=[],k=f.getFont(),N=vM.getMeasurer({font:k});for(let{values:e,datum:t}of null!=(i=a.data)?i:[]){let i=e[x],s=e[M],r=R.convert(i)+L,a=T.convert(s)+F,h=null!=I&&null!=A?e[I]===i&&e[A]===s:void 0,d=this.getLabelText(f,{value:u?e[E]:s,datum:t,xKey:n,yKey:l,labelKey:u,xName:p,yName:g,labelName:m}),C=N.measureText(d),b=c?o.convert(e[D]):void 0;P.push({series:this,itemId:l,yKey:l,xKey:n,datum:t,xValue:i,yValue:s,capDefaults:{lengthRatioMultiplier:v.getDiameter(),lengthMax:1/0},point:{x:r,y:a,size:v.size},midPoint:{x:r,y:a},fill:b,label:{text:d,...C},marker:w,placement:y,selected:h})}return{itemId:l,nodeData:P,labelData:P,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){var e,t;return null!=(e=null==(t=this.contextNodeData)?void 0:t.labelData)?e:[]}markerFactory(){let{shape:e}=this.properties.marker;return new(w5(e))}async updateMarkerSelection(e){let{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])}async updateMarkerNodes(e){let{markerSelection:t,isHighlight:i}=e,{xKey:s,yKey:r,labelKey:a,marker:o,highlightStyle:n}=this.properties,l=pk(i&&n.item,o.getStyle());t.each((e,t)=>{this.updateMarkerStyle(e,o,{datum:t,highlighted:i,xKey:s,yKey:r,labelKey:a},l,{selected:t.selected})}),i||o.markClean()}async updateLabelSelection(e){var t,i;let s=this.isLabelEnabled()&&null!=(t=null==(i=this.chart)?void 0:i.placeLabels().get(this))?t:[];return e.labelSelection.update(s.map(({datum:e,x:t,y:i})=>({...e,point:{x:t,y:i,size:e.point.size},placement:"top"})),e=>{e.pointerEvents=1})}async updateLabelNodes(e){let{label:t}=this.properties;e.labelSelection.each((e,i)=>{var s,r,a,o;e.text=i.label.text,e.fill=t.color,e.x=null!=(s=null==(r=i.point)?void 0:r.x)?s:0,e.y=null!=(a=null==(o=i.point)?void 0:o.y)?a:0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})}getTooltipHtml(e){let t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return v5;let{xKey:s,yKey:r,labelKey:a,xName:o,yName:n,labelName:l,title:h=n,marker:d,tooltip:u}=this.properties,{datum:c,xValue:p,yValue:g,label:m,itemId:v}=e,f=pk({fill:e.fill,strokeWidth:this.getStrokeWidth(d.strokeWidth)},d.getStyle()),{fill:C="gray"}=this.getMarkerStyle(d,{datum:e,highlighted:!1,xKey:s,yKey:r,labelKey:a},f),y=SW(t.formatDatum(p)),w=SW(i.formatDatum(g)),b=`<b>${SW(null!=o?o:s)}</b>: ${y}<br><b>${SW(null!=n?n:r)}
206</b>: ${w}`;return a&&(b=`<b>${SW(null!=l?l:a)}</b>: ${SW(m.text)}<br>`+b),u.toTooltipHtml({title:h,content:b,backgroundColor:C},{datum:c,itemId:v,xKey:s,xName:o,yKey:r,yName:n,labelKey:a,labelName:l,title:h,color:C,seriesId:this.id,...this.getModuleTooltipParams()})}getLegendData(e){var t,i,s,r,a,o;let{yKey:n,yName:l,title:h,marker:d,visible:u}=this.properties,{fill:c,stroke:p,fillOpacity:g,strokeOpacity:m,strokeWidth:v}=d;return null!=(t=this.data)&&t.length&&this.properties.isValid()&&"category"===e?[{legendType:"category",id:this.id,itemId:n,seriesId:this.id,enabled:u,label:{text:null!=(i=null!=h?h:l)?i:n},symbols:[{marker:{shape:d.shape,fill:null!=(s=null!=(r=d.fill)?r:c)?s:"rgba(0, 0, 0, 0)",stroke:null!=(a=null!=(o=d.stroke)?o:p)?a:"rgba(0, 0, 0, 0)",fillOpacity:null!=g?g:1,strokeOpacity:null!=m?m:1,strokeWidth:null!=v?v:0}}]}]:[]}animateEmptyUpdateReady(e){let{markerSelection:t,labelSelection:i,annotationSelections:s}=e;xj(this,this.ctx.animationManager,t),xf(this,"labels",this.ctx.animationManager,i),xf(this,"annotations",this.ctx.animationManager,...s)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new m1}getFormattedMarkerStyle(e){let{xKey:t,yKey:i,labelKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,labelKey:s,highlighted:!0})}computeFocusBounds(e){return xY(this,e)}};Dt.className="ScatterSeries",Dt.type="scatter";var Di={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",moduleFactory:e=>new Dt(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,fillOpacity:.8,tooltip:{position:{type:"node"}},label:{enabled:!1,fontSize:12,fontFamily:b3,color:b4},errorBar:{cap:{lengthRatio:1}}}},paletteFactory:b$},Ds=class e{constructor(e,t,i,s){this.startAngle=e,this.endAngle=t,this.innerRadius=i,this.outerRadius=s}clone(){let{startAngle:t,endAngle:i,innerRadius:s,outerRadius:r}=this;return new e(t,i,s,r)}equals(e){return this.startAngle===e.startAngle&&this.endAngle===e.endAngle&&this.innerRadius===e.innerRadius&&this.outerRadius===e.outerRadius}[cT](t,i){return new e(this.startAngle*(1-i)+t.startAngle*i,this.endAngle*(1-i)+t.endAngle*i,this.innerRadius*(1-i)+t.innerRadius*i,this.outerRadius*(1-i)+t.outerRadius*i)}};function Dr({startAngle:e,endAngle:t,innerRadius:i,outerRadius:s}){let r=1/0,a=1/0,o=-1/0,n=-1/0,l=(e,t)=>{r=Math.min(e,r),a=Math.min(t,a),o=Math.max(e,o),n=Math.max(t,n)};return l(i*Math.cos(e),i*Math.sin(e)),l(i*Math.cos(t),i*Math.sin(t)),l(s*Math.cos(e),s*Math.sin(e)),l(s*Math.cos(t),s*Math.sin(t)),vs(0,e,t)&&l(s,0),vs(.5*Math.PI,e,t)&&l(0,s),vs(Math.PI,e,t)&&l(-s,0),vs(1.5*Math.PI,e,t)&&l(0,-s),new c4(r,a,o-r,n-a)}function Da(e,t,i){let s=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),{innerRadius:r,outerRadius:a}=i;if(i.startAngle===i.endAngle||s<Math.min(r,a)||s>Math.max(r,a))return!1;let o=vi(i.startAngle),n=vi(i.endAngle),l=Math.atan2(t,e);return o<n?l<=n&&l>=o:l<=n&&l>=-Math.PI||l>=o&&l<=Math.PI}function Do(e,t){let{startAngle:i,endAngle:s,innerRadius:r,outerRadius:a}=t,o={x:a*Math.cos(i),y:a*Math.sin(i)},n={x:a*Math.cos(s),y:a*Math.sin(s)},l=0===r?{x:0,y:0}:{x:r*Math.cos(i),y:r*Math.sin(i)},h=0===r?{x:0,y:0}:{x:r*Math.cos(s),y:r*Math.sin(s)};return CV(e.start.x,e.start.y,e.end.x,e.end.y,o.x,o.y,l.x,l.y)||CV(e.start.x,e.start.y,e.end.x,e.end.y,n.x,n.y,h.x,h.y)||Cj(0,0,a,i,s,!0,e.start.x,e.start.y,e.end.x,e.end.y)}function Dn(e,t){let i={x:e.x,y:e.y},s={x:e.x+e.width,y:e.y},r={x:e.x,y:e.y+e.height},a={x:e.x+e.width,y:e.y+e.height};return Do({start:i,end:s},t)||Do({start:r,end:a},t)}function Dl(e,t,i,s){if(0===i&&0===s)return 0;if(Math.asin(Math.abs(+i)/(e+ +i))+Math.asin(Math.abs(+s)/(e+ +s))-t<0)return 1;let r=0,a=1;for(let o=0;o<8;o+=1){let o=(r+a)/2;Math.asin(Math.abs(o*i)/(e+o*i))+Math.asin(Math.abs(o*s)/(e+o*s))-t<0?r=o:a=o}return r}function Dh(e,t){return 1e-6>vn(e,t)?t:ve(e-t)+t}function Dd(e,t,i=0){let s=Math.abs(t-e)>=2*Math.PI?2*Math.PI:ve(t-e);return t=(e=Dh(e,i))+s,{startAngle:e,endAngle:t}}function Du(e,t,i,s,r,a){let o=Math.sin(a),n=Math.cos(a),l=e**2+t**2-i**2,h=0/0,d=0/0,u=0/0,c=0/0;if(n>.5){let i=o/n,s=1+i**2,r=-2*(e+t*i),a=r**2-4*s*l;if(a<0)return;let p=(-r+Math.sqrt(a))/(2*s),g=(-r-Math.sqrt(a))/(2*s);h=p,d=p*i,u=g,c=g*i}else{let i=n/o,s=1+i**2,r=-2*(t+e*i),a=r**2-4*s*l;if(a<0)return;let p=(-r+Math.sqrt(a))/(2*s),g=(-r-Math.sqrt(a))/(2*s);h=p*i,d=p,u=g*i,c=g}let p=h*n+d*o,g=u*n+c*o,m=p>0?Dh(Math.atan2(d-t,h-e),s):0/0,v=g>0?Dh(Math.atan2(c-t,u-e),s):0/0;return m>=s&&m<=r?m:v>=s&&v<=r?v:void 0}function Dc(e,t,i,s,r,a){let o=Math.hypot(e,t),n=Math.atan2(t,e),l=Math.acos(-(o-(o**2-i**2+a**2)/(2*o))/i),h=Dh(n+l,s),d=Dh(n-l,s);return h>=s&&h<=r?h:d>=s&&d<=r?d:void 0}var Dp=class{constructor(e,t,i,s,r){this.cx=e,this.cy=t,this.r=i,this.a0=s,this.a1=r,this.a0>=this.a1&&(this.a0=0/0,this.a1=0/0)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(e){return{x:this.cx+this.r*Math.cos(e),y:this.cy+this.r*Math.sin(e)}}clipStart(e){null!=e&&this.isValid()&&!(e<this.a0)&&(this.a0=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=0/0,this.a1=0/0))}clipEnd(e){null!=e&&this.isValid()&&!(e>this.a1)&&(this.a1=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=0/0,this.a1=0/0))}},Dg=class extends Cq{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=2*Math.PI,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(e){this.concentricEdgeInset=e,this.radialEdgeInset=e}set cornerRadius(e){this.startOuterCornerRadius=e,this.endOuterCornerRadius=e,this.startInnerCornerRadius=e,this.endInnerCornerRadius=e}computeBBox(){return Dr(this).translate(this.centerX,this.centerY)}normalizedRadii(){let{concentricEdgeInset:e}=this,{innerRadius:t,outerRadius:i}=this;return{innerRadius:t=t>0?t+e:0,outerRadius:i=Math.max(i-e,0)}}normalizedClipSector(){let{clipSector:e}=this;if(null==e)return;let{startAngle:t,endAngle:i}=Dd(this.startAngle,this.endAngle),{innerRadius:s,outerRadius:r}=this.normalizedRadii(),a=Dd(e.startAngle,e.endAngle,t);return new Ds(Math.max(t,a.startAngle),Math.min(i,a.endAngle),Math.max(s,e.innerRadius),Math.min(r,e.outerRadius))}getAngleOffset(e){return e>0?this.radialEdgeInset/e:0}
206arc(e,t,i,s,r,a,o,n){if(e<=0)return;let{startAngle:l,endAngle:h}=Dd(this.startAngle,this.endAngle),{innerRadius:d,outerRadius:u}=this.normalizedRadii(),c=this.normalizedClipSector();if(n&&d<=0)return;let p=n?this.getAngleOffset(d+e):this.getAngleOffset(u-e),g=o?l+p+t:h-p-t,m=n?d+e:u-e,v=m*Math.cos(g),f=m*Math.sin(g);if(null!=c&&(!o&&!(g>=l-1e-6&&g<=c.endAngle-1e-6)||o&&!(g>=c.startAngle+1e-6&&g<=h-1e-6)||n&&m<c.innerRadius-1e-6||!n&&m>c.outerRadius+1e-6))return;let C=new Dp(v,f,e,i,s);if(null!=c){let t,h;if(n?(C.clipStart(Du(v,f,e,i,s,c.endAngle)),C.clipEnd(Du(v,f,e,i,s,c.startAngle))):(C.clipStart(Du(v,f,e,i,s,c.startAngle)),C.clipEnd(Du(v,f,e,i,s,c.endAngle))),o?(t=Dc(v,f,e,i,s,c.innerRadius),h=Dc(v,f,e,i,s,c.outerRadius)):(t=Dc(v,f,e,i,s,c.outerRadius),h=Dc(v,f,e,i,s,c.innerRadius)),C.clipStart(t),C.clipEnd(h),null!=t){let{x:e,y:i}=C.pointAt(t),s=Dh(Math.atan2(i,e),l);o?null==a||a.clipStart(s):r.clipEnd(s)}if(null!=h){let{x:e,y:t}=C.pointAt(h),i=Dh(Math.atan2(t,e),l);o?r.clipStart(i):null==a||a.clipEnd(i)}}if(null!=c){let{x:e,y:t}=C.pointAt((C.a0+C.a1)/2);if(!Da(e,t,c))return}let{x:y,y:w}=C.pointAt(o===n?C.a0:C.a1),b=Dh(Math.atan2(w,y),l),S=n?a:r;return o?null==S||S.clipStart(b):null==S||S.clipEnd(b),C}updatePath(){var e,t,i,s,r;let{path:a,centerX:o,centerY:n,concentricEdgeInset:l,radialEdgeInset:h}=this,{startOuterCornerRadius:d,endOuterCornerRadius:u,startInnerCornerRadius:c,endInnerCornerRadius:p}=this,{startAngle:g,endAngle:m}=Dd(this.startAngle,this.endAngle),{innerRadius:v,outerRadius:f}=this.normalizedRadii(),C=this.normalizedClipSector(),y=m-g,w=y>=2*Math.PI-1e-6;if(a.clear(),0===v&&0===f||v>f||(null!=(e=null==C?void 0:C.startAngle)?e:g)===(null!=(t=null==C?void 0:C.endAngle)?t:m))return;if(w&&null==this.clipSector&&0===d&&0===u&&0===c&&0===p){a.moveTo(o+f*Math.cos(g),n+f*Math.sin(g)),a.arc(o,n,f,g,m),v>l&&(a.moveTo(o+v*Math.cos(m),n+v*Math.sin(m)),a.arc(o,n,v,m,g,!0)),a.closePath();return}if(null==this.clipSector&&1e-6>Math.abs(v-f)){a.arc(o,n,f,g,m,!1),a.arc(o,n,f,m,g,!0),a.closePath();return}let b=this.getAngleOffset(v),S=this.getAngleOffset(f);if(y<2*S)return;let x=(null!=(i=null==C?void 0:C.innerRadius)?i:v)>l,M=v<l||y<2*b,D=f-v,E=Math.max(d,c,u,p),I=E>0?Math.min(D/E,1):1;d*=I,u*=I,c*=I,p*=I;let A=Dl(f,y-2*S,-d,-u);if(d*=A,u*=A,!M&&x){let e=Dl(v,y-2*b,c,p);c*=e,p*=e}else c=0,p=0;let R=Math.max(d+c,u+p),T=R>0?Math.min(D/R,1):1;d*=T,u*=T,c*=T,p*=T;let L=0,F=0,P=d/(f-d),k=u/(f-u);P>=0&&P<1-1e-6?L=Math.asin(P):d=Math.min(f/(1/Math.sin(L=y/2)+1),d),k>=0&&k<1-1e-6?F=Math.asin(k):u=Math.min(f/(1/Math.sin(F=y/2)+1),u);let N=Math.asin(c/(v+c)),O=Math.asin(p/(v+p)),G=null!=(s=null==C?void 0:C.outerRadius)?s:f,B=this.getAngleOffset(G),z=new Dp(0,0,G,g+B,m-B),V=null!=(r=null==C?void 0:C.innerRadius)?r:v,H=this.getAngleOffset(V),j=x?new Dp(0,0,V,g+H,m-H):void 0;null!=C&&(z.clipStart(C.startAngle),z.clipEnd(C.endAngle),null==j||j.clipStart(C.startAngle),null==j||j.clipEnd(C.endAngle));let W=this.arc(d,L,g-.5*Math.PI,g+L,z,j,!0,!1),U=this.arc(u,F,m-F,m+.5*Math.PI,z,j,!1,!1),_=this.arc(p,O,m+.5*Math.PI,m+Math.PI-O,z,j,!1,!0),$=this.arc(c,N,g+Math.PI+N,g+1.5*Math.PI,z,j,!0,!0);if(M){let e,t=y<.5*Math.PI?h*(1+Math.cos(y))/Math.sin(y):0/0;e=Math.max(e=t>0&&t<f?Math.max(Math.hypot(h,t),v):h,v);let i=g+.5*y;a.moveTo(o+e*Math.cos(i),n+e*Math.sin(i))}else if((null==$?void 0:$.isValid())===!0||(null==j?void 0:j.isValid())===!0);else{let e=g+y/2,t=v*Math.cos(e),i=v*Math.sin(e);a.moveTo(o+t,n+i)}if((null==W?void 0:W.isValid())===!0){let{cx:e,cy:t,r:i,a0:s,a1:r}=W;a.arc(o+e,n+t,i,s,r)}if(z.isValid()){let{r:e,a0:t,a1:i}=z;a.arc(o,n,e,t,i)}if((null==U?void 0:U.isValid())===!0){let{cx:e,cy:t,r:i,a0:s,a1:r}=U;a.arc(o+e,n+t,i,s,r)}if(!M){if((null==_?void 0:_.isValid())===!0){let{cx:e,cy:t,r:i,a0:s,a1:r}=_;a.arc(o+e,n+t,i,s,r)}if((null==j?void 0:j.isValid())===!0){let{r:e,a0:t,a1:i}=j;a.arc(o,n,e,i,t,!0)}if((null==$?void 0:$.isValid())===!0){let{cx:e,cy:t,r:i,a0:s,a1:r}=$;a.arc(o+e,n+t,i,s,r)}}a.closePath()}isPointInPath(e,t){var i;let{startAngle:s,endAngle:r,innerRadius:a,outerRadius:o}=null!=(i=this.clipSector)?i:this;return Da(e-this.centerX,t-this.centerY,{startAngle:s,endAngle:r,innerRadius:Math.min(a,o),outerRadius:Math.max(a,o)})}};Dg.className="Sector",uQ([CZ()],Dg.prototype,"centerX",2),uQ([CZ()],Dg.prototype,"centerY",2),uQ([CZ()],Dg.prototype,"innerRadius",2),uQ([CZ()],Dg.prototype,"outerRadius",2),uQ([CZ()],Dg.prototype,"startAngle",2),uQ([CZ()],Dg.prototype,"endAngle",2),uQ([CZ()],Dg.prototype,"clipSector",2),uQ([CZ()],Dg.prototype,"concentricEdgeInset",2),uQ([CZ()],Dg.prototype,"radialEdgeInset",2),uQ([CZ()],Dg.prototype,"startOuterCornerRadius",2),uQ([CZ()],Dg.prototype,"endOuterCornerRadius",2),uQ([CZ()],Dg.prototype,"startInnerCornerRadius",2),uQ([CZ()],Dg.prototype,"endInnerCornerRadius",2);var Dm={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},Dv={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},Df=class extends fe{constructor(){super(...arguments),this.showInLegend=!1}};uQ([gM(gR)],Df.prototype,"showInLegend",2);var DC=class extends fa{constructor(){super(...arguments),this.spacing=2}set(e,t){return super.set(e)}};uQ([gM(gL)],DC.prototype,"text",2),uQ([gM(gF)],DC.prototype,"spacing",2);var Dy=class extends gb{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};uQ([gM(gY)],Dy.prototype,"fill",2),uQ([gM(gO)],Dy.prototype,"fillOpacity",2);var Dw=class extends fa{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};uQ([gM(gN)],Dw.prototype,"offset",2),uQ([gM(gG)],Dw.prototype,"minAngle",2),uQ([gM(gN)],Dw.prototype,"minSpacing",2),uQ([gM(gN)],Dw.prototype,"maxCollisionOffset",2),uQ([gM(gR)],Dw.prototype,"avoidCollisions",2);var Db=class extends fa{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};uQ([gM(gF)],Db.prototype,"positionOffset",2),uQ([gM(gO)],Db.prototype,"positionRatio",2);var DS=class extends gb{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};uQ([gM(gK,{optional:!0})],DS.prototype,"colors",2),uQ([gM(gN)],DS.prototype,"length",2),uQ([gM(gN)],DS.prototype,"strokeWidth",2);var Dx=class extends bs{constructor(){super(...arguments),this.fills=Object.values(Dm),this.strokes=Object.values(Dv),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.innerLabels=new gS(DC),this.title=new Df,this.innerCircle=new Dy,this.shadow=new xb,this.calloutLabel=new Dw,this.sectorLabel=new Db,this.calloutLine=new DS,this.tooltip=new xD}isValid(){let e=super.isValid();return null==this.innerRadiusRatio&&null==this.innerRadiusOffset?(u8.warnOnce("Either an [innerRadiusRatio] or an [innerRadiusOffset] must be set to render a donut series."),!1):e}};function DM(e,t,i,s){let r=[i.convert(0),i.convert(1)],a=[s.convert(0),s.convert(1)],o=-(Math.PI/2)+vr(t),n=e?"initial":"update";return{nodes:{toFn:(e,t,i,{prevLive:s})=>{let{startAngle:a,endAngle:n,innerRadius:l,outerRadius:h}=t,{stroke:d,fill:u}=t.sectorFormat;if("removed"===i&&s){var c,p;a=null==(c=s.datum)?void 0:c.endAngle,n=null==(p=s.datum)?void 0:p.endAngle}else"removed"!==i||s||(a=o,n=o);
206if("removed"===i){let e=(({radius:e})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*e}))(t);l=e.innerRadius,h=e.outerRadius}return{startAngle:a,endAngle:n,outerRadius:h,innerRadius:l,stroke:d,fill:u}},fromFn:(t,i,s,{prevFromProps:r})=>{var l,h,d,u,c,p;let{startAngle:g,endAngle:m,innerRadius:v,outerRadius:f}=t,{fill:C,stroke:y}=i.sectorFormat;if("unknown"!==s&&("added"!==s||r)?"added"===s&&r&&(g=null!=(l=r.endAngle)?l:o,m=null!=(h=r.endAngle)?h:o,v=null!=(d=r.innerRadius)?d:i.innerRadius,f=null!=(u=r.outerRadius)?u:i.outerRadius):(g=o,m=o,v=i.innerRadius,f=i.outerRadius),"added"===s&&!e){let e=(({radius:e})=>({innerRadius:a[0],outerRadius:a[0]+(a[1]-a[0])*e}))(i);v=e.innerRadius,f=e.outerRadius}return"updated"===s&&(C=null!=(c=t.fill)?c:C,y=null!=(p=t.stroke)?p:y),{startAngle:g,endAngle:m,innerRadius:v,outerRadius:f,fill:C,stroke:y,phase:n}}},innerCircle:{fromFn:(e,t)=>{var i,s,r;return{size:null!=(i=null!=(s=null==(r=e.previousDatum)?void 0:r.radius)?s:e.size)?i:0,phase:n}},toFn:(e,t)=>{var i;return{size:null!=(i=t.radius)?i:0}}}}}function DD(e,t){return{startAngle:t.startAngle,endAngle:t.endAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,fill:t.sectorFormat.fill,stroke:t.sectorFormat.stroke}}function DE(e,t){let i=t.y-e.centerY,s=t.x-e.centerX,r=Math.atan2(i,s);for(let t of e.getItemNodes())if(!0!==t.datum.missing&&vs(r,t.startAngle,t.endAngle)){let e=Math.sqrt(s*s+i*i),r=0;return e<t.innerRadius?r=t.innerRadius-e:e>t.outerRadius&&(r=e-t.outerRadius),{datum:t.datum,distance:r}}}uQ([gM(gL)],Dx.prototype,"angleKey",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"angleName",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"angleFilterKey",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"radiusKey",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"radiusName",2),uQ([gM(gN,{optional:!0})],Dx.prototype,"radiusMin",2),uQ([gM(gN,{optional:!0})],Dx.prototype,"radiusMax",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"calloutLabelKey",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"calloutLabelName",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"sectorLabelKey",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"sectorLabelName",2),uQ([gM(gL,{optional:!0})],Dx.prototype,"legendItemKey",2),uQ([gM(gK)],Dx.prototype,"fills",2),uQ([gM(gK)],Dx.prototype,"strokes",2),uQ([gM(gO)],Dx.prototype,"fillOpacity",2),uQ([gM(gO)],Dx.prototype,"strokeOpacity",2),uQ([gM(g3)],Dx.prototype,"lineDash",2),uQ([gM(gN)],Dx.prototype,"lineDashOffset",2),uQ([gM(gN)],Dx.prototype,"cornerRadius",2),uQ([gM(gT,{optional:!0})],Dx.prototype,"itemStyler",2),uQ([gM(gG)],Dx.prototype,"rotation",2),uQ([gM(gF)],Dx.prototype,"outerRadiusOffset",2),uQ([gM(gO)],Dx.prototype,"outerRadiusRatio",2),uQ([gM(gF,{optional:!0})],Dx.prototype,"innerRadiusOffset",2),uQ([gM(gO,{optional:!0})],Dx.prototype,"innerRadiusRatio",2),uQ([gM(gN)],Dx.prototype,"strokeWidth",2),uQ([gM(gF)],Dx.prototype,"sectorSpacing",2),uQ([gM(gJ)],Dx.prototype,"innerLabels",2),uQ([gM(gI)],Dx.prototype,"title",2),uQ([gM(gI)],Dx.prototype,"innerCircle",2),uQ([gM(gI)],Dx.prototype,"shadow",2),uQ([gM(gI)],Dx.prototype,"calloutLabel",2),uQ([gM(gI)],Dx.prototype,"sectorLabel",2),uQ([gM(gI)],Dx.prototype,"calloutLine",2),uQ([gM(gI)],Dx.prototype,"tooltip",2);var DI=class extends w8{constructor({useLabelLayer:e=!1,pickModes:t=[1,0],canHaveAxes:i=!1,animationResetFns:s,...r}){super({...r,useLabelLayer:e,pickModes:t,contentGroupVirtual:!1,directionKeys:{x:["angleKey"],y:["radiusKey"]},directionNames:{x:["angleName"],y:["radiusName"]},canHaveAxes:i}),this.itemGroup=this.contentGroup.appendChild(new m1),this.nodeData=[],this.itemSelection=m7.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=m7.select(this.labelGroup,()=>this.labelFactory(),!1),this.highlightSelection=m7.select(this.highlightGroup,()=>this.nodeFactory()),this.highlightLabelSelection=m7.select(this.highlightLabel,()=>this.labelFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.itemGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=s,this.animationState=new vq("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getItemNodes(){return[...this.itemGroup.children()]}getNodeData(){return this.nodeData}
206resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}labelFactory(){let e=new vR;return e.pointerEvents=1,e}getInnerRadius(){return 0}getLabelData(){return[]}computeLabelsBBox(e,t){return null}resetAllAnimation(){var e;let{item:t,label:i}=null!=(e=this.animationResetFns)?e:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&mm([this.itemSelection,this.highlightSelection],t),i&&mm([this.labelSelection,this.highlightLabelSelection],i),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup(),this.highlightLabelSelection.cleanup()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(e){var t;let{item:i,label:s}=null!=(t=this.animationResetFns)?t:{};i&&mm([this.highlightSelection],i),s&&mm([this.highlightLabelSelection],s)}animateReadyHighlightMarkers(e){}animateReadyResize(e){this.resetAllAnimation()}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(e){return{seriesRect:e}}computeFocusBounds(e){var t;let i=null==(t=this.getNodeData())?void 0:t[e.datumIndex];if(void 0!==i)return this.itemSelection.select(e=>e instanceof Cq&&e.datum===i)[0]}},DA=class extends wE{constructor(e,t,i,s){super(e,t,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},DR=class extends DI{constructor(e){super({moduleCtx:e,pickModes:[1,0],useLabelLayer:!0,animationResetFns:{item:DD,label:xy}}),this.properties=new Dx,this.phantomNodeData=void 0,this.previousRadiusScale=new bg,this.radiusScale=new bg,this.phantomGroup=this.contentGroup.appendChild(new m1),this.phantomSelection=m7.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new m1({name:"pieCalloutLabels"})),this.calloutLabelSelection=new m7(this.calloutLabelGroup,m1),this.backgroundGroup=this.rootGroup.appendChild(new fs({name:`${this.id}-background`,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new m1({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new wK),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new wK),this.innerLabelsGroup=this.contentGroup.appendChild(new m1({name:"innerLabels"})),this.innerCircleGroup=this.backgroundGroup.appendChild(new m1({name:`${this.id}-innerCircle`})),this.innerLabelsSelection=m7.select(this.innerLabelsGroup,vR),this.innerCircleSelection=m7.select(this.innerCircleGroup,wK),this.seriesItemEnabled=[],this.legendItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=DA,this.angleScale=new bg,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2,this.phantomGroup.zIndexSubOrder=[()=>this._declarationOrder,0]}get calloutNodeData(){var e;return null!=(e=this.phantomNodeData)?e:this.nodeData}addChartEventListeners(){var e;this.destroyFns.push(null==(e=this.ctx.chartEventManager)?void 0:e.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.includes(!0))}nodeFactory(){return new Dg}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}async processData(e){var t,i,s,r;if(null==this.data||!this.properties.isValid())return;let{data:a}=this,{visible:o,seriesItemEnabled:n}=this,{angleKey:l,angleFilterKey:h,radiusKey:d,calloutLabelKey:u,sectorLabelKey:c,legendItemKey:p}=this.properties,g=!this.ctx.animationManager.isSkipped(),m=[],v=[];p?m.push(S6(p,"band",{id:"legendItemKey"})):u?m.push(S6(u,"band",{id:"calloutLabelKey"})):c&&m.push(S6(c,"band",{id:"sectorLabelKey"}));let f=this.radiusScale.type,C=this.radiusScale.type;for(let y of(d&&v.push(S8(d,{id:"radiusValue",min:null!=(t=this.properties.radiusMin)?t:0,max:this.properties.radiusMax}),S5(d,f,{id:"radiusRaw"}),xl("radiusValue",[0,1],1,null!=(i=this.properties.radiusMin)?i:0,this.properties.radiusMax)),u&&v.push(S5(u,"band",{id:"calloutLabelValue"})),c&&v.push(S5(c,"band",{id:"sectorLabelValue"})),p&&v.push(S5(p,"band",{id:"legendItemValue"}
206)),h&&v.push(S7(h,C,{id:"angleFilterValue",onlyPositive:!0}),S5(h,C,{id:"angleFilterRaw"}),xl("angleFilterValue",[0,1],0,0)),g&&this.processedData&&m.length>0&&v.push(xm(this.processedData)),v.push(xh()),a=a.map((e,t)=>o&&n[t]?e:{...e,[l]:0}),await this.requestDataModel(e,a,{props:[...m,S7(l,C,{id:"angleValue",onlyPositive:!0}),S5(l,C,{id:"angleRaw"}),xl("angleValue",[0,1],0,0),...v]}),null!=(s=null==(r=this.processedData)||null==(r=r.defs)?void 0:r.values)?s:[])){let{id:e,missing:t,property:i}=y,s=y3(this,t);"angleRaw"!==e&&s>0&&u8.warnOnce(`no value was found for the key '${String(i)}' on ${s} data element${s>1?"s":""}`)}this.animationState.transition("updateData")}async maybeRefreshNodeData(){var e;if(!this.nodeDataRefresh)return;let{nodeData:t=[],phantomNodeData:i}=null!=(e=await this.createNodeData())?e:{};this.nodeData=t,this.phantomNodeData=i,this.nodeDataRefresh=!1}getProcessedDataIndexes(e){let t=e.resolveProcessedDataIndexById(this,"angleValue"),i=e.resolveProcessedDataIndexById(this,"angleRaw"),s=null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterValue"):void 0,r=null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterRaw"):void 0,a=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):void 0,o=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusRaw"):void 0,n=this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):void 0;return{angleIdx:t,angleRawIdx:i,angleFilterIdx:s,angleFilterRawIdx:r,radiusIdx:a,radiusRawIdx:o,calloutLabelIdx:n,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):void 0,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):void 0}}async createNodeData(){let{id:e,processedData:t,dataModel:i,angleScale:s}=this,{rotation:r,innerRadiusRatio:a}=this.properties;if(!this.properties.isValid())return this.zerosumOuterRing.visible=!0,this.zerosumInnerRing.visible=!0,{itemId:e,nodeData:[],labelData:[]};if(!t||!i||"ungrouped"!==t.type)return;let{angleIdx:o,angleRawIdx:n,angleFilterIdx:l,angleFilterRawIdx:h,radiusIdx:d,radiusRawIdx:u,calloutLabelIdx:c,sectorLabelIdx:p,legendItemIdx:g}=this.getProcessedDataIndexes(i),m=null!=h&&t.data.some(({values:e})=>e[h]>e[n]),v=0,f=0,C=[],y=null!=h?[]:void 0;return t.data.forEach((e,t)=>{var i;let{datum:a,values:w}=e,b=m?w[l]:w[o],S=null==h||m?1:Math.sqrt(w[h]/w[n]),x=s.convert(v)+vr(r);v=b,f+=b;let M=s.convert(v)+vr(r),D=Math.abs(M-x),E=x+D/2,I=w[n],A=(null!=d&&null!=(i=w[d])?i:1)*S,R=null!=u?w[u]:void 0,T=null!=g?w[g]:void 0,L=this.getLabels(a,E,D,!0,null!=c?w[c]:void 0,null!=p?w[p]:void 0,T),F=this.getSectorFormat(a,t,!1),P={itemId:t,series:this,datum:a,index:t,angleValue:I,midAngle:E,midCos:Math.cos(E),midSin:Math.sin(E),startAngle:x,endAngle:M,radius:A,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(A),0),sectorFormat:F,radiusValue:R,legendItemValue:T,enabled:this.seriesItemEnabled[t],focusable:!0,...L};C.push(P),null!=y&&y.push({...P,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0),focusable:!1})}),this.zerosumOuterRing.visible=0===f,this.zerosumInnerRing.visible=0===f&&null!=a&&1!==a&&a>0,{itemId:e,nodeData:C,labelData:C,phantomNodeData:y}}getLabels(e,t,i,s,r,a,o){let{calloutLabel:n,sectorLabel:l,legendItemKey:h}=this.properties,d=!s||n.enabled?this.properties.calloutLabelKey:void 0,u=!s||l.enabled?this.properties.sectorLabelKey:void 0;if(!d&&!u&&!h)return{};let c={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return d&&i>vr(n.minAngle)&&(p.calloutLabel={...this.getTextAlignment(t),text:this.getLabelText(n,{...c,value:r}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),u&&(p.sectorLabel={text:this.getLabelText(l,{...c,value:a})}),null!=h&&null!=o&&(p.legendItem={key:h,text:o}),p}getTextAlignment(e){let t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=c0(Math.floor((vi(e)- -.75*Math.PI)/(Math.PI/2)),t.length);return t[i]}getSectorFormat(e,t,i){var s,r,a,o,n,l,h,d,u,c,p,g,m,v,f,C;let y,{callbackCache:w}=this.ctx,{angleKey:b,radiusKey:S,calloutLabelKey:x,sectorLabelKey:M,legendItemKey:D,fills:E,strokes:I,itemStyler:A}=this.properties,R=I[t%I.length],{fill:T,fillOpacity:L,stroke:F,strokeWidth:P,strokeOpacity:k,lineDash:N,lineDashOffset:O,cornerRadius:G}=pk(i&&this.properties.highlightStyle.item,{fill:E.length>
2060?E[t%E.length]:void 0,stroke:R,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties);return A&&(y=w.call(A,{datum:e,angleKey:b,radiusKey:S,calloutLabelKey:x,sectorLabelKey:M,legendItemKey:D,fill:T,fillOpacity:L,stroke:F,strokeWidth:P,strokeOpacity:k,lineDash:N,lineDashOffset:O,cornerRadius:G,highlighted:i,seriesId:this.id})),{fill:null!=(s=null==(r=y)?void 0:r.fill)?s:T,fillOpacity:null!=(a=null==(o=y)?void 0:o.fillOpacity)?a:L,stroke:null!=(n=null==(l=y)?void 0:l.stroke)?n:F,strokeWidth:null!=(h=null==(d=y)?void 0:d.strokeWidth)?h:P,strokeOpacity:null!=(u=null==(c=y)?void 0:c.strokeOpacity)?u:k,lineDash:null!=(p=null==(g=y)?void 0:g.lineDash)?p:N,lineDashOffset:null!=(m=null==(v=y)?void 0:v.lineDashOffset)?m:O,cornerRadius:null!=(f=null==(C=y)?void 0:C.cornerRadius)?f:G}}getInnerRadius(){let{radius:e}=this,{innerRadiusRatio:t=1,innerRadiusOffset:i=0}=this.properties,s=e*t+i;return s===e||s<0?0:s}getOuterRadius(){let{outerRadiusRatio:e,outerRadiusOffset:t}=this.properties;return Math.max(this.radius*e+t,0)}updateRadiusScale(e){var t;let i=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=i,e&&(this.previousRadiusScale.range=i);let s=e=>({...e,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(e.radius),0)});this.nodeData=this.nodeData.map(s),this.phantomNodeData=null==(t=this.phantomNodeData)?void 0:t.map(s)}getTitleTranslationY(){var e,t;let i=Math.max(0,this.radiusScale.range[1]);if(0===i)return 0/0;let s=null!=(e=null==(t=this.properties.title)?void 0:t.spacing)?e:0,r=Math.max(0,-i);return-i-(2+s)-r}async update({seriesRect:e}){let{title:t}=this.properties,i={seriesRectWidth:null==e?void 0:e.width,seriesRectHeight:null==e?void 0:e.height},s=null!=vO(this.nodeDataDependencies,i);if(s&&(this._nodeDataDependencies=i),await this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){let e=this.getTitleTranslationY();t.node.y=isFinite(e)?e:0;let i=t.node.getBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i)}for(let e of[this.zerosumInnerRing,this.zerosumOuterRing])e.fillOpacity=0,e.stroke=this.properties.calloutLabel.color,e.strokeWidth=1,e.strokeOpacity=1;this.updateNodeMidPoint(),await this.updateSelections(),await this.updateNodes(e)}updateTitleNodes(){let{oldTitle:e}=this,{title:t}=this.properties;if(e!==t){var i,s;e&&(null==(i=this.labelGroup)||i.removeChild(e.node)),t&&(t.node.textBaseline="bottom",null==(s=this.labelGroup)||s.appendChild(t.node)),this.oldTitle=t}}updateNodeMidPoint(){var e;let t=e=>{let t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}};this.nodeData.forEach(t),null==(e=this.phantomNodeData)||e.forEach(t)}async updateSelections(){await this.updateGroupSelection(),this.updateInnerCircleSelection()}async updateGroupSelection(){var e;let{itemSelection:t,highlightSelection:i,phantomSelection:s,highlightLabelSelection:r,calloutLabelSelection:a,labelSelection:o,innerLabelsSelection:n}=this,l=this.nodeData.map(e=>({...e,sectorFormat:{...e.sectorFormat}})),h=(e,t)=>{e.update(t,void 0,e=>this.getDatumId(e)),this.ctx.animationManager.isSkipped()&&e.cleanup()};h(t,this.nodeData),h(i,l),h(s,null!=(e=this.phantomNodeData)?e:[]),a.update(this.calloutNodeData,e=>{let t=new vS;t.tag=0,t.pointerEvents=1,e.appendChild(t);let i=new vR;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),o.update(this.nodeData),r.update(l),n.update(this.properties.innerLabels,e=>{e.pointerEvents=1})}updateInnerCircleSelection(){let{innerCircle:e}=this.properties,t=0,i=this.getInnerRadius();i>0&&(t=Math.ceil(2*Math.min(i,this.getOuterRadius())+1));let s=e?[{radius:t}]:[];this.innerCircleSelection.update(s)}async updateNodes(e){let t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.includes(!0);this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&(null==t?void 0:t.series)===this,this.highlightLabel.visible=i&&(null==t?void 0:t.series)===this,this.labelGroup.visible=i,this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((e,{radius:t})=>{var i,s;e.setProperties({fill:null==(i=this.properties.innerCircle)?void 0:i.fill,opacity:null==(s=this.properties.innerCircle)?void 0:s.fillOpacity,size:t})});let s=this.ctx.animationManager.isSkipped(),r=(e,t,i,r)=>{let a=this.getSectorFormat(t.datum,t.itemId,r);t.sectorFormat.fill=a.fill,t.sectorFormat.stroke=a.stroke,s&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.
206innerRadius,e.outerRadius=t.outerRadius),(r||s)&&(e.fill=a.fill,e.stroke=a.stroke),e.strokeWidth=a.strokeWidth,e.fillOpacity=a.fillOpacity,e.strokeOpacity=a.strokeOpacity,e.lineDash=a.lineDash,e.lineDashOffset=a.lineDashOffset,e.cornerRadius=a.cornerRadius,e.fillShadow=this.properties.shadow;let o=Math.max((this.properties.sectorSpacing+(null!=a.stroke?a.strokeWidth:0))/2,0);e.inset=o,e.lineJoin=this.properties.sectorSpacing>=0||o>0?"miter":"round"};this.itemSelection.each((e,t,i)=>r(e,t,i,!1)),this.highlightSelection.each((e,i,s)=>{r(e,i,s,!0),e.visible=i.itemId===(null==t?void 0:t.itemId)}),this.phantomSelection.each((e,t,i)=>r(e,t,i,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){var e;let{calloutLine:t}=this.properties,i=t.length,s=t.strokeWidth,r=null!=(e=t.colors)?e:this.properties.strokes,{offset:a}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((e,t)=>{let o=e.datum,{calloutLabel:n,outerRadius:l}=o;if(null!=n&&n.text&&!n.hidden&&0!==l){var h;e.visible=!0,e.strokeWidth=s,e.stroke=r[t%r.length],e.fill=void 0;let d=o.midCos*l,u=o.midSin*l,c=o.midCos*(l+i),p=o.midSin*(l+i);if((null!=(h=n.collisionTextAlign)?h:0!==n.collisionOffsetY)&&null!=n.box){let e=n.box,t=c,i=p;c<e.x?t=e.x:c>e.x+e.width&&(t=e.x+e.width),p<e.y?i=e.y:p>e.y+e.height&&(i=e.y+e.height);let s=t-c,r=i-p,o=Math.sqrt(Math.pow(s,2)+Math.pow(r,2)),l=o-a;l>0&&(c+=s*l/o,p+=r*l/o)}e.x1=d,e.y1=u,e.x2=c,e.y2=p}else e.visible=!1})}getLabelOverflow(e,t,i){let s=i.x-this.centerX,r=i.x+i.width-this.centerX,a=i.y-this.centerY,o=i.y+i.height-this.centerY,n=1;t.x+1<s?n=(t.x+t.width-s)/t.width:t.x+t.width-1>r&&(n=(r-t.x)/t.width);let l=t.y+1<a||t.y+t.height-1>o;return{textLength:1===n?e.length:Math.floor(e.length*n)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e){let{surroundingRadius:t}=this;if(null==t)return!1;let i=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],s=t**2;return i.some(e=>e.x**2+e.y**2>s)}computeCalloutLabelCollisionOffsets(){let{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:s,minSpacing:r}=t,a=e.convert(0),o=this.calloutNodeData,n=o.filter(e=>!(!e.calloutLabel||0===e.outerRadius));if(n.forEach(e=>{let t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),n.length<=1)return;let l=n.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),h=n.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),d=n.filter(e=>{var t;return e.midSin<0&&(null==(t=e.calloutLabel)?void 0:t.textAlign)==="center"}).sort((e,t)=>e.midCos-t.midCos),u=n.filter(e=>{var t;return e.midSin>=0&&(null==(t=e.calloutLabel)?void 0:t.textAlign)==="center"}).sort((e,t)=>e.midCos-t.midCos),c=e=>{var t;let r=e.calloutLabel;if(null==r)return c4.zero.clone();let a=e.outerRadius+i.length+s,o=e.midCos*a,n=e.midSin*a+r.collisionOffsetY,l=null!=(t=r.collisionTextAlign)?t:r.textAlign,h=r.textBaseline;return vR.computeBBox(r.text,o,n,{font:this.properties.calloutLabel,textAlign:l,textBaseline:h})},p=(e,t,i)=>{let s=c(e).grow(r/2),a=c(t).grow(r/2);if(s.x<a.x+a.width&&s.x+s.width>a.x&&("to-top"===i?s.y<a.y+a.height:s.y+s.height>a.y)){let e="to-top"===i?s.y-a.y-a.height:s.y+s.height-a.y;t.calloutLabel.collisionOffsetY=e}},g=e=>{let t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--)p(e[t+1],e[t],"to-top");for(let t=i+1;t<e.length;t++)p(e[t-1],e[t],"to-bottom")},m=e=>{let t=n.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>c(e)),s=i.map(e=>e.clone().grow(r/2)),l=!1;for(let t=0;t<s.length&&!l;t++){let i=s[t];for(let r=t+1;r<e.length;r++){let e=s[r];if(i.collidesBBox(e)){l=!0;break}}}let h=o.map(e=>{let{startAngle:t,endAngle:i,outerRadius:s}=e;return{startAngle:t,endAngle:i,innerRadius:a,outerRadius:s}}),d=i.some(e=>h.some(t=>Dn(e,t)));(l||t||d)&&e.filter(e=>
206"center"===e.calloutLabel.textAlign).forEach(e=>{let t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};g(l),g(h),m(d),m(u)}updateCalloutLabelNodes(e){let{radiusScale:t}=this,{calloutLabel:i,calloutLine:s}=this.properties,r=s.length,{offset:a,color:o}=i,n=new vR;this.calloutLabelSelection.selectByTag(1).forEach(s=>{var l;let{datum:h}=s,d=h.calloutLabel,u=Math.max(0,t.convert(h.radius));if(!(null!=d&&d.text)||0===u||d.hidden){s.visible=!1;return}let c=u+r+a,p=h.midCos*c,g=h.midSin*c+d.collisionOffsetY,m={textAlign:null!=(l=d.collisionTextAlign)?l:d.textAlign,textBaseline:d.textBaseline};n.text=d.text,n.x=p,n.y=g,n.setFont(this.properties.calloutLabel),n.setAlign(m);let v=n.getBBox(),f=d.text,C=!0;if(i.avoidCollisions){let{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(d.text,v,e);f=d.text.length===t?d.text:`${d.text.substring(0,t)}\u2026`,C=!i}s.text=f,s.x=p,s.y=g,s.setFont(this.properties.calloutLabel),s.setAlign(m),s.fill=o,s.visible=C})}async computeLabelsBBox(e,t){let i,{calloutLabel:s,calloutLine:r}=this.properties,a=r.length,{offset:o,maxCollisionOffset:n,minSpacing:l}=s;if(!s.avoidCollisions)return null;await this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();let h=[],d=new vR,{title:u}=this.properties;if(null!=u&&u.text&&u.enabled){let e=this.getTitleTranslationY();isFinite(e)&&(d.text=u.text,d.x=0,d.y=e,d.setFont(u),d.setAlign({textBaseline:"bottom",textAlign:"center"}),i=d.getBBox(),h.push(i))}return(this.calloutNodeData.forEach(s=>{var r;let u=s.calloutLabel;if(!u||0===s.outerRadius)return null;let c=s.outerRadius+a+o,p=s.midCos*c,g=s.midSin*c+u.collisionOffsetY;d.text=u.text,d.x=p,d.y=g,d.setFont(this.properties.calloutLabel),d.setAlign({textAlign:null!=(r=u.collisionTextAlign)?r:u.textAlign,textBaseline:u.textBaseline});let m=d.getBBox();if(u.box=m,Math.abs(u.collisionOffsetY)>n){u.hidden=!0;return}if(i){let e=t.y-this.centerY,s=new c4(i.x-l,e,i.width+2*l,i.y+i.height+l-e);if(m.collidesBBox(s)){u.hidden=!0;return}}if(e.hideWhenNecessary){let{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:s}=this.getLabelOverflow(u.text,m,t),r=u.text.length>2&&e<2;if(i||r||s){u.hidden=!0;return}}u.hidden=!1,h.push(m)}),0===h.length)?null:c4.merge(h)}updateSectorLabelNodes(){let{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:s,fontWeight:r,fontFamily:a,positionOffset:o,positionRatio:n,color:l}=this.properties.sectorLabel,h=(e,h)=>{let{sectorLabel:d,outerRadius:u}=h,c=!1;if(d&&0!==u){let p=t*(1-n)+u*n+o;e.fill=l,e.fontStyle=s,e.fontWeight=r,e.fontSize=i,e.fontFamily=a,e.text=d.text,e.x=h.midCos*p,e.y=h.midSin*p,e.textAlign="center",e.textBaseline="middle";let g=e.getBBox(),m=[[g.x,g.y],[g.x+g.width,g.y],[g.x+g.width,g.y+g.height],[g.x,g.y+g.height]],{startAngle:v,endAngle:f}=h,C={startAngle:v,endAngle:f,innerRadius:t,outerRadius:u};m.every(([e,t])=>Da(e,t,C))&&(c=!0)}e.visible=c};this.labelSelection.each(h),this.highlightLabelSelection.each(h)}updateInnerLabelNodes(){let e=[],t=[];this.innerLabelsSelection.each((i,s)=>{let{fontStyle:r,fontWeight:a,fontSize:o,fontFamily:n,color:l}=s;i.fontStyle=r,i.fontWeight=a,i.fontSize=o,i.fontFamily=n,i.text=s.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.getBBox()),t.push(s.spacing)});let i=e=>0===e?0:t[e],s=e=>e===t.length-1?0:t[e],r=e.reduce((e,t,r)=>e+t.height+i(r)+s(r),0),a=Math.max(...e.map(e=>e.width)),o=this.getInnerRadius(),n=Math.sqrt(Math.pow(a/2,2)+Math.pow(r/2,2))<=(o>0?o:this.getOuterRadius()),l=[];for(let t=0,a=-r/2;t<e.length;t++){let r=e[t].height+a+i(t);l.push(r),a=r+s(t)}this.innerLabelsSelection.each((e,t,i)=>{e.y=l[i],e.visible=n})}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius(),this.zerosumInnerRing.size=2*this.getInnerRadius()}getDatumLegendName(e){let{angleKey:t,calloutLabelKey:i,sectorLabelKey:s,legendItemKey:r}=this.properties,{sectorLabel:a,calloutLabel:o,legendItem:n}=e;return r&&void 0!==n?n.text:i&&i!==t&&(null==o?void 0:o.text)!==void 0?o.text:s&&s!==t&&(null==a?void 0:a.text)!==void 0?a.text:void 0}pickNodeClosestDatum(e){return DE(this,e)}getTooltipHtml(e){var t;if(!this.properties.isValid())return v5;let{datum:i,angleValue:s,sectorFormat:{fill:r},itemId:a}=e,o=SW(null==(t=this.properties.title)?void 0:t.text),n=pE(s)?cJ(s):String(s),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:null!=o?o:l,content:o&&l?`${l}: ${n}`:n,backgroundColor:r},{datum:i,itemId:a,title:o,color:r,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){var t,i,s,r,a;let{visible:o,processedData:n,dataModel:l}=this;if(!l||!(null!=n&&n.data.length)||!this.properties.isValid()||"category"!==e)return[];let{angleKey:h,calloutLabelKey:d,sectorLabelKey:u,legendItemKey:c}=this.properties;
206if(!c&&(!d||d===h)&&(!u||u===h))return[];let{calloutLabelIdx:p,sectorLabelIdx:g,legendItemIdx:m}=this.getProcessedDataIndexes(l),v=(null==(t=this.properties.title)?void 0:t.showInLegend)&&this.properties.title.text,f=[];for(let e=0;e<n.data.length;e++){let{datum:t,values:l}=n.data[e],C=[];v&&C.push(v);let y=this.getLabels(t,2*Math.PI,2*Math.PI,!1,null!=p?l[p]:void 0,null!=g?l[g]:void 0,null!=m?l[m]:void 0);if(c&&void 0!==y.legendItem?C.push(y.legendItem.text):d&&d!==h&&(null==(i=y.calloutLabel)?void 0:i.text)!==void 0?C.push(null==(r=y.calloutLabel)?void 0:r.text):u&&u!==h&&(null==(s=y.sectorLabel)?void 0:s.text)!==void 0&&C.push(null==(a=y.sectorLabel)?void 0:a.text),0===C.length)continue;let w=this.getSectorFormat(t,e,!1);f.push({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:o&&this.legendItemEnabled[e],label:{text:C.join(" - ")},symbols:[{marker:{fill:w.fill,stroke:w.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}}],legendItemName:null!=c?t[c]:void 0})}return f}onLegendItemClick(e){let{enabled:t,itemId:i,series:s,legendItemName:r}=e;s.id===this.id?this.toggleSeriesItem(i,t):null!=r&&this.toggleOtherSeriesItems(r,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.legendItemEnabled[e]=t,this.nodeData[e]&&(this.nodeData[e].enabled=t),this.nodeDataRefresh=!0}setLegendState(e){this.legendItemEnabled=e,this.ctx.updateService.update(4)}toggleOtherSeriesItems(e,t){var i;if(!this.properties.legendItemKey||!this.dataModel)return;let s=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");null==(i=this.processedData)||i.data.forEach(({values:i},r)=>{i[s]===e&&this.toggleSeriesItem(r,t)})}animateEmptyUpdateReady(e){let{animationManager:t}=this.ctx,i=DM(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);p3(this.id,"nodes",t,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(e,t)=>this.getDatumId(t)),p3(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),xf(this,"callout",t,this.calloutLabelSelection),xf(this,"sector",t,this.labelSelection),xf(this,"highlight",t,this.highlightLabelSelection),xf(this,"inner",t,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,t,i,s,r;let{itemSelection:a,highlightSelection:o,phantomSelection:n,processedData:l,radiusScale:h,previousRadiusScale:d}=this,{animationManager:u}=this.ctx,c=null==l||null==(e=l.reduced)?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);let p=(null!=(t=null==c?void 0:c.moved.size)?t:0)===0,g=(null!=(i=null==l?void 0:l.defs.keys.length)?i:0)>0,m=null==(s=null==l||null==(r=l.reduced)||null==(r=r.animationValidation)?void 0:r.uniqueKeys)||s;p&&g&&m||this.ctx.animationManager.skipCurrentBatch();let v=DM(!1,this.properties.rotation,h,d);p3(this.id,"nodes",u,[a,o,n],v.nodes,(e,t)=>this.getDatumId(t),c),p3(this.id,"innerCircle",u,[this.innerCircleSelection],v.innerCircle),xf(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),xf(this,"sector",this.ctx.animationManager,this.labelSelection),xf(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),xf(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){let{itemSelection:e,highlightSelection:t,phantomSelection:i,radiusScale:s,previousRadiusScale:r}=this,{animationManager:a}=this.ctx,o=DM(!1,this.properties.rotation,s,r);p3(this.id,"nodes",a,[e,t,i],o.nodes,(e,t)=>this.getDatumId(t)),p3(this.id,"innerCircle",a,[this.innerCircleSelection],o.innerCircle),xC(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),xC(this,"sector",this.ctx.animationManager,this.labelSelection),xC(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),xC(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var t;let{calloutLabelKey:i,sectorLabelKey:s,legendItemKey:r}=this.properties;if(null!=(t=this.processedData)&&null!=(t=t.reduced)&&null!=(t=t.animationValidation)&&t.uniqueKeys){if(r)return e[r];else if(i)return e[i];else if(s)return e[s]}}getDatumId(e){let{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){var e,t;let{data:i,seriesItemEnabled:s,legendItemEnabled:r}=this;this.seriesItemEnabled=null!=(e=null==i?void 0:i.map((e,t)=>{var i;return null==(i=s[t])||i}))?e:[],this.legendItemEnabled=null!=(t=null==i?void 0:i.map((e,t)=>{var i;return null==(i=r[t])||i}))?t:[]}};DR.className="DonutSeries",DR.type="donut";var DT=({takeColors:e,colorsCount:t})=>{let{fills:i,strokes:s}=e(t);return{fills:i,strokes:s,calloutLine:{colors:s}}},DL={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",moduleFactory:e=>new DR(e),tooltipDefaults:{range:"exact"},themeTemplate:{series:{title:{enabled:!0,fontWeight:"normal",fontSize:14,fontFamily:b3,color:b8,spacing:5},calloutLabel:{enabled:!0,fontSize:12,fontFamily:b3,color:b4,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontWeight:"normal",fontSize:12,fontFamily:b3,color:b5,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:Si,xOffset:3,yOffset:3,blur:5}
206,innerLabels:{fontSize:12,fontFamily:b3,color:b4,spacing:2}}},paletteFactory:DT},DF=class extends fe{constructor(){super(...arguments),this.showInLegend=!1}};uQ([gM(gR)],DF.prototype,"showInLegend",2);var DP=class extends fa{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};uQ([gM(gN)],DP.prototype,"offset",2),uQ([gM(gG)],DP.prototype,"minAngle",2),uQ([gM(gN)],DP.prototype,"minSpacing",2),uQ([gM(gN)],DP.prototype,"maxCollisionOffset",2),uQ([gM(gR)],DP.prototype,"avoidCollisions",2);var Dk=class extends fa{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};uQ([gM(gF)],Dk.prototype,"positionOffset",2),uQ([gM(gO)],Dk.prototype,"positionRatio",2);var DN=class extends gb{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};uQ([gM(gK,{optional:!0})],DN.prototype,"colors",2),uQ([gM(gN)],DN.prototype,"length",2),uQ([gM(gN)],DN.prototype,"strokeWidth",2);var DO=class extends bs{constructor(){super(...arguments),this.fills=Object.values(Dm),this.strokes=Object.values(Dv),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.title=new DF,this.shadow=new xb,this.calloutLabel=new DP,this.sectorLabel=new Dk,this.calloutLine=new DN,this.tooltip=new xD}};uQ([gM(gL)],DO.prototype,"angleKey",2),uQ([gM(gL,{optional:!0})],DO.prototype,"angleName",2),uQ([gM(gL,{optional:!0})],DO.prototype,"angleFilterKey",2),uQ([gM(gL,{optional:!0})],DO.prototype,"radiusKey",2),uQ([gM(gL,{optional:!0})],DO.prototype,"radiusName",2),uQ([gM(gN,{optional:!0})],DO.prototype,"radiusMin",2),uQ([gM(gN,{optional:!0})],DO.prototype,"radiusMax",2),uQ([gM(gL,{optional:!0})],DO.prototype,"calloutLabelKey",2),uQ([gM(gL,{optional:!0})],DO.prototype,"calloutLabelName",2),uQ([gM(gL,{optional:!0})],DO.prototype,"sectorLabelKey",2),uQ([gM(gL,{optional:!0})],DO.prototype,"sectorLabelName",2),uQ([gM(gL,{optional:!0})],DO.prototype,"legendItemKey",2),uQ([gM(gK)],DO.prototype,"fills",2),uQ([gM(gK)],DO.prototype,"strokes",2),uQ([gM(gO)],DO.prototype,"fillOpacity",2),uQ([gM(gO)],DO.prototype,"strokeOpacity",2),uQ([gM(g3)],DO.prototype,"lineDash",2),uQ([gM(gN)],DO.prototype,"lineDashOffset",2),uQ([gM(gN)],DO.prototype,"cornerRadius",2),uQ([gM(gT,{optional:!0})],DO.prototype,"itemStyler",2),uQ([gM(gG)],DO.prototype,"rotation",2),uQ([gM(gF)],DO.prototype,"outerRadiusOffset",2),uQ([gM(gO)],DO.prototype,"outerRadiusRatio",2),uQ([gM(gN)],DO.prototype,"strokeWidth",2),uQ([gM(gF)],DO.prototype,"sectorSpacing",2),uQ([gM(gI)],DO.prototype,"title",2),uQ([gM(gI)],DO.prototype,"shadow",2),uQ([gM(gI)],DO.prototype,"calloutLabel",2),uQ([gM(gI)],DO.prototype,"sectorLabel",2),uQ([gM(gI)],DO.prototype,"calloutLine",2),uQ([gM(gI)],DO.prototype,"tooltip",2);var DG=class extends wE{constructor(e,t,i,s){super(e,t,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},DB=class extends DI{constructor(e){super({moduleCtx:e,pickModes:[1,0],useLabelLayer:!0,animationResetFns:{item:DD,label:xy}}),this.properties=new DO,this.phantomNodeData=void 0,this.previousRadiusScale=new bg,this.radiusScale=new bg,this.phantomGroup=this.contentGroup.appendChild(new m1),this.phantomSelection=m7.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new m1({name:"pieCalloutLabels"})),this.calloutLabelSelection=new m7(this.calloutLabelGroup,m1),this.backgroundGroup=this.rootGroup.appendChild(new fs({name:`${this.id}-background`,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new m1({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new wK),this.seriesItemEnabled=[],this.legendItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=DG,this.angleScale=new bg,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2,this.phantomGroup.zIndexSubOrder=[()=>this._declarationOrder,0]}get calloutNodeData(){var e;return null!=(e=this.phantomNodeData)?e:this.nodeData}addChartEventListeners(){var e;this.destroyFns.push(null==(e=this.ctx.chartEventManager)?void 0:e.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.includes(!0))}nodeFactory(){let e=new Dg;return e.miterLimit=1e9,e}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}async processData(e){var t,i,s,r,a;if(null==this.data||!this.properties.isValid())return;let{data:o}=this,{visible:n,seriesItemEnabled:l}=this,{angleKey:h,angleFilterKey:d,radiusKey:u,calloutLabelKey:c,sectorLabelKey:p,legendItemKey:g}=this.properties,m=!this.ctx.animationManager.isSkipped(),v=[],f=[];g?v.push(S6(g,"band",{id:"legendItemKey"})):c?v.push(S6(c,"band",{id:"calloutLabelKey"})):p&&v.push(S6(p,"band",{id:"sectorLabelKey"}));let C=this.radiusScale.type,y=this.radiusScale.type;for(let w of(u&&f.push(S8(u,{id:"radiusValue",min:null!=(i=this.properties.radiusMin)?i:0,max:this.properties.radiusMax}),S5(u,C,{id:"radiusRaw"}),xl("radiusValue",[0,1],1,null!=(s=this.properties.radiusMin)?s:0,this.properties.radiusMax)),c&&f.push(S5(c,"band",{id:"calloutLabelValue"})),p&&f.push(S5(p,"band",{id:"sectorLabelValue"})),g&&f.push(S5(g,"band",{id:"legendItemValue"})),d&&f.push(S7(d,y,{id:"angleFilterValue",onlyPositive:!0}),S5(d,y,{id:"angleFilterRaw"}),xl("angleFilterValue",[0,1],0,0)),m&&null!=(t=this.processedData)&&null!=(t=t.reduced)&&null!=(t=t.animationValidation)&&t.uniqueKeys&&v.length>0&&f.push(xm(this.processedData)),f.push(xh()),o=o.map((e,t)=>n&&l[t]?e:{...e,[h]:0}),await this.requestDataModel(e,o,{props:[...v,S7(h,y,{id:"angleValue",onlyPositive:!0}),S5(h,y,{id:"angleRaw"}),xl("angleValue",[0,1],0,0),...f]}),null!=(r=null==(a=this.processedData)||null==(a=a.defs)?void 0:a.values)?r:[])){let{id:e,missing:t,property:i}=w,s=y3(this,t);"angleRaw"!==e&&s>0&&u8.warnOnce(`no value was found for the key '${String(i)}' on ${s} data element${s>1?"s":""}`)}this.animationState.transition("updateData")}async maybeRefreshNodeData(){var e;if(!this.nodeDataRefresh)return;let{nodeData:t=[],phantomNodeData:i}=null!=(e=await this.createNodeData())?e:{};this.nodeData=t,this.phantomNodeData=i,this.nodeDataRefresh=!1}getProcessedDataIndexes(e){let t=e.resolveProcessedDataIndexById(this,"angleValue"),i=e.resolveProcessedDataIndexById(this,"angleRaw"),s=null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterValue"):void 0,r=null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterRaw"):void 0,a=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiu
206sValue"):void 0,o=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusRaw"):void 0,n=this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):void 0;return{angleIdx:t,angleRawIdx:i,angleFilterIdx:s,angleFilterRawIdx:r,radiusIdx:a,radiusRawIdx:o,calloutLabelIdx:n,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):void 0,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):void 0}}async createNodeData(){let{id:e,processedData:t,dataModel:i,angleScale:s}=this,{rotation:r}=this.properties;if(!t||!i||"ungrouped"!==t.type)return;let{angleIdx:a,angleRawIdx:o,angleFilterIdx:n,angleFilterRawIdx:l,radiusIdx:h,radiusRawIdx:d,calloutLabelIdx:u,sectorLabelIdx:c,legendItemIdx:p}=this.getProcessedDataIndexes(i),g=null!=l&&t.data.some(({values:e})=>e[l]>e[o]),m=0,v=0,f=[],C=null!=l?[]:void 0;return t.data.forEach((e,t)=>{var i;let{datum:y,values:w}=e,b=g?w[n]:w[a],S=null==l||g?1:Math.sqrt(w[l]/w[o]),x=s.convert(m)+vr(r);m=b,v+=b;let M=s.convert(m)+vr(r),D=Math.abs(M-x),E=x+D/2,I=w[o],A=(null!=h&&null!=(i=w[h])?i:1)*S,R=null!=d?w[d]:void 0,T=null!=p?w[p]:void 0,L=this.getLabels(y,E,D,!0,null!=u?w[u]:void 0,null!=c?w[c]:void 0,T),F=this.getSectorFormat(y,t,!1),P={itemId:t,series:this,datum:y,index:t,angleValue:I,midAngle:E,midCos:Math.cos(E),midSin:Math.sin(E),startAngle:x,endAngle:M,radius:A,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(A),0),sectorFormat:F,radiusValue:R,legendItemValue:T,enabled:this.seriesItemEnabled[t],...L};f.push(P),null!=C&&C.push({...P,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0)})}),this.zerosumOuterRing.visible=0===v,{itemId:e,nodeData:f,labelData:f,phantomNodeData:C}}getLabels(e,t,i,s,r,a,o){let{calloutLabel:n,sectorLabel:l,legendItemKey:h}=this.properties,d=!s||n.enabled?this.properties.calloutLabelKey:void 0,u=!s||l.enabled?this.properties.sectorLabelKey:void 0;if(!d&&!u&&!h)return{};let c={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return d&&i>vr(n.minAngle)&&(p.calloutLabel={...this.getTextAlignment(t),text:this.getLabelText(n,{...c,value:r}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),u&&(p.sectorLabel={text:this.getLabelText(l,{...c,value:a})}),null!=h&&null!=o&&(p.legendItem={key:h,text:o}),p}getTextAlignment(e){let t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=c0(Math.floor((vi(e)- -.75*Math.PI)/(Math.PI/2)),t.length);return t[i]}getSectorFormat(e,t,i){var s,r,a,o,n,l,h,d,u,c,p,g,m,v,f,C;let y,{callbackCache:w}=this.ctx,{angleKey:b,radiusKey:S,calloutLabelKey:x,sectorLabelKey:M,legendItemKey:D,fills:E,strokes:I,itemStyler:A}=this.properties,R=I[t%I.length],{fill:T,fillOpacity:L,stroke:F,strokeWidth:P,strokeOpacity:k,lineDash:N,lineDashOffset:O,cornerRadius:G}=pk(i&&this.properties.highlightStyle.item,{fill:E.length>0?E[t%E.length]:void 0,stroke:R,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties);return A&&(y=w.call(A,{datum:e,angleKey:b,radiusKey:S,calloutLabelKey:x,sectorLabelKey:M,legendItemKey:D,fill:T,strokeOpacity:k,stroke:F,strokeWidth:P,fillOpacity:L,lineDash:N,lineDashOffset:O,cornerRadius:G,highlighted:i,seriesId:this.id})),{fill:null!=(s=null==(r=y)?void 0:r.fill)?s:T,fillOpacity:null!=(a=null==(o=y)?void 0:o.fillOpacity)?a:L,stroke:null!=(n=null==(l=y)?void 0:l.stroke)?n:F,strokeWidth:null!=(h=null==(d=y)?void 0:d.strokeWidth)?h:P,strokeOpacity:null!=(u=null==(c=y)?void 0:c.strokeOpacity)?u:k,lineDash:null!=(p=null==(g=y)?void 0:g.lineDash)?p:N,lineDashOffset:null!=(m=null==(v=y)?void 0:v.lineDashOffset)?m:O,cornerRadius:null!=(f=null==(C=y)?void 0:C.cornerRadius)?f:G}}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(e){var t;let i=[0,this.getOuterRadius()];this.radiusScale.range=i,e&&(this.previousRadiusScale.range=i);let s=e=>({...e,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(e.radiu
206s),0)});this.nodeData=this.nodeData.map(s),this.phantomNodeData=null==(t=this.phantomNodeData)?void 0:t.map(s)}getTitleTranslationY(){var e,t;let i=Math.max(0,this.radiusScale.range[1]);if(0===i)return 0/0;let s=null!=(e=null==(t=this.properties.title)?void 0:t.spacing)?e:0,r=Math.max(0,-i);return-i-(2+s)-r}async update({seriesRect:e}){let{title:t}=this.properties,i={seriesRectWidth:null==e?void 0:e.width,seriesRectHeight:null==e?void 0:e.height},s=null!=vO(this.nodeDataDependencies,i);if(s&&(this._nodeDataDependencies=i),await this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){let e=this.getTitleTranslationY();t.node.y=isFinite(e)?e:0;let i=t.node.getBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i)}this.zerosumOuterRing.fillOpacity=0,this.zerosumOuterRing.stroke=this.properties.calloutLabel.color,this.zerosumOuterRing.strokeWidth=1,this.zerosumOuterRing.strokeOpacity=1,this.updateNodeMidPoint(),await this.updateSelections(),await this.updateNodes(e)}updateTitleNodes(){let{oldTitle:e}=this,{title:t}=this.properties;if(e!==t){var i,s;e&&(null==(i=this.labelGroup)||i.removeChild(e.node)),t&&(t.node.textBaseline="bottom",null==(s=this.labelGroup)||s.appendChild(t.node)),this.oldTitle=t}}updateNodeMidPoint(){var e;let t=e=>{let t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}};this.nodeData.forEach(t),null==(e=this.phantomNodeData)||e.forEach(t)}async updateSelections(){await this.updateGroupSelection()}async updateGroupSelection(){var e;let{itemSelection:t,highlightSelection:i,phantomSelection:s,highlightLabelSelection:r,calloutLabelSelection:a,labelSelection:o}=this,n=this.nodeData.map(e=>({...e,sectorFormat:{...e.sectorFormat}})),l=(e,t)=>
206{e.update(t,void 0,e=>this.getDatumId(e)),this.ctx.animationManager.isSkipped()&&e.cleanup()};l(t,this.nodeData),l(i,n),l(s,null!=(e=this.phantomNodeData)?e:[]),a.update(this.calloutNodeData,e=>{let t=new vS;t.tag=0,t.pointerEvents=1,e.appendChild(t);let i=new vR;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),o.update(this.nodeData),r.update(n)}async updateNodes(e){let t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.includes(!0);this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&(null==t?void 0:t.series)===this,this.highlightLabel.visible=i&&(null==t?void 0:t.series)===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity();let s=this.ctx.animationManager.isSkipped(),r=(e,t,i,r)=>{let a=this.getSectorFormat(t.datum,t.itemId,r);t.sectorFormat.fill=a.fill,t.sectorFormat.stroke=a.stroke,s&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(r||s)&&(e.fill=a.fill,e.stroke=a.stroke),e.strokeWidth=a.strokeWidth,e.fillOpacity=a.fillOpacity,e.strokeOpacity=a.strokeOpacity,e.lineDash=a.lineDash,e.lineDashOffset=a.lineDashOffset,e.cornerRadius=a.cornerRadius,e.fillShadow=this.properties.shadow;let o=Math.max((this.properties.sectorSpacing+(null!=a.stroke?a.strokeWidth:0))/2,0);e.inset=o,e.lineJoin=this.properties.sectorSpacing>=0||o>0?"miter":"round"};this.itemSelection.each((e,t,i)=>r(e,t,i,!1)),this.highlightSelection.each((e,i,s)=>{r(e,i,s,!0),e.visible=i.itemId===(null==t?void 0:t.itemId)}),this.phantomSelection.each((e,t,i)=>r(e,t,i,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){var e;let{calloutLine:t}=this.properties,i=t.length,s=t.strokeWidth,r=null!=(e=t.colors)?e:this.properties.strokes,{offset:a}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((e,t)=>{let o=e.datum,{calloutLabel:n,outerRadius:l}=o;if(null!=n&&n.text&&!n.hidden&&0!==l){var h;e.visible=!0,e.strokeWidth=s,e.stroke=r[t%r.length],e.fill=void 0;let d=o.midCos*l,u=o.midSin*l,c=o.midCos*(l+i),p=o.midSin*(l+i);if((null!=(h=n.collisionTextAlign)?h:0!==n.collisionOffsetY)&&null!=n.box){let e=n.box,t=c,i=p;c<e.x?t=e.x:c>e.x+e.width&&(t=e.x+e.width),p<e.y?i=e.y:p>e.y+e.height&&(i=e.y+e.height);let s=t-c,r=i-p,o=Math.sqrt(Math.pow(s,2)+Math.pow(r,2)),l=o-a;l>0&&(c+=s*l/o,p+=r*l/o)}e.x1=d,e.y1=u,e.x2=c,e.y2=p}else e.visible=!1})}getLabelOverflow(e,t,i){let s=i.x-this.centerX,r=i.x+i.width-this.centerX,a=i.y-this.centerY,o=i.y+i.height-this.centerY,n=1;t.x+1<s?n=(t.x+t.width-s)/t.width:t.x+t.width-1>r&&(n=(r-t.x)/t.width);let l=t.y+1<a||t.y+t.height-1>o;return{textLength:1===n?e.length:Math.floor(e.length*n)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e){let{surroundingRadius:t}=this;if(null==t)return!1;let i=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],s=t**2;return i.some(e=>e.x**2+e.y**2>s)}computeCalloutLabelCollisionOffsets(){let{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:s,minSpacing:r}=t,a=e.convert(0),o=this.calloutNodeData,n=o.filter(e=>!(!e.calloutLabel||0===e.outerRadius));if(n.forEach(e=>{let t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),n.length<=1)return;let l=n.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),h=n.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),d=n.filter(e=>{var t;return e.midSin<0&&(null==(t=e.calloutLabel)?void 0:t.textAlign)==="center"}).sort((e,t)=>e.midCos-t.midCos),u=n.filter(e=>{var t;return e.midSin>=0&&(null==(t=e.calloutLabel)?void 0:t.textAlign)==="center"}).sort((e,t)=>e.midCos-t.midCos),c=e=>{var t;let r=e.calloutLabel;if(null==r)return c4.zero.clone();let a=e.outerRadius+i.length+s,o=e.midCos*a,n=e.midSin*a+r.collisionOffsetY,l=null!=(t=r.collisionTextAlign)?t:r.textAlign,h=r.textBaseline;return vR.computeBBox(r.text,o,n,{font:this.properties.calloutLabel,textAlign:l,textBaseline:h})},p=(e,t,i)=>{let s=c(e).grow(r/2),a=c(t).grow(r/2);if(s.x<a.x+a.width&&s.x+s.width>a.x&&("to-top"===i?s.y<a.y+a.height:s.y+s.height>a.y)){let e="to-top"===i?s.y-a.y-a.height:s.y+s.height-a.y;t.calloutLabel.collisionOffsetY=e}},g=e=>{let t=e.slice().sort((e,t)=>
206Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--)p(e[t+1],e[t],"to-top");for(let t=i+1;t<e.length;t++)p(e[t-1],e[t],"to-bottom")},m=e=>{let t=n.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>c(e)),s=i.map(e=>e.clone().grow(r/2)),l=!1;for(let t=0;t<s.length&&!l;t++){let i=s[t];for(let r=t+1;r<e.length;r++){let e=s[r];if(i.collidesBBox(e)){l=!0;break}}}let h=o.map(e=>{let{startAngle:t,endAngle:i,outerRadius:s}=e;return{startAngle:t,endAngle:i,innerRadius:a,outerRadius:s}}),d=i.some(e=>h.some(t=>Dn(e,t)));(l||t||d)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{let t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};g(l),g(h),m(d),m(u)}updateCalloutLabelNodes(e){let{radiusScale:t}=this,{calloutLabel:i,calloutLine:s}=this.properties,r=s.length,{offset:a,color:o}=i,n=new vR;this.calloutLabelSelection.selectByTag(1).forEach(s=>{var l;let{datum:h}=s,d=h.calloutLabel,u=Math.max(0,t.convert(h.radius));if(!(null!=d&&d.text)||0===u||d.hidden){s.visible=!1;return}let c=u+r+a,p=h.midCos*c,g=h.midSin*c+d.collisionOffsetY,m={textAlign:null!=(l=d.collisionTextAlign)?l:d.textAlign,textBaseline:d.textBaseline};n.text=d.text,n.x=p,n.y=g,n.setFont(this.properties.calloutLabel),n.setAlign(m);let v=n.getBBox(),f=d.text,C=!0;if(i.avoidCollisions){let{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(d.text,v,e);f=d.text.length===t?d.text:`${d.text.substring(0,t)}\u2026`,C=!i}s.text=f,s.x=p,s.y=g,s.setFont(this.properties.calloutLabel),s.setAlign(m),s.fill=o,s.visible=C})}async computeLabelsBBox(e,t){let i,{calloutLabel:s,calloutLine:r}=this.properties,a=r.length,{offset:o,maxCollisionOffset:n,minSpacing:l}=s;if(!s.avoidCollisions)return null;await this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();let h=[],d=new vR,{title:u}=this.properties;if(null!=u&&u.text&&u.enabled){let e=this.getTitleTranslationY();isFinite(e)&&(d.text=u.text,d.x=0,d.y=e,d.setFont(u),d.setAlign({textBaseline:"bottom",textAlign:"center"}),i=d.getBBox(),h.push(i))}return(this.calloutNodeData.forEach(s=>{var r;let u=s.calloutLabel;if(!u||0===s.outerRadius)return null;let c=s.outerRadius+a+o,p=s.midCos*c,g=s.midSin*c+u.collisionOffsetY;d.text=u.text,d.x=p,d.y=g,d.setFont(this.properties.calloutLabel),d.setAlign({textAlign:null!=(r=u.collisionTextAlign)?r:u.textAlign,textBaseline:u.textBaseline});let m=d.getBBox();if(u.box=m,Math.abs(u.collisionOffsetY)>n){u.hidden=!0;return}if(i){let e=t.y-this.centerY,s=new c4(i.x-l,e,i.width+2*l,i.y+i.height+l-e);if(m.collidesBBox(s)){u.hidden=!0;return}}if(e.hideWhenNecessary){let{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:s}=this.getLabelOverflow(u.text,m,t),r=u.text.length>2&&e<2;if(i||r||s){u.hidden=!0;return}}u.hidden=!1,h.push(m)}),0===h.length)?null:c4.merge(h)}updateSectorLabelNodes(){let{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:s,fontWeight:r,fontFamily:a,positionOffset:o,positionRatio:n,color:l}=this.properties.sectorLabel,h=t>0,d=1===this.seriesItemEnabled.filter(Boolean).length,u=(e,u)=>{let{sectorLabel:c,outerRadius:p,startAngle:g,endAngle:m}=u,v=!1;if(c&&0!==p){let f=t*(1-n)+p*n+o;e.fill=l,e.fontStyle=s,e.fontWeight=r,e.fontSize=i,e.fontFamily=a,e.text=c.text,!h&&d?(e.x=0,e.y=0):(e.x=u.midCos*f,e.y=u.midSin*f),e.textAlign="center",e.textBaseline="middle";let C=e.getBBox(),y=[[C.x,C.y],[C.x+C.width,C.y],[C.x+C.width,C.y+C.height],[C.x,C.y+C.height]],w={startAngle:g,endAngle:m,innerRadius:t,outerRadius:p};y.every(([e,t])=>Da(e,t,w))&&(v=!0)}e.visible=v};this.labelSelection.each(u),this.highlightLabelSelection.each(u)}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius()}getDatumLegendName(e){let{angleKey:t,calloutLabelKey:i,sectorLabelKey:s,legendItemKey:r}=this.properties,{sectorLabel:a,calloutLabel:o,legendItem:n}=e;return r&&void 0!==n?n.text:i&&i!==t&&(null==o?void 0:o.text)!==void 0?o.text:s&&s!==t&&(null==a?void 0:a.text)!==void 0?a.text:void 0}pickNodeClosestDatum(e){return DE(this,e)}getTooltipHtml(e){var t;if(!this.properties.isValid())return v5;let{datum:i,angleValue:s,sectorFormat:{fill:r},itemId:a}=e,o=SW(null==(t=this.properties.title)?void 0:t.text),n=pE(s)?cJ(s):String(s),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:null!=o?o:l,content:o&&l?`${l}: ${n}`:n,backgroundColor:r},{datum:i,itemId:a,title:o,color:r,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){var t,i,s,r,a;let{visible:o,processedData:n,dataModel:l}=this;if(!l||!(null!=n&&n.data.length)||"category"!==e)return[];let{angleKey:h,calloutLabelKey:d,sectorLabelKey:u,legendItemKey:c}=this.properties;
206if(!c&&(!d||d===h)&&(!u||u===h))return[];let{calloutLabelIdx:p,sectorLabelIdx:g,legendItemIdx:m}=this.getProcessedDataIndexes(l),v=(null==(t=this.properties.title)?void 0:t.showInLegend)&&this.properties.title.text,f=[];for(let e=0;e<n.data.length;e++){let{datum:t,values:l}=n.data[e],C=[];v&&C.push(v);let y=this.getLabels(t,2*Math.PI,2*Math.PI,!1,null!=p?l[p]:void 0,null!=g?l[g]:void 0,null!=m?l[m]:void 0);if(c&&void 0!==y.legendItem?C.push(y.legendItem.text):d&&d!==h&&(null==(i=y.calloutLabel)?void 0:i.text)!==void 0?C.push(null==(r=y.calloutLabel)?void 0:r.text):u&&u!==h&&(null==(s=y.sectorLabel)?void 0:s.text)!==void 0&&C.push(null==(a=y.sectorLabel)?void 0:a.text),0===C.length)continue;let w=this.getSectorFormat(t,e,!1);f.push({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:o&&this.legendItemEnabled[e],label:{text:C.join(" - ")},symbols:[{marker:{fill:w.fill,stroke:w.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}}],legendItemName:null!=c?t[c]:void 0})}return f}onLegendItemClick(e){let{enabled:t,itemId:i,series:s,legendItemName:r}=e;s.id===this.id?this.toggleSeriesItem(i,t):null!=r&&this.toggleOtherSeriesItems(r,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.legendItemEnabled[e]=t,this.nodeData[e]&&(this.nodeData[e].enabled=t),this.nodeDataRefresh=!0}setLegendState(e){this.legendItemEnabled=e,this.ctx.updateService.update(4)}toggleOtherSeriesItems(e,t){var i;if(!this.properties.legendItemKey||!this.dataModel)return;let s=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");null==(i=this.processedData)||i.data.forEach(({values:i},r)=>{i[s]===e&&this.toggleSeriesItem(r,t)})}animateEmptyUpdateReady(e){let{animationManager:t}=this.ctx,i=DM(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);p3(this.id,"nodes",t,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(e,t)=>this.getDatumId(t)),xf(this,"callout",t,this.calloutLabelSelection),xf(this,"sector",t,this.labelSelection),xf(this,"highlight",t,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,t,i,s,r;let{itemSelection:a,highlightSelection:o,phantomSelection:n,processedData:l,radiusScale:h,previousRadiusScale:d}=this,{animationManager:u}=this.ctx,c=null==l||null==(e=l.reduced)?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);let p=(null!=(t=null==c?void 0:c.moved.size)?t:0)===0,g=(null!=(i=null==l?void 0:l.defs.keys.length)?i:0)>0,m=null==(s=null==l||null==(r=l.reduced)||null==(r=r.animationValidation)?void 0:r.uniqueKeys)||s;p&&g&&m||this.ctx.animationManager.skipCurrentBatch();let v=DM(!1,this.properties.rotation,h,d);p3(this.id,"nodes",u,[a,o,n],v.nodes,(e,t)=>this.getDatumId(t),c),xf(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),xf(this,"sector",this.ctx.animationManager,this.labelSelection),xf(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){let{itemSelection:e,highlightSelection:t,phantomSelection:i,radiusScale:s,previousRadiusScale:r}=this,{animationManager:a}=this.ctx,o=DM(!1,this.properties.rotation,s,r);p3(this.id,"nodes",a,[e,t,i],o.nodes,(e,t)=>this.getDatumId(t)),xC(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),xC(this,"sector",this.ctx.animationManager,this.labelSelection),xC(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var t;let{calloutLabelKey:i,sectorLabelKey:s,legendItemKey:r}=this.properties;if(null!=(t=this.processedData)&&null!=(t=t.reduced)&&null!=(t=t.animationValidation)&&t.uniqueKeys){if(r)return e[r];else if(i)return e[i];else if(s)return e[s]}}getDatumId(e){let{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){var e,t;let{data:i,seriesItemEnabled:s,legendItemEnabled:r}=this;this.seriesItemEnabled=null!=(e=null==i?void 0:i.map((e,t)=>{var i;return null==(i=s[t])||i}))?e:[],this.legendItemEnabled=null!=(t=null==i?void 0:i.map((e,t)=>{var i;return null==(i=r[t])||i}))?t:[]}};DB.className="PieSeries",DB.type="pie";var Dz={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",moduleFactory:e=>new DB(e),tooltipDefaults:{range:"exact"},themeTemplate:{series:{title:{enabled:!0,fontWeight:"normal",fontSize:14,fontFamily:b3,color:b8,spacing:5},calloutLabel:{enabled:!0,fontSize:12,fontFamily:b3,color:b4,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontWeight:"normal",fontSize:12,fontFamily:b3,color:b5,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:Si,xOffset:3,yOffset:3,blur:5}}},paletteFactory:DT},DV={add:function(e,t){return"number"==typeof t?{x:e.x+t,y:e.y+t}:{x:e.x+t.x,y:e.y+t.y}},angle:function(e,t=DW()){return Math.atan2(e.y,e.x)-Math.atan2(t.y,t.x)},apply:function(e,t){return e.x=t.x,e.y=t.y,e},equal:function(e,t){return e.x===t.x&&e.y===t.y},distance:function(e,t){let i=DH(e,t);return Math.sqrt(i.x*i.x+i.y*i.y)},distanceSquared:function(e,t){let i=DH(e,t);return i.x*i.x+i.y*i.y},from:function(e,t){if("number"==typeof e)return{x:e,y:t};if("regionOffsetX"in e)return{x:e.regionOffsetX,y:e.regionOffsetY};if("offsetWidth"in e)return{x:e.offsetWidth,y:e.offsetHeight};if("width"in e)return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y+e.height}];if("x1"in e)return[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2}];throw Error(`Values can not be converted into a vector: [${e}] [${t}]`)},gradient:function(e,t,i){let s=t.x-e.x;return(null==i?t.y-e.y:i-t.y-(i-e.y))/s},intercept:function(e,t,i){return(null==i?e.y:i-e.y)-t*e.x},intersectAtX:function(e,t,i=0,s){let r=1/0===e?1/0:e*i+t;return{x:i,y:null==s?r:s-r}},intersectAtY:function(e,t,i=0,s){return{x:1/0===e?1/0:(i-t)/e,y:null==s?i:s-i}},length:Dj,lengthSquared:function(e){return e.x*e.x+e.y*e.y},multiply:function(e,t){return"number"==typeof t?{x:e.x*t,y:e.y*t}:{x:e.x*t.x,y:e.y*t.y}},normalized:function(e){let t=Dj(e);return{x:e.x/t,y:e.y/t}},origin:DW,required:function(e){var t,i;
206return{x:null!=(t=null==e?void 0:e.x)?t:0,y:null!=(i=null==e?void 0:e.y)?i:0}},rotate:function(e,t,i=DW()){let s=Dj(e);return{x:i.x+s*Math.cos(t),y:i.y+s*Math.sin(t)}},round:function(e){return{x:Math.round(e.x),y:Math.round(e.y)}},sub:DH};function DH(e,t){return"number"==typeof t?{x:e.x-t,y:e.y-t}:{x:e.x-t.x,y:e.y-t.y}}function Dj(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function DW(){return{x:0,y:0}}var DU=class extends gb{constructor(e,t){super(),this.onChange=e,this.onButtonsChange=t,this.align="start",this.position="top",this.size="normal",this.buttonOverrides=new Map}buttonConfigurations(){var e,t;let i=[...null!=(e=this.buttons)?e:[]];return this.draggable&&i.unshift({icon:"drag-handle",tooltip:"toolbarAnnotationsDragHandle",value:"drag",id:"drag"}),null!=(t=null==i?void 0:i.map(e=>{var t;let i=null!=(t=e.id)?t:e.value,s=this.buttonOverrides.get(i);return null!=s?{...e,...s}:e}))?t:[]}buttonsChanged(e){this.onButtonsChange(this.buttonConfigurations(),e)}overrideButtonConfiguration(e,t){let i=this.buttonOverrides.get(e);for(let s in null==i&&(i=Object.create(null),this.buttonOverrides.set(e,i)),t){let e=t[s];null==e?delete i[s]:i[s]=e}this.buttonsChanged(!0)}};uQ([vY(e=>{e.onChange(e.enabled)}),gM(gR)],DU.prototype,"enabled",2),uQ([vY(e=>{e.onChange(e.enabled)}),gM(ma([...yz]),{optional:!0})],DU.prototype,"align",2),uQ([vY(e=>{e.onChange(e.enabled)}),gM(ma(yW),{optional:!0})],DU.prototype,"position",2),uQ([gM(gR)],DU.prototype,"draggable",2),uQ([vY(e=>{e.onChange(e.enabled)}),gM(ma(["small","normal"]),{optional:!0})],DU.prototype,"size",2),uQ([vY(e=>{for(let i of null!=(t=e.buttons)?t:[]){var t;null!=i.icon&&u0.includes(i.icon)&&u8.warnOnce(`Icon '${i.icon}' is deprecated, use another icon instead.`),"toolbarAnnotationsColor"===i.ariaLabel&&u8.warnOnce(`Aria label '${i.ariaLabel}' is deprecated, use 'toolbarAnnotationsLineColor' instead.`)}e.buttonsChanged(!1)}),gM(gz,{optional:!0})],DU.prototype,"buttons",2);var D_="ag-charts-toolbar",D$={top:"ag-charts-toolbar--top",right:"ag-charts-toolbar--right",bottom:"ag-charts-toolbar--bottom",left:"ag-charts-toolbar--left",floating:"ag-charts-toolbar--floating","floating-top":"ag-charts-toolbar--floating-top","floating-bottom":"ag-charts-toolbar--floating-bottom",small:"ag-charts-toolbar--small",normal:"ag-charts-toolbar--normal",hidden:"ag-charts-toolbar--hidden",preventFlash:"ag-charts-toolbar--prevent-flash",floatingHidden:"ag-charts-toolbar--floating-hidden",align:{start:"ag-charts-toolbar__align--start",center:"ag-charts-toolbar__align--center",end:"ag-charts-toolbar__align--end"},button:{first:"ag-charts-toolbar__button--first",last:"ag-charts-toolbar__button--last",active:"ag-charts-toolbar__button--active",hiddenValue:"ag-charts-toolbar__button--hidden-value",hiddenToggled:"ag-charts-toolbar__button--hidden-toggled",fillVisible:"ag-charts-toolbar__button--fill-visible",strokeWidthVisible:"ag-charts-toolbar__button--stroke-width-visible",withTransition:"ag-charts-toolbar__button--with-transition",dragHandle:"ag-charts-toolbar__button--drag-handle",dragging:"ag-charts-toolbar__button--dragging"}},DY=class extends f7{constructor(e){for(let t of(super(),this.ctx=e,this.enabled=!0,this.seriesType=new DU(this.onGroupChanged.bind(this,"seriesType"),this.onGroupButtonsChanged.bind(this,"seriesType")),this.annotations=new DU(this.onGroupChanged.bind(this,"annotations"),this.onGroupButtonsChanged.bind(this,"annotations")),this.annotationOptions=new DU(this.onGroupChanged.bind(this,"annotationOptions"),this.onGroupButtonsChanged.bind(this,"annotationOptions")),this.ranges=new DU(this.onGroupChanged.bind(this,"ranges"),this.onGroupButtonsChanged.bind(this,"ranges")),this.zoom=new DU(this.onGroupChanged.bind(this,"zoom"),this.onGroupButtonsChanged.bind(this,"zoom")),this.dragState={client:{x:0,y:0},position:{x:0,y:0},detached:!1},this.horizontalSpacing=10,this.verticalSpacing=10,this.floatingDetectionRange=38,this.positions={top:new Set,left:new Set,right:new Set,bottom:new Set,floating:new Set,"floating-top":new Set,"floating-bottom":new Set},this.positionAlignments={top:{},left:{},right:{},bottom:{},floating:{},"floating-top":{},"floating-bottom":{}},this.groupCallers={seriesType:new Set,annotations:new Set,annotationOptions:new Set,ranges:new Set,zoom:new Set},this.groupButtons={seriesType:[],annotations:[],annotationOptions:[],ranges:[],zoom:[]},this.ariaToolbars=[{groups:["seriesType","annotations"],destroyFns:[],resetListeners:()=>{}},{groups:["annotationOptions"],destroyFns:[],resetListeners:()=>{}},{groups:["ranges"],destroyFns:[],resetListeners:()=>{}},{groups:["zoom"],destroyFns:[],resetListeners:()=>{}}],this.pendingButtonToggledEvents=[],this.groupProxied=new Map,this.hasNewLocale=!0,this.elements={},yW))this.elements[t]=e.domManager.addChild("canvas-overlay",`toolbar-${t}`),this.elements[t].role="presentation",this.renderToolbar(t);this.toggleVisibilities();let t=e.regionManager.getRegion("series");this.destroyFns.push(e.interactionManager.addListener("hover",this.onHover.bind(this),63),e.interactionManager.addListener("leave",this.onLeave.bind(this),63),t.addListener("drag-start",this.toggleNoPointerEvents.bind(this,!0),40),t.addListener("drag-end",this.toggleNoPointerEvents.bind(this,!1),63),e.toolbarManager.addListener("button-toggled",this.onButtonToggled.bind(this)),e.toolbarManager.addListener("button-updated",this.onButtonUpdated.bind(this)),e.toolbarManager.addListener("group-toggled",this.onGroupToggled.bind(this)),e.toolbarManager.addListener("group-updated",this.onGroupUpdated.bind(this)),e.toolbarManager.addListener("floating-anchor-changed",this.onFloatingAnchorChanged.bind(this)),e.toolbarManager.addListener("proxy-group-options",this.onProxyGroupOptions.bind(this)),e.layoutManager.registerElement(2,this.onLayoutStart.bind(this)),e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)),e.updateService.addListener("pre-dom-update",this.onPreDomUpdate.bind(this)),e.updateService.addListener("update-complete",this.onUpdateComplete.bind(this)),e.localeManager.addListener("locale-changed",()=>{this.hasNewLocale=!0}),()=>this.destroyElements())}destroyElements(){for(let e of(this.ctx.domManager.removeStyles(D_),Object.keys(this.elements)))this.ctx.domManager.removeChild("canvas-overlay",`toolbar-${e}`)}onHover(e){let{enabled:t,elements:i,floatingDetectionRange:s,ctx:{scene:r}}=this,{offsetY:a,sourceEvent:{target:o}}=e,{FloatingBottom:n,FloatingTop:l}=yj;if(!t)return;let h=i[n],d=i[l],u=a>
206h.offsetTop-s&&a<r.canvas.element.offsetHeight||o===h,c=d.offsetTop+d.offsetHeight+s,p=a>0&&a<c||o===d;this.translateFloatingElements(n,u),this.translateFloatingElements(l,p)}onLeave(e){let{enabled:t,ctx:{scene:i}}=this,{relatedElement:s,targetElement:r}=e,{FloatingBottom:a,FloatingTop:o}=yj;!t||r!==i.canvas.element||yV.some(e=>this.groupButtons[e].some(e=>e===s))||(this.translateFloatingElements(a,!1),this.translateFloatingElements(o,!1))}toggleNoPointerEvents(e){this.groupButtons.annotationOptions.forEach(t=>t.classList.toggle("ag-charts-toolbar__no-pointer-events",e))}onGroupChanged(e){null==this[e]||this.groupProxied.has(e)||(this.createGroup(e),this.toggleVisibilities())}onGroupButtonsChanged(e,t,i){if(!(!this.enabled||this.groupProxied.has(e))){if(i)for(let t of this[e].buttonConfigurations())this.refreshButtonContent(e,t);else this.createGroupButtons(e,t);this.toggleVisibilities()}}onLayoutComplete(e){for(let e of yW)this.elements[e].classList.remove(D$.preventFlash);this.enabled&&this.refreshInnerLayout(e.series.rect)}toggleButtonsTransition(e){let t=D$.button.withTransition;for(let i of Object.values(this.groupButtons).flat())e&&!i.classList.contains(t)&&i.getBoundingClientRect(),i.classList.toggle(t,e)}onPreDomUpdate(){this.toggleButtonsTransition(!1)}onUpdateComplete(){this.toggleButtonsTransition(!0)}onButtonUpdated(e){let{type:t,group:i,id:s,...r}=e;this[i].overrideButtonConfiguration(s,r)}setButtonActive(e,t){e.classList.toggle(D$.button.active,t)}setButtonChecked(e,t){"switch"===e.role&&(e.ariaChecked=t.toString())}setButtonGroupFirstLast(e){var t;let i=Array.from(null!=(t=e.childNodes)?t:[]),s=(e,t,i)=>{let s=!t.classList.contains(D$.button.hiddenToggled);return t.classList.toggle(i,s&&e),!s&&e},r=!0;i.forEach(e=>r=s(r,e,D$.button.first));let a=!0;i.toReversed().forEach(e=>a=s(a,e,D$.button.last))}onButtonToggled(e){let{group:t,id:i,active:s,enabled:r,visible:a,checked:o}=e;if(0===this.groupButtons[t].length)return void this.pendingButtonToggledEvents.push(e);let n=this.groupButtons[t].find(e=>e.dataset.toolbarId===`${i}`);null!=n&&(n.ariaDisabled=`${!r}`,n.classList.toggle(D$.button.hiddenToggled,!a),this.setButtonActive(n,s),this.setButtonChecked(n,o),this.setButtonGroupFirstLast(n.parentNode))}onGroupToggled(e){let{caller:t,group:i,active:s,visible:r}=e;this.toggleGroup(t,i,s,r),this.toggleVisibilities()}onGroupUpdated(e){let{group:t}=e;for(let e of this.ariaToolbars)if(e.groups.includes(t))return void e.resetListeners()}onFloatingAnchorChanged(e){var t;let{elements:i,positions:s,horizontalSpacing:r,verticalSpacing:a}=this,{group:o,anchor:n}=e,l=i.floating;if(this.dragState.detached||l.classList.contains(D$.hidden)||(this.dragState.detached=!1,!s.floating.has(o)))return;let h=null!=(t=n.position)?t:"above",{offsetWidth:d,offsetHeight:u}=l,c=n.y-u-a,p=n.x-d/2;"below"===h?c=n.y+a:"right"===h?(c=n.y-u/2,p=n.x+r):"above-left"===h&&(p=n.x);let g=new c4(p,c,d,u);this.positionGroup(l,o,g)}positionGroup(e,t,i){let{ctx:{domManager:s}}=this,r=s.getBoundingClientRect();i.x=c$(0,i.x,r.width-i.width),i.y=c$(0,i.y,r.height-i.height);let a=`${Math.floor(i.x)}px`,o=`${Math.floor(i.y)}px`;(e.style.getPropertyValue("left")!==a||e.style.getPropertyValue("top")!==o)&&(e.style.setProperty("left",a),e.style.setProperty("top",o),this.onGroupMoved(t,i))}onGroupMoved(e,t){let{groupButtons:i,ctx:{toolbarManager:s}}=this;for(let o of i[e]){var r,a;if(o.classList.contains(D$.button.hiddenToggled))continue;let i=o.offsetParent;s.buttonMoved(e,o.dataset.toolbarId,new c4(o.offsetLeft+(null!=(r=null==i?void 0:i.offsetLeft)?r:0),o.offsetTop+(null!=(a=null==i?void 0:i.offsetTop)?a:0),o.offsetWidth,o.offsetHeight),t)}}buttonRect(e,t=this.ctx.domManager.getBoundingClientRect()){let i=e.getBoundingClientRect();return new c4(i.left-t.left,i.top-t.top,i.width,i.height)}onProxyGroupOptions(e){if(!this.enabled)return;let{caller:t,group:i,options:s}=e;this.groupProxied.set(i,s),this[i].set(s),this.toggleGroup(t,i,void 0,s.enabled),this.createGroup(i,s.enabled,s.position),s.enabled&&this.createGroupButtons(i,s.buttons)}createGroup(e,t,i){for(let s of(null!=t||(t=this[e].enabled),null!=i||(i=this[e].position),yW))t&&i===s?this.positions[s].add(e):this.positions[s].delete(e)}createGroupButtons(e,t=[]){var i;let s,r;for(let t of this.groupButtons[e])t.remove();if(this.groupButtons[e]=[],0===t.length)return;let{align:a,position:o}=this[e],n=this.positionAlignments[o][a];if(!n)return;let l=t=>{let i=Array.from(n.children),s="data-group",r="data-section",a=i.find(i=>i.getAttribute(s)===e&&i.getAttribute(r)===(null!=t?t:""));if(!a){(a=cG("div")).role="presentation",a.setAttribute(s,e),a.setAttribute(r,null!=t?t:"");let o=yH[e],l=i.find(e=>yH[e.getAttribute(s)]>o);null!=l?n.insertBefore(a,l):n.appendChild(a),this.destroyFns.push(()=>a.remove())}return a.classList.add("ag-charts-toolbar__section",D$[this[e].size]),a},h=null==(i=t.at(0))?void 0:i.section,d=l(h);for(let i of t){h!==i.section&&(this.setButtonGroupFirstLast(d),d=l(i.section)),h=i.section;let t=this.createButtonElement(e,i);d.appendChild(t),this.groupButtons[e].push(t)}this.setButtonGroupFirstLast(d);let u=()=>{this.ctx.toolbarManager.cancel(e)};yU(o)&&(s=()=>this.translateFloatingElements(o,!0),r=()=>this.translateFloatingElements(o,!1)),this.createAriaToolbar(e,n,s,r,u)}createAriaToolbar(e,t,i,s,r){let a=this.computeAriaOrientation(this[e].position),o=this.getAriaToolbar(e);o.resetListeners=()=>{let e=o.groups.map(e=>this.groupButtons[e]).flat().filter(e=>!e.classList.contains(D$.button.hiddenToggled)&&!e.classList.contains(D$.button.dragHandle));
206o.destroyFns.forEach(e=>e()),o.destroyFns=CI({orientation:a,toolbar:t,buttons:e,onEscape:r,onFocus:i,onBlur:s})},o.resetListeners(),this.updateToolbarAriaLabel(e,t)}computeAriaOrientation(e){return({top:"horizontal",right:"vertical",bottom:"horizontal",left:"vertical",floating:"horizontal","floating-top":"horizontal","floating-bottom":"horizontal"})[e]}toggleGroup(e,t,i,s){if(!0===s?this.groupCallers[t].add(e):!1===s&&this.groupCallers[t].delete(e),null!=i)for(let e of this.groupButtons[t])this.setButtonActive(e,i)}processPendingEvents(){var e;for(let t of(null!=(e=this.pendingButtonToggledEvents)?e:[]).slice())this.onButtonToggled(t);this.pendingButtonToggledEvents=[]}onLayoutStart(e){this.enabled&&(this.refreshOuterLayout(e.layoutBox),this.refreshLocale())}refreshOuterLayout(e){let{elements:t,horizontalSpacing:i,verticalSpacing:s}=this;t.top.classList.contains(D$.hidden)||e.shrink(t.top.offsetHeight+s,"top"),t.right.classList.contains(D$.hidden)||e.shrink(t.right.offsetWidth+i,"right"),t.bottom.classList.contains(D$.hidden)||(e.shrink(t.bottom.offsetHeight+s,"bottom"),t.bottom.style.top=`${e.y+e.height+s}px`),t.left.classList.contains(D$.hidden)||e.shrink(t.left.offsetWidth+i,"left")}refreshLocale(){let{hasNewLocale:e}=this;if(e){for(let e of yV){for(let t of this[e].buttonConfigurations())this.refreshButtonContent(e,t);this.updateToolbarAriaLabel(e)}this.hasNewLocale=!1}}refreshInnerLayout(e){let{elements:t,verticalSpacing:i}=this,{FloatingBottom:s,FloatingTop:r}=yj;t.top.style.top=`${e.y-t.top.offsetHeight-i}px`,t.top.style.left=`${e.x}px`,t.top.style.width=`${e.width}px`,t.bottom.style.left=`${e.x}px`,t.bottom.style.width=`${e.width}px`,t.right.style.top=`${e.y}px`,t.right.style.right="0px",t.right.style.height=`${e.height}px`,t.left.style.top=`${e.y}px`,t.left.style.left="0px",t.left.style.height=`${e.height}px`,t[r].style.top=`${e.y}px`,t[s].style.top=`${e.y+e.height-t[s].offsetHeight}px`}refreshButtonContent(e,t){var i,s;let r=this.buttonId(t),a=null!=(i=null==(s=this.groupProxied.get(e))||null==(s=s.buttons)?void 0:s.find(e=>this.buttonId(e)===r))?i:t,o=this.groupButtons[e].find(e=>e.getAttribute("data-toolbar-id")===r);null!=o&&this.updateButton(o,a)}toggleVisibilities(){if(null==this.elements)return;let e=e=>this[e].enabled&&this.groupCallers[e].size>0,t=e=>t=>{let i=this.buttonId(t);return null==i||i===e.dataset.toolbarId};for(let t of yW){let i=this.enabled&&Array.from(this.positions[t].values()).some(e);"floating"!==t||i||(this.dragState.detached=!1),this.elements[t].classList.toggle(D$.hidden,!i)}for(let i of yV){if(null==this[i])continue;let s=e(i);for(let e of this.groupButtons[i]){let r=s&&this[i].buttonConfigurations().some(t(e));e.classList.toggle(D$.button.hiddenValue,!r)}}}translateFloatingElements(e,t){let{elements:i,verticalSpacing:s,positionAlignments:r}=this,a=i[e],o=Object.values(r[e]);a.classList.toggle(D$.floatingHidden,!t);let n="floating-bottom"===e?1:-1;for(let e of o)e.style.transform=t&&""!==e.style.transform?"translateY(0)":`translateY(${(a.offsetHeight+s)*n}px)`}renderToolbar(e="top"){let t=this.elements[e];for(let i of(t.classList.add(D_,D$[e],D$.preventFlash),yU(e)&&t.classList.add(D$.floatingHidden),yz)){let s=cG("div");s.role="presentation",s.classList.add("ag-charts-toolbar__align",D$.align[i]),t.appendChild(s),this.positionAlignments[e][i]=s}}createButtonElement(e,t){let i=cG("button");return i.classList.add("ag-charts-toolbar__button"),i.dataset.toolbarGroup=e,vJ(i,"tabindex",-1),t.haspopup&&v0(i,{"aria-haspopup":!0,"aria-expanded":!1}),i.dataset.toolbarId=this.buttonId(t),i.addEventListener("click",CL(i,s=>this.onButtonPress(s,i,e,t.id,t.value))),"drag"===t.value&&(i.addEventListener("mousedown",CL(i,t=>this.onDragStart(t,i,e))),i.classList.add(D$.button.dragHandle)),"switch"===t.role&&v0(i,{role:t.role,"aria-checked":!1}),this.updateButton(i,t),this.destroyFns.push(()=>i.remove()),i}getAriaToolbar(e){for(let t of this.ariaToolbars)if(t.groups.includes(e))return t;throw Error(`AG Charts - cannot find aria-toolbar of '${e}'`)}updateToolbarAriaLabel(e,t){if(!t){let{align:i,position:s}=this[e];if(!(t=this.positionAlignments[s][i]))return}t.ariaLabel=this.ctx.localeManager.t({seriesType:"ariaLabelFinancialCharts",annotations:"ariaLabelFinancialCharts",annotationOptions:"ariaLabelAnnotationOptionsToolbar",ranges:"ariaLabelRangesToolbar",zoom:"ariaLabelZoomToolbar"}[e])}expandButtonConfig(e,t){var i,s,r,a;return"switch"!==t.role||"true"!==e.ariaChecked||void 0===t.checkedOverrides?t:{icon:null!=(i=t.checkedOverrides.icon)?i:t.icon,label:null!=(s=t.checkedOverrides.label)?s:t.label,ariaLabel:null!=(r=t.checkedOverrides.ariaLabel)?r:t.ariaLabel,tooltip:null!=(a=t.checkedOverrides.tooltip)?a:t.tooltip}}updateButton(e,t){var i;let{domManager:s,localeManager:r}=this.ctx,{icon:a,label:o,ariaLabel:n,tooltip:l}=this.expandButtonConfig(e,t);l&&(e.title=r.t(l));let h="";if(null!=a&&(h=`<span class="${s.getIconClassNames(a)} ag-charts-toolbar__icon"></span>`),null!=o){let e=r.t(o);h=`${h}<span class="ag-charts-toolbar__label">${e}</span>`}e.innerHTML=h,e.classList.toggle(D$.button.fillVisible,null!=t.fill),e.style.setProperty("--fill",null!=(i=t.fill)?i:null);let d=null!=t.strokeWidth;e.classList.toggle(D$.button.strokeWidthVisible,d),e.style.setProperty("--strokeWidth",d?`${t.strokeWidth}px`:null),vJ(e,"aria-label",n?this.ctx.localeManager.t(n):void 0)}onButtonPress(e,t,i,s,r){this.ctx.toolbarManager.pressButton(i,this.buttonId({id:s,value:r}),r,this.buttonRect(t),e)}onDragStart(e,t,i){let s=this.elements.floating;e.preventDefault(),e.stopPropagation(),this.dragState={client:DV.from(e.clientX,e.clientY),position:DV.from(Number(s.style.getPropertyValue("left").replace("px","")),Number(s.style.getPropertyValue("top").replace("px",""))),detached:!0},t.classList.toggle(D$.button.dragging,!0);let r=e=>this.onDrag(e,i),a=cO();a.addEventListener("mousemove",r),a.addEventListener("mouseup",()=>{t.classList.toggle(D$.button.dragging,!1),a.removeEventListener("mousemove",r)},{once:!0}),this.ctx.toolbarManager.groupMoved(i)}onDrag(e,t){let{elements:i,dragState:s}=this,r=i.floating,{offsetWidth:a,offsetHeight:o}=r,n=DV.sub(DV.from(e.clientX,e.clientY),s.client),l=DV.add(s.position,n),h=new c4(l.x,l.y,a,o);this.positionGroup(r,t,h)}buttonId(e){let{id:t,value:i,label:s}=e;return null!=t?t:null!=i&&"object"!=typeof i?String(i):null!=s?s:""}};uQ([vY(e=>{e.processPendingEvents(),e.toggleVisibilities()}),gM(gR)],DY.prototype,"enabled",2);var DK={type:"root",optionsKey:"toolbar",packageType:"community",chartTypes:["cartesian"],moduleFactory:e=>new DY(e),themeTemplate:{toolbar:{enabled:!0,seriesType:{enabled:!1,position:"left",align:"start",buttons:[{tooltip:"toolbarSeriesTypeDropdown",value:"type",haspopup:!0}]},annotations:{enabled:!0,position:"left",align:"start",buttons:[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu",section:"line-annotations",haspopup:!0},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu",section:"text-annotations",haspopup:!0},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu",section:"shape-annotations",haspopup:!0},{icon:"measurer-drawing",tooltip:"toolbarAnnotationsMeasurerAnnotations",value:"measurer-menu",section:"measure-annotations",haspopup:!0},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear",section:"tools"}]},annotationOptions:{enabled:!0,position:"floating",align:"start",draggable:!0,buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextColor",value:"text-color",haspopup:!0},{icon:"line-color",tooltip:"toolbarAnnotationsLineColor",value:"line-color",haspopup:!0},{icon:"fill-color",tooltip:"toolbarAnnotationsFillColor",value:"fill-color",haspopup:!0},{tooltip:"toolbarAnnotationsTextSize",value:"text-size",haspopup:!0},{tooltip:"toolbarAnnotationsLineStrokeWidth",value:"line-stroke-width",haspopup:!0},{icon:"line-style-solid",tooltip:"toolbarAnnotationsLineStyle",value:"line-style-type",haspopup:!0},{icon:"settings",tooltip:"toolbarAnnotationsSettings",value:"settings",haspopup:!0},{role:"switch",icon:"unlocked",tooltip:"toolbarAnnotationsLock",ariaLabel:"toolbarAnnotationsLock",checkedOverrides:{icon:"locked",tooltip:"toolbarAnnotationsUnlock"},value:"lock"},{icon:"delete",tooltip:"toolbarAnnotationsDelete",value:"delete"}]},ranges:{enabled:!1,position:SB,align:"start",buttons:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:2592e6},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:7776e6},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:15552e6},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(e,t)=>
206[(new Date(`${new Date(t).getFullYear()}-01-01`)).getTime(),t],id:"year-to-date"},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:31536e6},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:(e,t)=>[e,t],id:"all"}]},zoom:{enabled:!0,position:"top",align:"end",buttons:[{icon:"zoom-out",tooltip:"toolbarZoomZoomOut",value:"zoom-out"},{icon:"zoom-in",tooltip:"toolbarZoomZoomIn",value:"zoom-in"},{icon:"pan-left",tooltip:"toolbarZoomPanLeft",value:"pan-left"},{icon:"pan-right",tooltip:"toolbarZoomPanRight",value:"pan-right"},{icon:"pan-start",tooltip:"toolbarZoomPanStart",value:"pan-start"},{icon:"pan-end",tooltip:"toolbarZoomPanEnd",value:"pan-end"},{icon:"reset",tooltip:"toolbarZoomReset",value:"reset"}]}}}};function DZ(){for(let e of(Ce.register(bM,bV,bp,b_,DK,MA,Mq,M2,M7,Di,DL,Dz,M6),[bm,f2,bC,f8,bf]))y7.register(e.type,{moduleFactory:t=>new e(t),hidden:e===f8})}var Dq=class extends wz{getChartType(){return"flow-proportion"}async updateData(){await super.updateData();let{nodes:e}=this.getOptions();this.series.forEach(t=>{("sankey"===t.type||"chord"===t.type)&&t.setChartNodes(e)})}performLayout(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this,{layoutBox:r}=e,a=r.clone();for(let e of(r.shrink(this.seriesArea.padding.toJson()),this.seriesRect=r,this.animationRect=r,t.visible=this.series.some(e=>e.visible),[t,i,s]))e.translationX=Math.floor(r.x),e.translationY=Math.floor(r.y),e.setClipRect(a.clone());this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:t.visible,rect:a,paddedRect:r}})}};Dq.className="FlowProportionChart",Dq.type="flow-proportion";var DQ=class extends fX{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(e,t){return null}computeRange(){}getAxisLinePoints(){}};uQ([gM(ma(["polygon","circle"],"a polar axis shape"))],DQ.prototype,"shape",2),uQ([gM(gO)],DQ.prototype,"innerRadiusRatio",2);var DX=class extends wz{getChartType(){return"gauge"}updateRadialGauge(e,t){let i=this.axes.find(e=>"x"===e.direction);if(!(i instanceof DQ))return;i.computeRange();let s=e.x,r=s+e.width,a=e.y,o=a+e.height,[n,l]=i.range,h=vt(l-n)>Math.PI,d=h||vs(1.5*Math.PI,n,l),u=h||vs(0*Math.PI,n,l),c=h||vs(.5*Math.PI,n,l),p=h||vs(+Math.PI,n,l),g=Dr({startAngle:n,endAngle:l,innerRadius:0,outerRadius:.5}),m=-(2*(g.x+g.width/2)),v=-(2*(g.y+g.height/2)),{minimumRadius:f=0,maximumRadius:C}=t,y=Math.max(.5*Math.min(e.width/g.width,e.height/g.height),0),w=Math.min(null!=C?C:1/0,Math.max(y,null!=f?f:0));for(let t=0;t<8;t+=1){let n=w<=f||7===t,l=e.x+e.width/2+m*w,h=e.y+e.height/2+v*w;i.translation.x=l,i.translation.y=h,i.gridLength=w,i.calculateLayout();let d=i.computeLabelsBBox({hideWhenNecessary:n},e);if(n)break;let u=0;if(null!=d){let e=d.x+l,t=e+d.width,i=d.y+h,n=i+d.height;u=Math.max(a-i,s-e,n-o,t-r,0)}if(u>0)w=Math.max(w-u,f);else break}i.translation.x=e.x+e.width/2+m*w,i.translation.y=e.y+e.height/2+v*w,t.centerX=e.width/2+m*w,t.centerY=e.height/2+v*w,t.radius=w,t.textAlign=p&&!u?"right":!p&&u?"left":"center",t.verticalAlign=d&&!c?"bottom":!d&&c?"top":"middle",(0===w||w>y)&&u8.warnOnce("There was insufficient space to display the Radial Gauge.")}updateLinearGauge(e,t){let i=this.axes.find(e=>"x"===e.direction),s=this.axes.find(e=>"y"===e.direction);if(!(i instanceof f1)||!(s instanceof f1))return e;let{horizontal:r,thickness:a}=t,o=0,n=0,l=new bg;l.domain=[0,100],l.range=r?i.range:s.range;let h=l.ticks();r?o=t.computeInset("x",h):n=t.computeInset("y",h);let d=e.width-Math.abs(o),u=e.height-Math.abs(n),c=Math.max(r?d:a,0),p=Math.max(r?a:u,0),g=e.x+(d-c)/2+Math.max(o,0),m=e.y+(u-p)/2-Math.min(n,0);i.range=[0,c],i.gridLength=c,i.calculateLayout(),i.translation.x=g,i.translation.y=m+("bottom"===i.position?a:0),s.range=[0,p],s.gridLength=p,s.calculateLayout(),s.translation.x=g+("right"===s.position?a:0),s.translation.y=m,t.originX=g-e.x,t.originY=m-e.y,(0===c||0===p)&&u8.warnOnce("There was insufficient space to display the Linear Gauge.")}performLayout(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:s,series:r,seriesArea:a}=this,{layoutBox:o}=e,n=o.clone();o.shrink(a.padding.toJson());let l=this.series[0];for(let e of("radial-gauge"===l.type?this.updateRadialGauge(o,l):"linear-gauge"===l.type&&this.updateLinearGauge(o,l),this.axes.forEac
206h(e=>e.update()),this.seriesRect=n.clone().translate(n.x-o.x,n.y-o.y),this.animationRect=o,t.visible=r.some(e=>e.visible),[t,i,s]))e.translationX=Math.floor(o.x),e.translationY=Math.floor(o.y);this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:t.visible,rect:n,paddedRect:o}})}getAriaLabel(){let e=[],t=this.getCaptionText();for(let i of(0!==t.length&&e.push(t),this.series))e.push(i.getCaptionText());let i=e.join(". ");return this.ctx.localeManager.t("ariaAnnounceGaugeChart",{caption:i})}};DX.className="GaugeChart",DX.type="gauge";var DJ=class extends wz{constructor(e,t){super(e,t)}getChartType(){return"hierarchy"}performLayout(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this,{layoutBox:r}=e,a=r.clone();for(let e of(r.shrink(this.seriesArea.padding.toJson()),this.seriesRect=r,this.animationRect=r,[t,i,s]))e.translationX=Math.floor(r.x),e.translationY=Math.floor(r.y);t.visible=this.series[0].visible,t.setClipRect(r.clone()),this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:a,paddedRect:r}})}getAriaLabel(){let e=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:e})}};DJ.className="HierarchyChart",DJ.type="hierarchy";var D0=class extends wz{constructor(e,t){super(e,t),this.padding=new Cs(40),this.ctx.axisManager.axisGroup.zIndex=6}getChartType(){return"polar"}async performLayout(e){let{layoutBox:t}=e,i=t.clone();t.shrink(this.seriesArea.padding.toJson()),this.seriesRect=t,this.animationRect=t,await this.computeCircle(t),this.axes.forEach(e=>e.update()),this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:i,paddedRect:t}})}updateAxes(e,t,i){var s;let r=this.axes.find(e=>"x"===e.direction),a=this.axes.find(e=>"y"===e.direction);if(!(r instanceof DQ)||!(a instanceof DQ))return;let o=r.scale,n=a.innerRadiusRatio;r.innerRadiusRatio=n,r.computeRange(),r.gridLength=i,a.gridAngles=null==(s=o.ticks)?void 0:s.call(o).map(e=>o.convert(e)),a.gridRange=r.range,a.range=[i,i*n],[r,a].forEach(i=>{i.translation.x=e,i.translation.y=t,i.calculateLayout()})}async computeCircle(e){let t=this.series.filter(D1),i=this.axes.filter(D2),s=(e,i,s)=>{this.updateAxes(e,i,s),t.forEach(t=>{t.centerX=e,t.centerY=i,t.radius=s});let r=t.filter(e=>"donut"===e.type||"pie"===e.type);if(r.length>1){let e=r.map(e=>{let t=e.getInnerRadius();return{series:e,innerRadius:t}}).sort((e,t)=>e.innerRadius-t.innerRadius);e.at(-1).series.surroundingRadius=void 0;for(let t=0;t<e.length-1;t++)e[t].series.surroundingRadius=e[t+1].innerRadius}},r=e.x+e.width/2,a=e.y+e.height/2,o=Math.max(0,Math.min(e.width,e.height)/2),n=o;s(r,a,n);let l=async({hideWhenNecessary:l=!1}={})=>{let h=[];for(let s of cA(i,t)){let t=await s.computeLabelsBBox({hideWhenNecessary:l},e);t&&h.push(t)}if(0===h.length)return void s(r,a,o);let d=c4.merge(h),u=this.refineCircle(d,n,e);s(u.centerX,u.centerY,u.radius),n=u.radius};for(let s of(await l(),await l(),await l(),await l({hideWhenNecessary:!0}),await l({hideWhenNecessary:!0}),cA(i,t)))await s.computeLabelsBBox({hideWhenNecessary:!0},e);return{radius:n,centerX:r,centerY:a}}refineCircle(e,t,i){let s=Math.max(0,-t-e.x),r=Math.max(0,-t-e.y),a=Math.max(0,e.x+e.width-t),o=Math.max(0,e.y+e.height-t);s=a=Math.max(s,a),r=o=Math.max(r,o);let n=Math.min(i.width-s-a,i.height-r-o)/2,l=Math.min(.5*i.width/2,.5*i.height/2);if(n<l){let e=s+a,t=r+o;if(2*(n=l)+t>i.height){let e=i.height-2*n;2*Math.min(r,o)>e?(r=e/2,o=e/2):r>o?r=e-o:o=e-r}if(2*n+e>i.width){let e=i.width-2*n;2*Math.min(s,a)>e?(s=e/2,a=e/2):s>a?s=e-a:a=e-s}}let h=s+2*n+a,d=r+2*n+o;return{centerX:i.x+(i.width-h)/2+s+n,centerY:i.y+(i.height-d)/2+r+n,radius:n}}};function D1(e){return e instanceof DI}function D2(e){return e instanceof DQ}D0.className="PolarChart",D0.type="polar";var D3=class extends wz{constructor(e,t){super(e,t)}getChartType(){return"standalone"}performLayout(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:s}=this,{layoutBox:r}=e,a=r.clone();for(let e of(r.shrink(this.seriesArea.padding.toJson()),this.seriesRect=r,this.animationRect=r,[t,i,s]))e.translationX=Math.floor(r.x),e.translationY=Math.floor(r.y);t.visible=this.series[0].visible,this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:a,paddedRect:r}})}getAriaLabel(){let e=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:e})}};D3.className="StandaloneChart",D3.type="standalone";var D4=Math.PI/180,D6=e=>-Math.log(Math.tan(.25*Math.PI+e*D4*.5)),D5=e=>(Math.atan(Math.exp(-e))-.25*Math.PI)/(.5*D4),D8=class e{constructor(t,i){this.domain=t,this.range=i,this.type="mercator",this.bounds=e.bounds(t)}
206static bounds(e){let[[t,i],[s,r]]=e,a=t*D4,o=D6(i),n=s*D4,l=D6(r);return new c4(Math.min(a,n),Math.min(o,l),Math.abs(n-a),Math.abs(l-o))}static fixedScale(){return new e([[0/D4,D5(0)],[1/D4,D5(1)]],[[0,0],[1,1]])}convert([e,t]){let[[i,s],[r,a]]=this.range,o=(r-i)/this.bounds.width,n=(a-s)/this.bounds.height;return[(e*D4-this.bounds.x)*o+i,(D6(t)-this.bounds.y)*n+s]}invert([e,t]){let[[i,s],[r,a]]=this.range,o=(r-i)/this.bounds.width,n=(a-s)/this.bounds.height;return[((e-i)/o+this.bounds.x)/D4,D5((t-s)/n+this.bounds.y)]}};function D7(e){return"map-shape"===e.type||"map-line"===e.type||"map-marker"===e.type||"map-shape-background"===e.type||"map-line-background"===e.type}var D9=class extends wz{constructor(e,t){super(e,t),this.xAxis=new bm(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new bm(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}async updateData(){await super.updateData();let{topology:e}=this.getOptions();this.series.forEach(t=>{D7(t)&&t.setChartTopology(e)})}performLayout(e){let t,{seriesRoot:i,annotationRoot:s,highlightRoot:r}=this,{layoutBox:a}=e,o=a.clone();a.shrink(this.seriesArea.padding.toJson()),this.seriesRect=a,this.animationRect=a;let n=this.series.filter(D7),l=n.reduce((e,t)=>{if(!t.visible)return e;let i=t.topologyBounds;return null==i?e:null==e?i:(e.merge(i),e)},void 0);if(null!=l){let{lon0:e,lat0:i,lon1:s,lat1:r}=l,o=[[e,i],[s,r]],n=D8.bounds(o),{width:h,height:d}=a,u=Math.min(h/n.width,d/n.height),c=n.width*u,p=n.height*u,g=(h-c)/2,m=(d-p)/2,v=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),f=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),C=(g+c-g)/(v.max-v.min),y=g-C*v.min,w=(m+p-m)/(1-f.min-(1-f.max)),b=m-w*(1-f.max);t=new D8(o,[[y,b],[y+C,b+w]])}n.forEach(e=>{e.scale=t});let h=this.series.some(e=>e.visible);for(let e of(i.visible=h,[i,s,r]))e.translationX=Math.floor(a.x),e.translationY=Math.floor(a.y),e.setClipRect(a.clone());this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:h,rect:o,paddedRect:a}})}};D9.className="TopologyChart",D9.type="topology";var Ee=Symbol("IGNORED_PROP");function Et(e,t){let i={};for(let s in t){let r=t[s];r!==Ee&&Object.hasOwn(e,s)&&(i[s]=r)}return i}function Ei(e,t){if(null==t)return e;let{targets:i,...s}=t;return null!=(e=pk(e,s)).targets&&null!=i&&(e.targets=pN(e.targets,i)),e}function Es(e,t){if(pb(e))return t(e)}var Er=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"],Ea="range-area";function Eo(e,t){return{fill:Es(t,t=>{var i;return null==(i=t.overrides)||null==(i=i[e])||null==(i=i.series)?void 0:i.fill}),stroke:Es(t,t=>{var i;return null==(i=t.overrides)||null==(i=i[e])||null==(i=i.series)?void 0:i.stroke})}}var En={line:{enabled:!1},title:{enabled:!1},label:{enabled:!1},crosshair:{enabled:!1,strokeOpacity:.25,lineDash:[0],label:{enabled:!1}}},El={...En,nice:!1},Eh={bottom:{crosshair:{enabled:b2}}},Ed={category:Eh,number:Eh,log:Eh,time:Eh},Eu={position:{type:"sparkline"}},Ec={overrides:{common:{animation:{enabled:!1},padding:{top:0,right:0,bottom:0,left:0},axes:{number:{...El,interval:{values:[0]}},log:{...El},time:{...El},category:{...En,gridLine:{enabled:!1}}}},bar:{series:{sparklineMode:!0},tooltip:{range:"nearest"}},line:{seriesArea:{padding:{top:2,right:2,bottom:2,left:2}},axes:Ed,series:{strokeWidth:1,marker:{enabled:!1,size:3},tooltip:Eu}},area:{seriesArea:{padding:{top:1,right:0,bottom:1,left:0}},axes:Ed,series:{strokeWidth:1,fillOpacity:.4,tooltip:Eu}}}},Ep={"price-volume":function(e,t,i){var s,r;let{xKey:a,dateKey:o=null!=a?a:"date",highKey:n="high",openKey:l="open",lowKey:h="low",closeKey:d="close",volumeKey:u="volume",chartType:c="candlestick",navigator:p=!1,volume:g=!0,rangeToolbar:m,rangeButtons:v=null==m||m,statusBar:f=!0,annotations:C,toolbar:y=null==C||C,zoom:w=!0,theme:b,data:S,...x}=e;null!=a&&u8.warnOnce("Property [xKey] is deprecated, use [dateKey] instead."),null!=m&&u8.warnOnce("Property [rangeToolbar] is deprecated, use [rangeButtons] instead."),null!=C&&u8.warnOnce("Property [annotations] is deprecated, use [toolbar] instead.");let M=function(e,t,i,s,r,a,o){var n,l,h,d,u,c,p,g,m,v,f,C,y,w,b,S,x,M,D,E;t===Ea&&(u8.warnOnce(`type '${t}' is deprecated, use 'hlc' chart type instead`),t="hlc");let I={xKey:i,openKey:a,closeKey:o,highKey:s,lowKey:r},A={xKey:i,yKey:o},R={pickOutsideVisibleMinorAxis:!0};switch(null!=t?t:"candlestick"){case"ohlc":return[{type:"ohlc",focusPriority:0,...R,...I}];
206case"line":return[{type:"line",focusPriority:0,...R,...A,stroke:null!=(n=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.line)||null==(t=t.series)?void 0:t.stroke}))?n:Su,marker:null!=(l=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.line)||null==(t=t.series)?void 0:t.marker}))?l:{enabled:!1}}];case"step-line":return[{type:"line",focusPriority:0,...R,...A,stroke:null!=(h=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.line)||null==(t=t.series)?void 0:t.stroke}))?h:Su,interpolation:null!=(d=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.line)||null==(t=t.series)?void 0:t.interpolation}))?d:{type:"step"},marker:null!=(u=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.line)||null==(t=t.series)?void 0:t.marker}))?u:{enabled:!1}}];case"hlc":{let t=Eo(Ea,e);return[{type:Ea,focusPriority:0,...R,xKey:i,yHighKey:s,yLowKey:o,fill:null!=(c=t.fill)?c:Sh,stroke:null!=(p=t.stroke)?p:Sn,fillOpacity:null!=(g=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t["range-area"])||null==(t=t.series)?void 0:t.fillOpacity}))?g:.3,strokeWidth:null!=(m=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t["range-area"])||null==(t=t.series)?void 0:t.strokeWidth}))?m:2},{type:Ea,focusPriority:0,...R,xKey:i,yHighKey:o,yLowKey:r,fill:null!=(v=t.fill)?v:Sd,stroke:null!=(f=t.stroke)?f:Sl,fillOpacity:null!=(C=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t["range-area"])||null==(t=t.series)?void 0:t.fillOpacity}))?C:.3,strokeWidth:null!=(y=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t["range-area"])||null==(t=t.series)?void 0:t.strokeWidth}))?y:2},{type:"line",...R,...A,stroke:null!=(w=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.line)||null==(t=t.series)?void 0:t.stroke}))?w:SC,strokeWidth:null!=(b=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.line)||null==(t=t.series)?void 0:t.strokeWidth}))?b:2,marker:null!=(S=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.line)||null==(t=t.series)?void 0:t.marker}))?S:{enabled:!1}}]}case"high-low":{let t=Eo("range-bar",e);return[{type:"range-bar",focusPriority:0,...R,xKey:i,yHighKey:s,yLowKey:r,fill:null!=(x=t.fill)?x:Sc,stroke:null!=(M=t.stroke)?M:Su,tooltip:{range:"nearest"}}]}case"candlestick":return[{type:"candlestick",focusPriority:0,...R,...I}];case"hollow-candlestick":{let t=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.candlestick)||null==(t=t.series)?void 0:t.item});return[{type:"candlestick",focusPriority:0,...R,...I,item:{up:{fill:null!=(D=null==t||null==(E=t.up)?void 0:E.fill)?D:"transparent"}}}]}default:return u8.warnOnce(`unknown chart type: ${t}; expected one of: ${Er.join(", ")}`),[{type:"candlestick",focusPriority:0,...R,...I}]}}(b,c,o,n,h,l,d),D=function(e,t,i,s,r,a){var o;if(!r)return[];let n=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.bar)||null==(t=t.series)?void 0:t.fill}),l=n?{fill:n}:{itemStyler({datum:e}){let{up:r,down:a}=t().palette;return{fill:e[i]<e[s]?null==r?void 0:r.fill:null==a?void 0:a.fill}}};return[{type:"bar",xKey:"date",yKey:a,focusPriority:1,tooltip:{enabled:!1},highlight:{enabled:!1},fillOpacity:null!=(o=Es(e,e=>{var t;return null==(t=e.overrides)||null==(t=t.bar)||null==(t=t.series)?void 0:t.fillOpacity}))?o:.5,...l}]}(b,i,l,d,g,u),E=g?{miniChart:{enabled:p,series:[{type:"line",xKey:o,yKey:u,marker:{enabled:!1}}]}}:null,I={navigator:{enabled:p,...E}},A=f?{statusBar:{enabled:!0,data:S,highKey:n,openKey:l,lowKey:h,closeKey:d,volumeKey:g?u:void 0}}:null,R=g?[{type:"number",position:"left",keys:[u],label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percentage",align:"end"}}]:[];return{theme:{baseTheme:"string"==typeof b?b:"ag-financial",...pk("object"==typeof b?b:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:5}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...D,...M],axes:[{type:"number",position:"right",keys:[l,d,n,h],interval:{maxSpacing:null!=(s=Es(b,e=>{var t;return null==(t=e.overrides)||null==(t=t.common)||null==(t=t.axes)||null==(t=t.number)||null==(t=t.interval)?void 0:t.maxSpacing}))?s:45},label:{format:null!=(r=Es(b,e=>{var t;return null==(t=e.overrides)||null==(t=t.common)||null==(t=t.axes)||null==(t=t.number)||null==(t=t.label)?void 0:t.format}))?r:".2f"},crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percentage",align:"start"}},...R,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],tooltip:{enabled:!1},data:S,...{annotations:{enabled:y,data:S,xKey:o,volumeKey:g?u:void 0}},...I,...A,...{zoom:{enabled:w,enableIndependentAxes:!0}},...{chartToolbar:{enabled:!0},toolbar:{seriesType:{enabled:y},annotationOptions:{enabled:y},annotations:{enabled:y},ranges:{enabled:v}}},...x}},gauge:function(e,t){if("radial-gauge"===e.type)return function(e){let{animation:t,background:i,container:s,contextMenu:r,footnote:a,height:o,listeners:n,locale:l,minHeight:h,minWidth:d,padding:u,subtitle:c,theme:p,title:g,width:m,type:v,curs
206or:f,nodeClickRange:C,tooltip:y,value:w,scale:b={},startAngle:S,endAngle:x,highlightStyle:M,segmentation:D,bar:E,needle:I,targets:A,outerRadius:R,innerRadius:T,outerRadiusRatio:L,innerRadiusRatio:F,cornerRadius:P,cornerMode:k,label:N,secondaryLabel:O,spacing:G,...B}=e,{fills:z,fillMode:V,fill:H,fillOpacity:j,stroke:W,strokeWidth:U,strokeOpacity:_,lineDash:$,lineDashOffset:Y,min:K=0,max:Z=1,interval:q={},label:Q={},...X}=b,J=Et(e,{animation:t,background:i,container:s,contextMenu:r,footnote:a,height:o,listeners:n,locale:l,minHeight:h,minWidth:d,padding:u,subtitle:c,theme:p,title:g,width:m}),ee=Et(b,{fills:z,fillMode:V,fill:H,fillOpacity:j,stroke:W,strokeWidth:U,strokeOpacity:_,lineDash:$,lineDashOffset:Y}),et=Et(e,{startAngle:Ee,endAngle:Ee,needle:null!=I?{enabled:!0,...I}:Ee,scale:ee,type:v,cursor:f,nodeClickRange:C,listeners:n,tooltip:y,value:w,highlightStyle:M,segmentation:D,bar:E,targets:A,outerRadius:R,innerRadius:T,outerRadiusRatio:L,innerRadiusRatio:F,cornerRadius:P,cornerMode:k,label:N,secondaryLabel:O,spacing:G,...B});return{...J,series:[et],axes:[{type:"angle-number",min:K,max:Z,startAngle:S,endAngle:x,interval:null!=q?q:{},label:null!=Q?Q:{}},{type:"radius-number"}]}}(Ei(e,t));if("linear-gauge"===e.type)return function(e){let t,i,{animation:s,background:r,container:a,contextMenu:o,footnote:n,height:l,listeners:h,locale:d,minHeight:u,minWidth:c,padding:p,subtitle:g,theme:m,title:v,width:f,type:C,cursor:y,nodeClickRange:w,tooltip:b,value:S,scale:x={},direction:M="vertical",thickness:D,highlightStyle:E,segmentation:I,bar:A,targets:R,cornerRadius:T,cornerMode:L,label:F,...P}=e,{fills:k,fillMode:N,fill:O,fillOpacity:G,stroke:B,strokeWidth:z,strokeOpacity:V,lineDash:H,lineDashOffset:j,min:W=0,max:U=1,interval:_={},label:$={},...Y}=x,K=Et(e,{animation:s,background:r,container:a,contextMenu:o,footnote:n,height:l,listeners:h,locale:d,minHeight:u,minWidth:c,padding:p,subtitle:g,theme:m,title:v,width:f}),Z=Et(x,{fills:k,fillMode:N,fill:O,fillOpacity:G,stroke:B,strokeWidth:z,strokeOpacity:V,lineDash:H,lineDashOffset:j}),q=Et(e,{scale:Z,type:C,cursor:y,nodeClickRange:w,listeners:h,tooltip:b,value:S,direction:M,thickness:D,highlightStyle:E,segmentation:I,bar:A,targets:R,cornerRadius:T,cornerMode:L,label:F,...P}),{placement:Q,...X}=$,J="horizontal"===M;J?(t="before"===Q?"top":"bottom",i="left"):(t="after"===Q?"right":"left",i="bottom");let ee={type:"number",position:t,min:W,max:U,reverse:!J,interval:_,label:X,nice:!1},et={type:"number",position:i,min:0,max:1,label:{enabled:!1}};return{...K,series:[q],axes:J?[ee,et]:[et,ee]}}(Ei(e,t));let{animation:i,background:s,container:r,contextMenu:a,footnote:o,height:n,listeners:l,locale:h,minHeight:d,minWidth:u,padding:c,subtitle:p,theme:g,title:m,width:v}=e;return Et(e,{animation:i,background:s,container:r,contextMenu:a,footnote:o,height:n,listeners:l,locale:h,minHeight:d,minWidth:u,padding:c,subtitle:p,theme:g,title:m,width:v})},sparkline:function(e){let{background:t,container:i,height:s,listeners:r,locale:a,minHeight:o,minWidth:n,padding:l,width:h,theme:d,data:u,xAxis:c,yAxis:p,...g}=e,m="bar"!==g.type||"horizontal"!==g.direction,v=Et(e,{background:t,container:i,height:s,listeners:r,locale:a,minHeight:o,minWidth:n,padding:l,width:h,data:u,xAxis:Ee,yAxis:Ee,theme:Ee});return v.theme=function e(t,i){return"string"==typeof t?{...i,baseTheme:t}:null!=t?{...t,baseTheme:e(t.baseTheme,i)}:i}(d,Ec),v.series=[g],v.axes=m?[{type:"number",...p,position:"left"},{type:"category",...c,position:"bottom"}]:[{type:"category",...c,position:"left"},{type:"number",...p,position:"bottom"}],v}};function Eg(e,t){let i=[],s=wy(e),r=wc(e),a=r?wr.get(r):"unknown";for(let{type:t,chartTypes:s,optionsKey:r,optionsInnerKey:d,identifier:u}of y9){var o,n,l,h;if("unknown"===a||s.includes(a)){if("root"===t||"legend"===t){let t=e[r];if(null==t)continue;d?t[d]&&(i.push(`${r}.${d}`),delete t[d]):(i.push(r),delete e[r])}else if("axis"===t){if(!("axes"in e)||!(null!=(o=e.axes)&&o.some(e=>e.type===u)))continue;i.push(`axis[type=${u}]`),e.axes=e.axes.filter(e=>e.type!==u)}else if("axis-option"===t){if(!("axes"in e)||!(null!=(n=e.axes)&&n.some(e=>e[r])))continue;i.push(`axis.${r}
206`),e.axes.forEach(e=>{e[r]&&delete e[r]})}else if("series"===t){if(!(null!=(l=e.series)&&l.some(e=>e.type===u)))continue;i.push(`series[type=${u}]`),e.series=e.series.filter(e=>e.type!==u)}else if("series-option"===t){if(!(null!=(h=e.series)&&h.some(e=>e[r])))continue;i.push(`series.${r}`),e.series.forEach(e=>{e[r]&&delete e[r]})}}}if(i.length&&!t){s&&(i=["AgCharts.createGauge"]);let t="ag-charts-enterprise",r="https://ag-grid.com/charts/javascript/installation/";"integrated"===e.mode&&(t="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",r="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),u8.warnOnce([`unable to use these enterprise features as '${t}' has not been loaded:`,"",...i,"",`See: ${r}`].join(`
207`))}}var Em=Symbol("description"),Ev=Symbol("required");function Ef(e,t,i){let s=pM(i)?i:i[Em],r=s?`; expecting ${s}`:"",a=e?`Option \`${e}\``:"Value";return`${a} cannot be set to \`${function(e,t=1/0){switch(typeof e){case"undefined":return"undefined";case"number":if(isNaN(e))return"NaN";if(1/0===e)return"Infinity";if(-1/0===e)return"-Infinity";default:if((e=JSON.stringify(e)).length>t)return`${e.slice(0,t)}... (+${e.length-t} characters)`;return e}}(t)}\`${r}, ignoring.`}function EC(e,t){return Object.assign(t=>e(t),{[Em]:t})}EC(pm,"an array"),EC(pv,"a boolean"),EC(pw,"a function"),EC(pE,"a number");var Ey=EC(pb,"an object"),Ew=EC(pM,"a string"),Eb=(e,t=!0)=>EC(i=>pE(i)&&(i>e||t&&i===e),`a number greater than ${t?"or equal to ":""}${e}`),ES=(e,t)=>EC(i=>pE(i)&&i>=e&&i<=t,`a number between ${e} and ${t} inclusive`);Eb(0),Eb(1),ES(0,1),ES(0,360);var Ex=(e,t)=>EC(t=>pm(t)&&t.every(e),null!=t?t:`${e[Em]} array`);function EM(e){return null!=e&&e.up||null!=e&&e.down||null!=e&&e.neutral?"user-full":null!=e&&e.fills||null!=e&&e.strokes?"user-indexed":"inbuilt"}var ED="white",EE={get cartesian(){return{seriesTypes:wr.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:wr.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:wr.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:wr.topologyTypes,commonOptions:[]}},get"flow-proportion"(){return{seriesTypes:wr.flowProportionTypes,commonOptions:[]}},get standalone(){return{seriesTypes:wr.standaloneTypes,commonOptions:[]}},get gauge(){return{seriesTypes:wr.gaugeTypes,commonOptions:[]}}},EI={"radial-gauge":!0,"linear-gauge":!0},EA=Object.values(EE).reduce((e,{commonOptions:t})=>e.concat(t),[]),ER=class e{static getAxisDefaults(e){return pk(e,{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:"normal",fontSize:13,fontFamily:b3,color:b4},label:{fontSize:12,fontFamily:b3,padding:5,color:b4,avoidCollisions:!0},line:{enabled:!0,width:1,stroke:b9},tick:{enabled:!1,width:1,stroke:b9},gridLine:{enabled:!0,style:[{stroke:b7,lineDash:[]}]},crossLines:{enabled:!1,fill:Se,stroke:Se,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontSize:12,fontFamily:b3,padding:5,color:b4}},crosshair:{enabled:!0}})}getChartDefaults(){return{minHeight:300,minWidth:300,background:{visible:!0,fill:St},padding:{top:Sr,right:Sr,bottom:Sr,left:Sr},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",fontWeight:"normal",fontSize:17,fontFamily:b3,color:b4,wrapping:"hyphenate",layoutStyle:Sa,textAlign:So},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontSize:13,fontFamily:b3,color:b8,wrapping:"hyphenate",layoutStyle:Sa,textAlign:So},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:13,fontFamily:b3,color:"rgb(140, 140, 140)",wrapping:"hyphenate",layoutStyle:Sa,textAlign:So},legend:{position:"bottom",spacing:30,listeners:{},toggleSeries:!0,item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},showSeriesStroke:!0,label:{color:b4,fontSize:12,fontFamily:b3}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:b4},inactiveStyle:{fill:b8},highlightStyle:{fill:b4},label:{color:b4}}},tooltip:{enabled:!0,darkTheme:b0,delay:0},overlays:{darkTheme:b0},listeners:{}}}constructor(e={}){let{overrides:t,palette:i}=vG(e),s=this.createChartConfigPerChartType(this.getDefaults()),r={};t&&this.mergeOverrides(s,r,t);let{fills:a,strokes:o,...n}=this.getDefaultColors();this.palette=pk(i,{fills:Object.values(a),strokes:Object.values(o),...n}),this.paletteType=EM(i),this.config=Object.freeze(this.templateTheme(s)),this.presets=r}mergeOverrides(e,t,i){for(let{seriesTypes:t,commonOptions:s}of Object.values(EE)){let r={...i.common};for(let e of EA)s.includes(e)||delete r[e];
207if(r)for(let i of t)!0!==EI[i]&&(e[i]=pk(r,e[i]))}wr.seriesTypes.forEach(s=>{let r=i[s];!0===EI[s]?t[s]=r:e[s]=pk(r,e[s])})}createChartConfigPerChartType(e){for(let[t,{seriesTypes:i}]of Object.entries(EE)){let s=wo.get(t);for(let t of i)e[t]||(e[t]=vG(s))}return e}getDefaults(){let t=(t,i)=>{let s={},r={axes:{},...wt.getThemeTemplates(),...this.getChartDefaults(),...wo.get(t)};for(let t of i){var a;s[t]=pk(wn.getThemeTemplate(t),null!=(a=s[t])?a:vG(r));let{axes:i}=s[t];for(let t of y7.keys())i[t]=pk(i[t],y7.getThemeTemplate(t),e.cartesianAxisDefault[t])}return s};return pk(t("cartesian",wr.cartesianTypes),t("polar",wr.polarTypes),t("hierarchy",wr.hierarchyTypes),t("topology",wr.topologyTypes),t("flow-proportion",wr.flowProportionTypes),t("standalone",wr.standaloneTypes),t("gauge",wr.gaugeTypes))}templateTheme(e){let t=vG(e),i=this.getTemplateParameters();return vz(t,e=>{if(pm(e))for(let t=0;t<e.length;t++){let s=e[t];i.has(s)&&(e[t]=i.get(s))}else for(let[t,s]of Object.entries(e))i.has(s)&&(e[t]=i.get(s))}),vG(t)}getDefaultColors(){return{fills:Dm,strokes:Dv,up:{fill:Dm.GREEN,stroke:Dv.GREEN},down:{fill:Dm.RED,stroke:Dv.RED},neutral:{fill:Dm.GRAY,stroke:Dv.GRAY},altUp:{fill:Dm.BLUE,stroke:Dv.BLUE},altDown:{fill:Dm.ORANGE,stroke:Dv.ORANGE},altNeutral:{fill:Dm.GRAY,stroke:Dv.GRAY}}}getTemplateParameters(){var e,t,i,s,r,a,o,n,l,h,d,u,c,p,g,m,v,f,C,y,w,b,S,x;let{isEnterprise:M}=vX,D=new Map;D.set(b0,!1),D.set(b2,M),D.set(b1,!M),D.set(b3,"Verdana, sans-serif"),D.set(b4,"rgb(70, 70, 70)"),D.set(b6,"white"),D.set(b8,"rgb(140, 140, 140)"),D.set(b7,"rgb(224,234,241)"),D.set(b9,"rgb(195, 195, 195)"),D.set(Se,"rgb(70, 70, 70)"),D.set(b5,ED),D.set(St,ED),D.set(Si,"rgba(0, 0, 0, 0.5)"),D.set(Sw,[Dm.ORANGE,Dm.YELLOW,Dm.GREEN]),D.set(Sb,[Dm.GREEN,Dm.YELLOW,Dm.RED]),D.set(SS,["#5090dc","#629be0","#73a6e3","#85b1e7","#96bcea","#a8c8ee","#b9d3f1","#cbdef5"]),D.set(Sr,20),D.set(Sa,"block"),D.set(So,"center"),D.set(Sx,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),D.set(SM,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),D.set(Sy,ED),D.set(SD,Dm.BLUE),D.set(SE,Dm.BLUE),D.set(SI,Dm.BLUE),D.set(SA,ED),D.set(SR,"#fafafa"),D.set(ST,"#dddddd"),D.set(SL,"#000000"),D.set(SF,"#181d1f"),D.set(SP,"#e35c5c"),D.set(Sk,"#e35c5c"),D.set(SN,"#fafafa"),D.set(SO,"#dddddd"),D.set(SG,"#000000"),D.set(SB,"top"),D.set(Sz,!1);let E=this.getDefaultColors();return D.set(Sn,null!=(e=null==(t=this.palette.up)?void 0:t.stroke)?e:E.up.stroke),D.set(Sh,null!=(i=null==(s=this.palette.up)?void 0:s.fill)?i:E.up.fill),D.set(Sl,null!=(r=null==(a=this.palette.down)?void 0:a.stroke)?r:E.down.stroke),D.set(Sd,null!=(o=null==(n=this.palette.down)?void 0:n.fill)?o:E.down.fill),D.set(Su,null!=(l=null==(h=this.palette.neutral)?void 0:h.stroke)?l:E.neutral.stroke),D.set(Sc,null!=(d=null==(u=this.palette.neutral)?void 0:u.fill)?d:E.neutral.fill),D.set(Sp,null!=(c=null==(p=this.palette.altUp)?void 0:p.stroke)?c:E.up.stroke),D.set(Sm,null!=(g=null==(m=this.palette.altUp)?void 0:m.fill)?g:E.up.fill),D.set(Sg,null!=(v=null==(f=this.palette.altDown)?void 0:f.stroke)?v:E.down.stroke),D.set(Sv,null!=(C=null==(y=this.palette.altDown)?void 0:y.fill)?C:E.down.fill),D.set(Sf,null!=(w=null==(b=this.palette.altNeutral)?void 0:b.fill)?w:E.altNeutral.fill),D.set(SC,null!=(S=null==(x=this.palette.altNeutral)?void 0:x.stroke)?S:E.altNeutral.stroke),D}};ER.cartesianAxisDefault={number:ER.getAxisDefaults({line:{enabled:!1}}),log:ER.getAxisDefaults({base:10,line:{enabled:!1},interval:{minSpacing:0/0}}),category:ER.getAxisDefaults({groupPaddingInner:.1,label:{autoRotate:!0},gridLine:{enabled:Sz},crosshair:{enabled:!1}}),time:ER.getAxisDefaults({gridLine:{enabled:Sz}}),"ordinal-time":ER.getAxisDefaults({groupPaddingInner:0,label:{autoRotate:!1},gridLine:{enabled:Sz}}),"angle-category":ER.getAxisDefaults({gridLine:{enabled:Sz}}),"angle-number":ER.getAxisDefaults({gridLine:{enabled:Sz}}),"radius-category":ER.getAxisDefaults({line:{enabled:!1}}),"radius-number":ER.getAxisDefaults({line:{enabled:!1}}),"grouped-category":ER.getAxisDefaults({tick:{enabled:!0}})};var ET=ER,EL="#192232",EF={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},EP={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"}
vendor: 4,505 bytes, line 207
207,Ek=class extends ET{getDefaultColors(){return{fills:EF,strokes:EP,up:{fill:EF.GREEN,stroke:EP.GREEN},down:{fill:EF.RED,stroke:EP.RED},neutral:{fill:EF.GRAY,stroke:EP.GRAY},altUp:{fill:EF.BLUE,stroke:EP.BLUE},altDown:{fill:EF.ORANGE,stroke:EP.ORANGE},altNeutral:{fill:EF.GRAY,stroke:EP.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(b0,!0),e.set(Sy,EL),e.set(b4,"white"),e.set(b8,"#7D91A0"),e.set(b7,"#545A6E"),e.set(Se,"white"),e.set(Sw,[EF.ORANGE,EF.YELLOW,EF.GREEN]),e.set(Sb,[EF.GREEN,EF.YELLOW,EF.RED]),e.set(SS,["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"]),e.set(Sx,["#192834","#253746","#324859","#3f596c","#4d6a80"]),e.set(SM,["#192834","#3b5164","#496275","#577287","#668399"]),e.set(St,EL),e.set(b5,EL),e.set(SD,EF.BLUE),e.set(SE,"white"),e.set(SI,EF.BLUE),e.set(SA,EL),e.set(SR,"#28313e"),e.set(ST,"#4b525d"),e.set(SL,"#ffffff"),e.set(SF,"#ffffff"),e.set(SN,"#28313e"),e.set(SO,"#4b525d"),e.set(SG,"#ffffff"),e}constructor(e){super(e)}},EN={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},EO={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},EG=class extends Ek{getDefaultColors(){return{fills:{...EN},strokes:{...EO},up:{fill:EN.GREEN,stroke:EO.GREEN},down:{fill:EN.RED,stroke:EO.RED},neutral:{fill:EN.BLUE,stroke:EO.BLUE},altUp:{fill:EN.GREEN,stroke:EO.GREEN},altDown:{fill:EN.RED,stroke:EO.RED},altNeutral:{fill:EN.GRAY,stroke:EO.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[EN.GREEN,EN.BLUE,EN.RED]),e.set(SD,EN.BLUE),e.set(SI,EN.BLUE),e.set(b7,"#343A4E"),e.set(Sr,0),e.set(Sa,"overlay"),e.set(So,"left"),e.set(SB,"bottom"),e.set(Sz,!0),e}},EB={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},Ez={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},EV=class extends ET{getDefaultColors(){return{fills:{...EB},strokes:{...Ez},up:{fill:EB.GREEN,stroke:Ez.GREEN},down:{fill:EB.RED,stroke:Ez.RED},neutral:{fill:EB.BLUE,stroke:Ez.BLUE},altUp:{fill:EB.GREEN,stroke:Ez.GREEN},altDown:{fill:EB.RED,stroke:Ez.RED},altNeutral:{fill:EB.GRAY,stroke:Ez.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[EB.GREEN,EB.BLUE,EB.RED]),e.set(SD,EB.BLUE),e.set(SI,EB.BLUE),e.set(b7,"#F2F3F3"),e.set(Sr,0),e.set(Sa,"overlay"),e.set(So,"left"),e.set(SB,"bottom"),e.set(Sz,!0),e}},EH={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Ej={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},EW=class extends Ek{getDefaultColors(){return{fills:EH,strokes:Ej,up:{fill:EH.GREEN,stroke:Ej.GREEN},down:{fill:EH.RED,stroke:Ej.RED},neutral:{fill:EH.GRAY,stroke:Ej.GRAY},altUp:{fill:EH.BLUE,stroke:Ej.BLUE},altDown:{fill:EH.RED,stroke:Ej.RED},altNeutral:{fill:EH.GRAY,stroke:Ej.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[EH.ORANGE,EH.YELLOW,EH.GREEN]),e.set(SS,["#2196f3","#208FEC","#1E88E5","#1C7FDC","#1976d2","#176EC9","#1565c0"]),e.set(Sb,[EH.GREEN,EH.YELLOW,EH.RED]),e.set(SD,EH.BLUE),e.set(SI,EH.BLUE),e}},EU={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},E_={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},E$=class extends ET{getDefaultColors(){return{fills:EU,strokes:E_,up:{fill:EU.GREEN,stroke:E_.GREEN},down:{fill:EU.RED,stroke:E_.RED},neutral:{fill:EU.GRAY,stroke:E_.GRAY},altUp:{fill:EU.BLUE,stroke:E_.BLUE},altDown:{fill:EU.RED,stroke:E_.RED},altNeutral:{fill:EU.GRAY,stroke:E_.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[EU.ORANGE,EU.YELLOW,EU.GREEN]),e.set(SS,["#2196f3","#329EF4","#42a5f5","#53ADF6","#64b5f6","#7AC0F8","#90caf9"]),e.set(Sb,[EU.GREEN,EU.YELLOW,EU.RED]),e.set(SD,EU.BLUE),e.set(SI,EU.BLUE),e}},EY={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},EK={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff",GRAY:"#eeeeee"}
207,EZ=class extends Ek{getDefaultColors(){return{fills:EY,strokes:EK,up:{fill:EY.GREEN,stroke:EK.GREEN},down:{fill:EY.RED,stroke:EK.RED},neutral:{fill:EY.GRAY,stroke:EK.GRAY},altUp:{fill:EY.BLUE,stroke:EK.BLUE},altDown:{fill:EY.RED,stroke:EK.RED},altNeutral:{fill:EY.GRAY,stroke:EK.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[EY.BLUE,EY.RED]),e.set(SS,[EY.BLUE,EY.PURPLE,EY.MAGENTA,EY.PINK,EY.RED,EY.ORANGE,EY.YELLOW,EY.GREEN]),e.set(Sb,[EY.BLUE,EY.RED]),e.set(SD,EY.BLUE),e.set(SI,EY.BLUE),e}},Eq={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},EQ={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb",GRAY:"#888888"},EX=class extends ET{getDefaultColors(){return{fills:Eq,strokes:EQ,up:{fill:Eq.GREEN,stroke:EQ.GREEN},down:{fill:Eq.RED,stroke:EQ.RED},neutral:{fill:Eq.GRAY,stroke:EQ.GRAY},altUp:{fill:Eq.BLUE,stroke:EQ.BLUE},altDown:{fill:Eq.RED,stroke:EQ.RED},altNeutral:{fill:Eq.GRAY,stroke:EQ.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[Eq.BLUE,Eq.RED]),e.set(SS,[Eq.BLUE,Eq.PURPLE,Eq.MAGENTA,Eq.PINK,Eq.RED,Eq.ORANGE,Eq.YELLOW,Eq.GREEN]),e.set(Sb,[Eq.BLUE,Eq.RED]),e.set(SD,Eq.BLUE),e.set(SI,Eq.BLUE),e}},EJ={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},E0={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},E1=class extends Ek{getDefaultColors(){return{fills:{...EJ,RED:EJ.ORANGE},strokes:{...E0,RED:E0.ORANGE},up:{fill:EJ.GREEN,stroke:E0.GREEN},down:{fill:EJ.ORANGE,stroke:E0.ORANGE},neutral:{fill:EJ.GRAY,stroke:E0.GRAY},altUp:{fill:EJ.BLUE,stroke:E0.BLUE},altDown:{fill:EJ.ORANGE,stroke:E0.ORANGE},altNeutral:{fill:EJ.GRAY,stroke:E0.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[EJ.ORANGE,EJ.YELLOW,EJ.GREEN]),e.set(Sb,[EJ.GREEN,EJ.YELLOW,EJ.ORANGE]),e.set(SD,EJ.BLUE),e.set(SI,EJ.BLUE),e}},E2={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},E3={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},E4=class extends ET{getDefaultColors(){return{fills:{...E2,RED:E2.ORANGE},strokes:{...E3,RED:E3.ORANGE},up:{fill:E2.GREEN,stroke:E3.GREEN},down:{fill:E2.ORANGE,stroke:E3.ORANGE},neutral:{fill:E3.GRAY,stroke:E3.GRAY},altUp:{fill:E2.BLUE,stroke:E3.BLUE},altDown:{fill:E2.ORANGE,stroke:E3.ORANGE},altNeutral:{fill:E2.GRAY,stroke:E3.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[E2.ORANGE,E2.YELLOW,E2.GREEN]),e.set(Sb,[E2.GREEN,E2.YELLOW,E2.ORANGE]),e.set(SD,E2.BLUE),e.set(SI,E2.BLUE),e}},E6={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},E5={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#fff653",YELLOW:"#c18aff",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},E8=class extends Ek{getDefaultColors(){return{fills:E6,strokes:E5,up:{fill:E6.GREEN,stroke:E5.GREEN},down:{fill:E6.RED,stroke:E5.RED},neutral:{fill:E6.GRAY,stroke:E5.GRAY},altUp:{fill:E6.BLUE,stroke:E5.BLUE},altDown:{fill:E6.ORANGE,stroke:E5.ORANGE},altNeutral:{fill:E6.GRAY,stroke:E5.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[E6.ORANGE,E6.YELLOW,E6.GREEN]),e.set(SS,["#0083ff","#0076e6","#0069cc","#005cb3","#004f99","#004280","#003466","#00274c"]),e.set(Sb,[E6.GREEN,E6.YELLOW,E6.RED]),e.set(SD,E6.BLUE),e.set(SI,E6.BLUE),e}},E7={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},E9={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"}
207,Ie=class extends ET{getDefaultColors(){return{fills:E7,strokes:E9,up:{fill:E7.GREEN,stroke:E9.GREEN},down:{fill:E7.RED,stroke:E9.RED},neutral:{fill:E7.GRAY,stroke:E9.GRAY},altUp:{fill:E7.BLUE,stroke:E9.BLUE},altDown:{fill:E7.ORANGE,stroke:E9.ORANGE},altNeutral:{fill:E7.GRAY,stroke:E9.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(Sw,[E7.ORANGE,E7.YELLOW,E7.GREEN]),e.set(SS,["#0083ff","#1a8fff","#339cff","#4da8ff","#66b5ff","#80c1ff","#99cdff","#b3daff"]),e.set(Sb,[E7.GREEN,E7.YELLOW,E7.RED]),e.set(SD,E7.BLUE),e.set(SI,E7.BLUE),e}},It=()=>new ET,Ii={"ag-default-dark":()=>new Ek,"ag-sheets-dark":()=>new E1,"ag-polychroma-dark":()=>new EZ,"ag-vivid-dark":()=>new E8,"ag-material-dark":()=>new EW,"ag-financial-dark":()=>new EG,null:It,undefined:It,"ag-default":It,"ag-sheets":()=>new E4,"ag-polychroma":()=>new EX,"ag-vivid":()=>new Ie,"ag-material":()=>new E$,"ag-financial":()=>new EV};function Is(e){if(e instanceof ET)return e;if(null==e||"string"==typeof e){let t=Ii[e];return t?t():(u8.warnOnce(`the theme [${e}] is invalid, using [ag-default] instead.`),It())}if(function(e,t,i){let{errors:s}=function e(t,i,s=""){if(!pb(t))return{valid:null,errors:[{path:s,value:t,message:Ef(s,t,"an object")}]};let r=new Set(Object.keys(t)),a=[],o={};function n(e){return pm(i)?`${s}[${e}]`:s?`${s}.${e}`:e}for(let[l,h]of Object.entries(i)){r.delete(l);let i=t[l];if(h[Ev]||void 0!==i)if(pw(h))h(i)?o[l]=i:a.push({key:l,path:s,value:i,message:Ef(n(l),i,h)});else{let t=e(i,h,n(l));o[l]=t.valid,a.push(...t.errors)}}for(let e of r)a.push({key:e,path:s,unknown:!0,message:`Unknown option \`${n(e)}\`, ignoring.`});return{valid:o,errors:a}}(e,t,i);for(let{message:e}of s)u8.warn(e);return 0===s.length}(e,Ir,"theme")){let t=function(e){let t,i=e,s=[];for(;"object"==typeof i;)null!=t||(t=i.palette),i.overrides&&s.push(i.overrides),i=i.baseTheme;return{baseTheme:i,overrides:pk(...s),palette:t}}(e);return new(t.baseTheme?Is(t.baseTheme):It()).constructor(t)}return It()}var Ir={baseTheme:((...e)=>EC(t=>e.some(e=>e(t)),e.map(e=>e[Em]).filter(Boolean).join(" or ")))(Ew,Ey),overrides:Ey,palette:{fills:Ex(Ew),strokes:Ex(Ew),up:{fill:Ew,stroke:Ew},down:{fill:Ew,stroke:Ew},neutral:{fill:Ew,stroke:Ew}}},Ia=new Set(["map-shape-background","map-line-background"]),Io=class{constructor(e,t,i,s){var r,a,o,n;let l;this.debug=m8.create(!0,"opts"),this.optionMetadata=null!=s?s:{},this.processedOverrides=null!=t?t:{};let h={shallow:["data"]};this.userOptions=vG(e,h);let d=vG(e,h),{presetType:u}=this.optionMetadata;if(null!=u){let e=Ep[u],t=d,i=d.type,s=null!=i?Is(d.theme).presets[i]:void 0;this.debug(">>> AgCharts.createOrUpdate() - applying preset",t),d=null!=(o=null==e?void 0:e(t,s,()=>this.activeTheme))?o:d}vX.isEnterprise||Eg(d),this.activeTheme=Is(d.theme),u&&(d=this.activeTheme.templateTheme(d)),this.sanityCheckAndCleanup(d),this.defaultAxes=this.getDefaultAxes(d),this.specialOverrides=this.specialOverridesDefaults({...i});let c=this.optionsType(d),{axes:p={},annotations:{axesButtons:g=null,...m}={},series:v,...f}=this.getSeriesThemeConfig(c);this.processedOptions=vG(pk(t,d,null!=g?{annotations:{axesButtons:g}}:{},f,this.defaultAxes),h),this.processAxesOptions(this.processedOptions,p),this.processSeriesOptions(this.processedOptions),this.processMiniChartSeriesOptions(this.processedOptions),this.annotationThemes=m,(wp(this.processedOptions)||(l=wc(n=this.processedOptions),wg(n)&&"pie"!==l&&"donut"!==l))&&(null==(r=this.processedOptions.legend)?void 0:r.enabled)==null&&(null!=(a=this.processedOptions).legend||(a.legend={}),this.processedOptions.legend.enabled=this.processedOptions.series.length>1),this.enableConfiguredOptions(this.processedOptions,d),vX.isEnterprise||Eg(this.processedOptions,!0)}getOptions(){var e;return null!=(e=this.processedOptions)?e:{}}diffOptions(e){return vO(e,this.processedOptions)}getSeriesThemeConfig(e){var t,i;let s=vG(null!=(t=null==(i=this.activeTheme)?void 0:i.config[e])?t:{});return this.removeLeftoverSymbols(s),s}getDefaultAxes(e){var t,i;let s=this.optionsType(e),r=null!=(t=null==(i=e.series)?void 0:i.find(e=>{var t;return(null!=(t=e.type)?t:"line")===s}))?t:{};return wn.cloneDefaultAxes(s,r)}optionsType(e){var t,i;return null!=(t=null==(i=e.series)||null==(i=i[0])?void 0:i.type)?t:"line"}
207sanityCheckAndCleanup(e){var t;this.deprecationWarnings(e),this.axesTypeIntegrity(e),this.seriesTypeIntegrity(e),this.soloSeriesIntegrity(e),this.removeDisabledOptions(e),this.removeLeftoverSymbols(e),null!=(t=e.series)&&t.some(e=>"bullet"===e.type)&&null!=e.sync&&!1!==e.sync.enabled&&(u8.warnOnce("bullet series cannot be synced, disabling synchronization."),delete e.sync)}processAxesOptions(e,t){"axes"in e&&(e.axes=e.axes.map(e=>{var i,s,r;let{crossLines:a,...o}=pk(null==(i=t[e.type])?void 0:i[e.position],t[e.type]);e.crossLines&&(e.crossLines=pN(e.crossLines,a));let n=null==(s=o.gridLine)?void 0:s.style;null!=(r=e.gridLine)&&r.style&&null!=n&&n.length&&(e.gridLine.style=e.gridLine.style.map((e,t)=>null!=e.stroke||null!=e.lineDash?pk(e,n.at(t%n.length)):e));let{top:l,right:h,bottom:d,left:u,...c}=pk(e,o);return c}))}processSeriesOptions(e){var t,i;let s=this.getTooltipPositionDefaults(e),r=pb(e.theme)?EM(null==(t=e.theme)?void 0:t.palette):"inbuilt",a={colourIndex:0,userPalette:r},o=null==(i=e.series)?void 0:i.map(t=>{var i;null!=t.type||(t.type=this.getDefaultSeriesType(e));let{innerLabels:o,...n}=null!=(i=this.getSeriesThemeConfig(t.type).series)?i:{},l=Ia.has(t.type)?{colourIndex:0,userPalette:r}:a,h=this.getSeriesPalette(t.type,l),d=this.getTooltipRangeDefaults(e,t.type),u=pk(this.getSeriesGroupingOptions(t),t,s,d,n,h,{visible:!0});return u.innerLabels&&(u.innerLabels=pN(u.innerLabels,o)),this.activeTheme.templateTheme(u)});e.series=this.setSeriesGroupingOptions(null!=o?o:[])}processMiniChartSeriesOptions(e){var t;let i=null==(t=e.navigator)||null==(t=t.miniChart)?void 0:t.series;if(null==i)return;let s={colourIndex:0,userPalette:pb(e.theme)?EM(e.theme.palette):"inbuilt"};i=i.map(e=>{var t;null!=e.type||(e.type="line");let{innerLabels:i,...r}=null!=(t=this.getSeriesThemeConfig(e.type).series)?t:{},a=pk(this.getSeriesGroupingOptions(e),e,r,this.getSeriesPalette(e.type,s));return this.activeTheme.templateTheme(a)}),e.navigator.miniChart.series=this.setSeriesGroupingOptions(i)}getSeriesPalette(e,t){let i=wn.getPaletteFactory(e),{colourIndex:s,userPalette:r}=t,{fills:a=[],strokes:o=[]}=this.activeTheme.palette;return null==i?void 0:i({userPalette:r,colorsCount:Math.max(a.length,o.length),themeTemplateParameters:this.activeTheme.getTemplateParameters(),palette:this.activeTheme.palette,takeColors:e=>(t.colourIndex+=e,{fills:gr(a,e,s),strokes:gr(o,e,s)})})}getSeriesGroupingOptions(e){let t=wn.isGroupable(e.type),i=wn.isStackable(e.type),s=wn.isStackedByDefault(e.type);e.grouped&&!t&&u8.warnOnce(`unsupported grouping of series type "${e.type}".`),(e.stacked||e.stackGroup)&&!i&&u8.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:r,stacked:a}=e;return null!=a||(a=(s||null!=e.stackGroup)&&!(t&&r)),null!=r||(r=!0),{stacked:i&&a,grouped:t&&r&&!(i&&a)}}setSeriesGroupingOptions(e){let t=this.getSeriesGrouping(e);this.debug("setSeriesGroupingOptions() - series grouping: ",t);let i={},s=t.reduce((e,t)=>{var i;return"default"===t.groupType||(null!=e[i=t.seriesType]||(e[i]=0),e[t.seriesType]+="stack"===t.groupType?1:t.series.length),e},{});return t.flatMap(e=>{var t;switch(null!=i[t=e.seriesType]||(i[t]=0),e.groupType){case"stack":{let t=i[e.seriesType]++;return e.series.map((i,r)=>Object.assign(i,{seriesGrouping:{groupId:e.groupId,groupIndex:t,groupCount:s[e.seriesType],stackIndex:r,stackCount:e.series.length}}))}case"group":return e.series.map(t=>Object.assign(t,{seriesGrouping:{groupId:e.groupId,groupIndex:i[e.seriesType]++,groupCount:s[e.seriesType],stackIndex:0,stackCount:0}}))}return e.series}).map(({stacked:e,grouped:t,...i})=>i)}getSeriesGroupId(e){var t;return[e.type,e.xKey,e.stacked?null!=(t=e.stackGroup)?t:"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){let t=new Map;return e.reduce((e,i)=>{let s=i.type;if(i.stacked||i.grouped){let r=this.getSeriesGroupId(i);if(!t.has(r)){let a={groupType:i.stacked?"stack":"group",seriesType:s,series:[],groupId:r};t.set(r,a),e.push(a)}t.get(r).series.push(i)}else e.push({groupType:"default",seriesType:s,series:[i],groupId:"__default__"});return e},[])}getDefaultSeriesType(e){if(wp(e))return"line";if(wg(e))return"pie";if(wm(e))return"treemap";if(wv(e))return"map-shape";if(wf(e))return"sankey";else if(wC(e))return"pyramid";else if(wy(e))return"radial-gauge";throw Error("Invalid chart options type detected.")}getTooltipPositionDefaults(e){var t;let i=null==(t=e.tooltip)?void 0:t.position;if(!px(i))return;let{type:s,xOffset:r,yOffset:a}=i,o={};return pM(s)&&pR(u1,s)&&(o.type=s),pE(r)&&(o.xOffset=r),pE(a)&&(o.yOffset=a),{tooltip:{position:o}}}
207getTooltipRangeDefaults(e,t){var i,s,r;return{tooltip:{range:null!=(i=null==(s=e.tooltip)?void 0:s.range)?i:null==(r=wn.getTooltipDefauls(t))?void 0:r.range}}}deprecationWarnings(e){Object.entries({yKeys:"yKey",yNames:"yName"}).forEach(([t,i])=>{var s;null!=(s=e.series)&&s.some(e=>null!=e[t])&&u8.warnOnce(`Property [series.${t}] is deprecated, please use [series.${i}] and multiple series instead.`)})}axesTypeIntegrity(e){if("axes"in e){var t;for(let{type:i}of null!=(t=e.axes)?t:[])if(!(null!=i&&y7.has(i))){delete e.axes;let t=y7.publicKeys().join(", ");u8.warnOnce(`unknown axis type: ${i}; expected one of: ${t}`)}}}seriesTypeIntegrity(e){var t;e.series=null==(t=e.series)?void 0:t.filter(({type:e})=>{if(null==e||null!=e&&wr.has(e)||y9.some(t=>"series"===t.type&&t.identifier===e))return!0;u8.warnOnce(`unknown series type: ${e}; expected one of: ${wa.seriesTypes.join(", ")}`)})}soloSeriesIntegrity(e){let t=e.series;if(t&&t.length>1&&t.some(e=>wn.isSolo(e.type))){let i=this.optionsType(e);if(wn.isSolo(i))u8.warn(`series[0] of type '${i}' is incompatible with other series types. Only processing series[0]`),e.series=t.slice(0,1);else{let{solo:i,nonSolo:s}=gs(t,e=>wn.isSolo(e.type)?"solo":"nonSolo"),r=gi(i.map(e=>e.type)).join(", ");u8.warn(`Unable to mix these series types with the lead series type: ${r}`),e.series=s}}}enableConfiguredOptions(e,t){vz(t,(e,t)=>{t&&"enabled"in t&&!t._enabledFromTheme&&null==e.enabled&&(t.enabled=!0)},{skip:["data","theme"]},e),vz(e,e=>{null!=e._enabledFromTheme&&delete e._enabledFromTheme},{skip:["data","theme"]})}removeDisabledOptions(e){vz(e,e=>{"enabled"in e&&!1===e.enabled&&Object.keys(e).forEach(t=>{"enabled"!==t&&delete e[t]})},{skip:["data","theme"]})}removeLeftoverSymbols(e){vz(e,e=>{if(e&&pb(e))for(let[t,i]of Object.entries(e))pT(i)&&delete e[t]},{skip:["data"]})}specialOverridesDefaults(e){if(null!=e.window?cH(e.window):"u">typeof window?e.window=window:void 0!==i.g&&(e.window=i.g.window),null!=e.document?cV(e.document):"u">typeof document?e.document=document:void 0!==i.g&&(e.document=i.g.document),null==e.window)throw Error("AG Charts - unable to resolve global window");if(null==e.document)throw Error("AG Charts - unable to resolve global document");return e}},In=m8.create(!0,"opts");function Il(e){if(wp(e))return"cartesian";if(wg(e))return"polar";if(wm(e))return"hierarchy";if(wv(e))return"topology";if(wf(e))return"flow-proportion";else if(wC(e))return"standalone";else if(wy(e))return"gauge";throw Error(`AG Chart - unknown type of chart for options with type: ${e.type}`)}var Ih=class{static licenseCheck(e){var t,i,s;this.licenseChecked||(this.licenseManager=null==(t=vX.licenseManager)?void 0:t.call(vX,e),null==(i=this.licenseManager)||i.setLicenseKey(this.licenseKey,this.gridContext),null==(s=this.licenseManager)||s.validateLicense(),this.licenseChecked=!0)}static setLicenseKey(e){this.licenseKey=e}static setGridContext(e){this.gridContext=e}static getLicenseDetails(e){var t;return null==(t=vX.licenseManager)?void 0:t.call(vX,{}).getLicenseDetails(e)}static getInstance(e){return Iu.getInstance(e)}static create(e,t){var i,s;this.licenseCheck(e);let r=Iu.createOrUpdate({userOptions:e,licenseManager:this.licenseManager,styles:null!=vX.styles?[["ag-charts-enterprise",vX.styles]]:[],optionsMetadata:t});return null!=(i=this.licenseManager)&&i.isDisplayWatermark()&&this.licenseManager&&(null==(s=vX.injectWatermark)||s.call(vX,r.chart.ctx.domManager,this.licenseManager.getWatermarkMessage())),r}static createFinancialChart(e){return this.create(e,{presetType:"price-volume"})}static createGauge(e){return this.create(e,{presetType:"gauge"})}static __createSparkline(e){return this.create(e,{presetType:"sparkline"})}};Ih.licenseChecked=!1,Ih.gridContext=!1;var Id=class e{static getInstance(e){let t=wz.getInstance(e);return t?bu.chartInstances.get(t):void 0}static initialiseModules(){if(!e.initialised){for(let e of(DZ(),Ce.modules)){if("enterprise"===e.packageType&&!function(e){if("enterprise"!==e.packageType)throw Error("AG Charts - internal configuration error, only enterprise modules need verification.");let t=y9.find(t=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier&&e.chartTypes.every(e=>t.chartTypes.includes(e)));t&&(null!=t.useCount||(t.useCount=0),t.useCount++);return null!=t}(e)&&u8.errorOnce("Unexpected enterprise module registered: "+e.identifier),"root"===e.type&&e.themeTemplate)for(let t of e.chartTypes)wo.set(t,e.themeTemplate);
207if("series"===e.type){if(e.chartTypes.length>1)throw Error(`AG Charts - Module definition error: ${e.identifier}`);wn.register(e.identifier,e)}if("series-option"===e.type&&e.themeTemplate)for(let t of e.seriesTypes)wn.setThemeTemplate(t,e.themeTemplate);if("axis-option"===e.type&&e.themeTemplate)for(let t of e.axisTypes){let i=y7.getThemeTemplate(t),s=pk(e.themeTemplate,i);y7.setThemeTemplate(t,s)}"axis"===e.type&&y7.register(e.identifier,e),"legend"===e.type&&wt.register(e.identifier,e)}if(Ce.hasEnterpriseModules()){let e=y9.filter(({useCount:e})=>null==e||0===e);e.length>0&&u8.errorOnce("Enterprise modules expected but not registered: ",e)}e.initialised=!0}}static createOrUpdate(t){var i,s,r,a,o,n,l,h;let{proxy:d}=t,{userOptions:u,licenseManager:c,styles:p,processedOverrides:g=null!=(i=null==(s=d)?void 0:s.chart.chartOptions.processedOverrides)?i:{},specialOverrides:m=null!=(r=null==(a=d)?void 0:a.chart.chartOptions.specialOverrides)?r:{},optionsMetadata:v=null!=(o=null==(n=d)?void 0:n.chart.chartOptions.optionMetadata)?o:{}}=t,{presetType:f}=v;e.initialiseModules(),In(">>> AgCharts.createOrUpdate() user options",u);let C=u;Ih.optionsMutationFn&&In(">>> AgCharts.createOrUpdate() MUTATED user options",C=Ih.optionsMutationFn(C,f));let{overrideDevicePixelRatio:y,document:w,window:b,styleContainer:S,...x}=C,M=new Io(x,g,{...m,document:w,window:b,overrideDevicePixelRatio:y,styleContainer:S},v),D=null==(l=d)?void 0:l.chart;return(null==D||Il(M.processedOptions)!==Il(null==(h=D)?void 0:h.chartOptions.processedOptions))&&(D=e.createChartInstance(M,D),null==p||p.forEach(([e,t])=>{var i;null==(i=D)||i.ctx.domManager.addStyles(e,t)})),null==d?d=new bu(D,e.callbackApi,c):d.chart=D,In.check()&&"u">typeof window&&(null!=window.agChartInstances||(window.agChartInstances={}),window.agChartInstances[D.id]=D),D.queuedUserOptions.push(u),D.requestFactoryUpdate(e=>{e.applyOptions(M);let t=e.queuedUserOptions.indexOf(u)+1;e.queuedUserOptions.splice(0,t)}),d}static updateUserDelta(t,i){vz(i=vG(i,{shallow:["data"]}),e=>{if("object"==typeof e)for(let[t,i]of Object.entries(e))void 0===i&&Object.assign(e,{[t]:Symbol("UNSET")})},{skip:["data"]});let{chart:s}=t,r=s.getOptions(),a=pk(i,r);In(">>> AgCharts.updateUserDelta() user delta",i),In("AgCharts.updateUserDelta() - base options",r),e.createOrUpdate({userOptions:a,proxy:t})}static createChartInstance(t,i){let s=null==i?void 0:i.destroy({keepTransferableResources:!0});return new(e.getChartByOptions(t.processedOptions))(t,s)}static getChartByOptions(e){if(wp(e))return bd;if(wm(e))return DJ;if(wg(e))return D0;if(wv(e))return D9;if(wf(e))return Dq;else if(wC(e))return D3;else if(wy(e))return DX;throw Error("AG Charts - couldn't apply configuration, check options are correctly structured and series types are specified")}};Id.caretaker=new CC(Cm),Id.initialised=!1,Id.callbackApi={caretaker:Id.caretaker,create:(e,t,i,s)=>Id.createOrUpdate({userOptions:e,processedOverrides:t,specialOverrides:i,optionsMetadata:s}),update:(e,t)=>Id.createOrUpdate({userOptions:e,proxy:t}),updateUserDelta:(e,t)=>Id.updateUserDelta(e,t)};var Iu=Id;function Ic(){return DZ(),{AgCharts:Ih,version:Cm}}var Ip={};uq(Ip,{Arc:()=>Ig,ArrowDown:()=>IS,ArrowUp:()=>Ib,BBox:()=>c4,BandScale:()=>gw,Caption:()=>fe,ChangeDetectableProperties:()=>xw,Circle:()=>wK,ConicGradient:()=>Im,ContinuousScale:()=>p8,Diamond:()=>wq,DropShadow:()=>xb,ExtendedPath2D:()=>CK,Gradient:()=>vf,Group:()=>m1,HdpiCanvas:()=>C5,Image:()=>bD,Label:()=>fa,Layer:()=>fi,Line:()=>vS,LinearGradient:()=>vC,LinearScale:()=>bg,Marker:()=>wY,Node:()=>pe,OrdinalTimeScale:()=>mz,Path:()=>Cq,PointerEvents:()=>c7,RadialColumnShape:()=>If,Rect:()=>bS,RedrawType:()=>c6,Rotatable:()=>mq,RotatableGroup:()=>m3,RotatableText:()=>vT,Scalable:()=>mQ,ScalableGroup:()=>m2,Scene:()=>ya,SceneChangeDetection:()=>c5,ScenePathChangeDetection:()=>CZ,Sector:()=>Dg,SectorBox:()=>Ds,Selection:()=>m7,Shape:()=>vb,Square:()=>w0,SvgPath:()=>Iy,Text:()=>vR,Tooltip:()=>v9,Transformable:()=>mJ,TransformableText:()=>vL,Translatable:()=>mX,TranslatableGroup:()=>m4,TranslatableLayer:()=>fs,Triangle:()=>w2,calculateDerivativeExtrema:()=>C$,calculateDerivativeExtremaXY:()=>CY,drawCorner:()=>by,easing:()=>pj,evaluateBezier:()=>CW,getFont:()=>IM,getMarker:()=>w5,getRadialColumnWidth:()=>IC,motion:()=>Ix,sectorBox:()=>Dr,solveBezier:()=>CU,splitBezier:()=>C_,toRadians:()=>vr,toTooltipHtml:()=>v8});var Ig=class extends Cq{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return cq(ve(this.startAngle),ve(this.endAngle))}updatePath(){let e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),1===this.type?e.closePath():2!==this.type||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}computeBBox(){return new c4(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}isPointInPath(e,t){let i=this.getBBox();return 0!==this.type&&i.containsPoint(e,t)&&this.path.isPointInPath(e,t)}};Ig.className="Arc",Ig.defaultStyles={...vb.defaultStyles,lineWidth:1,fillStyle:null},uQ([CZ()],Ig.prototype,"centerX",2),uQ([CZ()],Ig.prototype,"centerY",2),uQ([CZ()],Ig.prototype,"radius",2),uQ([CZ()],Ig.prototype,"startAngle",2),uQ([CZ()],Ig.prototype,"endAngle",2),uQ([CZ()],Ig.prototype,"counterClockwise",2),uQ([CZ()],Ig.prototype,"type",2);var Im=class extends vf{constructor(e,t,i=0,s){super(e,t,s),this.angle=i}
207createCanvasGradient(e,t){let{colorSpace:i,stops:s,angle:r}=this,a=ve(vr(r+90));if(!("createConicGradient"in e))return new vC(i,s,r).createCanvasGradient(e,t);let o=t.x+.5*t.width,n=t.y+.5*t.height;return e.createConicGradient(a,o,n)}};function Iv(e,t,i){let s=Math.sqrt(e**2+t**2),r=Math.atan2(t,e)+i;return{x:Math.cos(r)*s,y:Math.sin(r)*s}}var If=class extends Cq{constructor(){super(...arguments),this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}set cornerRadius(e){}computeBBox(){let{innerRadius:e,outerRadius:t,columnWidth:i}=this,s=this.getRotation(),r=-i/2,a=i/2,o=-t,n=-e,l=1/0,h=1/0,d=-1/0,u=-1/0;for(let e=0;e<4;e+=1){let{x:t,y:i}=Iv(e%2==0?r:a,e<2?o:n,s);l=Math.min(t,l),h=Math.min(i,h),d=Math.max(t,d),u=Math.max(i,u)}return new c4(l,h,d-l,u-h)}getRotation(){let{startAngle:e,endAngle:t}=this,i=vn(e,t);return ve(e+i/2+Math.PI/2)}updatePath(){let{isBeveled:e}=this;e?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){let{columnWidth:e,innerRadius:t,outerRadius:i,path:s}=this,r=-e/2,a=e/2,o=-i,n=-t,l=this.getRotation(),h=[[r,n],[r,o],[a,o],[a,n]].map(([e,t])=>Iv(e,t,l));s.clear(!0),s.moveTo(h[0].x,h[0].y),s.lineTo(h[1].x,h[1].y),s.lineTo(h[2].x,h[2].y),s.lineTo(h[3].x,h[3].y),s.closePath()}updateBeveledPath(){let{columnWidth:e,path:t,outerRadius:i,innerRadius:s,axisInnerRadius:r,axisOuterRadius:a,isRadiusAxisReversed:o}=this,n=cq(s,r),l=Math.asin(e/2/s),h=this.getRotation(),d=(e,t)=>Math.sqrt(e**2+t**2),u=(e,t)=>t>e?0:Math.sqrt(e**2-t**2),c=(e,t,i)=>i?e<t:e>t,p=n&&!isNaN(l)&&l<Math.PI/6,g=-e/2,m=e/2,v=-i,f=-s*(p?Math.cos(l):1),C=c(a,d(s,e/2),!o);if(C){let e=u(a,s);g=-e,m=e}t.clear(!0);let y=Iv(g,f,h);t.moveTo(y.x,y.y);let w=cq(s,i),b=c(a,d(i,e/2),!o);if(w&&p)t.arc(0,0,s,ve(-l-Math.PI/2)+h,ve(l-Math.PI/2)+h,!1);else if(b){let s=-u(a,e/2),r=u(a,i);if(!C){let e=Iv(g,s,h);t.lineTo(e.x,e.y)}if(t.arc(0,0,a,Math.atan2(s,g)+h,Math.atan2(v,-r)+h,!1),!cq(r,0)){let e=Iv(r,v,h);t.lineTo(e.x,e.y)}t.arc(0,0,a,Math.atan2(v,r)+h,Math.atan2(s,m)+h,!1)}else{let e=Iv(g,v,h),i=Iv(m,v,h);t.lineTo(e.x,e.y),t.lineTo(i.x,i.y)}let S=Iv(m,f,h);if(t.lineTo(S.x,S.y),p)t.arc(0,0,s,ve(l-Math.PI/2)+h,ve(-l-Math.PI/2)+h,!0);else{let e=Iv(g,f,h);t.lineTo(e.x,e.y)}t.closePath()}};function IC(e,t,i,s,r){let a=vn(e,t),o=a*(1-s)/2;if(e+=o,t-=o,a<.001)return 2*i*r;if(a>=2*Math.PI){let i=e+a/2;e=i-Math.PI,t=i+Math.PI}let n=i*Math.cos(e),l=i*Math.sin(e),h=Math.floor(Math.sqrt((n-i*Math.cos(t))**2+(l-i*Math.sin(t))**2));return Math.max(1,Math.min(2*i*r,h))}If.className="RadialColumnShape",uQ([CZ()],If.prototype,"isBeveled",2),uQ([CZ()],If.prototype,"columnWidth",2),uQ([CZ()],If.prototype,"startAngle",2),uQ([CZ()],If.prototype,"endAngle",2),uQ([CZ()],If.prototype,"outerRadius",2),uQ([CZ()],If.prototype,"innerRadius",2),uQ([CZ()],If.prototype,"axisInnerRadius",2),uQ([CZ()],If.prototype,"axisOuterRadius",2),uQ([CZ()],If.prototype,"isRadiusAxisReversed",2);var Iy=class extends Cq{constructor(e=""){super(),this.x=0,this.y=0,this.commands=[],this._d="",this.d=e}get d(){return this._d}set d(e){if(e!==this._d){for(let[t,i,s]of(this._d=e,this.commands.length=0,e.matchAll(/([A-Z])([0-9. ]*)/g))){let e=s.split(/\s+/g).map(Number);this.commands.push([i,e])}this.checkPathDirty()}}updatePath(){let{path:e,x:t,y:i}=this;e.clear();let s=t,r=i;for(let[a,o]of this.commands)switch(a){case"M":e.moveTo(t+o[0],i+o[1]),s=t+o[0];break;case"C":e.cubicCurveTo(t+o[0],i+o[1],t+o[2],i+o[3],t+o[4],i+o[5]),s=t+o[4],r=i+o[5];break;case"H":e.lineTo(t+o[0],r),s=i+o[0];break;case"L":e.lineTo(t+o[0],i+o[1]),s=t+o[0],r=i+o[1];break;case"V":e.lineTo(s,i+o[0]),r=i+o[0];break;case"Z":e.closePath();break;default:throw Error(`Could not translate command '${a}' with '${o.join(" ")}'`)}e.closePath()}};uQ([CZ()],Iy.prototype,"x",2),uQ([CZ()],Iy.prototype,"y",2);var Iw=class e extends wY{updatePath(){let t=this.size/2;super.applyPath(t,e.moves)}};Iw.className="ArrowUp",Iw.moves=[{x:0,y:0,t:"move"},{x:1,y:1.2},{x:-.5,y:0},{x:0,y:.8},{x:-1,y:0},{x:0,y:-.8},{x:-.5,y:0}];var Ib=Iw,IS=class extends wY{updatePath(){let e=this.size/2;super.applyPath(e,Ib.moves.map(e=>({x:-1*e.x,y:-1*e.y})))}};IS.className="ArrowDown";var Ix={...cx,...mg},IM=vE.toFontString,ID={};uq(ID,{CARTESIAN_AXIS_TYPE:()=>bQ,CARTESIAN_POSITION:()=>bq,ChartTheme:()=>ET,DEFAULT_ANNOTATION_BACKGROUND_FILL:()=>SI,DEFAULT_ANNOTATION_COLOR:()=>SD,DEFAULT_ANNOTATION_HANDLE_FILL:()=>SA,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>SL,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>SF,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>SP,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>Sk,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>SR,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>ST,DEFAULT_AXIS_GRID_COLOUR:()=>b7,DEFAULT_AXIS_LINE_COLOUR:()=>b9,DEFAULT_BACKGROUND_COLOUR:()=>St,DEFAULT_CAPTION_ALIGNMENT:()=>So,DEFAULT_CAPTION_LAYOUT_STYLE:()=>Sa,DEFAULT_COLOURS:()=>Ss,DEFAULT_CROSS_LINES_COLOUR:()=>Se,DEFAULT_DIVERGING_SERIES_COLOR_RANGE:()=>Sw,DEFAULT_FONT_FAMILY:()=>b3,DEFAULT_FUNNEL_SERIES_COLOR_RANGE:()=>SS,DEFAULT_GAUGE_SERIES_COLOR_RANGE:()=>Sb,DEFAULT_GRIDLINE_ENABLED:()=>Sz,DEFAULT_HIERARCHY_FILLS:()=>Sx,DEFAULT_HIERARCHY_STROKES:()=>SM,DEFAULT_INSIDE_SERIES_LABEL_COLOUR:()=>b5,DEFAULT_INVERTED_LABEL_COLOUR:()=>b6,DEFAULT_LABEL_COLOUR:()=>b4,DEFAULT_MUTED_LABEL_COLOUR:()=>b8,DEFAULT_PADDING:()=>Sr,DEFAULT_POLAR_SERIES_STROKE:()=>Sy,DEFAULT_SHADOW_COLOUR:()=>Si,DEFAULT_TEXTBOX_COLOR:()=>SG,DEFAULT_TEXTBOX_FILL:()=>SN,DEFAULT_TEXTBOX_STROKE:()=>SO,DEFAULT_TEXT_ANNOTATION_COLOR:()=>SE,DEFAULT_TOOLBAR_POSITION:()=>SB,FONT_SIZE:()=>bK,FONT_WEIGHT:()=>bZ,IS_COMMUNITY:()=>b1,IS_DARK_THEME:()=>b0,IS_ENTERPRISE:()=>b2,PALETTE_ALT_DOWN_FILL:()=>Sv,PALETTE_ALT_DOWN_STROKE:()=>Sg,PALETTE_ALT_NEUTRAL_FILL:()=>Sf,PALETTE_ALT_NEUTRAL_STROKE:()=>SC,PALETTE_ALT_UP_FILL:()=>Sm,PALETTE_ALT_UP_STROKE:()=>Sp,PALETTE_DOWN_FILL:()=>Sd,PALETTE_DOWN_STROKE:()=>Sl,PALETTE_NEUTRAL_FILL:()=>Sc,PALETTE_NEUTRAL_STROKE:()=>Su,PALETTE_UP_FILL:()=>Sh,PALETTE_UP_STROKE:()=>Sn,POLAR_AXIS_SHAPE:()=>bJ,POLAR_AXIS_TYPE:()=>bX,getChartTheme:()=>Is,markerPaletteFactory:()=>bY,singleSeriesPaletteFactory:()=>b$,swapAxisCondition:()=>MR,themes:()=>IE}
207);var IE=pO(Ii,e=>null==e?void 0:e()),II={};uq(II,{BandScale:()=>gw,ColorScale:()=>vv,ContinuousScale:()=>p8,Invalidating:()=>p6,LinearScale:()=>bg,OrdinalTimeScale:()=>mz,TimeScale:()=>mG});var IA={};uq(IA,{Color:()=>pr,Debug:()=>m8,Logger:()=>u8,Padding:()=>Cs,TimeInterval:()=>u7,angleBetween:()=>vn,angleDiff:()=>vo,arcDistanceSquared:()=>vp,areArrayNumbersEqual:()=>vk,checkDatum:()=>fc,clamp:()=>c$,clampArray:()=>cY,clockwiseAngle:()=>vh,clockwiseAngles:()=>vd,countFractionDigits:()=>c1,createId:()=>cE,day:()=>cn,deepClone:()=>vG,displacePointFromVector:()=>vl,extent:()=>p7,findMinMax:()=>cK,findRangeExtent:()=>cZ,formatNormalizedPercentage:()=>c2,formatPercentage:()=>c3,friday:()=>cg,generateUUID:()=>cI,getAttribute:()=>v1,hour:()=>co,interpolateColor:()=>po,interpolateNumber:()=>pa,isBetweenAngles:()=>vs,isContinuous:()=>fu,isDate:()=>pC,isDenseInterval:()=>mN,isEqual:()=>cq,isNegative:()=>cQ,isNumber:()=>pE,isNumberEqual:()=>cq,isNumberObject:()=>fd,isString:()=>pM,isStringObject:()=>fh,jsonApply:()=>vV,jsonDiff:()=>vO,jsonWalk:()=>vz,lineDistanceSquared:()=>vc,millisecond:()=>ce,minute:()=>cr,mod:()=>c0,monday:()=>cd,month:()=>cv,normalisedExtentWithMetadata:()=>p9,normalizeAngle180:()=>vi,normalizeAngle360:()=>ve,normalizeAngle360Inclusive:()=>vt,range:()=>mk,resetIds:()=>cD,round:()=>cX,sanitizeHtml:()=>SW,saturday:()=>cm,second:()=>ci,setAttribute:()=>vJ,setAttributes:()=>v0,setElementStyle:()=>v2,shallowClone:()=>vB,sunday:()=>ch,thursday:()=>
207cp,tickFormat:()=>mP,tickStep:()=>mL,ticks:()=>mR,toDegrees:()=>va,toFixed:()=>cJ,toRadians:()=>vr,transformIntegratedCategoryValue:()=>fp,tuesday:()=>cu,utcDay:()=>cw,utcHour:()=>cy,utcMinute:()=>cC,utcMonth:()=>cb,utcYear:()=>cS,wednesday:()=>cc,year:()=>cf});var IR={};function IT(){return(e,t)=>{let i=[`Property [${e}] is deprecated.`,t].filter(Boolean).join(" ");u8.warnOnce(i)}}function IL(e,t){let i=IT(),s=null==t?void 0:t.default;return pd((t,r,a)=>(a!==s&&i(r.toString(),e),a))}function IF(e,t){let i=IT();return pd((s,r,a)=>(a!==s[e]&&(i(r.toString(),`Use [${e}] instead.`),pV(s,e,t?t(a):a)),pn),(t,s)=>(i(s.toString(),`Use [${e}] instead.`),pB(t,e)))}function IP(e,t,i){let s;if(!(e>t)){for(;t>=e;){let r=Math.floor((t+e)/2),a=i(r);null==a?t=r-1:(s=a,e=r+1)}return s}}uq(IR,{AND:()=>gD,ARRAY:()=>gz,ARRAY_OF:()=>gV,AbstractBarSeries:()=>MP,AbstractBarSeriesProperties:()=>MF,ActionOnSet:()=>v$,Animation:()=>p1,AnimationManager:()=>yS,Axis:()=>fX,AxisInterval:()=>fG,AxisLabel:()=>fB,AxisTick:()=>fV,AxisTicks:()=>IH,BOOLEAN:()=>gR,BOOLEAN_ARRAY:()=>gZ,Background:()=>bx,BackgroundModule:()=>bM,BaseModuleInstance:()=>f7,BaseProperties:()=>gb,COLOR_STRING:()=>gY,COLOR_STRING_ARRAY:()=>gK,CachedTextMeasurer:()=>vD,CachedTextMeasurerPool:()=>vM,CartesianAxis:()=>f1,CartesianSeries:()=>bl,CartesianSeriesNodeEvent:()=>bo,CartesianSeriesProperties:()=>bn,CategoryAxis:()=>f2,ChartAxisDirection:()=>mc,ChartEventManager:()=>yx,ChartOptions:()=>Io,ChartUpdateType:()=>yq,ContextMenuRegistry:()=>yM,Cursor:()=>yE,CursorManager:()=>yI,DATE:()=>gU,DATE_ARRAY:()=>gX,DATE_OR_DATETIME_MS:()=>g_,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>br,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>ba,DEFAULT_TOOLTIP_CLASS:()=>v4,DEFAULT_TOOLTIP_DARK_CLASS:()=>v6,DEGREE:()=>gG,DIRECTION:()=>mt,DOMManager:()=>Cz,DRAG_INTERACTION_TYPES:()=>yp,DataController:()=>y8,DataModel:()=>y5,DataModelSeries:()=>w8,DataService:()=>yh,Default:()=>fN,Deprecated:()=>IL,DeprecatedAndRenamedTo:()=>IF,EMPTY_TOOLTIP_CONTENT:()=>v5,FONT_STYLE:()=>g6,FONT_WEIGHT:()=>g5,FUNCTION:()=>gT,GREATER_THAN:()=>gW,GestureDetector:()=>yR,GroupedCategoryAxis:()=>f8,HierarchyNode:()=>IO,HierarchySeries:()=>IG,HierarchySeriesProperties:()=>IB,HighlightManager:()=>yT,HighlightProperties:()=>bt,HighlightStyle:()=>bi,INTERACTION_RANGE:()=>ms,INTERPOLATION_STEP_POSITION:()=>xI,INTERPOLATION_TYPE:()=>xE,InteractionManager:()=>yw,InteractionState:()=>Cc,InterpolationProperties:()=>xA,KeyNavManager:()=>yL,LABEL_PLACEMENT:()=>mr,LARGEST_KEY_INTERVAL:()=>xs,LESS_THAN:()=>gj,LINE_CAP:()=>g0,LINE_DASH:()=>g3,LINE_JOIN:()=>g1,LINE_STYLE:()=>g2,LayoutElement:()=>Co,LayoutManager:()=>Cn,LonLatBBox:()=>Iz,MARKER_SHAPE:()=>xS,MATCHING_CROSSLINE_TYPE:()=>fg,MAX_SPACING:()=>mn,MIN_SPACING:()=>mo,MercatorScale:()=>D8,ModuleRegistry:()=>f9,Motion:()=>pj,NAN:()=>gk,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>p2,NUMBER:()=>gF,NUMBER_ARRAY:()=>gq,NUMBER_OR_NAN:()=>gB,Navigator:()=>bU,NavigatorModule:()=>b_,NodeRegionBBoxProvider:()=>yP,OBJECT:()=>gI,OBJECT_ARRAY:()=>gJ,OR:()=>gE,OVERFLOW_STRATEGY:()=>me,ObserveChanges:()=>vY,PHASE_METADATA:()=>pX,PHASE_ORDER:()=>pQ,PLACEMENT:()=>mi,PLAIN_OBJECT:()=>gA,POINTER_INTERACTION_TYPES:()=>yg,POSITION:()=>g4,POSITION_TOP_COORDINATES:()=>fw,POSITIVE_NUMBER:()=>gN,PolarAxis:()=>DQ,PolarSeries:()=>DI,PropertiesArray:()=>gS,ProxyOnWrite:()=>vU,ProxyProperty:()=>vW,ProxyPropertyOnWrite:()=>v_,QUICK_TRANSITION:()=>.2,RATIO:()=>gO,REAL_NUMBER:()=>gP,REGIONS:()=>yF,RegionManager:()=>yB,RepeatType:()=>pJ,SKIP_JS_BUILTINS:()=>pz,SMALLEST_KEY_INTERVAL:()=>xi,SORT_DOMAIN_GROUPS:()=>xr,STRING:()=>gL,STRING_ARRAY:()=>gQ,Series:()=>wA,SeriesGroupingChangedEvent:()=>wI,SeriesItemHighlightStyle:()=>w7,SeriesMarker:()=>xx,SeriesNodeEvent:()=>wE,SeriesNodePickMode:()=>wD,SeriesProperties:()=>bs,SeriesTooltip:()=>xD,SimpleRegionBBoxProvider:()=>yk,SimpleTextMeasurer:()=>vI,StateMachine:()=>vq,TEXT_ALIGN:()=>g7,TEXT_WRAP:()=>g8,TICK_INTERVAL:()=>fO,TOOLBAR_ALIGNMENTS:()=>yz,TOOLBAR_GROUPS:()=>yV,TOOLBAR_GROUP_ORDERING:()=>yH,TOOLBAR_POSITIONS:()=>yW,TextUtils:()=>vE,TextWrapper:()=>vQ,ToolbarManager:()=>y_,ToolbarPosition:()=>yj,Tooltip:()=>v9,TooltipManager:()=>y$,TooltipPosition:()=>v7,UNION:()=>ma,UpdateService:()=>yQ,VERTICAL_ALIGN:()=>g9,Validate:()=>gM,Vec2:()=>DV,Vec4:()=>Ik,ZIndexMap:()=>fl,ZoomManager:()=>yY,__FORCE_MODULE_DETECTION:()=>Ij,accumulateGroup:()=>xc,accumulateStack:()=>xg,accumulatedValue:()=>SJ,accumulativeValueProperty:()=>S7,addHitTestersToQuadtree:()=>MT,adjustLabelPlacement:()=>MY,animationValidation:()=>xh,area:()=>SX,arraysEqual:()=>ge,backfillPathPointData:()=>xQ,buildFormatter:()=>gm,buildResetPathFn:()=>x5,calculateDefaultTimeTickFormat:()=>gC,calculateLabelChartPadding:()=>fy,calculateLabelTranslation:()=>fC,calculatePlacement:()=>v3,checkCrisp:()=>MB,circularSliceArray:()=>gr,clamp:()=>c$,clampArray:()=>cY,collapsedStartingBarPosition:()=>MV,computeBarFocusBounds:()=>MU,computeMarkerFocusBounds:()=>xY,convertValuesToScaleByDefs:()=>wR,countFractionDigits:()=>c1,createButton:()=>IW,createCheckbox:()=>IU,createDatumId:()=>xv,createDeprecationWarning:()=>IT,createElement:()=>cG,createElementId:()=>c_,createElementNS:()=>cB,createIcon:()=>IY,createSelect:()=>I_,createTextArea:()=>I$,dateToNumber:()=>gv,deconstructSelectionsOrNodes:()=>p0,deepClone:()=>vG,deepMerge:()=>pP,defaultTimeTickFormat:()=>gf,determinePathStatus:()=>Md,diff:()=>xm,downloadUrl:()=>cz,enterpriseModule:()=>vX,excludesType:()=>pL,extent:()=>p7,extractDecoratedProperties:()=>pp,findMaxValue:()=>IP,findMinMax:()=>cK,findQuadtreeMatch:()=>ML,findRangeExtent:()=>cZ,fixNumericExtent:()=>y2,focusCursorAtEnd:()=>cW,formatNormalizedPercentage:()=>c2,formatPercentage:()=>c3,formatValue:()=>SH,fromToMotion:()=>p3,getDocument:()=>cN,getLastFocus:()=>CP,getMissCount:()=>y3,getPath:()=>pB,getPathComponents:()=>y6,getRectConfig:()=>MG,getWindow:()=>cO,groupAccumulativeValueProperty:()=>xe,groupAverage:()=>SQ,groupBy:()=>gs,groupCount:()=>Sq,groupStackValueProperty:()=>xt,groupSum:()=>SK,initMenuKeyNav:()=>CT,initRovingTabIndex:()=>CA,initToolbarKeyNav:()=>CI,isAnimatingFloatingPosition:()=>yU,isArray:()=>pm,isBoolean:()=>pv,isButtonClickEvent:()=>CF,isDate:()=>pf,isDecoratedObject:()=>pu,isDefined:()=>pg,isEnumKey:()=>pA,isEnumValue:()=>pR,isEqual:()=>cq,isFiniteNumber:()=>pE,isFunction:()=>pw,isHtmlElement:()=>pI,isNegative:()=>cQ,isNumber:()=>pD,isObject:()=>pb,isObjectLike:()=>pS,isPlainObject:()=>px,isProperties:()=>gx,isRegExp:()=>py,isString:()=>pM,isSymbol:()=>pT,isValidDate:()=>pC,jsonApply:()=>vV,jsonDiff:()=>vO,jsonWalk:()=>vz,keyProperty:()=>S6,labelDirectionHandling:()=>fA,listDecoratedProperties:()=>pc,makeAccessibleClickListener:()=>CL,mapValues:()=>pO,markerFadeInAnimation:()=>xH,markerPaletteFactory:()=>bY,markerScaleInAnimation:()=>xj,markerSwipeScaleInAnimation:()=>xW,mergeArrayDefaults:()=>pN,mergeDefaults:()=>pk,midpointStartingBarPosition:()=>MH,minMax:()=>xK,mod:()=>c0,moduleRegistry:()=>Ce,nearestSquared:()=>cF,nearestSquaredInContainer:()=>cP,normaliseGroupTo:()=>xo,normalisePropertyTo:()=>xl,normalisedExtentWithMetadata:()=>p9,objectEqualWith:()=>pF,pairCategoryData:()=>Mh,pairContinuousData:()=>Ml,partialAssign:()=>pH,pathFadeInAnimation:()=>x4,pathFadeOutAnimation:()=>x6,pathRangePoints:()=>Mr,pathRangePointsReverse:()=>Ma,pathRanges:()=>Ms,pathSwipeInAnimation:()=>x3,pickByMatchingAngle:()=>DE,pickNode:()=>wT,plotPath:()=>x0,predicateWithMessage:()=>ml,prepareAreaPathAnimation:()=>ME,prepareAxisAnimationContext:()=>fj,prepareAxisAnimationFunctions:()=>f_,prepareBarAnimationFunctions:()=>Mj,prepareLinePathAnimation:()=>Mp,prepareLinePathAnimationFns:()=>Mc,prepareLinePathPropertyAnimation:()=>Mu,prepareMarkerAnimation:()=>x$,preparePieSeriesAnimationFunctions:()=>DM,range:()=>SZ,rangedValueProperty:()=>S8,renderPartialPath:()=>x2,resetAxisGroupFn:()=>f$,resetAxisLabelSelectionFn:()=>fK,resetAxisLineSelectionFn:()=>fZ,resetAxisSelectionFn:()=>fY,resetBarSelectionsFn:()=>MW,resetIds:()=>cD,resetLabelFn:()=>xy,resetMarkerFn:()=>xU,resetMarkerPositionFn:()=>x_,resetMotion:()=>mm,resetPieSelectionsFn:()=>
207DD,round:()=>cX,scale:()=>Mo,seriesLabelFadeInAnimation:()=>xf,seriesLabelFadeOutAnimation:()=>xC,setDocument:()=>cV,setElementBBox:()=>cj,setPath:()=>pV,setWindow:()=>cH,shallowClone:()=>vB,singleSeriesPaletteFactory:()=>b$,sortBasedOnArray:()=>ga,splitPairData:()=>x1,staticFromToMotion:()=>p4,stopPageScrolling:()=>Ck,stringify:()=>mu,sum:()=>SY,sumValues:()=>S$,toArray:()=>gt,toFixed:()=>cJ,toTooltipHtml:()=>v8,trailingAccumulatedValue:()=>S0,trailingAccumulatedValueProperty:()=>S9,unique:()=>gi,updateClipPath:()=>x8,updateLabelNode:()=>M_,updateRect:()=>MO,validateCrossLineValues:()=>fm,valueProperty:()=>S5,without:()=>pG});var Ik={bottomCenter:function(e){return{x:(e.x1+e.x2)/2,y:Math.max(e.y1,e.y2)}},center:function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},clone:function(e){return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},end:function(e){return{x:e.x2,y:e.y2}},from:function(e,t,i,s){if("number"==typeof e)return{x1:e,y1:t,x2:i,y2:s};if("width"in e)return{x1:e.x,y1:e.y,x2:e.x+e.width,y2:e.y+e.height};throw Error(`Values can not be converted into a vector4: [${e}] [${t}] [${i}] [${s}]`)},height:function(e){return Math.abs(e.y2-e.y1)},round:function(e){return{x1:Math.round(e.x1),y1:Math.round(e.y1),x2:Math.round(e.x2),y2:Math.round(e.y2)}},start:function(e){return{x:e.x1,y:e.y1}},topCenter:function(e){return{x:(e.x1+e.x2)/2,y:Math.min(e.y1,e.y2)}},origin:function(){return{x1:0,y1:0,x2:0,y2:0}},width:function(e){return Math.abs(e.x2-e.x1)}},IN=class e{constructor(e,t,i,s,r,a,o,n,l,h,d){this.series=e,this.index=t,this.datum=i,this.size=s,this.colorValue=r,this.fill=a,this.stroke=o,this.sumSize=n,this.depth=l,this.parent=h,this.children=d,this.midPoint={x:0,y:0}}contains(e){let t=e;for(;null!=t&&t.index>=this.index;){if(t===this)return!0;t=t.parent}return!1}walk(t,i=e.Walk.PreOrder){i===e.Walk.PreOrder&&t(this),this.children.forEach(e=>{e.walk(t,i)}),i===e.Walk.PostOrder&&t(this)}*[Symbol.iterator](){for(let e of(yield this,this.children))yield*e}};IN.Walk={PreOrder:0,PostOrder:1};var IO=IN,IG=class extends wA{constructor(e){super({moduleCtx:e,pickModes:[1,0],contentGroupVirtual:!1}),this.rootNode=new IO(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.focusPath=[],this.animationState=new vq("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}
207resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}async processData(){var e,t;let i,{childrenKey:s,sizeKey:r,colorKey:a,fills:o,strokes:n,colorRange:l}=this.properties,h=0,d=0,u=1/0,c=-1/0,p=Array((null!=(e=null==(t=this.data)?void 0:t.length)?e:0)+1).fill(void 0),g=(e,t)=>{let i=h+=1,o=null!=t.depth?t.depth+1:0,n=null!=s?e[s]:void 0,l=null==n||0===n.length,g=null!=r?e[r]:void 0,v=g=Number.isFinite(g)?Math.max(g,0):+!!l;d=Math.max(d,o);let f=null!=a?e[a]:void 0;return"number"==typeof f&&(p[i]=f,u=Math.min(u,f),c=Math.max(c,f)),m(new IO(this,i,e,g,f,void 0,void 0,v,o,t,[]),n)},m=(e,t)=>(null==t||t.forEach(t=>{let i=g(t,e);e.children.push(i),e.sumSize+=i.sumSize}),e),v=m(new IO(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),f=[u,c];null!=l&&Number.isFinite(u)&&Number.isFinite(c)&&((i=new vv).domain=f,i.range=l,i.update()),v.children.forEach((e,t)=>{e.walk(e=>{let s,r=p[e.index];if(null!=r){var a;s=null==(a=i)?void 0:a.convert(r)}null!=s||(s=null==o?void 0:o[t%o.length]),e.fill=s,e.stroke=null==i?null==n?void 0:n[t%n.length]:"rgba(0, 0, 0, 0.2)"})}),this.rootNode=v,this.maxDepth=d,this.colorDomain=f,this.focusPath=[{nodeDatum:this.rootNode,childIndex:0}]}async update({seriesRect:e}){await this.updateSelections(),await this.updateNodes();let t=this.getAnimationData();this.checkResize(e)&&this.animationState.transition("resize",t),this.animationState.transition("update",t)}resetAllAnimation(e){var t;let i=null==(t=this.animationResetFns)?void 0:t.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),null!=i&&mm(e.datumSelections,i)}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t;let i=null==(t=this.animationResetFns)?void 0:t.datum;null!=i&&mm([e],i)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){return{datumSelections:[this.groupSelection]}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[0/0,0/0]}getLegendData(e){let{colorKey:t,colorName:i,colorRange:s,visible:r}=this.properties;return"gradient"===e&&null!=t&&null!=s?[{legendType:"gradient",enabled:r,seriesId:this.id,c
207olorName:i,colorRange:s,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(e){return`${e.index}`}getDatumId(e){return this.getDatumIdFromData(e)}pickFocus(e){var t,i;if(0===this.rootNode.children.length)return;0===this.focusPath.length&&u8.error("this.focusPath should not be empty");let{datumIndexDelta:s,otherIndexDelta:r}=e,{focusPath:a}=this,o=a.length-2;if(0!==r||1===a.length){let e=Math.max(0,o+r);if(void 0!==a[e+1])return a.length=e+2,this.computeFocusOutputs(a[e+1]);{let i=a[a.length-1];for(;i.nodeDatum.children.length>0&&(null!=(t=i.nodeDatum.depth)?t:-1)<e;){let e={nodeDatum:i.nodeDatum.children[0],childIndex:0};a.push(e),i=e}return this.computeFocusOutputs(i)}}if(0===s)return this.computeFocusOutputs(a[a.length-1]);{let e=a[o+1].childIndex+s,t=a[o].nodeDatum,r=null==t||null==(i=t.children)?void 0:i.length;if(void 0!==r){let i=c$(0,e,r-1),s={nodeDatum:t.children[i],childIndex:i};return a[o+1]=s,a.length=o+2,this.computeFocusOutputs(s)}}}getDatumAriaText(e,t){var i;return e instanceof IO?this.ctx.localeManager.t("ariaAnnounceHierarchyDatum",{level:(null!=(i=e.depth)?i:-1)+1,count:e.children.length,description:t}):void u8.error(`datum is not HierarchyNode: ${e}`)}computeFocusOutputs({nodeDatum:e,childIndex:t}){let i=this.computeFocusBounds(e);if(i)return{datum:e,datumIndex:t,otherIndex:e.depth,bounds:i,showFocusBox:!0}}},IB=class extends bs{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(Dm),this.strokes=Object.values(Dv)}};uQ([gM(gL)],IB.prototype,"childrenKey",2),uQ([gM(gL,{optional:!0})],IB.prototype,"sizeKey",2),uQ([gM(gL,{optional:!0})],IB.prototype,"colorKey",2),uQ([gM(gL,{optional:!0})],IB.prototype,"colorName",2),uQ([gM(gK)],IB.prototype,"fills",2),uQ([gM(gK)],IB.prototype,"strokes",2),uQ([gM(gK,{optional:!0})],IB.prototype,"colorRange",2);var Iz=class{constructor(e,t,i,s){this.lon0=e,this.lat0=t,this.lon1=i,this.lat1=s}merge(e){this.lon0=Math.min(this.lon0,e.lon0),this.lat0=Math.min(this.lat0,e.lat0),this.lon1=Math.max(this.lon1,e.lon1),this.lat1=Math.max(this.lat1,e.lat1)}},IV=class e{constructor(){this.id=cE(this),this.axisGroup=new m4({name:`${this.id}-AxisTicks`,zIndex:2}),this.labelSelection=m7.select(this.axisGroup,vR),this.interval=new fG,this.label=new fB,this.scale=new bg,this.position="bottom",this.translationX=0,this.translationY=0,this.padding=0}attachAxis(e){e.appendChild(this.axisGroup)}calculateLayout(){this.scale.interval=this.interval.step;let e=[],t=this.generateTicks(),{translationX:i,translationY:s}=this;return this.labelSelection.update(t.ticks.map(e=>this.createLabelDatum(e)),void 0,e=>e.tickId),this.labelSelection.each((t,i)=>{t.setProperties(i),i.visible&&e.push(t.getBBox())}),this.axisGroup.setProperties({translationX:i,translationY:s}),c4.merge(e)}getLabelParams(e){let{padding:t}=this,{translate:i}=e;switch(this.position){case"top":case"bottom":return{x:i,y:t,textAlign:"center",textBaseline:"top"};case"left":case"right":return{x:t,y:i,textAlign:"start",textBaseline:"middle"}}}inRange(e,t=.001){let[i,s]=cK(this.scale.range);return e>=i-t&&e<=s+t}createLabelDatum(e){let{x:t,y:i,textBaseline:s,textAlign:r}=this.getLabelParams(e);return{visible:!!e.tickLabel,tickId:e.tickId,fill:this.label.color,fontFamily:this.label.fontFamily,fontSize:this.label.fontSize,fontStyle:this.label.fontStyle,fontWeight:this.label.fontWeight,rotation:0,rotationCenterX:0,text:e.tickLabel,textAlign:r,textBaseline:s,x:t,y:i}}generateTicks(){var t,i,s,r,a;let o,n,l,{minSpacing:h,maxSpacing:d}=this.interval,{maxTickCount:u,minTickCount:c,tickCount:p}=(t=cX(cZ(this.scale.range),2),i=h,s=d,r=e.DefaultTickCount,a=Math.max(a=e.DefaultMinSpacing,t/(r+1)),isNaN(i)&&(i=a),isNaN(s)&&(s=t),i>s&&(i===a?i=s:s=i),n=Math.min(o=c$(1,Math.floor(t/i),Math.min(Math.floor(t),100)),Math.ceil(t/s)),l=c$(n,r,o),{minTickCount:n,maxTickCount:o,tickCount:l});p&&(this.scale.tickCount=p,this.scale.minTickCount=c,this.scale.maxTickCount=u);let g=this.getTicksData();if("bottom"===this.position||"top"===this.position){let e=vM.getMeasurer({font:this.label}),t=this.scale.getDomain(),i=t[0]>t[1]?-1:1,s=-1/0*i;g.ticks=g.ticks.filter(t=>
207Math.sign(t.translate-s)===i&&(s=t.translate+e.textWidth(t.tickLabel,!0)*i,!0))}return g}getTicksData(){let e,t=[],i=this.scale.ticks(),s=i.reduce((e,t)=>Math.max(e,"number"==typeof t?c1(t):0),0),r=(e=new Map,t=>{let i=e.get(t);return i?(e.set(t,i+1),`${t}${i}`):(e.set(t,1),t)}),a=this.label.format?this.scale.tickFormat({ticks:i,specifier:this.label.format}):e=>pD(e)?e.toFixed(s):String(e);for(let e=0;e<i.length;e++){var o,n,l;let h=i[e],d=this.scale.convert(h);if(!this.inRange(d))continue;let u=null!=(o=null==(n=(l=this.label).formatter)?void 0:n.call(l,{value:h,index:e,fractionDigits:s}))?o:a(h),c=r(u);t.push({tick:h,tickId:c,tickLabel:u,translate:d})}return{rawTicks:i,fractionDigits:s,ticks:t}}};IV.DefaultTickCount=5,IV.DefaultMinSpacing=50;var IH=IV,Ij=0;function IW(e,t){let i=cG("button",IK("ag-charts-input ag-charts-button",t));return void 0!==e.label?i.append(e.label):(i.append(IY(e.icon)),i.ariaLabel=e.altText),i.addEventListener("click",e.onPress),v0(i,t),i}function IU(e,t){let i=cG("input",IK("ag-charts-input ag-charts-checkbox",t));return i.type="checkbox",i.checked=e.checked,i.addEventListener("change",t=>e.onChange(i.checked,t)),i.addEventListener("keydown",e=>{CF(e)&&(e.preventDefault(),i.click())}),v0(i,t),i}function I_(e,t){let i=cG("select",IK("ag-charts-input ag-charts-select",t));return i.append(...e.options.map(e=>{let t=cG("option");return t.value=e.value,t.textContent=e.label,t})),vJ(i,"data-preventdefault",!1),i.value=e.value,i.addEventListener("change",t=>e.onChange(i.value,t)),v0(i,t),i}function I$(e,t){let i=cG("textarea",IK("ag-charts-input ag-charts-textarea",t));return i.value=e.value,i.addEventListener("input",t=>e.onChange(i.value,t)),v0(i,t),i}function IY(e){let t=cG("span",`ag-charts-icon ag-charts-icon-${e}`);return vJ(t,"aria-hidden",!0),t}function IK(e,t){return null==t?e:`${e} ${t.class}`}var IZ=Object.defineProperty,Iq=Object.getOwnPropertyDescriptor,IQ=Object.getOwnPropertyNames,IX=Object.prototype.hasOwnProperty,IJ=(e,t)=>{for(var i in t)IZ(e,i,{get:t[i],enumerable:!0})},I0=(e,t,i,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of IQ(t))IX.call(e,r)||r===i||IZ(e,r,{get:()=>t[r],enumerable:!(s=Iq(t,r))||s.enumerable});return e},I1=(e,t,i)=>(I0(e,t,"default"),i&&I0(i,t,"default")),I2={};IJ(I2,{AdvancedFilterModule:()=>Rt,AgDialog:()=>Av,AgGroupComponent:()=>Ae,AgGroupComponentSelector:()=>As,AgMenuItemComponent:()=>Ay,AgMenuItemRenderer:()=>I7,AgMenuList:()=>Af,AgMenuPanel:()=>AC,AgPanel:()=>Am,AgPrimaryCols:()=>P4,AgRichSelect:()=>Au,ClipboardModule:()=>F_,ColumnsToolPanelModule:()=>P7,EnterpriseCoreModule:()=>I9,ExcelExportModule:()=>Nr,FiltersToolPanelModule:()=>Nd,GridChartsModule:()=>FN,GroupCellRenderer:()=>AD,GroupCellRendererCtrl:()=>Ax,LicenseManager:()=>I8,MasterDetailModule:()=>NC,MenuModule:()=>NV,MultiFilter:()=>NH,MultiFilterModule:()=>N_,PillDragComp:()=>Ac,PillDropZonePanel:()=>Ap,PivotDropZonePanel:()=>F5,RangeSelectionModule:()=>Rc,RichSelectModule:()=>NY,RowGroupDropZonePanel:()=>F8,RowGroupingModule:()=>PT,ServerSideRowModelModule:()=>Ol,SetFilter:()=>Ow,SetFilterModule:()=>OI,SideBarModule:()=>PZ,SparklinesModule:()=>GC,StatusBarModule:()=>GL,TabbedLayout:()=>AS,ToolPanelColDefService:()=>Pk,ValuesDropZonePanel:()=>PL,ViewportRowModelModule:()=>GP,VirtualList:()=>An,VirtualListDragFeature:()=>Ab,agCharts:()=>FO,exportMultipleSheetsAsExcel:()=>k7,getMultipleSheetsAsExcel:()=>k8});var I3=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")}md5cycle(e,t){let i=e[0],s=e[1],r=e[2],a=e[3];i=this.ff(i,s,r,a,t[0],7,-0x28955b88),a=this.ff(a,i,s,r,t[1],12,-0x173848aa),r=this.ff(r,a,i,s,t[2],17,0x242070db),s=this.ff(s,r,a,i,t[3],22,-0x3e423112),i=this.ff(i,s,r,a,t[4],7,-0xa83f051),a=this.ff(a,i,s,r,t[5],12,0x4787c62a),r=this.ff(r,a,i,s,t[6],17,-0x57cfb9ed),s=this.ff(s,r,a,i,t[7],22,-0x2b96aff),i=this.ff(i,s,r,a,t[8],7,0x698098d8),a=this.ff(a,i,s,r,t[9],12,-0x74bb0851),r=this.ff(r,a,i,s,t[10],17,-42063),s=this.ff(s,r,a,i,t[11],22,-0x76a32842),i=this.ff(i,s,r,a,t[12],7,0x6b901122),a=this.ff(a,i,s,r,t[13],
20712,-0x2678e6d),r=this.ff(r,a,i,s,t[14],17,-0x5986bc72),s=this.ff(s,r,a,i,t[15],22,0x49b40821),i=this.gg(i,s,r,a,t[1],5,-0x9e1da9e),a=this.gg(a,i,s,r,t[6],9,-0x3fbf4cc0),r=this.gg(r,a,i,s,t[11],14,0x265e5a51),s=this.gg(s,r,a,i,t[0],20,-0x16493856),i=this.gg(i,s,r,a,t[5],5,-0x29d0efa3),a=this.gg(a,i,s,r,t[10],9,0x2441453),r=this.gg(r,a,i,s,t[15],14,-0x275e197f),s=this.gg(s,r,a,i,t[4],20,-0x182c0438),i=this.gg(i,s,r,a,t[9],5,0x21e1cde6),a=this.gg(a,i,s,r,t[14],9,-0x3cc8f82a),r=this.gg(r,a,i,s,t[3],14,-0xb2af279),s=this.gg(s,r,a,i,t[8],20,0x455a14ed),i=this.gg(i,s,r,a,t[13],5,-0x561c16fb),a=this.gg(a,i,s,r,t[2],9,-0x3105c08),r=this.gg(r,a,i,s,t[7],14,0x676f02d9),s=this.gg(s,r,a,i,t[12],20,-0x72d5b376),i=this.hh(i,s,r,a,t[5],4,-378558),a=this.hh(a,i,s,r,t[8],11,-0x788e097f),r=this.hh(r,a,i,s,t[11],16,0x6d9d6122),s=this.hh(s,r,a,i,t[14],23,-0x21ac7f4),i=this.hh(i,s,r,a,t[1],4,-0x5b4115bc),a=this.hh(a,i,s,r,t[4],11,0x4bdecfa9),r=this.hh(r,a,i,s,t[7],16,-0x944b4a0),s=this.hh(s,r,a,i,t[10],23,-0x41404390),i=this.hh(i,s,r,a,t[13],4,0x289b7ec6),a=this.hh(a,i,s,r,t[0],11,-0x155ed806),r=this.hh(r,a,i,s,t[3],16,-0x2b10cf7b),s=this.hh(s,r,a,i,t[6],23,0x4881d05),i=this.hh(i,s,r,a,t[9],4,-0x262b2fc7),a=this.hh(a,i,s,r,t[12],11,-0x1924661b),r=this.hh(r,a,i,s,t[15],16,0x1fa27cf8),s=this.hh(s,r,a,i,t[2],23,-0x3b53a99b),i=this.ii(i,s,r,a,t[0],6,-0xbd6ddbc),a=this.ii(a,i,s,r,t[7],10,0x432aff97),r=this.ii(r,a,i,s,t[14],15,-0x546bdc59),s=this.ii(s,r,a,i,t[5],21,-0x36c5fc7),i=this.ii(i,s,r,a,t[12],6,0x655b59c3),a=this.ii(a,i,s,r,t[3],10,-0x70f3336e),r=this.ii(r,a,i,s,t[10],15,-1051523),s=this.ii(s,r,a,i,t[1],21,-0x7a7ba22f),i=this.ii(i,s,r,a,t[8],6,0x6fa87e4f),a=this.ii(a,i,s,r,t[15],10,-0x1d31920),r=this.ii(r,a,i,s,t[6],15,-0x5cfebcec),s=this.ii(s,r,a,i,t[13],21,0x4e0811a1),i=this.ii(i,s,r,a,t[4],6,-0x8ac817e),a=this.ii(a,i,s,r,t[11],10,-0x42c50dcb),r=this.ii(r,a,i,s,t[2],15,0x2ad7d2bb),s=this.ii(s,r,a,i,t[9],21,-0x14792c6f),e[0]=this.add32(i,e[0]),e[1]=this.add32(s,e[1]),e[2]=this.add32(r,e[2]),e[3]=this.add32(a,e[3])}cmn(e,t,i,s,r,a){return t=this.add32(this.add32(t,e),this.add32(s,a)),this.add32(t<<r|t>>>32-r,i)}ff(e,t,i,s,r,a,o){return this.cmn(t&i|~t&s,e,t,r,a,o)}gg(e,t,i,s,r,a,o){return this.cmn(t&s|i&~s,e,t,r,a,o)}hh(e,t,i,s,r,a,o){return this.cmn(t^i^s,e,t,r,a,o)}ii(e,t,i,s,r,a,o){return this.cmn(i^(t|~s),e,t,r,a,o)}md51(e){let t,i=e.length,s=[0x67452301,-0x10325477,-0x67452302,0x10325476];for(t=64;t<=e.length;t+=64)this.md5cycle(s,this.md5blk(e.substring(t-64,t)));e=e.substring(t-64);let r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)r[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(this.md5cycle(s,r),t=0;t<16;t++)r[t]=0;return r[14]=8*i,this.md5cycle(s,r),s}md5blk(e){let t=[];for(let i=0;i<64;i+=4)t[i>>2]=e.charCodeAt(i)+(e.charCodeAt(i+1)<<8)+(e.charCodeAt(i+2)<<16)+(e.charCodeAt(i+3)<<24);return t}rhex(e){let t="0123456789abcdef".split(""),i="",s=0;for(;s<4;s++)i+=t[e>>8*s+4&15]+t[e>>8*s&15];return i}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t|0}add32Compat(e,t){let i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}},I4={"01":"GRID","02":"CHARTS","0102":"BOTH"},I6=class e{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new I3,this.md5.init()}validateLicense(){let t=this.getLicenseDetails(e.licenseKey),i=`AG Grid ${"BOTH"===t.currentLicenseType?"and AG Charts ":""}Enterprise`,s=void 0===t.suppliedLicenseType?"":`AG ${"BOTH"===t.suppliedLicenseType?"Grid and AG Charts":"GRID"===t.suppliedLicenseType?"Grid":"Charts"} Enterprise`;if(t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(t.expired){let r=e.getGridReleaseDate(),a=e.formatDate(r);this.outputExpiredKey(t.expiry,a,i,s)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,i,s):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,i,s)}static extractExpiry(t){let i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(i),10))}static extractLicenseComponents(t){let i=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};let s=i.length-32,r=i.substring(s),a=i.substring(0,s),[o,n,l]=e.extractBracketedInformation(i);return{md5:r,license:a,version:o,isTrial:n,type:l}}getLicenseDetails(t){let i,s,r,a=e.chartsLicenseManager?"BOTH":"GRI
207D";if(eE(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:a};let o=e.getGridReleaseDate(),{md5:n,license:l,version:h,isTrial:d,type:u}=e.extractLicenseComponents(t),c=n===this.md5.md5(l)&&-1===t.indexOf("For_Trialing_ag-Grid_Only"),p=null,g=!1;function m(){let e=new Date;i=p<e,s=void 0}if(c&&(c=!isNaN((p=e.extractExpiry(l)).getTime())))switch(s=o>p,h){case"legacy":case"2":d&&m();break;case"3":eE(u)?c=!1:(r=u,u!==I4["01"]&&u!==I4["0102"]||"BOTH"===a&&"BOTH"!==r?(c=!1,g=!0):d&&m())}return c?{licenseKey:t,valid:c,expiry:e.formatDate(p),expired:s,version:h,isTrial:d,trialExpired:i,incorrectLicenseType:g,currentLicenseType:a,suppliedLicenseType:r}:{licenseKey:t,valid:c,incorrectLicenseType:g,currentLicenseType:a,suppliedLicenseType:r}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!eE(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){let{hostname:e=""}=(this.document.defaultView||window).location;return e}isForceWatermark(){let{pathname:e}=(this.document.defaultView||window).location;return!!e&&-1!==e.indexOf("forceWatermark")}isWebsiteUrl(){return null!==this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)}isLocalhost(){return null!==this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)}static formatDate(e){return e.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]+" "+e.getFullYear()}static getGridReleaseDate(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))}static decode(t){let i,s,r,a,o,n,l,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d="",u=0,c=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<c.length;)a=h.indexOf(c.charAt(u++)),o=h.indexOf(c.charAt(u++)),n=h.indexOf(c.charAt(u++)),l=h.indexOf(c.charAt(u++)),i=a<<2|o>>4,s=(15&o)<<4|n>>2,r=(3&n)<<6|l,d+=String.fromCharCode(i),64!=n&&(d+=String.fromCharCode(s)),64!=l&&(d+=String.fromCharCode(r));return e.utf8_decode(d)}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);s<128?t+=String.fromCharCode(s):(s>127&&s<2048?t+=String.fromCharCode(s>>6|192):(t+=String.fromCharCode(s>>12|224),t+=String.fromCharCode(s>>6&63|128)),t+=String.fromCharCode(63&s|128))}return t}static setChartsLicenseManager(e){this.chartsLicenseManager=e}static setLicenseKey(e){this.licenseKey=e,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(e,!0)}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];let t=e.match(/\[(.*?)\]/g).map(e=>e.replace("[","").replace("]",""));if(!t||0===t.length)return["legacy",!1,void 0];let i=1===t.filter(e=>"TRIAL"===e).length,s=t.filter(e=>0===e.indexOf("v"))[0];return[s?s.replace("v",""):"legacy",i,I4[t.filter(e=>I4[e])[0]]]}centerPadAndOutput(e){let t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,t="*",i=""){console.error(e.padEnd(this.totalMessageLength-i.length,t)+i)}outputInvalidLicenseKey(e,t,i){e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${t}.`," ","*")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*")),this.padAndOutput("* To troubleshoot your license key visit https://ag-grid.com/licensing/."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,t,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${e}.`," ","*"),this.padAndOutput("* Please email [email protected] to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email [email protected] for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,t,i,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i}
207 License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${t}.`," ","*"),this.padAndOutput("* Please contact [email protected] to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};I6.RELEASE_INFORMATION="MTc1NTA3NzEwMDgwOQ==";var I5={selector:"AG-WATERMARK",component:class extends s${constructor(){super(`<div class="ag-watermark">
208                <div data-ref="eLicenseTextRef" class="ag-watermark-text"></div>
209            </div>`),this.eLicenseTextRef=s_}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){let e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}}},I8=class extends tk{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new I6(e$(this.gos)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new I6(null).getLicenseDetails(e)}getWatermarkSelector(){return I5}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){I6.setLicenseKey(e)}static setChartsLicenseManager(e){I6.setChartsLicenseManager(e)}},I7=class extends s${constructor(){super(),this.setTemplate("<div></div>")}init(e){var t;this.params=e,this.cssClassPrefix=null!=(t=this.params.cssClassPrefix)?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;let e=sy(`<span data-ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`),{checked:t,icon:i}=this.params;t?e.appendChild(sq("check",this.gos)):i&&(sI(i)?e.appendChild(i):"string"==typeof i?e.innerHTML=i:ep("menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){let e=sy(`<span data-ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;let e=sy(`<span data-ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){let e=sy(`<span data-ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){let i=this.gos.get("enableRtl")?"smallLeft":"smallRight";iZ(t,!1),e.appendChild(sq(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},I9={version:"32.3.9",moduleName:eh.EnterpriseCoreModule,beans:[I8],userComponents:[{name:"agMenuItem",classImp:I7}]},Ae=class extends s${constructor(e={}){let t,i;super((t=e.cssIdentifier||"default",i=e.direction||"vertical",`
210        <div class="ag-group ag-${t}-group" role="presentation">
211            <div data-ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">
212                <ag-checkbox data-ref="cbGroupEnabled"></ag-checkbox>
213            </div>
214            <div data-ref="eContainer" class="ag-group-container ag-group-container-${i} ag-${t}-group-container"></div>
215        </div>
216    `),[rr]),this.params=e,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1,this.eToolbar=s_,this.cbGroupEnabled=s_,this.eContainer=s_;let{enabled:s,items:r,suppressEnabledCheckbox:a,expanded:o,suppressToggleExpandOnEnableChange:n,useToggle:l}=e;this.cssIdentifier=e.cssIdentifier||"default",this.enabled=null==s||s,this.items=r||[],this.useToggle=null!=l&&l,this.alignItems=e.alignItems||"center",this.expanded=null==o||o,null!=a&&(this.suppressEnabledCheckbox=a),null!=n&&(this.suppressToggleExpandOnEnableChange=n)}postConstruct(){if(this.setupTitleBar(),this.items.length){let e=this.items;this.items=[],this.addItems(e)}let e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);let{onEnableChange:t,onExpandedChange:i,suppressOpenCloseIcons:s}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(null!=s&&s),this.refreshChildDisplay(),ss(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(e=>{this.setEnabled(e,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(e)}),null!=t&&this.onEnableChange(t),null!=i&&this.onExpandedChange(i)}refreshChildDisplay(){var e;ss(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),null==(e=this.eTitleBar)||e.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;let t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(e,t){var i;if(null!=(i=this.eTitleBar)&&i.isSuppressCollapse()&&!this.useToggle)e=!0,t=!0;else if(e=null!=e?e:!this.expanded,this.expanded===e)return this;return this.expanded=e,this.refreshChildDisplay(),ss(this.eContainer,e),t||this.dispatchLocalEvent({type:e?"expanded":"collapsed"}),this}
216addItems(e){e.forEach(e=>this.addItem(e))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){let i=this.eContainer,s=e instanceof s$?e.getGui():e;s.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(i.insertAdjacentElement("afterbegin",s),this.items.unshift(s)):(i.appendChild(s),this.items.push(s))}hideItem(e,t){ss(this.items[t],!e)}getItemIndex(e){let t=e instanceof s$?e.getGui():e;return this.items.indexOf(t)}setTitle(e){var t;return null==(t=this.eTitleBar)||t.setTitle(e),this}addTitleBarWidget(e){var t;return null==(t=this.eTitleBar)||t.addWidget(e),this}addCssClassToTitleBar(e){var t;null==(t=this.eTitleBar)||t.addCssClass(e)}dispatchEnableChangeEvent(e){this.dispatchLocalEvent({type:"enableChange",enabled:e})}setEnabled(e,t,i){if(this.enabled=e,this.refreshDisabledStyles(),i||this.toggleGroupExpand(e),!t){var s;this.cbGroupEnabled.setValue(e),null==(s=this.eToggle)||s.setValue(e)}return this}isEnabled(){return this.enabled}onEnableChange(e){return this.addManagedListeners(this,{enableChange:t=>e(t.enabled)}),this}onExpandedChange(e){return this.addManagedListeners(this,{expanded:()=>e(!0),collapsed:()=>e(!1)}),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){var t;return null==(t=this.eTitleBar)||t.hideOpenCloseIcons(e),this}refreshDisabledStyles(){var e;let t=!this.enabled;this.eContainer.classList.toggle("ag-disabled",t),null==(e=this.eTitleBar)||e.refreshDisabledStyles(this.suppressEnabledCheckbox&&t),this.eContainer.classList.toggle("ag-disabled-group-container",t)}setupTitleBar(){let e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){let e=this.createManagedBean(new Ai(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListeners(e,{expandedChanged:e=>this.toggleGroupExpand(e.expanded)}),e}createToggleTitleBar(){var e;let t=this.createManagedBean(new lD({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:e=>{this.setEnabled(e,!0),this.dispatchEnableChangeEvent(e)}}));return t.addCssClass("ag-group-title-bar"),t.addCssClass(`ag-${null!=(e=this.params.cssIdentifier)?e:"default"}-group-title-bar ag-unselectable`),this.eToggle=t,this.toggleGroupExpand(this.enabled),t}},At="ag-disabled-group-title-bar",Ai=class extends s${constructor(e={}){var t;let i,s;super((i=null!=(t=e.cssIdentifier)?t:"default",s=e.suppressKeyboardNavigation?"presentation":"role",`
217        <div class="ag-group-title-bar ag-${i}-group-title-bar ag-unselectable" role="${s}">
218            <span class="ag-group-title-bar-icon ag-${i}-group-title-bar-icon" data-ref="eGroupOpenedIcon" role="presentation"></span>
219            <span class="ag-group-title-bar-icon ag-${i}-group-title-bar-icon" data-ref="eGroupClosedIcon" role="presentation"></span>
220            <span data-ref="eTitle" class="ag-group-title ag-${i}-group-title"></span>
221        </div>
222    `)),this.suppressOpenCloseIcons=!1,this.suppressKeyboardNavigation=!1,this.eGroupOpenedIcon=s_,this.eGroupClosedIcon=s_,this.eTitle=s_;let{title:r,suppressOpenCloseIcons:a,suppressKeyboardNavigation:o}=e;r&&r.length>0&&(this.title=r),null!=a&&(this.suppressOpenCloseIcons=a),this.suppressKeyboardNavigation=null!=o&&o}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(sZ("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(sZ("columnSelectOpen",this.gos,null)),this.addManagedElementListeners(this.getGui(),{click:()=>this.dispatchExpandChanged(),keydown:e=>{switch(e.key){case s9.ENTER:case s9.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case s9.RIGHT:case s9.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===s9.RIGHT)}}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||iZ(this.getGui(),e)}refreshOpenCloseIcons(e){let t=!this.suppressOpenCloseIcons;ss(this.eGroupOpenedIcon,t&&e),ss(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}
222dispatchExpandChanged(e){this.dispatchLocalEvent({type:"expandedChanged",expanded:e})}setTitle(e){let t=this.getGui(),i=!!e&&e.length>0;e=i?e:void 0,this.eTitle.textContent=null!=e?e:"",ss(t,i),e!==this.title&&(this.title=e);let s=t.classList.contains(At);return this.refreshDisabledStyles(s),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(e){let t=this.getGui();e?(t.classList.add(At),t.removeAttribute("tabindex")):(t.classList.remove(At),"string"!=typeof this.title||this.suppressKeyboardNavigation?t.removeAttribute("tabindex"):t.setAttribute("tabindex","0"))}},As={selector:"AG-GROUP-COMPONENT",component:Ae},Ar=class extends s${constructor(e){super(`
223            <div class="ag-pill" role="option">
224                <span class="ag-pill-text" data-ref="eText"></span>
225                <span class="ag-button ag-pill-button" data-ref="eButton" role="presentation"></span>
226            </div>
227        `),this.config=e,this.eText=s_,this.eButton=s_}postConstruct(){let{config:e,eButton:t}=this,{onKeyDown:i,onButtonClick:s}=e;this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),this.addGuiEventListener("focus",()=>{this.eButton.focus()}),i&&this.addGuiEventListener("keydown",i),s&&this.addManagedElementListeners(t,{click:s})}toggleCloseButtonClass(e,t){this.eButton.classList.toggle(e,t)}setText(e){this.eText.textContent=e}getText(){return this.eText.textContent}},Aa=class extends s${constructor(){super(`
228            <div class="ag-pill-container" role="listbox"></div>
229            `),this.pills=[]}wireBeans(e){this.focusService=e.focusService}init(e){this.params=e,this.refresh()}refresh(){this.clearPills();let{params:e,onPillKeyDown:t}=this,i=e.getValue();if(!Array.isArray(i))return;let s=i.length;for(let r=0;r<s;r++){let a=i[r],o=this.createBean(new Ar({onButtonClick:()=>this.onPillButtonClick(o),onKeyDown:t.bind(this)})),n=o.getGui();iX(n,r+1),iQ(n,s),e.onPillMouseDown&&o.addGuiEventListener("mousedown",e.onPillMouseDown),e.announceItemFocus&&o.addGuiEventListener("focus",e.announceItemFocus),o.setText(a),o.toggleCloseButtonClass("ag-icon-cancel",!0),this.appendChild(n),this.pills.push(o)}}onNavigationKeyDown(e){let{key:t}=e;if(!this.pills.length||t!==s9.LEFT&&t!==s9.RIGHT)return;e.preventDefault();let i=eZ(this.gos),s=this.getGui(),{params:r,focusService:a}=this;if(s.contains(i)){let e=a.findNextFocusableElement(s,!1,t===s9.LEFT);e?e.focus():r.eWrapper&&r.eWrapper.focus()}else{let e=a.findFocusableElements(s);e.length>0&&e[t===s9.RIGHT?0:e.length-1].focus()}}clearPills(){let e=this.getGui();e.contains(eZ(this.gos))&&this.params.eWrapper&&this.params.eWrapper.focus(),sm(e),this.destroyBeans(this.pills),this.pills=[]}onPillButtonClick(e){this.deletePill(e)}onPillKeyDown(e){let t=e.key;if(t!==s9.DELETE&&t!==s9.BACKSPACE)return;e.preventDefault();let i=e$(this.gos),s=this.pills.findIndex(e=>e.getGui().contains(i.activeElement));if(-1===s)return;let r=this.pills[s];r&&this.deletePill(r,s)}deletePill(e,t){let i=e.getText(),s=(this.params.getValue()||[]).filter(e=>e!==i);if(this.params.setValue(s),!s.length&&this.params.eWrapper)this.params.eWrapper.focus();else if(null!=t){let e=this.pills[Math.min(t,this.pills.length-1)];e&&e.getFocusableElement().focus()}}destroy(){this.clearPills(),super.destroy()}},Ao=class extends s${constructor(e){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e}wireBeans(e){this.userComponentFactory=e.userComponentFactory}setState(e){let t="",{params:i}=this;i.valueFormatter&&(t=i.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){let{parsedValue:t}=this;if(this.params.cellRenderer||!eM(t))return;let i=eM(e);if(i){let s=null==t?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){let i=s+e.length,r=ig(t.slice(0,s),!0),a=ig(t.slice(s,i),!0),o=ig(t.slice(i));this.renderValueWithoutRenderer(`${r}<span class="ag-rich-select-row-text-highlight">${a}</span>${o}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateSelected(e){i5(this.getGui().parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}getValue(){return this.value}toggleHighlighted(e){this.addOrRemoveCssClass("ag-rich-select-row-highlighted",e)}populateWithoutRenderer(e,t){let i=e$(this.gos),s=this.getGui(),r=i.createElement("span");r.style.overflow="hidden",r.style.textOverflow="ellipsis";let a=ig(eM(t)?t:e,!0);this.parsedValue=eM(a)?a:null,s.appendChild(r),this.renderValueWithoutRenderer(a),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth}
229)}renderValueWithoutRenderer(e){let t=this.getGui().querySelector("span");t&&(t.innerHTML=eM(e)?e:"&nbsp;")}populateWithRenderer(e,t){let i,s;if(this.params.cellRenderer){var r;let i=null==(r=this.getParentComponent())?void 0:r.getParentComponent();s=this.userComponentFactory.getEditorRendererDetails(this.params,{value:e,valueFormatted:t,getValue:()=>null==i?void 0:i.getValue(),setValue:e=>{null==i||i.setValue(e,!0)},setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})}return s&&(i=s.newAgStackInstance()),i&&sT(i,this.getGui()),!!i&&(i.then(e=>{this.addDestroyFunc(()=>{this.destroyBean(e)})}),!0)}},An=class extends lT{constructor(e){var t;super((t=(null==e?void 0:e.cssIdentifier)||"default",`<div class="ag-virtual-list-viewport ag-${t}-virtual-list-viewport" role="presentation">
230            <div class="ag-virtual-list-container ag-${t}-virtual-list-container" data-ref="eContainer"></div>
231        </div>`)),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=s_,this.awaitStableCallbacks=[];let{cssIdentifier:i="default",ariaRole:s="listbox",listName:r}=e||{};this.cssIdentifier=i,this.ariaRole=s,this.listName=r}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.animationFrameService=e.animationFrameService,this.environment=e.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.setAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(e){e.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}setAriaProperties(){let e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;iV(t,this.ariaRole),ij(t,e)}addResizeObserver(){let e=()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()),t=this.resizeObserverService.observeResize(this.getGui(),e);this.addDestroyFunc(t)}focusInnerElement(e){this.focusRow(e?this.model.getRowCount()-1:0)}onFocusIn(e){let t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=iH(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){switch(e.key){case s9.UP:case s9.DOWN:this.navigate(e.key===s9.UP)&&e.preventDefault();break;case s9.PAGE_HOME:case s9.PAGE_END:case s9.PAGE_UP:case s9.PAGE_DOWN:null!==this.navigateToPage(e.key)&&e.preventDefault()}}onTabKeyDown(e){tR(e),this.forceFocusOutOfContainer(e.shiftKey)}navigate(e){if(null==this.lastFocusedRowIndex)return!1;let t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount())&&(this.focusRow(t),!0)}navigateToPage(e,t="focused"){let i=!1;"focused"===t&&(t=this.getLastFocusedRow(),i=!0);let s=this.model.getRowCount()-1,r=-1;return(e===s9.PAGE_HOME?r=0:e===s9.PAGE_END?r=s:e===s9.PAGE_DOWN?r=Math.min(t+this.pageSize,s):e===s9.PAGE_UP&&(r=Math.max(t-this.pageSize,0)),-1===r)?null:(i?this.focusRow(r):this.ensureIndexVisible(r),r)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;let t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){let t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,i)=>e(t.rowComponent,i))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){let i=this.model.getRowCount();if("number"!=typeof e||e<0||e>=i)return ep("invalid row index for ensureIndexVisible: ",e),!1;let s=e*this.rowHeight,r=s+this.rowHeight,a=this.getGui(),o=a.scrollTop,n=a.offsetHeight,l=t?0:this.rowHeight;return o>s+l?(a.scrollTop=s,!0):o+n<r-l&&(a.scrollTop=r-n,!0)}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(null==this.model||!this.isAlive())return;let t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,this.awaitStable(()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}awaitStable(e){if(this.awaitStableCallbacks.push(e),this.awaitStableCallbacks.length>1)return;let t=this.model.getRowCount();eb(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{let e=this.awaitStableCallbacks;
231this.awaitStableCallbacks=[],e.forEach(e=>e())})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&"function"==typeof this.model.areRowsEqual&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;let t=this.getGui(),i=t.scrollTop,s=i+t.offsetHeight,r=Math.floor(i/this.rowHeight),a=Math.floor(s/this.rowHeight);this.pageSize=Math.floor((s-i)/this.rowHeight),this.ensureRowsRendered(r,a,e)}ensureRowsRendered(e,t,i){this.renderedRows.forEach((i,s)=>{(s<e||s>t)&&s!==this.lastFocusedRowIndex&&this.removeRow(s)}),i&&this.refreshRows();for(let i=e;i<=t;i++)!this.renderedRows.has(i)&&i<this.model.getRowCount()&&this.insertRow(i)}insertRow(e){let t=this.model.getRow(e),i=document.createElement("div");i.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),iV(i,"tree"===this.ariaRole?"treeitem":"option"),iQ(i,this.model.getRowCount()),iX(i,e+1),i.setAttribute("tabindex","-1"),i.style.height=`${this.rowHeight}px`,i.style.top=`${this.rowHeight*e}px`;let s=this.componentCreator(t,i);s.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),i.appendChild(s.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:s,eDiv:i,value:t})}removeRow(e){let t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){let e=this.model.getRowCount();this.renderedRows.forEach((t,i)=>{if(i>=e)this.removeRow(i);else{var s,r;let e=this.model.getRow(i);null!=(s=(r=this.model).areRowsEqual)&&s.call(r,t.value,e)?this.componentUpdater(e,t.rowComponent):this.removeRow(i)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy())}},Al="ag-rich-select-list",Ah="ag-rich-select-row",Ad=class extends An{constructor(e,t,i){super({cssIdentifier:"rich-select"}),this.params=e,this.richSelectWrapper=t,this.getSearchString=i,this.lastRowHovered=-1,this.selectedItems=new Set,this.params=e,this.setComponentCreator(this.createRowComponent.bind(this)),this.setComponentUpdater(()=>{})}postConstruct(){super.postConstruct(),this.createLoadingElement();let{cellRowHeight:e,pickerAriaLabelKey:t,pickerAriaLabelValue:i}=this.params;e&&this.setRowHeight(e);let s=this.getGui(),r=this.getAriaElement();this.addManagedListeners(s,{mousemove:this.onMouseMove.bind(this),mouseout:this.onMouseOut.bind(this),mousedown:this.onMouseDown.bind(this),click:this.onClick.bind(this)}),s.classList.add(Al);let a=`${Al}-${this.getCompId()}`;r.setAttribute("id",a),ij(r,this.localeService.getLocaleTextFunc()(t,i)),i7(this.richSelectWrapper,r)}navigateToPage(e){let t=super.navigateToPage(e,this.lastRowHovered);return null!=t&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightIndex(t)}),t}drawVirtualRows(e){super.drawVirtualRows(e),this.refreshSelectedItems()}highlightFilterMatch(e){this.forEachRenderedRow(t=>{t.highlightString(e)})}onNavigationKeyDown(e,t){this.animationFrameService.requestAnimationFrame(()=>{if(!this.currentList||!this.isAlive())return;let i=this.currentList.length,s=this.lastRowHovered,r=e===s9.DOWN?1:-1,a=Math.min(Math.max(-1===s?0:s+r,0),i-1);this.highlightIndex(a),t()})}selectValue(e){var t,i;if(!this.currentList)return this.eLoading&&this.appendChild(this.eLoading),!1;if(null!=(t=this.eLoading)&&t.offsetParent&&(null==(i=this.eLoading.parentElement)||i.removeChild(this.eLoading)),null==e)return!1;let s=this.getIndicesForValues(e),r=s.length>0;return r&&(this.refresh(),this.ensureIndexVisible(s[0]),this.refresh(!0)),this.selectListItems(Array.isArray(e)?e:[e]),r}selectListItems(e,t=!1){t||this.selectedItems.clear();for(let t=0;t<e.length;t++){let i=e[t];this.selectedItems.has(i)||this.selectedItems.add(i)}this.refreshSelectedItems()}getCurrentList(){return this.currentList}setCurrentList(e){this.currentList=e,this.setModel({getRowCount:()=>e.length,getRow:t=>e[t],areRowsEqual:(e,t)=>e===t})}getSelectedItems(){return this.selectedItems}getLastItemHovered(){return this.currentList[this.lastRowHovered]}highlightIndex(e,t){this.currentList&&(e<0||e>=this.currentList.length?this.lastRowHovered=-1:(this.lastRowHovered=e,this.ensureIndexVisible(e,!t)&&!t&&this.refresh(!0)),this.forEachRenderedRow((t,i)=>{let s=e===i;if(t.toggleHighlighted(s),s){let e=`${Ah}-${t.getCompId()}`;iK(this.richSelectWrapper,e),this.richSelectWrapper.setAttribute("data-active-option",e)}}))}getIndicesForValues(e){let{currentList:t}=this;if(!t||0===t.length||null==e||(Array.isArray(e)||(e=[e]),0===e.length))return[];let i=[];for(let s=0;s<e.length;s++){let r=t.indexOf(e[s]);r>=0&&i.push(r)}return i}toggleListItemSelection(e){this.selectedItems.has(e)?this.selectedItems.delete(e):this.selectedItems.add(e),this.refreshSelectedItems(),this.dispatchValueSelected()}refreshSelectedItems(){this.forEachRenderedRow(e=>{let t=this.selectedItems.has(e.getValue());e.updateSelected(t)})}createLoadingElement(){let e=e$(this.gos),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i}createRowComponent(e,t){let i=new Ao(this.params);t.setAttribute("id",`${Ah}-${i.getCompId()}`),i.setParentComponent(this),this.createBean(i),i.setState(e);let{highlightMatch:s,searchType:r="fuzzy"}=this.params;return s&&"fuzzy"!==r&&i.highlightString(this.getSearchString()),i}getRowForMouseEvent(e){let t=this.getGui().getBoundingClientRect(),i=this.getScrollTop();return Math.floor((e.clientY-t.top+i)/this.getRowHeight())}onMouseMove(e){let t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.highlightIndex(t,!0))}onMouseDown(e){e.preventDefault()}onMouseOut(e){this.getGui().contains(e.relatedTarget)||this.highlightIndex(-1)}onClick(e){let{multiSelect:t}=this.params;if(!this.currentList)return;let i=this.getRowForMouseEvent(e),s=this.currentList[i];t?this.toggleListItemSelection(s):(this.selectListItems([s]),this.dispatchValueSelected())}dispatchValueSelected(){this.dispatchLocalEvent({type:"richSelectListRowSelected",fromEnterKey:!1,value:this.selectedItems})}destroy(){super.destroy(),this.eLoading=void 0}},Au=class extends ah{constructor(e){var t,i;super({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:null!=(t=null==e?void 0:e.template)?t:`
232            <div class="ag-picker-field" role="presentation">
233                <div data-ref="eLabel"></div>
234                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
235                    <span data-ref="eDisplayField" class="ag-picker-field-display"></span>
236                    <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
237                    <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
238                    <span data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></span>
239                </div>
240            </div>`,agComponents:[aC],modalPicker:!1,...e,maxPickerHeight:null!=(i=null==e?void 0:e.maxPickerHeight)?i:"calc(var(--ag-row-height) * 6.5)"}),this.searchString="",this.searchStringCreator=null,this.eInput=s_,this.eDeselect=s_,this.skipWrapperAnnouncement=!1;let{value:s,valueList:r,searchStringCreator:a}=e||{};void 0!==s&&(this.value=s),null!=r&&(this.values=r),a&&(this.searchStringCreator=a)}wireBeans(e){super.wireBeans(e),this.userComponentFactory=e.userComponentFactory,this.ariaAnnouncementService=e.ariaAnnouncementService}postConstruct(){super.postConstruct(),this.createListComponent(),this.eDeselect.appendChild(sq("cancel",this.gos));let{allowTyping:e,placeholder:t,suppressDeselectAll:i}=this.config;this.eDeselect.classList.add("ag-hidden"),e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.setupAriaProperties();let{searchDebounceDelay:s=300}=this.config;this.clearSearchString=ey(this.clearSearchString,s),this.renderSelectedValue(),e&&this.eInput.onValueChange(e=>this.searchTextFromString(e)),this.addManagedElementListeners(this.eWrapper,{focus:this.onWrapperFocus.bind(this)}),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)}),i||this.addManagedElementListeners(this.eDeselect,{mousedown:this.onDeselectAllMouseDown.bind(this),click:this.onDeselectAllClick.bind(this)})}setupAriaProperties(){let{eWrapper:e,gos:t,localeService:i}=this;e.tabIndex=t.get("tabIndex");let s=i.getLocaleTextFunc();this.ariaDeleteSelection=s("ariaLabelRichSelectDeleteSelection","Press DELETE to deselect item"),this.ariaDeselectAllItems=s("ariaLabelRichSelectDeselectAllItems","Press DELETE to deselect all items"),this.ariaToggleSelection=s("ariaLabelRichSelectToggleSelection","Press SPACE to toggle selection")}createListComponent(){this.listComponent=this.createBean(new Ad(this.config,this.eWrapper,()=>this.searchString)),this.listComponent.setParentComponent(this),this.addManagedListeners(this.listComponent,{richSelectListRowSelected:e=>{this.onListValueSelected(e.value,e.fromEnterKey)}})}renderSelectedValue(){let e,t,{value:i,eDisplayField:s,config:r}=this,{allowTyping:a,cellRenderer:o,initialInputValue:n,multiSelect:l,suppressDeselectAll:h,suppressMultiSelectPillRenderer:d}=r,u=this.config.valueFormatter?this.config.valueFormatter(i):i;if(a)return void this.eInput.setValue(null!=n?n:u);if(l&&!h){let e=null==i||Array.isArray(i)&&0===i.length;this.eDeselect.classList.toggle("ag-hidden",e)}if(l&&!d)return void this.createOrUpdatePillContainer(s);if(o&&(e=this.userComponentFactory.getEditorRendererDetails(r,{value:i,valueFormatted:u,getValue:()=>this.getValue(),setValue:e=>{this.setValue(e,!0)},setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})),e&&(t=e.newAgStackInstance()),t)sm(s),sT(t,s),t.then(e=>{this.addDestroyFunc(()=>this.destroyBean(e))});else{if(eM(this.value))s.innerText=u,s.classList.remove("ag-display-as-placeholder");else{let{placeholder:e}=r;eM(e)?(s.innerHTML=`${ig(e)}`,s.classList.add("ag-display-as-placeholder")):sm(s)}this.setTooltip({newTooltipText:null!=u?u:null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}createPickerComponent(){let{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){let{valueList:t,refresh:i}=e;this.listComponent&&this.listComponent.getCurrentList()!==t&&(this.listComponent.setCurrentList(t),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&(this.listComponent.selectValue(this.value)||this.listComponent.refresh())
240),this.alignPickerToComponent()))}showPicker(){super.showPicker();let{listComponent:e,value:t}=this;if(!e)return;let i=null;null!=this.value&&(e.selectValue(this.value),i=e.getIndicesForValues(Array.isArray(t)?t:[t])[0]),null!=i?e.highlightIndex(i):e.refresh(),this.displayOrHidePicker()}beforeHidePicker(){super.beforeHidePicker()}createOrUpdatePillContainer(e){if(!this.pillContainer){let t=this.pillContainer=this.createBean(new Aa);this.addDestroyFunc(()=>{this.destroyBean(this.pillContainer),this.pillContainer=null}),sm(e),e.appendChild(t.getGui()),t.init({eWrapper:this.eWrapper,onPillMouseDown:e=>{e.stopImmediatePropagation()},announceItemFocus:()=>{this.announceAriaValue(this.ariaDeleteSelection)},getValue:()=>this.getValue(),setValue:e=>this.setValue(e,!0)})}this.doWhileBlockingAnnouncement(()=>{var e;return null==(e=this.pillContainer)?void 0:e.refresh()})}doWhileBlockingAnnouncement(e){this.skipWrapperAnnouncement=!0,e(),this.skipWrapperAnnouncement=!1}onWrapperFocus(){let{eInput:e,config:t}=this,{allowTyping:i,multiSelect:s,suppressDeselectAll:r}=t;if(i){let t=e.getFocusableElement();t.focus(),t.select()}else!s||r||this.skipWrapperAnnouncement||this.announceAriaValue(this.ariaDeselectAllItems)}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}onDeselectAllMouseDown(e){e.stopImmediatePropagation()}onDeselectAllClick(){this.setValue([],!0)}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===s9.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!am(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){null==e&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){let t,{valueFormatter:i=e=>e}=this.config;return"number"==typeof e[0]||"string"==typeof e[0]?t=e.map(e=>i(e)):"object"==typeof e[0]&&this.searchStringCreator&&(t=this.searchStringCreator(e)),t}filterListModel(e){let{filterList:t}=this.config;t&&this.setValueList({valueList:e,refresh:!0})}runSearch(){var e,t,i,s,r;if(!this.listComponent)return;let{values:a}=this,o=this.buildSearchStrings(a);if(!o)return void this.listComponent.highlightIndex(-1);let{suggestions:n,filteredValues:l}=this.getSuggestionsAndFilteredValues(this.searchString,o),{filterList:h,highlightMatch:d,searchType:u="fuzzy"}=this.config,c=l.length,p=!!(h&&""!==this.searchString);if(this.filterListModel(p?l:a),n.length){let t=p?0:o.indexOf(n[0]);null==(e=this.listComponent)||e.highlightIndex(t)}else if(null==(t=this.listComponent)||t.highlightIndex(-1),!p||c)null==(i=this.listComponent)||i.ensureIndexVisible(0);else if(p){this.getAriaElement().removeAttribute("data-active-option");let e=null==(s=this.listComponent)?void 0:s.getAriaElement();e&&iK(e,null)}d&&"fuzzy"!==u&&(null==(r=this.listComponent)||r.highlightFilterMatch(this.searchString)),this.displayOrHidePicker()}getSuggestionsAndFilteredValues(e,t){let i=[],s=[];if(!e.length)return{suggestions:i,filteredValues:s};let{searchType:r="fuzzy",filterList:a}=this.config;if("fuzzy"===r){let r=rp({inputValue:e,allSuggestions:t,hideIrrelevant:!0,addSequentialWeight:!0});i=r.values;let o=r.indices;if(a&&o.length)for(let e=0;e<o.length;e++)s.push(this.values[o[e]])}else i=t.filter((e,t)=>{let i=e.toLocaleLowerCase(),o=this.searchString.toLocaleLowerCase(),n="match"===r?i.startsWith(o):-1!==i.indexOf(o);return a&&n&&s.push(this.values[t]),n});return{suggestions:i,filteredValues:s}}displayOrHidePicker(){if(!this.listComponent)return;let e=this.listComponent.getGui(),t=this.listComponent.getCurrentList(),i=!!t&&0===t.length;e.classList.toggle("ag-hidden",i)}clearSearchString(){this.searchString=""}setValue(e,t,i,s){if(this.value===e)return this;let r=Array.isArray(e);if(null!=e){var a,o;if(!r){let t=null==(a=this.listComponent)?void 0:a.getCurrentList();if(-1===(t?t.indexOf(e):-1))return this}i||null==(o=this.listComponent)||o.selectValue(e)}return super.setValue(e,t),s||this.renderSelectedValue(),this}onNavigationKeyDown(e,t,i){var s;e.preventDefault();let r=t===s9.DOWN;!this.isPickerDisplayed&&r?this.showPicker():null==(s=this.listComponent)||s.onNavigationKeyDown(t,i)}
240onEnterKeyDown(e){var t;if(this.isPickerDisplayed&&(e.preventDefault(),null!=(t=this.listComponent)&&t.getCurrentList())){let e=this.listComponent.getLastItemHovered();this.config.multiSelect||!e?this.dispatchPickerEventAndHidePicker(this.value,!0):this.onListValueSelected(new Set([e]),!0)}}onDeleteKeyDown(e){let{eWrapper:t,gos:i}=this;eZ(i)===t&&(e.preventDefault(),this.setValue([],!0))}onTabKeyDown(){let{config:e,isPickerDisplayed:t,listComponent:i}=this,{multiSelect:s}=e;if(t&&i){if(s){let e=this.getValueFromSet(i.getSelectedItems());e&&this.setValue(e,!1,!0,!0)}else this.setValue(i.getLastItemHovered(),!1,!0);this.hidePicker()}}getValueFromSet(e){let{multiSelect:t}=this.config,i=null;for(let s of e){if(1===e.size&&!t){i=s;break}i||(i=[]),i.push(s)}return Array.isArray(i)&&i.sort(),i}onListValueSelected(e,t){let i=this.getValueFromSet(e);this.setValue(i,!1,!0),this.config.multiSelect||this.dispatchPickerEventAndHidePicker(i,t)}dispatchPickerEventAndHidePicker(e,t){this.dispatchLocalEvent({type:"fieldPickerValueSelected",fromEnterKey:t,value:e}),this.hidePicker()}getFocusableElement(){let{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){let{key:t}=e,{isPickerDisplayed:i,config:s,listComponent:r,pickerComponent:a}=this,{allowTyping:o,multiSelect:n,suppressDeselectAll:l}=s;switch(t){case s9.LEFT:case s9.RIGHT:if((!o||this.pillContainer)&&(e.preventDefault(),this.pillContainer)){var h;null==(h=this.listComponent)||h.highlightIndex(-1),this.pillContainer.onNavigationKeyDown(e)}break;case s9.PAGE_HOME:case s9.PAGE_END:if(o){e.preventDefault();let i=this.eInput.getInputElement(),s=t===s9.PAGE_HOME?0:i.value.length;i.setSelectionRange(s,s);break}case s9.PAGE_UP:case s9.PAGE_DOWN:e.preventDefault(),a&&(null==r||r.navigateToPage(t));break;case s9.DOWN:case s9.UP:this.onNavigationKeyDown(e,t,()=>{n&&(this.doWhileBlockingAnnouncement(()=>this.eWrapper.focus()),this.announceAriaValue(this.ariaToggleSelection))});break;case s9.ESCAPE:i&&(sC(this.listComponent.getGui())&&(e.preventDefault(),tR(e)),this.hidePicker());break;case s9.ENTER:this.onEnterKeyDown(e);break;case s9.SPACE:if(i&&n&&r){e.preventDefault();let t=r.getLastItemHovered();t&&r.toggleListItemSelection(t)}break;case s9.TAB:this.onTabKeyDown();break;case s9.DELETE:n&&!l&&this.onDeleteKeyDown(e);break;default:o||this.buildSearchStringFromKeyboardEvent(e)}}announceAriaValue(e){this.ariaAnnouncementService.announceValue(e,"richSelect")}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},Ac=class extends s${constructor(e,t,i,s,r){super(),this.dragSourceDropTarget=e,this.ghost=t,this.horizontal=i,this.template=s,this.agComponents=r,this.eText=s_,this.eDragHandle=s_,this.eButton=s_}wireBeans(e){this.dragAndDropService=e.dragAndDropService}postConstruct(){var e;this.setTemplate(null!=(e=this.template)?e:`
241            <span role="option">
242              <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
243              <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
244              <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
245            </span>`,this.agComponents);let t=this.getGui();this.addElementClasses(t),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(sq("columnDrag",this.gos)),this.eButton.appendChild(sq("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){let e=this.localeService.getLocaleTextFunc(),t=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(t,e),ij(this.getGui(),t.join(". "))}addAdditionalAriaInstructions(e,t){if(this.isRemovable()){let i=t("ariaDropZoneColumnComponentDescription","Press DELETE to remove");e.push(i)}}setupTooltip(){let e=()=>{let e=this.getTooltip();this.setTooltip({newTooltipText:e})};e(),this.addManagedEventListeners({newColumnsLoaded:e})}getDragSourceId(){}getDefaultIconName(){return"notAllowed"}addDragSource(){let{dragAndDropService:e,eDragHandle:t}=this,i=this.createGetDragItem(),s=this.getDefaultIconName(),r={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:t,getDefaultIconName:()=>s,getDragItem:i,dragItemName:this.getDisplayName()};e.addDragSource(r,!0),this.addDestroyFunc(()=>e.removeDragSource(r))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){ss(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();let e={type:"columnRemove"};this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addManagedElementListeners(this.eButton,{click:t=>{this.dispatchLocalEvent(e),t.stopPropagation()}});let t=new sJ(this.eButton);this.addManagedListeners(t,{tap:()=>this.dispatchLocalEvent(e)}),this.addDestroyFunc(t.destroy.bind(t))}onKeyDown(e){e.key===s9.DELETE&&this.isRemovable()&&(e.preventDefault(),this.dispatchLocalEvent({type:"columnRemove"}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){let e=ig(this.getDisplayValue());this.eText.innerHTML=e}
245addElementClasses(e,t){t=t?`-${t}`:"";let i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop-cell${t}`,`ag-column-drop-${i}-cell${t}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}},Ap=class extends s${constructor(e){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=e,this.state="notDragging",this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),iV(this.ePillDropList,"listbox")}wireBeans(e){this.focusService=e.focusService,this.dragAndDropService=e.dragAndDropService}isHorizontal(){return this.horizontal}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0}),this.resizeEnabled=e}isSourceEventFromTarget(e){let{dropZoneTarget:t,dragSource:i}=e;return t.contains(i.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(e=>e()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,sm(this.getGui()),sm(this.ePillDropList)}init(e){this.params=null!=e?e:{},this.createManagedBean(new ai(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.onKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new ae(this.getGui()),this.createManagedBean(this.positionableFeature),this.refreshGui(),ij(this.ePillDropList,this.getAriaLabel())}onTabKeyDown(e){let t=this.focusService.findFocusableElements(this.getFocusableElement(),null,!0),i=t.length;if(0===i)return;let{shiftKey:s}=e,r=eZ(this.gos),a=r===t[0],o=r===tp(t);1===i||a&&s||o&&!s||t[s?0:i-1].focus()}onKeyDown(e){let{key:t}=e,i=!this.horizontal,s=t===s9.DOWN,r=t===s9.UP;if(!i){let e=this.gos.get("enableRtl");s=!e&&t===s9.RIGHT||e&&t===s9.LEFT,r=!e&&t===s9.LEFT||e&&t===s9.RIGHT}if(!s&&!r)return;let a=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,r);a&&(e.preventDefault(),a.focus())}addElementClasses(e,t){t=t?`-${t}`:"";let i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop${t}`,`ag-column-drop-${i}${t}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),onDragCancel:this.onDragCancel.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(e){let t=this.getNewInsertIndex(e);if(t<0)return!1;let i=Math.max(this.minimumAllowedNewInsertIndex(),t),s=i!==this.insertIndex;return s&&(this.insertIndex=i),s}getNewInsertIndex(e){let t=e.event,i=this.horizontal?t.clientX:t.clientY,s=this.childPillComponents.map(e=>e.getGui().getBoundingClientRect()),r=s.findIndex(e=>this.horizontal?e.right>i&&e.left<i:e.top<i&&e.bottom>i);if(-1===r){let e=this.gos.get("enableRtl");return s.every(e=>i>(this.horizontal?e.right:e.bottom))?e&&this.horizontal?0:this.childPillComponents.length:s.every(e=>i<(this.horizontal?e.left:e.top))?e&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=r?r+1:r}checkDragStartedBySelf(e){"notDragging"===this.state&&(this.state="rearrangeItems",this.potentialDndItems=this.getItems(e.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(e),this.refreshGui())}onDragging(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()}handleDragEnterEnd(e){}onDragEnter(e){let t=this.getItems(e.dragSource.getDragItem());this.state="newItemsIn";let i=t.filter(t=>this.isItemDroppable(t,e)),s=i.every(e=>-1!==this.childPillComponents.map(e=>e.getItem()).indexOf(e));if(0!==i.length){if(this.potentialDndItems=i,s){this.state="notDragging";return}this.handleDragEnterEnd(e),this.checkInsertIndex(e),this.refreshGui()}}isPotentialDndItems(){return tc(this.potentialDndItems)}handleDragLeaveEnd(e){}onDragLeave(e){if("rearrangeItems"===this.state){let t=this.getItems(e.dragSource.getDragItem());this.removeItems(t)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(e),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}onDragCancel(e){this.isPotentialDndItems()&&("newItemsIn"===this.state&&this.handleDragLeaveEnd(e),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}onDragStop(){this.isPotentialDndItems()&&("newItemsIn"===this.state?this.addItems(this.potentialDndItems):this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}removeItems(e){let t=this.getExistingItems().filter(t=>!tS(e,t));this.updateItems(t)}addItems(e){if(!e)return;let t=this.getExistingItems().slice(),i=e.filter(e=>0>t.indexOf(e));tw(t,i,this.insertIndex),this.updateItems(t)}addItem(e){this.insertIndex=this.getExistingItems().length,this.addItems([e]),this.refreshGui()}rearrangeItems(e){let t=this.getNonGhostItems().slice();return tw(t,e,this.insertIndex),!tg(t,this.getExistingItems())&&(this.updateItems(t),!0)}refreshGui(){let e=this.ePillDropList.scrollTop,t=this.resizeEnabled,i=this.getFocusedItem(),s=this.focusService.findNextFocusableElement();s||(s=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=e),t&&this.toggleResizable(t),this.focusService.isKeyboardMode()&&this.restoreFocus(i,s)}getFocusedItem(){let e=this.getGui(),t=eZ(this.gos);return e.contains(t)?Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t):-1}restoreFocus(e,t){let i=Array.from(this.getGui().querySelectorAll(".ag-column-drop-cell"));if(-1===e)return;
2450===i.length&&t.focus();let s=Math.min(i.length-1,e),r=i[s];r&&r.focus()}focusList(e){let t=e?this.childPillComponents.length-1:0;this.restoreFocus(t,this.getFocusableElement())}getNonGhostItems(){let e=this.getExistingItems();return this.isPotentialDndItems()?e.filter(e=>!tS(this.potentialDndItems,e)):e}addItemsToGui(){let e=this.getNonGhostItems().map(e=>this.createItemComponent(e,!1));if(this.isPotentialDndItems()){let t=this.potentialDndItems.map(e=>this.createItemComponent(e,!0));this.insertIndex>=e.length?e.push(...t):e.splice(this.insertIndex,0,...t)}this.appendChild(this.ePillDropList),e.forEach((e,t)=>{t>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(e.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((e,t)=>{let i=e.getGui();iX(i,t+1),iQ(i,this.childPillComponents.length)})}createItemComponent(e,t){let i=this.createPillComponent(e,this.dropTarget,t,this.horizontal);return i.addEventListener("columnRemove",this.removeItems.bind(this,[e])),this.createBean(i),this.guiDestroyFunctions.push(()=>this.destroyBean(i)),t||this.childPillComponents.push(i),i}addIconAndTitleToGui(){let{title:e,icon:t}=this.params;if(!e||!t)return;let i=document.createElement("div");if(iY(i,!0),this.addElementClasses(i,"title-bar"),this.addElementClasses(t,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),i.appendChild(t),!this.horizontal){let t=document.createElement("span");this.addElementClasses(t,"title"),t.innerHTML=e,i.appendChild(t)}this.appendChild(i)}isExistingItemsEmpty(){return 0===this.getExistingItems().length}addEmptyMessageToGui(){let{emptyMessage:e}=this.params;if(!e||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;let t=document.createElement("span");t.innerHTML=e,this.addElementClasses(t,"empty-message"),this.ePillDropList.appendChild(t)}addArrow(e){if(this.horizontal){let t=sq(this.gos.get("enableRtl")?"smallLeft":"smallRight",this.gos);this.addElementClasses(t,"cell-separator"),e.appendChild(t)}}},Ag=class e extends s${constructor(e){let t;super((t=e.cssIdentifier||"default",`<div class="ag-panel ag-${t}-panel" tabindex="-1">
246        <div data-ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">
247            <span data-ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>
248            <div data-ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>
249        </div>
250        <div data-ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>
251    </div>`)),this.config=e,this.closable=!0,this.eContentWrapper=s_,this.eTitleBar=s_,this.eTitleBarButtons=s_,this.eTitle=s_}postConstruct(){let{component:e,closable:t,hideTitleBar:i,title:s,minWidth:r=250,width:a,minHeight:o=250,height:n,centered:l,popup:h,x:d,y:u}=this.config;this.positionableFeature=new ae(this.getGui(),{minWidth:r,width:a,minHeight:o,height:n,centered:l,x:d,y:u,popup:h,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);let c=this.getGui();e&&this.setBodyComponent(e),i?ss(this.eTitleBar,!1):(s&&this.setTitle(s),this.setClosable(null!=t?t:this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:e=>{if(c.contains(e.relatedTarget)||c.contains(eZ(this.gos))||this.eTitleBarButtons.contains(e.target))return void e.preventDefault();let t=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");t&&t.focus()}}),h&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){let e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(t){if(t!==this.closable&&(this.closable=t),t){let t=this.closeButtonComp=new s$(e.CLOSE_BTN_TEMPLATE);this.createBean(t);
251let i=t.getGui(),s=sq("close",this.gos);s.classList.add("ag-panel-title-bar-button-icon"),i.appendChild(s),this.addTitleBarButton(t),t.addManagedElementListeners(i,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){let e=this.closeButtonComp.getGui();e.parentElement.removeChild(e),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){let i=this.eTitleBarButtons,s=i.children,r=s.length;null==t&&(t=r),t=Math.max(0,Math.min(t,r)),e.addCssClass("ag-panel-title-bar-button");let a=e.getGui();0===t?i.insertAdjacentElement("afterbegin",a):t===r?i.insertAdjacentElement("beforeend",a):s[t-1].insertAdjacentElement("afterend",a),e.setParentComponent(this)}getBodyHeight(){return sl(this.eContentWrapper)}getBodyWidth(){return sh(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));let e=this.getGui();e&&sC(e)&&this.close(),super.destroy()}};Ag.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';var Am=Ag,Av=class extends Am{constructor(e){super({...e,popup:!0}),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService}postConstruct(){let e=this.getGui(),{movable:t,resizable:i,maximizable:s,modal:r,postProcessPopupParams:a}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),a){let{type:t,eventSource:i,column:s,mouseEvent:r,rowNode:o}=a;this.popupService.callPostProcessPopup(t,e,i,r,s,o)}if(this.tabGuardFeature=this.createManagedBean(new lR(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{this.popupService.bringPopupToFront(e)},onTabKeyDown:t=>{if(r)return;let i=t.shiftKey,s=this.focusService.findNextFocusableElement(e,!1,i);(!s||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(s))&&this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault()}}),t&&this.setMovable(t),s&&this.setMaximizable(s),i&&this.setResizable(i),!this.config.modal){let{focusService:e}=this;e.addFocusableContainer(this),this.addDestroyFunc(()=>e.removeFocusableContainer(this))}}setAllowFocus(e){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(e)}renderComponent(){let e=this.getGui(),{alwaysOnTop:t,modal:i,title:s,afterGuiAttached:r}=this.config,a=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:s||a("ariaLabelDialog","Dialog"),afterGuiAttached:r});o&&(this.close=o.hideFunc)}onClosed(e){var t,i;this.destroy(),null==(t=(i=this.config).closedCallback)||t.call(i,e)}toggleMaximize(){let e=this.positionableFeature.getPosition();if(this.isMaximized){let{x:e,y:t,width:i,height:s}=this.lastPosition;this.setWidth(i),this.setHeight(s),this.positionableFeature.offsetElement(e,t)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){ss(this.maximizeIcon,!this.isMaximized),ss(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}let t=this.eTitleBar;if(!t||e===this.isMaximizable)return;let i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedElementListeners(i.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(i,0),this.maximizeListeners.push(...this.addManagedElementListeners(t,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){let e=this.maximizeButtonComp=this.createBean(new s$('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=sq("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=sq("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}},Af=class extends lT{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=null!=t?t:{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){let t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case s9.UP:case s9.RIGHT:case s9.DOWN:case s9.LEFT:e.preventDefault(),this.handleNavKey(e.ke
251y);break;case s9.ESCAPE:this.closeIfIsChild()&&tR(e)}}handleFocusIn(e){var t;let i=e.relatedTarget;!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(i)&&(this.getGui().contains(i)||null!=(t=this.activeMenuItem)&&null!=(t=t.getSubMenuGui())&&t.contains(i))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){var t;let i=e.relatedTarget;!(!this.activeMenuItem||this.getGui().contains(i)||null!=(t=this.activeMenuItem.getSubMenuGui())&&t.contains(i))&&(this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate())}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){null!=e&&rm.all(e.map(e=>"separator"===e?rm.resolve({eGui:this.createSeparator()}):"string"==typeof e?(ep(`unrecognised menu item ${e}`),rm.resolve({eGui:null})):this.addItem(e))).then(e=>{(null!=e?e:[]).forEach(e=>{null!=e&&e.eGui&&(this.appendChild(e.eGui),e.comp&&this.menuItems.push(e.comp))})})}addItem(e){let t=this.createManagedBean(new Ay);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(e=>e.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListeners(t,{closeMenu:e=>{this.dispatchLocalEvent(e)},menuItemActivated:e=>{this.activeMenuItem&&this.activeMenuItem!==e.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=e.menuItem}}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){let e=this.menuItems.filter(e=>!e.isDisabled())[0];e&&e.activate()}createSeparator(){return sy(`
252            <div class="ag-menu-separator" aria-hidden="true">
253                <div class="ag-menu-separator-part"></div>
254                <div class="ag-menu-separator-part"></div>
255                <div class="ag-menu-separator-part"></div>
256                <div class="ag-menu-separator-part"></div>
257            </div>`)}handleNavKey(e){switch(e){case s9.UP:case s9.DOWN:{let t=this.findNextItem(e===s9.
257UP);t&&t!==this.activeMenuItem&&t.activate();return}}e===(this.gos.get("enableRtl")?s9.RIGHT:s9.LEFT)?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){let t=this.getParentComponent();return!!t&&t instanceof Ay&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0)}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){let t,i=this.menuItems.filter(e=>!e.isDisabled());if(!i.length)return;if(!this.activeMenuItem)return e?tp(i):i[0];e&&i.reverse();let s=!1;for(let e=0;e<i.length;e++){let r=i[e];if(!s){r===this.activeMenuItem&&(s=!0);continue}t=r;break}return s&&!t?i[0]:t||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},AC=class extends lT{constructor(e){super(),this.setTemplateFromElement(e.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===s9.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){let e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}},Ay=class extends tk{constructor(){super(...arguments),this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}wireBeans(e){this.popupService=e.popupService,this.userComponentFactory=e.userComponentFactory}init(e){var t,i;let{menuItemDef:s,isAnotherSubMenuOpen:r,level:a,childComponent:o,contextParams:n}=e;return this.params=e.menuItemDef,this.level=a,this.isAnotherSubMenuOpen=r,this.childComponent=o,this.contextParams=n,this.cssClassPrefix=null!=(t=null==(i=this.params.menuItemParams)?void 0:i.cssClassPrefix)?t:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,{...s,level:a,isAnotherSubMenuOpen:r,openSubMenu:e=>this.openSubMenu(e),closeSubMenu:()=>this.closeSubMenu(),closeMenu:e=>this.closeMenu(e),updateTooltip:(e,t)=>this.refreshTooltip(e,t),onItemActivated:()=>this.onItemActivated()}).newAgStackInstance().then(e=>{var t;this.menuItemComp=e;let i=null==(t=e.configureDefaults)?void 0:t.call(e);i&&this.configureDefaults(!0===i?void 0:i)})}addListeners(e,t){null!=t&&t.suppressClick||this.addManagedElementListeners(e,{click:e=>this.onItemSelected(e)}),null!=t&&t.suppressKeyboardSelect||this.addManagedElementListeners(e,{keydown:e=>{(e.key===s9.ENTER||e.key===s9.SPACE)&&(e.preventDefault(),this.onItemSelected(e))}}),null!=t&&t.suppressMouseDown||this.addManagedElementListeners(e,{mousedown:e=>{e.stopPropagation(),e.preventDefault()}}),null!=t&&t.suppressMouseOver||this.addManagedElementListeners(e,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1,t){var i,s;let r;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;let a=sy('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=a;let o=()=>{this.subMenuIsOpening=!1};if(this.childComponent){let e=this.createBean(new AC(this.childComponent));e.setParentComponent(this);let t=e.getGui(),i="mouseenter",s=()=>this.cancelDeactivate();t.addEventListener(i,s),r=()=>t.removeEventListener(i,s),a.appendChild(t),this.childComponent.afterGuiAttached&&(o=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){let t=this.createBean(new Af(this.level+1,this.contextParams));t.setParentComponent(this),t.addMenuItems(this.params.subMenu),a.appendChild(t.getGui()),this.addManagedListeners(t,{closeMenu:e=>this.dispatchLocalEvent(e)}),t.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),r=()=>this.destroyBean(t),e&&(o=()=>{t.activateFirstItem(),this.subMenuIsOpening=!1})}let{popupService:n}=this,l=()=>{let e=this.eGui;n.positionPopupForMenu({eventSource:e,ePopup:a});let{column:i,node:s}=this.contextParams;n.callPostProcessPopup("subMenu",a,e,t instanceof MouseEvent?t:void 0,i,s)},h=this.localeService.getLocaleTextFunc(),d=n.addPopup({modal:!0,eChild:a,positionCallback:l,anchorToElement:this.eGui,ariaLabel:h("ariaLabelSubMenu","SubMenu"),afterGuiAttached:o});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{var e,t;d&&d.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),r(),null==(e=(t=this.menuItemComp).setExpanded)||e.call(t,!1),this.eSubMenuGui=void 0},null==(i=(s=this.menuItemComp).setExpanded)||i.call(s,!0)}setAriaExpanded(e){this.suppressAria||iZ(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e){var t,i;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),null==(t=(i=this.menuItemComp).setActive)||t.call(i,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){var e,t;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),null==(e=(t=this.menuItemComp).setActive)||e.call(t,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){var t,i;null==(t=(i=this.menuItemComp).select)||t.call(i),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams({...this.contextParams}))):this.openSubMenu(e&&"keydown"===e.type,e),this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect||this.closeMenu(e)}closeMenu(e){let t={type:"closeMenu"};e&&(e instanceof MouseEvent?t.mouseEvent=e:t.keyboardEvent=e),this.dispatchLocalEvent(t)}onItemActivated(){this.dispatchLocalEvent({type:"menuItemActivated",menuItem:this})}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){var t,i,s;if(!this.menuItemComp)return void setTimeout(()=>this.configureDefaults(e));let r=this.menuItemComp.getGui(),a=null==(t=(i=this.menuItemComp).getRootElement)?void 0:t.call(i);a&&(null!=e&&e.suppressRootStyles||r.classList.add("ag-menu-option-custom"),r=a),this.eGui=r,this.suppressRootStyles=!!(null!=e&&e.suppressRootStyles),!this.suppressRootStyles&&(r.classList.add(this.cssClassPrefix),null==(s=this.params.cssClasse
257s)||s.forEach(e=>r.classList.add(e)),this.params.disabled&&r.classList.add(`${this.cssClassPrefix}-disabled`)),null!=e&&e.suppressTooltip||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!(null!=e&&e.suppressAria),!this.suppressAria&&(iV(r,"treeitem"),i_(r,this.level+1),this.params.disabled&&i$(r,!0)),null!=e&&e.suppressTabIndex||r.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(r,e),this.suppressFocus=!!(null!=e&&e.suppressFocus)}refreshTooltip(e,t){this.tooltip=e,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new sW({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t})))}destroy(){var e,t;this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),null==(e=this.menuItemComp)||null==(t=e.destroy)||t.call(e),super.destroy()}},Aw="ag-list-item-hovered",Ab=class extends tk{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,this.currentDragValue=null,this.lastHoveredListItem=null}wireBeans(e){this.dragAndDropService=e.dragAndDropService}postConstruct(){this.addManagedListeners(this.params.eventSource,{[this.params.listItemDragStartEvent]:this.listItemDragStart.bind(this),[this.params.listItemDragEndEvent]:this.listItemDragEnd.bind(this)}),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){this.dragAndDropService.addDropTarget({isInterestedIn:e=>e===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:e=>this.onDragging(e),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave(),onDragCancel:()=>this.onDragCancel()})}createAutoScrollService(){let e=this.virtualList.getGui();this.autoScrollService=new rK({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;let t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;let s=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,se(s,Aw),se(s,`ag-item-highlight-${t.position}`))}getListDragItem(e){let t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),s=this.virtualList.getRowHeight(),r=this.virtualList.getScrollTop(),a=Math.max(0,(e.y-i+r)/s),o=this.params.getNumRows(this.comp)-1,n=0|Math.min(o,a);return{rowIndex:n,position:Math.round(a)>a||a>o?"bottom":"top",component:this.virtualList.getComponentAt(n)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties())}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${Aw}`).forEach(e=>{[Aw,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(t=>{e.classList.remove(t)})}),this.lastHoveredListItem=null}},AS=class extends lT{constructor(e){var t;super((t=e.cssClass,`<div class="ag-tabs ${t}">
258        <div data-ref="eHeader"></div>
259        <div data-ref="eBody" role="presentation" class="ag-tabs-body ${t?`${t}-body`:""}"></div>
260    </div>`)),this.eHeader=s_,this.eBody=s_,this.items=[],this.tabbedItemScrollMap=new Map,this.params=e}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>{var e,t;return null==(e=this.activeItem)||null==(e=e.tabbedItem)||null==(t=e.afterDetachedCallback)?void 0:t.call(e)})}setupHeader(){let{enableCloseButton:e,cssClass:t}=this.params,i=(e,i)=>{e.classList.add(`ag-tabs-${i}`),t&&e.classList.add(`${t}-${i}`)};e?(this.setupCloseButton(i),this.eTabHeader=e$(this.gos).createElement("div"),i(this.eHeader,"header-wrapper"),iV(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,iV(this.eTabHeader,"tablist"),i(this.eTabHeader,"header")}setupCloseButton(e){let t=e$(this.gos),i=t.createElement("button");e(i,"close-button");let s=sq("close",this.gos,void 0,!0);ij(i,this.params.closeButtonAriaLabel),i.appendChild(s),this.addManagedElementListeners(i,{click:()=>{var e,t;return null==(e=(t=this.params).onCloseClicked)?void 0:e.call(t)}});let r=t.createElement("div");e(r,"close-button-wrapper"),iV(r,"presentation"),r.appendChild(i),this.eHeader.appendChild(r),this.eCloseButton=i}
260handleKeyDown(e){switch(e.key){case s9.RIGHT:case s9.LEFT:{if(!this.eTabHeader.contains(eZ(this.gos)))return;let t=e.key===s9.RIGHT,i=this.gos.get("enableRtl"),s=this.items.indexOf(this.activeItem),r=t!==i?Math.min(s+1,this.items.length-1):Math.max(s-1,0);if(s===r)return;e.preventDefault();let a=this.items[r];this.showItemWrapper(a),a.eHeaderButton.focus();break}case s9.UP:case s9.DOWN:e.stopPropagation()}}onTabKeyDown(e){var t,i,s,r;if(e.defaultPrevented)return;let{focusService:a,eHeader:o,eBody:n,activeItem:l,params:h}=this,{suppressTrapFocus:d,enableCloseButton:u}=h,c=eZ(this.gos),p=e.target,g=e.shiftKey;if(o.contains(c)){e.preventDefault(),u&&g&&!(null!=(t=this.eCloseButton)&&t.contains(c))?null==(i=this.eCloseButton)||i.focus():d&&g?null==(s=this.focusService.findFocusableElementBeforeTabGuard(e$(this.gos).body,p))||s.focus():this.focusBody(e.shiftKey);return}let m=null;(a.isTargetUnderManagedComponent(n,p)&&(g&&(m=this.focusService.findFocusableElementBeforeTabGuard(n,p)),m||d||(m=l.eHeaderButton)),!(!m&&n.contains(c))||(m=a.findNextFocusableElement(n,!1,g)))?m&&(e.preventDefault(),m.focus()):d&&!g?this.forceFocusOutOfContainer(g):u&&!g?(e.preventDefault(),null==(r=this.eCloseButton)||r.focus()):(e.preventDefault(),this.focusHeader())}focusInnerElement(e){e?this.focusBody(!0):this.focusHeader()}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}focusBody(e){this.focusService.focusInto(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){let t=document.createElement("span");iV(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),ij(t,e.titleLabel);let i={tabbedItem:e,eHeaderButton:t};this.items.push(i),t.addEventListener("click",this.showItemWrapper.bind(this,i))}showItem(e){let t=this.items.find(t=>t.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){var t,i,s,r,a,o;let{tabbedItem:n,eHeaderButton:l}=e;if(null==(t=(i=this.params).onItemClicked)||t.call(i,{item:n}),this.activeItem===e){null==(s=(r=this.params).onActiveItemClicked)||s.call(r);return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),sm(this.eBody),n.bodyPromise.then(e=>{this.eBody.appendChild(e);let t=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,t),n.afterAttachedCallback&&n.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){let t=n.getScrollableContainer&&n.getScrollableContainer()||e;[this.lastScrollListener]=this.addManagedElementListeners(t,{scroll:()=>{this.tabbedItemScrollMap.set(n.name,t.scrollTop)}});let i=this.tabbedItemScrollMap.get(n.name);void 0!==i&&setTimeout(()=>{t.scrollTop=i},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),null==(a=(o=this.activeItem.tabbedItem).afterDetachedCallback)||a.call(o)),l.classList.add("ag-tab-selected"),this.activeItem=e}},Ax=class extends tk{wireBeans(e){this.expressionService=e.expressionService,this.valueService=e.valueService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.userComponentFactory=e.userComponentFactory,this.ctrlsService=e.ctrlsService,this.funcColsService=e.funcColsService}init(e,t,i,s,r,a,o){this.params=o,this.eGui=t,this.eCheckbox=i,this.eExpanded=s,this.eContracted=r,this.comp=e,this.compClass=a;let{node:n,colDef:l}=o,h=this.isTopLevelFooter();if(!h){if(this.isEmbeddedRowMismatch())return;if(n.footer&&this.gos.get("groupHideOpenParents")&&(l&&l.showRowGroup)!==(n.rowGroupColumn&&n.rowGroupColumn.getColId()))return}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!h){var d,u,c,p;let e=o.node.footer&&o.node.rowGroupIndex===this.funcColsService.getRowGroupColumns().findIndex(e=>{var t;return e.getColId()===(null==(t=o.colDef)?void 0:t.showRowGroup)}),t="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!o.node.footer&&(!o.node.group||null!=o.node.rowGroupIndex&&o.node.rowGroupIndex>this.funcColsService.getRowGroupColumns().findIndex(e=>{var t;return e.getColId()===(null==(t=o.colDef)?void 0:t.showRowGroup)})),i=!n.group&&((null==(d=this.params.colDef)?void 0:d.field)||(null==(u=this.params.colDef)?void 0:u.valueGetter)),s=this.isExpandable(),r=this.columnModel.isPivotMode()&&n.leafGroup&&(null==(c=n.rowGroupColumn)?void 0:c.getColId())===(null==(p=o.column)?void 0:p.getColDef().showRowGroup);if(!this.showingValueForOpenedParent&&!s&&!i&&!t&&!e&&!r)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}getCellAriaRole(){var e,t;let i=null==(e=this.params.colDef)?void 0:e.cellAriaRole,s=null==(t=this.params.column)?void 0:t.getColDef().cellAriaRole;return i||s||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){let{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable())return void iq(t);let i=()=>{iZ(t,this.showingValueForOpenedParent||!!e.expanded)};[this.expandListener]=this.addManagedListeners(e,{expandedChanged:i})||null,i()}
260isTopLevelFooter(){if(!e1(this.gos)||null!=this.params.value||-1!=this.params.node.level)return!1;let e=this.params.colDef;if(null==e||!0===e.showRowGroup)return!0;let t=this.funcColsService.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;let e="left"===this.params.pinned,t="right"===this.params.pinned,i=!e&&!t;return this.gos.get("enableRtl")?this.visibleColsService.isPinningLeft()?!t:!i:this.visibleColsService.isPinningLeft()?!e:!i}findDisplayedGroupNode(){let e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;null!=i;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}eD(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){let e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents")||!e.groupData){this.showingValueForOpenedParent=!1;return}if(null!=e.rowGroupColumn){let i=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(i)){this.showingValueForOpenedParent=!1;return}}let i=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=i}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){let e=this.adjustParamsWithDetailsFromRelatedColumn(),t=this.getInnerCompDetails(e),{valueFormatted:i,value:s}=e,r=i;if(null==r){var a;let e=this.displayedGroupNode.rowGroupColumn&&(null==(a=this.params.column)?void 0:a.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));r=""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&e?this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):null!=s?s:null}this.comp.setInnerRenderer(t,r)}adjustParamsWithDetailsFromRelatedColumn(){let e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e||null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;let i=this.params,{value:s,node:r}=this.params,a=this.valueService.formatValue(e,r,s);return{...i,valueFormatted:a}}addFooterValue(){let e=this.params.totalValueGetter;if(!e){let t=this.params.footerValueGetter;t&&(e=t,ep("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){let i=tZ(this.params);i.value=this.params.value,"function"==typeof e?t=e(i):"string"==typeof e?t=this.expressionService.evaluate(e,i):ep("footerValueGetter should be either a function or a string (expression)")}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"");let i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);let t=this.userComponentFactory.getInnerRendererDetails(e,e),i=e=>e&&e.componentClass==this.compClass;if(t&&!i(t))return t;let s=this.displayedGroupNode.rowGroupColumn,r=s?s.getColDef():void 0;if(!r)return;let a=this.userComponentFactory.getCellRendererDetails(r,e);return a&&!i(a)?a:i(a)&&r.cellRendererParams&&r.cellRendererParams.innerRenderer?this.userComponentFactory.getInnerRendererDetails(r.cellRendererParams,e):void 0}addChildCount(){this.params.suppressCount||(this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:this.updateChildCount.bind(this)}),this.updateChildCount())}updateChildCount(){let e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(t)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;let e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;let t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){var e;let t=this.params,i=(e,t)=>{let i=sq(e,this.gos,null);i&&(t.appendChild(i),this.addDestroyFunc(()=>t.removeChild(i)))};i("groupExpanded",this.eExpanded),i("groupContracted",this.eContracted);let s=t.eGridCell;!((null==(e=this.params.column)?void 0:e.isCellEditable(t.node))&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!t.suppressDoubleClickExpand&&this.addManagedListeners(s,{dblclick:this.onCellDblClicked.bind(this)}),this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(s,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(t.node,{expandedChanged:this.showExpandAndContractIcons.bind(this)}),this.showExpandAndContractIcons();let r=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:r,masterChanged:r,groupChanged:r,hasChildrenChanged:r})}onExpandClicked(e){tT(e)||(tR(e),this.onExpandOrContract(e))}onExpandOrContract(e){let t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature
260().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;let e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;let i=this.params.column;return null==i||"string"!=typeof i.getColDef().showRowGroup||this.isShowRowGroupForThisRow()}showExpandAndContractIcons(){let{params:e,displayedGroupNode:t,columnModel:i}=this,{node:s}=e,r=this.isExpandable();if(r){let e=!!this.showingValueForOpenedParent||s.expanded;this.comp.setExpandedDisplayed(e),this.comp.setContractedDisplayed(!e)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);let a=i.isPivotMode(),o=a&&t.leafGroup,n=r&&!o,l=s.footer&&-1===s.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",n),this.comp.addOrRemoveCssClass("ag-row-group",n),a?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",!!o):l||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!n)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){let e=this.params.node;this.params.suppressPadding||(this.addManagedListeners(e,{uiLevelChanged:this.setIndent.bind(this)}),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;let e=this.params,t=e.node,i=!!e.colDef,s=this.gos.get("treeData"),r=!i||s||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+r,this.comp.addOrRemoveCssClass(this.indentClass,!0),this.eGui.style.setProperty("--ag-indentation-level",String(r))}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;let e=new rX(()=>this.params.value,this.params.node);this.createManagedBean(e),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){let e=this.params.checkbox;return"function"==typeof e||!0===e}addCheckboxIfNeeded(){let e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){let e=new o2;this.createBean(e),e.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.eCheckbox.removeChild(e.getGui()),this.destroyBean(e)})}this.comp.setCheckboxVisible(t)}onKeyDown(e){e.key!==s9.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){tT(e)||tP(this.eExpanded,e)||tP(this.eContracted,e)||this.onExpandOrContract(e)}},AM=`<span class="ag-cell-wrapper">
261        <span class="ag-group-expanded" data-ref="eExpanded"></span>
262        <span class="ag-group-contracted" data-ref="eContracted"></span>
263        <span class="ag-group-checkbox ag-invisible" data-ref="eCheckbox"></span>
264        <span class="ag-group-value" data-ref="eValue"></span>
265        <span class="ag-group-child-count" data-ref="eChildCount"></span>
266    </span>`,AD=class extends s${constructor(){super(AM),this.eExpanded=s_,this.eContracted=s_,this.eCheckbox=s_,this.eValue=s_,this.eChildCount=s_}init(e){let t=this.createManagedBean(new Ax),i=!e.colDef,s=this.getGui();t.init({setInnerRenderer:(e,t)=>this.setRenderDetails(e,t),setChildCount:e=>this.eChildCount.textContent=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setContractedDisplayed:e=>ss(this.eContracted,e),setExpandedDisplayed:e=>ss(this.eExpanded,e),setCheckboxVisible:e=>this.eCheckbox.classList.toggle("ag-invisible",!e)},s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),i&&iV(s,t.getCellAriaRole())}setRenderDetails(e,t){if(e){let t=e.newAgStackInstance();null!=t&&t.then(e=>{if(!e)return;let t=()=>this.destroyBean(e);this.isAlive()?(this.eValue.appendChild(e.getGui()),this.addDestroyFunc(t)):t()})}else this.eValue.innerText=t}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}},AE={ariaAdvancedFilterBuilderItem:e=>`${e[0]}. Level ${e[1]}. Press ENTER to edit`,ariaAdvancedFilterBuilderItemValidation:e=>`${e[0]}. Level ${e[1]}. ${e[2]} Press ENTER to edit`,ariaAdvancedFilterBuilderList:"Advanced Filter Builder List",ariaAdvancedFilterBuilderFilterItem:"Filter Condition",ariaAdvancedFilterBuilderGroupItem:"Filter Group",ariaAdvancedFilterBuilderColumn:"Column",ariaAdvancedFilterBuilderOption:"Option",ariaAdvancedFilterBuilderValue:"Value",ariaAdvancedFilterBuilderJoinOperator:"Join Operator",ariaAdvancedFilterInput:"Advanced Filter Input",ariaLabelAdvancedFilterAutocomplete:"Advanced Filter Autocomplete",advancedFilterContains:"contains",advancedFilterNotContains:"does not contain",advancedFilterTextEquals:"equals",advancedFilterTextNotEqual:"does not equal",advancedFilterStartsWith:"begins with",advancedFilterEndsWith:"ends with",advancedFilterBlank:"is blank",advancedFilterNotBlank:"is not blank",advancedFilterEquals:"=",advancedFilterNotEqual:"!=",advancedFilterGreaterThan:">",advancedFilterGreaterThanOrEqual:">=",advancedFilterLessThan:"<",advancedFilterLessThanOrEqual:"<=",advancedFilterTrue:"is true",advancedFilterFalse:"is false",advancedFilterAnd:"AND",advancedFilterOr:"OR",advancedFilterApply:"Apply",advancedFilterBuilder:"Builder",advancedFilterValidationMissingColumn:"Column is missing",advancedFilterValidationMissingOption:"Option is missing",advancedFilterValidationMissingValue:"Value is missing",advancedFilterValidationInvalidColumn:"Column not found",advancedFilterValidationInvalidOption:"Option not found",advancedFilterValidationMissingQuote:"Value is missing an end quote",advancedFilterValidationNotANumber:"Value is not a number",advancedFilterValidationInvalidDate:"Value is not a valid date",advancedFilterValidationMissingCondition:"Condition is missing",advancedFilterValidationJoinOperatorMismatch:"Join operators within a condition must be the same",advancedFilterValidationInvalidJoinOperator:"Join operator not found",advancedFilterValidationMissingEndBracket:"Missing end bracket",advancedFilterValidationExtraEndBracket:"Too many end brackets",advancedFilterValidationMessage:e=>`Expression has an error. ${e[0]} - ${e[1]}.`,advancedFilterValidationMessageAtEnd:e=>`Expression has an error. ${e[0]} at end of expression.`,advancedFilterBuilderTitle:"Advanced Filter",advancedFilterBuilderApply:"Apply",advancedFilterBuilderCancel:"Cancel",advancedFilterBuilderAddButtonTooltip:"Add Filter or Group",advancedFilterBuilderRemoveButtonTooltip:"Remove",advancedFilterBuilderMoveUpButtonTooltip:"Move Up",advancedFilterBuilderMoveDownButtonTooltip:"Move Down",advancedFilterBuilderAddJoin:"Add Group",advancedFilterBuilderAddCondition:"Add Filter",advancedFilterBuilderSelectColumn:"Select a column",advancedFilterBuilderSelectOption:"Select an option",advancedFilterBuilderEnterValue:"Enter a value...",advancedFilterBuilderValidationAlreadyApplied:"Current filter already applied.",advancedFilterBuilderValidationIncomplete:"Not all c
266onditions are complete.",advancedFilterBuilderValidationSelectColumn:"Must select a column.",advancedFilterBuilderValidationSelectOption:"Must select an option.",advancedFilterBuilderValidationEnterValue:"Must enter a value."};function AI(e,t,i){if(!e)return"";let s=i-t;return s?e.slice(0,e.length-s):e}function AA(e,t,i,s,r,a,o){let n=i+(!e.length||o?0:1),l=0;return r&&(" "===e[n]?l=1:(s+=" ",a&&(s+='"'))),{updatedValue:e.slice(0,t)+s+e.slice(n),updatedPosition:t+s.length+l}}function AR(e,t,i,s){let r=t,a=!1;for(;r<e.length;){let t=e[r];if("("===t){s&&" "===e[r-1]?a=!0:r-=1;break}if(" "===t||i&&")"===t){r-=1;break}r++}return{endPosition:r,isEmpty:a}}function AT(e,t,i,s){i!==t&&(e.expression=AA(e.expression,s-t.length+1,s,i).updatedValue)}var AL=class{constructor(e,t){this.params=e,this.startPosition=t,this.type="column",this.valid=!0,this.hasStartChar=!1,this.hasEndChar=!1,this.colName=""}parse(e,t){if(e!==Ak.COL_START_CHAR||this.colName)if(e===Ak.COL_END_CHAR&&this.hasStartChar){if(this.parseColumn(!1,t))return this.hasEndChar=!0,!1;this.colName+=e}else this.colName+=e;else this.hasStartChar=!0}getDisplayValue(){return(this.hasStartChar?Ak.COL_START_CHAR:"")+this.colName+(this.hasEndChar?Ak.COL_END_CHAR:"")}getColId(){return this.colId}complete(e){this.parseColumn(!0,e)}getValidationError(){var e;return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidColumn"),startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}}parseColumn(e,t){this.endPosition=t;let i=this.params.advancedFilterExpressionService.getColId(this.colName);if(i&&this.hasStartChar&&(this.colId=i.colId,AT(this.params,this.colName,i.columnName,t-1),this.colName=i.columnName,this.column=this.params.columnModel.getColDefCol(this.colId),this.column)){var s,r;return this.baseCellDataType=null!=(s=null==(r=this.params.dataTypeService)?void 0:r.getBaseDataType(this.column))?s:"text",!0}return e&&(this.valid=!1),this.baseCellDataType="text",!1}},AF=class{constructor(e,t,i){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.type="operator",this.valid=!0,this.expectedNumOperands=0,this.operator=""}parse(e,t){if(" "===e||")"===e){if(this.parseOperator(!1,t-1))return!0;this.operator+=e}else this.operator+=e}complete(e){this.parseOperator(!0,e)}getValidationError(){var e;return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidOption"),startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}}getDisplayValue(){return this.operator}getOperatorKey(){return this.parsedOperator}parseOperator(e,t){let i=this.params.advancedFilterExpressionService.getDataTypeExpressionOperator(this.baseCellDataType),s=i.findOperator(this.operator);if(this.endPosition=t,s){this.parsedOperator=s;let e=i.operators[s];this.expectedNumOperands=e.numOperands;let r=e.displayValue;return AT(this.params,this.operator,r,t),this.operator=r,!0}return(e||null!==s)&&(this.valid=!1),!1}},AP=class{constructor(e,t,i,s){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.column=s,this.type="operand",this.valid=!0,this.operand="",this.validationMessage=null}parse(e,t){if(" "===e)if(!this.quotes)return this.parseOperand(!1,t),!0;else this.operand+=e;else if(")"===e)if("number"===this.baseCellDataType||!this.quotes)return this.parseOperand(!1,t-1),!0;else this.operand+=e;else if(this.operand||this.quotes||"'"!==e&&'"'!==e)if(this.quotes&&e===this.quotes)return this.parseOperand(!1,t),!1;else this.operand+=e;else this.quotes=e}complete(e){this.parseOperand(!0,e)}getValidationError(){var e;return this.validationMessage?{message:this.validationMessage,startPosition:this.startPosition,endPosition:null!=(e=this.endPosition)?e:this.params.expression.length-1}:null}getRawValue(){return this.operand}getModelValue(){return this.modelValue}parseOperand(e,t){let{advancedFilterExpressionService:i}=this.params;if(this.endPosition=t,this.modelValue=this.operand,e&&this.quotes)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingQuote");else if(""===this.modelValue)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingValue");else{let e=i.getOperandModelValue(this.operand,this.baseCellDataType,this.column);switch(null!=e&&(this.modelValue=e),this.baseCellDataType){case"number":(this.quotes||isNaN(this.modelValue))&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationNotANumber"));break;case"date":case"dateString":null==e&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationInvalidDate"))}}}},Ak=class{constructor(e,t){this.params=e,this.startPosition=t,this.isAwaiting=!0}parseExpression(){var e,t;let i=this.startPosition,{expression:s}=this.params;for(;i<s.length;){let e=s[i];if(" "===e&&this.isAwaiting);else{if(this.isAwaiting=!1,!this.parser){let e;this.columnParser?this.operatorParser?(this.operandParser=new AP(this.params,i,this.columnParser.baseCellDataType,this.columnParser.column),e=this.operandParser):(this.operatorParser=new AF(this.params,i,this.columnParser.baseCellDataType),e=this.operatorParser):(this.columnParser=new AL(this.params,i),e=this.columnParser),this.parser=e}let t=this.parser.parse(e,i);if(null!=t){if(this.isComplete())return this.returnEndPosition(t?i-1:i,!0);this.parser=void 0,this.isAwaiting=!0}}i++}return null==(e=this.parser)||null==(t=e.complete)||t.call(e,i-1),this.returnEndPosition(i)}isValid(){return this.isComplete()&&this.columnParser.valid&&this.operatorParser.valid&&(!this.operandParser||this.operandParser.valid)}getValidationError(){var e,t,i,s,r;let a,o=null!=(e=null!=(t=null==(i=this.columnParser)?void 0:i.getValidationError())?t:null==(s=this.operatorParser)?void 0:s.getValidationError())?e:null==(r=this.operandParser)?void 0:r.getValidationError();if(o)return o;let n=this.params.expression.length;return(this.columnParser?this.operatorParser?this.operatorParser.expectedNumOperands&&!this.operandParser&&(a="advancedFilterValidationMissingValue"):a="advancedFilterValidationMissingOption":a="advancedFilterValidationMissingColumn",a)?{message:this.params.advancedFilterExpressionService.translate(a),startPosition:n,endPosition:n}:null}getFunctionString(e){return this.getFunctionCommon(e,(e,t,i,s)=>{let r=i.replace(/(['"])/,"\\$1"),a=null==e?"":`, params.operands[${e}]`;return`params.operators[${t}].evaluator(expressionProxy.getValue('${r}', node), node, params.evaluatorParams[${s}]${a})`})}getFunctionParsed(e){return this.getFunctionCommon(e,(e,t,i,s)=>(r,a,o)=>o.operators[t].evaluator(r.getValue(i,a),a,o.evaluatorParams[s],null==e?void 0:o.operands[e]))}getAutocompleteListParams(e){return this.isColumnPosition(e)?this.getColumnAutocompleteListParams(e):this.isOperatorPosition(e)?this.getOperatorAutocompleteListParams(e):this.isBeyondEndPosition(e)?void 0:{enabled:!1}}updateExpression(e,t,i){var s,r,a,o,n;let{expression:l}=this.params;if(this.isColumnPosition(e))return AA(this.params.expression,this.startPosition,null!=(s=this.columnParser)&&s.getColId()?this.columnParser.endPosition:AR(l,e).endPosition,this.params.advancedFilterExpressionService.getColumnValue(t),!0);if(this.isOperatorPosition(e)){let s,h=this.getBaseCellDataTypeFromOperatorAutocompleteType(i),d=this.hasOperand(h,t.key),u=d&&this.doesOperandNeedQuotes(h);if((null==(r=this.operatorParser)?void 0:r.startPosition)!=null&&e<this.operatorParser.startPosition)s=AA(l,e,e,null!=(a=t.displayValue)?a:t.key,d,u);else{let i,r=!1;if(null!=(o=this.operatorParser)&&o.getOperatorKey())i=this.operatorParser.endPosition;else{let{endPosition:t,isEmpty:s}=AR(l,e,!0,!0);i=t,r=s}s=AA(l,function(e,t,i){let s=t;for(;s<i&&" "===e[s];)s++;return s}(l,this.columnParser.endPosition+1,i),i,null!=(n=t.displayValue)?n:t.key,d,u,r)}return{...s,hideAutocomplete:!d}}return null}getModel(){let e=this.columnParser.getColId(),t={filterType:this.columnParser.baseCellDataType,colId:e,type:this.operatorParser.getOperatorKey()};return this.operatorParser.expectedNumOperands&&(t.filter=this.operandParser.getModelValue()),t}getFunctionCommon(e,t){var i,s;let r=this.columnParser.getColId(),a=null==(i=this.operatorParser)?void 0:i.getOperatorKey(),{operators:o,evaluatorParams:n,operands:l}=e,h=this.params.advancedFilterExpressionService.getExpressionOperator(this.columnParser.baseCellDataType,a),d=this.addToListAndGetIndex(o,h),u=this.params.advancedFilterExpressionService.getExpressionEvaluatorParams(r),c=this.addToListAndGetIndex(n,u);return t((null==(s=this.operatorParser)?void 0:s.expectedNumOperands)===0?void 0:this.addToListAndGetIndex(l,this.getOperandValue()),d,r,c)}getOperandValue(){let e=this.operandParser.getRawValue(),{baseCellDataType:t,column:i}=this.columnParser;switch(t){case"number":e=Number(e);break;case"date":case"dateString":e=this.params.valueService.parseValue(i,null,e,void 0)}if("dateString"===t){let{dataTypeService:t}=this.params;return t?t.getDateParserFunction(i)(e):e}return e}isComplete(){return!!(this.operatorParser&&(!this.operatorParser.expectedNumOperands||this.operatorParser.expectedNumOperands&&this.operandParser))}isColumnPosition(e){return!this.columnParser||null==this.columnParser.endPosition||e<=this.columnParser.endPosition+1}isOperatorPosition(e){return!this.operatorParser||null==this.operatorParser.endPosition||e<=this.operatorParser.endPosition+1}isBeyondEndPosition(e){return this.isComplete()&&null!=this.endPosition&&e>this.endPosition+1&&this.endPosition+1<this.params.expression.length}returnEndPosition(e,t){return this.endPosition=t?e:e-1,e}getColumnAutocompleteListParams(e){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column",this.getColumnSearchString(e))}getColumnSearchString(e){var t,i,s,r,a;let o=null!=(t=null==(i=this.columnParser)?void 0:i.getDisplayValue())?t:"",n=AI(o,e,(null==(s=this.columnParser)?void 0:s.endPosition)==null?this.params.expression.length:this.columnParser.endPosition+1),l=(null==(r=this.columnParser)?void 0:r.hasStartChar)&&n.length>0,h=(null==(a=this.columnParser)?void 0:a.hasEndChar)&&n.length===o.length+2;return l?n.slice(1,h?-1:void 0):n}getOperatorAutocompleteListParams(e){var t,i,s,r,a;let o=null==(t=this.columnParser)?void 0:t.column;if(!o)return{enabled:!1};let n=this.columnParser.baseCellDataType,l=(null==(i=this.operatorParser)?void 0:i.startPosition)!=null&&e<this.operatorParser.startPosition?"":AI(null!=(s=null==(r=this.operatorParser)?void 0:r.getDisplayValue())?s:"",e,(null==(a=this.operatorParser)?void 0:a.endPosition)==null?this.params.expression.length:this.operatorParser.endPosition+1);return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getOperatorAutocompleteEntries(o,n),`operator-${n}`,l)}getBaseCellDataTypeFromOperatorAutocompleteType(e){return null==e?void 0:e.replace("operator-","")}hasOperand(e,t){var i,s;return!e||!t||(null!=(i=null==(s=this.params.advancedFilterExpressionService.getExpressionOperator(e,t))?void 0:s.numOperands)?i:0)>0}doesOperandNeedQuotes(e){return"number"!==e}addToListAndGetIndex(e,t){let i=e.length;return e.push(t),i}};function AN(e,t,i){let s=!1,r=e.toLocaleLowerCase(),a=r+" ",o=Object.entries(t).find(([,e])=>{let t=i(e).toLocaleLowerCase();return t.startsWith(a)&&(s=!0),t===r});return o?o[0]:s?null:void 0}function AO(e,t){return(null!=t?t:Object.keys(e)).map(t=>({key:t,displayValue:e[t].displayValue}))}Ak.COL_START_CHAR="[",Ak.COL_END_CHAR="]";var AG=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return AO(this.operators,e)}findOperator(e){return AN(e,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:e}=this.params;this.operators={contains:{displayValue:e("advancedFilterContains"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!1,(e,t)=>e.includes(t)),numOperands:1},notContains:{displayValue:e("advancedFilterNotContains"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!0,(e,t)=>!e.includes(t)),numOperands:1},equals:{displayValue:e("advancedFilterTextEquals"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!1,(e,t)=>e===t),numOperands:1},notEqual:{displayValue:e("advancedFilterTextNotEqual"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!0,(e,t)=>e!=t),numOperands:1},startsWith:{displayValue:e("advancedFilterStartsWith"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!1,(e,t)=>e.startsWith(t)),numOperands:1},endsWith:{displayValue:e("advancedFilterEndsWith"),evaluator:(e,t,i,s)=>this.evaluateExpression(e,t,i,s,!1,(e,t)=>e.endsWith(t)),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e||"string"==typeof e&&0===e.trim().length,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e&&("string"!=typeof e||e.trim().length>0),numOperands:0}}}evaluateExpression(e,t,i,s,r,a){return null==e?r:i.caseSensitive?a(i.valueConverter(e,t),s):a(i.valueConverter(e,t).toLocaleLowerCase(),s.toLocaleLowerCase())}},AB=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return AO(this.operators,e)}findOperator(e){return AN(e,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:e,equals:t}=this.params;this.operators={equals:{displayValue:e("advancedFilterEquals"),evaluator:(e,i,s,r)=>this.evaluateSingleOperandExpression(e,i,s,r,!!s.includeBlanksInEquals,t),numOperands:1},notEqual:{displayValue:e("advancedFilterNotEqual"),evaluator:(e,i,s,r)=>this.evaluateSingleOperandExpression(e,i,s,r,!!s.includeBlanksInEquals,(e,i)=>!t(e,i)),numOperands:1},greaterThan:{displayValue:e("advancedFilterGreaterThan"),evaluator:(e,t,i,s)=>this.evaluateSingleOperandExpression(e,t,i,s,!!i.includeBlanksInGreaterThan,(e,t)=>e>t),numOperands:1},greaterThanOrEqual:{displayValue:e("advancedFilterGreaterThanOrEqual"),evaluator:(e,t,i,s)=>this.evaluateSingleOperandExpression(e,t,i,s,!!i.includeBlanksInGreaterThan,(e,t)=>e>=t),numOperands:1},lessThan:{displayValue:e("advancedFilterLessThan"),evaluator:(e,t,i,s)=>this.evaluateSingleOperandExpression(e,t,i,s,!!i.includeBlanksInLessThan,(e,t)=>e<t),numOperands:1},lessThanOrEqual:{displayValue:e("advancedFilterLessThanOrEqual"),evaluator:(e,t,i,s)=>this.evaluateSingleOperandExpression(e,t,i,s,!!i.includeBlanksInLessThan,(e,t)=>e<=t),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}evaluateSingleOperandExpression(e,t,i,s,r,a){return null==e?r:a(i.valueConverter(e,t),s)}},Az=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return AO(this.operators,e)}findOperator(e){return AN(e,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:e}=this.params;this.operators={true:{displayValue:e("advancedFilterTrue"),evaluator:e=>!!e,numOperands:0},false:{displayValue:e("advancedFilterFalse"),evaluator:e=>!1===e,numOperands:0},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}},AV=class extends tk{constructor(){super(...arguments),this.beanName="advancedFilterExpressionService",this.columnNameToIdMap={},this.columnAutocompleteEntries=null,this.expressionEvaluatorParams={}}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.dataTypeService=e.dataTypeService}postConstruct(){this.expressionJoinOperators=this.generateExpressionJoinOperators(),this.expressionOperators=this.generateExpressionOperators()}parseJoinOperator(e){var t;let{type:i}=e;return null!=(t=this.expressionJoinOperators[i])?t:i}getColumnDisplayValue(e){let t,{colId:i}=e,s=this.getColumnAutocompleteEntries().find(({key:e})=>e===i);return s?(t=s.displayValue,this.columnNameToIdMap[t.toLocaleUpperCase()]={colId:i,columnName:t}):t=i,t}getOperatorDisplayValue(e){var t,i;return null!=(t=null==(i=this.getExpressionOperator(e.filterType,e.type))?void 0:i.displayValue)?t:e.type}getOperandModelValue(e,t,i){switch(t){case"number":return eM(e)?Number(e):null;case"date":return aN(this.valueService.parseValue(i,null,e,void 0),!1);ca
266se"dateString":{var s;let t=this.valueService.parseValue(i,null,e,void 0);return this.dataTypeService?aN(null!=(s=this.dataTypeService.getDateParserFunction(i)(t))?s:null,!1):t}}return e}getOperandDisplayValue(e,t){var i,s,r;let{colId:a,filter:o}=e,n=this.columnModel.getColDefCol(a),l="";if(null!=o){let a;switch(e.filterType){case"number":a=null!=(i=eI(o))?i:"";break;case"date":{let e=aB(o);a=n?this.valueService.formatValue(n,null,e):null;break}case"dateString":{let e;if(this.dataTypeService){let t=aB(o);e=n?null==(s=this.dataTypeService)?void 0:s.getDateFormatterFunction(n)(null!=t?t:void 0):null}else e=o;a=n?this.valueService.formatValue(n,null,e):null}}"number"!==e.filterType&&(a=null!=(r=null!=a?a:eI(o))?r:"",t||(a=`"${a}"`)),l=t?a:` ${a}`}return l}parseColumnFilterModel(e){var t,i;let s=null!=(t=this.getColumnDisplayValue(e))?t:"",r=null!=(i=this.getOperatorDisplayValue(e))?i:"",a=this.getOperandDisplayValue(e);return`[${s}] ${r}${a}`}updateAutocompleteCache(e,t){if("column"===t){let{key:t,displayValue:i}=e;this.columnNameToIdMap[e.displayValue.toLocaleUpperCase()]={colId:t,columnName:i}}}translate(e,t){let i=AE[e];return"function"==typeof i&&(i=i(t)),this.localeService.getLocaleTextFunc()(e,i,t)}generateAutocompleteListParams(e,t,i){return{enabled:!0,type:t,searchString:i,entries:e}}getColumnAutocompleteEntries(){var e;if(this.columnAutocompleteEntries)return this.columnAutocompleteEntries;let t=null!=(e=this.columnModel.getColDefCols())?e:[],i=[],s=this.gos.get("includeHiddenColumnsInAdvancedFilter");return t.forEach(e=>{e.getColDef().filter&&(s||e.isVisible()||e.isRowGroupActive())&&i.push({key:e.getColId(),displayValue:this.columnNameService.getDisplayNameForColumn(e,"advancedFilter")})}),i.sort((e,t)=>{var i,s;let r=null!=(i=e.displayValue)?i:"",a=null!=(s=t.displayValue)?s:"";return r<a?-1:+(a>r)}),i}getOperatorAutocompleteEntries(e,t){let i=this.getActiveOperators(e);return this.getDataTypeExpressionOperator(t).getEntries(i)}getJoinOperatorAutocompleteEntries(){return Object.entries(this.expressionJoinOperators).map(([e,t])=>({key:e,displayValue:t}))}getDefaultAutocompleteListParams(e){return this.generateAutocompleteListParams(this.getColumnAutocompleteEntries(),"column",e)}getDataTypeExpressionOperator(e){return this.expressionOperators[e]}getExpressionOperator(e,t){var i;return null==(i=this.getDataTypeExpressionOperator(e))||null==(i=i.operators)?void 0:i[t]}getExpressionJoinOperators(){return this.expressionJoinOperators}getColId(e){let t=e.toLocaleUpperCase(),i=this.columnNameToIdMap[t];if(i)return i;let s=this.getColumnAutocompleteEntries().find(({displayValue:e})=>e.toLocaleUpperCase()===t);if(s){let{key:e,displayValue:i}=s,r={colId:e,columnName:i};return this.columnNameToIdMap[t]=r,r}return null}getExpressionEvaluatorParams(e){var t,i,s;let r=this.expressionEvaluatorParams[e];if(r)return r;let a=this.columnModel.getColDefCol(e);if(!a)return{valueConverter:e=>e};switch(null==(t=this.dataTypeService)?void 0:t.getBaseDataType(a)){case"dateString":r={valueConverter:null!=(i=null==(s=this.dataTypeService)?void 0:s.getDateParserFunction(a))?i:e=>e};break;case"object":r=a.getColDef().filterValueGetter?{valueConverter:e=>e}:{valueConverter:(e,t)=>{var i;return null!=(i=this.valueService.formatValue(a,t,e))?i:"function"==typeof e.toString?e.toString():""}};break;case"text":case void 0:r={valueConverter:e=>eI(e)};break;default:r={valueConverter:e=>e}}let{filterParams:o}=a.getColDef();return o&&["caseSensitive","includeBlanksInEquals","includeBlanksInLessThan","includeBlanksInGreaterThan"].forEach(e=>{let t=o[e];t&&(r[e]=t)}),this.expressionEvaluatorParams[e]=r,r}getColumnDetails(e){var t,i,s;let r=null!=(t=this.columnModel.getColDefCol(e))?t:void 0,a=null!=(i=r?null==(s=this.dataTypeService)?void 0:s.getBaseDataType(r):void 0)?i:"text";return{column:r,baseCellDataType:a}}generateExpressionOperators(){let e=(e,t)=>this.translate(e,t);return{text:new AG({translate:e}),boolean:new Az({translate:e}),object:new AG({translate:e}),number:new AB({translate:e,equals:(e,t)=>e===t}),date:new AB({translate:e,equals:(e,t)=>e.getTime()===t.getTime()}),dateString:new AB({translate:e,equals:(e,t)=>e.getTime()===t.getTime()})}}getColumnValue({displayValue:e}){return`${Ak.COL_START_CHAR}${e}${Ak.COL_END_CHAR}`}generateExpressionJoinOperators(){return{AND:this.translate("advancedFilterAnd"),OR:this.translate("advancedFilterOr")}}getActiveOperators(e){var t;let i=null==(t=e.getColDef().filterParams)?void 0:t.filterOptions;if(i)return i.every(e=>"string"==typeof e)?i:void 0}resetColumnCaches(){this.columnAutocompleteEntries=null,this.columnNameToIdMap={},this.expressionEvaluatorParams={}}},AH=class extends s${constructor(){super(`
267        <div class="ag-autocomplete-row" role="presentation">
268            <div class="ag-autocomplete-row-label"></div>
269        </div>`),this.hasHighlighting=!1}setState(e,t){this.value=e,this.render(),this.updateSelected(t)}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}setSearchString(e){let t=!1;if(eM(e)){var i;let s=null==(i=this.value)?void 0:i.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){t=!0,this.hasHighlighting=!0;let i=s+e.length,r=ig(this.value.slice(0,s)),a=ig(this.value.slice(s,i)),o=ig(this.value.slice(i));this.getGui().lastElementChild.innerHTML=`${r}<b>${a}</b>${o}`}}
269!t&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){var e;this.getGui().lastElementChild.innerHTML=null!=(e=ig(this.value))?e:"&nbsp;"}},Aj=class extends ru{constructor(e){super(`<div class="ag-autocomplete-list-popup">
270            <div data-ref="eList" class="ag-autocomplete-list"></div>
271        <div>`),this.params=e,this.eList=s_,this.searchString=""}destroy(){super.destroy()}postConstruct(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new An({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:e=>this.autocompleteEntries[e]});let e=this.virtualList.getGui();this.addManagedListeners(e,{click:()=>this.params.onConfirmed(),mousemove:this.onMouseMove.bind(this),mousedown:e=>e.preventDefault()}),this.setSelectedValue(0)}onNavigationKeyDown(e,t){e.preventDefault();let i=this.autocompleteEntries.indexOf(this.selectedValue),s=t===s9.UP?i-1:i+1;this.checkSetSelectedValue(s)}setSearch(e){this.searchString=e,eM(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(e,t){let i,s=!1,r=e.toLocaleLowerCase(),a=t.filter(e=>{let t=e.toLocaleLowerCase().indexOf(r),a=0===t,o=t>=0;return o&&(!i||!s&&a||s===a&&e.length<i.length)&&(i=e,s=a),o});return!i&&a.length&&(i=a[0]),{topMatch:i,allMatches:a}}runSearch(){var e,t;let i,s,{autocompleteEntries:r}=this.params,a=r.map(e=>{var t;return null!=(t=e.displayValue)?t:e.key});if(this.params.useFuzzySearch)s=(i=rp({inputValue:this.searchString,allSuggestions:a,hideIrrelevant:!0,addSequentialWeight:!0}).values).length?i[0]:void 0;else{let e=this.runContainsSearch(this.searchString,a);i=e.allMatches,s=e.topMatch}let o=r.filter(({key:e,displayValue:t})=>i.includes(null!=t?t:e));if(!o.length&&this.selectedValue&&null!=(e=this.params)&&null!=(t=e.forceLastSelection)&&t.call(e,this.selectedValue,this.searchString)&&(o=[this.selectedValue]),this.autocompleteEntries=o,this.virtualList.refresh(),!s)return;let n=i.indexOf(s);this.checkSetSelectedValue(n)}updateSearchInList(){this.virtualList.forEachRenderedRow(e=>e.setSearchString(this.searchString))}checkSetSelectedValue(e){e>=0&&e<this.autocompleteEntries.length&&this.setSelectedValue(e)}setSelectedValue(e){let t=this.autocompleteEntries[e];this.selectedValue!==t&&(this.selectedValue=t,this.virtualList.ensureIndexVisible(e),this.virtualList.forEachRenderedRow((t,i)=>{t.updateSelected(e===i)}))}createRowComponent(e){var t;let i=new AH;return this.createBean(i),i.setState(null!=(t=e.displayValue)?t:e.key,e===this.selectedValue),i}onMouseMove(e){let t=this.virtualList.getGui().getBoundingClientRect(),i=this.virtualList.getScrollTop(),s=Math.floor((e.clientY-t.top+i)/this.virtualList.getRowHeight());this.checkSetSelectedValue(s)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){var e;return this.autocompleteEntries.length&&null!=(e=this.selectedValue)?e:null}},AW={selector:"AG-AUTOCOMPLETE",component:class extends s${constructor(){super(`
272            <div class="ag-autocomplete" role="presentation">
273                <ag-input-text-field data-ref="eAutocompleteInput"></ag-input-text-field>
274            </div>`,[aC]),this.eAutocompleteInput=s_,this.isListOpen=!1,this.lastPosition=0,this.valid=!0}wireBeans(e){this.popupService=e.popupService}postConstruct(){this.eAutocompleteInput.onValueChange(e=>this.onValueChanged(e)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList)}),this.addGuiEventListener("focusout",()=>this.onFocusOut())}onValueChanged(e){let t=ex(e);this.updateValue(t),this.updateAutocompleteList(t)}updateValue(e){this.updateLastPosition(),this.dispatchLocalEvent({type:"eventValueChanged",value:e}),this.validate(e)}updateAutocompleteList(e){var t,i,s,r;let a=null!=(t=null==(i=this.listGenerator)?void 0:i.call(this,e,this.lastPosition))?t:{enabled:!1};if((!a.type||a.type!==(null==(s=this.autocompleteListParams)?void 0:s.type))&&this.isListOpen&&this.closeList(),this.autocompleteListParams=a,null!=(r=this.autocompleteListParams)&&r.enabled){this.isListOpen||this.openList();let{searchString:e}=this.autocompleteListParams;this.autocompleteList.setSearch(null!=e?e:"")}else this.isListOpen&&this.closeList()}onKeyDown(e){let t=e.key;switch(this.updateLastPosition(),t){case s9.ENTER:this.onEnterKeyD
274own(e);break;case s9.TAB:this.onTabKeyDown(e);break;case s9.DOWN:case s9.UP:this.onUpDownKeyDown(e,t);break;case s9.LEFT:case s9.RIGHT:case s9.PAGE_HOME:case s9.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case s9.ESCAPE:this.onEscapeKeyDown(e);break;case s9.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList())}}confirmSelection(){var e;let t=null==(e=this.autocompleteList)?void 0:e.getSelectedValue();t&&(this.closeList(),this.dispatchLocalEvent({type:"eventOptionSelected",value:this.getValue(),position:this.lastPosition,updateEntry:t,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.confirmSelection())}onEnterKeyDown(e){e.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(e,t){if(e.preventDefault(),this.isListOpen){var i;null==(i=this.autocompleteList)||i.onNavigationKeyDown(e,t)}else this.forceOpenList()}onEscapeKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){var e;this.updateLastPosition(),this.updateAutocompleteList(null!=(e=this.eAutocompleteInput.getValue())?e:null)}setCaret(e,t){t&&eq(this.gos)&&this.eAutocompleteInput.getFocusableElement().focus();let i=this.eAutocompleteInput.getInputElement();i.setSelectionRange(e,e),e===i.value.length&&(i.scrollLeft=i.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){var e;this.lastPosition=null!=(e=this.eAutocompleteInput.getInputElement().selectionStart)?e:0}validate(e){var t;this.validator&&(this.validationMessage=this.validator(e),this.eAutocompleteInput.getInputElement().setCustomValidity(null!=(t=this.validationMessage)?t:""),this.valid=!this.validationMessage,this.dispatchLocalEvent({type:"eventValidChanged",isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new Aj({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));let e=this.autocompleteList.getGui(),t={ePopup:e,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},i=this.popupService.addPopup({eChild:e,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(t),ariaLabel:this.listAriaLabel});this.hidePopup=i.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchLocalEvent({type:"eventValueConfirmed",value:this.getValue(),isValid:this.isValid()})}getValue(){return ex(this.eAutocompleteInput.getValue())}setInputPlaceholder(e){return this.eAutocompleteInput.setInputPlaceholder(e),this}setInputAriaLabel(e){return this.eAutocompleteInput.setInputAriaLabel(e),this}setListAriaLabel(e){return this.listAriaLabel=e,this}setListGenerator(e){return this.listGenerator=e,this}setValidator(e){return this.validator=e,this}isValid(){return this.valid}setValue(e){let{value:t,position:i,silent:s,updateListOnlyIfOpen:r,restoreFocus:a}=e;this.eAutocompleteInput.setValue(t,!0),this.setCaret(null!=i?i:this.lastPosition,a),s||this.updateValue(t),(!r||this.isListOpen)&&this.updateAutocompleteList(t)}setForceLastSelection(e){return this.forceLastSelection=e,this}setInputDisabled(e){return this.eAutocompleteInput.setDisabled(e),this}}},AU=class extends s${constructor(){super(`
275            <div class="ag-advanced-filter" role="presentation" tabindex="-1">
276                <ag-autocomplete data-ref="eAutocomplete"></ag-autocomplete>
277                <button class="ag-button ag-standard-button ag-advanced-filter-apply-button" data-ref="eApplyFilterButton"></button>
278                <button class="ag-advanced-filter-builder-button" data-ref="eBuilderFilterButton">
279                    <span data-ref="eBuilderFilterButtonIcon" aria-hidden="true"></span>
280                    <span class="ag-advanced-filter-builder-button-label" data-ref="eBuilderFilterButtonLabel"></span>
281                </button>
282            </div>`,[AW]),this.eAutocomplete=s_,this.eApplyFilterButton=s_,this.eBuilderFilterButton=s_,this.eBuilderFilterButtonIcon=s_,this.eBuilderFilterButtonLabel=s_,this.expressionParser=null,this.isApplyDisabled=!0,this.builderOpen=!1}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService,this.advancedFilterService=e.advancedFilterService,this.filterManager=e.filterManager}postConstruct(){this.eAutocomplete.setListGenerator((e,t)=>this.generateAutocompleteListParams(t)).setValidator(()=>this.validateValue()).setForceLastSelection((e,t)=>this.forceLastSelection(e,t)).setInputAriaLabel(this.advancedFilterExpressionService.translate("ariaAdvancedFilterInput")).setListAriaLabel(this.advancedFilterExpressionService.translate("ariaLabelAdvancedFilterAutocomplete")),this.refresh(),this.addManagedListeners(this.eAutocomplete,{eventValueChanged:({value:e})=>this.onValueChanged(e),eventValueConfirmed:({isValid:e})=>this.onValueConfirmed(e),eventOptionSelected:({position:e,updateEntry:t,autocompleteType:i})=>this.onOptionSelected(e,t,i),eventValidChanged:({isValid:e,validationMessage:t})=>this.onValidChanged(e,t)}),this.setupApplyButton(),this.setupBuilderButton()}refresh(){let e=this.advancedFilterService.getExpressionDisplayValue();this.eAutocomplete.setValue({value:null!=e?e:"",position:null==e?void 0:e.length,updateListOnlyIfOpen:!0})}setInputDisabled(e){this.eAutocomplete.setInputDisabled(e),sa(this.eApplyFilterButton,e||this.isApplyDisabled)}getTooltipParams(){let e=super.getTooltipParams();return e.location="advancedFilter",e}setupApplyButton(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedElementListeners(this.eApplyFilterButton,{click:()=>this.onValueConfirmed(this.eAutocomplete.isValid())}),sa(this.eApplyFilterButton,this.isApplyDisabled)}setupBuilderButton(){this.eBuilderFilterButtonIcon.appendChild(sq("advancedFilterBuilder",this.gos)),this.eBuilderFilterButtonLabel.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilder"),this.activateTabIndex([this.eBuilderFilterButton]),this.addManagedElementListeners(this.eBuilderFilterButton,{click:()=>this.openBuilder()}),this.addManagedListeners(this.advancedFilterService.getCtrl(),{advancedFilterBuilderClosed:()=>this.closeBuilder()})}onValueChanged(e){var t;e=ex(e),this.advancedFilterService.setExpressionDisplayValue(e),this.expressionParser=this.advancedFilterService.createExpressionParser(e);let i=null==(t=this.expressionParser)?void 0:t.parseExpression();i&&i!==e&&this.eAutocomplete.setValue({value:i,silent:!0,restoreFocus:!0})}onValueConfirmed(e){var t;e&&!this.isApplyDisabled&&(sa(this.eApplyFilterButton,!0),this.advancedFilterService.applyExpression(),null==(t=this.filterManager)||t.onFilterChanged({source:"advancedFilter"}))}onOptionSelected(e,t,i){let{updatedValue:s,updatedPosition:r,hideAutocomplete:a}=this.updateExpression(e,t,i);this.eAutocomplete.setValue({value:s,position:r,updateListOnlyIfOpen:a,restoreFocus:!0})}validateValue(){var e,t,i;return null!=(e=this.expressionParser)&&e.isValid()?null:null!=(t=null==(i=this.expressionParser)?void 0:i.getValidationMessage())?t:null}onValidChanged(e,t){this.isApplyDisabled=!e||this.advancedFilterService.isCurrentExpressionApplied(),sa(this.eApplyFilterButton,this.isApplyDisabled),this.setTooltip({newTooltipText:t,showDelayOverride:1e3})}generateAutocompleteListParams(e){return this.expressionParser?this.expressionParser.getAutocompleteListParams(e):this.advancedFilterExpressionService.getDefaultAutocompleteListParams("")}updateExpression(e,t,i){var s,r;return this.advancedFilterExpressionService.updateAutocompleteCache(t,i),null!=(s=null==(r=this.expressionParser)?void 0:r.updateExpression(e,t,i))?s:this.advancedFilterService.getDefaultExpression(t)}
282forceLastSelection({key:e,displayValue:t},i){return!!i.toLocaleLowerCase().match(`^${(null!=t?t:e).toLocaleLowerCase()}\\s*$`)}openBuilder(){this.builderOpen||(this.builderOpen=!0,sa(this.eBuilderFilterButton,!0),this.advancedFilterService.getCtrl().toggleFilterBuilder({source:"ui",eventSource:this.eBuilderFilterButton}))}closeBuilder(){this.builderOpen&&(this.builderOpen=!1,sa(this.eBuilderFilterButton,!1),this.eBuilderFilterButton.focus())}},A_=class extends s${constructor(e){super(`
283            <div class="ag-advanced-filter-header" role="row">
284            </div>`),this.enabled=e}wireBeans(e){this.columnModel=e.columnModel,this.focusService=e.focusService,this.headerNavigationService=e.headerNavigationService}postConstruct(){this.setupAdvancedFilter(this.enabled),this.addDestroyFunc(()=>this.destroyBean(this.eAdvancedFilter));let e=()=>{this.enabled&&this.setEnabledHeight()};this.addManagedEventListeners({gridColumnsChanged:()=>this.onGridColumnsChanged(),columnHeaderHeightChanged:e,gridStylesChanged:e}),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addGuiEventListener("focusout",e=>{this.getFocusableElement().contains(e.relatedTarget)||this.focusService.clearAdvancedFilterColumn()})}getFocusableElement(){var e,t;return null!=(e=null==(t=this.eAdvancedFilter)?void 0:t.getGui())?e:this.getGui()}setEnabled(e){e!==this.enabled&&this.setupAdvancedFilter(e)}refresh(){var e;null==(e=this.eAdvancedFilter)||e.refresh()}getHeight(){return this.height}setInputDisabled(e){var t;null==(t=this.eAdvancedFilter)||t.setInputDisabled(e)}setupAdvancedFilter(e){let t=this.getGui();if(e){this.eAdvancedFilter=this.createBean(new AU);let e=this.eAdvancedFilter.getGui();this.eAdvancedFilter.addCssClass("ag-advanced-filter-header-cell"),this.setEnabledHeight(),this.setAriaRowIndex(),iV(e,"gridcell"),i2(e,1),this.setAriaColumnCount(e),t.appendChild(e)}else sm(t),this.destroyBean(this.eAdvancedFilter),this.height=0;ss(t,e),this.enabled=e}setEnabledHeight(){let e=this.getGui();this.height=this.columnModel.getFloatingFiltersHeight();let t=`${this.height}px`;e.style.height=t,e.style.minHeight=t}setAriaColumnCount(e){i3(e,this.columnModel.getCols().length)}setAriaRowIndex(){i0(this.getGui(),this.headerNavigationService.getHeaderRowCount())}onGridColumnsChanged(){this.eAdvancedFilter&&(this.setAriaColumnCount(this.eAdvancedFilter.getGui()),this.setAriaRowIndex())}onKeyDown(e){switch(e.key){case s9.ENTER:this.hasFocus()&&this.focusService.focusInto(this.getFocusableElement())&&e.preventDefault();break;case s9.ESCAPE:this.hasFocus()||this.getFocusableElement().focus();break;case s9.UP:this.navigateUpDown(!0,e);break;case s9.DOWN:this.navigateUpDown(!1,e);break;case s9.TAB:if(this.hasFocus())this.navigateLeftRight(e);else{let t=this.focusService.findNextFocusableElement(this.getFocusableElement(),null,e.shiftKey);t?(e.preventDefault(),t.focus()):this.navigateLeftRight(e)}}}navigateUpDown(e,t){this.hasFocus()&&this.focusService.focusNextFromAdvancedFilter(e)&&t.preventDefault()}navigateLeftRight(e){(e.shiftKey?this.focusService.focusLastHeader():this.focusService.focusNextFromAdvancedFilter(!1,!0))&&e.preventDefault()}hasFocus(){return eZ(this.gos)===this.getFocusableElement()}},A$=class extends tk{constructor(e,t){super(),this.comp=e,this.virtualList=t}postConstruct(){this.createManagedBean(new Ab(this.comp,this.virtualList,{dragSourceType:r$.AdvancedFilterBuilder,listItemDragStartEvent:"advancedFilterBuilderDragStarted",listItemDragEndEvent:"advancedFilterBuilderDragEnded",eventSource:this,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:()=>!1,getNumRows:e=>e.getNumItems(),moveItem:(e,t)=>this.moveItem(e,t)}))}getCurrentDragValue(e){return e.item}moveItem(e,t){this.comp.moveItem(e,t)}},AY=class extends Au{constructor(e){super({...e,template:`
285                <div class="ag-picker-field" role="presentation">
286                    <div data-ref="eLabel"></div>
287                    <div data-ref="eWrapper" class="ag-wrapper ag-picker-collapsed">
288                        <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
289                        <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
290                        <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
291                        <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
292                    </div>
293                </div>`,agComponents:[aC]}),this.params=e}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();let{wrapperClassName:e,ariaLabel:t}=this.params;ss(this.eDisplayField,!1),e&&this.eWrapper.classList.add(e),iW(this.eWrapper,""),ij(this.eWrapper,t)}onEnterKeyDown(e){tR(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},AK=class extends tk{constructor(e,t,i){super(),this.eGui=e,this.focusWrapper=t,this.eFocusableComp=i}postConstruct(){this.addManagedElementListeners(this.eGui,{keydown:e=>{switch(e.key){case s9.TAB:e.defaultPrevented||tR(e);break;case s9.UP:case s9.DOWN:tR(e);break;case s9.ESCAPE:if(tT(e))return;this.eGui.contains(eZ(this.gos))&&(e.preventDefault(),tR(e),this.focusWrapper.focus())}}});let e="ag-advanced-filter-builder-virtual-list-item-highlight";this.addManagedListeners(this.focusWrapper,{keydown:e=>{e.key===s9.ENTER&&(tT(e)||eZ(this.gos)===this.focusWrapper&&(e.preventDefault(),tR(e),this.eFocusableComp.getFocusableElement().focus()))},focusin:()=>{this.focusWrapper.classList.add(e)},focusout:t=>{this.focusWrapper.contains(t.relatedTarget)||this.focusWrapper.classList.remove(e)}})}};function AZ(e,t){return{pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderAddField",pickerAriaLabelValue:"Advanced Filter Builder Add Field",pickerType:"ag-list",valueList:[{key:"condition",displayValue:e("advancedFilterBuilderAddCondition")},{key:"join",displayValue:e("advancedFilterBuilderAddJoin")}],valueFormatter:e=>{var t;return null==e?null:null!=(t=e.displayValue)?t:e.key},pickerIcon:"advancedFilterBuilderAdd",maxPickerWidth:`${null!=t?t:120}px`,wrapperClassName:"ag-advanced-filter-builder-item-button",ariaLabel:e("advancedFilterBuilderAddButtonTooltip")}}var Aq=class extends s${constructor(e,t){super(`
294            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">
295                <div data-ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">
296                    <div class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true">
297                        <div class="ag-advanced-filter-builder-item-tree-line-vertical-top ag-advanced-filter-builder-item-tree-line-horizontal"></div>
298                    </div>
299                </div>
300            </div>
301        `),this.item=e,this.focusWrapper=t,this.eItem=s_}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){var e;i_(this.focusWrapper,2);let t=AZ(e=>this.advancedFilterExpressionService.translate(e),null==(e=this.gos.get("advancedFilterBuilderParams"))?void 0:e.addSelectWidth),i=this.createManagedBean(new AY(t));this.addManagedListeners(i,{fieldPickerValueSelected:({value:e})=>{this.dispatchLocalEvent({type:"advancedFilterBuilderAdded",item:this.item,isJoin:"join"===e.key})}}),this.eItem.appendChild(i.getGui()),this.createManagedBean(new sW({getGui:()=>i.getGui(),getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")})),this.createManagedBean(new AK(this.getGui(),this.focusWrapper,i)),ij(this.focusWrapper,this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip"),`${this.item.level+1}`]))}afterAdd(){}},AQ=class extends s${constructor(){super(`
302            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>
303        `),this.validationMessage=null}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}init(e){let{item:t,createPill:i}=e;this.item=t,this.createPill=i,this.filterModel=t.filterModel,this.setupColumnCondition(this.filterModel),this.validate(),this.addDestroyFunc(()=>this.destroyBeans([this.eColumnPill,this.eOperatorPill,this.eOperandPill]))}getDragName(){return this.filterModel.colId?this.advancedFilterExpressionService.parseColumnFilterModel(this.filterModel):this.getDefaultColumnDisplayValue()}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderFilterItem")} ${this.getDragName()}`}getValidationMessage(){return this.validationMessage}getFocusableElement(){return this.eColumnPill.getFocusableElement()}setupColumnCondition(e){var t;let i=this.advancedFilterExpressionService.getColumnDetails(e.colId);this.baseCellDataType=i.baseCellDataType,this.column=i.column,this.numOperands=this.getNumOperands(this.getOperatorKey()),this.eColumnPill=this.createPill({key:this.getColumnKey(),displayValue:null!=(t=this.getColumnDisplayValue())?t:this.getDefaultColumnDisplayValue(),cssClass:"ag-advanced-filter-builder
303-column-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getColumnAutocompleteEntries()}),update:e=>this.setColumnKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderColumnSelectField",pickerAriaLabelValue:"Advanced Filter Builder Column Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderColumn")}),this.getGui().appendChild(this.eColumnPill.getGui()),eM(this.getColumnKey())&&(this.createOperatorPill(),this.hasOperand()&&this.createOperandPill())}createOperatorPill(){var e;this.eOperatorPill=this.createPill({key:this.getOperatorKey(),displayValue:null!=(e=this.getOperatorDisplayValue())?e:this.getDefaultOptionSelectValue(),cssClass:"ag-advanced-filter-builder-option-pill",isSelect:!0,getEditorParams:()=>({values:this.getOperatorAutocompleteEntries()}),update:e=>this.setOperatorKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderOptionSelectField",pickerAriaLabelValue:"Advanced Filter Builder Option Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderOption")}),this.eColumnPill.getGui().insertAdjacentElement("afterend",this.eOperatorPill.getGui())}createOperandPill(){var e;let t=null!=(e=this.getOperandDisplayValue())?e:"";this.eOperandPill=this.createPill({key:t,displayValue:t,baseCellDataType:this.baseCellDataType,cssClass:"ag-advanced-filter-builder-value-pill",isSelect:!1,update:e=>this.setOperand(e),ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderValue")}),this.getGui().appendChild(this.eOperandPill.getGui())}getColumnKey(){return this.filterModel.colId}getColumnDisplayValue(){return this.advancedFilterExpressionService.getColumnDisplayValue(this.filterModel)}getOperatorKey(){return this.filterModel.type}getOperatorDisplayValue(){return this.advancedFilterExpressionService.getOperatorDisplayValue(this.filterModel)}getOperandDisplayValue(){return this.advancedFilterExpressionService.getOperandDisplayValue(this.filterModel,!0)}hasOperand(){return this.numOperands>0}getOperatorAutocompleteEntries(){return this.column?this.advancedFilterExpressionService.getOperatorAutocompleteEntries(this.column,this.baseCellDataType):[]}setColumnKey(e){this.eOperatorPill||this.createOperatorPill();let t=this.advancedFilterExpressionService.getColumnDetails(e);this.column=t.column;let i=t.baseCellDataType;this.baseCellDataType!==i&&(this.baseCellDataType=i,this.setOperatorKey(void 0),this.eOperatorPill&&(sv(this.eOperatorPill.getGui()),this.destroyBean(this.eOperatorPill),this.createOperatorPill()),this.validate()),this.filterModel.colId=e,this.filterModel.filterType=this.baseCellDataType}setOperatorKey(e){let t=this.getNumOperands(e);t!==this.numOperands&&(this.numOperands=t,0===t?this.destroyOperandPill():(this.createOperandPill(),"number"!==this.baseCellDataType&&this.setOperand(""))),this.filterModel.type=e,this.validate()}setOperand(e){let t=e;if(this.column){var i;t=null!=(i=this.advancedFilterExpressionService.getOperandModelValue(e,this.baseCellDataType,this.column))?i:""}this.filterModel.filter=t,this.validate()}getNumOperands(e){var t,i;return null!=(t=null==(i=this.advancedFilterExpressionService.getExpressionOperator(this.baseCellDataType,e))?void 0:i.numOperands)?t:0}destroyOperandPill(){delete this.filterModel.filter,this.getGui().removeChild(this.eOperandPill.getGui()),this.destroyBean(this.eOperandPill),this.eOperandPill=void 0}validate(){let e=null;eM(this.getColumnKey())?eM(this.getOperatorKey())?this.numOperands>0&&!eM(this.getOperandDisplayValue())&&(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationEnterValue")):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectOption"):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectColumn"),this.item.valid=!e,e!==this.validationMessage&&(this.validationMessage=e,this.dispatchLocalEvent({type:"advancedFilterBuilderValidChanged"}))}getDefaultColumnDisplayValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectColumn")}getDefaultOptionSelectValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectOption")}},AX=class extends s${constructor(e){super(`
304            <div class="ag-advanced-filter-builder-pill-wrapper" role="presentation">
305                <div data-ref="ePill" class="ag-advanced-filter-builder-pill" role="button">
306                    <span data-ref="eLabel" class="ag-advanced-filter-builder-pill-display"></span>
307                </div>
308            </div>
309        `),this.params=e,this.ePill=s_,this.eLabel=s_,this.value=e.value}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){let{cssClass:e,ariaLabel:t}=this.params;this.ePill.classList.add(e),this.activateTabIndex([this.ePill]),this.eLabel.id=`${this.getCompId()}`,iU(this.ePill,this.eLabel.id),ij(this.ePill,t),this.renderValue(),this.addManagedListeners(this.ePill,{click:e=>{e.preventDefault(),this.showEditor()},keydown:e=>{e.key===s9.ENTER&&(e.preventDefault(),tR(e),this.showEditor())}}),this.addDestroyFunc(()=>this.destroyBean(this.eEditor))}getFocusableElement(){return this.ePill}showEditor(){if(this.eEditor)return;ss(this.ePill,!1),this.eEditor=this.createEditorComp(this.params.type),this.eEditor.setValue(this.value);let e=this.eEditor.getGui();this.eEditor.addManagedElementListeners(e,{keydown:e=>{switch(e.key){case s9.ENTER:e.preventDefault(),tR(e),this.updateValue(!0);break;case s9.ESCAPE:e.preventDefault(),tR(e),this.hideEditor(!0)}},focusout:()=>this.updateValue(!1)}),this.getGui().appendChild(e),this.eEditor.getFocusableElement().focus()}createEditorComp(e){let t;switch(e){case"text":t=new af;break;case"number":t=new ay;break;case"date":t=new n6}return this.createBean(t)}hideEditor(e){let{eEditor:t}=this;t&&(this.eEditor=void 0,this.getGui().removeChild(t.getGui()),this.destroyBean(t),ss(this.ePill,!0),e&&this.ePill.focus())}renderValue(){let e;this.eLabel.classList.remove("ag-advanced-filter-builder-value-empty","ag-advanced-filter-builder-value-number","ag-advanced-filter-builder-value-text"),eM(this.value)?"number"===this.params.type?(e=this.value,this.eLabel.classList.add("ag-advanced-filter-builder-value-number")):(e=`"${this.value}"`,this.eLabel.classList.add("ag-advanced-filter-builder-value-text")):(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderEnterValue"),this.eLabel.classList.add("ag-advanced-filter-builder-value-empty")),this.eLabel.innerText=e}updateValue(e){var t;if(!this.eEditor)return;let i=null!=(t=this.eEditor.getValue())?t:"";this.dispatchLocalEvent({type:"fieldValueChanged",value:i}),this.value=i,this.renderValue(),this.hideEditor(e)}},AJ=class extends s${wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}constructor(){super(`
310            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>
311        `)}init(e){let{item:t,createPill:i}=e,s=t.filterModel;this.filterModel=s,this.ePill=i({key:s.type,displayValue:this.advancedFilterExpressionService.parseJoinOperator(s),cssClass:"ag-advanced-filter-builder-join-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries()}),update:e=>s.type=e,pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderJoinSelectField",pickerAriaLabelValue:"Advanced Filter Builder Join Operator Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderJoinOperator")}),this.getGui().appendChild(this.ePill.getGui()),this.addDestroyFunc(()=>this.destroyBean(this.ePill))}getDragName(){return this.advancedFilterExpressionService.parseJoinOperator(this.filterModel)}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderGroupItem")} ${this.getDragName()}`}getValidationMessage(){return null}getFocusableElement(){return this.ePill.getFocusableElement()}},A0=class extends Au{constructor(e){super({...e,template:`
312                <div class="ag-picker-field ag-advanced-filter-builder-pill-wrapper" role="presentation">
313                    <div data-ref="eLabel"></div>
314                    <div data-ref="eWrapper" class="ag-wrapper ag-advanced-filter-builder-pill ag-picker-collapsed">
315                        <div data-ref="eDisplayField" class="ag-picker-field-display ag-advanced-filter-builder
315-pill-display"></div>
316                        <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
317                        <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
318                        <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
319                    </div>
320                </div>`,agComponents:[aC]}),this.params=e}getFocusableElement(){return this.eWrapper}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();let{wrapperClassName:e,ariaLabel:t}=this.params;this.eWrapper.classList.add(e),iW(this.eWrapper,""),ij(this.eWrapper,t)}createPickerComponent(){if(!this.values){var e;let{values:t}=this.params.getEditorParams();this.values=t;let i=this.value.key,s=null!=(e=t.find(e=>e.key===i))?e:{key:i,displayValue:this.value.displayValue};this.value=s}return super.createPickerComponent()}onEnterKeyDown(e){tR(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},A1=class extends lT{constructor(e,t,i){super(`
321            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">
322                <div class="ag-advanced-filter-builder-item" role="presentation">
323                    <div data-ref="eTreeLines" class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true"></div>
324                    <span data-ref="eDragHandle" class="ag-drag-handle" aria-hidden="true"></span>
325                    <span data-ref="eValidation" class="ag-advanced-filter-builder-item-button ag-advanced-filter-builder-invalid" aria-hidden="true"></span>
326                </div>
327                <div data-ref="eButtons" class="ag-advanced-filter-builder-item-buttons">
328                    <span data-ref="eMoveUpButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
329                    <span data-ref="eMoveDownButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
330                    <div data-ref="eAddButton" role="presentation"></div>
331                    <span data-ref="eRemoveButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
332                </div>
333            </div>
334        `),this.item=e,this.dragFeature=t,this.focusWrapper=i,this.eTreeLines=s_,this.eDragHandle=s_,this.eButtons=s_,this.eValidation=s_,this.eMoveUpButton=s_,this.eMoveDownButton=s_,this.eAddButton=s_,this.eRemoveButton=s_,this.moveUpDisabled=!1,this.moveDownDisabled=!1}wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){let{filterModel:e,level:t,showMove:i}=this.item,s="join"===e.filterType;if(this.ePillWrapper=this.createManagedBean(s?new AJ:new AQ),this.ePillWrapper.init({item:this.item,createPill:e=>this.createPill(e)}),this.eDragHandle.insertAdjacentElement("afterend",this.ePillWrapper.getGui()),0===t){let e=document.createElement("div");e.classList.add("ag-advanced-filter-builder-item-tree-line-vertical-bottom"),e.classList.add("ag-advanced-filter-builder-item-tree-line-root"),this.eTreeLines.appendChild(e),ss(this.eDragHandle,!1),ss(this.eButtons,!1),iZ(this.focusWrapper,!0)}else this.setupTreeLines(t),this.eDragHandle.appendChild(sq("advancedFilterBuilderDrag",this.gos)),this.setupValidation(),this.setupMoveButtons(i),this.setupAddButton(),this.setupRemoveButton(),this.setupDragging(),this.updateAriaExpanded();i_(this.focusWrapper,t+1),this.initialiseTabGuard({}),this.createManagedBean(new AK(this.getGui(),this.focusWrapper,this.ePillWrapper)),this.updateAriaLabel(),this.addManagedListeners(this.ePillWrapper,{advancedFilterBuilderValueChanged:()=>this.dispatchLocalEvent({type:"advancedFilterBuilderValueChanged"}),advancedFilterBuilderValidChanged:()=>this.updateValidity()})}setState(e){let{level:t}=this.item;if(0===t)return;let{showMove:i}=this.item,{disableMoveUp:s,disableMoveDown:r,treeLines:a,showStartTreeLine:o}=e;this.updateTreeLines(a,o),this.updateAriaExpanded(),i&&(this.moveUpDisabled=!!s,this.moveDownDisabled=!!r,this.eMoveUpButton.classList.toggle("ag-advanced-filter-builder
334-item-button-disabled",s),this.eMoveDownButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",r),i$(this.eMoveUpButton,!!s),i$(this.eMoveDownButton,!!r),this.moveUpTooltipFeature.refreshToolTip(),this.moveDownTooltipFeature.refreshToolTip())}focusMoveButton(e){(e?this.eMoveUpButton:this.eMoveDownButton).focus()}afterAdd(){this.ePillWrapper.getFocusableElement().focus()}setupTreeLines(e){for(let t=0;t<e;t++){let e=document.createElement("div");this.eTreeLines.appendChild(e)}}updateTreeLines(e,t){let i=e.length-1,{children:s}=this.eTreeLines;for(let t=0;t<i;t++){let i=s.item(t);i&&i.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!e[t])}let r=s.item(i);if(r){r.classList.add("ag-advanced-filter-builder-item-tree-line-horizontal");let t=e[i];r.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-top",t),r.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!t)}this.eDragHandle.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-bottom",t)}setupValidation(){this.eValidation.appendChild(sq("advancedFilterBuilderInvalid",this.gos)),this.validationTooltipFeature=this.createManagedBean(new sW({getGui:()=>this.eValidation,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.ePillWrapper.getValidationMessage(),getTooltipShowDelayOverride:()=>1e3})),this.updateValidity()}setupAddButton(){var e;let t=AZ(e=>this.advancedFilterExpressionService.translate(e),null==(e=this.gos.get("advancedFilterBuilderParams"))?void 0:e.addSelectWidth),i=this.createManagedBean(new AY(t));this.addManagedListeners(i,{fieldPickerValueSelected:({value:e})=>this.dispatchLocalEvent({type:"advancedFilterBuilderAdded",item:this.item,isJoin:"join"===e.key})}),this.eAddButton.appendChild(i.getGui()),this.createManagedBean(new sW({getGui:()=>this.eAddButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")}))}setupRemoveButton(){this.eRemoveButton.appendChild(sq("advancedFilterBuilderRemove",this.gos)),this.addManagedListeners(this.eRemoveButton,{click:()=>this.removeItem(),keydown:e=>{e.key===s9.ENTER&&(e.preventDefault(),tR(e),this.removeItem())}}),this.createManagedBean(new sW({getGui:()=>this.eRemoveButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")})),ij(this.eRemoveButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")),this.activateTabIndex([this.eRemoveButton])}setupMoveButtons(e){e?(this.eMoveUpButton.appendChild(sq("advancedFilterBuilderMoveUp",this.gos)),this.addManagedListeners(this.eMoveUpButton,{click:()=>this.moveItem(!0),keydown:e=>{e.key===s9.ENTER&&(e.preventDefault(),tR(e),this.moveItem(!0))}}),this.moveUpTooltipFeature=this.createManagedBean(new sW({getGui:()=>this.eMoveUpButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveUpDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")})),ij(this.eMoveUpButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")),this.eMoveDownButton.appendChild(sq("advancedFilterBuilderMoveDown",this.gos)),this.addManagedListeners(this.eMoveDownButton,{click:()=>this.moveItem(!1),keydown:e=>{e.key===s9.ENTER&&(e.preventDefault(),tR(e),this.moveItem(!1))}}),this.moveDownTooltipFeature=this.createManagedBean(new sW({getGui:()=>this.eMoveDownButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveDownDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")})),ij(this.eMoveDownButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")),this.activateTabIndex([this.eMoveUpButton,this.eMoveDownButton])):(ss(this.eMoveUpButton,!1),ss(this.eMoveDownButton,!1))}updateValidity(){sr(this.eValidation,!this.item.valid),this.validationTooltipFeature.refreshToolTip(),this.updateAriaLabel()}createPill(e){let{key:t,displayValue:i,cssClass:s,update:r,ariaLabel:a}=e,o=e=>{null!=e&&(r(e),this.dispatchLocalEvent({type:"advancedFilterBuilderValueChanged"}))};if(e.isSelect){var n,l;let{getEditorParams:r,pickerAriaLabelKey:h,pickerAriaLabelValue:d}=e,u=this.gos.get("advancedFilterBuilderParams"),c=`${null!=(n=null==u?void 0:u.pillSelectMinWidth)?n:140}px`,p=`${null!=(l=null==u?void 0:u.pillSelectMaxWidth)?l:200}px`,g=this.createBean(new A0({pickerAriaLabelKey:h,pickerAriaLabelValue:d,pickerType:"ag-list",value:{key:t,displayValue:i},valueFormatter:e=>{var t;return null==e?null:null!=(t=e.displayValue)?t:e.key},variableWidth:!0,minPickerWidth:c,maxPickerWidth:p,getEditorParams:r,wrapperClassName:s,ariaLabel:a}));return this.addManagedListeners(g,{fieldPickerValueSelected:({value:e})=>o(null==e?void 0:e.key)}),g}{let t=this.createBean(new AX({value:i,cssClass:s,type:this.getInputType(e.baseCellDataType),ariaLabel:a}));return this.addManagedListeners(t,{fieldValueChanged:({value:e})=>o(e)}),t}}getInputType(e){switch(e){case"text":case"object":case"boolean":return"text";case"number":return"number";case"date":case"dateString":return"date"}}setupDragging(){let e={type:r$.AdvancedFilterBuilder,eElement:this.eDragHandle,dragItemName:()=>this.ePillWrapper.getDragName(),getDefaultIconName:()=>"notAllowed",getDragItem:()=>({}),onDragStarted:()=>this.dragFeature.dispatchLocalEvent({type:"advancedFilterBuilderDragStarted",item:this.item}),onDragStopped:()=>this.dragFeature.dispatchLocalEvent({type:"advancedFilterBuilderDragEnded"})};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}updateAriaLabel(){let e,t=this.ePillWrapper.getAriaLabel(),i=`${this.item.level
334+1}`,s=this.ePillWrapper.getValidationMessage();e=s?this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItemValidation",[t,i,s]):this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[t,i]),ij(this.focusWrapper,e)}updateAriaExpanded(){iq(this.focusWrapper);let{filterModel:e}=this.item;(null==e?void 0:e.filterType)==="join"&&e.conditions.length&&iZ(this.focusWrapper,!0)}removeItem(){this.dispatchLocalEvent({type:"advancedFilterBuilderRemoved",item:this.item})}moveItem(e){this.dispatchLocalEvent({type:"advancedFilterBuilderMoved",item:this.item,backwards:e})}},A2=class extends s${constructor(){super(`
335            <div role="presentation" class="ag-advanced-filter-builder" tabindex="-1">
336                <div role="presentation" class="ag-advanced-filter-builder-list" data-ref="eList"></div>
337                <div role="presentation" class="ag-advanced-filter-builder-button-panel">
338                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-apply-button" data-ref="eApplyFilterButton"></button>
339                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-cancel-button" data-ref="eCancelFilterButton"></button>
340                </div>
341            </div>`),this.eList=s_,this.eApplyFilterButton=s_,this.eCancelFilterButton=s_,this.validationMessage=null}wireBeans(e){this.filterManager=e.filterManager,this.advancedFilterService=e.advancedFilterService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){var e;let{showMoveButtons:t}=null!=(e=this.gos.get("advancedFilterBuilderParams"))?e:{};this.showMove=!!t,this.addManagedPropertyListener("advancedFilterBuilderParams",({currentValue:e})=>{this.showMove=!!(null!=e&&e.showMoveButtons),this.refreshList(!1)}),this.filterModel=this.setupFilterModel(),this.setupVirtualList(),this.dragFeature=this.createManagedBean(new A$(this,this.virtualList)),this.setupButtons()}refresh(){let e=this.virtualList.getLastFocusedRow();this.setupFilterModel(),this.validateItems(),this.refreshList(!1),null!=e&&(this.virtualList.getComponentAt(e)||(e=0),this.virtualList.focusRow(e))}getNumItems(){return this.items.length}moveItem(e,t){t&&e&&this.moveItemToIndex(e,t.rowIndex,t.position)}afterGuiAttached(){this.virtualList.awaitStable(()=>this.virtualList.focusRow(0))}setupVirtualList(){this.virtualList=this.createManagedBean(new An({cssIdentifier:"advanced-filter-builder",ariaRole:"tree",listName:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderList")})),this.virtualList.setComponentCreator(this.createItemComponent.bind(this)),this.virtualList.setComponentUpdater(this.updateItemComponent.bind(this)),this.virtualList.setRowHeight(40),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.items.length,getRow:e=>this.items[e],areRowsEqual:(e,t)=>e===t}),this.buildList(),this.virtualList.refresh()}setupButtons(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedElementListeners(this.eApplyFilterButton,{click:()=>{var e;this.advancedFilterService.setModel(this.filterModel),null==(e=this.filterManager)||e.onFilterChanged({source:"advancedFilter"}),this.close()}}),this.validationTooltipFeature=this.createManagedBean(new sW({getGui:()=>this.eApplyFilterButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.validationMessage,getTooltipShowDelayOverride:()=>1e3})),this.validate();let e=e=>this.addOrRemoveCssClass("ag-advanced-filter-builder-validation",e);this.addManagedListeners(this.eApplyFilterButton,{mouseenter:()=>e(!0),mouseleave:()=>e(!1)}),this.eCancelFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderCancel"),this.activateTabIndex([this.eCancelFilterButton]),this.addManagedElementListeners(this.eCancelFilterButton,{click:()=>this.close()})}removeItemFromParent(e){let t=e.parent.conditions.indexOf(e.filterModel);return e.parent.conditions.splice(t,1),t}moveItemToIndex(e,t,i){var s;let r,a=this.items[t],o=(null==(s=a.filterModel)?void 0:s.filterType)==="join"&&"bottom"===i,n=o?a.filterModel:a.parent;!n||this.isChildOrSelf(n,e.filterModel)||a===e||(this.removeItemFromParent(e),o?r=0:-1===(r=n.conditions.indexOf(a.filterModel))?r=n.conditions.length:"bottom"===i&&(r+=1),n.conditions.splice(r,0,e.filterModel),this.refreshList(!1))}isChildOrSelf(e,t){return e===t||"join"===t.filterType&&t.conditions.some(t=>this.isChildOrSelf(e,t))}setupFilterModel(){let e=this.formatFilterModel(this.advancedFilterService.getModel());return this.stringifiedModel=JSON.stringify(e),e}formatFilterModel(e){return"join"!==(e=null!=e?e:{filterType:"join",type:"AND",conditions:[]}).filterType&&(e={filterType:"join",type:"AND",conditions:[e]}),e}buildList(){let e=(t,i,s,r)=>
341{i.push({filterModel:t,level:s,parent:r,valid:!0,showMove:this.showMove}),"join"===t.filterType&&(t.conditions.forEach(r=>e(r,i,s+1,t)),0===s&&i.push({filterModel:null,level:s+1,parent:t,valid:!0}))};this.items=[],e(this.filterModel,this.items,0)}refreshList(e){if(!e){let e=[];this.items.forEach(t=>{t.valid||e.push(t.filterModel)}),this.buildList(),e.length&&this.items.forEach(t=>{t.filterModel&&e.includes(t.filterModel)&&(t.valid=!1)})}this.virtualList.refresh(e),this.validate()}updateItemComponent(e,t){let i=this.items.indexOf(e),s=(e,t)=>{let i=this.items.find(t=>t.filterModel===e),r=null==i?void 0:i.parent;if(r){let{conditions:i}=r;s(r,t),t.push(i[i.length-1]===e)}},r=[],{filterModel:a}=e;a&&(s(a,r),r[0]=!1);let o=(null==a?void 0:a.filterType)==="join"&&!!a.conditions.length;t.setState({disableMoveUp:1===i,disableMoveDown:!this.canMoveDown(e,i),treeLines:r,showStartTreeLine:o})}createItemComponent(e,t){let i=this.createBean(e.filterModel?new A1(e,this.dragFeature,t):new Aq(e,t));return i.addManagedListeners(i,{advancedFilterBuilderRemoved:({item:e})=>this.removeItem(e),advancedFilterBuilderValueChanged:()=>this.validate(),advancedFilterBuilderAdded:({item:e,isJoin:t})=>this.addItem(e,t),advancedFilterBuilderMoved:({item:e,backwards:t})=>this.moveItemUpDown(e,t)}),i instanceof A1&&this.updateItemComponent(e,i),i}addItem(e,t){let{parent:i,level:s,filterModel:r}=e,a=(null==r?void 0:r.filterType)==="join",o=t?{filterType:"join",type:"AND",conditions:[]}:{},n=a?r:i,l=a?0:n.conditions.indexOf(r);l>=0?(a||(l+=1),n.conditions.splice(l,0,o)):n.conditions.push(o);let h=this.items.indexOf(e),d=h>=0;if(d){e.filterModel&&h++;let i=[{filterModel:o,level:a?s+1:s,parent:n,valid:t,showMove:this.showMove}];this.items.splice(h,0,...i)}if(this.refreshList(d),d){var u;null==(u=this.virtualList.getComponentAt(h))||u.afterAdd()}}removeItem(e){var t;let i=e.parent,{filterModel:s}=e,r=i.conditions.indexOf(s);i.conditions.splice(r,1);let a=(null==(t=e.filterModel)?void 0:t.filterType)==="join",o=this.items.indexOf(e),n=!a&&o>=0;n&&this.items.splice(o,1),this.refreshList(n),o>=0&&this.virtualList.focusRow(o)}moveItemUpDown(e,t){let i=this.items.indexOf(e),s=t?i-1:i+1;if(0===s||!t&&!this.canMoveDown(e,i))return;let r=this.items[s],a=this.removeItemFromParent(e),{level:o,filterModel:n,parent:l}=e,{level:h,filterModel:d,parent:u}=r;if(t)if(h===o&&"join"===d.filterType)d.conditions.push(n);else if(h<=o){let e=u.conditions.indexOf(d);u.conditions.splice(e,0,n)}else l.conditions[a-1].conditions.push(n);else if(h===o)if("join"===d.filterType)d.conditions.splice(0,0,n);else{let e=u.conditions.indexOf(d);u.conditions.splice(e+1,0,n)}else if(a<l.conditions.length)l.conditions.splice(a+1,0,n);else{let e=this.items.find(e=>e.filterModel===l),t=e.parent.conditions.indexOf(e.filterModel)+1;e.parent.conditions.splice(t,0,n)}this.refreshList(!1);let c=this.items.findIndex(({filterModel:e})=>e===n);if(c>=0){let e=this.virtualList.getComponentAt(c);e instanceof A1&&e.focusMoveButton(t)}}canMoveDown(e,t){return(1!==e.level||t!==this.items.length-2)&&(1!==e.level||e.parent.conditions[e.parent.conditions.length-1]!==e.filterModel)}close(){this.advancedFilterService.getCtrl().toggleFilterBuilder({source:"ui"})}validate(){let e=!this.items.every(({valid:e})=>e);e?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationIncomplete"):(e=JSON.stringify(this.filterModel)===this.stringifiedModel)?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationAlreadyApplied"):this.validationMessage=null,sa(this.eApplyFilterButton,e),this.validationTooltipFeature.refreshToolTip()}validateItems(){let e=e=>{e.type=void 0},t=e=>{delete e.filter};this.items.forEach(i=>{if(!i.valid||!i.filterModel||"join"===i.filterModel.filterType)return;let{filterModel:s}=i,{colId:r}=s,a=this.advancedFilterExpressionService.getColumnAutocompleteEntries().find(({key:e})=>e===r),o=this.advancedFilterExpressionService.getColumnDetails(s.colId);if(!a||!o.column){i.valid=!1,s.colId=void 0,e(s),t(s);return}let n=this.advancedFilterExpressionService.getDataTypeExpressionOperator(o.baseCellDataType).operators[s.type];
341if(!n){i.valid=!1,e(s),t(s);return}if(n.numOperands>0&&!eM(s.filter)){i.valid=!1;return}})}},A3=class extends tk{constructor(e){super(),this.enabled=e}wireBeans(e){this.ctrlsService=e.ctrlsService,this.popupService=e.popupService,this.advancedFilterExpressionService=e.advancedFilterExpressionService,this.environment=e.environment}postConstruct(){this.hasAdvancedFilterParent=!!this.gos.get("advancedFilterParent"),this.ctrlsService.whenReady(this,()=>this.setAdvancedFilterComp()),this.addManagedEventListeners({advancedFilterEnabledChanged:({enabled:e})=>this.onEnabledChanged(e)}),this.addManagedPropertyListener("advancedFilterParent",()=>this.updateComps()),this.addDestroyFunc(()=>{this.destroyAdvancedFilterComp(),this.destroyBean(this.eBuilderComp),this.eBuilderDialog&&this.eBuilderDialog.isAlive()&&this.destroyBean(this.eBuilderDialog)})}setupHeaderComp(e){if(this.eHeaderComp){var t;null==(t=this.eHeaderComp)||t.getGui().remove(),this.destroyBean(this.eHeaderComp)}this.eHeaderComp=this.createManagedBean(new A_(this.enabled&&!this.hasAdvancedFilterParent)),e.insertAdjacentElement("beforebegin",this.eHeaderComp.getGui())}focusHeaderComp(){return!!this.eHeaderComp&&(this.eHeaderComp.getFocusableElement().focus(),!0)}refreshComp(){var e,t;null==(e=this.eFilterComp)||e.refresh(),null==(t=this.eHeaderComp)||t.refresh()}refreshBuilderComp(){var e;null==(e=this.eBuilderComp)||e.refresh()}getHeaderHeight(){var e,t;return null!=(e=null==(t=this.eHeaderComp)?void 0:t.getHeight())?e:0}setInputDisabled(e){var t,i;null==(t=this.eFilterComp)||t.setInputDisabled(e),null==(i=this.eHeaderComp)||i.setInputDisabled(e)}toggleFilterBuilder(e){let{source:t,force:i,eventSource:s}=e;if(i&&this.eBuilderDialog||!1===i&&!this.eBuilderDialog)return;if(this.eBuilderDialog){this.builderDestroySource=t,this.destroyBean(this.eBuilderDialog);return}this.setInputDisabled(!0);let{width:r,height:a,minWidth:o}=this.getBuilderDialogSize();this.eBuilderComp=this.createBean(new A2),this.eBuilderDialog=this.createBean(new Av({title:this.advancedFilterExpressionService.translate("advancedFilterBuilderTitle"),component:this.eBuilderComp,width:r,height:a,resizable:!0,movable:!0,maximizable:!0,centered:!0,closable:!0,minWidth:o,afterGuiAttached:()=>{var e;return null==(e=this.eBuilderComp)?void 0:e.afterGuiAttached()},postProcessPopupParams:{type:"advancedFilterBuilder",eventSource:s}})),this.dispatchFilterBuilderVisibleChangedEvent(t,!0),this.eBuilderDialog.addEventListener("destroyed",()=>{var e;this.destroyBean(this.eBuilderComp),this.eBuilderComp=void 0,this.eBuilderDialog=void 0,this.setInputDisabled(!1),this.dispatchLocalEvent({type:"advancedFilterBuilderClosed"}),this.dispatchFilterBuilderVisibleChangedEvent(null!=(e=this.builderDestroySource)?e:"ui",!1),this.builderDestroySource=void 0})}dispatchFilterBuilderVisibleChangedEvent(e,t){this.eventService.dispatchEvent({type:"advancedFilterBuilderVisibleChanged",source:e,visible:t})}getBuilderDialogSize(){var e,t;let i=null!=(e=null==(t=this.gos.get("advancedFilterBuilderParams"))?void 0:t.minWidth)?e:500,s=this.popupService.getPopupParent();return{width:Math.min(Math.max(600,i),Math.round(su(s))-2),height:Math.min(600,Math.round(.75*sd(s))-2),minWidth:i}}onEnabledChanged(e){this.enabled=e,this.updateComps()}updateComps(){this.setAdvancedFilterComp(),this.setHeaderCompEnabled(),this.eventService.dispatchEvent({type:"headerHeightChanged"})}setAdvancedFilterComp(){if(this.destroyAdvancedFilterComp(),!this.enabled)return;let e=this.gos.get("advancedFilterParent");
341if(this.hasAdvancedFilterParent=!!e,e){let t=this.createBean(new AU),i=t.getGui();this.environment.applyThemeClasses(i),i.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),e.appendChild(i),this.eFilterComp=t}}setHeaderCompEnabled(){var e;null==(e=this.eHeaderComp)||e.setEnabled(this.enabled&&!this.hasAdvancedFilterParent)}destroyAdvancedFilterComp(){this.eFilterComp&&(sv(this.eFilterComp.getGui()),this.destroyBean(this.eFilterComp))}},A4=class{constructor(e){this.params=e,this.operators=[],this.operatorStartPositions=[],this.operatorEndPositions=[],this.activeOperator=0,this.validationError=null}parseExpression(e){this.operators.push(""),this.operatorStartPositions.push(e),this.operatorEndPositions.push(void 0);let{expression:t}=this.params;for(;e<t.length;){let i=t[e];if(" "===i){if(this.parseOperator(e-1))return this.activeOperator++,e-1;this.operators[this.activeOperator]+=i}else this.operators[this.activeOperator]+=i;e++}return this.parseOperator(e-1),e}isValid(){return!this.validationError&&(!this.operators.length||!!this.parsedOperator)}getValidationError(){return this.validationError}getFunction(){return"OR"===this.parsedOperator?"||":"&&"}getModel(){return"OR"===this.parsedOperator?"OR":"AND"}getAutocompleteListParams(e,t){let i;if(null==t)i="";else{let s=this.operators[t],r=this.operatorEndPositions[t];i=AI(s,e,null==r?this.params.expression.length:r+1)}let s=this.params.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries();return(t||null==t&&this.activeOperator)&&(s=s.filter(({key:e})=>e===this.parsedOperator)),this.params.advancedFilterExpressionService.generateAutocompleteListParams(s,"join",i)}updateExpression(e,t,i){var s,r;let{expression:a}=this.params,o=null!=(s=t.displayValue)?s:t.key;if(0===i)for(let e=this.operatorEndPositions.length-1;e>0;e--){let t=this.operatorEndPositions[e];null!=t&&(a=AA(a,this.operatorStartPositions[e],t,o).updatedValue)}let n=this.operatorStartPositions.length>i?this.operatorStartPositions[i]:e,l=null!=(r=this.operatorEndPositions.length>i?this.operatorEndPositions[i]:void 0)?r:AR(a,e,!0).endPosition;return AA(a,n,l,o,!0)}getNumOperators(){return this.operators.length}getLastOperatorEndPosition(){return this.operatorEndPositions[this.operatorEndPositions.length-1]}parseOperator(e){let t=this.operators.length>this.activeOperator?this.operators[this.activeOperator]:"",i=this.params.advancedFilterExpressionService.getExpressionJoinOperators(),s=AN(t,i,e=>e);if(s){this.operatorEndPositions[this.activeOperator]=e;let r=i[s];if(this.activeOperator){if(s!==this.parsedOperator)return this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationJoinOperatorMismatch"),startPosition:e-t.length+1,endPosition:e}),!1}else this.parsedOperator=s;return t!==r&&(AT(this.params,t,r,e),this.operators[this.activeOperator]=r),!0}return null!==s&&(this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidJoinOperator"),startPosition:e-t.length+1,endPosition:e}),!0)}},A6=class e{constructor(e,t){this.params=e,this.startPosition=t,this.expectingExpression=!0,this.expectingOperator=!1,this.expressionParsers=[],this.operatorParser=new A4(this.params),this.missingEndBracket=!1,this.extraEndBracket=!1}parseExpression(){let t=this.startPosition,{expression:i}=this.params;for(;t<i.length;){let s=i[t];if("("!==s||this.expectingOperator)if(")"===s)return this.endPosition=t-1,0===this.startPosition&&(this.extraEndBracket=!0),t;else if(" "===s);else if(this.expectingExpression){let e=new Ak(this.params,t);t=e.parseExpression(),this.expressionParsers.push(e),this.expectingExpression=!1,this.expectingOperator=!0}else this.expectingOperator&&(t=this.operatorParser.parseExpression(t),this.expectingOperator=!1,this.expectingExpression=!0);else{let i=new e(this.params,t+1);t=i.parseExpression(),this.expressionParsers.push(i),this.expectingExpression=!1,this.expectingOperator=!0}t++}return this.startPosition>0&&(this.missingEndBracket=!0),t}isValid(){return!this.missingEndBracket&&!this.extraEndBracket&&this.expressionParsers.length===this.operatorParser.getNumOperators()+1&&this.operatorParser.isValid()&&this.expressionParsers.every(e=>e.isValid())}getValidationError(){let e,t=this.operatorParser.getValidationError();for(let e=0;e<this.expressionParsers.length;e++){let i=this.expressionParsers[e].getValidationError();if(i)return t&&t.startPosition<i.startPosition?t:i}return t||(this.extraEndBracket?{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationExtraEndBracket"),startPosition:this.endPosition+1,endPosition:this.endPosition+1}:(this.expressionParsers.length===this.operatorParser.getNumOperators()?e="advancedFilterValidationMissingCondition":this.missingEndBracket&&(e="advancedFilterValidationMissingEndBracket"),e)?{message:this.params.advancedFilterExpressionService.translate(e),startPosition:this.params.expression.length,endPosition:this.params.expression.length}:null)}getFunctionString(e){let t=this.expressionParsers.length>1,i=this.expressionParsers.map(t=>t.getFunctionString(e)).join(` ${this.operatorParser.getFunction()} `);return t?`(${i})`:i}getFunctionParsed(e){let t=this.operatorParser.getFunction(),i=this.expressionParsers.map(t=>t.getFunctionParsed(e)),s="&&"===t?"every":"some";return(e,t,r)=>i[s](i=>i(e,t,r))}getAutocompleteListParams(e){if(null!=this.endPosition&&e>this.endPosition+1)return;if(!this.expressionParsers.length)return this.getColumnAutocompleteListParams();let t=this.getExpressionParserIndex(e);if(null==t)return"("===this.params.expression[e]?{enabled:!1}:this.getColumnAutocompleteListParams();let i=this.expressionParsers[t].getAutocompleteListParams(e);if(!i){if(t<this.expressionParsers.length-1)return this.operatorParser.getAutocompleteListParams(e,t);if(this.expressionParsers.length===this.operatorParser.getNumOperators()){let t=this.operatorParser.getLastOperatorEndPosition();return null==t||e<=t+1?this.operatorParser.getAutocompleteListParams(e,this.operatorParser.getNumOperators()-1):this.getColumnAutocompleteListParams()}return")"===this.params.expression[e-1]?{enabled:!1}:this.operatorParser.getAutocompleteListParams(e)}return i}updateExpression(e,t,i){let s=this.params.expression,r=this.getExpressionParserIndex(e);if(null==r){var a;let e="column"===i?this.params.advancedFilterExpressionService.getColumnValue(t):null!=(a=t.displayValue)?a:t.key;return AA(s,this.startPosition,this.startPosition,e,!0)}let o=this.expressionParsers[r].updateExpression(e,t,i);if(null==o)if("column"===i)return AA(s,e,s.length-1,this.params.advancedFilterExpressionService.getColumnValue(t),!0);else if(null!=this.endPosition&&e>this.endPosition+1)return null;else return this.operatorParser.updateExpression(e,t,r);return o}getModel(){return this.expressionParsers.length>1?{filterType:"join",type:this.operatorParser.getModel(),conditions:this.expressionParsers.map(e=>e.getModel())}:this.expressionParsers[0].getModel()}getColumnAutocompleteListParams(){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column","")}getExpressionParserIndex(e){let t;for(let i=0;i<this.expressionParsers.length&&!(this.expressionParsers[i].startPosition>e);i++)t=i;return t}},A5=class{constructor(e){this.params=e,this.valid=!1}parseExpression(){this.joinExpressionParser=new A6(this.params,0);let e=this.joinExpressionParser.parseExpression();return this.valid=e>=this.params.expression.length-1&&this.joinExpressionParser.isValid(),this.params.expression}isValid(){return this.valid}getValidationMessage(){let e=this.joinExpressionParser.getValidationError();if(!e)return null;let{message:t,startPosition:i,endPosition:s}=e;return i<this.params.expression.length?this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessage",[t,this.params.expression.slice(i,s+1).trim()]):this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessageAtEnd",[t])}getFunctionString(){let e=this.createFunctionParams();return{functionString:`return ${this.joinExpressionParser.getFunctionString(e)};`,params:e}}getFunctionParsed(){let e=this.createFunctionParams();return{expressionFunction:this.joinExpressionParser.getFunctionParsed(e),params:e}}getAutocompleteListParams(e){var t;return null!=(t=this.joinExpressionParser.getAutocompleteListParams(e))?t:{enabled:!1}}updateExpression(e,t,i){return this.joinExpressionParser.updateExpression(e,t,i)}getModel(){return this.isValid()?this.joinExpressionParser.getModel():null}createFunctionParams(){return{operands:[],operators:[],evaluatorParams:[]}}},A8=class extends tk{constructor(){super(...arguments),this.beanName="advancedFilterService",this.appliedExpression=null,this.expression=null,this.isValid=!0}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.dataTypeService=e.dataTypeService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){this.setEnabled(this.gos.get("enableAdvancedFilter"),!0),this.ctrl=this.createManagedBean(new A3(this.enabled)),this.expressionProxy={getValue:(e,t)=>
341{let i=this.columnModel.getColDefCol(e);return i?this.valueService.getValue(i,t,!0):void 0}},this.addManagedPropertyListener("enableAdvancedFilter",e=>this.setEnabled(!!e.currentValue)),this.addManagedEventListeners({newColumnsLoaded:e=>this.onNewColumnsLoaded(e)}),this.addManagedPropertyListener("includeHiddenColumnsInAdvancedFilter",()=>this.updateValidity())}isEnabled(){return this.enabled}isFilterPresent(){return!!this.expressionFunction}doesFilterPass(e){return this.expressionFunction(this.expressionProxy,e,this.expressionParams)}getModel(){var e;let t=this.createExpressionParser(this.appliedExpression);return null==t||t.parseExpression(),null!=(e=null==t?void 0:t.getModel())?e:null}setModel(e){let t=(e,i)=>{if("join"!==e.filterType)return this.advancedFilterExpressionService.parseColumnFilterModel(e);{let s=this.advancedFilterExpressionService.parseJoinOperator(e),r=e.conditions.map(e=>t(e)).filter(e=>eM(e)).join(` ${s} `);return i||e.conditions.length<=1?r:`(${r})`}},i=e?t(e,!0):null;this.setExpressionDisplayValue(i),this.applyExpression(),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp()}getExpressionDisplayValue(){return this.expression}setExpressionDisplayValue(e){this.expression=e}isCurrentExpressionApplied(){return this.appliedExpression===this.expression}createExpressionParser(e){return e?new A5({expression:e,columnModel:this.columnModel,dataTypeService:this.dataTypeService,valueService:this.valueService,advancedFilterExpressionService:this.advancedFilterExpressionService}):null}getDefaultExpression(e){let t=this.advancedFilterExpressionService.getColumnValue(e)+" ";return{updatedValue:t,updatedPosition:t.length}}isHeaderActive(){return!this.gos.get("advancedFilterParent")}getCtrl(){return this.ctrl}setEnabled(e,t){let i=this.enabled,s=eN(this.gos)||eO(this.gos);e&&!s&&ep("Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model."),this.enabled=e&&s,t||this.enabled===i||this.eventService.dispatchEvent({type:"advancedFilterEnabledChanged",enabled:this.enabled})}applyExpression(){let e=this.createExpressionParser(this.expression);null==e||e.parseExpression(),this.applyExpressionFromParser(e)}applyExpressionFromParser(e){if(this.isValid=!e||e.isValid(),!e||!this.isValid){this.expressionFunction=null,this.expressionParams=null,this.appliedExpression=null;return}let{expressionFunction:t,params:i}=this.getFunction(e);this.expressionFunction=t,this.expressionParams=i,this.appliedExpression=this.expression}getFunction(e){if(this.gos.get("suppressAdvancedFilterEval"))return e.getFunctionParsed();{let{functionString:t,params:i}=e.getFunctionString();return{expressionFunction:Function("expressionProxy","node","params",t),params:i}}}updateValidity(){this.advancedFilterExpressionService.resetColumnCaches();let e=this.createExpressionParser(this.expression);null==e||e.parseExpression();let t=(!e||e.isValid())!==this.isValid;return this.applyExpressionFromParser(e),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp(),t}onNewColumnsLoaded(e){var t;if("gridInitializing"!==e.source||!(null!=(t=this.dataTypeService)&&t.isPendingInference()))return;this.ctrl.setInputDisabled(!0);let[i]=this.addManagedEventListeners({dataTypesInferred:()=>{null==i||i(),this.ctrl.setInputDisabled(!1)}})}},A7="32.3.9",A9={version:A7,moduleName:`${eh.AdvancedFilterModule}-core`,beans:[A8,AV],dependantModules:[I9,oa]},Re={version:A7,moduleName:`${eh.AdvancedFilterModule}-api`,apiFunctions:{getAdvancedFilterModel:function(e){var t,i;return null!=(t=null==(i=e.filterManager)?void 0:i.getAdvancedFilterModel())?t:null},setAdvancedFilterModel:function(e,t){var i;null==(i=e.filterManager)||i.setAdvancedFilterModel(t)},showAdvancedFilterBuilder:function(e){var t;null==(t=e.filterManager)||t.toggleAdvancedFilterBuilder(!0,"api")},hideAdvancedFilterBuilder:function(e){var t;null==(t=e.filterManager)||t.toggleAdvancedFilterBuilder(!1,"api")}},dependantModules:[A9]},Rt={version:A7,moduleName:eh.AdvancedFilterModule,dependantModules:[A9,Re]},Ri={};function Rs(e){var t;null==(t=e.rangeService)||t.removeAllCellRanges()}IJ(Ri,{GridChartsModule:()=>FN,agCharts:()=>FO});var Rr=class extends tk{constructor(){super(...arguments),this.beanName="rangeService",this.cellRanges=[],this.bodyScrollListener=this.onBodyScroll.bind(this),this.dragging=!1,this.intersectionRange=!1}wireBeans(e){this.rowModel=e.rowModel,this.dragService=e.dragService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.cellNavigationService=e.cellNavigationService,this.pinnedRowModel=e.pinnedRowModel,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.ctrlsService=e.ctrlsService,this.valueService=e.valueService}postConstruct(){let e=this.onColumnsChanged.bind(this),t=()=>this.removeAllCellRanges(),i=this.refreshLastRangeStart.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnVisible:e,columnValueChanged:e,columnPivotModeChanged:t,columnRowGroupChanged:t,columnPivotChanged:t,columnGroupOpened:i,columnMoved:i,columnPinned:i}),this.ctrlsService.whenReady(this,e=>{let t=e.gridBodyCtrl;
341this.autoScrollService=new rK({scrollContainer:t.getBodyViewportElement(),scrollAxis:"xy",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),getHorizontalPosition:()=>t.getScrollFeature().getHScrollPosition().left,setHorizontalPosition:e=>t.getScrollFeature().setHorizontalScrollPosition(e),shouldSkipVerticalScroll:()=>!eG(this.gos,"normal"),shouldSkipHorizontalScroll:()=>!t.getScrollFeature().isHorizontalScrollShowing()})})}onColumnsChanged(){this.refreshLastRangeStart();let e=this.visibleColsService.getAllCols();this.cellRanges.forEach(t=>{let i=t.columns;t.columns=t.columns.filter(t=>t.isVisible()&&-1!==e.indexOf(t)),tg(i,t.columns)||this.dispatchChangedEvent(!1,!0,t.id)});let t=this.cellRanges.length;this.cellRanges=this.cellRanges.filter(e=>e.columns.length>0),t>this.cellRanges.length&&this.dispatchChangedEvent(!1,!0)}refreshLastRangeStart(){let e=tp(this.cellRanges);e&&this.refreshRangeStart(e)}isContiguousRange(e){let t=e.columns;if(!t.length)return!1;let i=this.visibleColsService.getAllCols(),s=t.map(e=>i.indexOf(e)).sort((e,t)=>e-t);return tp(s)-s[0]+1===t.length}getRangeStartRow(e){return e.startRow&&e.endRow?this.rowPositionUtils.before(e.startRow,e.endRow)?e.startRow:e.endRow:{rowIndex:0,rowPinned:this.pinnedRowModel.getPinnedTopRowCount()>0?"top":null}}getRangeEndRow(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.endRow:e.startRow;let t=this.pinnedRowModel.getPinnedBottomRowCount();return t>0?{rowIndex:t-1,rowPinned:"bottom"}:{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}}setRangeToCell(e,t=!1){if(!tt(this.gos))return;let i=this.calculateColumnsBetween(e.column,e.column);if(!i)return;(te(this.gos)||!t||eD(this.cellRanges))&&this.removeAllCellRanges(!0);let s={rowIndex:e.rowIndex,rowPinned:e.rowPinned},r={startRow:s,endRow:s,columns:i,startColumn:e.column};this.cellRanges.push(r),this.setNewestRangeStartCell(e),this.onDragStop(),this.dispatchChangedEvent(!0,!0)}extendLatestRangeToCell(e){if(this.isEmpty()||!this.newestRangeStartCell)return;let t=tp(this.cellRanges);this.updateRangeEnd(t,e)}updateRangeEnd(e,t,i=!1){let s=t.column,r=this.calculateColumnsBetween(e.startColumn,s);!(!r||this.isLastCellOfRange(e,t))&&(e.columns=r,e.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},i||this.dispatchChangedEvent(!0,!0,e.id))}refreshRangeStart(e){let{startColumn:t,columns:i}=e,s=(t,i)=>{let s=e.columns.filter(e=>e!==t);t?(e.startColumn=t,e.columns=i?[t,...s]:[...s,t]):e.columns=s},{left:r,right:a}=this.getRangeEdgeColumns(e);t===i[0]&&t!==r?s(r,!0):t===tp(i)&&t===a&&s(a,!1)}getRangeEdgeColumns(e){let t=this.visibleColsService.getAllCols(),i=e.columns.map(e=>t.indexOf(e)).filter(e=>e>-1).sort((e,t)=>e-t);return{left:t[i[0]],right:t[tp(i)]}}extendLatestRangeInDirection(e){if(this.isEmpty()||!this.newestRangeStartCell)return;let t=e.key,i=e.ctrlKey||e.metaKey,s=tp(this.cellRanges),r=this.newestRangeStartCell,a=s.columns[0],o=tp(s.columns),n=s.endRow.rowIndex,l=s.endRow.rowPinned,h=r.column===a?o:a,d=this.cellNavigationService.getNextCellToFocus(t,{column:h,rowIndex:n,rowPinned:l},i);if(d)return this.setCellRange({rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:d.rowIndex,rowEndPinned:d.rowPinned,columnStart:r.column,columnEnd:d.column}),d}setCellRange(e){tt(this.gos)&&(this.removeAllCellRanges(!0),this.addCellRange(e))}setCellRanges(e){tg(this.cellRanges,e)||(this.removeAllCellRanges(!0),e.forEach(e=>{e.columns&&e.startRow&&this.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.columns[0]}),this.cellRanges.push(e)}),this.dispatchChangedEvent(!1,!0))}setNewestRangeStartCell(e){this.newestRangeStartCell=e}clearCellRangeCellValues(e){let{cellRanges:t}=e,{cellEventSource:i="rangeService",dispatchWrapperEvents:s,wrapperEventSource:r="deleteKey"}=e;s&&(this.eventService.dispatchEvent({type:"cellSelectionDeleteStart",source:r}),this.eventService.dispatchEvent({type:"rangeDeleteStart",source:r})),t||(t=this.cellRanges),t.forEach(e=>{this.forEachRowInRange(e,t=>{let s=this.rowPositionUtils.getRowNode(t);if(s)for(let t=0;t<e.columns.length;t++){let r=this.columnModel.getCol(e.columns[t]);if(!r||!r.isCellEditable(s))continue;
341let a=this.valueService.getDeleteValue(r,s);s.setDataValue(r,a,i)}})}),s&&(this.eventService.dispatchEvent({type:"cellSelectionDeleteEnd",source:r}),this.eventService.dispatchEvent({type:"rangeDeleteEnd",source:r}))}createCellRangeFromCellRangeParams(e){return this.createPartialCellRangeFromRangeParams(e,!1)}createPartialCellRangeFromRangeParams(e,t){let i,s=!1;if(e.columns)i=e.columns.map(e=>this.columnModel.getCol(e)).filter(e=>e);else{let t=this.columnModel.getCol(e.columnStart),r=this.columnModel.getCol(e.columnEnd);if(!t||!r)return;(i=this.calculateColumnsBetween(t,r))&&i.length&&(s=i[0]!==t)}if(i&&(t||0!==i.length))return{startRow:null!=e.rowStartIndex?{rowIndex:e.rowStartIndex,rowPinned:e.rowStartPinned||null}:void 0,endRow:null!=e.rowEndIndex?{rowIndex:e.rowEndIndex,rowPinned:e.rowEndPinned||null}:void 0,columns:i,startColumn:s?tp(i):i[0]}}addCellRange(e){let t=this.gos;if(!tt(t))return;if(e9(t)&&te(t)&&this.cellRanges.length>0)return ep("cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`");let i=this.createCellRangeFromCellRangeParams(e);i&&(i.startRow&&this.setNewestRangeStartCell({rowIndex:i.startRow.rowIndex,rowPinned:i.startRow.rowPinned,column:i.startColumn}),this.cellRanges.push(i),this.dispatchChangedEvent(!1,!0,i.id))}getCellRanges(){return this.cellRanges}isEmpty(){return 0===this.cellRanges.length}isMoreThanOneCell(){let e=this.cellRanges.length;if(0===e)return!1;if(e>1)return!0;let t=this.cellRanges[0],i=this.getRangeStartRow(t),s=this.getRangeEndRow(t);return i.rowPinned!==s.rowPinned||i.rowIndex!==s.rowIndex||1!==t.columns.length}areAllRangesAbleToMerge(){let e,t=new Map;if(this.cellRanges.length<=1)return!0;
341for(let i of(this.cellRanges.forEach(e=>{this.forEachRowInRange(e,i=>{let s=`${i.rowPinned||"normal"}_${i.rowIndex}`,r=t.get(s),a=e.columns.map(e=>e.getId());if(r){let e=a.filter(e=>-1===r.indexOf(e));r.push(...e)}else t.set(s,a)})}),t.values())){let t=i.sort().join();if(void 0===e){e=t;continue}if(e!==t)return!1}return!0}forEachRowInRange(e,t){let i=this.getRangeStartRow(e),s=this.getRangeEndRow(e),r=i;for(;r&&(t(r),!this.rowPositionUtils.sameRow(r,s));)r=this.cellNavigationService.getRowBelow(r)}removeAllCellRanges(e){!this.isEmpty()&&(this.onDragStop(),this.cellRanges.length=0,e||this.dispatchChangedEvent(!1,!0))}onBodyScroll(){this.dragging&&this.lastMouseEvent&&this.onDragging(this.lastMouseEvent)}isCellInAnyRange(e){return this.getCellRangeCount(e)>0}isCellInSpecificRange(e,t){let i=null!==t.columns&&tS(t.columns,e.column),s=this.isRowInRange(e.rowIndex,e.rowPinned,t);return i&&s}isLastCellOfRange(e,t){let{startRow:i,endRow:s}=e,r=this.rowPositionUtils.before(i,s)?s:i,a=t.rowIndex===r.rowIndex&&t.rowPinned===r.rowPinned,o=e.columns[0],n=tp(e.columns),l=e.startColumn===o?n:o;return t.column===l&&a}isBottomRightCell(e,t){let i=this.visibleColsService.getAllCols(),s=e.columns.map(e=>i.indexOf(e)).sort((e,t)=>e-t),{startRow:r,endRow:a}=e,o=this.rowPositionUtils.before(r,a)?a:r,n=i.indexOf(t.column)===tp(s),l=t.rowIndex===o.rowIndex&&ex(t.rowPinned)===ex(o.rowPinned);return n&&l}getCellRangeCount(e){return this.isEmpty()?0:this.cellRanges.filter(t=>this.isCellInSpecificRange(e,t)).length}isRowInRange(e,t,i){let s=this.getRangeStartRow(i),r=this.getRangeEndRow(i),a={rowIndex:e,rowPinned:t||null},o=a.rowIndex===s.rowIndex&&a.rowPinned==s.rowPinned,n=a.rowIndex===r.rowIndex&&a.rowPinned==r.rowPinned;if(o||n)return!0;let l=!this.rowPositionUtils.before(a,s),h=this.rowPositionUtils.before(a,r);return l&&h}getDraggingRange(){return this.draggingRange}onDragStart(e){if(!tt(this.gos))return;let{ctrlKey:t,metaKey:i,shiftKey:s}=e,r=!te(this.gos)&&(t||i),a=s&&tc(this.cellRanges);!r&&(!a||eM(tp(this.cellRanges).type))&&this.removeAllCellRanges(!0);let o=this.dragService.getStartTarget();if(o&&this.updateValuesOnMove(o),this.lastCellHovered){if(this.dragging=!0,this.lastMouseEvent=e,this.intersectionRange=r&&this.getCellRangeCount(this.lastCellHovered)>1,a||this.setNewestRangeStartCell(this.lastCellHovered),this.cellRanges.length>0)this.draggingRange=tp(this.cellRanges);else{let e={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned};this.draggingRange={startRow:e,endRow:e,columns:[this.lastCellHovered.column],startColumn:this.newestRangeStartCell.column},this.cellRanges.push(this.draggingRange)}this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener),this.dispatchChangedEvent(!0,!1,this.draggingRange.id)}}intersectLastRange(e){if(e&&this.dragging||te(this.gos)||this.isEmpty())return;let t=this.rowPositionUtils,i=tp(this.cellRanges),s=this.getRangeStartRow(i),r=this.getRangeEndRow(i),a=[];this.cellRanges.slice(0,-1).forEach(e=>{let o=this.getRangeStartRow(e),n=this.getRangeEndRow(e),l=e.columns,h=l.filter(e=>-1===i.columns.indexOf(e));if(h.length===l.length||t.before(r,o)||t.before(n,s))return void a.push(e);let d=a.length;if(t.before(o,s)){let e={columns:[...l],startColumn:i.startColumn,startRow:{...o},endRow:this.cellNavigationService.getRowAbove(s)};a.push(e)}if(h.length>0){let e={columns:h,startColumn:tS(h,i.startColumn)?i.startColumn:h[0],startRow:this.rowMax([{...s},{...o}]),endRow:this.rowMin([{...r},{...n}])};a.push(e)}t.before(r,n)&&a.push({columns:[...l],startColumn:i.startColumn,startRow:this.cellNavigationService.getRowBelow(r),endRow:{...n}}),a.length-d==1&&(a[a.length-1].id=e.id)}),this.cellRanges=a,e&&this.dispatchChangedEvent(!1,!0)}rowMax(e){let t;return e.forEach(e=>{(void 0===t||this.rowPositionUtils.before(t,e))&&(t=e)}),t}rowMin(e){let t;return e.forEach(e=>{(void 0===t||this.rowPositionUtils.before(e,t))&&(t=e)}),t}updateValuesOnMove(e){let t=tF(this.gos,e,nr.DOM_DATA_KEY_CELL_CTRL),i=null==t?void 0:t.getCellPosition();if(this.cellHasChanged=!1,!(!i||this.lastCellHovered&&this.cellPositionUtils.equals(i,this.lastCellHovered))){if(null!=t&&t.isEditing())return void this.dragService.cancelDrag(e);this.lastCellHovered&&(this.cellHasChanged=!0),this.lastCellHovered=i}}onDragging(e){if(!this.dragging||!e)return;
341this.updateValuesOnMove(e.target),this.lastMouseEvent=e;let t=this.lastCellHovered,i=e=>t&&t.rowPinned===e&&this.newestRangeStartCell.rowPinned===e,s=i("top")||i("bottom");if(this.autoScrollService.check(e,s),!this.cellHasChanged)return;let r=this.calculateColumnsBetween(this.newestRangeStartCell.column,t.column);r&&(this.draggingRange.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},this.draggingRange.columns=r,this.dispatchChangedEvent(!1,!1,this.draggingRange.id))}onDragStop(){if(!this.dragging)return;let{id:e}=this.draggingRange;this.autoScrollService.ensureCleared(),this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener),this.lastMouseEvent=null,this.dragging=!1,this.draggingRange=void 0,this.lastCellHovered=void 0,this.intersectionRange&&(this.intersectionRange=!1,this.intersectLastRange()),this.dispatchChangedEvent(!1,!0,e)}dispatchChangedEvent(e,t,i){this.eventService.dispatchEvent({type:"cellSelectionChanged",started:e,finished:t,id:i}),this.eventService.dispatchEvent({type:"rangeSelectionChanged",started:e,finished:t,id:i})}calculateColumnsBetween(e,t){let i=this.visibleColsService.getAllCols(),s=e===t,r=i.indexOf(e),a=e=>ep(`column ${e.getId()} is not visible`);if(r<0)return void a(e);let o=s?r:i.indexOf(t);if(o<0)return void a(t);if(s)return[e];let n=Math.min(r,o),l=n===r?o:r,h=[];for(let e=n;e<=l;e++)h.push(i[e]);return h}},Ra=class extends s${constructor(){super(...arguments),this.changedCalculatedValues=!1,this.dragging=!1,this.shouldDestroyOnEndDragging=!1}wireBeans(e){this.dragService=e.dragService,this.rangeService=e.rangeService,this.mouseEventService=e.mouseEventService,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.ctrlsService=e.ctrlsService}postConstruct(){this.dragService.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragStart:this.onDragStart.bind(this),onDragging:e=>{this.dragging=!0,this.rangeService.autoScrollService.check(e),this.changedCalculatedValues&&(this.onDrag(e),this.changedCalculatedValues=!1)},onDragStop:e=>{this.dragging=!1,this.onDragEnd(e),this.clearDragProperties(),this.shouldDestroyOnEndDragging&&this.destroy()},onDragCancel:()=>{this.dragging=!1,this.onDragCancel(),this.clearDragProperties()}}),this.addManagedElementListeners(this.getGui(),{mousedown:this.preventRangeExtension.bind(this)})}isDragging(){return this.dragging}getCellCtrl(){return this.cellCtrl}setCellCtrl(e){this.cellCtrl=e}getCellRange(){return this.cellRange}setCellRange(e){this.cellRange=e}getRangeStartRow(){return this.rangeStartRow}setRangeStartRow(e){this.rangeStartRow=e}getRangeEndRow(){return this.rangeEndRow}setRangeEndRow(e){this.rangeEndRow=e}getLastCellHovered(){return this.lastCellHovered}preventRangeExtension(e){e.stopPropagation()}onDragStart(e){[this.cellHoverListener]=this.addManagedElementListeners(this.ctrlsService.get("gridCtrl").getGui(),{mousemove:this.updateValuesOnMove.bind(this)}),document.body.classList.add(this.getDraggingCssClass())}getDraggingCssClass(){return`ag-dragging-${this.type===o7.FILL?"fill":"range"}-handle`}updateValuesOnMove(e){let t=this.mouseEventService.getCellPositionForEvent(e);!t||this.lastCellHovered&&this.cellPositionUtils.equals(t,this.lastCellHovered)||(this.lastCellHovered=t,this.changedCalculatedValues=!0)}clearDragProperties(){this.clearValues(),this.rangeService.autoScrollService.ensureCleared(),document.body.classList.remove(this.getDraggingCssClass())}getType(){return this.type}refresh(e){let t=this.getCellCtrl(),i=this.getGui(),s=tp(this.rangeService.getCellRanges()),r=s.startRow,a=s.endRow;if(r&&a&&(this.rowPositionUtils.before(a,r)?(this.setRangeStartRow(a),this.setRangeEndRow(r)):(this.setRangeStartRow(r),this.setRangeEndRow(a))),t!==e||!sC(i)){this.setCellCtrl(e);let t=e.getComp().getParentOfValue();t&&t.appendChild(i)}this.setCellRange(s)}clearValues(){this.lastCellHovered=void 0,this.removeListeners()}removeListeners(){this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0)}destroy(){if(!this.shouldDestroyOnEndDragging&&this.isDragging()){ss(this.getGui(),!1),this.shouldDestroyOnEndDragging=!0;return}this.shouldDestroyOnEndDragging=!1,super.destroy(),this.removeListeners();let e=this.getGui();e.parentElement&&e.parentElement.removeChild(e)}},Ro=class extends Ra{constructor(){super('<div class="ag-fill-handle"></div>'),this.markedCells=[],this.cellValues=[],this.isUp=!1,this.isLeft=!1,this.isReduce=!1,this.type=o7.FILL}wireBeans(e){super.wireBeans(e),this.valueService=e.valueService,this.navigationService=e.navigationService,this.cellNavigationService=e.cellNavigationService,this.visibleColsService=e.visibleColsService}updateValuesOnMove(e){let t;super.updateValuesOnMove(e),this.initialXY||(this.initialXY=this.mouseEventService.getNormalisedPosition(e));let{x:i,y:s}=this.initialXY,{x:r,y:a}=this.mouseEventService.getNormalisedPosition(e),o=Math.abs(i-r),n=Math.abs(s-a),l=this.getFillHandleDirection();(t="xy"===l?o>n?"x":"y":l)!==this.dragAxis&&(this.dragAxis=t,this.changedCalculatedValues=!0)}onDrag(e){if(!this.initialPosition){let e=this.getCellCtrl();if(!e)return;this.initialPosition=e.getCellPosition()}let t=this.getLastCellHovered();t&&this.markPathFrom(this.initialPosition,t)}onDragEnd(e){let t;if(this.initialXY=null,!this.markedCells.length)return;let i="x"===this.dragAxis,s=this.getCellRange(),r=s.columns.length,a=this.getRangeStartRow(),o=this.getRangeEndRow();if(this.isUp||this.isLeft){let e=i?a:this.lastCellMarked;t=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:e.rowIndex,rowStartPinned:e.rowPinned,columnStart:i?this.lastCellMarked.column:s.columns[0],rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnEnd:s.columns[r-1]})}else t=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,columnStart:s.columns[0],rowEndIndex:i?o.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:i?o.rowPinned:this.lastCellMarked.rowPinned,columnEnd:i?this.lastCellMarked.column:s.columns[r-1]});t&&(this.eventService.dispatchEvent({type:"fillStart"}),this.handleValueChanged(s,t,e),this.rangeService.setCellRanges([t]),this.eventService.dispatchEvent({type:"fillEnd",initialRange:s,finalRange:t}))}onDragCancel(){this.initialXY=null,this.markedCells.length&&this.clearMarkedPath()}getFillHandleDirection(){var e;let t=null==(e=ts(this.gos))?void 0:e.direction;return t?"x"!==t&&"y"!==t&&"xy"!==t?(ep("valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'."),"xy"):t:"xy"}handleValueChanged(e,t,i){var s;let r=this.rangeService.getRangeEndRow(e),a=this.rangeService.getRangeStartRow(e),o=this.rangeService.getRangeEndRow(t),n=this.rangeService.getRangeStartRow(t),l="y"===this.dragAxis;if(this.isReduce&&!(null!=(s=ts(this.gos))&&s.suppressClearOnFillReduction)){let i=l?e.columns:e.columns.filter(e=>0>t.columns.indexOf(e)),s=l?this.cellNavigationService.getRowBelow(o):n;s&&this.clearCellsInRange(s,r,i);return}let h=[],d=[],u=[],c=[],p=!0,g=0,m=()=>{h.length=0,d.length=0,u.length=0,c.length=0,g=0},v=(t,i)=>{let s=this.isUp?r:a,d=!1;for(l&&(p=!0,m());!d&&s;){let u=this.rowPositionUtils.getRowNode(s);if(!u)break;l&&t?f(h,t,u,()=>!this.rowPositionUtils.sameRow(s,this.isUp?a:r)):i&&(p=!0,m(),i.forEac
341h(t=>f(h,t,u,()=>t!==(this.isLeft?e.columns[0]:tp(e.columns))))),d=this.rowPositionUtils.sameRow(s,this.isUp?n:o),s=this.isUp?this.cellNavigationService.getRowAbove(s):this.cellNavigationService.getRowBelow(s)}},f=(e,t,s,r)=>{let a,o=!1;if(p)a=this.valueService.getValue(t,s),d.push(a),u.push(this.valueService.getValue(t,s,void 0,!0)),c.push(this.valueService.formatValue(t,s,a)),p=r();else{let{value:r,fromUserFunction:h,sourceCol:p,sourceRowNode:m}=this.processValues({event:i,values:e,initialValues:d,initialNonAggregatedValues:u,initialFormattedValues:c,col:t,rowNode:s,idx:g++});if(a=r,t.isCellEditable(s)){let e=this.valueService.getValue(t,s);if(!h){var n,l;p&&(null==(n=p.getColDef())?void 0:n.useValueFormatterForExport)!==!1&&(a=null!=(l=this.valueService.formatValue(p,m,a))?l:a),!1!==t.getColDef().useValueParserForImport&&(a=this.valueService.parseValue(t,s,p?a:eI(a),e))}h&&e===a?o=!0:s.setDataValue(t,a,"rangeService")}}o||e.push({value:a,column:t,rowNode:s})};l?e.columns.forEach(e=>{v(e)}):v(void 0,this.isLeft?[...t.columns].reverse():t.columns)}clearCellsInRange(e,t,i){let s={startRow:e,endRow:t,columns:i,startColumn:i[0]};this.rangeService.clearCellRangeCellValues({cellRanges:[s]})}processValues(e){var t;let i,{event:s,values:r,initialValues:a,initialNonAggregatedValues:o,initialFormattedValues:n,col:l,rowNode:h,idx:d}=e,u=null==(t=ts(this.gos))?void 0:t.setFillValue;if(i="y"===this.dragAxis?this.isUp?"up":"down":this.isLeft?"left":"right",u){let e=u(this.gos.addGridCommonParams({event:s,values:r.map(({value:e})=>e),initialValues:a,initialNonAggregatedValues:o,initialFormattedValues:n,currentIndex:d,currentCellValue:this.valueService.getValue(l,h),direction:i,column:l,rowNode:h}));if(!1!==e)return{value:e,fromUserFunction:!0}}let c=!r.some(({value:e})=>{let t=parseFloat(e);return isNaN(t)||t.toString()!==e.toString()});if(s.altKey||!c){if(c&&1===a.length){let e=this.isUp||this.isLeft?-1:1;return{value:parseFloat(tp(r).value)+ +e,fromUserFunction:!1}}let{value:e,column:t,rowNode:i}=r[d%r.length];return{value:e,fromUserFunction:!1,sourceCol:t,sourceRowNode:i}}return{value:tp(function(e){let t=e.length,i=0;if(t<=1)return e;for(let t=0;t<e.length;t++){let s=e[t],r=s.toString().split("e-");if(r.length>1){i=Math.max(i,parseInt(r[1],10));continue}Math.floor(s)!==s&&(i=Math.max(i,s.toString().split(".")[1].length))}let s=0,r=0,a=0,o=0,n=0;for(let i=0;i<t;i++)n=e[i],s+=i,r+=n,o+=i*i,a+=i*n;let l=(t*a-s*r)/(t*o-s*s),h=r/t-l*s/t,d=[];for(let e=0;e<=t;e++)d.push(parseFloat((e*l+h).toFixed(i)));return d}(r.map(({value:e})=>Number(e)))),fromUserFunction:!1}}clearValues(){this.clearMarkedPath(),this.clearCellValues(),this.lastCellMarked=void 0,super.clearValues()}clearMarkedPath(){this.markedCells.forEach(e=>{if(!e.isAlive())return;let t=e.getComp();t.addOrRemoveCssClass("ag-selection-fill-top",!1),t.addOrRemoveCssClass("ag-selection-fill-right",!1),t.addOrRemoveCssClass("ag-selection-fill-bottom",!1),t.addOrRemoveCssClass("ag-selection-fill-left",!1)}),this.markedCells.length=0,this.isUp=!1,this.isLeft=!1,this.isReduce=!1}clearCellValues(){this.cellValues.length=0}markPathFrom(e,t){if(this.clearMarkedPath(),this.clearCellValues(),"y"===this.dragAxis){if(this.rowPositionUtils.sameRow(t,e))return;let i=this.rowPositionUtils.before(t,e),s=this.getRangeStartRow(),r=this.getRangeEndRow();i&&(t.rowPinned==s.rowPinned&&t.rowIndex>=s.rowIndex||s.rowPinned!=r.rowPinned&&t.rowPinned==r.rowPinned&&t.rowIndex<=r.rowIndex)?(this.reduceVertical(e,t),this.isReduce=!0):(this.extendVertical(e,t,i),this.isReduce=!1)}else{let i=e.column,s=t.column;if(i===s)return;let r=this.visibleColsService.getAllCols(),a=r.indexOf(i),o=r.indexOf(s);o<=a&&o>=r.indexOf(this.getCellRange().columns[0])?(this.reduceHorizontal(e,t),this.isReduce=!0):(this.extendHorizontal(e,t,o<a),this.isReduce=!1)}this.lastCellMarked=t}extendVertical(e,t,i){let{navigationService:s,rangeService:r}=this,a=e;do{let o=this.getCellRange(),n=o.columns.length;for(let l=0;l<n;l++){let h=o.columns[l],d={...{rowIndex:a.rowIndex,rowPinned:a.rowPinned},column:h},u=r.isCellInSpecificRange(d,o),c=this.rowPositionUtils.sameRow(a,e);if(i&&(this.isUp=!0),!c){let e=s.getCellByPosition(d);if(e){this.markedCells.push(e);let s=e.getComp();u||(s.addOrRemoveCssClass("ag-selection-fill-left",0===l),s.addOrRemoveCssClass("ag-selection-fill-right",l===n-1)),s.addOrRemoveCssClass(i?"ag-selection-fill-top":"ag-selection-fill-bottom",this.rowPositionUtils.sameRow(a,t))}}}if(this.rowPositionUtils.sameRow(a,t))break}while(a=i?this.cellNavigationService.getRowAbove(a):this.cellNavigationService.getRowBelow(a))}reduceVertical(e,t){let i=e;do{let e=this.getCellRange(),s=e.columns.length,r=this.rowPositionUtils.sameRow(i,t);for(let r=0;r<s;r++){let s={...{rowIndex:i.rowIndex,rowPinned:i.rowPinned},column:e.columns[r]},a=this.navigationService.getCellByPosition(s);a&&(this.markedCells.push(a),a.getComp().addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(i,t)))}if(r)break}while(i=this.cellNavigationService.getRowAbove(i))}extendHorizontal(e,t,i){let s=this.visibleColsService.getAllCols(),r=s.indexOf(i?t.column:e.column),a=s.indexOf(i?this.getCellRange().columns[0]:t.column),o=+!i,n=s.slice(r+o,a+o),l=this.getRangeStartRow(),h=this.getRangeEndRow();
341n.forEach(e=>{let t=l,s=!1;do{s=this.rowPositionUtils.sameRow(t,h);let r=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(r){this.markedCells.push(r);let s=r.getComp();s.addOrRemoveCssClass("ag-selection-fill-top",this.rowPositionUtils.sameRow(t,l)),s.addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(t,h)),i?(this.isLeft=!0,s.addOrRemoveCssClass("ag-selection-fill-left",e===n[0])):s.addOrRemoveCssClass("ag-selection-fill-right",e===tp(n))}t=this.cellNavigationService.getRowBelow(t)}while(!s)})}reduceHorizontal(e,t){let i=this.visibleColsService.getAllCols(),s=i.indexOf(t.column),r=i.indexOf(e.column),a=i.slice(s,r),o=this.getRangeStartRow(),n=this.getRangeEndRow();a.forEach(e=>{let t=o,i=!1;do{i=this.rowPositionUtils.sameRow(t,n);let s=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});s&&(this.markedCells.push(s),s.getComp().addOrRemoveCssClass("ag-selection-fill-right",e===a[0])),t=this.cellNavigationService.getRowBelow(t)}while(!i)})}refresh(e){let t=this.rangeService.getCellRanges()[0];t.startRow&&t.endRow?super.refresh(e):this.destroy()}},Rn=class extends Ra{constructor(){super('<div class="ag-range-handle"></div>'),this.type=o7.RANGE,this.rangeFixed=!1}onDrag(e){let t=this.getLastCellHovered();if(!t)return;let i=this.rangeService.getCellRanges(),s=tp(i);this.rangeFixed||(this.fixRangeStartEnd(s),this.rangeFixed=!0),this.endPosition={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column},2===i.length&&i[0].type===o9.DIMENSION&&s.type===o9.VALUE&&(this.rowPositionUtils.sameRow(this.endPosition,this.rangeService.getRangeEndRow(s))||this.rangeService.updateRangeEnd(i[0],{...this.endPosition,column:i[0].columns[0]},!0)),this.rangeService.extendLatestRangeToCell(this.endPosition)}onDragEnd(e){let t=tp(this.rangeService.getCellRanges());this.fixRangeStartEnd(t),this.rangeFixed=!1}onDragCancel(){this.rangeFixed=!1}fixRangeStartEnd(e){let t=this.rangeService.getRangeStartRow(e),i=this.rangeService.getRangeEndRow(e),s=e.columns[0];e.startRow=t,e.endRow=i,e.startColumn=s}},Rl=class extends tk{constructor(){super(...arguments),this.beanName="selectionHandleFactory"}createSelectionHandle(e){return this.createBean(e===o7.RANGE?new Rn:new Ro)}},Rh="32.3.9",Rd={version:Rh,moduleName:`${eh.RangeSelectionModule}-core`,beans:[Rr,Rl],dependantModules:[I9]},Ru={version:Rh,moduleName:`${eh.RangeSelectionModule}-api`,apiFunctions:{getCellRanges:function(e){var t,i;return null!=(t=null==(i=e.rangeService)?void 0:i.getCellRanges())?t:null},addCellRange:function(e,t){var i;null==(i=e.rangeService)||i.addCellRange(t)},clearRangeSelection:Rs,clearCellSelection:Rs},dependantModules:[Rd]},Rc={version:Rh,moduleName:eh.RangeSelectionModule,dependantModules:[Rd,Ru]};I1(Ri,en);var Rp={area:{isCartesian:!0,canInvert:!0},bar:{isCartesian:!0,canInvert:!0},histogram:{isCartesian:!0},line:{isCartesian:!0,canInvert:!0},pie:{isPie:!0},donut:{isPie:!0,canInvert:!0},scatter:{isCartesian:!0},bubble:{isCartesian:!0},"radial-column":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radial-bar":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radar-line":{isPolar:!0,isEnterprise:!0,canInvert:!0},"radar-area":{isPolar:!0,isEnterprise:!0,canInvert:!0},nightingale:{isPolar:!0,isEnterprise:!0,canInvert:!0},"range-bar":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0}
341,"range-area":{isCartesian:!0,isEnterprise:!0},"box-plot":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},treemap:{isEnterprise:!0,isHierarchical:!0},sunburst:{isEnterprise:!0,isHierarchical:!0},heatmap:{isCartesian:!0,isEnterprise:!0},waterfall:{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0}};function Rg(e){return dh.COMBO_CHART_TYPES.includes(e)}function Rm(e,t){var i;return!!(null!=(i=Rp[e])&&i[t])}var Rv=new Set(["stackedColumn","normalizedColumn","stackedBar","normalizedBar"]);function Rf(e){return Rm(e,"isCartesian")}function RC(e){return Rm(e,"isPolar")}function Ry(e){return Rm(e,"isHierarchical")}function Rw(e){return"doughnut"===e?"donut":e}function Rb(e){return dh.CHART_TYPE_TO_SERIES_TYPE[e]}function RS(e){var t;return null!=(t=Rb(e))?t:"line"}function Rx(e){return Rm(e,"isPie")}function RM(e){return Ry(RS(e))?void 0:1}function RD(e){return Ry(RS(e))?2:"pie"===e||"waterfall"===e||"histogram"===e?1:void 0}function RE(e){return!Rg(e)&&Rm(RS(e),"canInvert")}function RI(e){switch(e){case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":case"stackedArea":case"normalizedArea":return`${e}Full`;case"doughnut":return"donut";case"areaColumnCombo":return"AreaColumnCombo";default:return e}}var RA=class extends tk{constructor(e,t,i,s){super(),this.chartController=e,this.eGui=t,this.cssClass=i,this.createPanels=s,this.panels=[]}postConstruct(){this.addManagedListeners(this.chartController,{chartUpdated:()=>this.refreshPanels(!0),chartApiUpdate:()=>this.refreshPanels(!1)})}addComponent(e){this.createBean(e),this.panels.push(e),e.addCssClass(this.cssClass),this.eGui.appendChild(e.getGui())}refreshPanels(e){let t=this.chartController.getChartType(),i=this.chartController.isGrouping(),s=RS(t);e&&t===this.chartType&&i===this.isGrouping||(this.destroyPanels(),this.createPanels(t,s),this.chartType=t,this.isGrouping=i)}destroyPanels(){this.panels.forEach(e=>{sv(e.getGui()),this.destroyBean(e)}),this.panels=[]}destroy(){this.destroyPanels(),super.destroy()}},RR=class extends s${constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuParamsFactory.addEnableParams("animation.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("animation"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultNumberInputParams("animation.duration","durationMillis",{min:0});this.setTemplate(`<div>
342            <ag-group-component data-ref="animationGroup">
343                <ag-input-number-field data-ref="animationHeightInput"></ag-input>
344            </ag-group-component>
345        </div>`,[As,aw],{animationGroup:e,animationHeightInput:t})}},RT={selector:"AG-COLOR-INPUT",component:class extends af{constructor(){super({template:`
346            <div role="presentation" class="ag-color-input">
347                <div data-ref="eLabel" class="ag-input-field-label"></div>
348                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
349                    <input data-ref="eInput" class="ag-input-field-input">
350                    <div data-ref="eColor" class="ag-color-input-color"></div>
351                </div>
352            </div>`}),this.eColor=s_}wireBeans(e){this.chartTranslationService=e.chartTranslationService}setColor(e){let t=e.toRgbaString();this.setValue(IA.Color.fromString(t).toHexString().toUpperCase(),!0),this.eColor.style.backgroundColor=t}setValue(e,t){let i=IA.Color.validColorString(null!=e?e:"");return this.eInput.setCustomValidity(i?"":this.chartTranslationService.translate("invalidColor")),super.setValue(e,t),i&&!t&&this.dispatchLocalEvent({type:"colorChanged"}),this}onColorChanged(e){this.addManagedListeners(this,{colorChanged:()=>e(IA.Color.fromString(this.value))})}}},RL=class e extends s${constructor(e){super(`<div class="ag-color-panel" tabindex="-1">
353            <div data-ref="spectrumColor" class="ag-spectrum-color">
354                <div class="ag-spectrum-sat ag-spectrum-fill">
355                    <div data-ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">
356                        <div data-ref="spectrumDragger" class="ag-spectrum-dragger"></div>
357                    </div>
358                </div>
359            </div>
360            <div class="ag-spectrum-tools">
361                <div data-ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">
362                    <div class="ag-spectrum-hue-background"></div>
363                    <div data-ref="spectrumHueSlider" class="ag-spectrum-slider"></div>
364                </div>
365                <div data-ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">
366                    <div class="ag-spectrum-alpha-background"></div>
367                    <div data-ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>
368                </div>
369                <ag-color-input data-ref="colorInput"></ag-color-input>
370                <div data-ref="recentColors" class="ag-recent-colors"></div>
371            </div>
372        </div>`,[RT]),this.H=1,this.S=1,this.B=1,this.A=1,this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1,this.colorChanged=!1,this.spectrumColor=s_,this.spectrumVal=s_,this.spectrumDragger=s_,this.spectrumHue=s_,this.spectrumHueSlider=s_,this.spectrumAlpha=s_,this.spectrumAlphaSlider=s_,this.colorInput=s_,this.recentColors=s_,this.picker=e.picker}postConstruct(){this.initTabIndex(),this.initRecentColors(),this.addGuiEventListener("focus",()=>this.spectrumColor.focus()),this.addGuiEventListener("keydown",e=>{e.key!==s9.ENTER||e.defaultPrevented||this.destroy()}),this.addManagedListeners(this.spectrumColor,{keydown:e=>this.moveDragger(e)}),this.addManagedListeners(this.spectrumAlphaSlider,{keydown:e=>this.moveAlphaSlider(e)}
372),this.addManagedListeners(this.spectrumHueSlider,{keydown:e=>this.moveHueSlider(e)}),this.addManagedListeners(this.spectrumVal,{mousedown:this.onSpectrumDraggerDown.bind(this)}),this.addManagedListeners(this.spectrumHue,{mousedown:this.onSpectrumHueDown.bind(this)}),this.addManagedListeners(this.spectrumAlpha,{mousedown:this.onSpectrumAlphaDown.bind(this)}),this.addGuiEventListener("mousemove",e=>{this.onSpectrumDraggerMove(e),this.onSpectrumHueMove(e),this.onSpectrumAlphaMove(e)}),this.addManagedListeners(document,{mouseup:this.onMouseUp.bind(this)}),this.colorInput.onColorChanged(this.setColor.bind(this)),this.addManagedListeners(this.recentColors,{click:this.onRecentColorClick.bind(this),keydown:e=>{(e.key===s9.ENTER||e.key===s9.SPACE)&&(e.preventDefault(),this.onRecentColorClick(e))}})}initTabIndex(){let e=this.tabIndex=this.gos.get("tabIndex").toString();this.spectrumColor.setAttribute("tabindex",e),this.spectrumHueSlider.setAttribute("tabindex",e),this.spectrumAlphaSlider.setAttribute("tabindex",e)}refreshSpectrumRect(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()}refreshHueRect(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()}refreshAlphaRect(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()}onSpectrumDraggerDown(e){e.preventDefault(),this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)}onSpectrumDraggerMove(e){this.isSpectrumDragging&&this.moveDragger(e)}onSpectrumHueDown(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)}onSpectrumHueMove(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)}onSpectrumAlphaDown(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)}onSpectrumAlphaMove(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)}onMouseUp(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1}moveDragger(e){let t,i,s=this.spectrumValRect;if(s){if(e instanceof MouseEvent)t=e.clientX-s.left,i=e.clientY-s.top;else{let s=e.key===s9.LEFT,r=e.key===s9.RIGHT,a=e.key===s9.UP,o=e.key===s9.DOWN,n=a||o,l=s||r;if(!n&&!l)return;e.preventDefault();let{x:h,y:d}=this.getSpectrumValue();t=h+(l?s?-5:5:0),i=d+(n?a?-5:5:0)}t=Math.min(t=Math.max(t,0),s.width),i=Math.min(i=Math.max(i,0),s.height),this.setSpectrumValue(t/s.width,1-i/s.height)}}moveHueSlider(e){let t=this.spectrumHueRect;if(!t)return;let i=this.moveSlider(this.spectrumHueSlider,e);null!=i&&(this.H=1-i/t.width,this.update())}moveAlphaSlider(e){let t=this.spectrumAlphaRect;if(!t)return;let i=this.moveSlider(this.spectrumAlphaSlider,e);null!=i&&(this.A=i/t.width,this.update())}moveSlider(e,t){var i;let s,r=e.getBoundingClientRect(),a=null==(i=e.parentElement)?void 0:i.getBoundingClientRect();if(!e||!a)return null;let o=r.width/2;if(t instanceof MouseEvent)s=Math.floor(t.clientX-a.left);else{let i=t.key===s9.LEFT,r=t.key===s9.RIGHT;if(!i&&!r)return null;t.preventDefault(),s=parseFloat(e.style.left)+o+(i?-5:5)}return s=Math.min(s=Math.max(s,0),a.width),e.style.left=s-o+"px",s}update(e){let t=360*this.H,i=IA.Color.fromHSB(t,this.S,this.B,this.A),s=i.toRgbaString(),r=IA.Color.fromHSB(t,this.S,this.B).toRgbaString(),a=IA.Color.fromHSB(t,1,1).toRgbaString(),o=this.picker;IA.Color.fromString(o.getValue()).toRgbaString()!==s&&(this.colorChanged=!0),o.setValue(s),this.spectrumColor.style.backgroundColor=a,this.spectrumDragger.style.backgroundColor=r,this.spectrumHueSlider.style.backgroundColor=a,this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color-from",IA.Color.fromHSB(t,this.S,this.B,0).toRgbaString()),this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color-to",r),this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color",s),e||this.colorInput.setColor(i)}setSpectrumValue(e,t,i){let s=this.spectrumValRect||this.refreshSpectrumRect();if(null==s)return;let r=this.spectrumDragger,a=r.getBoundingClientRect();e=Math.min(1,e=Math.max(0,e)),t=Math.min(1,t=Math.max(0,t)),this.S=e,this.B=t,r.style.left=e*s.width-a.width/2+"px",r.style.top=(1-t)*s.height-a.height/2+"px",this.update(i)}getSpectrumValue(){let e=this.spectrumDragger,t=e.getBoundingClientRect();return{x:parseFloat(e.style.left)+t.width/2,y:parseFloat(e.style.top)+t.height/2}}initRecentColors(){let t=e.recentColors,i=t.map((e,t)=>`<div class="ag-recent-color" id=${t} style="background-color: ${e}; width: 15px; height: 15px;" recent-color="${e}" tabIndex="${this.tabIndex}"></div>`);this.recentColors.innerHTML=i.join(""),ss(this.recentColors,!!t.length)}setValue(e){let t=IA.Color.fromString(e);this.setColor(t,!0)}setColor(e,t){let[i,s,r]=e.toHSB();this.H=(isNaN(i)?0:i)/360,this.A=e.a;let a=this.spectrumHueRect||this.refreshHueRect(),o=this.spectrumAlp
372haRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=`${-((this.H-1)*a.width)-this.spectrumHueSlider.getBoundingClientRect().width/2}px`,this.spectrumAlphaSlider.style.left=`${this.A*o.width-this.spectrumAlphaSlider.getBoundingClientRect().width/2}px`,this.setSpectrumValue(s,r,!t)}onRecentColorClick(t){let i=t.target;if(!eM(i.id))return;let s=parseInt(i.id,10);this.setValue(e.recentColors[s]),this.destroy()}addRecentColor(){let t=IA.Color.fromHSB(360*this.H,this.S,this.B,this.A).toRgbaString(),i=e.recentColors;this.colorChanged&&i[0]!==t&&(i=i.filter(e=>e!=t),(i=[t].concat(i)).length>e.maxRecentColors&&(i=i.slice(0,e.maxRecentColors)),e.recentColors=i)}destroy(){this.addRecentColor(),super.destroy()}};RL.maxRecentColors=8,RL.recentColors=[];var RF=class extends ah{constructor(e){super({pickerAriaLabelKey:"ariaLabelColorPicker",pickerAriaLabelValue:"Color Picker",pickerType:"ag-list",className:"ag-color-picker",pickerIcon:"smallDown",...e})}postConstruct(){let e=e$(this.gos);this.eDisplayFieldColor=e.createElement("span"),this.eDisplayFieldColor.classList.add("ag-color-picker-color"),this.eDisplayFieldText=e.createElement("span"),this.eDisplayFieldText.classList.add("ag-color-picker-value"),this.eDisplayField.appendChild(this.eDisplayFieldColor),this.eDisplayField.appendChild(this.eDisplayFieldText),super.postConstruct(),this.value&&this.setValue(this.value)}createPickerComponent(){var e;let t=this.eWrapper.getBoundingClientRect(),i=this.popupService.getParentRect();return this.createBean(new Av({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:t.right-i.left-190,y:t.top-i.top-250-(null!=(e=this.config.pickerGap)?e:0),postProcessPopupParams:{type:"colorPicker",eventSource:this.eWrapper}}))}renderAndPositionPicker(){let e=this.pickerComponent,t=this.createBean(new RL({picker:this}));return e.addCssClass("ag-color-dialog"),t.addDestroyFunc(()=>{e.isAlive()&&this.destroyBean(e)}),e.setParentComponent(this),e.setBodyComponent(t),t.setValue(this.getValue()),t.getGui().focus(),e.addDestroyFunc(()=>{this.isDestroyingPicker?this.isDestroyingPicker=!1:(this.beforeHidePicker(),this.isDestroyingPicker=!0,t.isAlive()&&this.destroyBean(t),this.isAlive()&&this.getFocusableElement().focus())}),()=>{var e;return null==(e=this.pickerComponent)?void 0:e.close()}}setValue(e){return this.value===e?this:(this.eDisplayFieldColor.style.backgroundColor=e,this.eDisplayFieldText.textContent=IA.Color.fromString(e).toHexString().toUpperCase(),super.setValue(e))}getValue(){return this.value}},RP={selector:"AG-COLOR-PICKER",component:RF},Rk=class extends s${constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuParamsFactory.addEnableParams("crosshair.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("crosshair"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.label.enabled","crosshairLabel"),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.snap","crosshairSnap"),s=this.chartMenuParamsFactory.getDefaultColorPickerParams("crosshair.stroke","color");this.setTemplate(`<div>
373            <ag-group-component data-ref="crosshairGroup">
374                <ag-checkbox data-ref="crosshairLabelCheckbox"></ag-checkbox>
375                <ag-checkbox data-ref="crosshairSnapCheckbox"></ag-checkbox>
376                <ag-color-picker data-ref="crosshairStrokeColorPicker"></ag-color-picker>
377            </ag-group-component>
378        </div>`,[As,rr,RP],{crosshairGroup:e,crosshairLabelCheckbox:t,crosshairSnapCheckbox:i,crosshairStrokeColorPicker:s})}},RN={selector:"AG-INPUT-RANGE",component:class extends ri{constructor(e){super(e,"ag-range-field","range")}postConstruct(){super.postConstruct();let{min:e,max:t,step:i}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),this.setStep(i||1)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input
378:e=>{let t=e.target.value;this.setValue(t)}})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());let i=super.setValue(e,t);return this.eInput.value=e,i}}},RO=class extends re{constructor(e){super(e,`<div class="ag-slider">
379            <label data-ref="eLabel"></label>
380            <div class="ag-wrapper ag-slider-wrapper">
381                <ag-input-range data-ref="eSlider"></ag-input-range>
382                <ag-input-number-field data-ref="eText"></ag-input-number-field>
383            </div>
384        </div>`,[RN,aw]),this.eLabel=s_,this.eSlider=s_,this.eText=s_,this.labelAlignment="top"}postConstruct(){super.postConstruct(),this.eSlider.addCssClass("ag-slider-field");let{minValue:e,maxValue:t,textFieldWidth:i,step:s,value:r,onValueChange:a}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),null!=i&&this.setTextFieldWidth(i),null!=s&&this.setStep(s),null!=r&&this.setValue(r),null!=a&&this.onValueChange(a)}onValueChange(e){return this.addManagedListeners(this.eText,{fieldValueChanged:()=>{let t=parseFloat(this.eText.getValue());this.eSlider.setValue(t.toString(),!0),e(t||0)}}),this.addManagedListeners(this.eSlider,{fieldValueChanged:()=>{let t=this.eSlider.getValue();this.eText.setValue(t,!0),e(parseFloat(t))}}),this}setSliderWidth(e){return this.eSlider.setWidth(e),this}setTextFieldWidth(e){return this.eText.setWidth(e),this}setMinValue(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this}setMaxValue(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this}getValue(){return this.eText.getValue()}setValue(e,t){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}setStep(e){return this.eSlider.setStep(e),this.eText.setStep(e),this}},RG={selector:"AG-SLIDER",component:RO},RB=class extends s${constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuParamsFactory.addEnableParams("navigator.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("navigator"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultSliderParams("navigator.height","height",60);t.minValue=10;let i=this.chartMenuParamsFactory.getDefaultCheckboxParams("navigator.miniChart.enabled","miniChart");this.setTemplate(`<div>
385            <ag-group-component data-ref="navigatorGroup">
386                <ag-slider data-ref="navigatorHeightSlider"></ag-slider>
387                <ag-checkbox data-ref="navigatorMiniChartCheckbox"></ag-checkbox>
388            </ag-group-component>
389        </div>`,[As,RG,rr],{navigatorGroup:e,navigatorHeightSlider:t,navigatorMiniChartCheckbox:i})}},Rz=class extends s${constructor(e){super(),this.chartMenuParamsFactory=e,this.zoomScrollingStepInput=s_}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e,t=this.chartMenuParamsFactory.addEnableParams("zoom.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("zoom"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableScrolling","scrollingZoom"),s=this.chartMenuParamsFactory.getDefaultSliderParams("zoom.scrollingStep","scrollingStep",1);s.step=.01,s.minValue=s.step;let r=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableSelecting","selectingZoom");e=i.onValueChange,i.onValueChange=t=>{e&&(e(t),this.zoomScrollingStepInput.setDisabled(!t))},this.setTemplate(`<div>
390            <ag-group-component data-ref="zoomGroup">
391                <ag-checkbox data-ref="zoomSelectingCheckbox"></ag-checkbox>
392                <ag-checkbox data-ref="zoomScrollingCheckbox"></ag-checkbox>
393                <ag-slider data-ref="zoomScrollingStepInput"></ag-slider>
394            </ag-group-component>
395        </div>`,[As,rr,RG],{zoomGroup:t,zoomScrollingCheckbox:i,zoomScrollingStepInput:s,zoomSelectingCheckbox:r}),this.zoomScrollingStepInput.setDisabled(!i.value)}},RV=["navigator","zoom","animation","crosshair"],RH=class extends s${constructor(e){super('<div class="ag-chart-advanced-settings-wrapper"></div>'),this.chartMenuContext=e}postConstruct(){this.chartPanelFeature=this.createManagedBean(new RA(this.chartMenuContext.chartController,this.getGui(),"ag-chart-advanced-settings-section",(e,t)=>this.createPanels(e,t))),this.chartPanelFeature.refreshPanels()}
395createPanels(e,t){RV.forEach(e=>{if(!this.isGroupPanelShownForSeries(e,t))return;let i=this.createPanel(e);this.chartPanelFeature.addComponent(i)})}isGroupPanelShownForSeries(e,t){return"animation"===e||Rf(t)}createPanel(e){let{chartMenuParamsFactory:t,chartAxisMenuParamsFactory:i}=this.chartMenuContext;switch(e){case"navigator":return new RB(t);case"zoom":return new Rz(t);case"animation":return new RR(t);case"crosshair":return new Rk(i)}}},Rj=class extends tk{constructor(){super(...arguments),this.beanName="advancedSettingsMenuFactory"}wireBeans(e){this.focusService=e.focusService,this.chartTranslationService=e.chartTranslationService}showMenu(e,t){this.hideMenu();let i=this.createBean(new RW(e));this.activeDialog=this.createBean(new Av({title:this.chartTranslationService.translate("advancedSettings"),component:i,width:300,height:400,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{var e;null==(e=this.focusService.findFocusableElements(i.getGui())[0])||e.focus()},closedCallback:()=>{this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=void 0,null==t||t.focus({preventScroll:!0})}})),this.activeMenu=i}hideMenu(){this.activeDialog&&this.destroyBean(this.activeDialog)}destroy(){this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=this.destroyBean(this.activeDialog),super.destroy()}},RW=class extends lT{constructor(e){super('<div class="ag-chart-advanced-settings"></div>'),this.chartMenuContext=e}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.advancedSettingsPanel=this.createManagedBean(new RH(this.chartMenuContext)),this.getGui().appendChild(this.advancedSettingsPanel.getGui()),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),focusTrapActive:!0})}onTabKeyDown(e){if(e.defaultPrevented)return;e.preventDefault();let t=e.shiftKey,i=this.advancedSettingsPanel.getGui(),s=this.focusService.findNextFocusableElement(i,!1,t);if(s)s.focus();else{let e=this.focusService.findFocusableElements(i);e.length&&e[t?e.length-1:0].focus()}}},RU=class extends tk{constructor(){super(...arguments),this.beanName="chartMenuListFactory"}wireBeans(e){this.popupService=e.popupService,this.chartMenuService=e.chartMenuService,this.chartTranslationService=e.chartTranslationService}showMenuList(e){let{eventSource:t,showMenu:i,chartMenuContext:s}=e,r=this.chartMenuService.doChartToolPanelsExist(s.chartController),a=this.mapWithStockItems(this.getMenuItems(s.chartController,r),s,i,t,r);if(!a.length)return;let o=this.createBean(new R_(a));this.activeChartMenuList=o;let n=-1,l="left";this.gos.get("enableRtl")&&(n=1,l="right");let h=o.getGui();this.popupService.addPopup({modal:!0,eChild:h,closeOnEsc:!0,closedCallback:()=>{this.destroyBean(o),this.activeChartMenuList=void 0,eq(this.gos)&&t.focus({preventScroll:!0})},afterGuiAttached:e=>o.afterGuiAttached(e),positionCallback:()=>{this.popupService.positionPopupByComponent({type:"chartMenu",eventSource:t,ePopup:h,alignSide:l,nudgeX:4*n,nudgeY:4,position:"under",keepWithinBounds:!0})},ariaLabel:"Chart Menu"})}getMenuItems(e,t){let i=[...t?["chartEdit"]:[],...e.isEnterprise()?["chartAdvancedSettings"]:[],e.isChartLinked()?"chartUnlink":"chartLink","chartDownload"],s=this.gos.get("chartMenuItems");return s?Array.isArray(s)?s:s(this.gos.addGridCommonParams({defaultItems:i})):i}mapWithStockItems(e,t,i,s,r){if(!e)return[];let a=[];return e.forEach(e=>{let o;
395if(!(o="string"==typeof e?this.getStockMenuItem(e,t,i,s,r):{...e}))return;let{subMenu:n}=o;Array.isArray(n)&&(o.subMenu=this.mapWithStockItems(n,t,i,s,r)),a.push(o)}),a}getStockMenuItem(e,t,i,s,r){switch(e){case"chartEdit":return r?this.createMenuItem(this.chartTranslationService.translate("chartEdit"),"chartsMenuEdit",i):null;case"chartAdvancedSettings":return this.createMenuItem(this.chartTranslationService.translate("chartAdvancedSettings"),"chartsMenuAdvancedSettings",()=>this.chartMenuService.openAdvancedSettings(t,s));case"chartUnlink":return t.chartController.isChartLinked()?this.createMenuItem(this.chartTranslationService.translate("chartUnlink"),"unlinked",()=>this.chartMenuService.toggleLinked(t)):null;case"chartLink":return t.chartController.isChartLinked()?null:this.createMenuItem(this.chartTranslationService.translate("chartLink"),"linked",()=>this.chartMenuService.toggleLinked(t));case"chartDownload":return this.createMenuItem(this.chartTranslationService.translate("chartDownload"),"save",()=>this.chartMenuService.downloadChart(t))}return null}createMenuItem(e,t,i){return{name:e,icon:sq(t,this.gos,null),action:i}}destroy(){this.destroyBean(this.activeChartMenuList),super.destroy()}},R_=class extends s${constructor(e){super(`
396            <div data-ref="eChartsMenu" role="presentation" class="ag-menu ag-chart-menu-popup"></div>
397        `),this.menuItems=e,this.eChartsMenu=s_}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.mainMenuList=this.createManagedBean(new Af(0)),this.mainMenuList.addMenuItems(this.menuItems),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eChartsMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(){var e;null==(e=this.hidePopupFunc)||e.call(this)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),this.focusService.focusInto(this.mainMenuList.getGui())}},R$=class e extends tk{constructor(){super(...arguments),this.beanName="chartCrossFilterService"}wireBeans(e){this.columnModel=e.columnModel,this.valueService=e.valueService,this.filterManager=e.filterManager,eN(this.gos)&&(this.clientSideRowModel=e.rowModel)}filter(t,i=!1){var s,r;let a=null!=(s=null==(r=this.filterManager)?void 0:r.getFilterModel())?s:{};if(i)return void this.resetFilters(a);let o=e.extractFilterColId(t);this.isValidColumnFilter(o)?this.updateFilters(a,t,o):ep("cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '"+o+"'")}resetFilters(e){if(Object.keys(e).length>0){var t,i;null==(t=this.filterManager)||t.setFilterModel(null),null==(i=this.filterManager)||i.onFilterChanged({source:"api"})}}updateFilters(t,i,s){var r;let a=e.extractFilterColId(i),o=i.datum[a];if(void 0===o)return;let n=o.toString();if(i.event.metaKey||i.event.ctrlKey){let e,i=this.getCurrentGridValuesForCategory(s);tS(i,n)?e=i.filter(e=>e!==n):(e=i).push(n),t[s]=this.getUpdatedFilterModel(s,e)}else t={[s]:this.getUpdatedFilterModel(s,[n])};null==(r=this.filterManager)||r.setFilterModel(t)}getUpdatedFilterModel(e,t){return"agMultiColumnFilter"===this.getColumnFilterType(e)?{filterType:"multi",filterModels:[null,{filterType:"set",values:t}]}:{filterType:"set",values:t}}getCurrentGridValuesForCategory(e){var t;let i=[],s=this.getColumnById(e);return null==(t=this.clientSideRowModel)||t.forEachNodeAfterFilter(e=>{if(s&&!e.group){let t=this.valueService.getValue(s,e)+"";i.includes(t)||i.push(t)}}),i}static extractFilterColId(e){return e.xKey||e.calloutLabelKey}isValidColumnFilter(e){e.indexOf("-filtered-out")&&(e=e.replace("-filtered-out",""));let t=this.getColumnFilterType(e);return"boolean"==typeof t?t:tS(["agSetColumnFilter","agMultiColumnFilter"],t)}getColumnFilterType(e){let t=this.getColumnById(e);if(t)return t.getColDef().filter}getColumnById(e){return this.columnModel.getCol(e)}},RY=["chartUnlink","chartLink","chartDownload","chartMenu"],RK={settings:"chartSettings",data:"chartData",format:"chartFormat"},RZ=class extends tk{constructor(){super(...arguments),this.beanName="chartMenuService"}wireBeans(e){this.advancedSettingsMenuFactory=e.advancedSettingsMenuFactory}downloadChart(e,t,i,s){e.chartController.getChartProxy().downloadChart(t,i,s)}toggleLinked(e){e.chartController.detachChartRange()}openAdvancedSettings(e,t){this.advancedSettingsMenuFactory.showMenu(e,t)}hideAdvancedSettings(){this.advancedSettingsMenuFactory.hideMenu()}getChartToolbarOptions(){let e=["chartMenu"],t=this.gos.getCallback("getChartToolbarItems");return t?t({defaultItems:e}).filter(e=>!!RY.includes(e)||(ep(`'${e}' is not a valid Chart Toolbar Option`),!1)):e}getChartToolPanels(e){var t;let i=this.gos.get("chartToolPanelsDef"),s=null==i||null==(t=i.panels)?void 0:t.map(e=>{let t=RK[e];return t||ep(`Invalid panel in chartToolPanelsDef.panels: '${e}'`),t}).filter(e=>!!e),r=null!=s?s:Object.values(RK);e.isPivotChart()&&(r=r.filter(e=>"chartData"!==e));let a=null==i?void 0:i.defaultToolPanel,o=a&&RK[a]||r[0];return{panels:r,defaultPanel:o}}doesChartToolbarExist(){return this.getChartToolbarOptions().length>0}doChartToolPanelsExist(e){let{panels:t}=this.getChartToolPanels(e);return t.length>0}},Rq=class e extends tk{constructor(){super(...arguments),this.beanName="
397chartTranslationService"}translate(t){let i=this.localeService.getLocaleTextFunc(),s=e.DEFAULT_TRANSLATIONS[t];return i(t,s)}};Rq.DEFAULT_TRANSLATIONS={pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Chart",data:"Set Up",format:"Customize",categories:"Categories",defaultCategory:"(None)",series:"Series",switchCategorySeries:"Switch Category / Series",categoryValues:"Category Values",seriesLabels:"Series Labels",aggregate:"Aggregate",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",xAxis:"Horizontal Axis",yAxis:"Vertical Axis",polarAxis:"Polar Axis",radiusAxis:"Radius Axis",navigator:"Navigator",zoom:"Zoom",animation:"Animation",crosshair:"Crosshair",color:"Color",thickness:"Thickness",preferredLength:"Preferred Length",xType:"X Type",axisType:"Axis Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",timeFormat:"Time Format",autoRotate:"Auto Rotate",labelRotation:"Rotation",circle:"Circle",polygon:"Polygon",square:"Square",cross:"Cross",diamond:"Diamond",plus:"Plus",triangle:"Triangle",heart:"Heart",orientation:"Orientation",fixed:"Fixed",parallel:"Parallel",perpendicular:"Perpendicular",radiusAxisPosition:"Position",ticks:"Ticks",gridLines:"Grid Lines",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chartStyle:"Chart Style",title:"Title",chartTitles:"Titles",chartTitle:"Chart Title",chartSubtitle:"Subtitle",horizontalAxisTitle:"Horizontal Axis Title",verticalAxisTitle:"Vertical Axis Title",polarAxisTitle:"Polar Axis Title",titlePlaceholder:"Chart Title",background:"Backgroun
397d",font:"Font",weight:"Weight",top:"Top",right:"Right",bottom:"Bottom",left:"Left",labels:"Labels",calloutLabels:"Callout Labels",sectorLabels:"Sector Labels",positionRatio:"Position Ratio",size:"Size",shape:"Shape",minSize:"Minimum Size",maxSize:"Maximum Size",legend:"Legend",position:"Position",markerSize:"Marker Size",markerStroke:"Marker Stroke",markerPadding:"Marker Padding",itemSpacing:"Item Spacing",itemPaddingX:"Item Padding X",itemPaddingY:"Item Padding Y",layoutHorizontalSpacing:"Horizontal Spacing",layoutVerticalSpacing:"Vertical Spacing",strokeWidth:"Stroke Width",offset:"Offset",offsets:"Offsets",tooltips:"Tooltips",callout:"Callout",markers:"Markers",shadow:"Shadow",blur:"Blur",xOffset:"X Offset",yOffset:"Y Offset",lineWidth:"Line Width",lineDash:"Line Dash",lineDashOffset:"Dash Offset",scrollingZoom:"Scrolling",scrollingStep:"Scrolling Step",selectingZoom:"Selecting",durationMillis:"Duration (ms)",crosshairLabel:"Label",crosshairSnap:"Snap to Node",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeColor:"Line Color",strokeOpacity:"Line Opacity",miniChart:"Mini-Chart",histogramBinCount:"Bin count",connectorLine:"Connector Line",seriesItems:"Series Items",seriesItemType:"Item Type",seriesItemPositive:"Positive",seriesItemNegative:"Negative",seriesItemLabels:"Item Labels",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",polarGroup:"Polar",statisticalGroup:"Statistical",hierarchicalGroup:"Hierarchical",specializedGroup:"Specialized",combinationGroup:"Combination",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",donutTooltip:"Donut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",radialColumnTooltip:"Radial Column",radialBarTooltip:"Radial Bar",radarLineTooltip:"Radar Line",radarAreaTooltip:"Radar Area",nightingaleTooltip:"Nightingale",rangeBarTooltip:"Range Bar",rangeAreaTooltip:"Range Area",boxPlotTooltip:"Box Plot",treemapTooltip:"Treemap",sunburstTooltip:"Sunburst",waterfallTooltip:"Waterfall",heatmapTooltip:"Heatmap",columnLineComboTooltip:"Column & Line",areaColumnComboTooltip:"Area & Column",customComboTooltip:"Custom Combination",innerRadius:"Inner Radius",startAngle:"Start Angle",endAngle:"End Angle",reverseDirection:"Reverse Direction",groupPadding:"Group Padding",seriesPadding:"Series Padding",tile:"Tile",whisker:"Whisker",cap:"Cap",capLengthRatio:"Length Ratio",labelPlacement:"Placement",inside:"Inside",outside:"Outside",noDataToChart:"No data available to be charted.",pivotChartRequiresPivotMode:"Pivot Chart requires Pivot Mode enabled.",chartSettingsToolbarTooltip:"Menu",chartLinkToolbarTooltip:"Linked to Grid",chartUnlinkToolbarTooltip:"Unlinked from Grid",chartDownloadToolbarTooltip:"Download Chart",chartMenuToolbarTooltip:"Menu",chartEdit:"Edit Chart",chartAdvancedSettings:"Advanced Settings",chartLink:"Link to Grid",chartUnlink:"Unlink from Grid",chartDownload:"Download Chart",histogramFrequency:"Frequency",seriesChartType:"Series Chart Type",seriesType:"Series Type",secondaryAxis:"Secondary Axis",seriesAdd:"Add a series",categoryAdd:"Add a category",bar:"Bar",column:"Column",histogram:"Histogram",advancedSettings:"Advanced Settings",direction:"Direction",horizontal:"Horizontal",vertical:"Vertical",seriesGroupType:"Group Type",groupedSeriesGroupType:"Grouped",stackedSeriesGroupType:"Stacked",normalizedSeriesGroupType:"100% Stacked",legendEnabled:"Enabled",invalidColor:"Color value is invalid",groupedColumnFull:"Grouped Column",stackedColumnFull:"Stacked Column",normalizedColumnFull:"100% Stacked Column",groupedBarFull:"Grouped Bar",stackedBarFull:"Stacked Bar",normalizedBarFull:"100% Stacked Bar",stackedAreaFull:"Stacked Area",normalizedAreaFull:"100% Stacked Area",customCombo:"Custom Combination",groupedColumn:"Grouped",stackedColumn:"Stacked",pie:"Pie",donut:"Donut",line:"Line",scatter:"Scatter",bubble:"Bubble",area:"Area",stackedArea:"Stacked",radarLine:"Radar Line",radarArea:"Radar Area",nightingale:"Nightingale",radialColumn:"Radial Column",radialBar:"Radial Bar",boxPlot:"Box Plot",rangeBar:"Range Bar",rangeArea:"Range Area",treemap:"Treemap",sunburst:"Sunburst",waterfall:"Waterfall",heatmap:"Heatmap",columnLineCombo:"Column & Line",AreaColumnCombo:"Area & Column",ariaChartMenuClose:"Close Chart Edit Menu",ariaChartSelected:"Selected",group:"Group",timeFormatSlashesDDMMYYYY:"DD/MM/YYYY",timeFormatSlashesMMDDYYYY:"MM/DD/YYYY",timeFormatSlashesDDMMYY:"DD/MM/YY",timeFormatSlashesMMDDYY:"MM/DD/YY",timeFormatDotsDDMYY:"DD.M.YY",timeFormatDotsMDDYY:"M.DD.YY",timeFormatDashesYYYYMMDD:"YYYY-MM-DD",timeFormatSpacesDDMMMMYYYY:"DD MMMM YYYY",timeFormatHHMMSS:"HH:MM:SS",timeFormatHHMMSSAmPm:"HH:MM:SS AM/PM",sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"};var RQ="32.3.9",RX=["number","category","grouped-category","log","time"],RJ=new Set(["__proto__","constructor","prototype"]);function R0(e,t,i){if(null==e)return i;let s=t.split("."),r=e;for(;s.length>1;)if(null==(r=r[s.shift()]))return i;let a=r[s[0]];return null!=a?a:i}function R1(e){return tS(Object.keys(ID.themes),e)}var R2=RX.reduce((e,t)=>
397({...e,[t]:{title:{_enabledFromTheme:!0}}}),{});function R3(e,t){let{customChartThemes:i}=e,s=i&&i[t];return s||ep(`no stock theme exists with the name '${t}' and no custom chart theme with that name was supplied to 'customChartThemes'`),s}var R4=class e extends tk{wireBeans(e){this.sortController=e.sortController,this.gridRowModel=e.rowModel,this.columnModel=e.columnModel,this.valueService=e.valueService,this.pivotResultColsService=e.pivotResultColsService,this.rowNodeSorter=e.rowNodeSorter,this.aggregationStage=e.aggregationStage}getData(e){if(e.crossFiltering){if(e.grouping)return ep("crossing filtering with row grouping is not supported."),{chartData:[],columnNames:{}};if(!eN(this.gos))return ep("crossing filtering is only supported in the client side row model."),{chartData:[],columnNames:{}}}eO(this.gos)&&e.pivoting&&this.updatePivotKeysForSSRM();let t=this.extractRowsFromGridRowModel(e);return t.chartData=this.aggregateRowsByDimension(e,t.chartData),t}extractRowsFromGridRowModel(t){let i,s,{crossFiltering:r,startRow:a,endRow:o,valueCols:n,dimensionCols:l,grouping:h}=t,d=[],u={},c={},p={},g={},m=[];if(r)g=this.getFilteredRowNodes(),i=(m=this.getAllRowNodes()).length;else{let e=this.gridRowModel.getRowCount()-1;i=a===o&&0===a&&0===l.length&&0===n.length?0:(o>=0?Math.min(o,e):e)-a+1}i>0&&n.forEach(e=>{let t=[],i=e.getColDef().pivotKeys;i&&(t=i.slice());let s=e.getColDef().headerName;s&&t.push(s),t.length>0&&(u[e.getId()]=t)});let v=0,f=0;for(let s=0;s<i;s++){let i=r?m[s]:this.gridRowModel.getRow(s+a);if(i.footer||i.detail){v++;continue}let o={};l.forEach(t=>{let r=t.colId,a=this.columnModel.getCol(r);if(a){let t=this.valueService.getValue(a,i);if(h){let a=null!=t&&t.toString?String(t.toString()):"",n=e.getGroupLabels(i,a);o[r]={labels:n,id:f++,toString:function(){return this.labels.filter(e=>!!e).reverse().join(" - ")}},i.group&&(c[n.toString()]=s-v);let l=n.slice(1,n.length).toString();l&&(p[l]=c[l])}else o[r]=t}else o[R7.DEFAULT_CATEGORY]=s+1}),n.forEach(e=>{let s=e.getColId();if(r){let r=s+"-filtered-out",a=this.valueService.getValue(e,i),n=null!=a&&"function"==typeof a.toNumber?a.toNumber():a;g[i.id]?(o[s]=n,o[r]=t.aggFunc||t.isScatter?void 0:0):(o[s]=t.aggFunc||t.isScatter?void 0:0,o[r]=n)}else{let t=this.valueService.getValue(e,i);t&&Object.prototype.hasOwnProperty.call(t,"toString")&&(t=parseFloat(t.toString())),o[s]=null!=t&&"function"==typeof t.toNumber?t.toNumber():t}}),d.push(o)}if(h){let e=eP(p),t=d;d=[],s=[];for(let i=0;i<t.length;i++)(tS(e,i)?s:d).push(t[i])}return{chartData:d,columnNames:u,groupChartData:s}}aggregateRowsByDimension(e,t){let i=e.dimensionCols;if(!e.aggFunc||0===i.length)return t;let s=tp(i),r=s&&s.colId,a={},o=[];if(t.forEach(e=>{let t=a;i.forEach(s=>{let a=s.colId,n=e[a];if(a===r){let s=t[n];s||(s={__children:[]}
397,i.forEach(t=>{let i=t.colId;s[i]=e[i]}),t[n]=s,o.push(s)),s.__children.push(e)}else t[n]||(t[n]={}),t=t[n]})}),this.gos.assertModuleRegistered(eh.RowGroupingModule,"Charting Aggregation")){let t=this.aggregationStage;o.forEach(i=>e.valueCols.forEach(s=>{if(e.crossFiltering)e.valueCols.forEach(s=>{let r=s.getColId(),a=i.__children.filter(e=>void 0!==e[r]).map(e=>e[r]),o=t.aggregateValues(a,e.aggFunc);i[s.getId()]=o&&void 0!==o.value?o.value:o;let n=`${r}-filtered-out`,l=i.__children.filter(e=>void 0!==e[n]).map(e=>e[n]),h=t.aggregateValues(l,e.aggFunc);i[n]=h&&void 0!==h.value?h.value:h});else{let r=i.__children.map(e=>e[s.getId()]),a=t.aggregateValues(r,e.aggFunc);i[s.getId()]=a&&void 0!==a.value?a.value:a}}))}return o}updatePivotKeysForSSRM(){var e;let t=null==(e=this.pivotResultColsService.getPivotResultCols())?void 0:e.list;if(!t)return;let i=this.extractPivotKeySeparator(t);t.forEach(e=>{if(""===i)e.getColDef().pivotKeys=[];else{let t=e.getColId().split(i);e.getColDef().pivotKeys=t.slice(0,t.length-1)}})}extractPivotKeySeparator(e){if(0===e.length)return"";let t=(e,i)=>{let s=e.getGroupId();return e.getParent()?t(e.getParent(),s):i.split(s)[1][0]},i=e[0];return null==i.getParent()?"":t(i.getParent(),i.getColId())}static getGroupLabels(e,t){let i=[t];for(;e&&0!==e.level;)(e=e.parent)&&i.push(e.key);return i}getFilteredRowNodes(){let e={};return this.gridRowModel.forEachNodeAfterFilterAndSort(t=>{e[t.id]=t}),e}getAllRowNodes(){let e=[];return this.gridRowModel.forEachNode(t=>{e.push(t)}),this.sortRowNodes(e)}sortRowNodes(e){let t=this.sortController.getSortOptions();return t&&0!=t.length?this.rowNodeSorter.doFullSort(e,t):e}},R6=class extends tk{constructor(){super(...arguments),this.beanName="chartColumnService",this.valueColsWithoutSeriesType=new Set}wireBeans(e){this.columnModel=e.columnModel,this.showRowGroupColsService=e.showRowGroupColsService,this.columnNameService=e.columnNameService,this.visibleColsService=e.visibleColsService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.rowPositionUtils=e.rowPositionUtils}postConstruct(){let e=()=>this.valueColsWithoutSeriesType.clear();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e})}getColumn(e){return this.columnModel.getColDefCol(e)}getAllDisplayedColumns(){return this.visibleColsService.getAllCols()}getColDisplayName(e,t){let i="chart",s=this.columnNameService.getDisplayNameForColumn(e,i);if(t){let t=[s],r=e=>{if(!e)return;let s=this.columnNameService.getDisplayNameForColumnGroup(e,i);eE(s)||(t.unshift(s),r(e.getParent()))};return r(e.getParent()),t.join(" - ")}return s}getRowGroupColumns(){return this.funcColsService.getRowGroupColumns()}getGroupDisplayColumns(){var e,t;return null!=(e=null==(t=this.showRowGroupColsService)?void 0:t.getShowRowGroupCols())?e:[]}isPivotMode(){return this.columnModel.isPivotMode()}isPivotActive(){return this.columnModel.isPivotActive()}getChartColumns(){let e=this.columnModel.getCols(),t=new Set,i=new Set;return e.forEach(e=>{let s=e.getColDef(),r=s.chartDataType;if(r)switch(r){case"category":case"time":t.add(e);return;case"series":i.add(e);return;case"excluded":return;default:ep(`unexpected chartDataType value '${r}' supplied, instead use 'category', 'series' or 'excluded'`)}"ag-Grid-AutoColumn"===s.colId?t.add(e):e.isPrimary()?(this.isInferredValueCol(e)?i:t).add(e):i.add(e)}),{dimensionCols:t,valueCols:i}}isInferredValueCol(e){let t=e.getColId();if("ag-Grid-AutoColumn"===t)return!1;let i=this.rowPositionUtils.getRowNode({rowIndex:0,rowPinned:null});if(!i)return this.valueColsWithoutSeriesType.has(t);let s=this.valueService.getValue(e,i);null==s&&(s=this.extractLeafData(i,e)),null!=s&&"function"==typeof s.toNumber&&(s=s.toNumber());let r="number"==typeof s;return r&&this.valueColsWithoutSeriesType.add(t),r}extractLeafData(e,t){if(!e.allLeafChildren)return null;for(let i=0;i<e.allLeafChildren.length;i++){let s=e.allLeafChildren[i],r=this.valueService.getValue(t,s);if(null!=r)return r}return null}destroy(){this.valueColsWithoutSeriesType.clear(),super.destroy()}},R5=class e extends tk{constructor(e){var t;super(),this.suppressComboChartWarnings=!1,this.chartDataModel=e,this.seriesChartTypes=null!=(t=e.params.seriesChartTypes)?t:[]}postConstruct(){this.initComboCharts()}update(e){this.seriesChartTypes=null!=e?e:this.seriesChartTypes,this.initComboCharts(),this.updateSeriesChartTypes()}initComboCharts(){let e=this.seriesChartTypes&&this.seriesChartTypes.length>0;("customCombo"===this.chartDataModel.chartType||e)&&(this.chartDataModel.chartType="customCombo",this.savedCustomSeriesChartTypes=this.seriesChartTypes||[])}updateSeriesChartTypes(){if(this.chartDataModel.isComboChart()){if(this.seriesChartTypes=this.seriesChartTypes.map(e=>{let t=["groupedColumn","stackedColumn","stackedArea"].includes(e.chartType);return e.secondaryAxis=!t&&e.secondaryAxis,e}),"customCombo"===this.chartDataModel.chartType)return void this.updateSeriesChartTypesForCustomCombo();this.updateChartSeriesTypesForBuiltInCombos()}}updateSeriesChartTypesForCustomCombo(){this.seriesChartTypes&&this.seriesChartTypes.length>0||this.suppressComboChartWarnings||ep("'seriesChartTypes' are required when the 'customCombo' chart type is specified."),this.seriesChartTypes=this.seriesChartTypes.map(t=>(e.SUPPORTED_COMBO_CHART_TYPES.includes(t.chartType)||(ep(`invali
397d chartType '${t.chartType}' supplied in 'seriesChartTypes', converting to 'line' instead.`),t.chartType="line"),t));let t=e=>{this.savedCustomSeriesChartTypes&&0!==this.savedCustomSeriesChartTypes.length||(this.savedCustomSeriesChartTypes=this.seriesChartTypes);let t=this.savedCustomSeriesChartTypes.find(t=>t.colId===e.colId);return t||(e.selected&&!this.suppressComboChartWarnings&&ep(`no 'seriesChartType' found for colId = '${e.colId}', defaulting to 'line'.`),{colId:e.colId,chartType:"line",secondaryAxis:!1})},i=this.chartDataModel.valueColState.map(t);this.seriesChartTypes=i,this.savedCustomSeriesChartTypes=i,this.suppressComboChartWarnings=!0}updateChartSeriesTypesForBuiltInCombos(){let{chartType:e,valueColState:t}=this.chartDataModel,i="columnLineCombo"===e?"groupedColumn":"stackedArea",s="columnLineCombo"===e?"line":"groupedColumn",r=t.filter(e=>e.selected),a=Math.ceil(r.length/2);this.seriesChartTypes=r.map((e,t)=>({colId:e.colId,chartType:t>=a?s:i,secondaryAxis:!1}))}};R5.SUPPORTED_COMBO_CHART_TYPES=["line","groupedColumn","stackedColumn","area","stackedArea"];var R8=class e extends tk{constructor(e){super(),this.unlinked=!1,this.chartData=[],this.valueColState=[],this.dimensionColState=[],this.columnNames={},this.crossFiltering=!1,this.grouping=!1,this.params=e,this.chartId=e.chartId,this.setParams(e)}wireBeans(e){this.rangeService=e.rangeService,this.chartTranslationService=e.chartTranslationService}setParams(e){let{chartType:t,pivotChart:i,chartThemeName:s,switchCategorySeries:r,aggFunc:a,cellRange:o,suppressChartRanges:n,unlinkChart:l,crossFiltering:h,seriesGroupType:d}=e;this.chartType=t,this.pivotChart=null!=i&&i,this.chartThemeName=s,this.switchCategorySeries=!!r,this.aggFunc=a,this.referenceCellRange=o,this.suppliedCellRange=o,this.suppressChartRanges=null!=n&&n,this.unlinked=!!l,this.crossFiltering=!!h,this.seriesGroupType=d}postConstruct(){this.datasource=this.createManagedBean(new R4),this.chartColumnService=this.createManagedBean(new R6),this.comboChartModel=this.createManagedBean(new R5(this)),this.updateCellRanges({setColsFromRange:!0}),this.updateData()}updateModel(e){let{cellRange:t,seriesChartTypes:i}=e;t!==this.suppliedCellRange&&(this.dimensionCellRange=void 0,this.valueCellRange=void 0),this.setParams(e),this.updateSelectedDimensions(null==t?void 0:t.columns),this.updateCellRanges({setColsFromRange:!0}),(this.isComboChart()||i)&&this.comboChartModel.update(i),this.unlinked||this.updateData()}updateCellRanges(e){let{updatedColState:t,resetOrder:i,maintainColState:s,setColsFromRange:r}=null!=e?e:{};this.valueCellRange&&(this.referenceCellRange=this.valueCellRange);let{dimensionCols:a,valueCols:o}=this.chartColumnService.getChartColumns(),n=this.getAllColumnsFromRanges();t&&this.updateColumnState(t,i),this.setDimensionCellRange(a,n,t),this.setValueCellRange(o,n,r),t||s||(this.resetColumnState(),this.syncDimensionCellRange()),this.comboChartModel.updateSeriesChartTypes()}updateData(){let{startRow:e,endRow:t}=this.getRowIndexes();this.pivotChart&&this.resetColumnState(),this.grouping=this.isGrouping();let i={aggFunc:this.aggFunc,dimensionCols:this.getSelectedDimensions(),grouping:this.grouping,pivoting:this.isPivotActive(),crossFiltering:this.crossFiltering,valueCols:this.getSelectedValueCols(),startRow:e,endRow:t,isScatter:tS(["scatter","bubble"],this.chartType)},{chartData:s,columnNames:r,groupChartData:a}=this.datasource.getData(i);this.chartData=s,this.groupChartData=a,this.columnNames=r,this.categoryAxisType=void 0}isGrouping(){let e=this.gos.get("treeData"),t=e?null:this.chartColumnService.getRowGroupColumns(),i=e||t&&t.length>0,s=this.getSelectedDimensions().map(({colId:e})=>e),r=this.chartColumnService.getGroupDisplayColumns().map(e=>e.getColId()).some(e=>s.includes(e));return!!i&&r}getSelectedValueCols(){return this.valueColState.filter(e=>e.selected).map(e=>e.column)}getSelectedDimensions(){return this.dimensionColState.filter(e=>e.selected)}getColDisplayName(e,t){return this.chartColumnService.getColDisplayName(e,t)}isPivotMode(){return this.chartColumnService.isPivotMode()}getChartDataType(e){let t=this.chartColumnService.getColumn(e);return t?t.getColDef().chartDataType:void 0}isPivotActive(){return this.chartColumnService.isPivotActive()}createCellRange(e,...t){return{id:this.chartId,startRow:this.referenceCellRange.startRow,endRow:this.referenceCellRange.endRow,columns:t,startColumn:e===o9.DIMENSION||null==this.referenceCellRange.startColumn?t[0]:this.referenceCellRange.startColumn,type:e}}getAllColumnsFromRanges(){if(this.pivotChart)return new Set(this.chartColumnService.getAllDisplayedColumns());let e=this.dimensionCellRange||this.valueCellRange?[]:this.referenceCellRange.columns;return this.dimensionCellRange&&e.push(...this.dimensionCellRange.columns),this.valueCellRange&&e.push(...this.valueCellRange.columns),new Set(e)}getRowIndexes(){let e=0,t=0,{rangeService:i,valueCellRange:s,dimensionCellRange:r}=this,a=s||r;if(i&&a){e=i.getRangeStartRow(a).rowIndex;let s=i.getRangeEndRow(a);t="bottom"===s.rowPinned?-1:s.rowIndex}return{startRow:e,endRow:t}}resetColumnState(){let{dimensionCols:t,valueCols:i}=this.chartColumnService.getChartColumns(),s=this.getAllColumnsFromRanges(),r=this.valueColState.length<1;this.dimensionColState=[],this.valueColState=[];let a=Ry(RS(this.chartType)),o=!1,n=1,l=this.suppliedCellRange.columns[0];
397t.forEach(e=>{let t="ag-Grid-AutoColumn"===e.getColId(),i=!1;this.crossFiltering&&this.aggFunc?l.getColId()===e.getColId()&&(i=!0):i=!!t||(!o||a)&&s.has(e),this.dimensionColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:i,order:n++}),i&&(o=!0)});let h={colId:e.DEFAULT_CATEGORY,displayName:this.chartTranslationService.translate("defaultCategory"),selected:!o,order:0};this.dimensionColState.unshift(h);let d=this.referenceCellRange.columns.filter(e=>i.has(e));i.forEach(e=>{r&&tS(this.referenceCellRange.columns,e)&&(e=d.shift()),this.valueColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:s.has(e),order:n++})})}updateColumnState(e,t){let i=t=>t.colId===e.colId,{dimensionColState:s,valueColState:r}=this,a=s.find(i),o=r.find(i);if(a)if(Ry(RS(this.chartType)))a.selected=e.selected;else{let t=e.selected?a:s.filter(e=>e!==a).find(({selected:e})=>e);s.forEach(e=>e.selected=e===t)}else o&&(o.selected=e.selected);let n=[...s,...r],l=[];t||(n.forEach((t,i)=>{i===e.order&&l.push(e.colId),t.colId!==e.colId&&l.push(t.colId)}),n.forEach(e=>{let t=l.indexOf(e.colId);e.order=t>=0?l.indexOf(e.colId):n.length-1})),this.reorderColState()}reorderColState(){let e=(e,t)=>e.order-t.order;this.dimensionColState.sort(e),this.valueColState.sort(e)}setDimensionCellRange(t,i,s){this.dimensionCellRange=void 0;let r=Ry(RS(this.chartType));if(!s&&!this.dimensionColState.length){let e=[];t.forEach(t=>{(!(e.length>0)||r)&&i.has(t)&&e.push(t)}),e.length>0&&(this.dimensionCellRange=this.createCellRange(o9.DIMENSION,...e));return}let a=s?[s]:[];if(this.crossFiltering&&this.aggFunc){let e=this.suppliedCellRange.columns[0];a=this.dimensionColState.filter(t=>t.colId===e.getColId())}else(r||0===a.length||a.some(({column:e})=>!e||!t.has(e)))&&(a=this.dimensionColState.filter(e=>e.selected));let o=1===a.length&&a[0].colId===e.DEFAULT_CATEGORY,n=a.map(({column:e})=>e).filter(e=>null!=e);n.length>0&&!o&&(this.dimensionCellRange=this.createCellRange(o9.DIMENSION,...n))}setValueCellRange(e,t,i){this.valueCellRange=void 0;let s=[],r=RD(this.chartType),a=0;if(e.forEach(e=>{i?(null==r||a<r)&&t.has(e)&&(s.push(e),a++):this.valueColState.some(t=>t.selected&&t.colId===e.getColId())&&s.push(e)}),s.length>0){let e=[];this.valueColState.length>0?e=this.valueColState.map(e=>e.colId):t.forEach(t=>e.push(t.getColId())),s.sort((t,i)=>e.indexOf(t.getColId())-e.indexOf(i.getColId())),this.valueCellRange=this.createCellRange(o9.VALUE,...s)}}resetCellRanges(e,t){if(!e&&!t)return;let{dimensionCols:i,valueCols:s}=this.chartColumnService.getChartColumns(),r=this.getAllColumnsFromRanges();e&&this.setDimensionCellRange(i,r),t&&this.setValueCellRange(s,r)}updateSelectedDimensions(e){let t=new Set(e.map(e=>e.getColId()));if(Ry(RS(this.chartType))){let e=new Set(this.dimensionColState.filter(e=>t.has(e.colId)).map(e=>e.colId));this.dimensionColState=this.dimensionColState.map(t=>({...t,selected:e.has(t.colId)}))}else{let e=(this.dimensionColState.find(e=>t.has(e.colId))||this.dimensionColState[0]).colId;this.dimensionColState=this.dimensionColState.map(t=>({...t,selected:t.colId===e}))}}syncDimensionCellRange(){let e=this.getSelectedDimensions();if(0===e.length)return;let t=e.map(({column:e})=>e).filter(e=>null!=e);t.length>0&&(this.dimensionCellRange=this.createCellRange(o9.DIMENSION,...t))}isComboChart(e){return Rg(null!=e?e:this.chartType)}};R8.DEFAULT_CATEGORY="AG-GRID-DEFAULT-CATEGORY";var R7=R8,R9=e=>t=>void 0==t||e(t),Te=e=>"string"==typeof e,Tt=e=>"boolean"==typeof e,Ti=e=>"object"==typeof e,Ts=(e,t)=>i=>`AG Grid - unable to update chart as invalid params supplied:  \`${e}: ${i}\`, expected ${t}.`,Tr=e=>`${e} is not supported in AG Charts Community (either 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded). See https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/ for more details.`,Ta=class e{static isEnterprise(){return IR.enterpriseModule.isEnterprise}static isValidChartType(e){return!!Rb(e)||Rg(e)}static isLegacyChartType(t){return e.legacyChartTypes.includes(t)}static validateUpdateParams(t){switch(t.type){case"rangeChartUpdate":return e.validateUpdateRangeChartParams(t);case"pivotChartUpdate":return e.validateUpdatePivotChartParams(t);case"crossFilterChartUpdate":return e.validateUpdateCrossFilterChartParams(t);default:return ep(`Invalid value supplied for 'type': ${t.type}. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`),!1}}static validateCreateParams(t){return To(t,[e.enterpriseChartTypeValidation,e.switchCategorySeriesValidation])}static validateUpdateRangeChartParams(t){return To(t,[...e.commonUpdateValidations,e.enterpriseChartTypeValidation,...e.cellRangeValidations,{property:"seriesChartTypes",validationFn:e=>void 0===e||Array.isArray(e)&&e.every(Ti),warnMessage:Ts("seriesChartTypes","Array of SeriesChartType")}],[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","switchCategorySeries","aggFunc","seriesChartTypes","seriesGroupType"],"UpdateRangeChartParams")}static validateUpdatePivotChartParams(t){return To(t,[...e.commonUpdateValidations],[...e.baseUpdateChartParams],"Upd
397atePivotChartParams")}static validateUpdateCrossFilterChartParams(t){return To(t,[...e.commonUpdateValidations,...e.cellRangeValidations],[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","aggFunc"],"UpdateCrossFilterChartParams")}};function To(e,t,i,s){let r;for(let i of t){let{property:t,validationFn:s,warnMessage:a,warnIfFixed:o}=i;if(t in e){let i=e[t],n=s(i);if(!0===n)continue;if(!1===n)return ep(a(i)),!1;(r=r||{...e})[t]=n,o&&ep(a(i))}}if(i){for(let t in e)if(!i.includes(t))return ep(`Unexpected property supplied. ${s} does not contain: \`${t}\`.`),!1}return!r||r}Ta.legacyChartTypes=["doughnut"],Ta.baseUpdateChartParams=["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart"],Ta.validateChartType=R9(e=>{if(Ta.isValidChartType(e))return!0;if(Ta.isLegacyChartType(e)){let t=Rw(e);return ep(`The chart type '${e}' has been deprecated. Please use '${t}' instead.`),t}return!1}),Ta.validateAgChartThemeOverrides=R9(e=>"object"==typeof e),Ta.validateChartParamsCellRange=R9(e=>"object"==typeof e),Ta.validateAggFunc=R9(e=>"string"==typeof e||"function"==typeof e),Ta.enterpriseChartTypeValidation={property:"chartType",validationFn:R9(e=>Ta.isEnterprise()||!e||!Rm(RS(e),"isEnterprise")),warnMessage:e=>Tr(`The '${e}' chart type`)},Ta.switchCategorySeriesValidation={property:"switchCategorySeries",validationFn:R9(e=>{if(!e||Ta.isEnterprise())return!0}),warnMessage:()=>Tr("'switchCategorySeries' has been ignored as it"),warnIfFixed:!0},Ta.commonUpdateValidations=[{property:"chartId",validationFn:Te,warnMessage:Ts("chartId","string")},{property:"chartType",validationFn:Ta.validateChartType,warnMessage:Ts("chartType","ChartType")},{property:"chartThemeName",validationFn:Te,warnMessage:Ts("chartThemeName","string")},{property:"chartThemeOverrides",validationFn:Ta.validateAgChartThemeOverrides,warnMessage:Ts("chartThemeOverrides","AgChartThemeOverrides")},{property:"unlinkChart",validationFn:Tt,warnMessage:Ts("unlinkChart","boolean")}],Ta.cellRangeValidations=[{property:"cellRange",validationFn:Ta.validateChartParamsCellRange,warnMessage:Ts("cellRange","ChartParamsCellRange")},{property:"suppressChartRanges",validationFn:Tt,warnMessage:Ts("suppressChartRanges","boolean")},{property:"aggFunc",validationFn:Ta.validateAggFunc,warnMessage:Ts("aggFunc","string or IAggFunc")},Ta.switchCategorySeriesValidation];var Tn=["ag-default","ag-material","ag-sheets","ag-polychroma","ag-vivid"],Tl=class extends tk{constructor(e){super(),this.model=e,this.isEnterprise=()=>IR.enterpriseModule.isEnterprise}wireBeans(e){this.rangeService=e.rangeService}postConstruct(){this.setChartRange(),this.model.unlinked&&this.rangeService&&this.rangeService.setCellRanges([]);let e=this.updateForGridChange.bind(this,{});this.addManagedEventListeners({cellSelectionChanged:e=>{e.id&&e.id===this.model.chartId&&this.updateForRangeChange()},columnMoved:e,columnPinned:e,columnVisible:e,columnRowGroupChanged:e,modelUpdated:e,cellValueChanged:this.updateForDataChange.bind(this)})}update(e){if(!this.validUpdateType(e))return!1;let t=Ta.validateUpdateParams(e);if(!t)return!1;let i=!0===t?e:t;return this.applyValidatedChartParams(i),!0}applyValidatedChartParams(e){var t,i,s,r,a,o,n,l,h;let{chartId:d,chartType:u,chartThemeName:c,unlinkChart:p}=e,g={...{chartId:d,pivotChart:this.model.pivotChart,chartType:null!=u?u:this.model.chartType,chartThemeName:null!=c?c:this.model.chartThemeName,unlinkChart:null!=p?p:this.model.unlinked,cellRange:this.model.suppliedCellRange,switchCategorySeries:this.model.switchCategorySeries,aggFunc:this.model.aggFunc,seriesChartTypes:void 0,suppressChartRanges:!1,crossFiltering:!1}};switch(e.type){case"rangeChartUpdate":g.cellRange=null!=(t=this.createCellRange(e))?t:this.model.suppliedCellRange,g.switchCategorySeries=null!=(i=e.switchCategorySeries)?i:this.model.switchCategorySeries,g.aggFunc=null!=(s=e.aggFunc)?s:this.model.aggFunc,g.seriesChartTypes=e.seriesChartTypes,g.suppressChartRanges=null!=(r=e.suppressChartRanges)?r:this.model.suppressChartRanges,g.seriesGroupType=null!=(a=e.seriesGroupType)?a:this.model.seriesGroupType;break;case"crossFilterChartUpdate":g.cellRange=null!=(o=this.createCellRange(e))?o:this.model.suppliedCellRange,g.switchCategorySeries=!1,g.aggFunc=null!=(n=e.aggFunc)?n:this.model.aggFunc,g.crossFiltering=!0,g.suppressChartRanges=null!=(l=e.suppressChartRanges)?l:this.model.suppressChartRanges;break;case"pivotChartUpdate":g.switchCategorySeries=!1}this.model.updateModel(g),g.unlinkChart||g.suppressChartRanges?null==(h=this.rangeService)||h.setCellRanges([]):this.setChartRange()}updateForGridChange(e){if(this.model.unlinked)return;let{maintainColState:t,setColsFromRange:i}=null!=e?e:{};this.model.updateCellRanges({maintainColState:t,setColsFromRange:i}),this.model.updateData(),this.setChartRange()}updateForDataChange(){this.model.unlinked||(this.model.updateData(),this.raiseChartModelUpdateEvent())}updateForRangeChange(){this.updateForGridChange({setColsFromRange:!0}),this.raiseChartRangeSelectionChangedEvent()}updateForPanelChange(e){this.model.updateCellRanges(e),this.model.updateData(),e.skipAnimation&&this.getChartProxy().getChartRef().skipAnimations(),this.setChartRange(),this.raiseChartRangeSelectionChangedEvent()}updateThemeOverrides(e){this.chartProxy.updateThemeOverrides(e)}getChartUpdateParams(e){let t=this.getSelectedValueColState().map(e=>({colId:e.colId,displayName:e.displayName})),i=this.getChartData(),s=this.getSelectedDimensions(),r={data:i,groupData:this.model.groupChartData,grouping:this.isGrouping(),categories:s.map(e=>{var t;return{id:e.colId,name:e.displayName,chartDataType:null!=(t=this.model.categoryAxisType)?t:this.model.getChartDataType(e.colId)}}),fields:t,chartId:this.getChartId(),getCrossFilteringContext:()=>({lastSelectedChartId:"xxx"}),seriesChartTypes:this.getSeriesChartTypes(),updatedOverrides:e,seriesGroupType:this.model.seriesGroupType};return this.isCategorySeriesSwitched()?this.invertCategorySeriesParams(r):r}invertCategorySeriesParams(e){let[t]=e.categories,i=[{id:R7.DEFAULT_CATEGORY,name:""}],s=e.data.map((e,i)=>{let s=`${t.id}:${i}`,r=e[t.id];return{colId:s,displayName:null==r?"":String(r)}}),r=e.fields.map(i=>{let s={[R7.DEFAULT_CATEGORY]:i.displayName};for(let[r,a]of e.data.entries()){let e=`${t.id}:${r}`,o=a[i.colId];s[e]=o}return s});return{...e,categories:i,fields:s,data:r}}getChartModel(){let e=this.model.pivotChart?"pivot":"range",t=this.isComboChart()?this.model.comboChartModel.seriesChartTypes:void 0;return{modelType:e,chartId:this.model.chartId,chartType:this.model.chartType,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides(),chartPalette:this.chartProxy.getChartPalette(),cellRange:this.getCellRangeParams(),switchCategorySeries:this.model.switchCategorySeries,suppressChartRanges:this.model.suppressChartRanges,aggFunc:this.model.aggFunc,unlinkChart:this.model.unlinked,seriesChartTypes:t,seriesGroupType:this.model.seriesGroupType}}getChartId(){return this.model.chartId}getChartData(){return this.model.chartData}getChartType(){return this.model.chartType}setChartType(e){this.updateMultiSeriesAndCategory(this.model.chartType,e),this.model.chartType=e,this.model.comboChartModel.updateSeriesChartTypes(),this.model.switchCategorySeries=!1,this.model.categoryAxisType=void 0,this.model.seriesGroupType=void 0,this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()}isCategorySeriesSwitched(){return this.model.switchCategorySeries&&!this.model.isGrouping()}switchCategorySeries(e){RE(this.getChartType())&&(this.model.switchCategorySeries=e,this.raiseChartModelUpdateEvent())}getAggFunc(){return this.model.aggFunc}setAggFunc(e,t){this.model.aggFunc===e||(this.model.aggFunc=e,t||(this.model.updateData(),this.raiseChartModelUpdateEvent()))}updateMultiSeriesAndCategory(e,t){var i,s;let r=(e,t)=>{let i=0;for(let s of e)s.selected&&(i>=t?s.selected=!1:i++);0===i&&(e[0].selected=!0)},a=RM(t),o=RD(t),n=null!=a&&(null!=(i=RM(e))?i:100)>(null!=a?a:100),l=null!=o&&(null!=(s=RD(e))?s:100)>(null!=o?o:100);n&&r(this.model.dimensionColState,a),l&&r(this.model.valueColState,o),(n||l)&&(this.model.resetCellRanges(n,l),this.setChartRange(!0))}setChartThemeName(e,t){this.model.chartThemeName=e,t||(this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent())}getChartThemeName(){return this.model.chartThemeName}
397isPivotChart(){return this.model.pivotChart}isPivotMode(){return this.model.isPivotMode()}isGrouping(){return this.model.isGrouping()}isCrossFilterChart(){return this.model.crossFiltering}getThemeNames(){return this.gos.get("chartThemes")||Tn}getThemes(){return this.getThemeNames().map(e=>{let t=R1(e)?e:this.chartProxy.lookupCustomChartTheme(e);return ID.getChartTheme(t)})}getPalettes(){return this.getThemes().map(e=>e.palette)}getThemeTemplateParameters(){return this.getThemes().map(e=>e.getTemplateParameters())}getValueColState(){return this.model.valueColState.map(this.displayNameMapper.bind(this))}getSelectedValueColState(){return this.getValueColState().filter(e=>e.selected)}getSelectedDimensions(){return this.model.getSelectedDimensions()}displayNameMapper(e){let{column:t}=e;if(t)e.displayName=this.model.getColDisplayName(t,this.model.isPivotMode());else{let i=this.model.columnNames[e.colId];e.displayName=i?i.join(" - "):this.model.getColDisplayName(t)}return e}getColStateForMenu(){return{dimensionCols:this.model.dimensionColState,valueCols:this.getValueColState()}}setChartRange(e=!1){!this.rangeService||this.model.suppressChartRanges||this.model.unlinked||this.rangeService.setCellRanges(this.getCellRanges()),e||this.raiseChartModelUpdateEvent()}detachChartRange(){this.model.unlinked=!this.model.unlinked,this.model.unlinked?this.rangeService&&this.rangeService.setCellRanges([]):this.updateForGridChange(),this.dispatchLocalEvent({type:"chartLinkedChanged"})}setChartProxy(e){this.chartProxy=e}getChartProxy(){return this.chartProxy}isActiveXYChart(){return["scatter","bubble"].includes(this.getChartType())}isChartLinked(){return!this.model.unlinked}customComboExists(){let e=this.model.comboChartModel.savedCustomSeriesChartTypes;return e&&e.length>0}getSeriesChartTypes(){return this.model.comboChartModel.seriesChartTypes}isComboChart(e){return this.model.isComboChart(e)}updateSeriesChartType(e,t,i){let s=this.model.comboChartModel.seriesChartTypes.find(t=>t.colId===e);if(s){let e="customCombo"!==this.model.chartType;e&&(this.model.chartType="customCombo");let r=s.chartType;null!=t&&(s.chartType=t),null!=i&&(s.secondaryAxis=i),this.model.comboChartModel.savedCustomSeriesChartTypes=this.model.comboChartModel.seriesChartTypes,this.model.comboChartModel.updateSeriesChartTypes(),this.updateForDataChange(),e&&this.dispatchLocalEvent({type:"chartTypeChanged"}),r!==t&&this.dispatchLocalEvent({type:"chartSeriesChartTypeChanged"}),this.raiseChartOptionsChangedEvent()}}getActiveSeriesChartTypes(){let e=this.getSelectedValueColState().map(e=>e.colId);return this.getSeriesChartTypes().filter(t=>e.includes(t.colId))}getChartSeriesTypes(e){let t=null!=e?e:this.getChartType();return this.isComboChart(t)?["line","bar","area"]:[RS(t)]}getChartSeriesType(){let e=this.getSeriesChartTypes();if(0===e.length)return"bar";let t=e[0].chartType;return"columnLineCombo"===t?"bar":"areaColumnCombo"===t?"area":RS(t)}getCellRanges(){return[this.model.dimensionCellRange,this.model.valueCellRange].filter(e=>e)}createCellRange(e){var t;return e.cellRange&&(null==(t=this.rangeService)?void 0:t.createPartialCellRangeFromRangeParams(e.cellRange,!0))}validUpdateType(e){var t;if(!e.type)return ep("Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'."),!1;let i={"Range Chart":()=>!this.isPivotChart()&&!this.isCrossFilterChart(),"Pivot Chart":()=>this.isPivotChart(),"Cross Filter Chart":()=>this.isCrossFilterChart()},s=null!=(t=Object.keys(i).find(e=>i[e]()))?t:"Range Chart",r=e.type===`${s[0].toLowerCase()}${s.slice(1).replace(/ /g,"")}Update`;return r||ep(`Unable to update chart as a '${e.type}' update type is not permitted on a ${s}.`),r}getCellRangeParams(){let e=this.getCellRanges(),t=e[0],i=t&&t.startRow||null,s=t&&t.endRow||null;return{rowStartIndex:i&&i.rowIndex,rowStartPinned:i&&i.rowPinned,rowEndIndex:s&&s.rowIndex,rowEndPinned:s&&s.rowPinned,columns:e.reduce((e,t)=>e.concat(t.columns.map(e=>e.getId())),[])}}setCategoryAxisType(e){this.model.categoryAxisType=e,this.raiseChartModelUpdateEvent()}getSeriesGroupType(){var e;return null!=(e=this.model.seriesGroupType)?e:this.chartProxy.getSeriesGroupType()}setSeriesGroupType(e){this.model.seriesGroupType=e,this.raiseChartModelUpdateEvent()}raiseChartModelUpdateEvent(){this.dispatchLocalEvent({type:"chartModelUpdate"})}raiseChartUpdatedEvent(){this.dispatchLocalEvent({type:"chartUpdated"})}raiseChartApiUpdateEvent(){this.dispatchLocalEvent({type:"chartApiUpdate"})}raiseChartOptionsChangedEvent(){let{chartId:e,chartType:t}=this.getChartModel();this.eventService.dispatchEvent({type:"chartOptionsChanged",chartId:e,chartType:t,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides()})}raiseChartRangeSelectionChangedEvent(){this.eventService.dispatchEvent({type:"chartRangeSelectionChanged",id:this.model.chartId,chartId:this.model.chartId,cellRange:this.getCellRangeParams()})}destroy(){super.destroy(),this.rangeService&&this.rangeService.setCellRanges([])}};function Th(e){return null!=e.chart?e.chart:e}var Td=class{constructor(e){this.chartProxyParams=e,this.clearThemeOverrides=!1,this.isEnterpriseCharts=IR.enterpriseModule.isEnterprise,this.chart=e.chartInstance,this.chartType=e.chartType,this.crossFiltering=e.crossFiltering,this.crossFilterCallback=e.crossFilterCallback,this.standaloneChartType=RS(this.chartType),null==this.chart?this.chart=Ih.create(this.getCommonChartOptions()):this.clearThemeOverrides=!0}crossFilteringReset(){}update(e){this.getChartRef().update(this.getUpdateOptions(e,this.getCommonChartOptions(e.updatedOverrides)))}updateThemeOverrides(e){this.getChartRef().updateDelta({theme:{overrides:e}})}getChart(){return Th(this.chart)}getChartRef(){return this.chart}downloadChart(e,t,i){let{chart:s}=this,r=Th(s),a=t||(r.title?r.title.text:"chart"),{width:o,height:n}=e||{};s.download({width:o,height:n,fileName:a,fileFormat:i})}getChartImageDataURL(e){return this.getChart().getCanvasDataURL(e)}getChartOptions(){return this.chart.getOptions()}getChartThemeOverrides(){var e;return null!=(e=this.getChartOptions().theme.overrides)?e:{}}getChartPalette(){return ID.getChartTheme(this.getChartOptions().theme).palette}setPaired(e){let t=RS(this.chartProxyParams.chartType);this.chart.updateDelta({theme:{overrides:{[t]:{paired:e}}}})}isPaired(){let e=RS(this.chartProxyParams.chartType);return R0(this.getChartThemeOverrides(),`${e}.paired`,!0)}lookupCustomChartTheme(e){return R3(this.chartProxyParams,e)}getSeriesGroupType(){}transformCategoryData(e,t){return e.map((e,i)=>{let s=e[t],r=s&&s.toString?s.toString():"",a={...e};return a[t]={id:i,value:s,toString:()=>r},a})}getCommonChartOptions(e){var t,i;let s=this.clearThemeOverrides?{}:null!=(t=null==(i=this.chart)?void 0:i.getOptions())?t:{},r=null!=this.chart?this.getActiveFormattingPanelOverrides():void 0;this.clearThemeOverrides=!1;let a=function(e,t,i,s,r){var a,o,n,l,h,d,u,c,p;let g,m,v,f,C,{chartOptionsToRestore:y,chartPaletteToRestore:w,chartThemeToRestore:b}=e,S=(g=(o=e).getChartThemeName(),tS(m=o.getChartThemes(),g)||(g=m[0]),g),x=R1(S),M=x?{baseTheme:S}:null!=(a=R3(e,S))?a:{},D=e.getGridOptionsChartThemeOverrides(),E=e.apiChartThemeOverrides,I=RS(e.chartType),A=e.crossFiltering?(n=t,l=e,{[I]:{tooltip:{delay:500},legend:{listeners:{legendItemClick:e=>
397{n.getChart().series.forEach(t=>{t.toggleSeriesItem(e.itemId,e.enabled),t.toggleSeriesItem(`${e.itemId}-filtered-out`,e.enabled)})}}},listeners:{click:e=>l.crossFilterCallback(e,!0)}}}):void 0,R=[x?(h=e,d=i,u=(C=e=>!!e&&Object.keys(e).some(t=>R0(e[t],"title.enabled",!1)))(D)||C(E),v=h.getExtraPaddingDirections(),{common:{...d?{animation:{duration:500}}:void 0,axes:R2,padding:{top:!u&&v.includes("top")?40:20,right:v.includes("right")?30:20,bottom:v.includes("bottom")?40:20,left:v.includes("left")?30:20}}}):void 0,{pie:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}},donut:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}}},s,A,D,E,{...null!=y?y:{}},r].filter(e=>!!e).reduce((e,t)=>({baseTheme:e,overrides:t}),M);return w&&S===b&&(c=w,p=ID.getChartTheme(M).palette,!((f=(e,t)=>{var i;return e===t||(null==e?void 0:e.length)===(null==t?void 0:t.length)&&null!=(i=null==e?void 0:e.every((e,i)=>e===(null==t?void 0:t[i])))&&i})(c.fills,p.fills)&&f(c.strokes,p.strokes)))&&(R.palette=w),R}(this.chartProxyParams,this,this.isEnterpriseCharts,this.getChartThemeDefaults(),null!=e?e:r),o={...s,mode:"integrated"};return o.theme=a,o.container=this.chartProxyParams.parentElement,o}getChartThemeDefaults(){let e=this.getSeriesChartThemeDefaults(),t=e?{[this.standaloneChartType]:e}:{},i={enabled:!0,snap:!0,label:{enabled:!1}},s=this.isEnterpriseCharts?{zoom:{enabled:!0},animation:{enabled:!0,duration:500},axes:{number:{crosshair:i},category:{crosshair:i},log:{crosshair:i},time:{crosshair:i}}}:{};return s.minHeight=0,s.minWidth=0,s.navigator={enabled:!1},{common:s,...t}}getSeriesChartThemeDefaults(){}getActiveFormattingPanelOverrides(){var e,t;if(this.clearThemeOverrides)return{};let i=null==(e=this.chart)?void 0:e.getOptions().theme;return null!=(t=null==i?void 0:i.overrides)?t:{}}destroy({keepChartInstance:e=!1}={}){if(e)return this.chart.resetAnimations(),this.chart;this.destroyChart()}destroyChart(){this.chart&&(this.chart.destroy(),this.chart=void 0)}},Tu=class extends Td{constructor(e){super(e),this.crossFilteringAllPoints=new Set,this.crossFilteringSelectedPoints=[]}getUpdateOptions(e,t){let i=this.getAxes(e,t);return{...t,data:this.getData(e,i),axes:i,series:this.getSeries(e)}}getData(e,t){let i=["area","line"].includes(this.standaloneChartType);return this.crossFiltering&&i?this.getCrossFilterData(e):this.getDataTransformedData(e,t)}getDataTransformedData(e,t){let i=t[0].type,{categories:s,data:r}=e,[a]=s;switch(i){case"category":return this.transformCategoryData(r,a.id);case"time":return this.transformTimeData(r,a.id);default:return r}}getXAxisType(e){return e.grouping?"grouped-category":this.isXAxisOfType(e,"time",e=>e instanceof Date)?"time":this.isXAxisOfType(e,"number")?"number":"category"}isXAxisOfType(e,t,i){let[s]=e.categories;if(null!=s&&s.chartDataType)return s.chartDataType===t;if(!i)return!1;let r=e.data[0];return!!r&&i(r[s.id])}transformTimeData(e,t){var i;return(null==(i=e[0])?void 0:i[t])instanceof Date?e:e.map(e=>{let i=e[t];return"string"==typeof i?{...e,[t]:new Date(i)}:e})}crossFilteringReset(){this.crossFilteringSelectedPoints=[],this.crossFilteringAllPoints.clear()}crossFilteringPointSelected(e){return 0==this.crossFilteringSelectedPoints.length||this.crossFilteringSelectedPoints.includes(e)}crossFilteringDeselectedPoints(){return this.crossFilteringSelectedPoints.length>0&&this.crossFilteringAllPoints.size!==this.crossFilteringSelectedPoints.length}extractLineAreaCrossFilterSeries(e,t){let[i]=t.categories,s=e=>"area"===this.standaloneChartType?t.getCrossFilteringContext().lastSelectedChartId===t.chartId?e+"-total":e:e+"-total";return e.map(e=>(e.yKey=s(e.yKey),e.listeners={nodeClick:t=>{let i=t.datum[e.xKey],s=t.event.metaKey||t.event.ctrlKey;this.crossFilteringAddSelectedPoint(s,i),this.crossFilterCallback(t)}},e.marker={itemStyler:e=>{let t=e.datum[i.id];return{fill:e.highlighted?"yellow":e.fill,size:e.highlighted?14:8*!!this.crossFilteringPointSelected(t)}}},"area"===this.standaloneChartType&&(e.fillOpacity=this.crossFilteringDeselectedPoints()?.3:1),"line"===this.standaloneChartType&&(e.strokeOpacity=this.crossFilteringDeselectedPoints()?.3:1),e))}getCrossFilterData(e){this.crossFilteringAllPoints.clear();let[t]=e.categories,i=e.fields[0].colId,s=`${i}-filtered-out`,r=e.getCrossFilteringContext().lastSelectedChartId;return e.data.map(a=>{let o=a[t.id];this.crossFilteringAllPoints.add(o);let n=this.crossFilteringPointSelected(o);return"area"===this.standaloneChartType&&r===e.chartId&&(a[`${i}-total`]=n?a[i]:a[i]+a[s]),"line"===this.standaloneChartType&&(a[`${i}-total`]=n?a[i]:a[i]+a[s]),a})}crossFilteringAddSelectedPoint(e,t){e?this.crossFilteringSelectedPoints.push(t):this.crossFilteringSelectedPoints=[t]}isHorizontal(e){let t=this.standaloneChartType;if("waterfall"!==t&&"box-plot"!==t&&"range-bar"!==t)return!1;let i=e.theme,s=e=>{var i;let r=null==e||null==(i=e.overrides)||null==(i=i[t])||null==(i=i.series)?void 0:i.direction;return null!=r?"horizontal"===r:"object"==typeof(null==e?void 0:e.baseTheme)&&s(e.baseTheme)};return s(i)}},Tc=class extends Tu{constructor(e){super(e)}getAxes(e){let t=[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}];if(this.isNormalised()){let e=t[1];e.label={...e.label,formatter:e=>Math.round(e.value)+"%"}}return t}getSeries(e){let[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName,normalizedTo:"normalizedArea"===this.chartType?100:void 0,stacked:["normalizedArea","stackedArea"].includes(this.chartType)}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}isNormalised(){return!this.crossFiltering&&"normalizedArea"===this.chartType}};function Tp(e,t){let i=parseInt(e.slice(1,3),16),s=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return t?`rgba(${i}, ${s}, ${r}, ${t})`:`rgba(${i}, ${s}, ${r})`}function Tg(e,t){return e.map(e=>{let i=IA.Color.fromString(e);return new IA.Color(i.r,i.g,i.b,t).toHexString()})}var Tm=new Set(["bar","groupedBar","stackedBar","normalizedBar"]),Tv=class extends Tu{constructor(e){super(e)}getAxes(e){let t=[{type:this.getXAxisType(e),position:this.isHorizontal()?"left":"bottom"},{type:"number",position:this.isHorizontal()?"bottom":"left"}];if(this.isNormalised()){let e=t[1];e.label={...e.label,formatter:e=>Math.round(e.value)+"%"}}return t}getSeries(e){let[t]=e.categories,i=e.fields.map(e=>{var i;return{type:this.standaloneChartType,direction:this.isHorizontal()?"horizontal":"vertical",stacked:this.crossFiltering||(i=this.chartType,Rv.has(i)),normalizedTo:this.isNormalised()?100:void 0,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName}});return this.crossFiltering?this.extractCrossFilterSeries(i):i}extractCrossFilterSeries(e){let t=this.getChartPalette(),i=(e,i)=>{var s,r;return{...e,highlightStyle:{item:{fill:void 0}},fill:null==t||null==(s=t.fills)?void 0:s[i],stroke:null==t||null==(r=t.strokes)?void 0:r[i],listeners:{nodeClick:this.crossFilterCallback}}},s=e=>{let t=e.yKey+"-filtered-out";
397return{...e,yKey:t,fill:Tp(e.fill,"0.3"),stroke:Tp(e.stroke,"0.3"),showInLegend:!1}},r=[];for(let t=0;t<e.length;t++){let a=e[t];r.push(i(a,t)),r.push(s(i(a,t)))}return r}isNormalised(){return!this.crossFiltering&&tS(["normalizedColumn","normalizedBar"],this.chartType)}isHorizontal(){return Tm.has(this.chartType)}},Tf=class extends Tu{constructor(e){super(e)}getSeries(e){let t=e.fields[0];return[{type:this.standaloneChartType,xKey:t.colId,xName:t.displayName,yName:this.chartProxyParams.translate("histogramFrequency"),areaPlot:!1}]}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}},TC=class extends Tu{constructor(e){super(e)}getAxes(e){return[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}]}getSeries(e){let[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}},Ty=class extends Tu{constructor(e){super(e)}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}getSeries(e){let[t]=e.categories,i=this.isPaired(),s=this.getSeriesDefinitions(e.fields,i),r=t.id===R7.DEFAULT_CATEGORY?void 0:t,a=s.map(e=>{var t,i,s,a,o;return null!=e&&e.sizeField?{type:"bubble",xKey:e.xField.colId,xName:null!=(s=e.xField.displayName)?s:void 0,yKey:e.yField.colId,yName:null!=(a=e.yField.displayName)?a:void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,sizeKey:e.sizeField.colId,sizeName:null!=(o=e.sizeField.displayName)?o:"",labelKey:r?r.id:e.yField.colId,labelName:r?r.name:void 0}:{type:"scatter",xKey:e.xField.colId,xName:null!=(t=e.xField.displayName)?t:void 0,yKey:e.yField.colId,yName:null!=(i=e.yField.displayName)?i:void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,labelKey:r?r.id:e.yField.colId,labelName:r?r.name:void 0}});return this.crossFiltering?this.extractCrossFilterSeries(a,e):a}extractCrossFilterSeries(e,t){let{data:i}=t,s=this.getChartPalette(),r=e=>`${e}-filtered-out`,a=(e,t)=>{var a,o;let n,l=null==s||null==(a=s.fills)?void 0:a[t],h=null==s||null==(o=s.strokes)?void 0:o[t];if("bubble"===e.type){let{sizeKey:t}=e;n=((e,t)=>{let i=[1/0,-1/0];if(null!=t)for(let a of e){var s;let e=null!=(s=a[t])?s:a[r(t)];e<i[0]&&(i[0]=e),e>i[1]&&(i[1]=e)}if(i[0]<=i[1])return i})(i,t)}return{...e,fill:l,stroke:h,domain:n,highlightStyle:{item:{fill:"yellow"}},listeners:{...e.listeners,nodeClick:this.crossFilterCallback}}},o=e=>{let{yKey:t,xKey:i}=e,s={};return"bubble"===e.type&&(s={sizeKey:r(e.sizeKey)}),{...e,...s,yKey:r(t),xKey:r(i),fillOpacity:.3,strokeOpacity:.3,showInLegend:!1,listeners:{...e.listeners,nodeClick:e=>{let t=e.datum[r(i)],s={...e,xKey:i,datum:{...e.datum,[i]:t}};this.crossFilterCallback(s)}}}},n=e.map(a);return[...n,...n.map(o)]}getSeriesDefinitions(e,t){if(e.length<2)return[];let i="bubble"===this.chartType;if(t)return i?e.map((t,i)=>i%3==0?{xField:t,yField:e[i+1],sizeField:e[i+2]}:null).filter(e=>e&&e.yField&&e.sizeField):e.map((t,i)=>i%2==0?{xField:t,yField:e[i+1]}:null).filter(e=>e&&e.yField);let s=e[0];return i?e.map((t,i)=>i%2==1?{xField:s,yField:t,sizeField:e[i+1]}:null).filter(e=>e&&e.sizeField):e.filter((e,t)=>t>0).map(e=>({xField:s,yField:e}))}},Tw=class extends Tu{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}getSeries(e){var t;let[i]=e.categories,[s]=e.fields;return[{type:this.standaloneChartType,xKey:i.id,xName:i.name,yKey:s.colId,yName:null!=(t=s.displayName)?t:void 0}]}},Tb=class extends Tu{constructor(e){super(e)}getAxes(e){let t=e?e.fields:[],i=new Map(t.map(e=>[e.colId,e])),{primaryYKeys:s,secondaryYKeys:r}=this.getYKeys(t,e.seriesChartTypes),a=[{type:this.getXAxisType(e),position:"bottom"}];return s.length>0&&a.push({type:"number",keys:s,position:"left"}),r.length>0&&r.forEach(e=>{let t=i.get(e);t&&t.colId===e&&a.push({type:"number",keys:[e],position:"right"})}),a}getSeries(e){let{fields:t,seriesChartTypes:i}=e,[s]=e.categories;return t.map(e=>{let t=i.find(t=>t.colId===e.colId);if(t){let i=t.chartType,r=["groupedColumn","groupedBar"].includes(i);return{type:RS(i),xKey:s.id,yKey:e.colId,yName:e.displayName,stacked:["stackedArea","stackedColumn"].includes(i),...r?{grouped:!0}:{}}}})}getYKeys(e,t){let i=[],s=[];
397return e.forEach(e=>{let r=e.colId,a=t.find(e=>e.colId===r);a&&(a.secondaryAxis?s.push(r):i.push(r))}),{primaryYKeys:i,secondaryYKeys:s}}},TS="AG-GRID-DEFAULT-LABEL-KEY";function Tx(e,t=null,i){let{depth:s,rootValues:r,value:a,children:o}=e;if(r)return r.map(e=>({[TS]:t,...e}));if(0===s)return[{[TS]:t,...a}];let n=[];for(let[e,t]of o.entries())n.push(...Tx(t,e,!0));return i?[{[TS]:t,children:n,...null!=a?a:{}}]:n}function TM(e,t,i){let s={depth:0,children:new Map};return e.forEach(e=>{let r=t(e);!function e(t,i,s,r,a){if(r===i)return 0===r?(a.rootValues||(a.rootValues=[]),a.rootValues.push(t)):a.value=t,a;{let o=s(t,r),n=e(t,i,s,r+1,a.children.get(o)||{depth:0,children:new Map});return a.children.set(o,n),a.depth=Math.max(1+n.depth,a.depth),a}}(e,r,i,0,s)}),s}var TD=class extends Td{constructor(e){super(e)}getUpdateOptions(e,t){let{fields:i}=e,[s,r]=i;return{...t,series:this.getSeries(s,r),data:this.getData(e,s,r)}}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}}}}getSeries(e,t){var i,s;return[{type:this.standaloneChartType,labelKey:TS,sizeKey:null==e?void 0:e.colId,sizeName:null!=(i=null==e?void 0:e.displayName)?i:void 0,colorKey:null==t?void 0:t.colId,colorName:null!=(s=null==t?void 0:t.displayName)?s:void 0}]}getData(e,t,i){var s,r,a;let{categories:o,data:n,groupData:l,grouping:h}=e;if(h)return r=i?n.concat(null!=(s=null==l?void 0:l.map(e=>{let i={...e};return delete i[t.colId],i}))?s:[]):n,a=e=>{var t,i;return null!=(t=null==(i=e[tz])?void 0:i.labels)?t:null},Tx(TM(r,function(e){var t,i;return null!=(t=null==(i=a(e))?void 0:i.length)?t:0},function(e,t){let i=a(e);if(!i)return null;let s=i.length-1-t;return i[s]}));{let e=o.map(({id:e})=>e);return Tx(TM(n,function(t){return e.length},function(t,i){var s;return null==(s=t[e[i]])?null:String(s)}))}}},TE=class extends Td{constructor(e){super(e)}getUpdateOptions(e,t){return{...t,data:this.crossFiltering?this.getCrossFilterData(e):e.data,series:this.getSeries(e)}}getSeries(e){let[t]=e.categories,i=e.fields.length,s={currentOffset:0,offsetAmount:i>1?20:40},r=this.getFields(e).map(e=>{let r={type:this.standaloneChartType,angleKey:e.colId,angleName:e.displayName,sectorLabelKey:e.colId,calloutLabelName:t.name,calloutLabelKey:t.id};if("donut"===this.chartType||"doughnut"===this.chartType){var a;let t,o,{outerRadiusOffset:n,innerRadiusOffset:l}=(t=s.currentOffset,s.currentOffset-=s.offsetAmount,o=s.currentOffset,s.currentOffset-=s.offsetAmount,{outerRadiusOffset:t,innerRadiusOffset:o}),h=e.displayName?{title:{text:e.displayName,showInLegend:i>1}}:void 0;return{...r,type:"donut",outerRadiusOffset:n,innerRadiusOffset:l,...h,calloutLine:{colors:null==(a=this.getChartPalette())?void 0:a.strokes}}}return r});return this.crossFiltering?this.extractCrossFilterSeries(r):r}getCrossFilterData(e){let t=e.fields[0].colId,i=`${t}-filtered-out`;return e.data.map(e=>{let s=e[t]+e[i];return e[`${t}-total`]=s,e[i]=1,e[t]=e[t]/s,e})}extractCrossFilterSeries(e){var t,i,s,r,a;let o=this.getChartPalette(),n=e=>({...e,legendItemKey:e.calloutLabelKey,calloutLabel:{enabled:!1},highlightStyle:{item:{fill:void 0}},radiusKey:e.angleKey,angleKey:e.angleKey+"-total",radiusMin:0,radiusMax:1,listeners:{nodeClick:this.crossFilterCallback}}),l=e[0],h=l.angleKey,d=n(l);return[(t=n(l),{...d,radiusKey:h+"-filtered-out",fills:Tg(null!=(i=null!=(s=t.fills)?s:null==o?void 0:o.fills)?i:[],.3),strokes:Tg(null!=(r=null!=(a=t.strokes)?a:null==o?void 0:o.strokes)?r:[],.3),showInLegend:!1}),d]}getFields(e){return"pie"===this.chartType?e.fields.slice(0,1):e.fields}},TI=class extends Td{constructor(e){super(e)}getAxes(e){let t="radial-bar"===this.standaloneChartType;return[{type:t?"angle-number":"angle-category"},{type:t?"radius-category":"radius-number"}]}getSeries(e){let{fields:t,categories:i,seriesGroupType:s}=e,[r]=i,a="radial-bar"===this.standaloneChartType,o=this.getSeriesGroupTypeOptions(s);return t.map(e=>{var t,i;return{type:this.standaloneChartType,angleKey:a?e.colId:r.id,angleName:a?null!=(t=e.displayName)?t:void 0:r.name,radiusKey:a?r.id:e.colId,radiusName:a?r.name:null!=(i=e.displayName)?i:void 0,...o}})}getSeriesGroupType(){var e;let t=this.standaloneChartType;if(!["nightingale","radial-bar","radial-column"].includes(t))return;let i=null==(e=this.getChart().series)||null==(e=e[0])?void 0:e.properties.toJson(),s=()=>i.normalizedTo?"normalized":"stacked";return"nightingale"===t?i.grouped?"grouped":s():i.stacked?s():"grouped"}getUpdateOptions(e,t){let i=this.getAxes(e);return{...t,data:this.getData(e,i),axes:i,series:this.getSeries(e)}}getData(e,t){if(!t.some(e=>"angle-category"===e.type||"radius-category"===e.type))return e.data;{let[t]=e.categories;return this.transformCategoryData(e.data,t.id)}}getSeriesGroupTypeOptions(e){return e?{grouped:"grouped"===e||void 0,stacked:"grouped"!==e||void 0,normalizedTo:"normalized"===e?100:void 0}:{}}},TA=class extends Td{constructor(e){super(e)}getUpdateOptions(e,t){let i="AG-GRID-DEFAULT-HEATMAP-SERIES-KEY",s="AG-GRID-DEFAULT-HEATMAP-VALUE-KEY",r="AG-GRID-DEFAULT-HEATMAP-CATEGORY
397-KEY";return{...t,series:this.getSeries(e,i,s,r),data:this.getData(e,i,s,r)}}getSeries(e,t,i,s){let[r]=e.categories;return[{type:this.standaloneChartType,yKey:s,xKey:t,colorKey:i,yName:r.name,xName:void 0,colorName:void 0}]}getData(e,t,i,s){var r,a;let[o]=e.categories;return r=e.data,a=(r,a)=>{let n=r[o.id],l=null==n?"":String(n),h={id:a,value:n,toString:()=>l};return e.fields.map(({colId:e,displayName:a})=>({...r,[t]:a,[i]:r[e],[s]:h}))},r.reduce((e,t,i,s)=>e.concat(a(t,i)),[])}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}},series:{tooltip:{renderer:TR}}}}};function TR(e){let{xKey:t,yKey:i,colorKey:s,yName:r,datum:a}=e;return{title:"",content:[{label:r,value:a[i]},{label:a[t],value:s&&a[s]}].map(({label:e,value:t})=>`<b>${TT(String(e))}:</b> ${TT(String(t))}`).join("<br>")}}function TT(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;"},i=RegExp(`[${Object.keys(t).join("")}]`,"g");return e.replace(i,e=>t[e])}var TL=class extends Tu{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}computeSeriesStatistics(e,t){let{data:i,fields:s}=e,[r]=e.categories,a=r.id||R7.DEFAULT_CATEGORY;return Array.from(this.groupDataByCategory(a,i)).map(([e,i])=>{let a={[r.id]:e};return s.forEach((e,s)=>{let r=i.map(t=>t[e.colId]).filter(e=>"number"==typeof e&&!isNaN(e));Object.entries(t(r)).forEach(([e,t])=>{a[`${e}:${s}`]=r.length>0?t:null})}),a})}groupDataByCategory(e,t){return t.reduce((t,i)=>{let s=(t=>{if(e===R7.DEFAULT_CATEGORY)return 1;let i=t[e];return null==i?"":i instanceof Date?i.getTime():i})(i),r=t.get(s);return r?r.push(i):t.set(s,[i]),t},new Map)}},TF=class extends TL{constructor(e){super(e)}getSeries(e){let[t]=e.categories;return e.fields.map((e,i)=>{var s;return{type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:null!=(s=e.displayName)?s:void 0,minName:"Min",q1Name:"Q1",medianName:"Median",q3Name:"Q3",maxName:"Max",minKey:`min:${i}`,q1Key:`q1:${i}`,medianKey:`median:${i}`,q3Key:`q3:${i}`,maxKey:`max:${i}`}})}getData(e){return this.computeSeriesStatistics(e,e=>{let t=e.sort((e,t)=>e-t);return{min:t[0],q1:this.quantile(t,.25),median:this.quantile(t,.5),q3:this.quantile(t,.75),max:t[t.length-1]}})}quantile(e,t){let i=(e.length-1)*t,s=Math.floor(i);return void 0!==e[s+1]?e[s]+(i-s)*(e[s+1]-e[s]):e[s]}},TP=class extends TL{constructor(e){super(e)}getSeries(e){let[t]=e.categories;return e.fields.map((e,i)=>{var s;return{type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:null!=(s=e.displayName)?s:void 0,yLowName:"Min",yHighName:"Max",yLowKey:`min:${i}`,yHighKey:`max:${i}`}})}getData(e){return this.computeSeriesStatistics(e,e=>({min:Math.min(...e),max:Math.max(...e)}))}},Tk=class extends s${constructor(){super('<div class="ag-chart-menu" data-ref="eMenu"></div>'),this.eMenu=s_,this.buttonListenersDestroyFuncs=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}updateParams(e){let{buttons:t}=e;this.createButtons(t)}createButtons(e){this.buttonListenersDestroyFuncs.forEach(e=>null==e?void 0:e()),this.buttonListenersDestroyFuncs=[];let t=this.eMenu;sm(t),e.forEach(e=>{let{buttonName:i,iconName:s,callback:r}=e,a=this.createButton(s),o=this.chartTranslationService.translate(i+"ToolbarTooltip");o&&a instanceof HTMLElement&&(a.title=o),this.buttonListenersDestroyFuncs.push(...this.addManagedElementListeners(a,{click:e=>r(e.currentTarget)})),t.appendChild(a)})}createButton(e){let t=sq(e,this.gos,void 0,!0);t.classList.add("ag-chart-menu-icon");let i=e$(this.gos).createElement("button");return i.appendChild(t),i.classList.add("ag-chart-menu-toolbar-button"),i}destroy(){this.buttonListenersDestroyFuncs=[],super.destroy()}},TN=class extends s${constructor(e){super('<div class="ag-pill-select" role="presentation"></div>'),this.config=null!=e?e:{};let{selectedValueList:t,valueFormatter:i,valueList:s}=this.config;this.selectedValues=null!=t?t:[],this.valueList=null!=s?s:[],this.valueFormatter=null!=i?i:e=>ig(e)}postConstruct(){let{ariaLabel:e,onValuesChange:t,dragSourceId:i}=this.config;this.dropZonePanel=this.createManagedBean(new TG({getValues:()=>this.selectedValues,setValues:e=>
397this.updateValues(e),isDraggable:()=>this.selectedValues.length>1},e=>this.valueFormatter(e),e,i)),this.getGui().appendChild(this.dropZonePanel.getGui()),this.initSelect(),null!=t&&(this.onValuesChange=t)}setValues(e,t){let{added:i,removed:s,updated:r}=this.getChanges(this.valueList,e),a=!1;return(i.length||s.length||r.length)&&(a=!0),this.valueList=e,this.updateValues(t,a,!0),this}setValueFormatter(e){return this.valueFormatter=e,this}initSelect(){let e=this.createSelectOptions();if(!e.length)return!1;let{selectPlaceholder:t}=this.config;return this.eSelect=this.createBean(new ad({options:e,placeholder:t,onValueChange:e=>this.addValue(e),pickerIcon:"chartsMenuAdd"})),this.getGui().appendChild(this.eSelect.getGui()),!0}createSelectOptions(){let e=[],{maxSelection:t}=this.config;return t&&this.selectedValues.length>=t||this.valueList.forEach(t=>{this.selectedValues.includes(t)||e.push({value:t,text:this.valueFormatter(t)})}),e}addValue(e){this.dropZonePanel.addItem(e)}updateValues(e,t,i){var s,r,a,o,n;let l=this.selectedValues;this.selectedValues=e;let h=this.getChanges(l,e),d=t||h.added.length||h.removed.length,u=eZ(this.gos),c=null==(s=this.eSelect)?void 0:s.getGui().contains(u),p=null==(r=this.dropZonePanel)?void 0:r.getGui().contains(u);i||null==(a=this.onValuesChange)||a.call(this,h);let g=!!d&&!this.refreshSelect();this.dropZonePanel.refreshGui(),d&&c&&(g?this.dropZonePanel.focusList(!0):null==(o=this.eSelect)||o.getFocusableElement().focus()),p&&!e.length&&(null==(n=this.eSelect)||n.getFocusableElement().focus())}getChanges(e,t){let i=t.filter(t=>!e.includes(t));return{added:i,removed:e.filter(e=>!t.includes(e)),updated:t.filter((t,i)=>e[i]!==t),selected:t}}refreshSelect(){if(!this.eSelect)return this.initSelect();let e=this.createSelectOptions();return e.length?(this.eSelect.clearOptions().addOptions(e).setValue(void 0,!0),!0):(sv(this.eSelect.getGui()),this.eSelect=this.destroyBean(this.eSelect),!1)}destroy(){this.destroyBean(this.eSelect),super.destroy()}},TO=class extends Ac{constructor(e,t,i,s,r,a){super(t,i,!1),this.value=e,this.valueFormatter=s,this.draggable=r,this.sourceId=a}getItem(){return this.value}getDisplayName(){return this.valueFormatter(this.value)}getAriaDisplayName(){return this.getDisplayName()}getTooltip(){}createGetDragItem(){return()=>({value:this.value})}getDragSourceType(){return r$.ChartPanel}getDragSourceId(){return this.sourceId}isDraggable(){return this.draggable}},TG=class extends Ap{constructor(e,t,i,s){super(!1),this.model=e,this.valueFormatter=t,this.ariaLabel=i,this.sourceId=s}postConstruct(){super.init()}isItemDroppable(e,t){return this.isSourceEventFromTarget(t)||null!=this.sourceId&&this.sourceId===t.dragSource.sourceId}updateItems(e){this.model.setValues(e)}getExistingItems(){return this.model.getValues()}getIconName(){return this.isPotentialDndItems()?"move":"notAllowed"}getAriaLabel(){return this.ariaLabel}createPillComponent(e,t,i){return new TO(e,t,i,this.valueFormatter,this.model.isDraggable(),this.sourceId)}getItems(e){return[e.value]}isInterestedIn(e){return e===r$.ChartPanel}},TB=class extends s${constructor(e,t,i,s){super(s),this.chartController=e,this.allowMultipleSelection=t,this.maxSelection=i}wireBeans(e){this.chartTranslationService=e.chartTranslationService}addItem(e){this.groupComp.addItem(e)}createGroup(e,t,i,s,r){if(this.allowMultipleSelection){let r=e.filter(e=>e.selected);this.valuePillSelect=this.groupComp.createManagedBean(new TN({valueList:e,selectedValueList:r,valueFormatter:t,selectPlaceholder:this.chartTranslationService.translate(i),dragSourceId:s,onValuesChange:e=>this.onValueChange(e),maxSelection:this.maxSelection})),this.groupComp.addItem(this.valuePillSelect)}else{let t=this.createValueSelectParams(e);t.onValueChange=t=>{e.forEach(e=>{e.selected=!1}),t.selected=!0,t.colId===R7.DEFAULT_CATEGORY&&this.chartController.setAggFunc(void 0,!0),this.chartController.updateForPanelChange({updatedColState:t,skipAnimation:null==r?void 0:r()})},this.valueSelect=this.groupComp.createManagedBean(new ad(t)),this.groupComp.addItem(this.valueSelect)}}refreshValueSelect(e){if(!this.valueSelect)return;let{options:t,value:i}=this.createValueSelectParams(e);this.valueSelect.clearOptions().addOptions(t).setValue(i,!0)}createValueSelectParams(e){let t;return{options:e.map(e=>{var i;let s=null!=(i=e.displayName)?i:"";return e.selected&&(t=e),{value:e,text:s}}),value:t}}onValueChange({added:e,updated:t,removed:i,selected:s}){let r,a,o=()=>
397{s.forEach((e,t)=>{e.order=t}),a=!0};e.length?((r=e[0]).selected=!0,o()):i.length?(r=i[0]).selected=!1:t.length&&(o(),r=t[0]),r&&this.chartController.updateForPanelChange({updatedColState:r,resetOrder:a})}destroy(){this.valuePillSelect=void 0,this.valueSelect=void 0,super.destroy()}},Tz=class extends TB{constructor(e,t,i,s,r){super(e,i,void 0,'<div id="categoriesGroup"></div>'),this.title=t,this.dimensionCols=s,this.isOpen=r}postConstruct(){this.groupComp=this.createBean(new Ae({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.createGroup(this.dimensionCols,e=>{var t;return null!=(t=e.displayName)?t:""},"categoryAdd","categorySelect",()=>!this.chartController.getAggFunc()),this.createAggFuncControls(this.dimensionCols),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){var t;null==(t=this.valuePillSelect)||t.setValues(e,e.filter(e=>e.selected)),this.refreshValueSelect(e),this.refreshAggFuncControls(e,this.chartController.getAggFunc())}createAggFuncControls(e){let t=this.chartController.getAggFunc();this.groupComp.addItem(this.aggFuncToggle=this.createBean(new lD({label:this.chartTranslationService.translate("aggregate"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:void 0!=t,onValueChange:e=>{var t,i;let s=e?"sum":void 0;this.chartController.setAggFunc(s),null==(t=this.aggFuncSelect)||t.setValue(s,!0),null==(i=this.aggFuncSelect)||i.setDisplayed(void 0!=s)}}))),this.groupComp.addItem(this.aggFuncSelect=this.createBean(new ad({options:[{value:"sum",text:this.chartTranslationService.translate("sum")},{value:"first",text:this.chartTranslationService.translate("first")},{value:"last",text:this.chartTranslationService.translate("last")},{value:"min",text:this.chartTranslationService.translate("min")},{value:"max",text:this.chartTranslationService.translate("max")},{value:"count",text:this.chartTranslationService.translate("count")},{value:"avg",text:this.chartTranslationService.translate("avg")}],value:"string"==typeof t?t:void 0,onValueChange:e=>{this.chartController.setAggFunc(e)}}))),this.refreshAggFuncControls(e,t)}refreshAggFuncControls(e,t){var i,s,r,a;let o=e.filter(e=>e.selected).some(e=>e.colId!==R7.DEFAULT_CATEGORY);null==(i=this.aggFuncToggle)||i.setValue(void 0!=t),null==(s=this.aggFuncSelect)||s.setValue("string"==typeof t?t:void 0,!0),null==(r=this.aggFuncToggle)||r.setDisplayed(o),null==(a=this.aggFuncSelect)||a.setDisplayed(o&&void 0!=t)}clearAggFuncControls(){this.aggFuncToggle=this.destroyBean(this.aggFuncToggle),this.aggFuncSelect=this.destroyBean(this.aggFuncSelect)}destroy(){this.clearAggFuncControls(),this.groupComp=this.destroyBean(this.groupComp),super.destroy()}},TV=class extends tk{constructor(e){super(),this.chartOptionsProxy=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}getDefaultColorPickerParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(null!=t?t:"color"),labelWidth:"flex",inputWidth:"flex",labelAlignment:"top",pickerGap:6},i)}getDefaultNumberInputParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(t),labelAlignment:"top",labelWidth:"flex",inputWidth:"flex",precision:null==i?void 0:i.precision,step:null==i?void 0:i.step,min:null==i?void 0:i.min,max:null==i?void 0:i.max},{parseInputValue:e=>{let t=Number(e);return isNaN(t)?void 0:t},formatInputValue:e=>null==e?"":`${e}`})}getDefaultSliderParams(e,t,i,s){var r;let a=null!=(r=this.chartOptionsProxy.getValue(e))?r:0;s&&Array.isArray(a)&&(a=a[0]);let o=this.getDefaultSliderParamsWithoutValueParams(a,t,i);return o.onValueChange=t=>this.chartOptionsProxy.setValue(e,s?[t]:t),o}getDefaultSliderParamsWithoutValueParams(e,t,i){return{label:this.chartTranslationService.translate(t),minValue:0,maxValue:Math.max(e,i),textFieldWidth:45,value:`${e}`}}getDefaultCheckboxParams(e,t,i){let s=this.chartOptionsProxy.getValue(e),r={label:this.chartTranslationService.translate(t),value:s,readOnly:null==i?void 0:i.readOnly,passive:null==i?void 0:i.passive};return r.onValueChange=t=>{this.chartOptionsProxy.setValue(e,"boolean"==typeof t?t:void 0)},r}getDefaultSelectParams(e,t,i){return this.getDefaultSelectParamsWithoutValueParams(t,i,this.chartOptionsProxy.getValue(e),t=>{this.chartOptionsProxy.setValue(e,t)})}getDefaultSelectParamsWithoutValueParams(e,t,i,s){return{label:this.chartTranslationService.translate(e),labelAlignment:"top",options:t,pickerGap:6,value:i,onValueChange:s}}
397getDefaultFontPanelParams(e,t){let i=t=>`${e}.${t}`;return this.addEnableParams(i("enabled"),{name:this.chartTranslationService.translate(t),suppressEnabledCheckbox:!1,chartMenuParamsFactory:this,keyMapper:i})}addValueParams(e,t,i){let s=this.chartOptionsProxy.getValue(e);return t.value=null!=i&&i.formatInputValue?i.formatInputValue(s):s,t.onValueChange=t=>{let s=null!=i&&i.parseInputValue?i.parseInputValue(t):t;this.chartOptionsProxy.setValue(e,s)},t}addEnableParams(e,t){var i;return t.enabled=null!=(i=this.chartOptionsProxy.getValue(e))&&i,t.onEnableChange=t=>this.chartOptionsProxy.setValue(e,t),t}getChartOptions(){return this.chartOptionsProxy}},TH=class extends s${constructor(e,t){super(),this.chartMenuContext=e,this.isOpen=t,this.chartSpecificGroup=s_,this.hasContent=!1}wireBeans(e){this.chartTranslationService=e.chartTranslationService,this.chartService=e.chartService}postConstruct(){let e={title:this.getTitle(),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen,items:[...this.createDirectionSelect(),this.createGroupTypeSelect()]};this.setTemplate(`
398            <div id="chartSpecificGroup">
399                <ag-group-component data-ref="chartSpecificGroup"></ag-group-component>
400            </div>`,[As],{chartSpecificGroup:e}),this.setDisplayed(this.hasContent)}refresh(){this.hasContent=!1,this.chartSpecificGroup.setTitle(this.getTitle()),this.updateDirectionSelect(),this.updateGroupTypeSelect(),this.setDisplayed(this.hasContent)}getTitle(){let e=this.chartMenuContext.chartController.getChartType();return this.chartTranslationService.translate(RI(e))}createDirectionSelect(){if(!this.chartService.isEnterprise())return[];let{chartOptionsService:e,chartController:t}=this.chartMenuContext,i=e.getSeriesOptionsProxy(()=>RS(t.getChartType())),s=this.createManagedBean(new TV(i)),r=["horizontal","vertical"].map(e=>({value:e,text:this.chartTranslationService.translate(e)})),a=s.getDefaultSelectParams("direction","direction",r),o=a.onValueChange;return a.onValueChange=e=>{o(e),t.raiseChartModelUpdateEvent()},this.directionSelect=this.createManagedBean(new ad(a)),this.updateDirectionSelect(),[this.directionSelect]}updateDirectionSelect(){let e=Rm(RS(this.chartMenuContext.chartController.getChartType()),"canSwitchDirection");this.updateDisplayed(this.directionSelect,e)}createGroupTypeSelect(){let{chartController:e,chartMenuParamsFactory:t}=this.chartMenuContext;return this.groupTypeSelect=this.createManagedBean(new ad(t.getDefaultSelectParamsWithoutValueParams("seriesGroupType",dh.SERIES_GROUP_TYPES.map(e=>({value:e,text:this.chartTranslationService.translate(`${e}SeriesGroupType`)})),e.getSeriesGroupType(),t=>e.setSeriesGroupType(t)))),this.updateGroupTypeSelect(),this.groupTypeSelect}updateGroupTypeSelect(){let e=["radialColumn","radialBar","nightingale"].includes(this.chartMenuContext.chartController.getChartType());this.updateDisplayed(this.groupTypeSelect,e)}updateDisplayed(e,t){null==e||e.setDisplayed(t),e&&(this.hasContent=this.hasContent||t)}},Tj=class extends s${constructor(e,t,i){super('<div id="seriesChartTypeGroup"></div>'),this.chartController=e,this.columns=t,this.isOpen=i,this.selectedColIds=[],this.chartTypeComps=new Map,this.secondaryAxisComps=new Map}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.createSeriesChartTypeGroup(this.columns)}refresh(e){tg(this.getValidColIds(e),this.selectedColIds)?this.refreshComps():this.recreate(e)}recreate(e){this.isOpen=this.seriesChartTypeGroupComp.isExpanded(),sm(this.getGui()),this.destroyBean(this.seriesChartTypeGroupComp),this.columns=e,this.selectedColIds=[],this.clearComps(),this.postConstruct()}getValidColIds(e){let t=this.chartController.getSeriesChartTypes();return e.filter(e=>e.selected&&!!t.filter(t=>t.colId===e.colId)[0]).map(({colId:e})=>e)}createSeriesChartTypeGroup(e){this.seriesChartTypeGroupComp=this.createBean(new Ae({title:this.chartTranslationService.translate("seriesChartType"),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen}));let t=this.chartController.getSeriesChartTypes();
400e.forEach(e=>{if(!e.selected)return;let i=t.filter(t=>t.colId===e.colId)[0];if(!i)return;this.selectedColIds.push(e.colId);let s=this.seriesChartTypeGroupComp.createManagedBean(new Ae({title:e.displayName,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-format-sub-level"})),r=this.seriesChartTypeGroupComp.createManagedBean(new rs({label:this.chartTranslationService.translate("secondaryAxis"),labelWidth:"flex",disabled:["groupedColumn","stackedColumn","stackedArea"].includes(i.chartType),value:!!i.secondaryAxis,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,void 0,t)}));s.addItem(r);let a=["line","area","stackedArea","groupedColumn","stackedColumn"].map(e=>({value:e,text:this.chartTranslationService.translate(RI(e))})),o=s.createManagedBean(new ad({options:a,value:i.chartType,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,t)}));s.addItem(o),this.seriesChartTypeGroupComp.addItem(s),this.chartTypeComps.set(e.colId,o),this.secondaryAxisComps.set(e.colId,r)}),this.getGui().appendChild(this.seriesChartTypeGroupComp.getGui())}refreshComps(){let e=this.chartController.getSeriesChartTypes();this.selectedColIds.forEach(t=>{let i=e.find(e=>e.colId===t);if(!i)return;let s=this.chartTypeComps.get(t),r=this.secondaryAxisComps.get(t);null==s||s.setValue(i.chartType),null==r||r.setValue(!!i.secondaryAxis),null==r||r.setDisabled(this.isSecondaryAxisDisabled(i.chartType))})}clearComps(){this.chartTypeComps.clear(),this.secondaryAxisComps.clear()}isSecondaryAxisDisabled(e){return["groupedColumn","stackedColumn","stackedArea"].includes(e)}destroy(){this.clearComps(),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp),super.destroy()}},TW=class extends TB{constructor(e,t,i,s,r,a,o){super(e,s,r,'<div id="seriesGroup"></div>'),this.chartOptionsService=t,this.title=i,this.valueCols=a,this.isOpen=o}postConstruct(){if(this.groupComp=this.createBean(new Ae({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.chartController.isActiveXYChart()){let e=this.groupComp.createManagedBean(new lD({label:this.chartTranslationService.translate("paired"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartOptionsService.getPairedMode(),onValueChange:e=>{this.chartOptionsService.setPairedMode(!!e),this.chartController.updateForGridChange({maintainColState:!0})}}));this.groupComp.addItem(e)}this.createGroup(this.valueCols,this.generateGetSeriesLabel(this.valueCols),"seriesAdd","seriesSelect"),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){var t,i;null==(t=this.valuePillSelect)||t.setValueFormatter(this.generateGetSeriesLabel(e)),null==(i=this.valuePillSelect)||i.setValues(e,e.filter(e=>e.selected)),this.refreshValueSelect(e)}generateGetSeriesLabel(e){if(!this.chartController.isActiveXYChart())return e=>{var t;return null!=(t=e.displayName)?t:""};let t=e.filter(e=>e.selected),i="bubble"===this.chartController.getChartType(),s=this.chartOptionsService.getPairedMode(),r=new Map;return r.set(0,"X"),r.set(1,"Y"),r.set(2,"size"),e=>{var a;let o,n=null!=(a=e.displayName)?a:"";if(!e.selected)return n;let l=t.indexOf(e);return -1===l?n:(o=s?r.get(l%(i?3:2)):0===l?"X":i&&l%2==0?"size":"Y",`${n} (${o})`)}}destroy(){this.groupComp=this.destroyBean(this.groupComp),super.destroy()}},TU={groups:[{type:"categories",isOpen:!0},{type:"series",isOpen:!0},{type:"seriesChartType",isOpen:!0},{type:"chartSpecific",isOpen:!0}]},T_=class extends s${constructor(e){super('<div class="ag-chart-data-wrapper ag-scrollable-container"></div>'),this.chartMenuContext=e,this.isSwitchCategorySeriesToggled=!1,this.restoreSwitchCategorySeriesToggleFocus=!1,this.panels=[],this.chartController=e.chartController}wireBeans(e){this.chartTranslationService=e.chartTranslationService,this.chartService=e.chartService}postConstruct(){this.createSwitchCategorySeriesToggle(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched(),this.updatePanels();let e=this.updatePanels.bind(this);this.addManagedListeners(this.chartController,{chartModelUpdate:e,chartApiUpdate:e})}destroy(){this.clearPanelComponents(),super.destroy()}updatePanels(){var e,t,i,s,r;let a=this.chartType,o=this.isSwitchCategorySeriesToggled,{dimensionCols:n,valueCols:l}=this.chartController.getColStateForMenu();this.chartType=this.chartController.getChartType(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched();let h=this.isSwitchCategorySeriesToggled!==o;this.canRefresh(a,this.chartType)&&!h?(null==(e=this.categoriesDataPanel)||e.refresh(n),null==(t=this.seriesDataPanel)||t.refresh(l),null==(i=this.seriesChartTypePanel)||i.refresh(l),null==(s=this.chartSpecificPanel)||s.refresh()):this.recreatePanels(n,l);let d=RE(this.chartType)&&this.chartService.isEnterprise()&&!this.chartController.isGrouping();ss(this.switchCategorySeriesToggle.getGui(),d),h&&(null==(r=this.switchCategorySeriesToggle)||r.setValue(this.chartController.isCategorySeriesSwitched())),this.restoreSwitchCategorySeriesToggleFocus&&(this.restoreSwitchCategorySeriesToggleFocus=!1,d&&this.switchCategorySeriesToggle.getFocusableElement().focus())}canRefresh(e,t){if(void 0===e)return!1;if(e===t)return!0;let i=e=>["columnLineCombo","areaColumnCombo","customCombo"].includes(e);return!!(i(e)&&i(t))}recreatePanels(e,t){var i,s;this.clearPanelComponents();let{chartType:r}=this;if(!r)return;let a=this.chartController.isCategorySeriesSwitched();
400null==(i=this.getDataPanelDef().groups)||i.forEach(({type:i,isOpen:s})=>{i===(a?"series":"categories")?(this.categoriesDataPanel=this.createBean(new Tz(this.chartController,this.getCategoryGroupTitle(a),this.getCategoryGroupMultipleSelect(r,a),e,s)),this.panels.push(this.categoriesDataPanel)):i===(a?"categories":"series")?(this.seriesDataPanel=this.createBean(new TW(this.chartController,this.chartMenuContext.chartOptionsService,this.getSeriesGroupTitle(a),this.getSeriesGroupMultipleSelect(r,a),this.getSeriesGroupMaxSelection(r,a),t,s)),this.panels.push(this.seriesDataPanel)):"seriesChartType"===i?this.chartController.isComboChart()&&(this.seriesChartTypePanel=this.createBean(new Tj(this.chartController,t,s)),this.panels.push(this.seriesChartTypePanel)):"chartSpecific"===i?(this.chartSpecificPanel=this.createBean(new TH(this.chartMenuContext,s)),this.panels.push(this.chartSpecificPanel)):ep(`Invalid charts data panel group name supplied: '${i}'`)}),null==(s=a?this.categoriesDataPanel:this.seriesDataPanel)||s.addItem(this.switchCategorySeriesToggle.getGui()),this.addPanelComponents()}addPanelComponents(){if(!this.panels.length)return;let e=e$(this.gos).createDocumentFragment();for(let t of this.panels)t.addCssClass("ag-chart-data-section"),e.appendChild(t.getGui());this.getGui().appendChild(e)}clearPanelComponents(){let e=this.getGui();this.panels.forEach(t=>{e.removeChild(t.getGui()),this.destroyBean(t)}),this.panels=[]}getDataPanelDef(){var e,t;return null!=(e=null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.dataPanel)?e:TU}getCategoryGroupTitle(e){return e?this.chartTranslationService.translate("seriesLabels"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"labels":"categories")}getCategoryGroupMultipleSelect(e,t){return!t&&1!==RM(e)}getSeriesGroupTitle(e){return e?this.chartTranslationService.translate("categoryValues"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"xyValues":"series")}getSeriesGroupMultipleSelect(e,t){return 1!==this.getSeriesGroupMaxSelection(e,t)}getSeriesGroupMaxSelection(e,t){if(!t)return RD(e)}createSwitchCategorySeriesToggle(){this.switchCategorySeriesToggle=this.createManagedBean(new lD({label:this.chartTranslationService.translate("switchCategorySeries"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartController.isCategorySeriesSwitched(),onValueChange:e=>{this.restoreSwitchCategorySeriesToggleFocus=!0,this.chartController.switchCategorySeries(e)}}))}},T$=class extends re{constructor(e){super(e,`<div class="ag-angle-select">
401            <div data-ref="eLabel"></div>
402            <div class="ag-wrapper ag-angle-select-wrapper">
403                <div class="ag-angle-select-field">
404                    <div data-ref="eParentCircle" class="ag-angle-select-parent-circle">
405                        <div data-ref="eChildCircle" class="ag-angle-select-child-circle"></div>
406                    </div>
407                </div>
408                <ag-input-number-field data-ref="eAngleValue"></ag-input-number-field>
409            </div>
410        </div>`,[aw]),this.eLabel=s_,this.eParentCircle=s_,this.eChildCircle=s_,this.eAngleValue=s_,this.radius=0,this.offsetX=0,this.offsetY=0}wireBeans(e){this.dragService=e.dragService}postConstruct(){super.postConstruct();let{value:e,onValueChange:t}=this.config;null!=e&&this.setValue(e,void 0,!0),null!=t&&this.onValueChange(t),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:()=>{this.parentCircleRect=this.eParentCircle.getBoundingClientRect()},onDragging:e=>this.calculateAngleDrag(e),onDragStop:()=>{}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(`${this.degrees}`).onValueChange(e=>{(null==e||""===e)&&(e="0");let t=parseFloat(e=this.eAngleValue.normalizeValue(e));t>180&&(t-=360),this.setValue(t)}),this.updateNumberInput(),eM(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListeners(this,{fieldValueChanged:()=>{this.eAngleValue.getInputElement().contains(eZ(this.gos))||this.updateNumberInput()}})}updateNumberInput(){let e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())}positionChildCircle(e){let t=this.parentCircleRect||{width:24,height:24},i=this.eChildCircle,s=t.width/2,r=t.height/2;i.style.left=`${s+8*Math.cos(e)}px`,i.style.top=`${r+8*Math.sin(e)}px`}calculatePolar(){let e=this.offsetX,t=this.offsetY,i=Math.atan2(t,e);this.degrees=this.toDegrees(i),this.radius=Math.sqrt(e*e+t*t),this.positionChildCircle(i)}calculateCartesian(){let e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)}setOffsetX(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this}setOffsetY(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this}calculateAngleDrag(e){let t=this.parentCircleRect,i=t.width/2,s=t.height/2,r=e.clientX-t.left,a=Math.atan2(e.clientY-t.top-s,r-i);this.setValue(a,!0)}toDegrees(e){return e/Math.PI*180}toRadians(e){return e/180*Math.PI}normalizeNegativeValue(e){return e<0?360+e:e}normalizeAngle180(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e}getRadius(){return this.radius}setRadius(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>{e(this.degrees)}}),this}getValue(e){return e?this.toRadians(this.degrees):this.degrees}setValue(e,t,i){let s;return s=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(s),this.degrees!==e&&(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(s),i||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}setWidth(e){return sM(this.getGui(),e),this}setDisabled(e){return super.setDisabled(e),this.eAngleValue.setDisabled(e),this}destroy(){this.dragService.removeDragSource(this.dragListener),super.destroy()}},TY=class extends s${constructor(e){super(),this.params=e,this.fontGroup=s_,this.activeComps=[],this.chartOptions=e.chartMenuParamsFactory.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{cssIdentifier:e="charts-format-sub-level",name:t,enabled:i,onEnableChange:s,suppressEnabledCheckbox:r,chartMenuParamsFactory:a,keyMapper:o}=this.params;this.setTemplate(`<div class="ag-font-panel">
411        <ag-group-component data-ref="fontGroup">
412            <ag-select data-ref="familySelect"></ag-select>
413            <ag-select data-ref="weightStyleSelect"></ag-select>
414            <div class="ag-charts-font-size-color">
415                <ag-select data-ref="sizeSelect"></ag-select>
416                <ag-color-picker data-ref="colorPicker"></ag-color-picker>
417            </div>
418        </ag-group-component>
419    </div>`,[As,au,RP],{fontGroup:{cssIdentifier:e,direction:"vertical",suppressOpenCloseIcons:!0,title:t,enabled:i,suppressEnabledCheckbox:!0,onEnableChange:e=>{s&&s(e)},useToggle:!r},familySelect:this.getFamilySelectParams(),weightStyleSelect:this.getWeightStyleSelectParams(),sizeSelect:this.getSizeSelectParams(),colorPicker:a.getDefaultColorPickerParams(o("color"))}),this.addOrRemoveCssClass("ag-font-panel-no-header",!t)}addItem(e,t){t?this.fontGroup.prependItem(e):this.fontGroup.addItem(e),this.activeComps.push(e)}setEnabled(e){this.fontGroup.setEnabled(e)}getFamilySelectParams(){let e=["Arial, sans-serif","Aria Black, sans-serif","Book Antiqua,  serif","Charc
419oal, sans-serif","Comic Sans MS, cursive","Courier, monospace","Courier New, monospace","Gadget, sans-serif","Geneva, sans-serif","Helvetica, sans-serif","Impact, sans-serif","Lucida Console, monospace","Lucida Grande, sans-serif","Lucida Sans Unicode,  sans-serif","Monaco, monospace","Palatino Linotype, serif","Palatino, serif","Times New Roman, serif","Times, serif","Verdana, sans-serif"],t=this.getInitialFontValue("fontFamily"),i=e[0];if(t){let s=e.map(e=>e.toLowerCase()).indexOf(t.toLowerCase());if(s>=0)i=e[s];else{let s=ip(t);e.push(s),i=s}}let s=e.sort().map(e=>({value:e,text:e}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("font",s,`${i}`,e=>this.setFont({fontFamily:e}))}getSizeSelectParams(){let e=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36],t=this.getInitialFontValue("fontSize");tS(e,t)||e.push(t);let i=e.sort((e,t)=>e-t).map(e=>({value:`${e}`,text:`${e}`}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("size",i,`${t}`,e=>this.setFont({fontSize:parseInt(e,10)}))}getWeightStyleSelectParams(){var e,t;let i=null!=(e=this.getInitialFontValue("fontWeight"))?e:"normal",s=null!=(t=this.getInitialFontValue("fontStyle"))?t:"normal",r=[{name:"normal",weight:"normal",style:"normal"},{name:"bold",weight:"bold",style:"normal"},{name:"italic",weight:"normal",style:"italic"},{name:"boldItalic",weight:"bold",style:"italic"}],a=r.find(e=>e.weight===i&&e.style===s);a||(a={name:"predefined",weight:i,style:s},r.unshift(a));let o=r.map(e=>({value:e.name,text:this.chartTranslationService.translate(e.name)}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("weight",o,a.name,e=>{let t=r.find(t=>t.name===e);this.setFont({fontWeight:t.weight,fontStyle:t.style})})}destroyActiveComps(){this.activeComps.forEach(e=>{sv(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActiveComps(),super.destroy()}setFont(e){let{keyMapper:t}=this.params;Object.entries(e).forEach(([e,i])=>{i&&this.chartOptions.setValue(t(e),i)})}getInitialFontValue(e){let{keyMapper:t}=this.params;return this.chartOptions.getValue(t(e))}},TK=class extends s${constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{chartMenuUtils:e}=this,t=e.addEnableParams("tick.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("ticks"),suppressEnabledCheckbox:!0,useToggle:!0}),i=e.getDefaultColorPickerParams("tick.stroke"),s=e.getDefaultSliderParams("tick.width","width",10),r=e.getDefaultSliderParams("tick.size","length",30);this.setTemplate(`<div>
420            <ag-group-component data-ref="axisTicksGroup">
421                <ag-color-picker data-ref="axisTicksColorPicker"></ag-color-picker>
422                <ag-slider data-ref="axisTicksWidthSlider"></ag-slider>
423                <ag-slider data-ref="axisTicksSizeSlider"></ag-slider>
424            </ag-group-component>
425        </div>`,[As,RP,RG],{axisTicksGroup:t,axisTicksColorPicker:i,axisTicksWidthSlider:s,axisTicksSizeSlider:r})}},TZ=class extends s${constructor(e){super(),this.chartMenuUtils=e,this.chartOptions=e.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuUtils.addEnableParams("gridLine.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("gridLines"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.getGridLineColorPickerParams("color"),i=this.getGridLineWidthSliderParams("thickness"),s=this.getGridLineDashSliderParams("lineDash");this.setTemplate(`<div>
426            <ag-group-component data-ref="gridLineGroup">
427                <ag-color-picker data-ref="gridLineColorPicker"></ag-color-picker>
428                <ag-slider data-ref="gridLineWidthSlider"></ag-slider>
429                <ag-slider data-ref="gridLineLineDashSlider"></ag-slider>
430            </ag-group-component>
431        </div>`,[As,RP,RG],{gridLineGroup:e,gridLineColorPicker:t,gridLineWidthSlider:i,gridLineLineDashSlider:s})}getGridLineColorPickerParams(e){return this.chartMenuUtils.getDefaultColorPickerParams("gridLine.style",e,{formatInputValue:e=>{var t;return null==e||null==(t=e[0])?void 0:t.stroke},parseInputValue:e=>{var t;let i=null!=(t=this.chartOptions.getValue("gridLine.style"))?t:[];return 0===i.length?[{stroke:e,lineDash:[]}]:[{...i[0],stroke:e}]}})}getGridLineWidthSliderParams(e){return this.chartMenuUtils.getDefaultSliderParams("gridLine.width",e,10)}getGridLineDashSliderParams(e){var t;let i=this.chartOptions.getValue("gridLine.style"),s=null==i||null==(t=i[0])||null==(t=t.lineDash)?void 0:t[0],r=this.chartMenuUtils.getDefaultSliderParamsWithoutValueParams(null!=s?s:0,e,30);return r.onValueChange=e=>{let t=this.chartOptions.getValue("gridLine.style.0.stroke");this.chartOptions.setValue("gridLine.style",[{lineDash:[e],stroke:t}])},r}},Tq=class extends s${constructor(e,t){super(),this.axisType=e,this.options=t,this.axisGroup=s_,this.axisTypeSelect=s_,this.axisPositionSelect=s_,this.axisTimeFormatSelect=s_,this.activePanels=[],this.axisLabelUpdateFuncs=[];let{chartOptionsService:i,seriesType:s}=t;this.chartOptionsSeriesProxy=i.getSeriesOptionsProxy(()=>s)}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){var e;let{isExpandedOnInit:t,chartOptionsService:i,chartController:s,registerGroupComponent:r}=this.options,a=this.axisType,o={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate(a),expanded:t,suppressEnabledCheckbox:!0},n=i.getCartesianAxisOptionsProxy(this.axisType),l=this.createManagedBean(new TV(n)),h=this.createManagedBean(new TV(i.getCartesianAxisThemeOverridesProxy(this.axisType))),d=this.getAxisTypeSelectParams(l,i.getCartesianAxisAppliedThemeOverridesProxy(this.axisType)),u=this.getAxisPositionSelectParams(l),c=this.getAxisTimeFormatSelectParams(l),p=this.getAxisColorInputParams(h),g=this.getAxisLineWi
431dthSliderParams(h);this.setTemplate(`<div>
432            <ag-group-component data-ref="axisGroup">
433                <ag-select data-ref="axisTypeSelect"></ag-select>
434                <ag-select data-ref="axisTimeFormatSelect"></ag-select>
435                <ag-select data-ref="axisPositionSelect"></ag-select>
436                <ag-color-picker data-ref="axisColorInput"></ag-color-picker>
437                <ag-slider data-ref="axisLineWidthSlider"></ag-slider>
438            </ag-group-component>
439        </div>`,[As,au,RP,RG],{axisGroup:o,axisTypeSelect:null!=d?d:void 0,axisPositionSelect:null!=u?u:void 0,axisTimeFormatSelect:null!=c?c:void 0,axisColorInput:p,axisLineWidthSlider:g}),r(this.axisGroup),this.axisTypeSelect.setDisplayed(!!(null!=(e=d.options)&&e.length)),u||this.removeTemplateComponent(this.axisPositionSelect);let m=()=>{let e="time"===n.getValue("type");ss(this.axisTimeFormatSelect.getGui(),e)};c?(m(),this.addManagedEventListeners({chartOptionsChanged:()=>{m()}})):this.removeTemplateComponent(this.axisTimeFormatSelect),this.initGridLines(h),this.initAxisTicks(h),this.initAxisLabels(h);let v=()=>this.axisLabelUpdateFuncs.forEach(e=>e());this.addManagedListeners(s,{chartUpdated:v,chartModelUpdate:()=>setTimeout(()=>{this.isAlive()&&(this.refreshAxisTypeSelect(l),m())})})}getAxisTypeSelectParams(e,t){let i=e.getChartOptions(),s=this.getAxisTypeSelectOptions(),r=e.getDefaultSelectParams("type","axisType",s);return r.onValueChange=e=>{let s=i.getValue("type");if(e===s)return;let r=t.getValue("*"),a="time"===e,o="time"===s!==a?a?"%d %B %Y":void 0:null;if(this.options.chartOptionsService.setCartesianCategoryAxisType(this.axisType,e),null!==o){var n;let e=null!=(n=i.getValue("label"))?n:{};i.setValue("label",{...e,format:o})}t.setValue("*",r)},r}refreshAxisTypeSelect(e){let t=this.getAxisTypeSelectOptions(),i=!!t.length;this.axisTypeSelect.setDisplayed(i),i&&this.axisTypeSelect.clearOptions().addOptions(t).setValue(e.getChartOptions().getValue("type"))}getAxisTypeSelectOptions(){let e,{chartController:t}=this.options;return["heatmap","histogram","boxPlot","rangeBar","scatter","bubble"].includes(t.getChartType())||t.isGrouping()||!this.isCategoryAxis()||t.isCategorySeriesSwitched()||!((e=t.getChartData()[0])&&t.getSelectedDimensions().every(t=>!isNaN(parseFloat(e[t.colId]))))?[]:["category","number","time"].map(e=>({value:e,text:this.translate(e)}))}isCategoryAxis(){let e="horizontal"===this.chartOptionsSeriesProxy.getValue("direction");return e&&"yAxis"===this.axisType||!e&&"xAxis"===this.axisType}getAxisPositionSelectParams(e){let t=((e,t)=>{if("heatmap"===e)return null;switch(t){case"xAxis":return[{value:"top",text:this.translate("top")},{value:"bottom",text:this.translate("bottom")}];case"yAxis":return[{value:"left",text:this.translate("left")},{value:"right",text:this.translate("right")}]}})(this.options.chartController.getChartType(),this.axisType);return t?e.getDefaultSelectParams("position","position",t):null}getAxisTimeFormatSelectParams(e){if(!this.isCategoryAxis())return null;let t=[{value:"%d/%m/%Y",text:this.translate("timeFormatSlashesDDMMYYYY")},{value:"%m/%d/%Y",text:this.translate("timeFormatSlashesMMDDYYYY")},{value:"%d/%m/%y",text:this.translate("timeFormatSlashesDDMMYY")},{value:"%m/%d/%y",text:this.translate("timeFormatSlashesMMDDYY")},{value:"%d.%e.%y",text:this.translate("timeFormatDotsDDMYY")},{value:"%e.%d.%y",text:this.translate("timeFormatDotsMDDYY")},{value:"%Y-%m-%d",text:this.translate("timeFormatDashesYYYYMMDD")},{value:"%d %B %Y",text:this.translate("timeFormatSpacesDDMMMMYYYY")},{value:"%H:%M:%S",text:this.translate("timeFormatHHMMSS")},{value:"%I:%M:%S %p",text:this.translate("timeFormatHHMMSSAmPm")}];return e.getDefaultSelectParams("label.format","timeFormat",t)}getAxisColorInputParams(e){return e.getDefaultColorPickerParams("line.stroke")}getAxisLineWidthSliderParams(e){var t;let i=e.getChartOptions(),s=e.getDefaultSliderParamsWithoutValueParams(null!=(t=i.getValue("line.enabled")?i.getValue("line.width"):null)?t:0,"thickness",10);return s.onValueChange=e=>{var t;t=0===e?null:e,i.setValues([{expression:"line.enabled",value:null!=t},{expression:"line.width",value:null!=t?t:0}])},s}initGridLines(e){if("heatmap"===this.options.chartController.getChartType())return;let t=this.createBean(new TZ(e));this.axisGroup.addItem(t),this.activePanels.push(t)}initAxisTicks(e){if(!this.hasConfigurableAxisTicks())return;let t=this.createBean(new TK(e));this.axisGroup.addItem(t),this.activePanels.push(t)}hasConfigurableAxisTicks(){switch(this.options.chartController.getChartType()){case"radarLine":case"radarArea":case"rangeBar":case"boxPlot":case"waterfall":return!1;default:return!0}}initAxisLabels(e){let t={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:e,keyMapper:e=>`label.${e}`},i=this.createBean(new TY(t));this.axisGroup.addItem(i),this.activePanels.push(i),this.addAdditionalLabelComps(i,e)}addAdditionalLabelComps(e,t){this.addLabelPadding(e,t);let i=this.createRotationWidget("labelRotation",t),s=this.initLabelRotation(i,t);e.addItem(s),e.addItem(i)}initLabelRotation(e,t){let i=t.getChartOptions(),s=t=>{t&&(this.prevRotation=i.getValue("label.rotation")),i.setValues([{expression:"label.autoRotate",value:t},{expression:"label.rotation",value:t?void 0:this.prevRotation}]),e.setDisplayed(!t)},r="number"!=typeof i.getValue("label.rotation")&&i.getValue("label.autoRotate"),a=this.createBean(new rs({label:this.translate("autoRotate"),value:r,onValueChange:s}));return e.setDisplayed(!r),a}createRotationWidget(e,t){var i;let s=t.getChartOptions(),r=String.fromCharCode(176),a=new T$({label:`${this.chartTranslationService.translate(e)} ${r}`,labelWidth:"flex",value:null!=(i=s.getValue("label.rotation"))?i:0,onValueChange:e=>s.setValue("label.rotation",e)});return this.axisLabelUpdateFuncs.push(()=>{var e;a.setValue(null!=(e=s.getValue("label.rotation"))?e:0)}),this.createBean(a)}addLabelPadding(e,t){let i=this.createBean(new RO(t.getDefaultSliderParams("label.padding","padding",3
4390)));e.addItem(i)}translate(e){return this.chartTranslationService.translate(e)}removeTemplateComponent(e){sv(e.getGui()),this.destroyBean(e)}destroyActivePanels(){this.activePanels.forEach(e=>{sv(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}},TQ=class extends s${constructor(e){super(),this.options=e,this.axisGroup=s_}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{isExpandedOnInit:e,chartAxisMenuParamsFactory:t,registerGroupComponent:i}=this.options,s={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("polarAxis"),expanded:e,suppressEnabledCheckbox:!0},r=t.getDefaultColorPickerParams("line.stroke"),a=t.getDefaultSliderParams("line.width","thickness",10);this.setTemplate(`<div>
440            <ag-group-component data-ref="axisGroup">
441                <ag-color-picker data-ref="axisColorInput"></ag-color-picker>
442                <ag-slider data-ref="axisLineWidthSlider"></ag-slider>
443            </ag-group-component>
444        </div>`,[As,RP,RG],{axisGroup:s,axisColorInput:r,axisLineWidthSlider:a}),i(this.axisGroup),this.initAxis(),this.initAxisLabels(),this.initRadiusAxis()}initAxis(){let e=this.options.chartController.getChartType();if(["radarLine","radarArea"].includes(e)){let e=[{value:"circle",text:this.translate("circle")},{value:"polygon",text:this.translate("polygon")}];this.axisGroup.addItem(this.createSelect({labelKey:"shape",options:e,property:"shape"}))}"pie"!==e&&this.axisGroup.addItem(this.createSlider({labelKey:"innerRadius",defaultMaxValue:1,property:"innerRadiusRatio"}))}initAxisLabels(){let e={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:this.options.chartAxisMenuParamsFactory,keyMapper:e=>`label.${e}`},t=this.createManagedBean(new TY(e)),i=this.createOrientationWidget();t.addItem(i),this.axisGroup.addItem(t)}createOrientationWidget(){let e=[{value:"fixed",text:this.translate("fixed")},{value:"parallel",text:this.translate("parallel")},{value:"perpendicular",text:this.translate("perpendicular")}];return this.createSelect({labelKey:"orientation",options:e,property:"label.orientation"})}initRadiusAxis(){if(!Rm(RS(this.options.chartController.getChartType()),"isRadial"))return;let e=[this.createSlider({labelKey:"groupPadding",defaultMaxValue:1,property:"paddingInner"}),this.createSlider({labelKey:"seriesPadding",defaultMaxValue:1,property:"groupPaddingInner"})],t=this.createManagedBean(new Ae({cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,enabled:!0,suppressEnabledCheckbox:!0,title:this.translate("padding"),items:e})).hideEnabledCheckbox(!0).hideOpenCloseIcons(!0);this.axisGroup.addItem(t)}createSlider(e){let{labelKey:t,defaultMaxValue:i,step:s=.05,property:r}=e,a=this.options.chartAxisMenuParamsFactory.getDefaultSliderParams(r,t,i);return a.step=s,this.createManagedBean(new RO(a))}createSelect(e){let{labelKey:t,options:i,property:s}=e;return this.createManagedBean(new ad(this.options.chartAxisMenuParamsFactory.getDefaultSelectParams(s,t,i)))}translate(e){return this.chartTranslationService.translate(e)}},TX=class extends s${constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuUtils.addEnableParams("background.visible",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("background"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuUtils.getDefaultColorPickerParams("background.fill");this.setTemplate(`<div>
445            <ag-group-component data-ref="chartBackgroundGroup">
446                <ag-color-picker data-ref="colorPicker"></ag-color-picker>
447            </ag-group-component>
448        <div>`,[As,RP],{chartBackgroundGroup:e,colorPicker:t})}},TJ=class extends s${constructor(e,t){super(),this.chartMenuUtils=e,this.chartController=t,this.paddingTopSlider=s_}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("padding"),suppressEnabledCheckbox:!0},t=e=>this.chartMenuUtils.getDefaultSliderParams("padding."+e,e,200);this.setTemplate(`<div>
449            <ag-group-component data-ref="chartPaddingGroup">
450                <ag-slider data-ref="paddingTopSlider"></ag-slider>
451                <ag-slider data-ref="paddingRightSlider"></ag-slider>
452                <ag-slider data-ref="paddingBottomSlider"></ag-slider>
453                <ag-slider data-ref="paddingLeftSlider"></ag-slider>
454            </ag-group-component>
455        <div>`,[As,RG],{chartPaddingGroup:e,paddingTopSlider:t("top"),paddingRightSlider:t("right"),paddingBottomSlider:t("bottom"),paddingLeftSlider:t("left")}),this.addManagedEventListeners({chartOptionsChanged:e=>{this.updateTopPadding(e.chartOptions)}})}updateTopPadding(e){let t=[...this.chartController.getChartSeriesTypes(),"common"].map(t=>{var i;return null==(i=e[t])||null==(i=i.padding)?void 0:i.top}).find(e=>null!=e);null!=t&&this.paddingTopSlider.setValue(`${t}`)}},T0=class extends s${constructor(e){super(),this.options=e,this.chartGroup=s_}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{chartController:e,chartMenuParamsFactory:t,isExpandedOnInit:i,registerGroupComponent:s}=this.options,r={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chartStyle"),expanded:i,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new TJ(t,e)),this.createManagedBean(new TX(t))]};this.setTemplate(`<div>
456            <ag-group-component data-ref="chartGroup"></ag-group-component>
457        </div>`,[As],{chartGroup:r}),s(this.chartGroup)}},T1=class extends tk{constructor(e){super(),this.groupContainer=e,this.id=0,this.groupComponents=new Map}addGroupComponent(e){let t=this.id++;this.groupComponents.set(t,e),e.isExpanded()&&(this.expandedGroupComponent=t),e.onExpandedChange(i=>{if(i){let i=this.expandedGroupComponent;if(this.expandedGroupComponent=t,null!=i){var s;let t=e.getGui(),r=t.offsetTop-this.groupContainer.parentElement.scrollTop;null==(s=this.groupComponents.get(i))||s.toggleGroupExpand(!1,!0);let a=t.offsetTop-r;a<0&&(a=0),a!==this.groupContainer.parentElement.scrollTop&&(this.groupContainer.parentElement.scrollTop=a)}}else this.expandedGroupComponent=void 0})}destroy(){this.groupComponents.clear(),super.destroy()}},T2=class extends s${constructor(e){super(),this.options=e,this.legendGroup=s_,this.isGradient=["treemap","sunburst","heatmap"].includes(e.seriesType),this.key=this.isGradient?"gradientLegend":"legend"}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{chartMenuParamsFactory:e,isExpandedOnInit:t,registerGroupComponent:i}=this.options,s=this.createManagedBean(new ad(e.getDefaultSelectParams(`${this.key}.position`,"position",["top","right","bottom","left"].map(e=>({value:e,text:this.chartTranslationService.translate(e)}
457))))),r=this.createManagedBean(new Ae(e.addEnableParams(`${this.key}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("legendEnabled"),suppressEnabledCheckbox:!0,useToggle:!0,items:[this.createLabelPanel(e),s,...this.getItems(e)]}))),a={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("legend"),suppressEnabledCheckbox:!0,expanded:t,items:[r]};this.setTemplate(`<div>
458            <ag-group-component data-ref="legendGroup">
459            </ag-group-component>
460        </div>`,[As],{legendGroup:a}),i(this.legendGroup)}getItems(e){let t=(t,i,s)=>this.createManagedBean(new RO(e.getDefaultSliderParams(`${this.key}.${t}`,i,s)));return this.isGradient?[this.createManagedBean(new rs(e.addValueParams("gradientLegend.reverseOrder",{label:this.chartTranslationService.translate("reverseDirection"),labelWidth:"flex"}))),t("gradient.thickness","thickness",40),t("gradient.preferredLength","preferredLength",300),t("spacing","spacing",200)]:[t("spacing","spacing",200),t("item.marker.size","markerSize",40),t("item.marker.strokeWidth","markerStroke",10),t("item.marker.padding","itemSpacing",20),t("item.paddingX","layoutHorizontalSpacing",50),t("item.paddingY","layoutVerticalSpacing",50)]}createLabelPanel(e){let t=this.isGradient?"gradientLegend.scale.label":"legend.item.label";return this.createManagedBean(new TY({enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:e,keyMapper:e=>`${t}.${e}`,cssIdentifier:"charts-format-sub-level-no-header"}))}},T3=class extends s${constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("callout"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
461            <ag-group-component data-ref="calloutGroup">
462                <ag-slider data-ref="calloutLengthSlider"></ag-slider>
463                <ag-slider data-ref="calloutStrokeWidthSlider"></ag-slider>
464                <ag-slider data-ref="labelOffsetSlider"></ag-slider>
465            </ag-group-component>
466        </div>`,[As,RG],{calloutGroup:e,calloutLengthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.length","length",40),calloutStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.strokeWidth","strokeWidth",10),labelOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLabel.offset","offset",30)})}},T4=class extends s${constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("cap"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0},t=this.chartMenuUtils.getDefaultSliderParams("cap.lengthRatio","capLengthRatio",1);t.step=.05,this.setTemplate(`<div>
467            <ag-group-component data-ref="capsGroup">
468                <ag-slider data-ref="capLengthRatioSlider"></ag-slider>
469            </ag-group-component>
470        </div>`,[As,RG],{capsGroup:e,capLengthRatioSlider:t})}},T6=class extends s${constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("connectorLine"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
471            <ag-group-component data-ref="lineGroup">
472                <ag-color-picker data-ref="lineColorPicker"></ag-color-picker>
473                <ag-slider data-ref="lineStrokeWidthSlider"></ag-slider>
474                <ag-slider data-ref="lineOpacitySlider"></ag-slider>
475                <ag-slider data-ref="lineDashSlider"></ag-slider>                
476            </ag-group-component>
477        </div>`,[As,RP,RG],{lineGroup:e,lineColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("line.stroke"),lineStrokeWidthSlider:this.getSliderParams("strokeWidth",10,"line.strokeWidth"),lineDashSlider:this.getSliderParams("lineDash",30,"line.lineDash",1,!0),lineOpacitySlider:this.getSliderParams("strokeOpacity",1,"line.strokeOpacity",.05)})}getSliderParams(e,t,i,s=1,r=!1){let a=this.chartMenuUtils.getDefaultSliderParams(i,e,t,r);return a.step=s,a}};function T5(e){return["square","circle","cross","diamond","plus","triangle","heart"].map(t=>({value:t,text:e.translate(t)}
vendor: 5,496 bytes, lines 477-503
477))}var T8=class extends s${constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuUtils.addEnableParams("marker.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("markers"),suppressEnabledCheckbox:!0,useToggle:!0,suppressOpenCloseIcons:!0});this.setTemplate(`<div>
478            <ag-group-component data-ref="seriesMarkersGroup">
479                <ag-select data-ref="seriesMarkerShapeSelect"></ag-select>
480                <ag-slider data-ref="seriesMarkerSizeSlider"></ag-slider>
481                <ag-slider data-ref="seriesMarkerStrokeWidthSlider"></ag-slider>
482            </ag-group-component>
483        </div>`,[As,au,RG],{seriesMarkersGroup:e,seriesMarkerShapeSelect:this.chartMenuUtils.getDefaultSelectParams("marker.shape","shape",T5(this.chartTranslationService)),seriesMarkerSizeSlider:this.chartMenuUtils.getDefaultSliderParams("marker.size","size",60),seriesMarkerStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("marker.strokeWidth","strokeWidth",10)})}},T7=class extends s${constructor(e){super(),this.chartMenuUtils=e,this.seriesItemsGroup=s_,this.activePanels=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("seriesItems"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
484            <ag-group-component data-ref="seriesItemsGroup">
485                <ag-select data-ref="seriesItemSelect"></ag-select>
486            </ag-group-component>
487        </div>`,[As,au],{seriesItemsGroup:e,seriesItemSelect:this.getSeriesItemsParams()}),this.initSeriesControls()}getSeriesItemsParams(){let e=[{value:"positive",text:this.chartTranslationService.translate("seriesItemPositive")},{value:"negative",text:this.chartTranslationService.translate("seriesItemNegative")}],t=e=>{this.destroyActivePanels(),this.initSeriesControls(e)};return this.chartMenuUtils.getDefaultSelectParamsWithoutValueParams("seriesItemType",e,"positive",t)}initSeriesControls(e="positive"){this.initSlider("strokeWidth",10,`item.${e}.strokeWidth`),this.initSlider("lineDash",30,`item.${e}.lineDash`,1,!0),this.initSlider("strokeOpacity",1,`item.${e}.strokeOpacity`,.05,!1),this.initSlider("fillOpacity",1,`item.${e}.fillOpacity`,.05,!1),this.initItemLabels(e)}initSlider(e,t,i,s=1,r=!1){let a=this.chartMenuUtils.getDefaultSliderParams(i,e,t,r);a.step=s;let o=this.seriesItemsGroup.createManagedBean(new RO(a));this.seriesItemsGroup.addItem(o),this.activePanels.push(o)}initItemLabels(e){let t=this.chartMenuUtils.getDefaultFontPanelParams(`item.${e}.label`,"seriesItemLabels"),i=this.createBean(new TY(t));this.seriesItemsGroup.addItem(i),this.activePanels.push(i)}destroyActivePanels(){this.activePanels.forEach(e=>{sv(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}},T9=class extends s${constructor(e,t="shadow"){super(),this.chartMenuUtils=e,this.propertyKey=t}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.propertyKey,t=this.chartMenuUtils.addEnableParams(`${e}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("shadow"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuUtils.getDefaultColorPickerParams(`${e}.color`);this.setTemplate(`<div>
488            <ag-group-component data-ref="shadowGroup">
489                <ag-color-picker data-ref="shadowColorPicker"></ag-color-picker>
490                <ag-slider data-ref="shadowBlurSlider"></ag-slider>
491                <ag-slider data-ref="shadowXOffsetSlider"></ag-slider>
492                <ag-slider data-ref="shadowYOffsetSlider"></ag-slider>
493            </ag-group-component>
494        </div>`,[As,RP,RG],{shadowGroup:t,shadowColorPicker:i,shadowBlurSlider:this.getSliderParams("blur",0,20),shadowXOffsetSlider:this.getSliderParams("xOffset",-10,10),shadowYOffsetSlider:this.getSliderParams("yOffset",-10,10)})}getSliderParams(e,t,i){let s=`${this.propertyKey}.${e}`,r=this.chartMenuUtils.getDefaultSliderParams(s,e,i);return r.minValue=t,r}},Le=class extends s${constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
495            <ag-group-component data-ref="groupSpacing">
496                <ag-slider data-ref="groupPaddingSlider"></ag-slider>
497                <ag-slider data-ref="groupSpacingSlider"></ag-slider>
498            </ag-group-component>
499            <ag-group-component data-ref="tileSpacing">
500                <ag-slider data-ref="tilePaddingSlider"></ag-slider>
501                <ag-slider data-ref="tileSpacingSlider"></ag-slider>
502            </ag-group-component>
503        </div>`,[As,RG],{groupSpacing:{...e,title:this.chartTranslationService.translate("group")},tileSpacing:{...e,title:this.chartTranslationService.translate("tile")},groupPaddingSlider:this.getSliderParams("padding","group.padding"),groupSpacingSlider:this.getSliderParams("spacing","group.gap"),tilePaddingSlider:this.getSliderParams("padding","tile.padding"),tileSpacingSlider:this.getSliderParams("spacing","t
503ile.gap")})}getSliderParams(e,t){return this.chartMenuUtils.getDefaultSliderParams(t,e,10)}},Lt=class extends s${constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("whisker"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
504            <ag-group-component data-ref="whiskersGroup">
505                <ag-color-picker data-ref="whiskerColorPicker"></ag-color-picker>
506                <ag-slider data-ref="whiskerThicknessSlider"></ag-slider>
507                <ag-slider data-ref="whiskerOpacitySlider"></ag-slider>
508                <ag-slider data-ref="whiskerLineDashSlider"></ag-slider>
509                <ag-slider data-ref="whiskerLineDashOffsetSlider"></ag-slider>
510            </ag-group-component>
511        </div>`,[As,RP,RG],{whiskersGroup:e,whiskerColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("whisker.stroke"),whiskerThicknessSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeWidth","strokeWidth",10),whiskerOpacitySlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeOpacity","strokeOpacity",1),whiskerLineDashSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDash","lineDash",30,!0),whiskerLineDashOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDashOffset","lineDashOffset",30)})}},Li="tooltips",Ls="strokeWidth",Lr="lineDash",La="lineOpacity",Lo="fillOpacity",Ln="labels",Ll="shadow",Lh=class extends s${constructor(e){super(),this.options=e,this.seriesGroup=s_,this.activePanels=[],this.widgetFuncs={lineWidth:()=>this.initStrokeWidth("lineWidth"),[Ls]:()=>this.initStrokeWidth("strokeWidth"),lineColor:()=>this.initLineColor(),[Lr]:()=>this.initLineDash(),[La]:()=>this.initOpacity("strokeOpacity"),[Lo]:()=>this.initOpacity("fillOpacity"),markers:()=>new T8(this.chartMenuUtils),[Ln]:()=>this.initLabels(),sectorLabels:()=>this.initSectorLabels(),[Ll]:()=>new T9(this.chartMenuUtils),[Li]:()=>this.initTooltips(),bins:()=>this.initBins(),whiskers:()=>new Lt(this.chartMenuUtils),caps:()=>new T4(this.chartMenuUtils),connectorLine:()=>new T6(this.chartMenuUtils),seriesItems:()=>new T7(this.chartMenuUtils),tileSpacing:()=>new Le(this.chartMenuUtils),shape:()=>this.initShape(),size:()=>this.initSize("size","size"),minSize:()=>this.initSize("size","minSize"),maxSize:()=>this.initSize("maxSize","maxSize")},this.seriesWidgetMappings={bar:[Li,Ls,Lr,La,Lo,Ln,Ll],pie:[Li,Ls,La,Lo,Ln,"sectorLabels",Ll],donut:[Li,Ls,La,Lo,Ln,"sectorLabels",Ll],line:[Li,"lineWidth",Lr,La,"markers",Ln],scatter:[Li,"shape","size",Ls,Ln],bubble:[Li,"shape","minSize","maxSize",Ls,Ln],area:[Li,"lineWidth",Lr,La,Lo,"markers",Ln,Ll],histogram:[Li,"bins",Ls,Lr,La,Lo,Ln,Ll],"radial-column":[Li,Ls,Lr,La,Lo,Ln],"radial-bar":[Li,Ls,Lr,La,Lo,Ln],"radar-line":[Li,Ls,Lr,La,"markers",Ln],"radar-area":[Li,Ls,Lr,La,Lo,"markers",Ln],nightingale:[Li,Ls,Lr,La,Lo,Ln],"box-plot":[Li,Ls,Lr,La,Lo,"whiskers","caps"],"range-bar":[Li,Ls,Lr,La,Lo,Ln],"range-area":[Li,"lineWidth",Lr,La,Lo,"markers",Ln,Ll],treemap:[Li,"tileSpacing"],sunburst:[Li],heatmap:[Li,Ln,"lineColor","lineWidth",La],waterfall:[Li,"connectorLine","seriesItems"]},this.seriesType=e.seriesType}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{isExpandedOnInit:e,chartOptionsService:t,chartController:i,registerGroupComponent:s}=this.options,r={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("series"),expanded:e,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
512            <ag-group-component data-ref="seriesGroup">
513            </ag-group-component>
514        </div>`,[As],{seriesGroup:r}),s(this.seriesGroup),this.chartMenuUtils=this.createManagedBean(new TV(t.getSeriesOptionsProxy(()=>this.seriesType))),this.addManagedListeners(i,{chartSeriesChartTypeChanged:this.refreshWidgets.bind(this)}),this.refreshWidgets()}refreshWidgets(){let{chartController:e}=this.options;this.destroyActivePanels(),e.getChartProxy().getChart().waitForUpdate().then(()=>{var t;this.isAlive()&&(e.isComboChart()&&(this.updateSeriesType(),this.initSeriesSelect()),(null!=(t=this.seriesWidgetMappings[this.seriesType])?t:[]).forEac
514h(e=>{let t,i=this.widgetFuncs[e]();if(Array.isArray(i)){let e=this.createBean(i[0]);t=e,i[1](e)}else t=this.createBean(i);this.seriesGroup.addItem(t),this.activePanels.push(t)}))}).catch(e=>eg("chart rendering failed",e))}initSeriesSelect(){let e=this.createBean(new ad(this.chartMenuUtils.getDefaultSelectParamsWithoutValueParams("seriesType",this.getSeriesSelectOptions(),`${this.seriesType}`,e=>{this.seriesType=e,this.refreshWidgets()})));this.seriesGroup.addItem(e),this.activePanels.push(e)}initTooltips(){return new lD(this.chartMenuUtils.addValueParams("tooltip.enabled",{label:this.translate("tooltips"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex"}))}initLineColor(){return new RF(this.chartMenuUtils.getDefaultColorPickerParams("stroke","strokeColor"))}initStrokeWidth(e){return new RO(this.chartMenuUtils.getDefaultSliderParams("strokeWidth",e,10))}initLineDash(){return new RO(this.chartMenuUtils.getDefaultSliderParams("lineDash","lineDash",30,!0))}initOpacity(e){let t=this.chartMenuUtils.getDefaultSliderParams(e,e,1);return t.step=.05,new RO(t)}initLabels(){let e=Rx(this.seriesType);return[new TY(this.chartMenuUtils.getDefaultFontPanelParams(e?"calloutLabel":"label",e?"calloutLabels":"labels")),t=>{if(e){let e=t.createManagedBean(new T3(this.chartMenuUtils));t.addItem(e),this.activePanels.push(e)}if("range-bar"===this.seriesType){let e=[{value:"inside",text:this.translate("inside")},{value:"outside",text:this.translate("outside")}],i=t.createManagedBean(new ad(this.chartMenuUtils.getDefaultSelectParams("label.placement","labelPlacement",e)));t.addItem(i),this.activePanels.push(i);let s=t.createManagedBean(new RO(this.chartMenuUtils.getDefaultSliderParams("label.padding","padding",200)));t.addItem(s),this.activePanels.push(s)}}]}initSectorLabels(){return[new TY(this.chartMenuUtils.getDefaultFontPanelParams("sectorLabel","sectorLabels")),e=>{let t=this.chartMenuUtils.getDefaultSliderParams("sectorLabel.positionRatio","positionRatio",1);t.step=.05;let i=e.createManagedBean(new RO(t));e.addItem(i)}]}initBins(){var e;let t=this.chartMenuUtils.getDefaultSliderParams("binCount","histogramBinCount",20),i=this.chartMenuUtils.getChartOptions(),s=(null!=(e=i.getValue("bins"))?e:i.getValue("calculatedBins",!0)).length;return t.value=`${s}`,t.maxValue=Math.max(s,20),new RO(t)}initShape(){return new ad(this.chartMenuUtils.getDefaultSelectParams("shape","shape",T5(this.chartTranslationService)))}initSize(e,t){return new RO(this.chartMenuUtils.getDefaultSliderParams(e,t,60))}getSeriesSelectOptions(){let e=this.getActiveSeriesTypes();return["area","bar","line"].filter(t=>e.includes(t)).map(e=>({value:e,text:this.translate(e)}))}updateSeriesType(){let e=this.getActiveSeriesTypes();!e.includes(this.seriesType)&&e.length>0&&(this.seriesType=e[0])}getActiveSeriesTypes(){return this.options.chartController.getActiveSeriesChartTypes().map(e=>RS(e.chartType))}translate(e){return this.chartTranslationService.translate(e)}destroyActivePanels(){this.activePanels.forEach(e=>{sv(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}},Ld=class extends s${constructor(e,t,i){super("<div></div>"),this.chartMenuUtils=e,this.name=t,this.key=i,this.chartOptions=e.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.initFontPanel()}hasTitle(){let e=this.chartOptions.getValue(this.key);return e&&e.enabled&&e.text&&e.text.length>0}initFontPanel(){let e=this.hasTitle(),t={name:this.chartTranslationService.translate(this.name),enabled:e,suppressEnabledCheckbox:!1,chartMenuParamsFactory:this.chartMenuUtils,keyMapper:e=>`${this.key}.${e}`,onEnableChange:e=>this.onEnableChange(e)};this.fontPanel=this.createManagedBean(new TY(t)),this.fontPanel.addItem(this.createBean(new af(this.getTextInputParams())),!0),this.fontPanel.addItem(this.createBean(new RO(this.getSpacingSliderParams()))),this.getGui().appendChild(this.fontPanel.getGui())}getTextInputParams(){return this.chartMenuUtils.addValueParams(`${this.key}.text`,{label:this.chartTranslationService.translate("title"),labelAlignment:"top"})}getSpacingSliderParams(){return this.chartMenuUtils.getDefaultSliderParams(`${this.key}.spacing`,"spacing",100)}onEnableChange(e){this.chartOptions.setValue(`${this.key}.enabled`,e)}},Lu=class extends Ld{wireBeans(e){super.wireBeans(e),this.chartMenuService=e.chartMenuService}postConstruct(){this.titlePlaceholder=this.chartTranslationService.translate("titlePlaceholder"),super.postConstruct(),this.addManagedEventListeners({chartTitleEdit:()=>{this.fontPanel.setEnabled(this.hasTitle())}})}getTextInputParams(){let e=super.getTextInputParams();return this.shouldOverrideTextWithPlaceholder(e.value)&&(e.value=this.titlePlaceholder),e}getSpacingSliderParams(){let e=super.getSpacingSliderParams();return e.value="10",e}onEnableChange(e){if(this.chartMenuService.doesChartToolbarExist()){let t=this.chartOptions.getValue("padding.top");this.chartOptions.setValue("padding.top",e?t-20:t+20)}this.chartOptions.setValue(`${this.key}.enabled`,e);let t=this.chartOptions.getValue(`${this.key}.text`);e&&this.shouldOverrideTextWithPlaceholder(t)&&this.chartOptions.setValue(`${this.key}.text`,this.titlePlaceholder)}shouldOverrideTextWithPlaceholder(e){return"Title"===e||(null==e?void 0:e.trim().length)===0}},Lc=class extends s${constructor(e){super(),this.options=e,this.titleGroup=s_}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{chartMenuParamsFactory:e,chartAxisMenuParamsFactory:t,chartOptionsService:i,seriesType:s,isExpandedOnInit:r=!1,registerGroupComponent:a}=this.options,o=[];if(Rf(s)){let e=e=>this.createManagedBean(new TV(i.getCartesianAxisThemeOverridesProxy(e)));o.push(this.createManagedBean(new Ld(e("xAxis"),"horizontalAxisTitle","title"))),o.push(this.createManagedBean(new Ld(e("yAxis"),"verticalAxisTitle","title")))}else RC(s)&&o.push(this.createManagedBean(new Ld(t,"polarAxisTitle","title")));let n={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chartTitles"),expanded:r,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new Lu(e,"chartTitle","title")),this.createManagedBean(new Ld(e,"chartSubtitle","subtitle")),...o]};this.setTemplate(`<div>
515            <ag-group-component data-ref="titleGroup"></ag-group-component>
516        </div>`,[As],{titleGroup:n}),a(this.titleGroup)}},Lp={groups:[{type:"chart"},{type:"titles"},{type:"legend"},{type:"series"},{type:"axis"}]},Lg=class extends s${constructor(e){super('<div class="ag-chart-format-wrapper"></div>'),this.chartMenuContext=e}postConstruct(){this.groupExpansionFeature=this.createManagedBean(new T1(this.getGui())),this.chartPanelFeature=this.createManagedBean(new RA(this.chartMenuContext.chartController,this.getGui(),"ag-chart-format-section",(e,t)=>this.createPanels(t))),this.chartPanelFeature.refreshPanels()}createPanels(e){var t;let i=!1;null==(t=this.getFormatPanelDef().groups)||t.forEach(({type:t,isOpen:s=!1})=>{if(!this.isGroupPanelShownInSeries(t,e))return;s&&(i&&ep(`As of v32, only one charts customize panel group can be expanded at a time. '${t}' will not be expanded.`),i=!0);let r=e=>this.groupExpansionFeature.addGroupComponent(e),a={...this.chartMenuContext,isExpandedOnInit:s,seriesType:e,registerGroupComponent:r};switch(t){case"chart":this.chartPanelFeature.addComponent(new T0(a));break;case"titles":this.chartPanelFeature.addComponent(new Lc(a));break;case"legend":this.chartPanelFeature.addComponent(new T2(a));break;case"axis":RC(e)?this.chartPanelFeature.addComponent(new TQ(a)):Rf(e)&&(this.chartPanelFeature.addComponent(new Tq("xAxis",a)),this.chartPanelFeature.addComponent(new Tq("yAxis",a)));break;case"horizontalAxis":this.chartPanelFeature.addComponent(new Tq("xAxis",a));break;case"verticalAxis":this.chartPanelFeature.addComponent(new Tq("yAxis",a));break;case"series":this.chartPanelFeature.addComponent(new Lh(a));break;case"navigator":ep("'navigator' is now displayed in the charts advanced settings instead of the customize panel, and this setting will be ignored.");break;default:ep(`Invalid charts customize panel group name supplied: '${t}'`)}})}getFormatPanelDef(){var e;return(null==(e=this.gos.get("chartToolPanelsDef"))?void 0:e.formatPanel)||Lp}isGroupPanelShownInSeries(e,t){return["chart","titles","legend","series"].includes(e)||Rf(t)&&["axis","horizontalAxis","verticalAxis"].includes(e)||RC(t)&&"axis"===e}};
516function Lm(e){let{stacked:t,size:i,padding:s,xScalePadding:r,xScaleDomain:a,yScaleDomain:o}=e,n=new Ip.BandScale;n.domain=a,n.range=[s,i-s],n.paddingInner=r,n.paddingOuter=r;let l=new Ip.LinearScale;l.domain=o,l.range=[i-s,s];let h=(e,t,i)=>e.map((e,s)=>{let r=i.convert(e),a=new Ip.Rect;return a.x=t.convert(s),a.y=r,a.width=t.bandwidth,a.height=i.convert(0)-r,a.strokeWidth=0,a.crisp=!0,a});return t?e.data.map(e=>h(e,n,l)):h(e.data,n,l)}function Lv(e,t,i,s){let r=new Ip.LinearScale;r.domain=[0,4],r.range=[s,i-s];let a=new Ip.LinearScale;a.domain=[0,10],a.range=[i-s,s];let o=t.map(e=>{let t=new Ip.Path;return t.strokeWidth=3,t.lineCap="round",t.fill=void 0,e.forEach((e,i)=>{t.path[i>0?"lineTo":"moveTo"](r.convert(i),a.convert(e))}),t}),n=new Ip.Group;return n.setClipRect(new Ip.BBox(s,s,i-2*s,i-2*s)),n.append(o),e.append(n),o}function Lf(e,t,i,s,r,a=0){let o=new Ip.LinearScale;o.domain=[0,7],o.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2);let n=new Ip.LinearScale;n.domain=[0,10],n.range=[s,r];let l=[],h=i/2,d=t.map(e=>{let t=new Ip.Path;return t.strokeWidth=1,t.strokeOpacity=.5,t.lineCap="round",t.fill=void 0,t.fillOpacity=.8,e.forEach((e,i)=>{let d=o.convert(i),u=s+r-n.convert(e),c=u*Math.cos(d)+h,p=u*Math.sin(d)+h;if(t.path[i>0?"lineTo":"moveTo"](c,p),a>0){let e=new Ip.Circle;e.x=c,e.y=p,e.size=a,l.push(e)}}),t.path.closePath(),t}),u=new Ip.Group;return u.append([...d,...l]),e.append(u),{paths:d,markers:l}}function LC(e){let[t,i]=[1/0,-1/0];return{processedData:e.reduce((e,s,r)=>{let a=r>0?e[r-1]:void 0;null!=e[r]||(e[r]=[]);let o=e[r];return s.forEach((e,s)=>{a&&(e+=a[s]),o[s]=e,o[s]<t&&(t=o[s]),o[s]>i&&(i=o[s])}),e},[]),min:t,max:i}}var Ly=class extends s${constructor(e,t){super(),this.tooltipName=t,this.size=58,this.padding=5,this.root=new Ip.Group;let i=new Ip.Scene({width:this.size,height:this.size});i.canvas.element.classList.add("ag-chart-mini-thumbnail-canvas"),i.setRoot(this.root),i.setContainer(e),this.scene=i}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.scene.canvas.element.title=this.chartTranslationService.translate(this.tooltipName),this.scene.render().catch(e=>{eg("AG Grid - chart update failed",e)})}},Lw=class extends Ly{constructor(e,t){super(e,t),this.stroke="gray",this.axisOvershoot=3}postConstruct(){let e=this.size,t=this.padding,i=new Ip.Line;i.x1=t,i.y1=t,i.x2=t,i.y2=e-t+this.axisOvershoot,i.stroke=this.stroke;let s=new Ip.Line;s.x1=t-this.axisOvershoot+1,s.y1=e-t,s.x2=e-t+1,s.y2=e-t,s.stroke=this.stroke;let r=this.root;r.append(i),r.append(s),super.postConstruct()}},Lb=class extends Lw{constructor(e,t,i){super(e,"groupedColumnTooltip"),this.columnData=[2,3,4];let{root:s,columnData:r,size:a,padding:o}=this;this.columns=Lm({stacked:!1,root:s,data:r,size:a,padding:o,xScaleDomain:[0,1,2],yScaleDomain:[0,4],xScalePadding:.3}),s.append(this.columns),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]})}};Lb.chartType="groupedColumn";var LS=class e extends Lw{constructor(t,i,s,r,a,o=e.data,n=[0,16],l="stackedColumnTooltip"){super(t,l);let{root:h,size:d,padding:u}=this;this.stackedColumns=Lm({stacked:!0,root:h,data:o,size:d,padding:u,xScaleDomain:[0,1,2],yScaleDomain:n,xScalePadding:.3}),h.append([].concat.apply([],this.stackedColumns)),this.updateColors(i,s)}updateColors(e,t){this.stackedColumns.forEach((i,s)=>i.forEach(i=>{i.fill=e[s],i.stroke=t[s]}))}};LS.chartType="stackedColumn",LS.data=[[8,12,16],[6,9,12],[2,3,4]];var Lx=LS,LM=class e extends Lx{constructor(t,i,s,r,a){super(t,i,s,r,a,e.data,[0,10],"normalizedColumnTooltip")}};LM.chartType="normalizedColumn",LM.data=[[10,10,10],[6,7,8],[2,4,6]];var LD=class extends Lw{constructor(e,t,i){super(e,"groupedBarTooltip");let s=this.padding,r=this.size,a=new Ip.BandScale;a.domain=[0,1,2],a.range=[s,r-s],a.paddingInner=.3,a.paddingOuter=.3;let o=new Ip.LinearScale;o.domain=[0,4],o.range=[r-s,s];let n=o.convert(0),l=a.bandwidth;this.bars=[2,3,4].map((e,t)=>{let i=new Ip.Rect;return i.x=s,i.y=a.convert(t),i.width=n-o.convert(e),i.height=l,i.strokeWidth=0,i.crisp=!0,i}),this.updateColors(t,i),this.root.append(this.bars)}
516updateColors(e,t){this.bars.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]})}};LD.chartType="groupedBar";var LE=class e extends Lw{constructor(t,i,s,r,a,o=e.data,n=[0,16],l="stackedBarTooltip"){super(t,l);let h=this.size,d=this.padding,u=new Ip.BandScale;u.domain=[0,1,2],u.range=[d,h-d],u.paddingInner=.3,u.paddingOuter=.3;let c=new Ip.LinearScale;c.domain=n,c.range=[h-d,d];let p=c.convert(0),g=u.bandwidth;this.bars=o.map(e=>e.map((e,t)=>{let i=new Ip.Rect;return i.x=d,i.y=u.convert(t),i.width=p-c.convert(e),i.height=g,i.strokeWidth=0,i.crisp=!0,i})),this.updateColors(i,s),this.root.append([].concat.apply([],this.bars))}updateColors(e,t){this.bars.forEach((i,s)=>i.forEach(i=>{i.fill=e[s],i.stroke=t[s]}))}};LE.chartType="stackedBar",LE.data=[[8,12,16],[6,9,12],[2,3,4]];var LI=LE,LA=class e extends LI{constructor(t,i,s,r,a){super(t,i,s,r,a,e.data,[0,10],"normalizedBarTooltip")}};LA.chartType="normalizedBar",LA.data=[[10,10,10],[6,7,8],[2,4,6]];var LR=Ip.toRadians,LT=class extends Ly{constructor(e,t,i,s,r,a=.6,o="donutTooltip"){super(e,o);let n=(this.size-2*this.padding)/2,l=n+this.padding,h=[[LR(-90),LR(30)],[LR(30),LR(120)],[LR(120),LR(180)],[LR(180),LR(210)],[LR(210),LR(240)],[LR(240),LR(270)]];this.sectors=h.map(([e,t])=>{let i=new Ip.Sector;return i.centerX=l,i.centerY=l,i.innerRadius=n*a,i.outerRadius=n,i.startAngle=e,i.endAngle=t,i.stroke=void 0,i.strokeWidth=0,i.inset=.75,i}),this.updateColors(t,i),this.root.append(this.sectors)}updateColors(e,t){this.sectors.forEach((i,s)=>{i.fill=e[s%e.length],i.stroke=t[s%t.length]})}};LT.chartType="donut";var LL=class extends LT{constructor(e,t,i,s,r){super(e,t,i,s,r,0,"pieTooltip")}};LL.chartType="pie";var LF=class extends Lw{constructor(e,t,i){super(e,"lineTooltip"),this.data=[[9,7,8,5,6],[5,6,3,4,1],[1,3,4,8,7]],this.lines=Lv(this.root,this.data,this.size,this.padding),this.updateColors(t,i)}updateColors(e,t){this.lines.forEach((t,i)=>{t.stroke=e[i]})}};LF.chartType="line";var LP=class extends Lw{constructor(e,t,i){super(e,"scatterTooltip");let s=this.size,r=this.padding,a=new Ip.LinearScale;a.domain=[-.5,4],a.range=[2*r,s-r];let o=new Ip.LinearScale;o.domain=[-.5,3.5],o.range=[s-r,r];let n=[];[[[.3,3],[1.1,.9],[2,.4],[3.4,2.4]],[[0,.3],[1,2],[2.4,1.4],[3,0]]].forEach(e=>{e.forEach(([e,t])=>{let i=new Ip.Arc;i.strokeWidth=0,i.centerX=a.convert(e),i.centerY=o.convert(t),i.radius=2.5,n.push(i)})}),this.points=n,this.updateColors(t,i);let l=new Ip.Group;l.setClipRect(new Ip.BBox(r,r,s-2*r,s-2*r)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach((i,s)=>{i.stroke=t[s%t.length],i.fill=e[s%e.length]})}};LP.chartType="scatter";var Lk=class extends Lw{constructor(e,t,i){super(e,"bubbleTooltip");let s=this.size,r=this.padding,a=new Ip.LinearScale;a.domain=[0,1],a.range=[2*r,s-r];let o=new Ip.LinearScale;o.domain=[0,1],o.range=[s-r,r];let n=[];[[[.1,.3,5],[.5,.4,7],[.2,.8,7]],[[.8,.7,5],[.7,.3,9]]].forEach(e=>{e.forEach(([e,t,i])=>{let s=new Ip.Arc;s.strokeWidth=0,s.centerX=a.convert(e),s.centerY=o.convert(t),s.radius=i,s.fillOpacity=.7,n.push(s)})}),this.points=n,this.updateColors(t,i);let l=new Ip.Group;l.setClipRect(new Ip.BBox(r,r,s-2*r,s-2*r)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach((i,s)=>{i.stroke=t[s%t.length],i.fill=e[s%e.length]})}};Lk.chartType="bubble";var LN=class e extends Lw{constructor(t,i,s,r,a,o=e.data){super(t,"groupedAreaTooltip");let n=this.size,l=this.padding,h=new Ip.BandScale;h.domain=[0,1,2],h.paddingInner=1,h.paddingOuter=0,h.range=[l+.5,n-l-.5];let d=new Ip.LinearScale;d.domain=[0,6],d.range=[n-l+.5,l];let u=2*o.length-1,c=[],p=d.convert(0);o.forEach((e,t)=>{let i=h.convert(t);e.forEach((e,s)=>{let r=d.convert(e),a=c[s]||(c[s]=[]);a[t]={x:i,y:r},a[u-t]={x:i,y:p}})}),this.areas=c.reverse().map(e=>{let t=new Ip.Path;t.strokeWidth=1,t.strokeOpacity=.75,t.fillOpacity=.7;let i=t.path;return i.clear(),e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),i.closePath(),t}),this.updateColors(i,s),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]})}};LN.chartType="area",LN.data=[[1,3,5],[2,6,4],[5,3,1]];var LO=class e extends Lw{constructor(t,i,s,r,a,o=e.data,n="stackedAreaTooltip"){super(t,n);let l=this.size,h=this.padding,d=new Ip.BandScale;d.domain=[0,1,2],d.paddingInner=1,d.paddingOuter=0,d.range=[h+.5,l-h-.5];let u=new Ip.LinearScale;u.domain=[0,16],u.range=[l-h+.5,h+.5];let c=2*o.length-1,p=[];o.forEach((e,t)=>{let i=d.convert(t),s=0;e.forEach((e,r)=>{let a=u.convert(s+e),o=p[r]||(p[r]=[]);o[t]={x:i,y:a},o[c-t]={x:i,y:u.convert(s)},s+=e})}),this.areas=p.map(e=>{let t=new Ip.Path;t.strokeWidth=0;let i=t.path;return i.clear(),e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),i.closePath(),t}),this.updateColors(i,s),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]})}};
516LO.chartType="stackedArea",LO.data=[[2,3,2],[3,6,5],[6,2,2]];var LG=LO,LB=class e extends LG{constructor(t,i,s,r,a,o=e.data){super(t,i,s,r,a,o,"normalizedAreaTooltip")}};LB.chartType="normalizedArea",LB.data=LG.data.map(e=>{let t=e.reduce((e,t)=>e+t,0);return e.map(e=>e/t*16)});var Lz=class extends Lw{constructor(e,t,i){super(e,"histogramTooltip");let s=this.padding,r=this.size,a=[2,5,11,13,10,6,1],o=new Ip.LinearScale;o.domain=[0,a.length],o.range=[s,r-s];let n=new Ip.LinearScale;n.domain=[0,a.reduce((e,t)=>Math.max(e,t),0)],n.range=[r-s,s];let l=n.convert(0);this.bars=a.map((e,t)=>{let i=n.convert(e),s=o.convert(t),r=o.convert(t+1),a=new Ip.Rect;return a.x=s,a.y=i,a.width=r-s,a.height=l-i,a.strokeWidth=1,a.strokeOpacity=.75,a.crisp=!0,a}),this.updateColors(t,i),this.root.append(this.bars)}updateColors([e],[t]){this.bars.forEach(i=>{i.fill=e,i.stroke=t})}};Lz.chartType="histogram";var LV=class extends Ly{constructor(e,t){super(e,t),this.stroke="gray",this.showRadiusAxisLine=!0,this.showAngleAxisLines=!0}postConstruct(){let e=this.size,t=this.padding,i=(e-2*t)/2,s=this.showAngleAxisLines?[i,.8*i,.6*i,.4*i]:[],r=new Ip.Line;r.x1=e/2,r.y1=t,r.x2=e/2,r.y2=e-t-i-s[s.length-1],r.stroke=this.stroke,r.strokeOpacity=.5,r.fill=void 0,r.visible=this.showRadiusAxisLine;let a=t+i;this.gridLines=s.map((e,t)=>{let i=new Ip.Path;return i.path.arc(a,a,e,0,2*Math.PI),i.strokeWidth=1,i.stroke=this.stroke,i.strokeOpacity=0===t?.5:.2,i.fill=void 0,i});let o=this.root;o.append(r),this.gridLines.length>0&&o.append(this.gridLines),super.postConstruct()}},LH=class extends LV{constructor(e,t,i){super(e,"radialColumnTooltip"),this.data=[[6,8,10,2,6,5],[4,4,3,6,4,4],[5,4,2,9,8,9]],this.showRadiusAxisLine=!1;let{padding:s,size:r,data:a}=this,o=(r-2*s)/2,n=.4*o,l=new Ip.BandScale;l.domain=a[0].map((e,t)=>t),l.range=[0,2*Math.PI],l.paddingInner=0,l.paddingOuter=0;let h=.7*l.bandwidth,{processedData:d,max:u}=LC(a),c=new Ip.LinearScale;c.domain=[0,u],c.range=[n,o];let p=this.size/2;this.series=d.map((e,t)=>{let i=0===t?void 0:d[t-1],s=new Ip.TranslatableGroup({zIndex:1e6}),r=e.map((e,t)=>{let s=null==i?void 0:i[t],r=c.convert(e),a=c.convert(null!=s?s:0),d=l.convert(t),u=d+h,p=Ip.getRadialColumnWidth(d,u,o,.5,.5),g=new Ip.RadialColumnShape;return g.columnWidth=p,g.innerRadius=a,g.outerRadius=r,g.startAngle=d,g.endAngle=u,g.isBeveled=!0,g.axisInnerRadius=n,g.axisOuterRadius=o,g.stroke=void 0,g.strokeWidth=0,g});return s.append(r),s.translationX=p,s.translationY=p,s}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,s)=>{for(let r of i.children())r.fill=e[s%e.length],r.stroke=t[s%t.length]})}};LH.chartType="radialColumn";var Lj=class extends LV{constructor(e,t,i){super(e,"radialBarTooltip"),this.data=[[6,8,10],[4,4,3],[5,4,2]],this.showRadiusAxisLine=!1;let s=(this.size-this.padding)/2,r=new Ip.BandScale;r.domain=this.data[0].map((e,t)=>t),r.range=[.4*s,s],r.paddingInner=.5,r.paddingOuter=0;let a=r.bandwidth,{processedData:o,max:n}=LC(this.data),l=new Ip.LinearScale;l.domain=[0,Math.ceil(1.5*n)];let h=1.5*Math.PI,d=h+2*Math.PI;l.range=[h,d];let u=this.size/2;this.series=o.map((e,t)=>{let i=t<0?void 0:o[t-1],s=new Ip.Group({zIndex:1e6}),n=e.map((e,t)=>{var s;let o=null!=(s=null==i?void 0:i[t])?s:0,n=r.convert(t),h=l.convert(o),d=l.convert(e),c=new Ip.Sector;return c.centerX=u,c.centerY=u,c.innerRadius=n-a,c.outerRadius=n,c.startAngle=h,c.endAngle=d,c.stroke=void 0,c.strokeWidth=0,c});return s.append(n),s}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,s)=>{for(let r of i.children())r.fill=e[s%e.length],r.stroke=t[s%t.length]})}};Lj.chartType="radialBar";var LW=class extends LV{constructor(e,t,i){super(e,"radarLineTooltip"),this.markerSize=4,this.data=[[8,7,8,7,8,8,7,8],[6,8,5,10,6,7,4,6],[0,3,3,5,4,4,2,0]],this.showRadiusAxisLine=!1;let s=(this.size-2*this.padding)/2,{paths:r,markers:a}=Lf(this.root,this.data,this.size,s,0,this.markerSize);this.lines=r,this.markers=a,this.updateColors(t,i)}updateColors(e,t){this.lines.forEach((i,s)=>{let r=this.data[s].length;
516i.stroke=e[s];let a=s*r;this.markers.slice(a,a+r).forEach(i=>{i.stroke=t[s],i.fill=e[s]})})}};LW.chartType="radarLine";var LU=class extends LV{constructor(e,t,i){super(e,"radarAreaTooltip"),this.data=[[8,10,5,7,4,1,5,8],[1,1,2,7,7,8,10,1],[4,5,9,9,4,2,3,4]],this.showRadiusAxisLine=!1;let s=(this.size-2*this.padding)/2,r=s-.3*this.size;this.areas=Lf(this.root,this.data,this.size,s,r).paths,this.updateColors(t,i)}updateColors(e,t){this.areas.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]})}};LU.chartType="radarArea";var L_=class extends LV{constructor(e,t,i){super(e,"nightingaleTooltip"),this.data=[[6,10,9,8,7,8],[4,6,5,4,5,5],[3,5,4,3,4,7]],this.showRadiusAxisLine=!1;let s=(this.size-2*this.padding)/2,r=new Ip.BandScale;r.domain=this.data[0].map((e,t)=>t),r.range=[-Math.PI,Math.PI],r.paddingInner=0,r.paddingOuter=0;let a=.7*r.bandwidth,{processedData:o,max:n}=LC(this.data),l=new Ip.LinearScale;l.domain=[0,n],l.range=[0,s];let h=this.size/2;this.series=o.map((e,t)=>{let i=t<0?void 0:o[t-1],s=new Ip.Group({zIndex:1e6}),n=e.map((e,t)=>{let s=null==i?void 0:i[t],o=l.convert(e),n=l.convert(null!=s?s:0),d=r.convert(t),u=d+a,c=new Ip.Sector;return c.centerX=h,c.centerY=h,c.innerRadius=n,c.outerRadius=o,c.startAngle=d,c.endAngle=u,c.stroke=void 0,c.strokeWidth=0,c});return s.append(n),s}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,s)=>{for(let r of i.children())r.fill=e[s%e.length],r.stroke=t[s%t.length]})}};L_.chartType="nightingale";var L$=class extends Lw{constructor(e,t,i){super(e,"rangeBarTooltip"),this.bars=this.createRangeBar(this.root,[3,3.5,3],this.size,this.padding,"vertical"),this.updateColors(t,i)}updateColors(e,t){this.bars.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]})}createRangeBar(e,t,i,s,r){let a="horizontal"===r,o=2*s,n=new Ip.BandScale;n.domain=t.map((e,t)=>t),n.range=[s,i-s],n.paddingInner=.3,n.paddingOuter=.3;let l=new Ip.LinearScale;l.domain=[.7*t.reduce((e,t)=>Math.min(e,t),1/0),1.3*t.reduce((e,t)=>Math.max(e,t),0)],l.range=[o,i-o];let h=n.bandwidth,d=t.map((e,t)=>{let[i,s]=[.7*e,1.3*e],r=n.convert(t),o=l.convert(i),d=l.convert(s)-o,u=new Ip.Rect;return u.x=a?o:r,u.y=a?r:o,u.width=a?d:h,u.height=a?h:d,u.strokeWidth=0,u.crisp=!0,u});return e.append(d),d}};L$.chartType="rangeBar";var LY=class extends Lw{constructor(e,t,i){super(e,"rangeAreaTooltip");let s=[LK({offset:1.5,length:4,pattern:{low:3,high:5,period:4}}),LK({offset:1.5,length:4,pattern:{low:2.25,high:4.25,period:4}}),LK({offset:3,length:4,pattern:{low:2.5,high:4.5,period:4}})].map(e=>e.map(([e,t])=>({x:e,low:t-.875,high:t+.875}))),{lines:r,areas:a}=this.createRangeArea(this.root,s,this.size,this.padding);this.lines=r,this.areas=a,this.updateColors(t,i)}updateColors(e,t){e=Lq(e,1,2),t=Lq(t,1,2),this.lines.forEach(([e,i],s)=>{e.fill=void 0,e.stroke=t[s],i.fill=void 0,i.stroke=t[s]}),this.areas.forEach((t,i)=>{t.fill=e[i]})}createRangeArea(e,t,i,s){let r=t.reduce((e,t)=>t.reduce((e,{x:t})=>Math.min(e,t),e),1/0),a=t.reduce((e,t)=>t.reduce((e,{x:t})=>Math.max(e,t),e),-1/0),o=t.reduce((e,t)=>t.reduce((e,{low:t})=>Math.min(e,t),e),1/0),n=t.reduce((e,t)=>t.reduce((e,{high:t})=>Math.max(e,t),e),-1/0),l=new Ip.LinearScale;l.domain=[r,a],l.range=[s,i-s];let h=2*s,d=new Ip.LinearScale;d.domain=[o,n],d.range=[i-h,h];let u=[],c=[];return t.map(e=>{let t=new Ip.Path,i=new Ip.Path,s=new Ip.Path;return u.push([t,i]),c.push(s),t.strokeWidth=0,i.strokeWidth=0,s.strokeWidth=0,s.fillOpacity=.8,t.path.clear(),i.path.clear(),s.path.clear(),e.map((e,r)=>{let{x:a,low:o,high:n}=e,h=l.convert(a),u=d.convert(o),c=d.convert(n),p=r>0?"lineTo":"moveTo";return t.path[p](h,c),i.path[p](h,u),s.path[p](h,c),[h,u]})}).forEach((e,t)=>{let i=e.length-1,s=c[t];for(let t=i;t>=0;t--){let[i,r]=e[t];s.path.lineTo(i,r)}}),e.append(c.concat(...u)),{lines:u,areas:c}}};function LK(e){var t;let{offset:i,length:s,pattern:r}=e,a=function(e,t,i){let{period:s}=i,r=e/s,a=[0,.5].map(e=>e-r).map(LZ).sort((e,t)=>e-t);return Array.from({length:Math.floor(a.length*(s/t))},(e,t)=>a[t%a.length]+Math.floor(t/a.length)).map(e=>e*s).map(t=>{var s;return[s=t,o(e+s,i)]})}(i,s,r);return(0===a.length||0!==a[0][0])&&a.unshift([0,o(i+0,r)]),a[a.length-1][0]!==s&&a.push([t=s,o(i+t,r)]),a;
516function o(e,t){let{low:i,high:s,period:r}=t,a=LZ(e/r);return i+(s-i)*(a>.5?1-2*(a-.5):2*a)}}function LZ(e){let t=e%1;return t<0?t+1:t}function Lq(e,t,i){let s=[...e],r=s[t];return s[t]=s[i],s[i]=r,s}LY.chartType="rangeArea";var LQ=class extends Lw{constructor(e,t,i,s,r){super(e,"boxPlotTooltip");let a=this.padding,o=this.size,n=[11,11.5,10.5],l=new Ip.LinearScale;l.domain=[.8*n.reduce((e,t)=>Math.min(e,t),1/0),1.2*n.reduce((e,t)=>Math.max(e,t),0)],l.range=[o-1.5*a,a];let h=new Ip.BandScale;h.domain=n.map((e,t)=>t),h.range=[a,o-a],h.paddingInner=.4,h.paddingOuter=.2;let d=Math.round(h.bandwidth),u=Math.round(h.bandwidth/2);this.boxPlotGroups=n.map((e,t)=>{let[i,s,r,a]=[.8*e,.9*e,1.1*e,1.2*e],o=Math.round(l.convert(r)),n=Math.round(h.convert(t)),c=Math.round(n+d),p=Math.round(l.convert(s)),g=Math.round(l.convert(i)),m=Math.round(l.convert(e)),v=Math.round(l.convert(a)),f=n+u,C=new Ip.Group,y=new Ip.Rect,w=new Ip.Line,b=new Ip.Line,S=new Ip.Line,x=new Ip.Line,M=new Ip.Line;return y.x=n,y.y=o,y.width=d,y.height=p-o,y.strokeWidth=1,y.strokeOpacity=.75,y.crisp=!0,this.setLineProperties(w,n,c,m,m),this.setLineProperties(b,f,f,v,o),this.setLineProperties(S,f,f,g,p),this.setLineProperties(x,n,c,v,v),this.setLineProperties(M,n,c,g,g),C.append([y,w,b,S,x,M]),C}),this.updateColors(t,i,s,r),this.root.append(this.boxPlotGroups)}updateColors(e,t,i,s){var r;let a=null==i?void 0:i.get(ID.DEFAULT_BACKGROUND_COLOUR),o=null!=(r=Array.isArray(a)?a[0]:a)?r:"white";this.boxPlotGroups.forEach((i,r)=>{for(let a of i.children()){let i=e[r%e.length];a.fill=s?i:IA.interpolateColor(i,o)(.7),a.stroke=t[r%t.length]}})}setLineProperties(e,t,i,s,r){e.x1=t,e.x2=i,e.y1=s,e.y2=r,e.strokeOpacity=.75}};LQ.chartType="boxPlot";var LX=class extends Ly{constructor(e,t,i,s,r){super(e,"treemapTooltip");let{size:a,padding:o}=this,n=[[1,1],[3,2,1]],l=n.length%2==0?.3:.2,h=[o,a-o],d=n.length,u=d*(d+1)/2,c=l/(d-1),p=h[1]-h[0],g=p-l,m=h[0];this.rects=n.reduce((e,t,i)=>{null!=e||(e=[]);let s=(d-i)/u*g,r=t.length,a=t.reduce((e,t)=>e+=t,0),o=l/(r-1||1),n=r>1?p-l:p,v=h[0],f=t.map(e=>{let t=new Ip.Rect,i=n*e/a;return t.x=m,t.y=v,t.width=s,t.height=i,t.strokeWidth=.75,t.crisp=!0,v+=i+o,t});return m+=s+c,e.push(...f),e},[]),this.updateColors(t,i,s,r);let v=new Ip.Group;v.setClipRect(new Ip.BBox(o,o,a-o,a-o)),v.append(this.rects),this.root.append(v)}updateColors(e,t,i,s){var r;let a=null==i?void 0:i.get(ID.DEFAULT_BACKGROUND_COLOUR),o=null!=(r=Array.isArray(a)?a[0]:a)?r:"white";this.rects.forEach((i,r)=>{i.fill=e[r%t.length],i.stroke=s?t[r%t.length]:o})}};LX.chartType="treemap";var LJ=class extends LV{constructor(e,t,i){super(e,"sunburstTooltip"),this.data=[[[],[]],[[],[]],[[],[]]],this.angleOffset=-Math.PI/2,this.innerRadiusRatio=0,this.showRadiusAxisLine=!1,this.showAngleAxisLines=!1;let{data:s,size:r,padding:a,angleOffset:o,innerRadiusRatio:n}=this,l=(r-2*a)/2,h=[o+0,o+2*Math.PI],d=Math.abs(h[1]-h[0]),u=[l*n,l],c=Math.abs(u[1]-u[0]),p=0,g=(e,t)=>{e.forEach(e=>{let i=t+1;p=Math.max(p,i),g(e,i)})};g(s,0);let m=c/p,v=this.size/2,f=h[0];this.series=[];let C=(e,t,i,s,r)=>{if(!Array.isArray(e))return;let a=t+1,o=i;e.forEach((e,i,n)=>{let l=r;l||(l=new Ip.Group,this.series.push(l));let h=u[0]+t*m,d=u[0]+a*m,c=1/n.length,p=o,g=p+s*c,f=new Ip.Sector;f.centerX=v,f.centerY=v,f.innerRadius=h,f.outerRadius=d,f.startAngle=p,f.endAngle=g,f.stroke=void 0,f.strokeWidth=0,f.inset=.75,o=g,l.append(f),C(e,a,p,Math.abs(g-p),l)})};C(s,0,f,d),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,s)=>{for(let r of i.children())r.fill=e[s%e.length],r.stroke=t[s%t.length]})}};LJ.chartType="sunburst";var L0=class extends Ly{constructor(e,t,i,s,r){var a,o;super(e,"heatmapTooltip");let{size:n,padding:l}=this,h=Array.from({length:3},(e,t)=>Array.from({length:3},(e,t)=>t)),d=h.map((e,t)=>t),u=new Ip.BandScale;u.domain=d,u.range=[l,n-l],u.paddingInner=.01,u.paddingOuter=.1;let c=new Ip.BandScale;c.domain=d,c.range=[l,n-l],c.paddingInner=.01,c.paddingOuter=.1;let p=null!=(a=u.bandwidth)?a:0,g=null!=(o=c.bandwidth)?o:0;this.rects=h.reduce((e,t,i)=>{null!=e||(e=[]);let s=t.map((e,t)=>{let s=new Ip.Rect;return s.x=u.convert(i),s.y=c.convert(t),s.width=p,s.height=g,s.strokeWidth=0,s.crisp=!0,s});return e.push(...s),e},[]),this.updateColors(t,i,s,r);let m=new Ip.Group;m.setClipRect(new Ip.BBox(l,l,n-l,n-l)),m.append(this.rects),this.root.append(m)}updateColors(e,t,i,s){var r;let a=null==i?void 0:i.get(ID.DEFAULT_DIVERGING_SERIES_COLOR_RANGE),o=null==i?void 0:i.get(ID.DEFAULT_BACKGROUND_COLOUR),n=null!=(r=Array.isArray(o)?o[0]:o)?r:"white",l=s?[e[0],e[1]]:a,h=s?t[0]:n,d=IA.interpolateColor(l[0],l[1]);
516this.rects.forEach((e,t)=>{e.fill=d(.2*t),e.stroke=h})}};L0.chartType="heatmap";var L1=class extends Lw{constructor(e,t,i,s,r){super(e,"waterfallTooltip"),this.data=[4,3,-3,6,-3],this.bars=this.createWaterfall(this.root,this.data,this.size,this.padding,"vertical").bars,this.updateColors(t,i,s,r)}updateColors(e,t,i,s){let{data:r}=this,a={fill:s?e[0]:null==i?void 0:i.get(ID.PALETTE_ALT_UP_FILL),stroke:s?t[0]:null==i?void 0:i.get(ID.PALETTE_ALT_UP_STROKE)},o={fill:s?e[1]:null==i?void 0:i.get(ID.PALETTE_ALT_DOWN_FILL),stroke:s?t[1]:null==i?void 0:i.get(ID.PALETTE_ALT_DOWN_STROKE)};this.bars.forEach((e,t)=>{let i=r[t]>=0;e.fill=i?a.fill:o.fill,e.stroke=i?a.stroke:o.stroke})}createWaterfall(e,t,i,s,r){let a=2*s,{processedData:o,min:n,max:l}=LC(t.map(e=>[e])),h=o.reduce((e,t)=>e.concat(t),[]),d=new Ip.LinearScale;d.domain=[Math.min(n,0),l],d.range=[i-a,a];let u=new Ip.BandScale;u.domain=t.map((e,t)=>t),u.range=[s,i-s],u.paddingInner=.2,u.paddingOuter=.3;let c=u.bandwidth,p=new Ip.Path;p.stroke="#575757",p.strokeWidth=0;let g=Math.floor(p.strokeWidth)%2/2,m=p.path;m.clear();let v="horizontal"===r,f=h.map((e,i)=>{let s=i>0?h[i-1]:0,r=t[i]>0,a=Math.round(d.convert(e)),o=Math.round(d.convert(s)),n=(r?a:o)-g,l=Math.abs((r?o:a)+g-n),p=u.convert(i),f=new Ip.Rect;f.x=v?n:p,f.y=v?p:n,f.width=v?l:c,f.height=v?c:l,f.strokeWidth=0,f.crisp=!0;let C=a+g,y=o+g;if(i>0){let e=v?y:f.x,t=v?f.y:y;m.lineTo(e,t)}let w=v?C:f.x,b=v?f.y:C;return m.moveTo(w,b),f});return e.append([p,...f]),{bars:f}}};L1.chartType="waterfall";var L2=class extends Lw{constructor(e,t,i){super(e,"columnLineComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];let{root:s,columnData:r,lineData:a,size:o,padding:n}=this;this.columns=Lm({stacked:!1,root:s,data:r,size:o,padding:n,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),s.append(this.columns),this.lines=Lv(s,a,o,n),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]}),this.lines.forEach((t,i)=>{t.stroke=e[i+2]})}};L2.chartType="columnLineCombo";var L3=class extends Lw{constructor(e,t,i){super(e,"areaColumnComboTooltip"),this.columnData=[3,4.5],this.areaData=[[5,4,6,5,4]];let{root:s,columnData:r,areaData:a,size:o,padding:n}=this;this.columns=Lm({stacked:!1,root:s,data:r,size:o,padding:n,xScaleDomain:[0,1],yScaleDomain:[0,6],xScalePadding:.5});let l=new Ip.BandScale;l.range=[n,o-n],l.domain=[0,1,2,3,4],l.paddingInner=1,l.paddingOuter=0;let h=new Ip.LinearScale;h.range=[o-n,n],h.domain=[0,6];let d=[],u=h.convert(0),c=l.convert(0);a.forEach((e,t)=>{let i=d[t]||(d[t]=[]);e.forEach((e,t)=>{let s=l.convert(t),r=h.convert(e);i[t]={x:s,y:r}});let s=l.convert(e.length-1);d[t].push({x:s,y:u},{x:c,y:u})}),this.areas=d.map(e=>{let t=new Ip.Path;t.strokeWidth=0,t.fillOpacity=.8;let i=t.path;return e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),t}),s.append(this.areas),s.append([].concat.apply([],this.columns)),this.updateColors(t,i)}updateColors(e,t){this.areas.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]}),this.columns.forEach((i,s)=>{i.fill=e[s+1],i.stroke=t[s+1]})}};L3.chartType="areaColumnCombo";var L4=class extends Ly{constructor(e,t,i){super(e,"customComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];let{root:s,columnData:r,lineData:a,size:o,padding:n}=this;this.columns=Lm({stacked:!1,root:s,data:r,size:o,padding:n,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),s.append(this.columns),this.lines=Lv(s,a,o,n);let l="grey",h=new Ip.Line;h.x1=n,h.y1=n,h.x2=n,h.y2=o-n+3,h.stroke=l;let d=new Ip.Line;d.x1=n-3+1,d.y1=o-n,d.x2=o-n+1,d.y2=o-n,d.stroke=l;let u=new Ip.Path;this.buildPenIconPath(u),u.fill="whitesmoke",u.stroke="darkslategrey",u.strokeWidth=1,s.append([d,h,u]),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,s)=>{i.fill=e[s],i.stroke=t[s]}),this.lines.forEach((t,i)=>{t.stroke=e[i+2]})}buildPenIconPath(e){let{path:t}=e;t.moveTo(25.76,43.46),t.lineTo(31.27,48.53),t.moveTo(49.86,22),t.lineTo(49.86,22),t.cubicCurveTo(49.01994659053345,21.317514933510974,47.89593834348529,21.09645997825817,46.86,21.41),t.lineTo(46.86,21.41),t.cubicCurveTo(45.55460035985361,21.77260167850787,44.38777081121966,22.517979360321792,43.51,23.55),t.lineTo(25.51,43.8),t.lineTo(25.43,43.89),t.lineTo(23.01,51.89),t.lineTo(22.83,52.46),t.lineTo(31.02,48.86),t.lineTo(49.02,28.52),t.lineTo(49.02,28.52),t.cubicCurveTo(49.940716461596224,27.521914221246085,50.54302631059587,26.2720342455763,50.75,24.93),t.lineTo(50.75,24.93),t.cubicCurveTo(50.95363374988308,23.866379846512814,50.62080640232334,22.77066734274871,49.86,22),t.closePath(),t.moveTo(41.76,25.5),t.lineTo(47.34,30.5),t.moveTo(40.74,26.65),t.lineTo(46.25,31.71)}};L4.chartType="customCombo";var L6={columnGroup:{column:{range:!0,pivot:!0,enterprise:!1,icon:Lb},stackedColumn:{range:!0,pivot:!0,enterprise:!1,icon:Lx},normalizedColumn:{range:!0,pivot:!0,enterprise:!1,icon:LM}},barGroup:{bar:{range:!0,pivot:!0,enterprise:!1,icon:LD},stackedBar:{range:!0,pivot:!0,enterprise:!1,icon:LI},normalizedBar:{range:!0,pivot:!0,enterprise:!1,icon:LA}},pieGroup:{pie:{range:!0,pivot:!0,enterprise:!1,icon:LL},donut:{range:!0,pivot:!0,enterprise:!1,icon:LT},doughnut:{range:!0,pivot:!0,enterprise:!1,icon:LT}},lineGroup:{line:{range:!0,pivot:!0,enterprise:!1,icon:LF}},scatterGroup:{scatter:{range:!0,pivot:!0,enterprise:!1,icon:LP},bubble:{range:!0,pivot:!0,enterprise:!1,icon:Lk}},areaGroup:{area:{range:!0,pivot:!0,enterprise:!1,icon:LN},stackedArea:{range:!0,pivot:!0,enterprise:!1,icon:LG},normalizedArea:{range:!0,pivot:!0,enterprise:!1,icon:LB}},polarGroup:{radarLine:{range:!0,pivot:!1,enterprise:!0,icon:LW},radarArea:{range:!0,pivot:!1,enterprise:!0,icon:LU},nightingale:{range:!0,pivot:!1,enterprise:!0,icon:L_},radialColumn:{range:!0,pivot:!1,enterprise:!0,icon:LH},radialBar:{range:!0,pivot:!1,enterprise:!0,icon:Lj}},statisticalGroup:{boxPlot:{range:!0,pivot:!1,enterprise:!0,icon:LQ},histogram:{range:!0,pivot:!1,enterprise:!1,icon:Lz},rangeBar:{range:!0,pivot:!1,enterprise:!0,icon:L$},rangeArea:{range:!0,pivot:!1,enterprise:!0,icon:LY}},hierarchicalGroup:{treemap:{range:!0,pivot:!0,enterprise:!0,icon:LX},sunburst:{range:!0,pivot:!0,enterprise:!0,icon:LJ}},specializedGroup:{heatmap:{range:!0,pivot:!1,enterprise:!0,icon:L0},waterfall:{range:!0,pivot:!1,enterprise:!0,icon:L1}},combinationGroup:{columnLineCombo:{range:!0,pivot:!0,enterprise:!1,icon:L2},areaColumnCombo:{range:!0,pivot:!0,enterprise:!1,icon:L3},customCombo:{range:!0,pivot:!0,enterprise:!1,icon:L4}}},L5={columnGroup:["column","stackedColumn","normalizedColumn"],barGroup:["bar","stackedBar","normalizedBar"],pieGroup:["pie","donut"],lineGroup:["line"],scatterGroup:["scatter","bubble"],areaGroup:["area","stackedArea","normalizedArea"],polarGroup:["radarLine","radarArea","nightingale","radialColumn","radialBar"],statisticalGroup:["boxPlot","histogram","rangeBar","rangeArea"],hierarchicalGroup:["treemap","sunburst"],specializedGroup:["heatmap","waterfall"],combinationGroup:["columnLineCombo","areaColumnCombo","customCombo"]},L8=class extends s${constructor(e,t,i,s,r,a=L5){super('<div class="ag-chart-settings-mini-wrapper"></div>'),this.wrappers=new Map,this.chartController=e,this.fills=t,this.strokes=i,this.themeTemplateParameters=s,this.isCu
516stomTheme=r,this.chartGroups={...a}}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){!this.chartController.customComboExists()&&this.chartGroups.combinationGroup&&(this.chartGroups.combinationGroup=this.chartGroups.combinationGroup.filter(e=>"customCombo"!==e));let e=this.getGui(),t=this.chartController.isEnterprise(),i=this.chartController.isPivotChart(),s=!i;for(let{label:r,items:a}of Object.keys(this.chartGroups).map(e=>{var r;let a=e in L6?L6[e]:void 0;if(!a)return ep(`invalid chartGroupsDef config '${e}'`),null;let o=(null!=(r=this.chartGroups[e])?r:[]).map(r=>{let o=r in a?a[r]:void 0;return o?!t&&o.enterprise?null:s&&o.range||i&&o.pivot?o:null:(ep(`invalid chartGroupsDef config '${e}.${r}'`),null)}).filter(e=>null!=e);return 0===o.length?null:{label:this.chartTranslationService.translate(e),items:o}}).filter(e=>null!=e)){let t=this.createBean(new Ae({title:r,suppressEnabledCheckbox:!0,enabled:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-settings",direction:"horizontal",suppressKeyboardNavigation:!0}));for(let e of a){let i=e.icon,s=document.createElement("div");s.classList.add("ag-chart-mini-thumbnail"),s.setAttribute("tabindex","0"),s.setAttribute("role","button");let r=i.chartType,a=()=>{this.chartController.setChartType(r),this.updateSelectedMiniChart()};this.addManagedListeners(s,{click:a,keydown:e=>{(e.key==s9.ENTER||e.key===s9.SPACE)&&(e.preventDefault(),a())}}),this.wrappers.set(r,s),this.createBean(new i(s,this.fills,this.strokes,this.themeTemplateParameters,this.isCustomTheme)),t.addItem(s)}e.appendChild(t.getGui())}this.updateSelectedMiniChart()}updateSelectedMiniChart(){let e=this.chartController.getChartType();this.wrappers.forEach((t,i)=>{let s=i===e;t.classList.toggle("ag-selected",s);let r=this.chartTranslationService.translate(RI(i));ij(t,s?`${r}. ${this.chartTranslationService.translate("ariaChartSelected")}`:r)})}destroy(){this.wrappers.clear(),super.destroy()}},L7=class extends s${constructor(e){super(`<div class="ag-chart-settings-wrapper">
517            <div data-ref="eMiniChartsContainer" class="ag-chart-settings-mini-charts-container ag-scrollable-container"></div>
518            <div data-ref="eNavBar" class="ag-chart-settings-nav-bar">
519                <div data-ref="ePrevBtn" class="ag-chart-settings-prev">
520                    <button type="button" class="ag-button ag-chart-settings-prev-button"></button>
521                </div>
522                <div data-ref="eCardSelector" class="ag-chart-settings-card-selector"></div>
523                <div data-ref="eNextBtn" class="ag-chart-settings-next">
524                    <button type="button" class="ag-button ag-chart-settings-next-button"></button>
525                </div>
526            </div>
527        </div>`),this.chartController=e,this.eMiniChartsContainer=s_,this.eNavBar=s_,this.eCardSelector=s_,this.ePrevBtn=s_,this.eNextBtn=s_,this.miniChartsContainers=[],this.cardItems=[],this.activePaletteIndex=0,this.palettes=[],this.themes=[]}postConstruct(){this.resetPalettes(),this.ePrevBtn.insertAdjacentElement("afterbegin",sq("previous",this.gos)),this.eNextBtn.insertAdjacentElement("afterbegin",sq("next",this.gos)),this.addManagedElementListeners(this.ePrevBtn,{click:()=>this.setActivePalette(this.getPrev(),"left")}),this.addManagedElementListeners(this.eNextBtn,{click:()=>this.setActivePalette(this.getNext(),"right")});let e=()=>this.resetPalettes(!0);this.addManagedListeners(this.chartController,{chartTypeChanged:e,chartApiUpdate:e}),this.scrollSelectedIntoView()}scrollSelectedIntoView(){setTimeout(()=>{let e=this.miniChartsContainers.find(e=>!e.getGui().classList.contains("ag-hidden")).getGui().querySelector(".ag-selected");if(e){let t=e.offsetParent;t&&this.eMiniChartsContainer.scrollTo(0,t.offsetTop)}},250)}resetPalettes(e){var t;let i=this.chartController.getPalettes(),s=this.chartController.getThemeTemplateParameters(),r=null==(t=this.gos.get("chartToolPanelsDef"))||null==(t=t.settingsPanel)?void 0:t.chartGroupsDef;if(tg(i,this.palettes)&&!e||this.isAnimating)return;this.palettes=i,this.themes=this.chartController.getThemeNames(),this.activePaletteIndex=this.themes.findIndex(e=>e===this.chartController.getChartThemeName()),this.cardItems=[],sm(this.eCardSelector),this.destroyMiniCharts();let{themes:a}=this;
527this.palettes.forEach((e,t)=>{let i=this.activePaletteIndex===t,{fills:o=[],strokes:n=[]}=e,l=!R1(a[t]),h=this.createBean(new L8(this.chartController,o,n,s[t],l,r));this.miniChartsContainers.push(h),this.eMiniChartsContainer.appendChild(h.getGui()),this.addCardLink(t),i?h.updateSelectedMiniChart():h.setDisplayed(!1)}),ss(this.eNavBar,this.palettes.length>1),se(this.cardItems[this.activePaletteIndex],"ag-selected","ag-not-selected")}addCardLink(e){let t=document.createElement("div");t.classList.add("ag-chart-settings-card-item"),this.addManagedElementListeners(t,{click:()=>{this.setActivePalette(e,e<this.activePaletteIndex?"left":"right")}}),this.eCardSelector.appendChild(t),this.cardItems.push(t)}getPrev(){let e=this.activePaletteIndex-1;return e<0&&(e=this.palettes.length-1),e}getNext(){let e=this.activePaletteIndex+1;return e>=this.palettes.length&&(e=0),e}setActivePalette(e,t){if(this.isAnimating||this.activePaletteIndex===e)return;se(this.cardItems[e],"ag-selected","ag-not-selected");let i=this.miniChartsContainers[this.activePaletteIndex],s=i.getGui(),r=this.miniChartsContainers[e],a=r.getGui();i.updateSelectedMiniChart(),r.updateSelectedMiniChart();let o=a.style.left=`${su(this.getGui())*("left"===t?-1:1)}px`;this.activePaletteIndex=e,this.isAnimating=!0;let n="ag-animating";r.setDisplayed(!0),i.addCssClass(n),r.addCssClass(n),this.chartController.setChartThemeName(this.themes[e]),window.setTimeout(()=>{s.style.left=`${-parseFloat(o)}px`,a.style.left="0px"},0),window.setTimeout(()=>{this.isAnimating=!1,i.removeCssClass(n),r.removeCssClass(n),i.setDisplayed(!1)},300)}destroyMiniCharts(){sm(this.eMiniChartsContainer),this.miniChartsContainers=this.destroyBeans(this.miniChartsContainers)}destroy(){this.destroyMiniCharts(),super.destroy()}},L9=class e extends s${constructor(e,t){super(),this.panels=e,this.chartMenuContext=t,this.tabs=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.panels.forEach(e=>{let t=e.replace("chart","").toLowerCase(),i=this.createPanel(t),s=this.createTab(e,t,i);this.tabs.push(s),this.addDestroyFunc(()=>this.destroyBean(i))}),this.tabbedLayout=new AS({items:this.tabs,cssClass:"ag-chart-tabbed-menu",keepScrollPosition:!0,suppressFocusBodyOnOpen:!0,suppressTrapFocus:!0,enableCloseButton:!0,closeButtonAriaLabel:this.chartTranslationService.translate("ariaChartMenuClose"),onCloseClicked:()=>{var e;null==(e=this.eventSource)||e.focus({preventScroll:!0}),this.dispatchLocalEvent({type:"closed"})}}),this.createBean(this.tabbedLayout)}createTab(e,t,i){let s=document.createElement("div");s.classList.add("ag-chart-tab",`ag-chart-${t}`),this.createBean(i),s.appendChild(i.getGui());let r=document.createElement("div"),a=this.chartTranslationService.translate(t);return r.innerText=a,{title:r,titleLabel:a,bodyPromise:rm.resolve(s),getScrollableContainer:()=>s.querySelector(".ag-scrollable-container")||s,name:e}}showTab(e){let t=this.tabs[e];this.tabbedLayout.showItem(t)}getGui(){return this.tabbedLayout&&this.tabbedLayout.getGui()}showMenu(e,t){if(this.eventSource=e,!t){var i;null==(i=this.tabbedLayout)||i.focusHeader(!0)}}destroy(){this.parentComponent&&this.parentComponent.isAlive()&&this.destroyBean(this.parentComponent),super.destroy()}createPanel(t){switch(t){case e.TAB_DATA:return new T_(this.chartMenuContext);case e.TAB_FORMAT:return new Lg(this.chartMenuContext);default:return new L7(this.chartMenuContext.chartController)}}};L9.TAB_DATA="data",L9.TAB_FORMAT="format";var Fe=class extends s${constructor(e,t,i){super('<div class="ag-chart-menu-wrapper"></div>'),this.eChartContainer=e,this.eMenuPanelContainer=t,this.chartMenuContext=i,this.buttons={chartLink:{iconName:"linked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartUnlink:{iconName:"unlinked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartDownload:{iconName:"save",callback:()=>this.chartMenuService.downloadChart(this.chartMenuContext)},chartMenu:{iconName:"menuAlt",callback:e=>this.showMenuList(e)}},this.panels=[],this.menuVisible=!1,this.chartController=i.chartController}wireBeans(e){this.chartMenuService=e.chartMenuService,this.chartMenuListFactory=e.chartMenuListFactory,this.environment=e.environment}postConstruct(){this.chartToolbar=this.createManagedBean(new Tk),this.getGui().appendChild(this.chartToolbar.getGui()),this.refreshToolbarAndPanels(),this.addManagedEventListeners({chartCreated:e=>{if(e.chartId===this.chartController.getChartId()){var t;(null==(t=this.gos.get("chartToolPanelsDef"))?void 0:t.defaultToolPanel)&&this.showMenu({panel:this.defaultPanel,suppressFocus:!0})}}}),this.addManagedListeners(this.chartController,{chartLinkedChanged:this.refreshToolbarAndPanels.bind(this)}),this.refreshMenuClasses(),this.addManagedListeners(this.chartController,{chartApiUpdate:this.refreshToolbarAndPanels.bind(this)})}isVisible(){return this.menuVisible}getExtraPaddingDirections(){return["chartMenu","chartLink","chartUnlink","chartDownload"].some(e=>this.chartToolbarOptions.includes(e))?["top"]:[]}refreshToolbarAndPanels(){this.initToolbarOptionsAndPanels(),this.updateToolbar()}initToolbarOptionsAndPanels(){let{panels:e,defaultPanel:t}=this.chartMenuService.getChartToolPanels(this.chartController);this.panels=e,this.defaultPanel=t,this.chartToolbarOptions=this.chartMenuService.getChartToolbarOptions()}updateToolbar(){let e=this.chartToolbarOptions.map(e=>{let{iconName:t,callback:i}=this.buttons[e];return{buttonName:e,iconName:t,callback:i}});this.chartToolbar.updateParams({buttons:e})}createMenuPanel(e){let t=this.menuPanel=this.createBean(new Am({height:"100%",closable:!0,hideTitleBar:!0,cssIdentifier:"chart-menu"}));return t.setParentComponent(this),this.eMenuPanelContainer.appendChild(t.getGui()),this.tabbedMenu=this.createBean(new L9(this.panels,this.chartMenuContext)),this.addManagedListeners(this.tabbedMenu,{closed:()=>{this.hideMenu()}}),this.addManagedListeners(t,{destroyed:()=>this.destroyBean(this.tabbedMenu)}),new rm(i=>{window.setTimeout(()=>{t.setBodyComponent(this.tabbedMenu),this.tabbedMenu.showTab(e),i(t)},100)})}showContainer(e,t){this.menuPanel&&(this.menuVisible=!0,this.refreshMenuClasses(),this.tabbedMenu.showMenu(e,t))}showMenu(e){let{panel:t,eventSource:i,suppressFocus:s}=null!=e?e:{};if(this.menuPanel&&!t)this.showContainer(i,s);else{let e=t||this.defaultPanel,r=this.panels.indexOf(e);r<0&&(ep(`'${t}' is not a valid Chart Tool Panel name`),r=this.panels.indexOf(this.defaultPanel)),this.menuPanel?(this.tabbedMenu.showTab(r),this.showContainer(i,s)):this.createMenuPanel(r).then(()=>this.showContainer(i,s))}}hideMenu(){this.menuVisible=!1,this.refreshMenuClasses()}refreshMenuClasses(){this.eChartContainer.classList.toggle("ag-chart-menu-visible",this.menuVisible),this.eChartContainer.classList.toggle("ag-chart-menu-hidden",!this.menuVisible)}showMenuList(e){this.chartMenuListFactory.showMenuList({eventSource:e,showMenu:()=>this.showMenu({eventSource:e}),chartMenuContext:this.chartMenuContext})}destroy(){super.destroy(),this.menuPanel&&this.menuPanel.isAlive()&&this.destroyBean(this.menuPanel),this.tabbedMenu&&this.tabbedMenu.isAlive()&&this.destroyBean(this.tabbedMenu)}},Ft=["number","category","time","grouped-category"],Fi=[...Ft,"angle-category","angle-number","radius-category","radius-number"],Fs=class extends tk{constructor(e){super(),this.chartController=e}getChartThemeOverridesProxy(){return{getValue:e=>this.getChartOption(e),setValue:(e,t)=>
527this.setChartThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setChartThemeOverrides(e)}}getAxisThemeOverridesProxy(){return{getValue:e=>this.getAxisProperty(e),setValue:(e,t)=>this.setAxisThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setAxisThemeOverrides(e)}}getCartesianAxisOptionsProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisOptions(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisOptions(e,t)}}getCartesianAxisThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getCartesianAxisAppliedThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisThemeOverride(e,"*"===t?null:t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:"*"===t?null:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getSeriesOptionsProxy(e){return{getValue:(t,i)=>this.getSeriesOption(e(),t,i),setValue:(t,i)=>this.setSeriesOptions(e(),[{expression:t,value:i}]),setValues:t=>this.setSeriesOptions(e(),t)}}getPersistedChartThemeOverrides(e,t,i,s){let r=this.getRetainedChartThemeOverrideKeys(i,s),a=this.getRetainedChartAxisThemeOverrideKeys(null,i,s),o=this.createChartOptions();for(let t of r){let r=this.retrieveChartOptionsThemeOverride(e,i,t);void 0!==r&&this.assignChartOptionsThemeOverride(o,s,t,r)}return t&&this.assignPersistedAxisOverrides({existingAxes:t,retainedChartAxisThemeOverrideKeys:a,existingChartOptions:e,targetChartOptions:o,existingChartType:i,targetChartType:s}),o.theme.overrides}assignPersistedAxisOverrides(e){let{existingAxes:t,retainedChartAxisThemeOverrideKeys:i,existingChartOptions:s,targetChartOptions:r,existingChartType:a,targetChartType:o}=e;for(let{expression:e,targetAxisTypes:n}of i)for(let i of t.map(e=>e.type)){let t=this.retrieveChartOptionsThemeOverride(s,a,["axes",i,e].join("."));if(void 0!==t)for(let i of n)this.assignChartOptionsThemeOverride(r,o,["axes",i,e].join("."),t)}}getRetainedChartThemeOverrideKeys(e,t){let i;return["animation",...(i=[],Rf(RS(e))&&Rf(RS(t))&&i.push("zoom","navigator"),i)]}getRetainedChartAxisThemeOverrideKeys(e,t,i){return Rf(RS(t))&&Rf(RS(i))?this.getRetainedCartesianAxisThemeOverrideKeys(e).map(e=>({expression:e,targetAxisTypes:Ft})):[]}getRetainedCartesianAxisThemeOverrideKeys(e){let t="xAxis"===e?["",".top",".bottom"]:"yAxis"===e?["",".left",".right"]:["",".left",".right",".top",".bottom"],i=[];for(let e of["crosshair"])for(let s of t)i.push(`${e}${s}`);return i}getChartOption(e){return R0(this.getChart(),e,void 0)}setChartThemeOverrides(e){let t=this.getChartType(),i=this.createChartOptions();for(let{expression:s,value:r}of e)this.assignChartOptionsThemeOverride(i,t,s,r);this.applyChartOptions(i)}applyChartOptions(e,t){0===Object.keys(e).length||(this.updateChart(e),null!=t&&t.silent||this.raiseChartOptionsChangedEvent())}awaitChartOptionUpdate(e){this.chartController.getChartProxy().getChart().waitForUpdate().then(()=>e()).catch(e=>eg("chart update failed",e))}getAxisProperty(e){var t;return R0(null==(t=this.getChart().axes)?void 0:t[0],e,void 0)}setAxisThemeOverrides(e){let t=this.getChart(),i=this.getChartType(),s=this.createChartOptions();for(let{expression:a,value:o}of e){var r;let e=null==(r=t.axes)?void 0:r.filter(e=>{let t=a.split("."),i=e;for(let e of t){if(!(e in i))return!1;i=i[e]}return!0});if(e)for(let t of e)this.isValidAxisType(t)&&this.assignChartAxisThemeOverride(s,i,t.type,null,a,o)}this.applyChartOptions(s)}getCartesianAxisProperty(e,t){let i=this.getChartAxes();return R0(this.getCartesianAxis(i,e),t,void 0)}getCartesianAxisThemeOverride(e,t){let i=this.getChartAxes(),s=this.getCartesianAxis(i,e);if(!s||!this.isValidAxisType(s))return;let r=this.getChartType(),a=this.getChart().getOptions();return this.retrieveChartAxisThemeOverride(a,r,s.type,"yAxis"===e?["left","right"]:["bottom","top"],t)}setCartesianAxisThemeOverrides(e,t){let i=this.getChartAxes(),s=this.getCartesianAxis(i,e);if(!s||!this.isValidAxisType(s))return;let r=this.getChartType(),a=this.createChartOptions();for(let{expression:i,value:o}of t)this.assignChartAxisThemeOverride(a,r,s.type,"yAxis"===e?["left","right"]:["bottom","top"],i,o);this.applyChartOptions(a)}setCartesianAxisOptions(e,t){this.updateCartesianAxisOptions(e,(e,i,s)=>{let r=i.indexOf(s);for(let{expression:i,value:s}of t)this.assignChartOption(e,`axes.${r}.${i}`,s)})}updateCartesianAxisOptions(e,t){let i=this.getChart().getOptions(),s="axes"in i?i.axes:void 0;if(!i||!s)return;let r=this.getChartAxes(),a=this.getCartesianAxis(r,e);if(!a)return;let o=this.createChartOptions();o.axes=s,t(o,r,a,i),this.applyChartOptions(o)}setCartesianCategoryAxisType(e,t){this.updateCartesianAxisOptions(e,(i,s,r,a)=>{let o=this.getChartType();this.assignPersistedAxisOverrides({existingAxes:[r],retainedChartAxisThemeOverrideKeys:this.getRetainedChartAxisThemeOverrideKeys(e,o,o),existingChartOptions:a,targetChartOptions:i,existingChartType:o,targetChartType:o}),this.assignChartOption(i,"axes.0.type",t),this.chartController.setCategoryAxisType(t)})}getCartesianAxis(e,t){if(!(e.length<2))switch(t){case"xAxis":return"x"===e[0].direction?e[0]:e[1];case"yAxis":return"y"===e[1].direction?e[1]:e[0]}}getSeriesOption(e,t,i){let s=this.getChart().series.find(t=>{var i,s;return i=e,s=t,!!Rp[i]&&s.type===i});return R0(i?s:null==s?void 0:s.properties.toJson(),t,void 0)}setSeriesOptions(e,t){let i=this.createChartOptions();for(let{expression:s,value:r}of t)this.assignChartOptionsSeriesThemeOverride(i,e,`series.${s}`,r);this.applyChartOptions(i)}getPairedMode(){return this.chartController.getChartProxy().isPaired()}setPairedMode(e){this.chartController.getChartProxy().setPaired(e)}getChartAxes(){var e;return null!=(e=this.getChart().axes)?e:[]}
527retrieveChartAxisThemeOverride(e,t,i,s,r){if(!s)return this.retrieveChartOptionsThemeOverride(e,t,["axes",i,...r?[r]:[]].join("."));for(let a of s){let s=this.retrieveChartOptionsThemeOverride(e,t,["axes",i,a,...r?[r]:[]].join("."));if(void 0!==s)return s}}assignChartAxisThemeOverride(e,t,i,s,r,a){if(s)for(let o of s)this.assignChartOptionsThemeOverride(e,t,["axes",i,o,...r?[r]:[]].join("."),a);else this.assignChartOptionsThemeOverride(e,t,["axes",i,...r?[r]:[]].join("."),a)}isValidAxisType(e){return Fi.includes(e.type)}getChartType(){return this.chartController.getChartType()}getChart(){return this.chartController.getChartProxy().getChart()}updateChart(e){let t=this.chartController.getChartProxy().getChartRef();t.skipAnimations(),t.updateDelta(e)}createChartOptions(){return{theme:{overrides:{}}}}retrieveChartOptionsThemeOverride(e,t,i){for(let s of this.getChartThemeOverridesSeriesTypeKeys(t)){let t=this.retrieveChartOptionsSeriesThemeOverride(e,s,i);if(void 0!==t)return t}}assignChartOptionsThemeOverride(e,t,i,s){for(let r of this.getChartThemeOverridesSeriesTypeKeys(t))this.assignChartOptionsSeriesThemeOverride(e,r,i,s)}retrieveChartOptionsSeriesThemeOverride(e,t,i){return this.retrieveChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."))}assignChartOptionsSeriesThemeOverride(e,t,i,s){this.assignChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."),s)}getChartThemeOverridesSeriesTypeKeys(e){let t=this.chartController.getChartSeriesTypes(e);return this.chartController.isComboChart()&&t.push("common"),t}retrieveChartOption(e,t){return R0(e,t,void 0)}assignChartOption(e,t,i){!function(e,t,i){if(null==e)return;let s=t.split("."),r=e;s.filter(e=>!RJ.has(e)).forEach((e,t)=>{r[e]||(r[e]={}),t<s.length-1&&(r=r[e])}),r[s[s.length-1]]=i}(e,t,i)}raiseChartOptionsChangedEvent(){let e=this.chartController.getChartModel();this.eventService.dispatchEvent({type:"chartOptionsChanged",chartId:e.chartId,chartType:e.chartType,chartThemeName:this.chartController.getChartThemeName(),chartOptions:e.chartOptions})}destroy(){super.destroy()}},Fr=class e extends s${constructor(e){super(`<div class="ag-chart">
528            <div data-ref="eChartContainer" class="ag-chart-components-wrapper ag-chart-menu-hidden">
529                <div data-ref="eChart" class="ag-chart-canvas-wrapper"></div>
530                <div data-ref="eEmpty" class="ag-chart-empty-text ag-unselectable"></div>
531            </div>
532            <div data-ref="eMenuContainer" class="ag-chart-docked-container"></div>
533            </div>`),this.eChart=s_,this.eChartContainer=s_,this.eMenuContainer=s_,this.eEmpty=s_,this.params=e}wireBeans(e){this.crossFilterService=e.chartCrossFilterService,this.chartTranslationService=e.chartTranslationService,this.chartMenuService=e.chartMenuService,this.focusService=e.focusService,this.popupService=e.popupService}postConstruct(){let e={...this.params,chartType:Rw(this.params.chartType),chartThemeName:this.getThemeName()},t=this.gos.get("enableRtl");this.addCssClass(t?"ag-rtl":"ag-ltr");let i=this.createBean(new R7(e));this.chartController=this.createManagedBean(new Tl(i)),this.chartOptionsService=this.createManagedBean(new Fs(this.chartController)),this.validateCustomThemes(),this.createChart(),this.params.insideDialog&&this.addDialog(),this.addMenu(),this.addManagedElementListeners(this.getGui(),{focusin:this.setActiveChartCellRange.bind(this)}),this.addManagedListeners(this.chartController,{chartModelUpdate:this.update.bind(this)}),this.addManagedPropertyListeners(["chartThemeOverrides","chartThemes"],this.reactivePropertyUpdate.bind(this)),this.update(),this.raiseChartCreatedEvent()}createChart(){var t;let i;this.chartProxy&&(i=this.chartProxy.destroy({keepChartInstance:!0}));let s=(e,t)=>{this.params.crossFilteringContext.lastSelectedChartId=t?"":this.chartController.getChartId(),t&&this.params.crossFilteringResetCallback(),this.crossFilterService.filter(e,t)},r=this.chartController.getChartType(),a={chartType:r,chartInstance:i,getChartThemeName:this.getChartThemeName.bind(this),getChartThemes:this.getChartThemes.bind(this),customChartThemes:this.gos.get("customChartThemes"),getGridOptionsChartThemeOverrides:()=>this.getGridOptionsChartThemeOverrides(),getExtraPaddingDirections:()=>{var e,t;return null!=(e=null==(t=this.chartMenu)?void 0:t.getExtraPaddingDirections())?e:[]},apiChartThemeOverrides:this.params.chartThemeOverrides,crossFiltering:null!=(t=this.params.crossFiltering)&&t,crossFilterCallback:s,parentElement:this.eChart,grouping:this.chartController.isGrouping(),chartThemeToRestore:this.params.chartThemeName,chartOptionsToRestore:this.params.chartOptionsToRestore,chartPaletteToRestore:this.params.chartPaletteToRestore,seriesChartTypes:this.chartController.getSeriesChartTypes(),translate:e=>this.chartTranslationService.translate(e)};(this.params.chartOptionsToRestore=void 0,this.chartType=r,this.chartProxy=e.createChartProxy(a),this.chartProxy)?(this.chartController.setChartProxy(this.chartProxy),this.createMenuContext()):ep("invalid chart type supplied: "+a.chartType)}createMenuContext(){if(this.chartMenuContext)return;let e=this.createManagedBean(new TV(this.chartOptionsService.getChartThemeOverridesProxy())),t=this.createManagedBean(new TV(this.chartOptionsService.getAxisThemeOverridesProxy()));this.chartMenuContext={chartController:this.chartController,chartOptionsService:this.chartOptionsService,chartMenuParamsFactory:e,chartAxisMenuParamsFactory:t}}getChartThemeName(){return this.chartController.getChartThemeName()}getChartThemes(){return this.chartController.getThemeNames()}getGridOptionsChartThemeOverrides(){return this.gos.get("chartThemeOverrides")}static createChartProxy(e){switch(e.chartType){case"column":case"bar":case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":return new Tv(e);case"pie":case"donut":case"doughnut":return new TE(e);case"area":case"stackedArea":case"normalizedArea":return new Tc(e);case"line":return new TC(e);case"scatter":case"bubble":return new Ty(e);case"histogram":return new Tf(e);case"radarLine":case"radarArea":case"nightingale":case"radialColumn":case"radialBar":return new TI(e);case"rangeBar":case"rangeArea":return new TP(e);case"boxPlot":return new TF(e);case"treemap":case"sunburst":return new TD(e);case"heatmap":return new TA(e);case"waterfall":return new Tw(e);case"columnLineCombo":case"areaColumnCombo":case"customCombo":return new Tb(e);
533default:throw`AG Grid: Unable to create chart as an invalid chartType = '${e.chartType}' was supplied.`}}addDialog(){let e=this.chartTranslationService.translate(this.params.pivotChart?"pivotChartTitle":"rangeChartTitle"),{width:t,height:i}=this.getBestDialogSize(),s=this.params.focusDialogOnOpen?()=>setTimeout(()=>this.focusService.focusInto(this.getGui())):void 0;this.chartDialog=new Av({resizable:!0,movable:!0,maximizable:!0,title:e,width:t,height:i,component:this,centered:!0,closable:!0,afterGuiAttached:s,postProcessPopupParams:{type:"chart"}}),this.createBean(this.chartDialog),this.chartDialog.addEventListener("destroyed",()=>{this.destroy(),this.chartMenuService.hideAdvancedSettings();let e=this.focusService.getFocusedCell();setTimeout(()=>{this.focusService.isAlive()&&(e?this.focusService.setFocusedCell({...e,forceBrowserFocus:!0}):this.focusService.focusGridInnerElement())})})}getBestDialogSize(){let e=this.popupService.getPopupParent(),t=.75*su(e),i=.75*sd(e),s=this.chartProxy.getChart(),r=this.params.insideDialog?850:s.width,a=this.params.insideDialog?470:s.height;return(r>t||a>i)&&(a=Math.round(.553*(r=Math.min(r,t))))>i&&(r=Math.min(r,Math.round((a=i)/.553))),{width:r,height:a}}addMenu(){this.params.crossFiltering||(this.chartMenu=this.createBean(new Fe(this.eChartContainer,this.eMenuContainer,this.chartMenuContext)),this.eChartContainer.appendChild(this.chartMenu.getGui()))}update(e){let t,i,s,r;if(null!=e&&e.chartId&&!this.chartController.update(e))return;let a=this.chartTypeChanged(e),o=a||this.chartEmpty?(t=this.chartType,s=null==(i=this.chartProxy.getChart())?void 0:i.getOptions(),r=null==i?void 0:i.axes,this.chartOptionsService.getPersistedChartThemeOverrides(s,r,t,null!=a?a:t)):void 0;a&&this.createChart(),o&&null!=e&&e.chartThemeOverrides&&tX(o,e.chartThemeOverrides);let n=null!=o?o:null==e?void 0:e.chartThemeOverrides;this.updateChart(n),null!=e&&e.chartId&&this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartApiUpdateEvent()})}updateChart(e){let{chartProxy:t}=this,i=this.chartController.getSelectedValueColState(),s=this.chartController.getChartData(),r=this.handleEmptyChart(s,i.length);if(this.chartEmpty=r,r){e&&this.chartController.updateThemeOverrides(e);return}let a=this.chartController.getChartUpdateParams(e);t.update(a),this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartUpdatedEvent()})}chartTypeChanged(e){let[t,i]=[this.chartController.getChartType(),null==e?void 0:e.chartType],s=i?Rw(i):void 0;return this.chartType!==t?null!=s?s:t:s&&t!==s?s:null}getChartModel(){return this.chartController.getChartModel()}getChartImageDataURL(e){return this.chartProxy.getChartImageDataURL(e)}handleEmptyChart(e,t){let i=this.chartController.isPivotChart()&&!this.chartController.isPivotMode(),s=this.chartController.getChartType(),r=1;this.chartController.isActiveXYChart()?r="bubble"===s?3:2:Ry(RS(s))&&(r=0);let a=t<r||0===e.length;if(this.eChart){let e=i||a;ss(this.eChart,!e),ss(this.eEmpty,e)}return i?(this.eEmpty.innerText=this.chartTranslationService.translate("pivotChartRequiresPivotMode"),!0):!!a&&(this.eEmpty.innerText=this.chartTranslationService.translate("noDataToChart"),!0)}downloadChart(e,t,i){this.chartProxy.downloadChart(e,t,i)}openChartToolPanel(e){let t=e?RK[e]:e;this.chartMenu.showMenu({panel:t})}closeChartToolPanel(){this.chartMenu.hideMenu()}getChartId(){return this.chartController.getChartId()}getUnderlyingChart(){return this.chartProxy.getChartRef()}crossFilteringReset(){this.chartProxy.crossFilteringReset()}setActiveChartCellRange(e){this.getGui().contains(e.relatedTarget)||(this.chartController.setChartRange(!0),this.focusService.clearFocusedCell())}getThemeName(){let e=this.gos.get("chartThemes")||Tn;if(0===e.length)throw Error("Cannot create chart: no chart themes available.");let{chartThemeName:t}=this.params;return tS(e,t)?t:e[0]}getAllKeysInObjects(e){let t={};return e.filter(e=>null!=e).forEach(e=>{Object.keys(e).forEach(e=>t[e]=null)}),Object.keys(t)}validateCustomThemes(){let e=this.getChartThemes(),t=this.gos.get("customChartThemes");
533t&&this.getAllKeysInObjects([t]).forEach(t=>{tS(e,t)||ep("a custom chart theme with the name '"+t+"' has been supplied but not added to the 'chartThemes' list")})}reactivePropertyUpdate(){this.chartController.setChartThemeName(this.getThemeName(),!0);let e=this.getChartId(),t=this.chartController.isCrossFilterChart()?"crossFilter":this.getChartModel().modelType,i=this.gos.get("chartThemeOverrides")||{};this.update({type:`${t}ChartUpdate`,chartId:e,chartThemeOverrides:i})}raiseChartCreatedEvent(){this.chartProxy.getChart().waitForUpdate().then(()=>{this.eventService.dispatchEvent({type:"chartCreated",chartId:this.chartController.getChartId()})})}raiseChartDestroyedEvent(){this.eventService.dispatchEvent({type:"chartDestroyed",chartId:this.chartController.getChartId()})}destroy(){var e;super.destroy(),this.chartProxy&&this.chartProxy.destroy(),this.destroyBean(this.chartMenu),this.chartDialog&&this.chartDialog.isAlive()&&this.destroyBean(this.chartDialog),null==(e=this.onDestroyColorSchemeChangeListener)||e.call(this);let t=this.getGui();sm(t),sv(t),this.raiseChartDestroyedEvent()}};function Fa(e){return e=FD("chartOptions.legend.item.marker.type","shape",e),e=FD("chartOptions.seriesDefaults.marker.type","shape",e),e=FD("chartOptions.legend.padding","spacing",e)}function Fo(e){var t;let{chartType:i,chartPalette:s,chartOptions:{xAxis:r,yAxis:a,...o},...n}=e=FE("chartOptions.seriesDefaults.marker.minSize",e),l=function(e){switch(e){case"bar":case"stackedBar":case"normalizedBar":return["number","category"];case"groupedBar":return["number","grouped-category"];case"column":case"stackedColumn":case"normalizedColumn":case"line":case"area":case"stackedArea":case"normalizedArea":case"histogram":return["category","number"];case"groupedColumn":return["grouped-category","number"];case"scatter":case"bubble":return["number","number"];default:return}}(i),h=null==l?void 0:l.map((e,t)=>({type:e,...0===t?r:a}));return{chartType:i,chartThemeName:null!=(t=({borneo:"ag-default",material:"ag-material",bright:"ag-vivid"})[s])?t:"ag-default",chartOptions:{...o,axes:h,xAxis:r,yAxis:a},...n}}function Fn(e){return FD("chartOptions.seriesDefaults.label.minRequiredA
533ngle","minAngle",e)}function Fl(e){return e=FE("chart",e=FA("chartOptions.seriesDefaults.highlightStyle",e,({dimOpacity:e,...t})=>({...t,...null!=e?{series:{dimOpacity:e}}:{}}))),e=FE("chartOptions.seriesDefaults.tooltipClass",e),e=Fb("chartOptions.axes[].label.rotation",0,e=FE("chartOptions.seriesDefaults.tooltipTracking",e)),e=Fb("chartOptions.axes[].label.rotation",335,e)}function Fh(e){let t=({item:e,series:t,...i})=>({item:{...i,...e},...t?{series:t}:{}});return e=FA("chartOptions.seriesDefaults.highlightStyle",e,t),e=FA("chartOptions.series[].highlightStyle",e,t)}function Fd(e){e=Fx("chartOptions.seriesDefaults.fill.opacity","chartOptions.seriesDefaults.fillOpacity",e),e=Fx("chartOptions.seriesDefaults.stroke.opacity","chartOptions.seriesDefaults.strokeOpacity",e),e=FE("chartOptions.seriesDefaults.fill",e=Fx("chartOptions.seriesDefaults.stroke.width","chartOptions.seriesDefaults.strokeWidth",e)),e=FE("chartOptions.seriesDefaults.stroke",e),e=FE("chartOptions.seriesDefaults.callout.colors",e),e=FE("chartOptions.xAxis",e);let{chartType:t,chartOptions:{axes:i,series:s,seriesDefaults:r,...a},...o}=e=FE("chartOptions.yAxis",e),n=Rw(t),l=RS(n),h=[l],d={};if(!Rx(l)){let e={top:{},bottom:{},left:{},right:{}},t=i.map(({type:t,...i})=>({[t]:{...e,...i}})).reduce(FR,{});RX.filter(e=>null==t[e]).forEach(i=>{t[i]={...e}}),d.axes=t}let u=h.map(e=>({[e]:{...d,series:r,...a}})).reduce(FR,{});return{...o,chartType:n,chartOptions:u}}function Fu(e){return e=FE("chartOptions.*.title.padding",e),e=FE("chartOptions.*.subtitle.padding",e),e=FS("chartOptions.*.axes.*.title.enabled",!1,e=FE("chartOptions.*.axes.*.title.padding",e))}function Fc(e){return e=FD("chartOptions.pie.series.callout","calloutLine",e),e=FD("chartOptions.pie.series.label","calloutLabel",e),e=FD("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=FD("chartOptions.pie.series.labelName","sectorLabelName",e),e=FD("chartOptions.donut.series.callout","calloutLine",e),e=FD("chartOptions.donut.series.label","calloutLabel",e),e=FD("chartOptions.donut.series.labelKey","sectorLabelKey",e),e=FD("chartOptions.donut.series.labelName","sectorLabelName",e)}function Fp(e){return e=FM("chartOptions.scatter.series.fill","chartOptions.scatter.series.marker.fill",e),e=FM("chartOptions.scatter.series.fillOpacity","chartOptions.scatter.series.marker.fillOpacity",e),e=FM("chartOptions.scatter.series.stroke","chartOptions.scatter.series.marker.stroke",e),e=FM("chartOptions.scatter.series.strokeOpacity","chartOptions.scatter.series.marker.strokeOpacity",e),e=Fx("chartOptions.scatter.series.paired","chartOptions.scatter.paired",e=FM("chartOptions.scatter.series.strokeWidth","chartOptions.scatter.series.marker.strokeWidth",e))}function Fg(e){return FE("chartOptions.axes[].tick.count",e)}function Fm(e){return FA("chartOptions.*.tooltip",e,({tracking:e,...t})=>{let i={...t};return!1===e?(null!=i.position||(i.position={type:"pointer"}),null!=i.range||(i.range="nearest")):!0===e&&(null!=i.position||(i.position={type:"node"}),null!=i.range||(i.range="nearest")),i})}function Fv(e){return e=FD("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=FS("chartOptions.common.legend.position","right",e=function e(t,i,s){"string"==typeof t&&(t=t.split("."));let r=t[0];if(t.length>1){var a;s[r]=e(t.slice(1),i,null!=(a=s[r])?a:{})}return Object.keys(s).includes(r)||(s[r]=i),s}("chartOptions.common.legend.enabled",!0,e=FE("chartOptions.*.series.flipXY",e=Fm(e=Fg(e=FD("chartOptions.pie.series.labelName","sectorLabelName",e))))))}function Ff(e){let t=FD("chartOptions.column","bar",e),i={"ag-pastel":"ag-sheets","ag-solar":"ag-polychroma"}[t.chartThemeName]||t.chartThemeName;return{...t,chartThemeName:i}}function FC(e){return FI("chartOptions.*.autoSize",!0,e,(e,t)=>{!0===e[t]||!1===e[t]&&(e.minHeight=600,e.minWidth=300),delete e[t]})}function Fy(e,t,i){if(Fw(e)>Fw(t.version)){let s=i(t);return s.version=e,s}return t}function Fw(e){let{major:t,minor:i,patch:s}=function(e){let t="string"==typeof e?e.split(".").map(e=>Number(e)):[];if(3!==t.length||t.some(e=>isNaN(e)))throw Error("AG Grid - Illegal version string: "+e);return{major:t[0],minor:t[1],patch:t[2]}}(e);return 1e4*t+100*i+s}function Fb(e,t,i){return FI(e,!0,i,(e,i)=>{e[i]===t&&delete e[i]})}function FS(e,t,i){return FI(e,!1,i,(e,i)=>{null==e[i]&&(e[i]=t)})}function Fx(e,t,i){let s,r=!1;return(i=FI(e,!0,i,(e,t)=>{r=!0,s=e[t],delete e[t]}),r)?FI(t,!1,i,(e,t)=>{e[t]=s}):i}function FM(e,t,i){let s,r=!1;return(i=FI(e,!0,i,(e,t)=>{r=!0,s=e[t],delete e[t]}),r)?FI(t,!1,i,(e,t)=>{void 0===e[t]&&(e[t]=s)}):i}function FD(e,t,i){return FI(e,!0,i,(e,i)=>{e[t]=e[i],delete e[i]})}function FE(e,t){return FI(e,!0,t,(e,t)=>delete e[t])}function FI(e,t,i,s){let r=e instanceof Array?e:e.split("."),a=r.slice(0,r.length-1),o=r[r.length-1];return FA(a,i,e=>{let i=Object.keys(e).includes(o);if(t&&!i)return e;let r={...e};return s(r,o),r})}function FA(e,t,i){let s=e instanceof Array?e:e.split(".");if(t={...t},0===s.length)return i(t);if(s[0].startsWith("{"))for(let e of s[0].substring(1,s[0].lastIndexOf("}")).split(","))null!=t[e]&&(t[e]=FA(s.slice(1),t[e],i));else if(s[0].endsWith("[]")){let r=s[0].substring(0,e[0].indexOf("["));t[r]instanceof Array&&(t[r]=t[r].map(e=>FA(s.slice(1),e,i)))}else if("*"===s[0])for(let e in t)t[e]=FA(s.slice(1),t[e],i);else null!=t[s[0]]&&(t[s[0]]=FA(s.slice(1),t[s[0]],i));return t}var FR=(e,t)=>({...e,...t}),FT=class extends tk{constructor(){super(...arguments),this.beanName="
533chartService",this.activeCharts=new Set,this.activeChartComps=new Set,this.crossFilteringContext={lastSelectedChartId:""},this.isEnterprise=()=>IR.enterpriseModule.isEnterprise}wireBeans(e){this.visibleColsService=e.visibleColsService,this.rangeService=e.rangeService,this.environment=e.environment,this.focusService=e.focusService}updateChart(e){if(0===this.activeChartComps.size)return void ep("No active charts to update.");let t=[...this.activeChartComps].find(t=>t.getChartId()===e.chartId);t?t.update(e):ep(`Unable to update chart. No active chart found with ID: ${e.chartId}.`)}getChartModels(){let e=[];return this.activeChartComps.forEach(t=>e.push({...t.getChartModel(),version:RQ})),e}getChartRef(e){let t;return this.activeCharts.forEach(i=>{i.chartId===e&&(t=i)}),t}getChartComp(e){let t;return this.activeChartComps.forEach(i=>{i.getChartId()===e&&(t=i)}),t}getChartImageDataURL(e){let t;return this.activeChartComps.forEach(i=>{i.getChartId()===e.chartId&&(t=i.getChartImageDataURL(e.fileFormat))}),t}downloadChart(e){let t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e.chartId);null==t||t.downloadChart(e.dimensions,e.fileName,e.fileFormat)}openChartToolPanel(e){let t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e.chartId);null==t||t.openChartToolPanel(e.panel)}closeChartToolPanel(e){let t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e);null==t||t.closeChartToolPanel()}createChartFromCurrentRange(e="groupedColumn",t){let i=this.getSelectedRange();return this.createChart({cellRange:i,chartType:e,focusDialogOnOpen:!t})}restoreChart(e,t){var i,s;let r,a,o,n;if(!e)return void ep("unable to restore chart as no chart model is provided");if(e.version!==RQ&&((i=e).version,null==i.version&&(i.version=function(e){var t;if(null!=e.version)return e.version;let i=(e,...t)=>Object.keys(e||{}).some(e=>t.includes(e)),s=e.chartOptions,r=i(s,"seriesDefaults")?null==s?void 0:s.seriesDefaults:null==s?void 0:s[Object.keys(s)[0]],[a="27.1.0"]=Object.entries({"27.0.0":i(e,"seriesChartTypes"),"26.2.0":!i(s,"seriesDefaults"),"26.1.0":i(null==r?void 0:r.highlightStyle,"item"),"26.0.0":i(null==r?void 0:r.highlightStyle,"series"),"25.1.0":i(null==r?void 0:r.label,"minAngle"),"25.0.0":i(e,"modelType","aggFunc","unlinkChart","suppressChartRanges")||i(r,"lineDash","lineDashOffset"),"24.0.0":i(e,"chartThemeName","chart")||i(s,"series"),"23.2.0":i(s,"navigator"),"23.0.0":i(null==s||null==(t=s.legend)||null==(t=t.item)?void 0:t.marker,"shape"),"22.1.0":i(e,"chartPalette","chartType")}).filter(([e,t])=>t)[0];return a}(i)),i=Fy("23.0.0",i,Fa),i=Fy("24.0.0",i,Fo),i=Fy("25.1.0",i,Fn),i=Fy("26.0.0",i,Fl),i=Fy("26.1.0",i,Fh),i=Fy("26.2.0",i,Fd),i=Fy("28.0.0",i,Fu),i=Fy("28.2.0",i,Fc),i=Fy("29.0.0",i,Fp),i=Fy("29.1.0",i,Fg),i=Fy("29.2.0",i,Fm),i=Fy("30.0.0",i,Fv),i=Fy("31.0.0",i,Ff),s=FE("chartOptions.*.width",s=i=Fy("32.0.0",i,FC)),e=i=Fy(RQ,i=s=FS("chartOptions.*.axes.category.label.autoRotate",!0,s=FE("chartOptions.*.height",s)),e=>e)),"pivot"===e.modelType?(this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"}),r=this.createCellRange(void 0,!0),a=!0,o=!0):(r=this.createCellRange(e.cellRange),n=e.chartPalette,o=e.suppressChartRanges),r)return this.createChart({...e,cellRange:r,pivotChart:a,suppressChartRanges:o,chartContainer:t,chartOptionsToRestore:e.chartOptions,chartPaletteToRestore:n})}createRangeChart(e,t){let i=this.createCellRange(e.cellRange);if(i)return this.createChart({...e,cellRange:i,focusDialogOnOpen:!t})}createPivotChart(e,t){this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"});let i=this.createCellRange(void 0,!0);if(i)return this.createChart({...e,cellRange:i,pivotChart:!0,suppressChartRanges:!0,focusDialogOnOpen:!t})}createCrossFilterChart(e,t){let i=this.createCellRange(e.cellRange);if(!i)return;let s=void 0===e.suppressChartRanges||null===e.suppressChartRanges||e.suppressChartRanges;return this.createChart({...e,cellRange:i,suppressChartRanges:s,crossFiltering:!0,focusDialogOnOpen:!t})}createChart(e){let t=Ta.validateCreateParams(e);if(!t)return;let{chartType:i,chartContainer:s}=e=!0===t?e:t,r=this.gos.getCallback("createChartContainer"),a=new Fr({...e,chartId:this.generateId(),chartType:Rw(i),insideDialog:!(s||r),crossFilteringContext:this.crossFilteringContext,crossFilteringResetCallback:()=>
533this.activeChartComps.forEach(e=>e.crossFilteringReset())});this.createBean(a);let o=this.createChartRef(a);return s?(s.appendChild(a.getGui()),this.environment.applyThemeClasses(s)):r?r(o):a.addEventListener("destroyed",()=>{this.activeChartComps.delete(a),this.activeCharts.delete(o)}),o}createChartRef(e){let t={destroyChart:()=>{this.activeCharts.has(t)&&(this.destroyBean(e),this.activeChartComps.delete(e),this.activeCharts.delete(t))},focusChart:()=>{this.focusService.focusInto(e.getGui())},chartElement:e.getGui(),chart:e.getUnderlyingChart(),chartId:e.getChartModel().chartId};return this.activeCharts.add(t),this.activeChartComps.add(e),t}getSelectedRange(){var e,t;let i=null!=(e=null==(t=this.rangeService)?void 0:t.getCellRanges())?e:[];return i.length>0?i[0]:{columns:[]}}generateId(){return`id-${Math.random().toString(36).substring(2,18)}`}createCellRange(e,t){var i;let s=t?{rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.visibleColsService.getAllCols().map(e=>e.getColId())}:e,r=s&&(null==(i=this.rangeService)?void 0:i.createPartialCellRangeFromRangeParams(s,!0));return r||ep(`unable to create chart as ${t?"there are no columns in the grid":"no range is selected"}.`),r}destroy(){this.activeCharts.forEach(e=>e.destroyChart()),super.destroy()}};function FL(e){return e&&e.match(/\d+\.\d+\.\d+/)}function FF({type:e,gridVersion:t,chartsVersion:i}){let s="AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.";if(!t)return s;let r=function(e){if(!e||!FL(e))return;let[t,i]=e.split(".")||[],s=`${t}.${i}.x`,r=parseInt(t,10)-28+6;if(!(r<0))return{gridMajorMinor:s,chartsMajorMinor:`${r}.${i}.x`}}(t);if(!r)return s;let{gridMajorMinor:a,chartsMajorMinor:o}=r;return"incompatible"===e?`AG Grid version ${t} and AG Charts version ${i} is not supported. AG Grid version ${a} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:"invalidCharts"===e?`AG Grid version ${a} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:s}FT.CHARTS_VERSION=Cm;var FP={version:RQ,validate:()=>(function({gridVersion:e,chartsVersion:t}){if(!FL(t))return{isValid:!1,message:FF({type:"invalidCharts",gridVersion:e,chartsVersion:t})};if(!FL(e))return{isValid:!1,message:FF({type:"invalidGrid",gridVersion:e,chartsVersion:t})};let[i,s]=e.split(".")||[],[r,a,o]=t.split(".")||[],n=function({gridMajorVersion:e,chartsMajorVersion:t}){let i=parseInt(e,10),s=parseInt(t,10),r=i-28;return r===s-6&&r>=0}({gridMajorVersion:i,chartsMajorVersion:r});return n&&s===a||o.includes("beta")?{isValid:!0}:n&&s===a?{isValid:!1,message:FF({type:"invalid",gridVersion:e,chartsVersion:t})}:{isValid:!1,message:FF({type:"incompatible",gridVersion:e,chartsVersion:t})}})({gridVersion:RQ,chartsVersion:FT.CHARTS_VERSION}),moduleName:`${eh.GridChartsModule}-core`,beans:[FT,Rq,R$,RU,RZ,Rj],userComponents:[{name:"agMenuItem",classImp:I7}],dependantModules:[Rc,I9]},Fk={version:RQ,moduleName:`${eh.GridChartsModule}-api`,apiFunctions:{getChartModels:function(e){return e.frameworkOverrides.wrapIncoming(()=>{var t;return null==(t=e.chartService)?void 0:t.getChartModels()})},getChartRef:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.getChartRef(t)})},getChartImageDataURL:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.getChartImageDataURL(t)})},downloadChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.downloadChart(t)})},openChartToolPanel:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.openChartToolPanel(t)})},closeChartToolPanel:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.closeChartToolPanel(t.chartId)})},createRangeChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.createRangeChart(t,!0)})},createPivotChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.createPivotChart(t,!0)})},createCrossFilterChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.createCrossFilterChart(t,!0)})},updateChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i;return null==(i=e.chartService)?void 0:i.updateChart(t)})},restoreChart:function(e,t,i){return e.frameworkOverrides.wrapIncoming(()=>{var s;return null==(s=e.chartService)?void 0:s.restoreChart(t,i)})}},dependantModules:[FP]},FN={version:RQ,moduleName:eh.GridChartsModule,dependantModules:[FP,Fk]},FO={time:u2,AgCharts:Ih},FG="paste",FB="dragCopy",Fz="clipboard",FV=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.`,FH=class e extends tk{constructor(){super(...arguments),this.beanName="
533clipboardService",this.lastPasteOperationTime=0,this.navigatorApiFailed=!1}wireBeans(e){this.csvCreator=e.csvCreator,this.selectionService=e.selectionService,this.rowModel=e.rowModel,this.ctrlsService=e.ctrlsService,this.valueService=e.valueService,this.focusService=e.focusService,this.rowRenderer=e.rowRenderer,this.visibleColsService=e.visibleColsService,this.funcColsService=e.funcColsService,this.cellNavigationService=e.cellNavigationService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.rangeService=e.rangeService}postConstruct(){eN(this.gos)&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(this,e=>{this.gridCtrl=e.gridCtrl})}pasteFromClipboard(){!this.gos.get("suppressClipboardApi")&&!this.navigatorApiFailed&&navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch(e=>{ep(`${e}
534${FV("readText")}`),this.navigatorApiFailed=!0,this.pasteFromClipboardLegacy()}):this.pasteFromClipboardLegacy()}pasteFromClipboardLegacy(){let e=!1,t=t=>{let i=(new Date).getTime();i-this.lastPasteOperationTime<50&&(e=!0,t.preventDefault()),this.lastPasteOperationTime=i};this.executeOnTempElement(e=>{e.addEventListener("paste",t),e.focus({preventScroll:!0})},i=>{let s=i.value;e?this.refocusLastFocusedCell():this.processClipboardData(s),i.removeEventListener("paste",t)})}refocusLastFocusedCell(){let e=this.focusService.getFocusedCell();e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0})}getClipboardDelimiter(){let e=this.gos.get("clipboardDelimiter");return eM(e)?e:"	"}processClipboardData(t){if(null==t)return;let i=e.stringToArray(t,this.getClipboardDelimiter()),s=this.gos.getCallback("processDataFromClipboard");if(s&&(i=s({data:i})),null==i)return;this.gos.get("suppressLastEmptyLineOnPaste")&&this.removeLastLineIfBlank(i);let r=(e,t,s,r)=>{var a;(null==(a=this.rangeService)?void 0:a.isMoreThanOneCell())&&!this.hasOnlyOneValueToPaste(i)?this.pasteIntoActiveRange(this.rangeService,i,e,t,r):this.pasteStartingFromFocusedCell(i,e,t,s,r)};this.doPasteOperation(r)}static stringToArray(e,t=","){let i=[],s=e=>`\r`===e||`
535`===e,r=!1;if(""===e)return[[""]];for(let a=0,o=0,n=0;n<e.length;n++){let l=e[n-1],h=e[n],d=e[n+1],u=()=>{i[a]||(i[a]=[]),i[a][o]||(i[a][o]="")};if(u(),'"'===h&&(r?'"'===d?(i[a][o]+='"',n++):r=!1:(void 0===l||l===t||s(l))&&(r=!0)),!r&&'"'!==h){if(h===t){o++,u();continue}else if(s(h)){o=0,a++,u(),`\r`===h&&`
536`===d&&n++;continue}}i[a][o]+=h}return i}doPasteOperation(e){let t,i="clipboard";this.eventService.dispatchEvent({type:"pasteStart",source:i}),this.clientSideRowModel&&(t=new hQ(this.gos.get("aggregateOnlyChangedColumns"),this.clientSideRowModel.getRootNode()));let s={},r=[];e(s,r,this.focusService.getFocusedCell(),t);let a=[...r];t&&(this.clientSideRowModel.doAggregate(t),t.forEachChangedNodeDepthFirst(e=>{a.push(e)})),this.rowRenderer.refreshCells({rowNodes:a}),this.dispatchFlashCells(s),this.fireRowChanged(r),this.refocusLastFocusedCell(),this.eventService.dispatchEvent({type:"pasteEnd",source:i})}pasteIntoActiveRange(e,t,i,s,r){let a=this.getRangeSize(e)%t.length!=0,o=0,n=0,l=(e,l,h,d)=>{if(d-o>=t.length){if(a)return;o+=n,n=0}let u=t[d-o];s.push(l);let c=this.gos.getCallback("processCellFromClipboard");h.forEach((t,s)=>{if(!t.isCellEditable(l)||t.isSuppressPaste(l))return;s>=u.length&&(s%=u.length);let a=this.processCell(l,t,u[s],FB,c,!0);l.setDataValue(t,a,FG),r&&r.addParentNode(l.parent,[t]);let{rowIndex:o,rowPinned:n}=e;i[this.cellPositionUtils.createIdFromValues({rowIndex:o,column:t,rowPinned:n})]=!0}),n++};this.iterateActiveRanges(!1,l)}getDisplayedColumnsStartingAt(e){let t=e,i=[];for(;null!=t;)i.push(t),t=this.visibleColsService.getColAfter(t);return i}pasteStartingFromFocusedCell(e,t,i,s,r){if(!s)return;let a={rowIndex:s.rowIndex,rowPinned:s.rowPinned},o=this.getDisplayedColumnsStartingAt(s.column);this.isPasteSingleValueIntoRange(e)?this.pasteSingleValueIntoRange(e,i,t,r):this.pasteMultipleValues(e,a,i,o,t,Fz,r)}isPasteSingleValueIntoRange(e){return this.hasOnlyOneValueToPaste(e)&&null!=this.rangeService&&!this.rangeService.isEmpty()}pasteSingleValueIntoRange(e,t,i,s){let r=e[0][0],a=(e,a,o)=>
536{t.push(a),o.forEach(e=>this.updateCellValue(a,e,r,i,Fz,s))};this.iterateActiveRanges(!1,a)}hasOnlyOneValueToPaste(e){return 1===e.length&&1===e[0].length}copyRangeDown(){if(!this.rangeService||this.rangeService.isEmpty())return;let e=[],t=(t,i,s,r)=>{let a=this.gos.getCallback("processCellForClipboard"),o=this.gos.getCallback("processCellFromClipboard"),n=(s,n,l)=>{e.length?(i.push(n),l.forEach((i,a)=>{if(!i.isCellEditable(n)||i.isSuppressPaste(n))return;let l=this.processCell(n,i,e[a],FB,o,!0);n.setDataValue(i,l,FG),r&&r.addParentNode(n.parent,[i]);let{rowIndex:h,rowPinned:d}=s;t[this.cellPositionUtils.createIdFromValues({rowIndex:h,column:i,rowPinned:d})]=!0})):l.forEach(t=>{let i=this.processCell(n,t,this.valueService.getValue(t,n),FB,a,!1,!0);e.push(i)})};this.iterateActiveRanges(!0,n)};this.doPasteOperation(t)}removeLastLineIfBlank(e){let t=tp(e);if(t&&1===t.length&&""===t[0]){if(1===e.length)return;tC(e,t)}}fireRowChanged(e){"fullRow"===this.gos.get("editType")&&e.forEach(e=>{this.eventService.dispatchEvent({type:"rowValueChanged",node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})})}pasteMultipleValues(e,t,i,s,r,a,o){let n=t,l=null!=this.clientSideRowModel&&!this.gos.get("enableGroupEdit")&&!this.gos.get("treeData"),h=()=>{for(;;){if(!n)return null;let e=this.rowPositionUtils.getRowNode(n);if(n=this.cellNavigationService.getRowBelow({rowPinned:n.rowPinned,rowIndex:n.rowIndex}),null==e)return null;if(!(e.detail||e.footer||l&&e.group))return e}};e.forEach(e=>{let t=h();t&&(e.forEach((e,i)=>this.updateCellValue(t,s[i],e,r,a,o)),i.push(t))})}updateCellValue(e,t,i,s,r,a){if(!e||!t||!t.isCellEditable(e)||t.isSuppressPaste(e))return;let o=this.processCell(e,t,i,r,this.gos.getCallback("processCellFromClipboard"),!0);e.setDataValue(t,o,FG);let{rowIndex:n,rowPinned:l}=e;s[this.cellPositionUtils.createIdFromValues({rowIndex:n,column:t,rowPinned:l})]=!0,a&&a.addParentNode(e.parent,[t])}copyToClipboard(e={}){this.copyOrCutToClipboard(e)}cutToClipboard(e={},t="api"){this.gos.get("suppressCutToClipboard")||(this.eventService.dispatchEvent({type:"cutStart",source:t}),this.copyOrCutToClipboard(e,!0),this.eventService.dispatchEvent({type:"cutEnd",source:t}))}copyOrCutToClipboard(e,t){let{includeHeaders:i,includeGroupHeaders:s}=e;null==i&&(i=this.gos.get("copyHeadersToClipboard")),null==s&&(s=this.gos.get("copyGroupHeadersToClipboard"));let r={includeHeaders:i,includeGroupHeaders:s},a=this.gos.get("rowSelection"),o=this.gos.get("cellSelection"),n=null;this.shouldCopyCells(o,a)?(this.copySelectedRangeToClipboard(r),n=0):this.shouldCopyRows(a)?(this.copySelectedRowsToClipboard(r),n=1):this.focusService.isAnyCellFocused()&&(this.copyFocusedCellToClipboard(r),n=2),t&&null!==n&&this.clearCellsAfterCopy(n)}shouldCopyCells(e,t){if(!this.rangeService||this.rangeService.isEmpty())return!1;if(e)return!("object"==typeof t&&t.copySelectedRows&&!this.selectionService.isEmpty());{let e=this.gos.get("suppressCopySingleCellRanges");return!(!this.rangeService.isMoreThanOneCell()&&e)}}shouldCopyRows(e){var t;return!this.selectionService.isEmpty()&&(e&&"string"!=typeof e?null!=(t=e.copySelectedRows)&&t:!this.gos.get("suppressCopyRowsToClipboard"))}clearCellsAfterCopy(e){if(this.eventService.dispatchEvent({type:"keyShortcutChangedCellStart"}),0===e)this.rangeService.clearCellRangeCellValues({cellEventSource:"clipboardService"});else if(1===e)this.clearSelectedRows();else{let e=this.focusService.getFocusedCell();if(null==e)return;let t=this.rowPositionUtils.getRowNode(e);t&&this.clearCellValue(t,e.column)}this.eventService.dispatchEvent({type:"keyShortcutChangedCellEnd"})}clearSelectedRows(){let e=this.selectionService.getSelectedNodes(),t=this.visibleColsService.getAllCols();for(let i of e)for(let e of t)this.clearCellValue(i,e)}clearCellValue(e,t){if(!t.isCellEditable(e))return;let i=this.valueService.getDeleteValue(t,e);e.setDataValue(t,i,"clipboardService")}iterateActiveRanges(e,t,i){if(!this.rangeService||this.rangeService.isEmpty())return;let s=this.rangeService.getCellRanges();e?this.iterateActiveRange(s[0],t,i,!0):s.forEach((e,r)=>this.iterateActiveRange(e,t,i,r===s.length-1))}iterateActiveRange(e,t,i,s){if(!this.rangeService)return;let r=this.rangeService.getRangeStartRow(e),a=this.rangeService.getRangeEndRow(e);i&&e.columns&&i(e.columns);let o=0,n=!1;for(;!n&&null!=r;){let i=this.rowPositionUtils.getRowNode(r);n=this.rowPositionUtils.sameRow(r,a),t(r,i,e.columns,o++,n&&s),r=this.cellNavigationService.getRowBelow(r)}}copySelectedRangeToClipboard(e={}){if(!this.rangeService||this.rangeService.isEmpty())return;let{data:t,cellsToFlash:i}=this.rangeService.areAllRangesAbleToMerge()?this.buildDataFromMergedRanges(this.rangeService,e):this.buildDataFromRanges(this.rangeService,e);this.copyDataToClipboard(t),this.dispatchFlashCells(i)}buildDataFromMergedRanges(e,t){let i=new Set,s=e.getCellRanges(),r=new Map,a=[],o={};
536s.forEach(t=>{t.columns.forEach(e=>i.add(e));let{rowPositions:s,cellsToFlash:n}=this.getRangeRowPositionsAndCellsToFlash(e,t);s.forEach(e=>{let t=`${e.rowIndex}-${e.rowPinned||"null"}`;r.get(t)||(r.set(t,!0),a.push(e))}),Object.assign(o,n)});let n=this.visibleColsService.getAllCols(),l=Array.from(i);return l.sort((e,t)=>n.indexOf(e)-n.indexOf(t)),{data:this.buildExportParams({columns:l,rowPositions:a,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}),cellsToFlash:o}}buildDataFromRanges(e,t){let i=e.getCellRanges(),s=[],r={};return i.forEach(i=>{let{rowPositions:a,cellsToFlash:o}=this.getRangeRowPositionsAndCellsToFlash(e,i);Object.assign(r,o),s.push(this.buildExportParams({columns:i.columns,rowPositions:a,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}))}),{data:s.join(`
537`),cellsToFlash:r}}getRangeRowPositionsAndCellsToFlash(e,t){let i=[],s={},r=e.getRangeStartRow(t),a=e.getRangeEndRow(t),o=r;for(;o&&(i.push(o),t.columns.forEach(e=>{let{rowIndex:t,rowPinned:i}=o;s[this.cellPositionUtils.createIdFromValues({rowIndex:t,column:e,rowPinned:i})]=!0}),!this.rowPositionUtils.sameRow(o,a));)o=this.cellNavigationService.getRowBelow(o);return{rowPositions:i,cellsToFlash:s}}getCellsToFlashFromRowNodes(e){let t=this.visibleColsService.getAllCols(),i={};for(let s=0;s<e.length;s++){let{rowIndex:r,rowPinned:a}=e[s];if(null!=r)for(let e=0;e<t.length;e++){let s=t[e];i[this.cellPositionUtils.createIdFromValues({rowIndex:r,column:s,rowPinned:a})]=!0}}return i}copyFocusedCellToClipboard(e={}){let t=this.focusService.getFocusedCell();if(null==t)return;let i=this.cellPositionUtils.createId(t),s={rowPinned:t.rowPinned,rowIndex:t.rowIndex},r=t.column,a=this.buildExportParams({columns:[r],rowPositions:[s],includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});this.copyDataToClipboard(a),this.dispatchFlashCells({[i]:!0})}copySelectedRowsToClipboard(e={}){let{columnKeys:t,includeHeaders:i,includeGroupHeaders:s}=e,r=this.buildExportParams({columns:t,includeHeaders:i,includeGroupHeaders:s});this.copyDataToClipboard(r);let a=this.selectionService.getSelectedNodes()||[];this.dispatchFlashCells(this.getCellsToFlashFromRowNodes(a))}buildExportParams(e){let{columns:t,rowPositions:i,includeHeaders:s=!1,includeGroupHeaders:r=!1}=e,a={columnKeys:t,rowPositions:i,skipColumnHeaders:!s,skipColumnGroupHeaders:!r,suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!i,processCellCallback:this.gos.getCallback("processCellForClipboard"),processRowGroupCallback:e=>this.processRowGroupCallback(e),processHeaderCallback:this.gos.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:this.gos.getCallback("processGroupHeaderForClipboard")};return this.csvCreator.getDataAsCsv(a,!0)}processRowGroupCallback(e){let{node:t,column:i}=e,s=this.gos.get("treeData"),r=this.gos.get("suppressGroupMaintainValueType"),a=(()=>{var e,a;if(s||r||!i)return t.key;let o=null==(e=t.groupData)?void 0:e[i.getId()];return o&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(a=this.valueService.formatValue(t.rowGroupColumn,t,o))?a:o})();if(e.node.footer){let e="";a&&a.length&&(e=` ${a}`),a=`Total${e}`}let o=this.gos.getCallback("processCellForClipboard");if(o){let e=t.rowGroupColumn;return!e&&t.footer&&-1===t.level&&(e=this.funcColsService.getRowGroupColumns()[0]),o({value:a,node:t,column:e,type:"clipboard",formatValue:i=>{var s;return null!=(s=this.valueService.formatValue(e,t,i))?s:i},parseValue:i=>this.valueService.parseValue(e,t,i,this.valueService.getValue(e,t))})}return a}dispatchFlashCells(e){window.setTimeout(()=>{this.eventService.dispatchEvent({type:"flashCells",cells:e})},0)}processCell(e,t,i,s,r,a,o){if(r)return r({column:t,node:e,value:i,type:s,formatValue:i=>{var s;return null!=(s=this.valueService.formatValue(t,null!=e?e:null,i))?s:i},parseValue:i=>this.valueService.parseValue(t,null!=e?e:null,i,this.valueService.getValue(t,e))});if(a&&!1!==t.getColDef().useValueParserForImport)return this.valueService.parseValue(t,null!=e?e:null,i,this.valueService.getValue(t,e));if(o&&!1!==t.getColDef().useValueFormatterForExport){var n;return null!=(n=this.valueService.formatValue(t,null!=e?e:null,i))?n:i}return i}copyDataToClipboard(e){let t=this.gos.getCallback("sendToClipboard");t?t({data:e}):!this.gos.get("suppressClipboardApi")&&navigator.clipboard?navigator.clipboard.writeText(e).catch(t=>{ep(`${t}
538${FV("writeText")}`),this.copyDataToClipboardLegacy(e)}):this.copyDataToClipboardLegacy(e)}copyDataToClipboardLegacy(e){this.executeOnTempElement(t=>{let i=e$(this.gos),s=eZ(this.gos);t.value=e||" ",t.select(),t.focus({preventScroll:!0}),i.execCommand("copy")||ep("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."),null!=s&&null!=s.focus&&s.focus({preventScroll:!0})})}
538executeOnTempElement(e,t){let i=e$(this.gos),s=i.createElement("textarea");s.style.width="1px",s.style.height="1px",s.style.top=i.documentElement.scrollTop+"px",s.style.left=i.documentElement.scrollLeft+"px",s.style.position="absolute",s.style.opacity="0";let r=this.gridCtrl.getGui();r.appendChild(s);try{e(s)}catch{ep("Browser does not support document.execCommand('copy') for clipboard operations")}t?window.setTimeout(()=>{t(s),r.removeChild(s)},100):r.removeChild(s)}getRangeSize(e){let t=e.getCellRanges(),i=0,s=0;return t.length>0&&(i=e.getRangeStartRow(t[0]).rowIndex,s=e.getRangeEndRow(t[0]).rowIndex),i-s+1}},Fj="32.3.9",FW={version:Fj,moduleName:`${eh.ClipboardModule}-core`,beans:[FH],dependantModules:[I9,dF]},FU={version:Fj,moduleName:`${eh.ClipboardModule}-api`,apiFunctions:{copyToClipboard:function(e,t){var i;null==(i=e.clipboardService)||i.copyToClipboard(t)},cutToClipboard:function(e,t){var i;null==(i=e.clipboardService)||i.cutToClipboard(t)},copySelectedRowsToClipboard:function(e,t){var i;null==(i=e.clipboardService)||i.copySelectedRowsToClipboard(t)},copySelectedRangeToClipboard:function(e,t){var i;null==(i=e.clipboardService)||i.copySelectedRangeToClipboard(t)},copySelectedRangeDown:function(e){var t;null==(t=e.clipboardService)||t.copyRangeDown()},pasteFromClipboard:function(e){var t;null==(t=e.clipboardService)||t.pasteFromClipboard()}},dependantModules:[FW]},F_={version:Fj,moduleName:eh.ClipboardModule,dependantModules:[FW,FU]},F$={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},FY=class extends tk{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){let e=this.aggFuncsMap;e.sum=FK,e.first=FZ,e.last=Fq,e.min=FQ,e.max=FX,e.count=FJ,e.avg=F0,this.initialised=!0}isAggFuncPossible(e,t){let i=tS(this.getFuncNames(e),t),s=eM(this.aggFuncsMap[t]);return i&&s}getDefaultFuncLabel(e){var t;return null!=(t=F$[e])?t:e}getDefaultAggFunc(e){let t=e.getColDef().defaultAggFunc;if(eM(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,"sum"))return"sum";let i=this.getFuncNames(e);return tc(i)?i[0]:null}addAggFuncs(e){this.init(),tK(e,(e,t)=>{this.aggFuncsMap[e]=t})}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){let t=e.getColDef().allowedAggFuncs;return null==t?Object.keys(this.aggFuncsMap).sort():t}clear(){this.aggFuncsMap={}}};function FK(e){let{values:t}=e,i=null;for(let e=0;e<t.length;e++){let s=t[e];"number"==typeof s?null===i?i=s:i+="number"==typeof i?s:BigInt(s):"bigint"==typeof s&&(i=null===i?s:("bigint"==typeof i?i:BigInt(i))+s)}return i}function FZ(e){return e.values.length>0?e.values[0]:null}function Fq(e){return e.values.length>0?tp(e.values):null}function FQ(e){let{values:t}=e,i=null;for(let e=0;e<t.length;e++){let s=t[e];("number"==typeof s||"bigint"==typeof s)&&(null===i||i>s)&&(i=s)}return i}function FX(e){let{values:t}=e,i=null;for(let e=0;e<t.length;e++){let s=t[e];("number"==typeof s||"bigint"==typeof s)&&(null===i||i<s)&&(i=s)}return i}function FJ(e){var t;let{values:i}=e,s=0;for(let e=0;e<i.length;e++){let t=i[e];s+=null!=t&&"number"==typeof t.value?t.value:1}let r=null==(t=e.rowNode)||null==(t=t.aggData)?void 0:t[e.column.getColId()];return r&&r.value===s?r:{value:s,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function F0(e){var t,i;let{values:s}=e,r=0,a=0;for(let e=0;e<s.length;e++){let t=s[e],i=null;"number"==typeof t||"bigint"==typeof t?(i=t,a++):null!=t&&("number"==typeof t.value||"bigint"==typeof t.value)&&"number"==typeof t.count&&(i=t.value*("number"==typeof t.value?t.count:BigInt(t.count)),a+=t.count),"number"==typeof i?r+="number"==typeof r?i:BigInt(i):"bigint"==typeof i&&(r=("bigint"==typeof r?r:BigInt(r))+i)}let o=null;a>0&&(o=r/("number"==typeof r?a:BigInt(a)));let n=null==(t=e.rowNode)||null==(t=t.aggData)?void 0:t[null==(i=e.column)?void 0:i.getColId()];return n&&n.count===a&&n.value===o?n:{count:a,value:o,toString:function(){return"number"==typeof this.value||"bigint"==typeof this.value?this.value.toString():""},toNumber:function(){return this.value}}}var F1=class extends tk{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(e){this.columnModel=e.columnModel,this.aggFuncService=e.aggFuncService,this.funcColsService=e.funcColsService,this.pivotResultColsService=e.pivotResultColsService,this.valueService=e.valueService}execute(e){let t=eE(this.funcColsService.getValueColumns()),i=!this.gos.getCallback("getGroupRowAgg"),s=e.changedPath&&e.changedPath.isActive();if(t&&i&&s)return;let r=this.createAggDetails(e);this.recursivelyCreateAggData(r)}createAggDetails(e){let t=this.columnModel.isPivotActive(),i=this.funcColsService.getValueColumns(),s=t?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!e1(this.gos),changedPath:e.changedPath,valueColumns:i,pivotColumns:s,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return void 0!==e0(this.gos)||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){let t=t=>{if(!t.hasChildren()){t.aggData&&t.setAggData(null);return}if(-1===t.level&&!e.groupIncludeTotalFooter){let i=!this.columnModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&i)return void t.setAggData(null)}this.aggregateRowNode(t,e)};e.changedPath.forEachChangedNodeDepthFirst(t,!0)}aggregateRowNode(e,t){let i,s=0===t.valueColumns.length,r=0===t.pivotColumns.length;i=t.userAggFunc?t.userAggFunc({nodes:e.childrenAfterFilter}):s?null:r?this.aggregateRowNodeUsingValuesOnly(e,t):this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(i),e.sibling&&e.sibling.setAggData(i)}aggregateRowNodeUsingValuesAndPivot(e){var t,i,s;let r={},a=null!=(t=null==(i=this.pivotResultColsService.getPivotResultCols())?void 0:i.list)?t:[],o=!0;for(let t=0;t<a.length;t++){let i,n=a[t],l=n.getColDef();if(null!=l.pivotTotalColumnIds){o=!1;continue}let h=null!=(s=l.pivotKeys)?s:[];i=e.leafGroup?this.getValuesFromMappedSet(e.childrenMapped,h,l.pivotValueColumn):this.getValuesPivotNonLeaf(e,l.colId),r[l.colId]=this.aggregateValues(i,l.pivotValueColumn.getAggFunc(),l.pivotValueColumn,e,n)}if(!o)for(let t=0;t<a.length;t++){let i=a[t],s=i.getColDef();if(null==s.pivotTotalColumnIds||!s.pivotTotalColumnIds.length)continue;let o=s.pivotTotalColumnIds.map(e=>r[e]);r[s.colId]=this.aggregateValues(o,s.pivotValueColumn.getAggFunc(),s.pivotValueColumn,e,i)}return r}aggregateRowNodeUsingValuesOnly(e,t){let i={},s=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,r=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,a=this.getValuesNormal(e,s,t.filteredOnly),o=e.aggData;
538return s.forEach((t,s)=>{i[t.getId()]=this.aggregateValues(a[s],t.getAggFunc(),t,e)}),r&&o&&r.forEach(e=>{i[e.getId()]=o[e.getId()]}),i}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(e=>e.aggData[t])}getValuesFromMappedSet(e,t,i){let s=e;for(let e=0;e<t.length;e++){let i=t[e];s=s?s[i]:null}return s?s.map(e=>this.valueService.getValue(i,e)):[]}getValuesNormal(e,t,i){let s=[];t.forEach(()=>s.push([]));let r=t.length,a=i?e.childrenAfterFilter:e.childrenAfterGroup,o=a.length;for(let e=0;e<o;e++){let i=a[e];for(let e=0;e<r;e++){let r=t[e],a=this.valueService.getValue(r,i);s[e].push(a)}}return s}aggregateValues(e,t,i,s,r){let a="string"==typeof t?this.aggFuncService.getAggFunc(t):t;return"function"!=typeof a?(eg(`unrecognised aggregation function ${t}`),null):a(this.gos.addGridCommonParams({values:e,column:i,colDef:i?i.getColDef():void 0,pivotResultColumn:r,rowNode:s,data:s?s.data:void 0}))}},F2=class extends tk{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.columnFactory=e.columnFactory}createAutoCols(e){let t=[],i=this.gos.get("treeData"),s=e3(this.gos);return i&&s&&(ep('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach((e,i)=>{t.push(this.createOneAutoCol(e,i))}):t.push(this.createOneAutoCol()),t}updateAutoCols(e,t){e.forEach((e,i)=>this.updateOneAutoCol(e,i,t))}createOneAutoCol(e,t){let i;i=e?`${tz}-${e.getId()}`:tz;let s=this.createAutoColDef(i,e,t);s.colId=i;let r=new t4(s,null,i,!0);return this.createBean(r),r}updateOneAutoCol(e,t,i){let s=e.getColDef(),r="string"==typeof s.showRowGroup?s.showRowGroup:void 0,a=null!=r?this.columnModel.getColDefCol(r):void 0,o=this.createAutoColDef(e.getId(),null!=a?a:void 0,t);e.setColDef(o,null,i),this.columnFactory.applyColumnState(e,o,i)}createAutoColDef(e,t,i){let s=this.createBaseColDef(t);tX(s,this.gos.get("autoGroupColumnDef")),s=this.columnFactory.addColumnDefaultAndTypes(s,e),!this.gos.get("treeData")&&eD(s.field)&&eD(s.valueGetter)&&eD(s.filterValueGetter)&&"agGroupColumnFilter"!==s.filter&&(s.filter=!1),i&&i>0&&(s.headerCheckboxSelection=!1);let r=eJ(this.gos),a=s.valueGetter||null!=s.field;return r&&!a&&(s.sortIndex=void 0,s.initialSort=void 0),s}createBaseColDef(e){let t=this.gos.get("autoGroupColumnDef"),i={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer"),e){let t=e.getColDef();Object.assign(i,{headerName:this.columnNameService.getDisplayNameForColumn(e,"header"),headerValueGetter:t.headerValueGetter}),t.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:t.cellRenderer,innerRendererParams:t.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i}},F3=class extends Ac{constructor(e,t,i,s,r){super(t,i,r,`
539                <span role="option">
540                    <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
541                    <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
542                    <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
543                    <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
544                </span>
545            `,[s3]),this.column=e,this.dropZonePurpose=s,this.eSortIndicator=s_,this.popupShowing=!1}wireBeans(e){super.wireBeans(e),this.popupService=e.popupService,this.sortController=e.sortController,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.aggFuncService=e.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}
545getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(e,t){let i=this.gos.get("rowGroupPanelSuppressSort"),s=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!s){let i=t("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");e.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!i){let i=t("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");e.push(i)}super.addAdditionalAriaInstructions(e,t)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){let e=this.localeService.getLocaleTextFunc(),{name:t,aggFuncName:i}=this.getColumnAndAggFuncName(),s=e("ariaDropZoneColumnComponentAggFuncSeparator"," of "),r={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},a=this.column.getSort(),o=this.gos.get("rowGroupPanelSuppressSort");return[i&&`${i}${s}`,t,this.isGroupingZone()&&!o&&a&&`, ${r[a]}`].filter(e=>!!e).join("")}getColumnAndAggFuncName(){let e=this.displayName,t="";if(this.isAggregationZone()){let e=this.column.getAggFunc(),i="string"==typeof e?e:"agg";t=this.localeService.getLocaleTextFunc()(i,i)}return{name:e,aggFuncName:t}}setupSort(){let e=this.column.isSortable(),t=this.isGroupingZone();if(e&&t&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);let e=e=>{e.preventDefault();let t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.sortController.progressSort(this.column,t,"uiColumnSorted")};this.addGuiEventListener("click",e),this.addGuiEventListener("keydown",t=>{t.key===s9.ENTER&&this.isGroupingZone()&&e(t)})}}getDefaultIconName(){return"hide"}createGetDragItem(){let{column:e}=this;return()=>{let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(e){super.onKeyDown(e),e.key===s9.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(e.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){let{name:e,aggFuncName:t}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${t}(${e})`:e}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;let e=new An({cssIdentifier:"select-agg-func"}),t=this.aggFuncService.getFuncNames(this.column),i=this.getGui(),s=e.getGui();e.setModel({getRow:function(e){return t[e]},getRowCount:function(){return t.length}}),this.createBean(e);let r=sy('<div class="ag-select-agg-func-popup"></div>');r.style.top="0px",r.style.left="0px",r.appendChild(s),r.style.width=`${i.clientWidth}px`;let[a]=this.addManagedElementListeners(r,{focusout:e=>{!r.contains(e.relatedTarget)&&l&&l.hideFunc()}}),o=t=>{this.destroyBean(e),this.popupShowing=!1,(null==t?void 0:t.key)==="Escape"&&i.focus(),a&&a()},n=this.localeService.getLocaleTextFunc(),l=this.popupService.addPopup({modal:!0,eChild:r,closeOnEsc:!0,closedCallback:o,ariaLabel:n("ariaLabelAggregationFunction","Aggregation Function")});l&&e.setComponentCreator(this.createAggSelect.bind(this,l.hideFunc)),e.addGuiEventListener("keydown",t=>{if(t.key===s9.ENTER||t.key===s9.SPACE){let t=e.getLastFocusedRow();if(null==t)return;let i=e.getComponentAt(t);i&&i.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:i,ePopup:r,keepWithinBounds:!0,column:this.column,position:"under"}),e.refresh();let h=t.findIndex(e=>e===this.column.getAggFunc());
545-1===h&&(h=0),e.focusRow(h)}createAggSelect(e,t){let i=()=>{e(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,t,"toolPanelDragAndDrop")},s=this.localeService.getLocaleTextFunc(),r=t.toString();return new F4(i,s(r,r))}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return"aggregation"===this.dropZonePurpose}isGroupingZone(){return"rowGroup"===this.dropZonePurpose}getDragSourceType(){return r$.ToolPanel}destroy(){super.destroy(),this.column=null}},F4=class extends s${constructor(e,t){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=e,this.getGui().innerText=t,this.addGuiEventListener("click",this.selectItem)}},F6=class extends Ap{constructor(e,t){super(e),this.dropZonePurpose=t}wireBeans(e){super.wireBeans(e),this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}init(e){super.init(e),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(e){var t;return null!=(t=e.columns)?t:[]}isInterestedIn(e){return e===r$.HeaderCell||e===r$.ToolPanel}minimumAllowedNewInsertIndex(){let e=this.gos.get("groupLockGroupColumns"),t=this.funcColsService.getRowGroupColumns().length;return -1===e?t:Math.min(e,t)}showOrHideColumnOnExit(e){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!e.fromNudge}handleDragEnterEnd(e){if(this.showOrHideColumnOnExit(e)){let t=e.dragSource.getDragItem().columns;this.setColumnsVisible(t,!1,"uiColumnDragged")}}handleDragLeaveEnd(e){if(this.showOrHideColumnOnExit(e)){let t=e.dragSource.getDragItem();this.setColumnsVisible(t.columns,!0,"uiColumnDragged")}}setColumnsVisible(e,t,i){if(e){let s=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColsVisible(s,t,i)}}isRowGroupPanel(){return"rowGroup"===this.dropZonePurpose}createPillComponent(e,t,i,s){return new F3(e,t,i,this.dropZonePurpose,s)}},F5=class extends F6{constructor(e){super(e,"pivot")}postConstruct(){let e=this.localeService.getLocaleTextFunc(),t=e("pivotColumnsEmptyMessage","Drag here to set column labels"),i=e("pivots","Column Labels");super.init({icon:sq("pivotPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){let e=super.getTooltipParams();return e.location="pivotColumnsList",e}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){let e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":{let t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break}default:this.setDisplayed(!1)}else this.setDisplayed(e)}isItemDroppable(e,t){return!this.gos.get("functionsReadOnly")&&!!e.isPrimary()&&e.isAllowPivot()&&(!e.isPivotActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setPivotColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},F8=class extends F6{constructor(e){super(e,"rowGroup")}postConstruct(){let e=this.localeService.getLocaleTextFunc(),t=e("rowGroupColumnsEmptyMessage","Drag here to set row groups"),i=e("groups","Row Groups");super.init({icon:sq("rowGroupPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){let e=super.getTooltipParams();return e.location="rowGroupColumnsList",e}isItemDroppable(e,t){return!this.gos.get("functionsReadOnly")&&!!e.isPrimary()&&e.isAllowRowGroup()&&(!e.isRowGroupActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setRowGroupColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},F7={selector:"AG-GRID-HEADER-DROP-ZONES",component:class extends s${wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());let e=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedPropertyListener("rowGroupPanelShow",e),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){let e=document.createElement("div");e.classList.add("ag-column-drop-wrapper"),iV(e,"presentation"),this.rowGroupComp=new F8(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new F5(!0),this.createManagedBean(this.pivotComp),e.appendChild(this.rowGroupComp.getGui()),e.appendChild(this.pivotComp.getGui());let t=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:t}),this.addManagedListeners(this.pivotComp,{displayChanged:t}),this.onDropPanelVisible(),e}onDropPanelVisible(){let e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),t="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(t,e),this.pivotComp.addOrRemoveCssClass(t,e)}onRowGroupChanged(){if(!this.rowGroupComp)return;let e=this.gos.get("rowGroupPanelShow");if("always"===e)this.rowGroupComp.setDisplayed(!0);else if("onlyWhenGrouping"===e){let e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;let e=this.gos.get("pivotPanelShow");if("always"===e)this.pivotComp.setDisplayed(!0);else if("onlyWhenPivoting"===e){let e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}}},F9=class extends tk{constructor(){super(...arguments),this.beanName="
545columnDropZonesService"}getDropZoneSelector(){return F7}},Pe=class extends tk{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(e){this.filterManager=e.filterManager,this.columnModel=e.columnModel}execute(e){var t,i;let s=this.columnModel.isPivotMode(),r=(null==(t=this.filterManager)?void 0:t.isAggregateFilterPresent())||(null==(i=this.filterManager)?void 0:i.isAggregateQuickFilterPresent()),a=e0(this.gos)||(s?e=>e.node.leafGroup:e=>!e.node.group),{changedPath:o}=e,n=(e,t=!1)=>{e.childrenAfterFilter&&(e.childrenAfterAggFilter=e.childrenAfterFilter,t&&e.childrenAfterAggFilter.forEach(e=>n(e,t)),this.setAllChildrenCount(e)),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)},l=e=>{var t;e.childrenAfterAggFilter=(null==(t=e.childrenAfterFilter)?void 0:t.filter(e=>{var t;return a({node:e})&&this.filterManager.doesRowPassAggregateFilters({rowNode:e})?(n(e,!0),!0):null==(t=e.childrenAfterAggFilter)?void 0:t.length}))||null,this.setAllChildrenCount(e),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)};o.forEachChangedNodeDepthFirst(r?l:n,!0)}setAllChildrenCountTreeData(e){let t=e.childrenAfterAggFilter,i=0;if(t){let e=t.length;i=e;for(let r=0;r<e;++r){var s;i+=null!=(s=t[r].allChildrenCount)?s:0}}e.setAllChildrenCount(0===i&&e.level>=0?null:i)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(e=>{e.group?t+=e.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){e.hasChildren()?this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e):e.setAllChildrenCount(null)}},Pt=class extends lT{constructor(){super(`
546            <div class="ag-group-filter">
547                <div data-ref="eGroupField"></div>
548                <div data-ref="eUnderlyingFilter"></div>
549            </div>
550        `),this.eGroupField=s_,this.eUnderlyingFilter=s_}wireBeans(e){this.filterManager=e.filterManager,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(e){return this.updateParams(e).then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})})}refresh(e){return this.updateParams(e),!0}updateParams(e){return this.params=e,this.validateParams(),this.updateGroups()}validateParams(){let{colDef:e}=this.params;e.field&&ep('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),e.filterValueGetter&&ep('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),e.filterParams&&ep('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){let e=this.updateGroupField();return this.getUnderlyingFilters(e)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return ep("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];let e=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return e||(ep("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){sm(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);let e=this.getSourceColumns(),t=e.filter(e=>e.isFilterAllowed());return t.length?(1===e.length?(this.selectedColumn=t[0],ss(this.eGroupField,!1)):(this.selectedColumn&&t.some(e=>e.getId()===this.selectedColumn.getId())||(this.selectedColumn=t[0]),this.createGroupFieldSelectElement(t),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(sy('<div class="ag-filter-separator"></div>')),ss(this.eGroupField,!0)),t):(this.selectedColumn=void 0,ss(this.eGroupField,!1),null)}createGroupFieldSelectElement(e){this.eGroupFieldSelect=this.createManagedBean(new ad);let t=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(t("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(e.map(e=>{var t;return{value:e.getId(),text:null!=(t=this.columnNameService.getDisplayNameForColumn(e,"groupFilter",!1))?t:void 0}})),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(e=>this.updateSelectedColumn(e)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),1===e.length&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(e){if(!e)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),rm.resolve();let t=[],i=[];
550return e.forEach(e=>{let s=this.filterManager.getOrCreateFilterWrapper(e);null!=s&&s.filterPromise&&t.push(s.filterPromise.then(t=>(t&&i.push({filter:t,column:e}),e.getId()===this.selectedColumn.getId()&&(this.selectedFilter=null!=t?t:void 0),t)))}),rm.all(t).then(()=>{this.filterColumnPairs=i,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e,t;if(sm(this.eUnderlyingFilter),!this.selectedColumn)return rm.resolve();let i=this.createManagedBean(new r5(this.selectedColumn,"COLUMN_MENU"));return(this.filterWrapperComp=i,i.hasFilter())?(this.eUnderlyingFilter.appendChild(i.getGui()),null!=(e=null==(t=i.getFilter())?void 0:t.then(()=>{var e,t;null==(e=i.afterGuiAttached)||e.call(i,this.afterGuiAttachedParams),null!=(t=this.afterGuiAttachedParams)&&t.suppressFocus||!this.eGroupFieldSelect||this.eGroupFieldSelect.isDisabled()||this.eGroupFieldSelect.getFocusableElement().focus()}))?e:rm.resolve()):rm.resolve()}updateSelectedColumn(e){var t;if(!e)return;null==(t=this.filterWrapperComp)||t.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);let i=this.getFilterColumnPair(e);this.selectedColumn=null==i?void 0:i.column,this.selectedFilter=null==i?void 0:i.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){var e;return!!(null!=(e=this.filterColumnPairs)&&e.some(({filter:e})=>e.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return rm.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.addUnderlyingFilterElement()}afterGuiDetached(){var e,t;sm(this.eUnderlyingFilter),null==(e=this.selectedFilter)||null==(t=e.afterGuiDetached)||t.call(e)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}onFilterDestroyed({column:e,source:t}){var i;if("gridDestroyed"===t)return;let s=e.getColId();null!=(i=this.filterColumnPairs)&&i.some(({column:e})=>e.getColId()===s)&&setTimeout(()=>{this.isAlive()&&this.updateGroups()})}getFilterColumnPair(e){var t;if(e)return null==(t=this.filterColumnPairs)?void 0:t.find(({column:t})=>t.getId()===e)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},Pi=class extends s${constructor(){super(`
551            <div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>
552        `),this.eFloatingFilter=s_,this.haveAddedColumnListeners=!1}wireBeans(e){this.columnNameService=e.columnNameService,this.filterManager=e.filterManager}init(e){this.params=e;let t="multipleColumns"===this.gos.get("groupDisplayType");return new rm(e=>{this.params.parentFilterInstance(i=>{this.parentFilterInstance=i,t?this.setupUnderlyingFloatingFilterElement().then(()=>e()):(this.setupReadOnlyFloatingFilterElement(),e())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams()}setParams(){var e;let t=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),i=this.localeService.getLocaleTextFunc();null==(e=this.eFloatingFilterText)||e.setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new af),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,sm(this.eFloatingFilter);let e=this.parentFilterInstance.getSelectedColumn();if(e&&!e.isVisible()){let t=this.filterManager.getFloatingFilterCompDetails(e,this.params.showParentFilter);if(t)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(e,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),t.newAgStackInstance().then(e=>{var t,i;this.underlyingFloatingFilter=e,null==(t=this.underlyingFloatingFilter)||t.onParentModelChanged(null==(i=this.parentFilterInstance.getSelectedFilter())?void 0:i.getModel()),this.appendChild(e.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),rm.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(e){if(!e.column)return;
552let t=this.filterManager.getFloatingFilterCompDetails(e.column,this.params.showParentFilter);if(t){var i,s,r;null!=(i=this.underlyingFloatingFilter)&&i.refresh?this.underlyingFloatingFilter.refresh(t.params):null==(s=this.underlyingFloatingFilter)||null==(r=s.onParamsUpdated)||r.call(s,t.params)}}onParentModelChanged(e,t){if(this.showingUnderlyingFloatingFilter){var i,s;null==(i=this.underlyingFloatingFilter)||i.onParentModelChanged(null==(s=this.parentFilterInstance.getSelectedFilter())?void 0:s.getModel(),t)}else this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;let e=this.parentFilterInstance.getSelectedFilter();if(!e){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){let t=e.getModel();this.eFloatingFilterText.setValue(null==t?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},Ps=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(e,t){this.getSet(e).removeFromChildrenAfterGroup[t.id]=!0}isRemoveFromAllLeafChildren(e,t){return!!this.getSet(e).removeFromAllLeafChildren[t.id]}preventRemoveFromAllLeafChildren(e,t){let i=this.getSet(e);delete i.removeFromAllLeafChildren[t.id]}removeFromAllLeafChildren(e,t){this.getSet(e).removeFromAllLeafChildren[t.id]=!0}getSet(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(e=>{var t,i;let s=this.allSets[e.id];e.childrenAfterGroup=e.childrenAfterGroup.filter(e=>!s.removeFromChildrenAfterGroup[e.id]),e.allLeafChildren=null!=(t=null==(i=e.allLeafChildren)?void 0:i.filter(e=>!s.removeFromAllLeafChildren[e.id]))?t:null,e.updateHasChildren();let r=e.sibling;r&&(r.childrenAfterGroup=e.childrenAfterGroup,r.allLeafChildren=e.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function Pr(e,t){let i=e.sourceRowIndex,s=t.sourceRowIndex,r=i>=0,a=s>=0;return r&&a?i-s:r||a?r?1:-1:e.__objectId-t.__objectId}var Pa=class extends tk{wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.selectionService=e.selectionService,this.showRowGroupColsService=e.showRowGroupColsService}execute(e){let t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{let i=!0===e.afterColumnsChanged;this.shotgunResetEverything(t,i)}this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t)}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){let t,i=[],s=[];e.childrenAfterGroup.forEach(e=>{var r;null!=(r=e.childrenAfterGroup)&&r.length?""!==e.key||t?s.push(e):t=e:i.push(e)}),t&&s.push(t),e.childrenAfterGroup=[...i,...s]}},!1)}createGroupingDetails(e){var t,i;let{rowNode:s,changedPath:r,rowNodeTransactions:a,rowNodesOrderChanged:o}=e,n=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:n,rootNode:s,pivotMode:this.columnModel.isPivotMode(),groupedColCount:null!=(t=null==n?void 0:n.length)?t:0,transactions:a,rowNodesOrderChanged:!!o,changedPath:r,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:null!=(i=null==n?void 0:n.map(e=>e.getColDef().keyCreator))?i:[]}}handleTransaction(e){e.transactions.forEach(t=>{let i=new Ps;tc(t.remove)&&this.removeNodes(t.remove,e,i),tc(t.update)&&this.moveNodesInWrongPath(t.update,e,i),tc(t.add)&&this.insertNodes(t.add,e);let s=i.getAllParents().slice();i.flush(),this.removeEmptyGroups(s,e)}),e.rowNodesOrderChanged&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{(function(e){if(!e)return!1;let t=e.length;if(t<2)return!1;let i=!1;for(let s=1;s<t;s++)if(Pr(e[s-1],e[s])>0){i=!0;break}return!!i&&(e.sort(Pr),!0)})(t.childrenAfterGroup)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){let t=e.initialGroupOrderComparator;eM(t)&&function e(i){eM(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((e,i)=>t({nodeA:e,nodeB:i})),i.childrenAfterGroup.forEach(t=>e(t)))}(e.rootNode)}getExistingPathForNode(e,t){let i=[],s=e.parent;for(;s&&s!==t.rootNode;)i.push({key:s.key,rowGroupColumn:s.rowGroupColumn,field:s.field}),s=s.parent;return i.reverse(),i}
552moveNodesInWrongPath(e,t,i){e.forEach(e=>{t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent);let s=e=>e.key;tg(this.getExistingPathForNode(e,t).map(s),this.getGroupInfo(e,t).map(s))||this.moveNode(e,t,i)})}moveNode(e,t,i){if(this.removeNodesFromParents([e],t,i),this.insertOneNode(e,t,i),e.setData(e.data),t.changedPath.isActive()){let i=e.parent;t.changedPath.addParentNode(i)}}removeNodes(e,t,i){this.removeNodesFromParents(e,t,i),t.changedPath.isActive()&&e.forEach(e=>t.changedPath.addParentNode(e.parent))}forEachParentGroup(e,t,i){let s=t;for(;s&&s!==e.rootNode;)i(s),s=s.parent}removeNodesFromParents(e,t,i){let s=i||new Ps;e.forEach(e=>{this.removeFromParent(e,s),this.forEachParentGroup(t,e.parent,t=>{s.removeFromAllLeafChildren(t,e)})}),null==i&&s.flush()}removeEmptyGroups(e,t){let i=!0,s=e=>{var t,i;let s=this.getChildrenMappedKey(e.key,e.rowGroupColumn),r=e.parent;return null!=r&&!!r.childrenMapped&&!!r.childrenMapped[s]&&!!e.group&&(null!=(t=null==(i=e.childrenAfterGroup)?void 0:i.length)?t:0)===0};for(;i;){i=!1;let r=new Ps;e.forEach(e=>{this.forEachParentGroup(t,e,e=>{s(e)&&(i=!0,this.removeFromParent(e,r),e.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),r.flush()}}removeFromParent(e,t){var i;e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(tC(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));let s=this.getChildrenMappedKey(e.key,e.rowGroupColumn);null!=(i=e.parent)&&i.childrenMapped&&delete e.parent.childrenMapped[s],e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){let i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);null!=t&&t.childrenMapped&&t.childrenMapped[i]!==e&&(t.childrenMapped[i]=e,t.childrenAfterGroup.push(e),t.setGroup(!0))}areGroupColsEqual(e,t){return null!=e&&null!=t&&e.pivotMode===t.pivotMode&&tg(e.groupedCols,t.groupedCols)&&tg(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){let t=i=>{i&&i.forEach(i=>{var s;if(!i.group)return;let r={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:null==(s=i.allLeafChildren)?void 0:s[0]};this.setGroupData(i,r,e),t(i.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionService.filterFromSelection(e=>e&&!e.group);let{groupedCols:i}=e,s=e.rootNode;s.leafGroup=0===i.length,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren();let r=s.sibling;r&&(r.childrenAfterGroup=s.childrenAfterGroup,r.childrenMapped=s.childrenMapped),this.insertNodes(s.allLeafChildren,e)}noChangeInGroupingColumns(e,t){let i=!1,s=this.showRowGroupColsService.getShowRowGroupCols(),r=s?s.map(e=>e.getId()).join("-"):"";return t&&(i=this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==r&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=r,i}insertNodes(e,t){e.forEach(e=>{this.insertOneNode(e,t),t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent)})}insertOneNode(e,t,i){let s=this.getGroupInfo(e,t),r=this.findParentForNode(e,s,t,i);r.group||ep("duplicate group keys for row data, keys should be unique",[r.data,e.data]),e.parent=r,e.level=s.length,r.childrenAfterGroup.push(e),r.updateHasChildren()}findParentForNode(e,t,i,s){let r=i.rootNode;return t.forEach((t,a)=>{r=this.getOrCreateNextNode(r,t,a,i),null!=s&&s.isRemoveFromAllLeafChildren(r,e)?null==s||s.preventRemoveFromAllLeafChildren(r,e):r.allLeafChildren.push(e)}),r}getOrCreateNextNode(e,t,i,s){var r;let a=this.getChildrenMappedKey(t.key,t.rowGroupColumn),o=null==e||null==(r=e.childrenMapped)?void 0:r[a];return o||(o=this.createGroup(t,e,i,s),this.addToParent(o,e)),o}createGroup(e,t,i,s){let r=new r4(this.beans);return r.group=!0,r.field=e.field,r.rowGroupColumn=e.rowGroupColumn,this.setGroupData(r,e,s),r.key=e.key,r.id=this.createGroupId(r,t,i),r.level=i,r.leafGroup=i===s.groupedColCount-1,r.allLeafChildren=[],r.setAllChildrenCount(0),r.rowGroupIndex=i,r.childrenAfterGroup=[],r.childrenMapped={},r.updateHasChildren(),r.parent=t,this.setExpandedInitialValue(s,r),r}createGroupId(e,t,i){let s=(e,t)=>{if(!e.rowGroupColumn)return null;let i=t?s(t,t.parent):null;return`${null==i?"":i+"-"}${e.rowGroupColumn.getColId()}-${e.key}`};return r4.ID_PREFIX_ROW_GROUP+s(e,t)}setGroupData(e,t,i){e.groupData={}
552,this.showRowGroupColsService.getShowRowGroupCols().forEach(s=>{let r=e.rowGroupColumn;null!==r&&s.isRowGroupDisplayed(r.getId())&&(i.suppressGroupMaintainValueType?e.groupData[s.getColId()]=t.key:e.groupData[s.getColId()]=this.valueService.getValue(r,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup){t.expanded=!1;return}let i=e.isGroupOpenByDefault;if(i){let e={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=!0==i(e);return}if(-1===e.expandByDefault){t.expanded=!0;return}t.expanded=t.level<e.expandByDefault}getGroupInfo(e,t){let i=[];return t.groupedCols.forEach(s=>{let r=this.valueService.getKeyForNode(s,e),a=null!=r&&""!==r;if(!t.pivotMode&&t.groupAllowUnbalanced||a||(r="",a=!0),a){let t={key:r,field:s.getColDef().field,rowGroupColumn:s,leafNode:e};i.push(t)}}),i}},Po=(e,t)=>e.treeNode.oldSourceRowIndex-t.treeNode.oldSourceRowIndex,Pn=Object.freeze([]),Pl=Pn.values(),Ph=(e,t)=>{e.parent=null,e.treeNode=null,t?e.childrenAfterGroup=[]:(e.level=0,e.childrenAfterGroup=null,e.allLeafChildren=null)},Pd=class e{constructor(e,t,i){this.parent=e,this.key=t,this.level=i,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=Pn,this.allLeafChildren=Pn,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){var e,t;return!(null!=(e=this.row)&&e.data)&&!(null!=(t=this.children)&&t.size)}hasChildren(){var e;return!!(null!=(e=this.children)&&e.size)}enumChildren(){var e,t;return null!=(e=null==(t=this.children)?void 0:t.values())?e:Pl}upsertKey(t){var i,s,r;"string"!=typeof t&&(t=String(t));let a=null==(i=this.children)?void 0:i.get(t);return a||(a=new e(this,t,this.level+1),null==(s=null!=(r=this.children)?r:this.children=new Map)||s.set(a.key,a)),a}destroy(){var e;let{row:t,parent:i}=this;null!==i&&(null==i||null==(e=i.children)||e.delete(this.key),null!==t&&Ph(t,!0),this.parent=null)}setRow(e){let{level:t,row:i,childrenAfterGroup:s}=this;if(t<0)null!==i&&i!==e&&Ph(i,!0);else{var r,a,o;if(i===e)return!1;null!==i?(e.allLeafChildren=null!=(r=null!=(a=i.allLeafChildren)?a:this.allLeafChildren)?r:Pn,Ph(i,!1)):e.allLeafChildren=null!=(o=this.allLeafChildren)?o:Pn}return e.level=t,e.childrenAfterGroup=s,e.treeNode=this,this.row=e,!0}removeRow(e){let{level:t,row:i,duplicateRows:s,childrenAfterGroup:r}=this;if(i===e){let e=this.popDuplicateRow();if(e){if(this.row=e,e.childrenAfterGroup=r,t>=0){var a,o;e.allLeafChildren=null!=(a=null!=(o=i.allLeafChildren)?o:this.allLeafChildren)?a:Pn}}else this.row=null}else{if(!(null!=s&&s.delete(e)))return!1;0===s.size&&(this.duplicateRows=null)}return Ph(e,t<0),!0}addDuplicateRow(e){let{level:t}=this,i=this.duplicateRows;if(null===i)i=new Set,this.duplicateRows=i;else if(i.has(e))return!1;return i.add(e),e.treeNode=this,e.level=t,t>=0&&(e.allLeafChildren=Pn),e.childrenAfterGroup=Pn,!0}sortFirstDuplicateRow(){let e=this.duplicateRows,t=this.row;if(!t||!e)return t;let i=t;for(let t of e)t.sourceRowIndex<i.sourceRowIndex&&(i=t);if(i!==t){var s,r;i.childrenAfterGroup=this.childrenAfterGroup,i.allLeafChildren=null!=(s=null!=(r=t.allLeafChildren)?r:this.allLeafChildren)?s:Pn,t.childrenAfterGroup=Pn,t.allLeafChildren=Pn,e.delete(i),e.add(t),this.row=i}return i}popDuplicateRow(){let e=null,t=this.duplicateRows;return null!==t&&null!==(e=t.values().next().value)&&t.delete(e)&&0===t.size&&(this.duplicateRows=null),e}dequeueInvalidated(){let e=this.invalidatedHead;if(null!==e){var t;this.invalidatedHead=null!=(t=e.invalidatedNext)?t:null,e.invalidatedNext=void 0}return e}invalidate(){let e=this,t=this.parent;for(;null!==t&&void 0===e.invalidatedNext;)e.invalidatedNext=t.invalidatedHead,t.invalidatedHead=e,t=(e=t).parent}invalidateOrder(){var e,t,i;let s=this.parent;null===s||s.childrenChanged||!((null!=(e=null==(t=this.children)?void 0:t.size)?e:0)>1)&&null!=(i=s.row)&&i.data||(s.childrenChanged=!0,s.invalidate())}getRowPosition(){var e,t;let i=this.row;return null!=i&&i.data?i.sourceRowIndex:null!=(e=null==(t=this.childrenAfterGroup[0])||null==(t=t.treeNode)?void 0:t.oldSourceRowIndex)?e:this.oldSourceRowIndex}updateChildrenAfterGroup(){var e,t;this.childrenChanged=!1;let i=null!=(e=null==(t=this.children)?void 0:t.size)?e:0;if(0===i)return 0!==this.childrenAfterGroup.length&&(this.leafChildrenChanged=!0,this.childrenAfterGroup=Pn,this.row.childrenAfterGroup=Pn,!0);let s=!1,r=this.childrenAfterGroup;r===Pn?(r=Array(i),this.childrenAfterGroup=r,this.row.childrenAfterGroup=r,s=!0):r.length!==i&&(r.length=i,s=!0);let a=0,o=-1,n=!1;for(let e of this.enumChildren()){let t=e.getRowPosition();t<o&&(n=!0),o=t,e.oldSourceRowIndex=t;let i=e.row;r[a]!==i&&(r[a]=i,s=!0),++a}return s&&(this.leafChildrenChanged=!0),n&&this.reorderChildrenList(r),s||n}reorderChildrenList(e){let t=e.length,i=this.children;e.sort(Po),i.clear();for(let s=0;s<t;++s){let t=e[s].treeNode;i.set(t.key,t)}}updateAllLeafChildren(){var e,t;let{parent:i,row:s,childrenAfterGroup:r}=this;this.leafChildrenChanged=!1;let a=!1,o=r.length;if(0===o)a=(null==(t=s.allLeafChildren)?void 0:t.length)!==0,s.allLeafChildren=Pn,this.allLeafChildren=Pn;else if(1===o&&null!=(e=r[0].allLeafChildren)&&e.length)s.allLeafChildren=r[0].allLeafChildren,this.allLeafChildren=null,a=!0;else{let e=this.allLeafChildren;(e===Pn||null===e)&&(e=[],this.allLeafChildren=e);let t=e.length,i=0;for(let s=0;s<o;++s){let o=r[s],n=o.allLeafChildren,l=n.length;if(l)for(let s=0;s<l;++s){let r=n[s];(i>
552=t||e[i]!==r)&&(e[i]=r,a=!0),++i}else(i>=t||e[i]!==o)&&o&&(e[i]=o,a=!0),++i}t!==i&&(e.length=i,a=!0),s.allLeafChildren!==e&&(s.allLeafChildren=e,a=!0)}a&&i&&(i.leafChildrenChanged=!0)}},Pu=e=>(1&e.treeNodeFlags)!=0,Pc=e=>(2&e.treeNodeFlags)!=0,Pp=e=>(4&e.treeNodeFlags)!=0,Pg=e=>(16&e.treeNodeFlags)!=0,Pm=(e,t)=>{t?e.treeNodeFlags|=2:e.treeNodeFlags&=-3},Pv=e=>{e.treeNodeFlags|=16},Pf=e=>{e.treeNodeFlags=1|-29&e.treeNodeFlags},PC=e=>{e.treeNodeFlags=0},Py=class extends tk{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new Pd(null,"",-1)}wireBeans(e){this.beans=e,this.showRowGroupColsService=e.showRowGroupColsService}destroy(){let e=this.root.row;null!==e&&(this.root.removeRow(e),PC(e)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(e){let{rowNodeTransactions:t,rowNodesOrderChanged:i,changedPath:s}=e,r=e.rowNode,a=this.gos,o={changedPath:s,expandByDefault:a.get("groupDefaultExpanded"),suppressGroupMaintainValueType:a.get("suppressGroupMaintainValueType"),getDataPath:a.get("getDataPath"),isGroupOpenByDefault:a.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:a.getCallback("initialGroupOrderComparator")};this.root.setRow(r),r.leafGroup=!1;let n=r.sibling;n&&(n.childrenAfterGroup=r.childrenAfterGroup,n.childrenMapped=r.childrenMapped),t?this.handleTransaction(o,t,i):this.handleRowData(o,r,!0===e.afterColumnsChanged)}handleRowData(e,t,i){let s=this.root;if(i||void 0===this.oldGroupDisplayColIds){var r,a,o;let e=null!=(r=null==(a=this.showRowGroupColsService)||null==(a=a.getShowRowGroupCols())?void 0:a.map(e=>e.getId()).join("-"))?r:"";if(i){this.oldGroupDisplayColIds!==e&&this.checkAllGroupDataAfterColsChanged(null==(o=s.row)?void 0:o.childrenAfterGroup);return}this.oldGroupDisplayColIds=e}this.clearTree(s),this.addOrUpdateRows(e,t.allLeafChildren,!1),this.commitTree(e)}handleTransaction(e,t,i){for(let{remove:i,update:s,add:r}of t)this.removeRows(i),this.addOrUpdateRows(e,s,!0),this.addOrUpdateRows(e,r,!1);i&&this.handleRowNodesOrderChanged(),this.commitTree(e)}handleRowNodesOrderChanged(){var e;let t=null==(e=this.root.row)?void 0:e.allLeafChildren;if(t)for(let e=0,i=t.length;e<i;++e){let i=t[e].treeNode;i&&i.oldSourceRowIndex!==e&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(e){for(let r=0,a=null!=(t=null==e?void 0:e.length)?t:0;r<a;++r){var t,i,s;let a=e[r];this.setGroupData(a,null!=(i=null==(s=a.treeNode)?void 0:s.key)?i:a.key),this.checkAllGroupDataAfterColsChanged(a.childrenAfterGroup)}}addOrUpdateRows(e,t,i){for(let r=0,a=null!=(s=null==t?void 0:t.length)?s:0;r<a;++r){var s;let a=t[r],o=this.upsertPath(this.getDataPath(e,a));o&&this.addOrUpdateRow(o,a,i)}}removeRows(e){for(let i=0,s=null!=(t=null==e?void 0:e.length)?t:0;i<s;++i){var t;let s=e[i],r=s.treeNode;null!==r&&this.removeRow(r,s)}}getDataPath({getDataPath:e},{data:t}){let i=(null==e?void 0:e(t))||Pn;return i.length||ep("getDataPath() should not return an empty path",[t]),i}upsertPath(e){let t=this.root,i=e.length-1;for(let s=0;s<=i;++s){let r=t.upsertKey(e[s]);if(s>=i)return r.invalidate(),r;t=r}return null}addOrUpdateRow(e,t,i){var s;let{level:r,row:a}=e;if(r<0)return;let o=!1;if(a!==t){let i=t.treeNode;null!==i&&i!==e&&(i.removeRow(t),i.invalidate()),null===a?(e.setRow(t),o=!0):a.data?e.addDuplicateRow(t)&&(o=!0):(e.setRow(t),this.destroyRow(a,!0),o=!0)}if(i&&!Pp(t)){let e;(1&(e=t.treeNodeFlags))!=0&&(t.treeNodeFlags=4|e),o=!0}o&&e.invalidate(),null==(s=this.rowsPendingDestruction)||s.delete(t)}removeRow(e,t){let{parent:i,level:s}=e;if(s<0)return;let r=!1;e.removeRow(t)&&(r=!0,i&&(i.childrenChanged=!0),this.destroyRow(t,!t.data)),r&&e.invalidate()}commitTree(e){let t=this.root;this.commitInvalidatedChildren(e,t);let i=t.row;if(t.childrenChanged&&t.updateChildrenAfterGroup()&&Pv(i),i.updateHasChildren(),Pg(i)){var s;null!=(s=e.changedPath)&&s.isActive()&&e.changedPath.addParentNode(i)}Pf(i),this.commitDestroyedRows()}commitInvalidatedChildren(e,t){for(;;){let i=t.dequeueInvalidated();if(null===i)break;i.parent===t&&this.commitChild(e,t,i)}}commitChild(e,t,i){i.isEmptyFillerNode()?this.clearTree(i):(this.commitNodePreOrder(t,i),this.commitInvalidatedChildren(e,i),this.commitNodePostOrder(e,t,i))}commitNodePreOrder(e,t){let i=t.row;if(null===i?(i=this.createFillerRow(t),t.setRow(i)):void 0===(i=t.sortFirstDuplicateRow()).allChildrenCount&&(i.allChildrenCount=null),i.parent=e.row,t.oldRow!==i)for(let e of t.enumChildren()){let t=e.row;null!==t&&(t.parent=i)}let s=t.key;if(i.key!==s){var r;let e;i.key=s,(1&(e=(r=i).treeNodeFlags))!=0&&(r.treeNodeFlags=12|e),this.setGroupData(i,s)}else i.groupData||this.setGroupData(i,s)}commitNodePostOrder(e,t,i){var s,r,a;let o=i.row,n=i.oldRow;if(i.isEmptyFillerNode())return void this.clearTree(i);i.childrenChanged&&i.updateChildrenAfterGroup()&&Pv(o),i.leafChildrenChanged&&i.updateAllLeafChildren();let l=i.getRowPosition();i.oldSourceRowIndex!==l&&(i.oldSourceRowIndex=l,t.childrenChanged=!0);let h=!!(null!=(s=o.childrenAfterGroup)&&s.length),d=h||!o.data,u=o.group;u!==d?(Pv(o),o.setGroup(d),d||o.expanded||Pm(o,!1)):o.hasChildren()!==h&&(Pv(o),o.updateHasChildren()),o.group&&!Pc(o)&&(n!==o&&null!==n&&n.group&&Pc(n)&&!e.isGroupOpenByDefault?o.expanded=n.expanded:o.expanded=this.getExpandedInitialValue(e,o),Pm(o,!0)),Pp(o)&&(Pv(t.row),(8&o.treeNodeFlags)!=0&&o.setData(o.data)),n!==o&&(i.oldRow=o,null!==n&&(u||i.hasChildren())&&Pv(o),t.childrenChanged=!0,Pv(t.row)),Pg(o)?null!=(a=e.changedPath)&&a.isActive()&&e.changedPath.addParentNode(o):!Pu(o)&&(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),Pf(o),null!=(r=i.duplicateRows)&&r.size&&!i.duplicateRowsWarned&&(i.duplicateRowsWarned=!0,ep("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(i.duplicateRows).map(e=>e.data)]))}createFillerRow(e){let t=new r4(this.beans);
552t.key=e.key,t.group=!0,t.field=null,t.leafGroup=!1,t.rowGroupIndex=null,t.allChildrenCount=null;let i=e.level+"-"+e.key,s=e.parent;for(;null!==s;){let e=s.parent;if(null===e)break;i=`${s.level}-${s.key}-${i}`,s=e}return t.id=r4.ID_PREFIX_ROW_GROUP+i,t}setGroupData(e,t){var i;let s={};e.groupData=s;let r=null==(i=this.showRowGroupColsService)?void 0:i.getShowRowGroupCols();if(r)for(let e of r)s[e.getColId()]=t}getExpandedInitialValue(e,t){let i=e.isGroupOpenByDefault;return i?!0==i({rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn}):-1===e.expandByDefault||t.level<e.expandByDefault}clearTree(e){let{parent:t,oldRow:i,row:s,level:r}=e;if(null!==t&&null!==i&&(t.childrenChanged=!0,null!==t.row&&Pv(t.row)),null!==s&&r>=0){let t=e.row;for(;null!==t&&e.removeRow(t);)this.destroyRow(t,!t.data),t=e.row}for(let t of e.enumChildren())this.clearTree(t);e.destroy()}destroyTree(e){let{row:t,level:i,duplicateRows:s}=e;if(t&&(i>=0&&!t.data?this.destroyRow(t,!0):PC(t)),s)for(let e of s)i>=0&&!e.data?this.destroyRow(e,!0):PC(e);for(let t of e.enumChildren())this.destroyTree(t);e.destroy()}destroyRow(e,t){if(!Pu(e))return void PC(e);if(!t){var i;(null!=(i=this.rowsPendingDestruction)?i:this.rowsPendingDestruction=new Set).add(e);return}PC(e),e.setRowIndex(null),e.setRowTop(null),!e.data&&e.isSelected()&&e.setSelectedParams({newValue:!1,source:"rowGroupChanged"})}commitDestroyedRows(){let{rowsPendingDestruction:e}=this;if(null!==e)for(let t of(this.rowsPendingDestruction=null,e))this.destroyRow(t,!0)}},Pw=class extends tk{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(e){this.selectableService=e.selectableService}execute(e){var t;let i=this.gos.get("treeData")?Py:Pa,s=this.strategy;(null==(t=s)?void 0:t.constructor)!==i&&(this.destroyBean(s),s=this.createManagedBean(new i),this.strategy=s),s.execute(e),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},Pb="PivotRowTotal_",PS=class extends tk{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.columnNameService=e.columnNameService}postConstruct(){let e=()=>{var e;return null!=(e=this.gos.get("serverSidePivotResultFieldSeparator"))?e:"_"};this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});let t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){let t=this.createPivotColumnsFromUniqueValues(e),i=function e(t,i=[]){return t.forEach(t=>{void 0!==t.children?e(t.children,i):i.push(t)}),i}(t);return this.addRowGroupTotals(t,i),this.addExpandablePivotGroups(t,i),this.addPivotTotalsToGroups(t,i),{pivotColumnGroupDefs:t,pivotColumnDefs:i.map(e=>tZ(e))}}createPivotColumnsFromUniqueValues(e){let t=this.funcColsService.getPivotColumns(),i=t.length;return this.recursivelyBuildGroup(0,e,[],i,t)}recursivelyBuildGroup(e,t,i,s,r){let a=this.funcColsService.getValueColumns();if(e>=s)return this.buildMeasureCols(i);let o=r[e].getColDef(),n=this.headerNameComparator.bind(this,o.pivotComparator);if(1===a.length&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===s-1){let e=[];return tK(t,t=>{let s=[...i,t],r=this.createColDef(a[0],t,s);r.columnGroupShow="open",e.push(r)}),e.sort(n),e}let l=[];return tK(t,(t,a)=>{let o=-1===this.pivotDefaultExpanded||e<this.pivotDefaultExpanded,n=[...i,t];l.push({children:this.recursivelyBuildGroup(e+1,a,n,s,r),headerName:t,pivotKeys:n,columnGroupShow:"open",openByDefault:o,groupId:this.generateColumnGroupId(n)})}),l.sort(n),l}buildMeasureCols(e){let t=this.funcColsService.getValueColumns();return 0===t.length?[this.createColDef(null,"-",e)]:t.map(t=>{let i=this.columnNameService.getDisplayNameForColumn(t,"header");return{...this.createColDef(t,i,e),columnGroupShow:"open"}})}addExpandablePivotGroups(e,t){let i=this.gos.get("suppressExpandablePivotGroups");
552if(i||this.gos.get("pivotColumnGroupTotals"))return;let s=(e,t,r)=>{if("children"in e){let a=new Map;e.children.forEach(e=>{s(e,t,a)});let o=this.funcColsService.getValueColumns(),n=!e.children.some(e=>e.children),l=n&&1===o.length&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn");o.forEach(s=>{let r=this.columnNameService.getDisplayNameForColumn(s,"header"),o=this.createColDef(s,r,e.pivotKeys);o.pivotTotalColumnIds=a.get(s.getColId()),o.columnGroupShow=i?"open":"closed",o.aggFunc=s.getAggFunc(),(!n||l)&&(e.children.push(o),t.push(o))}),this.merge(r,a);return}if(!e.pivotValueColumn)return;let a=e.pivotValueColumn.getColId();r.has(a)?r.get(a).push(e.colId):r.set(a,[e.colId])};e.forEach(e=>{s(e,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;let i="after"===this.gos.get("pivotColumnGroupTotals"),s=this.funcColsService.getValueColumns(),r=s.map(e=>e.getAggFunc());if(!r||r.length<1||!this.sameAggFuncs(r))return;let a=s[0];e.forEach(e=>{this.recursivelyAddPivotTotal(e,t,a,i)})}recursivelyAddPivotTotal(e,t,i,s){if(!e.children)return e.colId?[e.colId]:null;let r=[];if(e.children.forEach(e=>{let a=this.recursivelyAddPivotTotal(e,t,i,s);a&&(r=r.concat(a))}),e.children.length>1){let a=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),o=this.createColDef(i,a,e.pivotKeys,!0);o.pivotTotalColumnIds=r,o.aggFunc=i.getAggFunc(),o.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;let n=e.children;s?n.push(o):n.unshift(o),t.push(o)}return r}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;let i="after"===this.gos.get("pivotRowTotals"),s=this.funcColsService.getValueColumns().slice();i||s.reverse();let r=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let a=0;a<s.length;a++){let o=s[a],n=this.columnNameService.getDisplayNameForColumn(o,"header"),l=this.createColDef(o,n,[]),h=[];for(let e=0;e<t.length;e++){let i=t[e];i.pivotValueColumn===o&&h.push(i.colId)}l.pivotTotalColumnIds=h,l.colId=Pb+l.colId;let d=r?{children:[l],pivotKeys:[],groupId:`${Pb}_pivotGroup_${o.getColId()}`}:l;t.push(l),i?e.push(d):e.unshift(d)}}createColDef(e,t,i,s=!1){let r={};return e&&(Object.assign(r,e.getColDef()),r.hide=!1),r.headerName=t,r.colId=this.generateColumnId(i||[],e&&!s?e.getColId():""),r.field=r.colId,r.valueGetter=e=>{var t;return null==(t=e.data)?void 0:t[e.colDef.field]},r.pivotKeys=i,r.pivotValueColumn=e,!0===r.filter&&(r.filter="agNumberColumnFilter"),r}sameAggFuncs(e){if(1==e.length)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}headerNameComparator(e,t,i){return e?e(t.headerName,i.headerName):t.headerName&&!i.headerName?1:!t.headerName&&i.headerName?-1:t.headerName&&i.headerName?t.headerName<i.headerName?-1:+(t.headerName>i.headerName):0}merge(e,t){t.forEach((t,i)=>{let s=[...e.has(i)?e.get(i):[],...t];e.set(i,s)})}generateColumnGroupId(e){let t=this.funcColsService.getPivotColumns().map(e=>e.getColId());return`pivotGroup_${t.join("-")}_${e.join("-")}`}generateColumnId(e,t){let i=this.funcColsService.getPivotColumns().map(e=>e.getColId());return`pivot_${i.join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){let t={};for(let i=0;i<e.length;i++){let s=e[i].split(this.fieldSeparator),r=t;for(let e=0;e<s.length;e++){let t=s[e];null==r[t]&&(r[t]={}),r=r[t]}}let i=(e,t,s,r)=>{let a=[];for(let t in s){let o=s[t],n=i(`${e}${this.fieldSeparator}${t}`,t,o,r+1);a.push(n)}if(0===a.length){let i=this.columnModel.getColDefCol(t);if(i){var o;let s=null!=(o=this.columnNameService.getDisplayNameForColumn(i,"header"))?o:t,r=this.createColDef(i,s,void 0,!1);return r.colId=e,r.aggFunc=i.getAggFunc(),r.valueGetter=t=>{var i;return null==(i=t.data)?void 0:i[e]},r}return{colId:e,headerName:t,valueGetter:t=>{var i;return null==(i=t.data)?void 0:i[e]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===a.length&&"colId"in a[0]?(a[0].headerName=t,a[0]):{openByDefault:-1===this.pivotDefaultExpanded||r<this.pivotDefaultExpanded,groupId:e,headerName:t,children:a}},s=[];for(let e in t){let r=t[e],a=i(e,e,r,0);s.push(a)}return s}},Px="Exceeded maximum allowed pivot column count.",PM=class extends tk{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService,this.pivotColDefService=e.pivotColDefService}execute(e){let t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)}executePivotOff(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),e&&e.setInactive())}executePivotOn(e){var t;let i,s=null!=(t=this.funcColsService.getValueColumns().length)?t:1,r=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=-1===r?-1:r/s;try{i=this.bucketUpRowNodes(e)}catch(e){if(e.message===Px){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:e.message}),this.lastTimeFailed=!0;return}throw e}let a=this.setUniqueValues(i),o=this.funcColsService.getValueColumns(),n=o.map(e=>`${e.getId()}-${e.getColDef().headerName}`).join("#"),l=o.map(e=>e.getAggFunc().toString()).join("#"),h=this.aggregationColumnsHashLastTime!==n,d=this.aggregationFuncsHashLastTime!==l;this.aggregationColumnsHashLastTime=n,this.aggregationFuncsHashLastTime=l;let u=this.funcColsService.getRowGroupColumns().map(e=>e.getId()).join("#"),c=u!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=u;let p=this.gos.get("pivotRowTotals"),g=this.gos.get("pivotColumnGroupTotals"),m=this.gos.get("suppressExpandablePivotGroups"),v=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),f=p!==this.pivotRowTotalsLastTime||g!==this.pivotColumnGroupTotalsLastTime||m!==this.suppressExpandablePivotGroupsLastTime||v!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=p,this.pivotColumnGroupTotalsLastTime=g,this.suppressExpandablePivotGroupsLastTime=m,this.removePivotHeaderRowWhenSingleValueColumnLastTime=v,this.lastTimeFailed||a||h||c||d||f){let{pivotColumnGroupDefs:t,pivotColumnDefs:i}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=i,this.pivotResultColsService.setPivotResultCols(t,"rowModelUpdated"),e&&e.setInactive()}this.lastTimeFailed=!1}setUniqueValues(e){return JSON.stringify(e)!==JSON.stringify(this.uniqueValues)&&(this.uniqueValues=e,!0)}bucketUpRowNodes(e){this.currentUniqueCount=0;let t={};e.forEachChangedNodeDepthFirst(e=>{e.leafGroup&&(e.childrenMapped=null)});let i=e=>{if(e.leafGroup)this.bucketRowNode(e,t);else{var s;
552null==(s=e.childrenAfterFilter)||s.forEach(i)}};return e.executeFromRootNode(i),t}bucketRowNode(e,t){let i=this.funcColsService.getPivotColumns();0===i.length?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,i,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)}bucketChildren(e,t,i,s){let r={},a=t[i];if(e.forEach(e=>{let t=this.valueService.getKeyForNode(a,e);if(eD(t)&&(t=""),!s[t]){this.currentUniqueCount+=1,s[t]={};let e=-1!==this.maxUniqueValues,i=this.currentUniqueCount>this.maxUniqueValues;if(e&&i)throw Error(Px)}r[t]||(r[t]=[]),r[t].push(e)}),i===t.length-1)return r;{let e={};return tK(r,(r,a)=>{e[r]=this.bucketChildren(a,t,i+1,s[r])}),e}}getPivotColumnDefs(){return this.pivotColumnDefs}},PD=class extends tk{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(e=>{let t=e.getColDef().showRowGroup,i="string"==typeof t;(i||!0===t)&&(this.showRowGroupCols.push(e),i?this.showRowGroupColsMap[t]=e:this.funcColsService.getRowGroupColumns().forEach(t=>{this.showRowGroupColsMap[t.getId()]=e}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(e){return this.showRowGroupColsMap[e]}},PE="32.3.9",PI={version:PE,moduleName:`${eh.RowGroupingModule}-core`,beans:[F1,Pe,Pw,PS,PM,FY,F2,PD,F9],userComponents:[{name:"agGroupRowRenderer",classImp:AD},{name:"agGroupCellRenderer",classImp:AD}],controllers:[{name:"groupCellRendererCtrl",classImp:Ax}],dependantModules:[I9]},PA={version:PE,moduleName:`${eh.RowGroupingModule}-api`,apiFunctions:{addAggFunc:function(e,t,i){e.aggFuncService&&e.aggFuncService.addAggFuncs({key:i})},addAggFuncs:function(e,t){e.aggFuncService&&e.aggFuncService.addAggFuncs(t)},clearAggFuncs:function(e){e.aggFuncService&&e.aggFuncService.clear()},setColumnAggFunc:function(e,t,i){e.funcColsService.setColumnAggFunc(t,i,"api")},isPivotMode:function(e){return e.columnModel.isPivotMode()},getPivotResultColumn:function(e,t,i){return e.pivotResultColsService.lookupPivotResultCol(t,i)},setValueColumns:function(e,t){e.funcColsService.setValueColumns(t,"api")},getValueColumns:function(e){return e.funcColsService.getValueColumns()},removeValueColumn:function(e,t){e.funcColsService.removeValueColumns([t],"api")},removeValueColumns:function(e,t){e.funcColsService.removeValueColumns(t,"api")},addValueColumn:function(e,t){e.funcColsService.addValueColumns([t],"api")},addValueColumns:function(e,t){e.funcColsService.addValueColumns(t,"api")},setRowGroupColumns:function(e,t){e.funcColsService.setRowGroupColumns(t,"api")},removeRowGroupColumn:function(e,t){e.funcColsService.removeRowGroupColumns([t],"api")},removeRowGroupColumns:function(e,t){e.funcColsService.removeRowGroupColumns(t,"api")},addRowGroupColumn:function(e,t){e.funcColsService.addRowGroupColumns([t],"api")},addRowGroupColumns:function(e,t){e.funcColsService.addRowGroupColumns(t,"api")},getRowGroupColumns:function(e){return e.funcColsService.getRowGroupColumns()},moveRowGroupColumn:function(e,t,i){e.funcColsService.moveRowGroupColumn(t,i,"api")},setPivotColumns:function(e,t){e.funcColsService.setPivotColumns(t,"api")},removePivotColumn:function(e,t){e.funcColsService.removePivotColumns([t],"api")},removePivotColumns:function(e,t){e.funcColsService.removePivotColumns(t,"api")},addPivotColumn:function(e,t){e.funcColsService.addPivotColumns([t],"api")},addPivotColumns:function(e,t){e.funcColsService.addPivotColumns(t,"api")},getPivotColumns:function(e){return e.funcColsService.getPivotColumns()},setPivotResultColumns:function(e,t){e.pivotResultColsService.setPivotResultCols(t,"api")},getPivotResultColumns:function(e){let t=e.pivotResultColsService.getPivotResultCols();return t?t.list:null}},dependantModules:[PI]},PR={version:PE,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:Pt}],dependantModules:[PI,oo]},PT={version:PE,moduleName:eh.RowGroupingModule,dependantModules:[PI,PA,PR,{version:PE,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:Pi}],dependantModules:[PR,ol]}]},PL=class extends F6{constructor(e){super(e,"aggregation")}postConstruct(){let e=this.localeService.getLocaleTextFunc(),t=e("valueColumnsEmptyMessage","Drag here to aggregate"),i=e("values","Values");super.init({icon:sq("valuePanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){let e=super.getTooltipParams();return e.location="valueColumnsList",e}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(e,t){return!this.gos.get("functionsReadOnly")&&!!e.isPrimary()&&e.isAllowValue()&&(!e.isValueActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setValueColumns(e,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}};function PF(e){return!!e&&void 0!==e.children}function PP(e){return PF(e)?e.groupId:e.colId}var Pk=class extends tk{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(e){this.columnModel=e.columnModel}createColumnTree(e){let t=[],i=(e,s)=>{if(PF(e)){let t=void 0!==e.groupId?e.groupId:e.headerName,r=new tO(e,t,!1,s),a=[];
552return e.children.forEach(e=>{let t=i(e,s+1);t&&a.push(t)}),r.setChildren(a),r}{let i=e.colId?e.colId:e.field,s=this.columnModel.getColDefCol(i);return s||t.push(e),s}},s=[];return e.forEach(e=>{let t=i(e,0);t&&s.push(t)}),t.length>0&&ep("unable to find grid columns for the supplied colDef(s):",t),s}syncLayoutWithGrid(e){e(function(e){let t=(e,t)=>PF(e)&&PF(t)&&PP(e)===PP(t),i=(e,t)=>!PF(t)||t.children&&t.groupId&&function e(t,i,s){let r,a,o;if(!PF(t))return!0;if(r=tS(t.children.map(PP),PP(s)),o=(a=tp(t.children))&&PP(a)!==PP(s),r&&o||t.groupId===i&&!tS(t.children.map(PP),PP(s)))return t.children.push(s),!0;for(let r=t.children.length-1;r>=0&&!e(t.children[r],i,s);r--);return!1}(e,t.groupId,t.children[0])?e:(t.children.forEach(t=>i(e,t)),e),s=[];for(let r=1;r<=e.length;r++){let a=e[r-1],o=e[r];t(a,o)?e[r]=i(a,o):s.push(a)}return s}(this.getLeafPathTrees()))}getLeafPathTrees(){let e=(t,i)=>{let s;if(tN(t))if(t.isPadding())s=i;else{let e=Object.assign({},t.getColGroupDef());e.groupId=t.getGroupId(),e.children=[i],s=e}else{let e=Object.assign({},t.getColDef());e.colId=t.getColId(),s=e}let r=t.getOriginalParent();return r?e(r,s):s};return this.columnModel.getCols().filter(e=>{let t=e.getColDef();return e.isPrimary()&&!t.showRowGroup}).map(t=>e(t,t.getColDef()))}},PN=class extends s${constructor(e){super(),this.eToggleButton=s_,this.eIconWrapper=s_,this.eLabel=s_,this.toolPanelDef=e}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){let e=this.createTemplate();this.setTemplate(e,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
553                <button type="button" data-ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">
554                    <div data-ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>
555                    <span data-ref="eLabel" class="ag-side-button-label"></span>
556                </button>
557            </div>`}setLabel(){let e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,i=e(t.labelKey,t.labelDefault);this.eLabel.innerText=i}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",sq(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(e){this.addOrRemoveCssClass("ag-selected",e),iZ(this.eToggleButton,e)}getButtonElement(){return this.eToggleButton}},PO={selector:"AG-SIDE-BAR-BUTTONS",component:class extends s${constructor(){super('<div class="ag-side-buttons" role="tablist"></div>'),this.buttonComps=[]}wireBeans(e){this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){if(e.key===s9.TAB&&e.shiftKey){if(this.focusService.focusNextGridCoreContainer(!0))return void e.preventDefault();tR(e)}}setActiveButton(e){this.buttonComps.forEach(t=>{t.setSelected(e===t.getToolPanelId())})}addButtonComp(e){let t=this.createBean(new PN(e));return this.buttonComps.push(t),this.appendChild(t),t.addEventListener("toggleButtonClicked",()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:e.id})}),t}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),sm(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}}}
557,PG={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},PB={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},Pz={columns:PG,filters:PB};function PV(e){if(e){var t;let i;if(!0===e)return{toolPanels:[PG,PB],defaultToolPanel:"columns"};if("string"==typeof e)return PV([e]);if(Array.isArray(e)){let t=[];if(e.forEach(e=>{let i=Pz[e];i?t.push(i):PH(e)}),0===t.length)return;return{toolPanels:t,defaultToolPanel:t[0].id}}return{toolPanels:(t=e.toolPanels,i=[],t&&t.forEach(e=>{let t=null;if("string"==typeof e){let i=Pz[e];if(!i)return void PH(e);t=i}else t=e;i.push(t)}),i),defaultToolPanel:e.defaultToolPanel,hiddenByDefault:e.hiddenByDefault,position:e.position}}}function PH(e){ep(`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(Pz).join(",")}`)}var Pj=class extends s${constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}wireBeans(e){this.horizontalResizeService=e.horizontalResizeService}setElementToResize(e){this.elementToResize=e}postConstruct(){let e=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(e),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(e,t,i){this.eventService.dispatchEvent({type:"toolPanelSizeChanged",width:i,started:e,ended:t})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(e){return this.onResizing(e,!0)}onResizing(e,t=!1){let i=this.inverted?-1:1,s=Math.max(this.minWidth,Math.floor(this.startingWidth-e*i));null!=this.maxWidth&&(s=Math.min(this.maxWidth,s)),this.elementToResize.style.width=`${s}px`,this.dispatchResizeEvent(!1,t,s)}setInverted(e){this.inverted=e}setMaxWidth(e){this.maxWidth=e}setMinWidth(e){null!=e?this.minWidth=e:this.minWidth=100}},PW=class extends s${wireBeans(e){this.userComponentFactory=e.userComponentFactory}constructor(){super('<div class="ag-tool-panel-wrapper" role="tabpanel"/>')}postConstruct(){let e=this.getGui(),t=this.resizeBar=this.createManagedBean(new Pj);e.setAttribute("id",`ag-${this.getCompId()}`),t.setElementToResize(e),this.appendChild(t)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(e,t){let{id:i,minWidth:s,maxWidth:r,width:a}=e;this.toolPanelId=i,this.width=a;let o=this.userComponentFactory.getToolPanelCompDetails(e,t),n=o.newAgStackInstance();(this.params=o.params,null==n)?ep(`error processing tool panel component ${i}. You need to specify 'toolPanel'`):(n.then(this.setToolPanelComponent.bind(this)),null!=s&&this.resizeBar.setMinWidth(s),null!=r&&this.resizeBar.setMaxWidth(r))}setToolPanelComponent(e){this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.destroyBean(e)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(e){let t=this.gos.get("enableRtl"),i="left"===e;this.resizeBar.setInverted(t?i:!i)}refresh(){var e;null==(e=this.toolPanelCompInstance)||e.refresh(this.params)}},PU={selector:"AG-SIDE-BAR",component:class extends s${constructor(){super(`<div class="ag-side-bar ag-unselectable">
558            <ag-side-bar-buttons data-ref="sideBarButtons"></ag-side-bar-buttons>
559        </div>`,[PO]),this.sideBarButtons=s_,this.toolPanelWrappers=[]}wireBeans(e){this.focusService=e.focusService,this.filterManager=e.filterManager,this.sideBarService=e.sideBarService}postConstruct(){var e;this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));let{sideBar:t}=null!=(e=this.gos.get("initialState"))?e:{};this.setSideBarDef({sideBarDef:PV(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);let i=this.getFocusableElement();this.createManagedBean(new ai(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),hv(this,i,this.focusService)}onTabKeyDown(e){if(e.defaultPrevented)return;let{focusService:t,sideBarButtons:i}=this,s=this.getGui(),r=i.getGui(),a=eZ(this.gos),o=s.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),n=e.target;if(!o)return t.focusNextGridCoreContainer(e.shiftKey,!0);if(r.contains(a)){t.focusInto(o,e.shiftKey)&&e.preventDefault();return}if(!e.shiftKey)return;let l=null;o.contains(a)?l=this.focusService.findNextFocusableElement(o,void 0,!0):t.isTargetUnderManagedComponent(o,n)&&e.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(o,n)),l||(l=r.querySelector(".ag-selected button")),l&&l!==e.target&&(e.preventDefault(),l.focus())}handleKeyDown(e){let t=eZ(this.gos);if(!this.sideBarButtons.getGui().contains(t))return;let i=this.sideBarButtons.getGui(),s=Array.prototype.slice.call(i.querySelectorAll(".ag-side-button")),r=s.findIndex(e=>e.contains(t)),a=null;switch(e.key){case s9.LEFT:case s9.UP:a=Math.max(0,r-1);break;case s9.RIGHT:case s9.DOWN:a=Math.min(r+1,s.length-1)}if(null===a)return;let o=s[a].querySelector("button");o&&(o.focus(),e.preventDefault())}onToolPanelButtonClicked(e){let t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:e,sideBarState:t,existingToolPanelWrappers:i}){if(this.setDisplayed(!1),this.sideBar=e,this.sideBar&&this.sideBar.toolPanels){let e=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(e,t,i),!this.toolPanelWrappers.length)return;let s=t?t.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(s),this.setSideBarPosition(t?t.position:this.sideBar.position),s)if(t){let{openToolPanel:e}=t;e&&this.openToolPanel(e,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(e){e||(e="right"),this.position=e;let t="left"===e,i=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEac
559h(e=>{e.setResizerSizerSide(i)}),this.dispatchSideBarUpdated(),this}setDisplayed(e,t){super.setDisplayed(e,t),this.dispatchSideBarUpdated()}getState(){let e={};return this.toolPanelWrappers.forEach(t=>{var i,s;e[t.getToolPanelId()]=null==(i=t.getToolPanelInstance())||null==(s=i.getState)?void 0:s.call(i)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:e}}createToolPanelsAndSideButtons(e,t,i){for(let r of e){var s;this.createToolPanelAndSideButton(r,null==t||null==(s=t.toolPanels)?void 0:s[r.id],null==i?void 0:i[r.id])}}validateDef(e){if(null==e.id)return ep("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if("agColumnsToolPanel"===e.toolPanel&&!this.gos.assertModuleRegistered(eh.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if("agFiltersToolPanel"===e.toolPanel){var t;if(!this.gos.assertModuleRegistered(eh.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if(null!=(t=this.filterManager)&&t.isAdvancedFilterEnabled())return ep("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(e,t,i){let s;if(!this.validateDef(e))return;let r=this.sideBarButtons.addButtonComp(e);i?s=i:(s=this.createBean(new PW)).setToolPanelDef(e,{initialState:t,onStateUpdated:()=>this.dispatchSideBarUpdated()}),s.setDisplayed(!1);let a=s.getGui();this.appendChild(a),this.toolPanelWrappers.push(s),i7(r.getButtonElement(),a)}refresh(){this.toolPanelWrappers.forEach(e=>e.refresh())}openToolPanel(e,t="api"){let i=this.openedItem();i===e||(this.toolPanelWrappers.forEach(t=>{let i=e===t.getToolPanelId();t.setDisplayed(i)}),i!==this.openedItem()&&(this.sideBarButtons.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,null!=i?i:void 0,t)))}getToolPanelInstance(e){let t=this.toolPanelWrappers.filter(t=>t.getToolPanelId()===e)[0];return t?t.getToolPanelInstance():void ep(`unable to lookup Tool Panel as invalid key supplied: ${e}`)}raiseToolPanelVisibleEvent(e,t,i){let s=!!e&&!!t;t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:i,key:t,visible:!1,switchingToolPanel:s}),e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:i,key:e,visible:!0,switchingToolPanel:s})}close(e="api"){this.openToolPanel(void 0,e)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let e=null;return this.toolPanelWrappers.forEach(t=>{t.isDisplayed()&&(e=t.getToolPanelId())}),e}onSideBarUpdated(){let e=PV(this.gos.get("sideBar")),t={};if(e&&this.sideBar){var i;null==(i=e.toolPanels)||i.forEach(e=>{var i,s,r;let{id:a}=e;if(!a)return;let o=null==(i=this.sideBar.toolPanels)?void 0:i.find(e=>e.id===a);if(!o||e.toolPanel!==o.toolPanel)return;let n=this.toolPanelWrappers.find(e=>e.getToolPanelId()===a);if(!n)return;let l=this.gos.addGridCommonParams({...null!=(s=e.toolPanelParams)?s:{},onStateUpdated:()=>this.dispatchSideBarUpdated()});!0===(null==(r=n.getToolPanelInstance())?void 0:r.refresh(l))&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(e=>e!==n),sv(n.getGui()),t[a]=n)})}this.clearDownUi(),this.setSideBarDef({sideBarDef:e,existingToolPanelWrappers:t})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(e=>{sv(e.getGui()),this.destroyBean(e)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}}},P_=class extends tk{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(e){this.sideBarComp=e}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return PU}},P$="32.3.9",PY={version:P$,moduleName:`${eh.SideBarModule}-core`,beans:[Pk,P_],dependantModules:[I9]},PK={version:P$,moduleName:`${eh.SideBarModule}-api`,apiFunctions:{isSideBarVisible:function(e){var t,i;return null!=(t=null==(i=e.sideBarService)?void 0:i.getSideBarComp().isDisplayed())&&t},setSideBarVisible:function(e,t){var i;null==(i=e.sideBarService)||i.getSideBarComp().setDisplayed(t)},setSideBarPosition:function(e,t){var i;null==(i=e.sideBarService)||i.getSideBarComp().setSideBarPosition(t)},openToolPanel:function(e,t){var i;null==(i=e.sideBarService)||i.getSideBarComp().openToolPanel(t,"api")},closeToolPanel:function(e){var t;null==(t=e.sideBarService)||t.getSideBarComp().close("api")},getOpenedToolPanel:function(e){var t,i;return null!=(t=null==(i=e.sideBarService)?void 0:i.getSideBarComp().openedItem())?t:null},refreshToolPanel:function(e){var t;null==(t=e.sideBarService)||t.getSideBarComp().refresh()},isToolPanelShowing:function(e){var t,i;return null!=(t=null==(i=e.sideBarService)?void 0:i.getSideBarComp().isToolPanelShowing())&&t},getToolPanelInstance:function(e,t){var i;return rB(null==(i=e.sideBarService)?void 0:i.getSideBarComp().getToolPanelInstance(t))},getSideBar:function(e){var t;return null==(t=e.sideBarService)?void 0:t.getSideBarComp().getDef()}},dependantModules:[PY]},PZ={version:P$,moduleName:eh.SideBarModule,dependantModules:[PY,PK]}
559,Pq={selector:"AG-PRIMARY-COLS-HEADER",component:class extends s${constructor(){super(`<div class="ag-column-select-header" role="presentation">
560            <div data-ref="eExpand" class="ag-column-select-header-icon"></div>
561            <ag-checkbox data-ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>
562            <ag-input-text-field class="ag-column-select-header-filter-wrapper" data-ref="eFilterTextField"></ag-input-text-field>
563        </div>`,[rr,aC]),this.eExpand=s_,this.eSelect=s_,this.eFilterTextField=s_}wireBeans(e){this.columnModel=e.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===s9.SPACE&&(e.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});let e=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){let e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;let t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=sq("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=sq("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=sq("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){let e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,i=!this.params.suppressColumnExpandAll,s=this.columnModel.isProvidedColGroupsPresent(),r=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(r("searchOoo","Search...")),ss(this.eFilterTextField.getGui(),e),ss(this.eSelect.getGui(),t),ss(this.eExpand,i&&s)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=ey(()=>{let e=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:e})},300)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(e){e.key===s9.ENTER&&setTimeout(()=>this.onSelectClicked(),300)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:0===this.expandState?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,ss(this.eExpandChecked,0===this.expandState),ss(this.eExpandUnchecked,1===this.expandState),ss(this.eExpandIndeterminate,2===this.expandState)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}}},PQ=class{constructor(e,t,i,s=!1,r){this.localEventService=new el,this.displayName=e,this.dept=i,this.group=s,s?(this.columnGroup=t,this.expanded=r,this.children=[]):this.column=t}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(e){e!==this.expanded&&(this.expanded=e,this.localEventService.dispatchEvent({type:"expandedChanged"}))}setPassesFilter(e){this.passesFilter=e}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}},PX=class extends s${constructor(e,t,i){super('<div class="ag-menu"></div>'),this.column=e,this.mouseEvent=t,this.parentEl=i,this.displayName=null}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.popupService=e.popupService,this.focusService=e.focusService}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),t3(this.column)?this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();let e=this.getMappedMenuItems();0!==e.length&&this.displayContextMenu(e)}}initializeProperties(e){tN(e)?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){let e=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>
563e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColGroupLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{let e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>e("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>e("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{let e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>e("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{let e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter(t=>-1===e.indexOf(t)))}removeColumnsFromList(e){return e.filter(e=>-1===this.columns.indexOf(e))}displayContextMenu(e){let t=this.getGui(),i=this.createBean(new Af),s=this.localeService.getLocaleTextFunc(),r=()=>{};t.appendChild(i.getGui()),i.addMenuItems(e),i.addManagedListeners(i,{closeMenu:()=>{this.parentEl.focus(),r()}});let a=this.popupService.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(i.getGui()),ariaLabel:s("ariaLabelContextMenu","Context Menu"),closedCallback:e=>{e instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(i)}});a&&(r=a.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){let e=[];for(let t of this.menuItemMap.values()){let i=this.columns.some(e=>t.allowedFunction(e)&&!t.activeFunction(e)),s=this.columns.some(e=>t.allowedFunction(e)&&t.activeFunction(e));i&&e.push({name:t.activateLabel(this.displayName),icon:sq(t.addIcon,this.gos,null),action:()=>t.activateFunction()}),s&&e.push({name:t.deactivateLabel(this.displayName),icon:sq(t.removeIcon,this.gos,null),action:()=>t.deActivateFunction()})}return e}},PJ=class extends s${constructor(e,t,i,s){super(),this.modelItem=e,this.allowDragging=t,this.eventType=i,this.focusWrapper=s,this.cbSelect=s_,this.eLabel=s_,this.eGroupOpenedIcon=s_,this.eGroupClosedIcon=s_,this.eColumnGroupIcons=s_,this.processingColumnStateChange=!1,this.modelItem=e,this.columnGroup=e.getColumnGroup(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName(),this.allowDragging=t}wireBeans(e){this.columnModel=e.columnModel,this.dragAndDropService=e.dragAndDropService,this.modelItemUtils=e.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column-group">
564                <span class="ag-column-group-icons" data-ref="eColumnGroupIcons" >
565                    <span class="ag-column-group-closed-icon" data-ref="eGroupClosedIcon"></span>
566                    <span class="ag-column-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
567                </span>
568                <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
569                <span class="ag-column-select-column-label" data-ref="eLabel"></span>
570            </div>`,[rr]),this.eDragHandle=sq("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");let e=this.cbSelect.getGui(),t=this.cbSelect.getInputElement();e.insertAdjacentElement("afterend",this.eDragHandle),t.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),a_(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(e=>this.addOrRemoveCssClass(e,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){let e,t=this.columnGroup.getColGroupDef();if(!t)return;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);let i=()=>{let i=t.headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:e})};i(),this.addManagedEventListeners({newColumnsLoaded:i})}getTooltipParams(){let e=super.getTooltipParams();return e.location="columnToolPanelColumnGroup",e}handleKeyDown(e){switch(e.key){case s9.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case s9.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case s9.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected())}}onContextMenu(e){let{columnGroup:t,gos:i}=this;if(i.get("functionsReadOnly"))return;let s=this.createBean(new PX(t,e,this.focusWrapper));this.addDestroyFunc(()=>{s.isAlive()&&this.destroyBean(s)})}addVisibilityListenersToAllChildren(){let e=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{this.addManagedListeners(t,{visibleChanged:e,columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e})})}setupDragging(){if(!this.allowDragging)return void ss(this.eDragHandle,!1);let e=!this.gos.get("suppressDragLeaveHidesColumns"),t={type:r$.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:null==t?void 0:t.visibleState,pivotState:null==t?void 0:t.pivotState,eventType:this.eventType})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}createDragItem(){let e=this.columnGroup.getLeafColumns(),t={},i={};return e.forEach(e=>{let s=e.getId();t[s]=e.isVisible(),i[s]=this.modelItemUtils.createPivotState(e)}),{columns:e,visibleState:t,pivotState:i}}setupExpandContract(){this.eGroupClosedIcon.appendChild(sZ("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(sZ("columnSelectOpen",this.gos,null));let e=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:e}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:e});let t=new sJ(this.eColumnGroupIcons,!0);this.addManagedListeners(t,{tap:e}),this.addDestroyFunc(t.destroy.bind(t))}onLabelClicked(){let e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){let e=[],t=i=>
570{i.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?t(i.getChildren()):e.push(i.getColumn()))})};return t(this.modelItem.getChildren()),e}onChangeCommon(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)}refreshAriaLabel(){let e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),i=this.cbSelect.getValue(),s=void 0===i?e("ariaIndeterminate","indeterminate"):i?e("ariaVisible","visible"):e("ariaHidden","hidden"),r=e("ariaToggleVisibility","Press SPACE to toggle visibility");ij(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${r} (${s})`),iU(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){let e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(e),this.cbSelect.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){let e=this.columnModel.isPivotMode(),t=this.getVisibleLeafColumns(),i=0,s=0;if(t.forEach(t=>{(e||!t.getColDef().lockVisible)&&(this.isColumnChecked(t,e)?i++:s++)}),!(i>0)||!(s>0))return i>0}workOutReadOnlyValue(){let e=this.columnModel.isPivotMode(),t=0;return this.columnGroup.getLeafColumns().forEach(i=>{e?i.isAnyFunctionAllowed()&&t++:!i.getColDef().lockVisible&&t++}),0===t}isColumnChecked(e,t){if(t){let t=e.isPivotActive(),i=e.isRowGroupActive(),s=e.isValueActive();return t||i||s}return e.isVisible()}onExpandOrContractClicked(){let e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){let e=this.modelItem.isExpanded();ss(this.eGroupClosedIcon,!e),ss(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){iZ(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(e){let t=this.cbSelect.getValue();this.cbSelect.isReadOnly()||(!e||t)&&(e||!t)||this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}},P0=class extends tk{constructor(e,t){super(),this.comp=e,this.virtualList=t}wireBeans(e){this.columnMoveService=e.columnMoveService,this.columnModel=e.columnModel}postConstruct(){this.createManagedBean(new Ab(this.comp,this.virtualList,{dragSourceType:r$.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:this.eventService,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:e=>this.isMoveBlocked(e),getNumRows:e=>e.getDisplayedColsList().length,moveItem:(e,t)=>this.moveItem(this.getCurrentColumnsBeingMoved(e),t)}))}getCurrentDragValue(e){return e.column}getCurrentColumnsBeingMoved(e){return tN(e)?e.getLeafColumns():e?[e]:[]}isMoveBlocked(e){return!!this.gos.get("suppressMovableColumns")||!!this.getCurrentColumnsBeingMoved(e).find(e=>{let t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition})}moveItem(e,t){if(!t)return;let{component:i}=t,s=null,r="top"===t.position;if(i instanceof PJ?(s=i.getColumns()[0],r=!0):i&&(s=i.getColumn()),!s)return;let a=this.getMoveTargetIndex({currentColumns:e,lastHoveredColumn:s,isBefore:r});null!=a&&this.columnMoveService.moveColumns(e,a,"toolPanelUi")}getMoveTargetIndex(e){let{currentColumns:t,lastHoveredColumn:i,isBefore:s}=e;if(!i||!t)return null;let r=this.columnModel.getCols().indexOf(i),a=s?r:r+1,o=this.getMoveDiff(t,a);return a-o}getMoveDiff(e,t){let i=this.columnModel.getCols();if(!e)return 0;let s=e[0],r=e.length;return i.indexOf(s)<t?r:0}},P1=class extends s${constructor(e,t,i,s){super(),this.allowDragging=t,this.groupsExist=i,this.focusWrapper=s,this.eLabel=s_,this.cbSelect=s_,this.processingColumnStateChange=!1,this.column=e.getColumn(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName()}wireBeans(e){this.columnModel=e.columnModel,this.dragAndDropService=e.dragAndDropService,this.modelItemUtils=e.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column">
571                <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
572                <span class="ag-column-select-column-label" data-ref="eLabel"></span>
573            </div>`,[rr]),this.eDragHandle=sq("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");let e=this.cbSelect.getGui(),t=this.cbSelect.getInputElement();e.insertAdjacentElement("afterend",this.eDragHandle),t.setAttribute("tabindex","-1");let i=ig(this.displayName);this.eLabel.innerHTML=i;let s=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${s}`),this.getGui().style.setProperty("--ag-indentation-level",String(s)),this.setupDragging();let r=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:r}),this.addManagedListeners(this.column,{columnValueChanged:r,columnPivotChanged:r,columnRowGroupChanged:r,visibleChanged:r}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),a_(this.column.getColDef(),this.gos,this.column,null).forEach(e=>this.addOrRemoveCssClass(e,!0))}getColumn(){return this.column}setupTooltip(){let e;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);let t=()=>{let t=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};t(),this.addManagedEventListeners({newColumnsLoaded:t})}getTooltipParams(){let e=super.getTooltipParams();return e.location="columnToolPanelColumn",e.colDef=this.column.getColDef(),e}onContextMenu(e){let{column:t,gos:i}=this;if(i.get("functionsReadOnly"))return;let s=this.createBean(new PX(t,e,this.focusWrapper));this.addDestroyFunc(()=>{s.isAlive()&&this.destroyBean(s)})}handleKeyDown(e){e.key===s9.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;let e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))}refreshAriaLabel(){let e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),i=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),s=e("ariaToggleVisibility","Press SPACE to toggle visibility");ij(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${s} (${i})`),iU(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging)return void ss(this.eDragHandle,!1);let e=!this.gos.get("suppressDragLeaveHidesColumns"),t={type:r$.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:null==t?void 0:t.visibleState,pivotState:null==t?void 0:t.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}createDragItem(){let e=this.column.getColId(),t={[e]:this.column.isVisible()},i={[e]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:t,pivotState:i}}onColumnStateChanged(){this.processingColumnStateChange=!0;let e=this.columnModel.isPivotMode();if(e){let e=this.column.isAnyFunctionActive();this.cbSelect.setValue(e)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,i=!0;if(e){let e=this.gos.get("functionsReadOnly"),s=!this.column.isAnyFunctionAllowed();i=t=!e&&!s}else{let{enableRowGroup:e,enableValue:s,lockPosition:r,suppressMovable:a,lockVisible:o}=this.column.getColDef();t=!o,i=!!e||!!s||!(r||a)}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!i),this.addOrRemoveCssClass("ag-column-select-column-readonly",!i&&!t),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){e===this.cbSelect.getValue()||this.cbSelect.isReadOnly()||this.cbSelect.toggle(
573)}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){ep("can not expand a column item that does not represent a column group header")}},P2=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},P3={selector:"AG-PRIMARY-COLS-LIST",component:class extends s${constructor(){super('<div class="ag-column-select-list" role="presentation"></div>'),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.colDefService=e.toolPanelColDefService,this.modelItemUtils=e.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(e=>e()),this.destroyColumnItemFuncs=[]}init(e,t,i){this.params=e,this.allowDragging=t,this.eventType=i,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});let s=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:s,columnPivotModeChanged:s,columnRowGroupChanged:s,columnValueChanged:s,columnVisible:s,newColumnsLoaded:s}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new An({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((e,t)=>(i_(t,e.getDept()+1),this.createComponentFromItem(e,t))),this.columnModel.isReady()&&this.onColumnsChanged(),this.params.suppressColumnMove||this.createManagedBean(new P0(this,this.virtualList))}createComponentFromItem(e,t){if(e.isGroup()){let i=new PJ(e,this.allowDragging,this.eventType,t);return this.createBean(i),i}let i=new P1(e,this.allowDragging,this.groupsExist,t);return this.createBean(i),i}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);let e=this.getExpandedStates(),t=this.columnModel.isPivotMode();this.params.suppressSyncLayoutWithGrid||t?this.buildTreeFromProvidedColumnDefs():this.buildTreeFromWhatGridIsDisplaying(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){let e={};if(this.isInitialState){let{expandedGroupIds:t}=this.params.initialState;return t.forEach(t=>{e[t]=!0}),e}return this.allColsTree?(this.forEachItem(t=>{if(!t.isGroup())return;let i=t.getColumnGroup();i&&(e[i.getId()]=t.isExpanded())}),e):{}}setExpandedStates(e){if(!this.allColsTree)return;let{isInitialState:t}=this;this.forEachItem(i=>{if(!i.isGroup())return;let s=i.getColumnGroup();if(s){let r=e[s.getId()];(null!=r||t)&&i.setExpanded(!!r)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(e){let t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some(e=>e&&void 0!==e.children),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(e){let t=this.onColumnExpanded.bind(this),i=e=>{e.addEventListener("expandedChanged",t);let i=e.removeEventListener.bind(e,"expandedChanged",t);this.destroyColumnItemFuncs.push(i)},s=(e,t,i)=>{e.forEach(e=>{tN(e)?r(e,t,i):a(e,t,i)})},r=(e,t,r)=>{let a=e.getColGroupDef();if(a&&a.suppressColumnsToolPanel)return;if(e.isPadding())return void s(e.getChildren(),t,r);let o=new PQ(this.columnNameService.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),e,t,!0,this.expandGroupsByDefault);r.push(o),i(o),s(e.getChildren(),t+1,o.getChildren())},a=(e,t,i)=>{if(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)return;let s=this.columnNameService.getDisplayNameForColumn(e,"columnToolPanel");i.push(new PQ(s,e,t))};this.destroyColumnTree(),s(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];let e=t=>{t.isPassesFilter()&&(this.displayedColsList.push(t),t.isGroup()&&t.isExpanded()&&t.getChildren().forEac
573h(e))};this.allColsTree.forEach(e),this.virtualList.setModel(new P2(this.displayedColsList));let t=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=t&&this.focusRowIfAlive(t),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){let e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),i=e("columns","Columns"),s=this.displayedColsList.length;ij(this.virtualList.getAriaElement(),`${t} ${s} ${i}`)}focusRowIfAlive(e){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e)},0)}forEachItem(e){let t=i=>{i.forEach(i=>{e(i),i.isGroup()&&t(i.getChildren())})};this.allColsTree&&t(this.allColsTree)}doSetExpandedAll(e){this.forEachItem(t=>{t.isGroup()&&t.setExpanded(e)})}setGroupsExpanded(e,t){if(!t)return void this.doSetExpandedAll(e);let i=[];this.forEachItem(s=>{if(!s.isGroup())return;let r=s.getColumnGroup().getId();t.indexOf(r)>=0&&(s.setExpanded(e),i.push(r))});let s=t.filter(e=>!tS(i,e));s.length>0&&ep("unable to find group(s) for supplied groupIds:",s)}getExpandState(){let e=0,t=0;return(this.forEachItem(i=>{i.isGroup()&&(i.isExpanded()?e++:t++)}),e>0&&t>0)?2:+(t>0)}doSetSelectedAll(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0,i=this.columnModel.isPivotMode();if(this.forEachItem(s=>{let r;if(s.isGroup()||!s.isPassesFilter())return;let a=s.getColumn(),o=a.getColDef();
573if(i){if(!a.isAllowPivot()&&!a.isAllowRowGroup()&&!a.isAllowValue())return;r=a.isValueActive()||a.isPivotActive()||a.isRowGroupActive()}else{if(o.lockVisible)return;r=a.isVisible()}r?e++:t++}),!(e>0)||!(t>0))return!(0===e||t>0)}setFilterText(e){this.filterText=eM(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){let e=e=>{if(!eM(this.filterText))return!0;let t=e.getDisplayName();return null==t||-1!==t.toLowerCase().indexOf(this.filterText)},t=(i,s)=>{let r=!1;if(i.isGroup()){let a=e(i);i.getChildren().forEach(e=>{let i=t(e,a||s);i&&(r=i)})}let a=!!s||!!r||e(i);return i.setPassesFilter(a),a};this.allColsTree.forEach(e=>t(e,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){let e=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;let e=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:e})}getExpandedGroups(){let e=[];return this.allColsTree&&this.forEachItem(t=>{t.isGroup()&&t.isExpanded()&&e.push(t.getColumnGroup().getId())}),e}}},P4=class extends s${constructor(){super(`<div class="ag-column-select">
574            <ag-primary-cols-header data-ref="primaryColsHeaderPanel"></ag-primary-cols-header>
575            <ag-primary-cols-list data-ref="primaryColsListPanel"></ag-primary-cols-list>
576        </div>`,[Pq,P3]),this.primaryColsHeaderPanel=s_,this.primaryColsListPanel=s_}init(e,t,i){this.allowDragging=e,this.params=t,this.eventType=i,this.primaryColsHeaderPanel.init(this.params);let s=this.params.suppressColumnFilter,r=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&s&&r&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListeners(this.primaryColsListPanel,{groupExpanded:this.onGroupExpanded.bind(this),selectionChanged:this.onSelectionChange.bind(this)}),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListeners(this.primaryColsHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),selectAll:this.onSelectAll.bind(this),unselectAll:this.onUnselectAll.bind(this),filterChanged:this.onFilterChanged.bind(this)}),this.positionableFeature=new ae(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0})}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}onFilterChanged(e){this.primaryColsListPanel.setFilterText(e.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(e){this.primaryColsHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}onSelectionChange(e){this.primaryColsHeaderPanel.setSelectionState(e.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},P6=class extends s${constructor(){super(...arguments),this.cbPivotMode=s_}wireBeans(e){this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}createTemplate(){return`<div class="ag-pivot-mode-panel">
577                <ag-toggle-button data-ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>
578            </div>`}postConstruct(){this.setTemplate(this.createTemplate(),[lE]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());let e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});let t=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:t,columnPivotModeChanged:t})}onBtPivotMode(){let e=!!this.cbPivotMode.getValue();e!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:e},source:"toolPanelUi"}
vendor: 4,176 bytes, line 578
578),this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}onPivotModeChanged(){let e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)}},P5=class extends s${constructor(){super('<div class="ag-column-panel"></div>'),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}init(e){let t=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params={...t,...e},this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new P6),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new P4),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new F8(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new PL(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new F5(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();let[e]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});this.childDestroyFuncs.push(()=>e())}this.initialised=!0}setPivotModeSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new P6),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new F8(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new PL(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new F5(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(e=>{if(!e)return;let t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))})}setLastVisible(){let e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach(e=>e.classList.remove("ag-last-column-drop"));let t=tp(e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"));t&&t.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){let e=this.getGui().children;for(let t=0;t<e.length;t++){let i=e[t];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return this.gos.assertModuleRegistered(eh.RowGroupingModule,"Row Grouping")}expandColumnGroups(e){this.primaryColsPanel.expandGroups(e)}collapseColumnGroups(e){this.primaryColsPanel.collapseGroups(e)}setColumnLayout(e){this.primaryColsPanel.setColumnLayout(e)}
578syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(e=>e()),this.childDestroyFuncs.length=0,sm(this.getGui())}refresh(e){return this.destroyChildren(),this.init(e),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},P8=class extends tk{constructor(){super(...arguments),this.beanName="modelItemUtils"}wireBeans(e){this.aggFuncService=e.aggFuncService,this.columnModel=e.columnModel,this.columnApplyStateService=e.columnApplyStateService}selectAllChildren(e,t,i){let s=this.extractAllLeafColumns(e);this.setAllColumns(s,t,i)}setColumn(e,t,i){this.setAllColumns([e],t,i)}setAllColumns(e,t,i){this.columnModel.isPivotMode()?this.setAllPivot(e,t,i):this.setAllVisible(e,t,i)}extractAllLeafColumns(e){let t=[],i=e=>{e.forEach(e=>{e.isPassesFilter()&&(e.isGroup()?i(e.getChildren()):t.push(e.getColumn()))})};return i(e),t}setAllVisible(e,t,i){let s=[];e.forEach(e=>{e.getColDef().lockVisible||e.isVisible()!=t&&s.push({colId:e.getId(),hide:!t})}),s.length>0&&this.columnApplyStateService.applyColumnState({state:s},i)}setAllPivot(e,t,i){this.setAllPivotActive(e,t,i)}setAllPivotActive(e,t,i){let s=[],r=e=>{if(!e.isAnyFunctionActive())if(e.isAllowValue()){var t;let i="string"==typeof e.getAggFunc()?e.getAggFunc():null==(t=this.aggFuncService)?void 0:t.getDefaultAggFunc(e);s.push({colId:e.getId(),aggFunc:i})}else e.isAllowRowGroup()?s.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&s.push({colId:e.getId(),pivot:!0})},a=t?r:e=>{(e.isPivotActive()||e.isRowGroupActive()||e.isValueActive())&&s.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};e.forEach(a),s.length>0&&this.columnApplyStateService.applyColumnState({state:s},i)}updateColumns(e){let{columns:t,visibleState:i,pivotState:s,eventType:r}=e,a=t.map(e=>{let t=e.getColId();if(!this.columnModel.isPivotMode())return{colId:t,hide:!(null!=i&&i[t])};{let e=null==s?void 0:s[t];return{colId:t,pivot:null==e?void 0:e.pivot,rowGroup:null==e?void 0:e.rowGroup,aggFunc:null==e?void 0:e.aggFunc}}});this.columnApplyStateService.applyColumnState({state:a},r)}createPivotState(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}},P7={version:"32.3.9",moduleName:eh.ColumnsToolPanelModule,beans:[P8],userComponents:[{name:"agColumnsToolPanel",classImp:P5},{name:"agMenuItem",classImp:I7}],dependantModules:[I9,PT,PZ]},P9={0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49},ke=e=>Math.round(96*e/72),kt=e=>Math.ceil(9525*e),ki=(e,t)=>{if(t)return"number"==typeof t?t:t({rowIndex:e})},ks=(e,t)=>{let i=dN.createHeader({encoding:"UTF-8",standalone:"yes"}),s=dN.createXml(e);return t?s:`${i}${s}`},kr=e=>{let t=String.fromCharCode,i=Math.floor(e/26),s=e%26;return i&&26!==e?s?i<26?t(65+i-1)+t(65+s-1):kr(i)+t(65+s-1):kr(i-1)+"Z":t(65+e-1)},ka=e=>{if(null==e)return null;let t="";for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);if(s>=0&&s<=31&&10!==s){let e=s.toString(16).toUpperCase().padStart(4,"0");t+=`_x${e}_`}else t+=e[i]}return t},ko={getTemplate(e){let{name:t,ContentType:i,Extension:s,PartName:r}=e;return{name:t,properties:{rawMap:{Extension:s,PartName:r,ContentType:i}}}}},kn=e=>"jpg"===e?"jpeg":e,kl={getTemplate(e){let t=Array(e).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:`/xl/worksheets/sheet${t+1}.xml`})),i=k1.worksheetImages.size,s=k1.worksheetHeaderFooterImages.size,r=k1.worksheetDataTables.size,a={};k1.workbookImageIds.forEach(e=>{a[kn(e.type)]=!0});let o=Array(i).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:`/xl/drawings/drawing${t+1}.xml`})),n=Array(r).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",PartName:`/xl/tables/${k1.getTableNameFromIndex(t)}.xml`})),l=Object.keys(a).map(e=>({name:"Default",ContentType:`image/${e}`,Extension:e}));return s&&l.push({name:"Default",Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:[...l,{name:"Default",Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"},{name:"Default",ContentType:"application/xml",Extension:"xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",PartName:"/xl/wor
578kbook.xml"},...t,{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml",PartName:"/xl/theme/theme1.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",PartName:"/xl/styles.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",PartName:"/xl/sharedStrings.xml"},...o,...n,{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"}].map(e=>ko.getTemplate(e))}}},kh={getTemplate(e){let t=(new Date).toJSON();return{name:"cp:coreProperties",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"}}]},children:[{name:"dc:creator",textNode:e},{name:"dc:title",textNode:"Workbook"},{name:"dcterms:created",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t}]}}},kd=(e,t)=>({name:`xdr:${e}`,children:[{name:"xdr:col",textNode:t.col.toString()},{name:"xdr:colOff",textNode:t.offsetX.toString()},{name:"xdr:row",textNode:t.row.toString()},{name:"xdr:rowOff",textNode:t.offsetY.toString()}]}),ku=e=>{if(!e.saturation&&!e.tint)return;let t=[];return e.saturation&&t.push({name:"a:satMod",properties:{rawMap:{val:1e3*e.saturation}}}),e.tint&&t.push({name:"a:tint",properties:{rawMap:{val:1e3*e.tint}}}),t},kc={getTemplate(e){let{sheetIndex:t}=e,i=k1.worksheetImages.get(t),s=k1.worksheetImageIds.get(t);return{name:"xdr:wsDr",properties:{rawMap:{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"}},children:i.map((e,t)=>{var i;let r,a=(e=>{e.fitCell=!!e.fitCell||!e.width||!e.height;let{position:t={},fitCell:i,width:s=0,height:r=0,totalHeight:a,totalWidth:o}=e,{offsetX:n=0,offsetY:l=0,row:h=1,rowSpan:d=1,column:u=1,colSpan:c=1}=t;return{from:{row:h-1,col:u-1,offsetX:kt(n),offsetY:kt(l)},to:{row:h-1+(i?1:d-1),col:u-1+(i?1:c-1),offsetX:kt(s+n),offsetY:kt(r+l)},height:kt(a||r),width:kt(o||s)}})(e);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[kd("from",a.from),kd("to",a.to),(i=s.get(e.id).index,{name:"xdr:pic",children:[{name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:t+1,name:e.id,descr:null!=e.altText?e.altText:void 0}},children:[(e=>{let t=[{name:"a:ext",properties:{rawMap:{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}},children:[{name:"a16:creationId",properties:{rawMap:{id:"{822E6D20-D7BC-2841-A643-D49A6EF008A2}","xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main"}}}]}];switch(e.recolor&&e.recolor.toLowerCase()){case"grayscale":case"sepia":case"washout":t.push({name:"a:ext",properties:{rawMap:{uri:"{C183D7F6-B498-43B3-948B-1728B52AA6E4}"}},children:[{name:"adec:decorative",properties:{rawMap:{val:"0","xmlns:adec":"http://schemas.microsoft.com/office/drawing/2017/decorative"}}}]})}return{name:"a:extLst",children:t}})(e)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]},((e,t)=>{let i;if(e.transparency&&(i=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(1e3*Math.min(Math.max(e.transparency,0),100))}}}]),e.recolor)switch(!i&&(i=[]),e.recolor.toLocaleLowerCase()){case"grayscale":i.push({name:"a:grayscl"});break;case"sepia":let s,r;i.push((r={color:"D9C3A5",tint:50,saturation:180},{name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:(s={color:"black"}).color}},children:ku(s)},{name:"a:srgbClr",properties:{rawMap:{val:r.color}},children:ku(r)}]}));break;case"washout":i.push({name:"a:lum",properties:{rawMap:{bright:"70000",contrast:"-70000"}}})}return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":`rId${t}`,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:i},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}})(e,i+1),(r={name:"a:xfrm",children:[{name:"a:off",properties:{rawMap:{x:0,y:0}}},{name:"a:ext",properties:{rawMap:{cx:a.width,cy:a.height}}}]},e.rotation&&(r.properties={rawMap:{rot:6e4*Math.min(Math.max(e.rotation,0),360)}}),{name:"xdr:spPr",children:[r,{name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]}]})]}),{name:"xdr:clientData"}]}})}}},kp={getTemplate(e){let{Id:t,Type:i,Target:s}=e;return{name:"Relationship",properties:{rawMap:{Id:t,Type:i,Target:s}}}}},kg=e=>({name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:e.map(e=>kp.getTemplate(e))}),km={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot",Continuous:"Continuous"},kv=["Dashed","DashDot","DashDotDot"],kf={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinDiagStripe:"lightUp",ThinHorzCross:"lightGrid",ThinDiagCross:"lightTrellis",Gray125:"gray125",Gray0625:"gray0625"},kC={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},ky={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},kw=e=>void 0==e?e:("#"===e.charAt(0)&&(e=e.substring(1)),6===e.length?"FF"+e:e),kb=(e,t)=>
578{if(!e)return"thin";let i=(e=>{switch(e){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}})(t);if("Continuous"===e)return i;let s=km[e];return"medium"===i&&kv.some(e=>e===s)?`medium${s}`:`${s.charAt(0).toLowerCase()}${s.substring(1)}`},kS=e=>({name:"color",properties:{rawMap:{rgb:kw(e||"#000000")}}}),kx={getTemplate(e){let{left:t,right:i,top:s,bottom:r,diagonal:a}=e,o=t?[kS(t.color)]:void 0,n=i?[kS(i.color)]:void 0,l=s?[kS(s.color)]:void 0,h=r?[kS(r.color)]:void 0,d=a?[kS(a.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:t&&t.style}},children:o},{name:"right",properties:{rawMap:{style:i&&i.style}},children:n},{name:"top",properties:{rawMap:{style:s&&s.style}},children:l},{name:"bottom",properties:{rawMap:{style:r&&r.style}},children:h},{name:"diagonal",properties:{rawMap:{style:a&&a.style}},children:d}]}}},kM={getTemplate(e){let{horizontal:t,indent:i,readingOrder:s,rotate:r,shrinkToFit:a,vertical:o,wrapText:n}=e;return{name:"alignment",properties:{rawMap:{horizontal:t&&(kC[t]||"general"),indent:i,readingOrder:s&&Math.max(["Context","LeftToRight","RightToLeft"].indexOf(s),0),textRotation:r,shrinkToFit:a,vertical:o&&(ky[o]||void 0),wrapText:n}}}}},kD={getTemplate(e){let t=+(!1!==e.protected);return{name:"protection",properties:{rawMap:{hidden:+(!0===e.hideFormula),locked:t}}}}},kE={getTemplate(e){let{alignment:t,borderId:i,fillId:s,fontId:r,numFmtId:a,protection:o,quotePrefix:n,xfId:l}=e,h=[];return t&&h.push(kM.getTemplate(t)),o&&h.push(kD.getTemplate(o)),{name:"xf",properties:{rawMap:{applyAlignment:t?1:void 0,applyProtection:o?1:void 0,applyBorder:i?1:void 0,applyFill:s?1:void 0,borderId:i,fillId:s,applyFont:r?1:void 0,fontId:r,applyNumberFormat:a?1:void 0,numFmtId:a,quotePrefix:n?1:void 0,xfId:l}},children:h.length?h:void 0}}},kI={getTemplate(e){let{builtinId:t,name:i,xfId:s}=e;return{name:"cellStyle",properties:{rawMap:{builtinId:t,name:i,xfId:s}}}}},kA={getTemplate(e){let{patternType:t,fgTheme:i,fgTint:s,fgRgb:r,bgRgb:a,bgIndexed:o}=e,n={name:"patternFill",properties:{rawMap:{patternType:t}}};return(i||s||r)&&(n.children=[{name:"fgColor",properties:{rawMap:{theme:i,tint:s,rgb:r}}}]),(o||a)&&(n.children||(n.children=[]),n.children.push({name:"bgColor",properties:{rawMap:{indexed:o,rgb:a}}})),{name:"fill",children:[n]}}},kR={getTemplate(e){let{size:t,colorTheme:i,color:s="FF000000",fontName:r="Calibri",family:a,scheme:o,italic:n,bold:l,strikeThrough:h,outline:d,shadow:u,underline:c,verticalAlign:p}=e,g=[{name:"sz",properties:{rawMap:{val:t}}},{name:"color",properties:{rawMap:{theme:i,rgb:s}}},{name:"name",properties:{rawMap:{val:r}}}];return a&&g.push({name:"family",properties:{rawMap:{val:a}}}),o&&g.push({name:"scheme",properties:{rawMap:{val:o}}}),n&&g.push({name:"i"}),l&&g.push({name:"b"}),h&&g.push({name:"strike"}),d&&g.push({name:"outline"}),u&&g.push({name:"shadow"}),c&&g.push({name:"u",properties:{rawMap:{val:c}}}),p&&g.push({name:"vertAlign",properties:{rawMap:{val:p}}}),{name:"font",children:g}}},kT={getTemplate(e){let{formatCode:t,numFmtId:i}=e;return t.length&&(t=function(e){let t=e.split(/(\[[^\]]*\])/);for(let e=0;e<t.length;e++){let i=t[e];i.length&&(i.startsWith("[")||(i=i.replace(/\$/g,'"$"')),t[e]=ig(i))}return t.join("")}(t)),{name:"numFmt",properties:{rawMap:{formatCode:t,numFmtId:i}}}}},kL=(e,t)=>(-1!==e.indexOf("mixedStyle")&&t>1&&(e+=`_${t}`),e),kF=()=>{X={base:0},J=[],ee=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],et=[{patternType:"none"},{patternType:"gray125"}],ei=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],es=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],er=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],ea=[{builtinId:0,name:"Normal",xfId:0}]},kP=e=>{let{alignment:t,borders:i,font:s,interior:r,numberFormat:a,protection:o,quotePrefix:n}=e,{id:l}=e,h=0,d=0,u=0,c=0;if(l&&void 0==X[l=kL(l,eo)]){var p;let e,g,m,v;r&&(e=(p=r.pattern)?kf[p]||p:"none",g=kw(r.color),m=kw(r.patternColor),-1===(v=et.findIndex(t=>{let{patternType:i,fgRgb:s,bgRgb:r}=t;return i==e&&s==g&&r==m}))&&(v=et.length,et.push({patternType:e,fgRgb:g,bgRgb:m})),h=v),i&&(d=(e=>{let t,i,s,r,a,o,n,l,{borderBottom:h,borderTop:d,borderLeft:u,borderRight:c}=e;u&&(s=kb(u.lineStyle,u.weight),n=kw(u.color)),c&&(r=kb(c.lineStyle,c.weight),l=kw(c.color)),h&&(t=kb(h.lineStyle,h.weight),a=kw(h.color)),d&&(i=kb(d.lineStyle,d.weight),o=kw(d.color));let p=ei.findIndex(e=>{let{left:h,right:d,top:u,bottom:c}=e;if(!h&&(s||n)||!d&&(r||l)||!u&&(i||o)||!c&&(t||a))return!1;let{style:p,color:g}=h||{},{style:m,color:v}=d||{},{style:f,color:C}=u||{},{style:y,color:w}=c||{};return p==s&&g==n&&m==r&&v==l&&f==i&&C==o&&y==t&&w==a&&!0});return -1===p&&(p=ei.length,ei.push({left:{style:s,color:n},right:{style:r,color:l},top:{style:i,color:o},bottom:{style:t,color:a},diagonal:{style:void 0,color:void 0}})),p})(i)),s&&(u=(e=>{let{fontName:t="Calibri",color:i,size:s,bold:r,italic:a,outline:o,shadow:n,strikeThrough:l,underline:h,family:d,verticalAlign:u}=e,c=kw(i),p=(e=>{if(void 0!==e)return Math.max(["Automatic","Roman","Swiss","Modern","Script","Decorative"].indexOf(e||"Automatic"),0)})(d),g=h?h.toLocaleLowerCase():void 0,m=u?u.toLocaleLowerCase():void 0,v=ee.findIndex(e=>
578e.fontName==t&&e.color==c&&e.size==s&&e.bold==r&&e.italic==a&&e.outline==o&&e.shadow==n&&e.strikeThrough==l&&e.underline==g&&e.verticalAlign==m&&e.family==p&&!0);return -1===v&&(v=ee.length,ee.push({fontName:t,color:c,size:s,bold:r,italic:a,outline:o,shadow:n,strikeThrough:l,underline:g,verticalAlign:m,family:null!=p?p.toString():void 0})),v})(s)),a&&(c=(e=>{if(P9[e])return P9[e];let t=J.findIndex(t=>t.formatCode===e);return -1===t?(t=J.length+164,J.push({formatCode:e,numFmtId:t})):t=J[t].numFmtId,t})(a.format)),X[l]=er.length,er.push({alignment:t,borderId:d||0,fillId:h||0,fontId:u||0,numFmtId:c||0,protection:o,quotePrefix:n,xfId:0})}},kk={getTemplate(e){let t,i,s,r,a,o,n,l={name:"numFmts",properties:{rawMap:{count:(t=J).length}},children:t.map(e=>kT.getTemplate(e))},h={name:"fonts",properties:{rawMap:{count:(i=ee.map(t=>({...t,size:null!=t.size?t.size:e}))).length}},children:i.map(e=>kR.getTemplate(e))},d={name:"fills",properties:{rawMap:{count:(s=et).length}},children:s.map(e=>kA.getTemplate(e))},u={name:"borders",properties:{rawMap:{count:(r=ei).length}},children:r.map(e=>kx.getTemplate(e))},c={name:"cellStyleXfs",properties:{rawMap:{count:(a=es).length}},children:a.map(e=>kE.getTemplate(e))},p={name:"cellXfs",properties:{rawMap:{count:(o=er).length}},children:o.map(e=>kE.getTemplate(e))},g={name:"cellStyles",properties:{rawMap:{count:(n=ea).length}},children:n.map(e=>kI.getTemplate(e))};return kF(),{name:"styleSheet",properties:{rawMap:{"mc:Ignorable":"x14ac x16r2 xr",xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision"}},children:[l,h,d,u,c,p,g,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},kN={getTemplate(e,t){let{name:i,columns:s,rowCount:r,displayName:a,headerRowIndex:o,showRowStripes:n,showColumnStripes:l,showFilterButtons:h,highlightFirstColumn:d,highlightLastColumn:u}=e||{};if(!e||!i||!Array.isArray(s)||!s.length||!r)return{name:"table"};let c=s.map((e,t)=>({name:"filterColumn",properties:{rawMap:{colId:t.toString(),hiddenButton:+!h[t]}}})),p=o+1,g=(t+1).toString(),m=`A${p}`,v=`${String.fromCharCode(64+s.length)}${p+r}`,f=`${m}:${v}`;return{name:"table",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",name:i,displayName:t?`${a}_${t+1}`:a,ref:f,totalsRowShown:0,id:g}},children:[{name:"autoFilter",properties:{rawMap:{ref:f}},children:c},{name:"tableColumns",properties:{rawMap:{count:s.length}},children:s.map((e,t)=>({name:"tableColumn",properties:{rawMap:{id:(t+1).toString(),name:e,dataCellStyle:"Normal"}}}))},{name:"tableStyleInfo",properties:{rawMap:{name:"TableStyleLight1",showFirstColumn:+!!d,showLastColumn:+!!u,showRowStripes:+!!n,showColumnStripes:+!!l}}}]}}},kO=e=>{let[t,i,s,r]=e;return{name:`a:${t}`,children:[{name:`a:${i}`,properties:{rawMap:{val:s,lastClr:r}}}]}},kG=e=>{let[t,i,s,r]=e;return{name:`a:${t}`,properties:{rawMap:{script:s,typeface:i,panose:r}}}},kB=(e,t,i)=>({name:`a:${e}`,properties:{rawMap:{val:t}},children:i}),kz=e=>{let[t,i,s,r,a,o]=e,n=[];return n.push(kB("satMod",s)),r&&n.push(kB("lumMod",r)),a&&n.push(kB("tint",a)),o&&n.push(kB("shade",o)),{name:"a:gs",properties:{rawMap:{pos:t}},children:[{name:"a:schemeClr",properties:{rawMap:{val:i}},children:n}]}},kV=(e,t)=>({name:"a:solidFill",children:[kB("schemeClr",e,t)]}),kH=e=>{let[t,i,s,r,a]=e,[o,n]=a;return{name:"a:gradFill",properties:{rawMap:{rotWithShape:t}},children:[{name:"a:gsLst",children:[kz(i),kz(s),kz(r)]},{name:"a:lin",properties:{rawMap:{ang:o,scaled:n}}}]}},kj=e=>{let[t,i,s,r]=e;return{name:"a:ln",properties:{rawMap:{w:t,cap:i,cmpd:s,algn:r}},children:[kV("phClr"),kB("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},kW=e=>{let t=[];if(e){let[i,s,r,a,o]=e;t.push({name:"a:outerShdw",properties:{rawMap:{blurRad:i,dist:s,dir:r,algn:a,rotWithShape:o}},children:[kB("srgbClr","000000",[kB("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},t.length?{children:t}:{})]}},kU=e=>{let{aspectratio:t,rotation:i}=e||{},s={};return t&&(s.aspectratio="t"),i&&(s.rotation="t"),{name:"o:lock",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:s}}},k_=e=>Math.floor((null!=e?e:0)*.74999943307122),k$={getTemplate(e){let t=k1.worksheetHeaderFooterImages.get(e.sheetIndex)||[];return{name:"xml",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{v:"urn:schemas-microsoft-com:vml",o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel"}}]},children:[{name:"o:shapelayout",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}]},children:[{name:"o:idmap",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:{data:"1"}}}]},{name:"v:shapetype",properties:{prefixedAttributes:[{prefix:"o:",map:{spt:"75",preferrelative:"t"}}],rawMap:{coordsize:"21600,21600",filled:"f",id:"_x0000_t75",path:"m@4@5l@4@11@9@11@9@5xe",stroked:"f"}},children:[{name:"v:stroke",properties:{rawMap:{joinstyle:"miter"}}},{name:"v:formulas",children:["if lineDrawn pixelLineWidth 0","sum @0 1 0","sum 0 0 @1","prod @2 1 2","prod @3 21600 pixelWidth","prod @3 21600 pixelHeight","sum @0 0 1","prod @6 1 2","prod @7 21600 pixelWidth","sum @8 21600 0","prod @7 21600 pixelHeight","sum @10 21600 0"].map(e=>({name:"v:f",properties:{rawMap:{eqn:e}}}
578))},{name:"v:path",properties:{prefixedAttributes:[{prefix:"o:",map:{connecttype:"rect",extrusionok:"f"}}],rawMap:{gradientshapeok:"t"}}},kU({aspectratio:!0})]},...t.map((e,t)=>((e,t)=>{let{width:i=0,height:s=0,altText:r}=e,a=k_(i),o=k_(s);return{name:"v:shape",properties:{rawMap:{id:e.headerFooterPosition,"o:spid":"_x0000_s1025",style:`position: absolute; margin-left: 0; margin-top: 10in; margin-bottom: 0; margin-right: 0; width: ${a}pt; height: ${o}pt; z-index: ${t+1}`,type:"#_x0000_t75",alt:r}},children:[((e,t)=>{let i,{recolor:s,brightness:r,contrast:a,id:o}=e;if(s&&(i={},("Washout"===s||"Grayscale"===s)&&(i.gain="19661f",i.blacklevel="22938f"),("Black & White"===s||"Grayscale"===s)&&(i.grayscale="t","Black & White"===s&&(i.bilevel="t"))),!s||"Grayscale"===s){if(i||(i={}),null!=a&&50!==a){let e="1";a>=0&&(a<50?e=String(a/50):a<100?e=String(50/(100-a)):100===a&&(e="2147483647f")),i.gain=e}null!=r&&50!==r&&(i.blacklevel=((r-0)/100*1+-.5).toString())}return{name:"v:imagedata",properties:{prefixedAttributes:[{prefix:"o:",map:{relid:`rId${t}`,title:o}}],rawMap:i}}})(e,t+1),kU({rotation:!0})]}})(e,t))]}}},kY={getTemplate(e,t){let i=(t+1).toString();return{name:"sheet",properties:{rawMap:{name:e,sheetId:i,"r:id":`rId${i}`}}}}},kK={getTemplate(e){let{min:t,max:i,outlineLevel:s,s:r,width:a,hidden:o,bestFit:n}=e,l=1,h="0";return a>1&&(l=Math.ceil((a-12)/7+1),h="1"),{name:"col",properties:{rawMap:{min:t,max:i,outlineLevel:null!=s?s:void 0,width:l,style:r,hidden:o?"1":"0",bestFit:n?"1":"0",customWidth:h}}}}},kZ={getTemplate(e,t,i){let{ref:s,data:r,styleId:a}=e,{type:o,value:n}=r||{type:"empty",value:null},l=o;if("f"===o)l="str";else{let e;o.charAt(0)===o.charAt(0).toUpperCase()&&(l="s"===(e=o.charAt(0).toLowerCase())?"inlineStr":e)}let h={name:"c",properties:{rawMap:{r:s,t:"empty"===l?void 0:l,s:a?X[kL(a,i)]||0:void 0}}};return"empty"===l?h:Object.assign({},h,{children:"str"===l&&"f"===o?[{name:"f",textNode:ig(ka(n),!1)}]:"inlineStr"===l?[{name:"is",children:[{name:"t",textNode:ig(ka(n),!1)}]}]:[{name:"v",textNode:n}]})}},kq=e=>{var t;return(null==(t=e.data)?void 0:t.value)!==""||void 0!==e.styleId},kQ={getTemplate(e,t,i){let{collapsed:s,hidden:r,height:a,outlineLevel:o,cells:n=[]}=e;return((e,t)=>{let i=[],s=0;for(let t=0;t<e.length;t++){let r=e[t];r.mergeAcross&&(i.push({pos:t,excelPos:s}),s+=r.mergeAcross),s++}if(i.length)for(let s=i.length-1;s>=0;s--){let r=[],a=e[i[s].pos];for(let e=1;e<=a.mergeAcross;e++)r.push({ref:`${kr(i[s].excelPos+1+e)}${t+1}`,styleId:a.styleId,data:{type:"empty",value:null}});r.length&&e.splice(i[s].pos+1,0,...r)}})(n,t),{name:"row",properties:{rawMap:{r:t+1,collapsed:s?"1":"0",hidden:r?"1":"0",ht:a,customHeight:null!=a?"1":"0",spans:"1:1",outlineLevel:o||void 0}},children:n.filter(kq).map((e,t)=>kZ.getTemplate(e,t,i))}}},kX=(e,t,i)=>e.reduce((e,s,r)=>{var a,o,n,l;let h="Center"===(a=s.position)?"C":"Right"===a?"R":"L",d=(o=`${e}&amp;${h}`,(n=s.font)&&(o+="&amp;&quot;",o+=n.fontName||"Calibri",n.bold!==n.italic?o+=n.bold?",Bold":",Italic":n.bold?o+=",Bold Italic":o+=",Regular",o+="&quot;",n.size&&(o+=`&amp;${n.size}`),n.strikeThrough&&(o+="&amp;S"),n.underline&&(o+=`&amp;${"Double"===n.underline?"E":"U"}`),n.color&&(o+=`&amp;K${n.color.replace("#","").toUpperCase()}`)),o);s.position||(s.position=["Left","Center","Right"][r]);let{image:u}=s;if("&[Picture]"===s.value&&u){let e=`${h}${t}${i}`;k1.addHeaderFooterImageToMap(u,e)}return`${d}${ig((l=s.value,tK({"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F","&[Picture]":"&G"},(e,t)=>{l=l.replace(e,t)}),l))}`},""),kJ={getTemplate(e){var t;let i,s,r,a,o,{worksheet:n,currentSheet:l,config:h}=e,{margins:d={},pageSetup:u,headerFooterConfig:c,suppressColumnOutline:p,rightToLeft:g,frozenRowCount:m,frozenColumnCount:v}=h,{table:f}=n,{rows:C,columns:y}=f,w=y&&y.length?(t=!!p,i=[],s=[],C.forEach((e,t)=>{let r,a=e.cells,o=0;a.forEach((e,a)=>{let n=a+o+1,l=kr(n),h=t+1;if(e.mergeAcross){let t=kr(a+(o+=e.mergeAcross)+1);i.push(`${l}${h}:${t}${h}`)}y[n-1]||(y[n-1]={});let{collapsibleRanges:d}=e;d&&d.forEach(e=>{s.push([n+e[0],n+e[1]])}),(r=y[n-1]).min=n,r.max=n,e.ref=`${l}${h}`})}),s.sort((e,t)=>
578e[0]!==t[0]?e[0]-t[0]:t[1]-e[1]),r=new Map,a=new Map,s.filter(e=>{let t=e.toString();return!r.get(t)&&(r.set(t,!0),!0)}).forEach(e=>{let i=y.find(t=>t.min==e[0]&&t.max==e[1]),s=a.get(e[0]);y.push({min:e[0],max:e[1],outlineLevel:t?void 0:s||1,width:(i||{width:100}).width}),a.set(e[0],(s||0)+1)}),i):[],{worksheetDataTables:b}=k1,S=b.get(l),{children:x}=eS(e=>(e.children.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),e),((e=!1,t,i)=>s=>(s.children.push({name:"sheetViews",children:[{name:"sheetView",properties:{rawMap:{rightToLeft:!0===e?"1":"0",workbookViewId:"0"}},children:((e=0,t=0)=>{let i=e>0||t>0;return i?[{name:"pane",properties:{rawMap:{state:i?"frozen":void 0,topLeftCell:i?`${kr(e+1)}${t+1}`:void 0,xSplit:0===e?void 0:e,ySplit:0===t?void 0:t}}}]:void 0})(t,i)}]}),s))(g,v,m),e=>{let t=C.reduce((e,t)=>t.outlineLevel&&t.outlineLevel>e?t.outlineLevel:e,0);return e.children.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:t||void 0}}}),e},e=>(y.length&&e.children.push({name:"cols",children:y.map(e=>kK.getTemplate(e))}),e),(o=l+1,e=>(C.length&&e.children.push({name:"sheetData",children:C.map((e,t)=>kQ.getTemplate(e,t,o))}),e)),e=>(w.length&&e.children.push({name:"mergeCells",properties:{rawMap:{count:w.length}},children:w.map(e=>({name:"mergeCell",properties:{rawMap:{ref:e}}}))}),e),e=>{let{top:t=.75,right:i=.7,bottom:s=.75,left:r=.7,header:a=.3,footer:o=.3}=d;return e.children.push({name:"pageMargins",properties:{rawMap:{bottom:s,footer:o,header:a,left:r,right:i,top:t}}}),e},e=>{var t;return u&&e.children.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:(t=u.orientation)&&("Portrait"===t||"Landscape"===t)?t.toLocaleLowerCase():"portrait",paperSize:(e=>{if(null==e)return 1;let t=["Letter","Letter Small","Tabloid","Ledger","Legal","Statement","Executive","A3","A4","A4 Small","A5","A6","B4","B5","Folio","Envelope","Envelope DL","Envelope C5","Envelope B5","Envelope C3","Envelope C4","Envelope C6","Envelope Monarch","Japanese Postcard","Japanese Double Postcard"].indexOf(e);return -1===t?1:t+1})(u.pageSize)}}}),e},e=>{let t;if(!c)return e;let i=+(null!=c.first),s=+(null!=c.even);return e.children.push({name:"headerFooter",properties:{rawMap:{differentFirst:i,differentOddEven:s}},children:(t=[],["all","first","even"].forEach(e=>{let i=c[e],s="all"===e?"odd":e;if(i)for(let[r,a]of Object.entries(i)){let i=`${r.charAt(0).toUpperCase()}${r.slice(1)}`,o=r[0].toUpperCase();if(a){let r="all"===e?"":e.toUpperCase();t.push({name:`${s}${i}`,properties:{rawMap:{"xml:space":"preserve"}},textNode:kX(a,o,r)})}}}),t)}),e},e=>{let t=k1.worksheetImages.get(l);return null!=t&&t.length&&e.children.push({name:"drawing",properties:{rawMap:{"r:id":`rId${++e.rIdCounter}`}}}),e},e=>(k1.worksheetHeaderFooterImages.get(l)&&e.children.push({name:"legacyDrawingHF",properties:{rawMap:{"r:id":`rId${++e.rIdCounter}`}}}),e),e=>(S&&e.children.push({name:"tableParts",properties:{rawMap:{count:"1"}},children:[{name:"tablePart",properties:{rawMap:{"r:id":`rId${++e.rIdCounter}`}}}]}),e))({children:[],rIdCounter:0});return{name:"worksheet",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:x}}},k0=class e{static createExcel(e,t,i){this.addSheetName(t),1===(eo=this.sheetNames.length)&&kF(),e.forEach(kP);let s=Object.assign({},i);return i.exportAsExcelTable&&(i.columnModel.isPivotActive()&&(this.showExcelTableNonCompatibleFeaturesWarning("pivot mode"),s.exportAsExcelTable=!1),i.gos.get("masterDetail")&&(this.showExcelTableNonCompatibleFeaturesWarning("master/detail"),s.exportAsExcelTable=!1)),this.processTableConfig(t,s),this.createWorksheet(t,s)}static showExcelTableNonCompatibleFeaturesWarning(e){ep(`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
579Please turn off ${e} to enable Excel table exports.`)}static getTableNameFromIndex(e){return`table${e+1}`}static getSanitizedTableName(e){return e.replace(/^[^a-zA-Z_]+/,"_").replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"_")}static addTableToSheet(e,t){this.worksheetDataTables.has(e)?ep("Unable to add data table to Excel sheet: A table already exists."):this.worksheetDataTables.set(e,t)}static processTableConfig(t,i){if(!i.exportAsExcelTable)return;let{name:s,showColumnStripes:r,showRowStripes:a,showFilterButton:o,highlightFirstColumn:n,highlightLastColumn:l}="boolean"==typeof i.exportAsExcelTable?{}:i.exportAsExcelTable,h=this.getSanitizedTableName(s||e.defaultTableDisplayName),d=this.sheetNames.length-1,{table:u}=t,{rows:c,columns:p}=u,g=i.columnModel.getHeaderRowCount(),m=c.length,v=p.length,f=[],C=[];for(let e=0;e<v;e++){var y;let t=p[e];f.push(t.displayName||""),C.push("match"===o||void 0===o?null!=(y=t.filterAllowed)&&y:o)}f&&f.length&&m&&h?this.addTableToSheet(d,{name:this.getTableNameFromIndex(d),displayName:h,columns:f,showFilterButtons:C,headerRowIndex:g-1,rowCount:m-g,showRowStripes:null==a||a,showColumnStripes:null!=r&&r,highlightFirstColumn:null!=n&&n,highlightLastColumn:null!=l&&l}):ep("Unable to add data table to Excel sheet: Missing required parameters.")}static addHeaderFooterImageToMap(e,t){let i=this.sheetNames.length-1;e.headerFooterPosition=t,this.buildImageMap({imageToAdd:e,idx:i});let s=this.worksheetHeaderFooterImages.get(i);s||(s=[],this.worksheetHeaderFooterImages.set(i,s)),s.find(t=>
579t.id===e.id)||s.push(e)}static addBodyImageToMap(e,t,i,s,r){let a=this.sheetNames.length,{row:o,column:n}=e.position||{};s&&(null==t||null==i||o&&n||(e.position||(e.position={}),e.position=Object.assign({},e.position,{row:t,column:s.indexOf(i)+1})),((e,t)=>{let{colSpan:i,column:s}=e.position;if(e.width)if(i){let r=t.slice(s-1,s+i-1),a=0;for(let t=0;t<r.length;t++){let i=r[t].getActualWidth();if(e.width<a+i){e.position.colSpan=t+1,e.totalWidth=e.width,e.width=e.totalWidth-a;break}a+=i}}else e.totalWidth=e.width})(e,s),((e,t)=>{let{rowSpan:i,row:s}=e.position;if(e.height)if(i){let r=0,a=0;for(let o=s;o<s+i;o++){let i=ke(ki(o,t)||20);if(e.height<r+i){e.position.rowSpan=a+1,e.totalHeight=e.height,e.height=e.totalHeight-r;break}r+=i,a++}}else e.totalHeight=e.height})(e,r)),this.buildImageMap({imageToAdd:e,idx:a});let l=this.worksheetImageIds.get(a);l||(l=new Map,this.worksheetImageIds.set(a,l));let h=this.worksheetImages.get(a);h?h.push(e):this.worksheetImages.set(a,[e]),l.get(e.id)||l.set(e.id,{index:l.size,type:e.imageType})}static buildImageMap(e){let{imageToAdd:t,idx:i}=e,s=this.images.get(t.id);if(s){let e=s.find(e=>e.sheetId===i);e?e.image.push(t):s.push({sheetId:i,image:[t]})}else this.images.set(t.id,[{sheetId:i,image:[t]}]),this.workbookImageIds.set(t.id,{type:t.imageType,index:this.workbookImageIds.size})}static addSheetName(e){let t=ig(e.name)||"",i="";for(;-1!==this.sheetNames.indexOf(`${t}${i}`);)if(""===i)i="_1";else{let e=parseInt(i.slice(1),10);i=`_${e+1}`}e.name=`${t}${i}`,this.sheetNames.push(e.name)}static getStringPosition(e){return this.sharedStrings.has(e)?this.sharedStrings.get(e):(this.sharedStrings.set(e,this.sharedStrings.size),this.sharedStrings.size-1)}static resetFactory(){this.sharedStrings=new Map,this.images=new Map,this.worksheetImages=new Map,this.worksheetHeaderFooterImages=new Map,this.workbookImageIds=new Map,this.worksheetImageIds=new Map,this.worksheetDataTables=new Map,this.sheetNames=[],this.factoryMode=rW.SINGLE_SHEET}static createWorkbook(e){return ks(((e,t)=>({name:"workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:[{name:"bookViews",children:[{name:"workbookView",properties:{rawMap:{activeTab:t}}}]},{name:"sheets",children:e.map((e,t)=>kY.getTemplate(e,t))}]}))(this.sheetNames,e))}static createStylesheet(e){return ks(kk.getTemplate(e))}static createSharedStrings(){let e;return ks({name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:(e=this.sharedStrings).size,uniqueCount:e.size}},children:(e=>{let t=[];for(let i of e.keys()){let e=i.toString(),s={name:"t",textNode:ig(ka(e),!1)};e.trim().length!==e.length&&(s.properties={rawMap:{"xml:space":"preserve"}}),t.push({name:"si",children:[s]})}return t})(e)})}static createCore(e){return ks(kh.getTemplate(e))}static createContentTypes(e){return ks(kl.getTemplate(e))}static createRels(){return ks(kg([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"},{Id:"rId2",Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"}]))}static createTheme(){return ks({name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[{name:"a:themeElements",children:[{name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[kO(["dk1","sysClr","windowText","000000"]),kO(["lt1","sysClr","window","FFFFFF"]),kO(["dk2","srgbClr","44546A"]),kO(["lt2","srgbClr","E7E6E6"]),kO(["accent1","srgbClr","4472C4"]),kO(["accent2","srgbClr","ED7D31"]),kO(["accent3","srgbClr","A5A5A5"]),kO(["accent4","srgbClr","FFC000"]),kO(["accent5","srgbClr","5B9BD5"]),kO(["accent6","srgbClr","70AD47"]),kO(["hlink","srgbClr","0563C1"]),kO(["folHlink","srgbClr","954F72"])]},{name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[kG(["latin","Calibri Light",void 0,"020F0302020204030204"]),kG(["ea",""]),kG(["cs",""]),kG(["font","游ゴシック Light","Jpan"]),kG(["font","맑은 고딕","Hang"]),kG(["font","等线 Light","Hans"]),kG(["font","新細明體","Hant"]),kG(["font","Times New Roman","Arab"]),kG(["font","Times New Roman","Hebr"]),kG(["font","Tahoma","Thai"]),
579kG(["font","Nyala","Ethi"]),kG(["font","Vrinda","Beng"]),kG(["font","Shruti","Gujr"]),kG(["font","MoolBoran","Khmr"]),kG(["font","Tunga","Knda"]),kG(["font","Raavi","Guru"]),kG(["font","Euphemia","Cans"]),kG(["font","Plantagenet Cherokee","Cher"]),kG(["font","Microsoft Yi Baiti","Yiii"]),kG(["font","Microsoft Himalaya","Tibt"]),kG(["font","MV Boli","Thaa"]),kG(["font","Mangal","Deva"]),kG(["font","Gautami","Telu"]),kG(["font","Latha","Taml"]),kG(["font","Estrangelo Edessa","Syrc"]),kG(["font","Kalinga","Orya"]),kG(["font","Kartika","Mlym"]),kG(["font","DokChampa","Laoo"]),kG(["font","Iskoola Pota","Sinh"]),kG(["font","Mongolian Baiti","Mong"]),kG(["font","Times New Roman","Viet"]),kG(["font","Microsoft Uighur","Uigh"]),kG(["font","Sylfaen","Geor"]),kG(["font","Arial","Armn"]),kG(["font","Leelawadee UI","Bugi"]),kG(["font","Microsoft JhengHei","Bopo"]),kG(["font","Javanese Text","Java"]),kG(["font","Segoe UI","Lisu"]),kG(["font","Myanmar Text","Mymr"]),kG(["font","Ebrima","Nkoo"]),kG(["font","Nirmala UI","Olck"]),kG(["font","Ebrima","Osma"]),kG(["font","Phagspa","Phag"]),kG(["font","Estrangelo Edessa","Syrn"]),kG(["font","Estrangelo Edessa","Syrj"]),kG(["font","Estrangelo Edessa","Syre"]),kG(["font","Nirmala UI","Sora"]),kG(["font","Microsoft Tai Le","Tale"]),kG(["font","Microsoft New Tai Lue","Talu"]),kG(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[kG(["latin","Calibri",void 0,"020F0502020204030204"]),kG(["ea",""]),kG(["cs",""]),kG(["font","游ゴシック","Jpan"]),kG(["font","맑은 고딕","Hang"]),kG(["font","等线","Hans"]),kG(["font","新細明體","Hant"]),kG(["font","Arial","Arab"]),kG(["font","Arial","Hebr"]),kG(["font","Tahoma","Thai"]),kG(["font","Nyala","Ethi"]),kG(["font","Vrinda","Beng"]),kG(["font","Shruti","Gujr"]),kG(["font","DaunPenh","Khmr"]),kG(["font","Tunga","Knda"]),kG(["font","Raavi","Guru"]),kG(["font","Euphemia","Cans"]),kG(["font","Plantagenet Cherokee","Cher"]),kG(["font","Microsoft Yi Baiti","Yiii"]),kG(["font","Microsoft Himalaya","Tibt"]),kG(["font","MV Boli","Thaa"]),kG(["font","Mangal","Deva"]),kG(["font","Gautami","Telu"]),kG(["font","Latha","Taml"]),kG(["font","Estrangelo Edessa","Syrc"]),kG(["font","Kalinga","Orya"]),kG(["font","Kartika","Mlym"]),kG(["font","DokChampa","Laoo"]),kG(["font","Iskoola Pota","Sinh"]),kG(["font","Mongolian Baiti","Mong"]),kG(["font","Arial","Viet"]),kG(["font","Microsoft Uighur","Uigh"]),kG(["font","Sylfaen","Geor"]),kG(["font","Arial","Armn"]),kG(["font","Leelawadee UI","Bugi"]),kG(["font","Microsoft JhengHei","Bopo"]),kG(["font","Javanese Text","Java"]),kG(["font","Segoe UI","Lisu"]),kG(["font","Myanmar Text","Mymr"]),kG(["font","Ebrima","Nkoo"]),kG(["font","Nirmala UI","Olck"]),kG(["font","Ebrima","Osma"]),kG(["font","Phagspa","Phag"]),kG(["font","Estrangelo Edessa","Syrn"]),kG(["font","Estrangelo Edessa","Syrj"]),kG(["font","Estrangelo Edessa","Syre"]),kG(["font","Nirmala UI","Sora"]),kG(["font","Microsoft Tai Le","Tale"]),kG(["font","Microsoft New Tai Lue","Talu"]),kG(["font","Ebrima","Tfng"])]}]},{name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:fillStyleLst",children:[kV("phClr"),kH(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),kH(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]},{name:"a:lnStyleLst",children:[kj(["6350","flat","sng","ctr"]),kj(["12700","flat","sng","ctr"]),kj(["19050","flat","sng","ctr"])]},{name:"a:effectStyleLst",children:[kW(),kW(),kW(["57150","19050","5400000","ctr","0"])]},{name:"a:bgFillStyleLst",children:[kV("phClr"),kV("phClr",[kB("tint","95000"),kB("satMod","170000")]),kH(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}]}]},{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]})}static createTable(e,t){return ks(kN.getTemplate(e,t))}static createWorkbookRels(e){let t=Array(e).fill(void 0).map((e,t)=>({Id:`rId${t+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${t+1}.xml`}));return ks(kg([...t,{Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:`rId${e+2}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:`rId${e+3}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}]))}static createDrawing(e){return ks(kc.getTemplate({sheetIndex:e}))}static createDrawingRel(e){let t=this.worksheetImageIds.get(e)||[],i=[];for(let[e,s]of t){let{index:t,type:r}=s;i.push({Id:`rId${t+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${this.workbookImageIds.get(e).index+1}.${kn(r)}
579`})}return ks(kg(i))}static createVmlDrawing(e){return ks(k$.getTemplate({sheetIndex:e}),!0)}static createVmlDrawingRel(e){let t=this.worksheetHeaderFooterImages.get(e)||[],i=[];for(let e=0;e<t.length;e++){let s=t[e],r=this.workbookImageIds.get(s.id);if(!r)continue;let{index:a,type:o}=r;i.push({Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${a+1}.${kn(o)}`})}return ks(kg(i))}static createRelationships({drawingIndex:e,vmlDrawingIndex:t,tableIndex:i}={}){if(void 0===e&&void 0===t&&void 0===i)return"";let s=[];return null!=e&&s.push({Id:`rId${s.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${e+1}.xml`}),null!=t&&s.push({Id:`rId${s.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${t+1}.vml`}),null!=i&&s.push({Id:`rId${s.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/${this.getTableNameFromIndex(i)}.xml`}),ks(kg(s))}static createWorksheet(e,t){return ks(kJ.getTemplate({worksheet:e,currentSheet:this.sheetNames.length-1,config:t}))}};k0.sharedStrings=new Map,k0.sheetNames=[],k0.images=new Map,k0.worksheetImages=new Map,k0.worksheetHeaderFooterImages=new Map,k0.workbookImageIds=new Map,k0.worksheetImageIds=new Map,k0.worksheetDataTables=new Map,k0.defaultTableDisplayName="AG-GRID-TABLE",k0.factoryMode=rW.SINGLE_SHEET;var k1=k0,k2=class extends dx{constructor(e){super(e),this.mixedStyles={},this.mixedStyleCounter=0,this.rows=[],this.frozenRowCount=0,this.skipFrozenRows=!1,this.frozenColumnCount=0,this.skipFrozenColumns=!1,this.config=Object.assign({},e),this.stylesByIds={},this.config.baseExcelStyles.forEach(e=>{this.stylesByIds[e.id]=e}),this.excelStyles=[...this.config.baseExcelStyles,{id:"_quotePrefix",quotePrefix:1}]}addCustomContent(e){e.forEach(e=>{let t,i=this.rows.length+1;this.config.suppressRowOutline||null==e.outlineLevel||(t=e.outlineLevel);let s={height:ki(i,e.height||this.config.rowHeight),cells:(e.cells||[]).map((e,t)=>{var s,r,a;let o=this.addImage(i,this.columnsToExport[t],null==(s=e.data)?void 0:s.value),n=null;e.styleId&&(n="string"==typeof e.styleId?[e.styleId]:e.styleId);let l=this.getStyleId(n);if(o)return this.createCell(l,this.getDataTypeForValue(o.value),null==o.value?"":o.value);let h=null!=(r=null==(a=e.data)?void 0:a.value)?r:"",d=this.getDataTypeForValue(h);return e.mergeAcross?this.createMergedCell(l,d,h,e.mergeAcross):this.createCell(l,d,h)}),outlineLevel:t};null!=e.collapsed&&(s.collapsed=e.collapsed),null!=e.hidden&&(s.hidden=e.hidden),this.rows.push(s)})}onNewHeaderGroupingRow(){let e=[],{freezeRows:t,headerRowHeight:i}=this.config;return this.rows.push({cells:e,height:ki(this.rows.length+1,i)}),t&&this.frozenRowCount++,{onColumn:(t,i,s,r,a)=>{let o=this.config.styleLinker({rowType:dA.HEADER_GROUPING,rowIndex:1,value:`grouping-${i}`,columnGroup:t});e.push({...this.createMergedCell(this.getStyleId(o),this.getDataTypeForValue("string"),i,r),collapsibleRanges:a})}}}onNewHeaderRow(){let{freezeRows:e,headerRowHeight:t}=this.config;return e&&this.frozenRowCount++,this.onNewRow(this.onNewHeaderColumn,t)}onNewBodyRow(e){let{freezeRows:t,rowHeight:i}=this.config;!this.skipFrozenRows&&("headersAndPinnedRows"===t&&(null==e?void 0:e.rowPinned)==="top"||"function"==typeof t&&t({...this.gos.getGridCommonParams(),node:e})?this.frozenRowCount++:this.skipFrozenRows=!0);let s=this.onNewRow(this.onNewBodyColumn,i);return e&&this.addRowOutlineIfNecessary(e),s}prepare(e){super.prepare(e),this.columnsToExport=[...e],this.cols=e.map((e,t)=>this.convertColumnToExcel(e,t))}parse(){let e,t=this.rows.reduce((e,t)=>Math.max(e,t.cells.length),0);for(;this.cols.length<t;)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));let{config:i}=this;if(null!=i.sheetName){let{sheetName:t}=i;e=String("function"==typeof t?t(this.gos.getGridCommonParams()):t).substring(0,31)}else e="ag-grid";let s={name:e,table:{columns:this.cols,rows:this.rows}};return this.createExcel(s)}
579addRowOutlineIfNecessary(e){let{gos:t,suppressRowOutline:i,rowGroupExpandState:s="expanded"}=this.config;if(t.get("groupHideOpenParents")||i||null==e.level)return;let r=+!!e.footer,a=tp(this.rows);if(a.outlineLevel=Math.min(e.level+r,7),"expanded"===s)return;let o="collapsed"===s;e.isExpandable()&&(a.collapsed=!(!o&&e.expanded)),a.hidden=!!e.parent&&-1!==e.parent.level&&(o||this.isAnyParentCollapsed(e.parent))}isAnyParentCollapsed(e){for(;e&&-1!==e.level;){if(!e.expanded)return!0;e=e.parent}return!1}convertColumnToExcel(e,t){let i=this.config.columnWidth,s=e?this.extractHeaderValue(e):void 0,r=null!=s?s:"",a=!!e&&e.isFilterAllowed();return i?"number"==typeof i?{width:i,displayName:r,filterAllowed:a}:{width:i({column:e,index:t}),displayName:r,filterAllowed:a}:e?{width:Math.max(e.getActualWidth(),75),displayName:r,filterAllowed:a}:{displayName:r,filterAllowed:a}}onNewHeaderColumn(e,t){return i=>{let s=this.extractHeaderValue(i),r=this.config.styleLinker({rowType:dA.HEADER,rowIndex:e,value:s,column:i});t.push(this.createCell(this.getStyleId(r),this.getDataTypeForValue("string"),s))}}onNewBodyColumn(e,t){let i=0,{freezeColumns:s,rightToLeft:r}=this.config;return(a,o,n)=>{if(i>0){i-=1;return}if(!this.skipFrozenColumns){let e=a.getPinned();"pinned"===s&&e&&(!0===e||"left"===e)!==r||"function"==typeof s&&s({...this.gos.getGridCommonParams(),column:a})?this.frozenColumnCount++:this.skipFrozenColumns=!0}let{value:l,valueFormatted:h}=this.extractRowCellValue(a,o,e,"excel",n),d=this.config.styleLinker({rowType:dA.BODY,rowIndex:e,value:l,column:a,node:n}),u=this.getStyleId(d),c=a.getColSpan(n),p=this.addImage(e,a,l);p?t.push(this.createCell(u,this.getDataTypeForValue(p.value),null==p.value?"":p.value)):c>1?(i=c-1,t.push(this.createMergedCell(u,this.getDataTypeForValue(l),l,c-1))):t.push(this.createCell(u,this.getDataTypeForValue(l),l,h))}}onNewRow(e,t){let i=[];return this.rows.push({cells:i,height:ki(this.rows.length+1,t)}),{onColumn:e.bind(this,this.rows.length,i)()}}createExcel(e){let{excelStyles:t,config:i}=this;return this.frozenColumnCount&&(i.frozenColumnCount=this.frozenColumnCount),this.frozenRowCount&&(i.frozenRowCount=this.frozenRowCount),k1.createExcel(t,e,i)}getDataTypeForValue(e){return void 0===e?"empty":this.isNumerical(e)?"n":"s"}getTypeFromStyle(e,t){if(this.isFormula(t))return"f";if(e&&e.dataType)switch(e.dataType.toLocaleLowerCase()){case"formula":return"f";case"string":return"s";case"number":return"n";case"datetime":return"d";case"error":return"e";case"boolean":return"b";default:ep(`Unrecognized data type for excel export [${e.id}.dataType=${e.dataType}]`)}return null}addImage(e,t,i){if(!this.config.addImageToCell)return;let s=this.config.addImageToCell(e,t,i);if(s)return k1.addBodyImageToMap(s.image,e,t,this.columnsToExport,this.config.rowHeight),s}createCell(e,t,i,s){let r=this.getStyleById(e);!(null!=r&&r.dataType)&&"s"===t&&s&&(i=s);let a=this.getTypeFromStyle(r,i)||t,{value:o,escaped:n}=this.getCellValue(a,i),l=[];return r&&l.push(e),n&&l.push("_quotePrefix"),{styleId:e=this.getStyleId(l)||void 0,data:{type:a,value:o}}}createMergedCell(e,t,i,s){return{styleId:this.getStyleById(e)?e:void 0,data:{type:t,value:"s"===t?k1.getStringPosition(null==i?"":i).toString():i},mergeAcross:s}}getCellValue(e,t){let i=!1;if(null==t||"s"===e&&""===t)return{value:"",escaped:!1};if("s"===e)t&&"'"===t[0]&&(i=!0,t=t.slice(1)),t=k1.getStringPosition(t).toString();else if("f"===e)t=t.slice(1);else if("n"===e){let e=Number(t);isNaN(e)?t="":""!==t&&(t=e.toString())}return{value:t,escaped:i}}getStyleId(e){if(!e||!e.length)return null;if(1===e.length)return e[0];let t=e.join("-");return this.mixedStyles[t]||this.addNewMixedStyle(e),this.mixedStyles[t].excelID}deepCloneObject(e){return JSON.parse(JSON.stringify(e))}addNewMixedStyle(e){this.mixedStyleCounter+=1;let t=`mixedStyle${this.mixedStyleCounter}`,i={};for(let t of e)for(let e of this.excelStyles)e.id===t&&tX(i,this.deepCloneObject(e));i.id=t,i.name=t;let s=e.join("-");this.mixedStyles[s]={excelID:t,key:s,result:i},this.excelStyles.push(i),this.stylesByIds[t]=i}isFormula(e){return null!=e&&this.config.autoConvertFormulas&&e.toString().startsWith("=")}isNumerical(e){return"bigint"==typeof e||isFinite(e)&&""!==e&&!isNaN(parseFloat(e))}getStyleById(e){return null==e?null:this.stylesByIds[e]||null}},k3=(e,t)=>{let i="xl/drawings",s=`${i}/drawing${t+1}.xml`,r=`${i}/_rels/drawing${t+1}.xml.rels`;d$.addFile(r,k1.createDrawingRel(e)),d$.addFile(s,k1.createDrawing(e))},k4=(e,t)=>
579{let i="xl/drawings",s=`${i}/vmlDrawing${t+1}.vml`,r=`${i}/_rels/vmlDrawing${t+1}.vml.rels`;d$.addFile(s,k1.createVmlDrawing(e)),d$.addFile(r,k1.createVmlDrawingRel(e))},k6=(e,t={})=>{if(!e||0===e.length)return ep("Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty."),k1.resetFactory(),!1;let{fontSize:i=11,author:s="AG Grid",activeTab:r=0}=t,a=e.length,o=Math.max(Math.min(r,a-1),0);return(()=>{d$.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]);let{images:e}=k1;if(!e.size)return;d$.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);let t=0;e.forEach(e=>{let{base64:i,imageType:s}=e[0].image[0];d$.addFile(`xl/media/image${++t}.${kn(s)}`,i,!0)})})(),(()=>{let{worksheetDataTables:e}=k1,t=Array.from(e.keys());for(let i=0;i<t.length;i++){let s=t[i],r=e.get(s);r&&d$.addFile(`xl/tables/${r.name}.xml`,k1.createTable(r,i))}})(),(e=>{let t=0,i=0,s=0,{images:r,worksheetDataTables:a,worksheetImages:o,worksheetHeaderFooterImages:n}=k1;for(let l=0;l<e.length;l++){let h,d,u,c=e[l];d$.addFile(`xl/worksheets/sheet${l+1}.xml`,c,!1);let p=r.size>0&&o.has(l),g=a.size>0&&a.has(l),m=r.size&&n.has(l);if(!p&&!g&&!m)continue;p&&(k3(l,t),d=t,t++),m&&(k4(l,i),u=i,i++),g&&(h=s++);let v=`xl/worksheets/_rels/sheet${l+1}.xml.rels`;d$.addFile(v,k1.createRelationships({tableIndex:h,drawingIndex:d,vmlDrawingIndex:u}))}})(e),d$.addFile("xl/workbook.xml",k1.createWorkbook(o)),d$.addFile("xl/styles.xml",k1.createStylesheet(i)),d$.addFile("xl/sharedStrings.xml",k1.createSharedStrings()),d$.addFile("xl/theme/theme1.xml",k1.createTheme()),d$.addFile("xl/_rels/workbook.xml.rels",k1.createWorkbookRels(a)),d$.addFile("docProps/core.xml",k1.createCore(s)),d$.addFile("[Content_Types].xml",k1.createContentTypes(a)),d$.addFile("_rels/.rels",k1.createRels()),k1.resetFactory(),!0},k5=e=>{let{data:t,fontSize:i,author:s,activeSheetIndex:r}=e,a=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return k6(t,{author:s,fontSize:i,activeTab:r})?d$.getZipFile(a):Promise.resolve(void 0)},k8=e=>{let{data:t,fontSize:i,author:s,activeSheetIndex:r}=e,a=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if(k6(t,{author:s,fontSize:i,activeTab:r}))return d$.getUncompressedZipFile(a)},k7=e=>{let{fileName:t="export.xlsx"}=e;k5(e).then(e=>{if(e){let i="function"==typeof t?t():t;dM.download(i,e)}})},k9=class extends dS{constructor(){super(...arguments),this.beanName="excelCreator"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.stylingService=e.stylingService,this.gridSerializer=e.gridSerializer,this.gos=e.gos}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){return Object.assign({},this.gos.get("defaultExcelExportParams"),e)}export(e){if(this.isExportSuppressed())return void ep("Export cancelled. Export is not allowed as per your configuration.");let t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};this.packageCompressedFile(i).then(e=>{if(e){let{fileName:i}=t,s="function"==typeof i?i(this.gos.getGridCommonParams()):i;dM.download(this.getFileName(s),e)}})}exportDataAsExcel(e){this.export(e)}getDataAsExcel(e){let t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};return this.packageFile(i)}setFactoryMode(e){k1.factoryMode=e}getFactoryMode(){return k1.factoryMode}getSheetDataForExcel(e){let t=this.getMergedParams(e);return this.getData(t)}getMultipleSheetsAsExcel(e){return k8(e)}exportMultipleSheetsAsExcel(e){k7(e)}getDefaultFileExtension(){return"xlsx"}
579createSerializingSession(e){var t;let{columnModel:i,columnNameService:s,funcColsService:r,valueService:a,gos:o}=this;return new k2({...e,columnModel:i,columnNameService:s,funcColsService:r,valueService:a,gos:o,suppressRowOutline:e.suppressRowOutline||e.skipRowGroups,headerRowHeight:e.headerRowHeight||e.rowHeight,baseExcelStyles:this.gos.get("excelStyles")||[],rightToLeft:null!=(t=e.rightToLeft)?t:this.gos.get("enableRtl"),styleLinker:this.styleLinker.bind(this)})}styleLinker(e){let{rowType:t,rowIndex:i,value:s,column:r,columnGroup:a,node:o}=e,n=t===dA.HEADER,l=t===dA.HEADER_GROUPING,h=n?r:a,d=[];if(n||l)return d.push("header"),l&&d.push("headerGroup"),h&&(d=d.concat(aU(h.getDefinition(),this.gos,r||null,a||null))),d;let u=this.gos.get("excelStyles"),c=["cell"];if(!u||!u.length)return c;let p=u.map(e=>e.id),g=r.getDefinition();return this.stylingService.processAllCellClasses(g,this.gos.addGridCommonParams({value:s,data:o.data,node:o,colDef:g,column:r,rowIndex:i}),e=>{p.indexOf(e)>-1&&c.push(e)}),c.sort((e,t)=>p.indexOf(e)<p.indexOf(t)?-1:1)}isExportSuppressed(){return this.gos.get("suppressExcelExport")}packageCompressedFile(e){return k5(e)}packageFile(e){return k8(e)}};function Ne(e){var t;return(null==(t=e.excelCreator)?void 0:t.getFactoryMode())!==rW.MULTI_SHEET||(ep("The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1)}var Nt="32.3.9",Ni={version:Nt,moduleName:`${eh.ExcelExportModule}-core`,beans:[k9],dependantModules:[dL,I9]},Ns={version:Nt,moduleName:`${eh.ExcelExportModule}-api`,apiFunctions:{getDataAsExcel:function(e,t){if(Ne(e)){var i;return null==(i=e.excelCreator)?void 0:i.getDataAsExcel(t)}},exportDataAsExcel:function(e,t){if(Ne(e)){var i;null==(i=e.excelCreator)||i.exportDataAsExcel(t)}},getSheetDataForExcel:function(e,t){var i,s;return null==(i=e.excelCreator)||i.setFactoryMode(rW.MULTI_SHEET),null==(s=e.excelCreator)?void 0:s.getSheetDataForExcel(t)},getMultipleSheetsAsExcel:function(e,t){var i;return null==(i=e.excelCreator)?void 0:i.getMultipleSheetsAsExcel(t)},exportMultipleSheetsAsExcel:function(e,t){var i;null==(i=e.excelCreator)||i.exportMultipleSheetsAsExcel(t)}},dependantModules:[Ni]},Nr={version:Nt,moduleName:eh.ExcelExportModule,dependantModules:[Ni,Ns]},Na={selector:"AG-FILTERS-TOOL-PANEL-HEADER",component:class extends s${constructor(){super(...arguments),this.eExpand=s_,this.eFilterTextField=s_}wireBeans(e){this.columnModel=e.columnModel}postConstruct(){this.setTemplate(`<div class="ag-filter-toolpanel-search" role="presentation">
580                <div data-ref="eExpand" class="ag-filter-toolpanel-expand"></div>
581                <ag-input-text-field data-ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>
582            </div>`,[aC]);let e=this.localeService.getLocaleTextFunc();this.eFilterTextField.setAutoComplete(!1).setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")).onValueChange(this.onSearchTextChanged.bind(this)),this.createExpandIcons(),this.setExpandState(0),this.addManagedElementListeners(this.eExpand,{click:this.onExpandClicked.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)})}init(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=sq("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=sq("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=sq("columnSelectIndeterminate",this.gos))}showOrHideOptions(){let e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search..."));let s=this.columnModel.getCols().some(e=>e.getOriginalParent()&&e.isFilterAllowed());ss(this.eFilterTextField.getGui(),e),ss(this.eExpand,t&&s)}onSearchTextChanged(){this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=ey(()=>{this.dispatchLocalEvent({type:"searchChanged",searchText:this.eFilterTextField.getValue()})},300)),this.onSearchTextChangedDebounced()}onExpandClicked(){let e=0===this.currentExpandState?{type:"collapseAll"}
582:{type:"expandAll"};this.dispatchLocalEvent(e)}setExpandState(e){this.currentExpandState=e,ss(this.eExpandChecked,0===this.currentExpandState),ss(this.eExpandUnchecked,1===this.currentExpandState),ss(this.eExpandIndeterminate,2===this.currentExpandState)}}},No=class extends s${constructor(e,t){super(`
583            <div class="ag-filter-toolpanel-instance">
584                <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" data-ref="eFilterToolPanelHeader" role="button" aria-expanded="false">
585                    <div data-ref="eExpand" class="ag-filter-toolpanel-expand"></div>
586                    <span data-ref="eFilterName" class="ag-header-cell-text"></span>
587                    <span data-ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>
588                </div>
589                <div class="ag-filter-toolpanel-instance-body ag-filter" data-ref="agFilterToolPanelBody"></div>
590            </div>`),this.expandedCallback=t,this.eFilterToolPanelHeader=s_,this.eFilterName=s_,this.agFilterToolPanelBody=s_,this.eFilterIcon=s_,this.eExpand=s_,this.expanded=!1,this.hideHeader=e}wireBeans(e){this.filterManager=e.filterManager,this.columnNameService=e.columnNameService}postConstruct(){this.eExpandChecked=sq("columnSelectOpen",this.gos),this.eExpandUnchecked=sq("columnSelectClosed",this.gos),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)}setColumn(e){this.column=e,this.eFilterName.innerText=this.columnNameService.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListeners(this.eFilterToolPanelHeader,{click:this.toggleExpanded.bind(this),keydown:this.onKeyDown.bind(this)}),this.addManagedEventListeners({filterOpened:this.onFilterOpened.bind(this)}),this.addInIcon("filter",this.eFilterIcon,this.column),ss(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),ss(this.eExpandChecked,!1),this.hideHeader?(ss(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListeners(this.column,{filterChanged:this.onFilterChanged.bind(this)})}onKeyDown(e){let{key:t}=e,{ENTER:i,SPACE:s,LEFT:r,RIGHT:a}=s9;(t===i||t===s||t===r||t===a)&&(e.preventDefault(),t===i||t===s?this.toggleExpanded():t===s9.LEFT?this.collapse():this.expand())}getColumn(){return this.column}getColumnFilterName(){return this.columnNameService.getDisplayNameForColumn(this.column,"filterToolPanel",!1)}addCssClassToTitleBar(e){this.eFilterToolPanelHeader.classList.add(e)}addInIcon(e,t,i){if(null==t)return;let s=sq(e,this.gos,i);t.appendChild(s)}isFilterActive(){var e;return!!(null!=(e=this.filterManager)&&e.isFilterActive(this.column))}onFilterChanged(){ss(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchLocalEvent({type:"filterChanged"})}toggleExpanded(){this.expanded?this.collapse():this.expand()}expand(){this.expanded||(this.expanded=!0,iZ(this.eFilterToolPanelHeader,!0),ss(this.eExpandChecked,!0),ss(this.eExpandUnchecked,!1),this.addFilterElement(),this.expandedCallback())}addFilterElement(e){var t;let i=sy('<div class="ag-filter-toolpanel-instance-filter"></div>'),s=this.createManagedBean(new r5(this.column,"TOOLBAR"));this.filterWrapperComp=s,s.hasFilter()&&(null==(t=s.getFilter())||t.then(t=>{this.underlyingFilter=t,t&&(i.appendChild(s.getGui()),this.agFilterToolPanelBody.appendChild(i),s.afterGuiAttached({container:"toolPanel",suppressFocus:e}))}))}collapse(){var e;this.expanded&&(this.expanded=!1,iZ(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),ss(this.eExpandChecked,!1),ss(this.eExpandUnchecked,!0),null==(e=this.filterWrapperComp)||e.afterGuiDetached(),this.destroyBean(this.filterWrapperComp),this.expandedCallback())}removeFilterElement(){sm(this.agFilterToolPanelBody)}isExpanded(){return this.expanded}refreshFilter(e){if(!this.expanded)return;let t=this.underlyingFilter;if(t)if(e)"function"==typeof t.refreshVirtualList&&t.refreshVirtualList();else{var i;null==(i=t.afterGuiDetached)||i.call(t)}}onFilterOpened(e){"COLUMN_MENU"!==e.source||e.column!==this.column||this.expanded&&this.collapse()}},Nn=class e extends s${constructor(e,t,i,s,r){super(),this.filterGroupComp=s_,this.columnGroup=e,this.childFilterComps=t,this.depth=s,this.expandedCallback=i,this.showingColumn=r}wireBeans(e){this.columnNameService=e.columnNameService}postConstruct(){this.setTemplate(`<div class="ag-filter-toolpanel-group-wrapper">
591            <ag-group-component data-ref="filterGroupComp"></ag-group-component>
592        </div>`,[As],{filterGroupComp:{cssIdentifier:"filter-toolpanel",direction:"vertical"}}),this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass(`ag-filter-toolpanel-group-level-${this.depth}`),this.filterGroupComp.getGui().style.setProperty("--ag-indentation-level",String(this.depth)),this.filterGroupComp.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth}
592-header`),this.childFilterComps.forEach(e=>{this.filterGroupComp.addItem(e),e.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth+1}-header`),e.getGui().style.setProperty("--ag-indentation-level",String(this.depth+1))}),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip(),this.addInIcon("filter")}setupTooltip(){let e;if(!this.showingColumn)return;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>{let e=this.filterGroupComp.getGui().querySelector(".ag-group-title");return!e||e.scrollWidth>e.clientWidth});let t=()=>{let t=this.columnGroup.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"filterToolPanelColumnGroup",shouldDisplayTooltip:e})};t(),this.addManagedEventListeners({newColumnsLoaded:t})}getTooltipParams(){let e=super.getTooltipParams();return e.location="filterToolPanelColumnGroup",e}addCssClassToTitleBar(e){this.filterGroupComp.addCssClassToTitleBar(e)}refreshFilters(t){this.childFilterComps.forEach(i=>{i instanceof e?i.refreshFilters(t):i.refreshFilter(t)})}isColumnGroup(){return tN(this.columnGroup)}isExpanded(){return this.filterGroupComp.isExpanded()}getChildren(){return this.childFilterComps}getFilterGroupName(){return this.filterGroupName?this.filterGroupName:""}getFilterGroupId(){return this.columnGroup.getId()}hideGroupItem(e,t){this.filterGroupComp.hideItem(e,t)}hideGroup(e){this.setDisplayed(!e)}addInIcon(e){let t=sq(e,this.gos);t&&t.classList.add("ag-filter-toolpanel-group-instance-header-icon"),this.filterGroupComp.addTitleBarWidget(t)}forEachToolPanelFilterChild(e){this.childFilterComps.forEach(t=>{t instanceof No&&e(t)})}addExpandCollapseListeners(){let e=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(e=>e.expand()),t=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(e=>e.collapse());this.addManagedListeners(this.filterGroupComp,{expanded:e,collapsed:t})}getColumns(){return tN(this.columnGroup)?this.columnGroup.getLeafColumns():[this.columnGroup]}addFilterChangedListeners(){this.getColumns().forEach(e=>{this.addManagedListeners(e,{filterChanged:()=>this.refreshFilterClass()})}),tN(this.columnGroup)||this.addManagedEventListeners({filterOpened:this.onFilterOpened.bind(this)})}refreshFilterClass(){let e=this.getColumns();this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",e.some(e=>e.isFilterActive()))}onFilterOpened(e){"COLUMN_MENU"!==e.source||e.column!==this.columnGroup||this.isExpanded()&&this.collapse()}expand(){this.filterGroupComp.toggleGroupExpand(!0)}collapse(){this.filterGroupComp.toggleGroupExpand(!1)}setGroupTitle(){this.filterGroupName=tN(this.columnGroup)?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")}getColumnGroupName(e){return this.columnNameService.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")}getColumnName(e){return this.columnNameService.getDisplayNameForColumn(e,"filterToolPanel",!1)}destroyFilters(){this.childFilterComps=this.destroyBeans(this.childFilterComps),sm(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}},Nl={selector:"AG-FILTERS-TOOL-PANEL-LIST",component:class extends s${constructor(){super('<div class="ag-filter-list-panel"></div>'),this.initialised=!1,this.hasLoadedInitialState=!1,this.isInitialState=!1,this.filterGroupComps=[],this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending=!1}wireBeans(e){this.toolPanelColDefService=e.toolPanelColDefService,this.columnModel=e.columnModel}init(e){this.initialised=!0;let t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});tX(t,e),this.params=t,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:()=>this.onColumnsChanged()}),this.addManagedEventListeners({newColumnsLoaded:()=>this.onColumnsChanged(),toolPanelVisibleChanged:e=>{"filters"===e.key&&this.refreshFilters(e.visible)},dragStarted:()=>{this.suppressOnColumnsChanged=!0},dragStopped:()=>{this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending&&(this.onColumnsChangedPending=!1,this.onColumnsChanged())}}),this.columnModel.isReady()&&this.onColumnsChanged()}onColumnsChanged(){if(this.suppressOnColumnsChanged){this.onColumnsChangedPending=!0;return}let e=this.columnModel.isPivotMode();
592this.params.suppressSyncLayoutWithGrid||e?this.buildTreeFromProvidedColumnDefs():this.syncFilterLayout(),this.refreshAriaLabel()}syncFilterLayout(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this)),this.refreshAriaLabel()}buildTreeFromProvidedColumnDefs(){let e=this.columnModel.getColDefColTree();this.recreateFilters(e)}setFiltersLayout(e){let t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)}recreateFilters(e){let t=eZ(this.gos);this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);let i=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,i);let s=this.filterGroupComps.length;s&&(this.filterGroupComps.forEach(e=>this.appendChild(e)),this.setFirstAndLastVisible(0,s-1)),eM(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(t)&&t.focus(),this.isInitialState=!1,this.refreshAriaLabel()}recursivelyAddComps(e,t,i){return tx(e.map(e=>{if(tN(e))return tx(this.recursivelyAddFilterGroupComps(e,t,i));if(!this.shouldDisplayFilter(e))return[];let s=new No(0===t,()=>this.onFilterExpanded());if(this.createBean(s),s.setColumn(e),i.get(e.getId())&&s.expand(),t>0)return s;let r=this.createBean(new Nn(e,[s],this.onGroupExpanded.bind(this),t,!0));return r.addCssClassToTitleBar("ag-filter-toolpanel-header"),i.get(r.getFilterGroupId())||r.collapse(),r}))}refreshAriaLabel(){let e=this.localeService.getLocaleTextFunc(),t=e("ariaFilterPanelList","Filter List"),i=e("filters","Filters"),s=this.getGui().querySelectorAll(".ag-filter-toolpanel-group-item:not(.ag-filter-toolpanel-group-wrapper, .ag-hidden)").length;ij(this.getAriaElement(),`${t} ${s} ${i}`)}recursivelyAddFilterGroupComps(e,t,i){if(!this.filtersExistInChildren(e.getChildren()))return;let s=e.getColGroupDef();if(s&&s.suppressFiltersToolPanel)return[];let r=e.isPadding()?t:t+1,a=tx(this.recursivelyAddComps(e.getChildren(),r,i));if(e.isPadding())return a;let o=new Nn(e,a,this.onGroupExpanded.bind(this),t,!1);this.createBean(o),o.addCssClassToTitleBar("ag-filter-toolpanel-header");let n=i.get(o.getFilterGroupId());return(this.isInitialState&&!n||!1===n)&&o.collapse(),[o]}filtersExistInChildren(e){return e.some(e=>tN(e)?this.filtersExistInChildren(e.getChildren()):this.shouldDisplayFilter(e))}shouldDisplayFilter(e){let t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t}getExpansionState(){let e=new Map;if(this.isInitialState){let{expandedColIds:t,expandedGroupIds:i}=this.params.initialState;return t.forEach(t=>
592e.set(t,!0)),i.forEach(t=>e.set(t,!0)),e}let t=i=>{e.set(i.getFilterGroupId(),i.isExpanded()),i.getChildren().forEach(i=>{i instanceof Nn?t(i):e.set(i.getColumn().getId(),i.isExpanded())})};return this.filterGroupComps.forEach(t),e}refresh(){}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}expandFilterGroups(e,t){let i=[],s=r=>{let a=r.getFilterGroupId();(!t||tS(t,a))&&(e&&r.isColumnGroup()?r.expand():r.collapse(),i.push(a)),r.getChildren().forEach(e=>{e instanceof Nn&&s(e)})};if(this.filterGroupComps.forEach(s),this.onGroupExpanded(),t){let e=t.filter(e=>0>i.indexOf(e));e.length>0&&ep("unable to find groups for these supplied groupIds:",e)}}expandFilters(e,t){let i=[],s=r=>{if(r instanceof Nn){let t=!1;return r.getChildren().forEach(i=>{s(i)&&(e?(r.expand(),t=!0):r.isColumnGroup()||r.collapse())}),t}let a=r.getColumn().getColId(),o=!t||tS(t,a);return o&&(e?r.expand():r.collapse(),i.push(a)),o};if(this.filterGroupComps.forEach(s),this.onGroupExpanded(),t){let e=t.filter(e=>0>i.indexOf(e));e.length>0&&ep("unable to find columns for these supplied colIds:"+e)}}onGroupExpanded(){this.fireExpandedEvent()}onFilterExpanded(){this.dispatchLocalEvent({type:"filterExpanded"})}fireExpandedEvent(){let e,t=0,i=0,s=e=>{e.isColumnGroup()&&(e.isExpanded()?t++:i++,e.getChildren().forEac
592h(e=>{e instanceof Nn&&s(e)}))};this.filterGroupComps.forEach(s),e=t>0&&i>0?2:+(i>0),this.dispatchLocalEvent({type:"groupExpanded",state:e})}performFilterSearch(e){this.searchFilterText=eM(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)}searchFilters(e){let t,i,s=t=>!eM(e)||-1!==t.toLowerCase().indexOf(e),r=(e,t)=>{if(!(e instanceof Nn))return s(e.getColumnFilterName()||"");let i=e.getChildren(),a=s(e.getFilterGroupName()),o=t||a;if(o){e.hideGroup(!1);for(let t=0;t<i.length;t++)r(i[t],o),e.hideGroupItem(!1,t);return!0}let n=!1;return i.forEach((i,s)=>{let a=r(i,t);e.hideGroupItem(!a,s),a&&(n=!0)}),e.hideGroup(!n),n};this.filterGroupComps.forEach((e,s)=>{r(e,!1),void 0===t?e.containsCssClass("ag-hidden")||(t=s,i=s):e.containsCssClass("ag-hidden")||i===s||(i=s)}),this.setFirstAndLastVisible(t,i),this.refreshAriaLabel()}setFirstAndLastVisible(e,t){this.filterGroupComps.forEach((i,s)=>{i.removeCssClass("ag-first-group-visible"),i.removeCssClass("ag-last-group-visible"),s===e&&i.addCssClass("ag-first-group-visible"),s===t&&i.addCssClass("ag-last-group-visible")})}refreshFilters(e){this.filterGroupComps.forEach(t=>t.refreshFilters(e))}getExpandedFiltersAndGroups(){let e=[],t=new Set,i=s=>
592{if(s instanceof Nn){s.getChildren().forEach(e=>i(e));let r=s.getFilterGroupId();s.isExpanded()&&!t.has(r)&&e.push(r)}else s.isExpanded()&&t.add(s.getColumn().getColId())};return this.filterGroupComps.forEach(i),{expandedGroupIds:e,expandedColIds:Array.from(t)}}destroyFilters(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),sm(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}}},Nh=class extends s${constructor(){super(`<div class="ag-filter-toolpanel">
593            <ag-filters-tool-panel-header data-ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>
594            <ag-filters-tool-panel-list data-ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>
595         </div>`,[Na,Nl]),this.filtersToolPanelHeaderPanel=s_,this.filtersToolPanelListPanel=s_,this.initialised=!1,this.listenerDestroyFuncs=[]}init(e){this.initialised&&(this.listenerDestroyFuncs.forEach(e=>e()),this.listenerDestroyFuncs=[]),this.initialised=!0;let t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});this.params={...t,...e},this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);let i=this.params.suppressExpandAll,s=this.params.suppressFilterSearch;i&&s&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(...this.addManagedListeners(this.filtersToolPanelHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),searchChanged:this.onSearchChanged.bind(this)}),...this.addManagedListeners(this.filtersToolPanelListPanel,{filterExpanded:this.onFilterExpanded.bind(this),groupExpanded:this.onGroupExpanded.bind(this)}))}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}onExpandAll(){this.filtersToolPanelListPanel.expandFilterGroups(!0)}onCollapseAll(){this.filtersToolPanelListPanel.expandFilterGroups(!1)}onSearchChanged(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)}setFilterLayout(e){this.filtersToolPanelListPanel.setFiltersLayout(e)}onFilterExpanded(){this.params.onStateUpdated()}onGroupExpanded(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}expandFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)}collapseFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)}expandFilters(e){this.filtersToolPanelListPanel.expandFilters(!0,e)}collapseFilters(e){this.filtersToolPanelListPanel.expandFilters(!1,e)}syncLayoutWithGrid(){this.filtersToolPanelListPanel.syncFilterLayout()}refresh(e){return this.init(e),!0}getState(){return this.filtersToolPanelListPanel.getExpandedFiltersAndGroups()}destroy(){super.destroy()}},Nd={version:"32.3.9",moduleName:eh.FiltersToolPanelModule,beans:[],userComponents:[{name:"agFiltersToolPanel",classImp:Nh}],dependantModules:[PZ,I9,oo]},Nu=class extends tk{constructor(){super(...arguments),this.loadRowDataVersion=0}wireBeans(e){this.focusService=e.focusService,this.rowPositionUtils=e.rowPositionUtils,this.environment=e.environment}init(e,t){this.params=t,this.comp=e,null==t.pinned&&(this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.addThemeToDetailGrid(),this.createDetailGrid(),this.loadRowData(),this.addManagedEventListeners({fullWidthRowFocused:this.onFullWidthRowFocused.bind(this)}))}onFullWidthRowFocused(e){let t=this.params,i={rowIndex:t.node.rowIndex,rowPinned:t.node.rowPinned},s={rowIndex:e.rowIndex,rowPinned:e.rowPinned};this.rowPositionUtils.sameRow(i,s)&&this.focusService.focusInto(this.comp.getGui(),e.fromBelow)}setAutoHeightClasses(){let e=this.gos.get("detailRowAutoHeight");this.comp.addOrRemoveCssClass(e?"ag-details-row-auto-height":"ag-details-row-fixed-height",!0),this.comp.addOrRemoveDetailGridCssClass(e?"ag-details-grid-auto-height":"ag-details-grid-fixed-height",!0)}setupRefreshStrategy(){let e=this.params.refreshStrategy;if("everything"==e||"nothing"==e||"rows"==e){this.refreshStrategy=e;return}null!=e&&ep("invalid cellRendererParams.refreshStrategy = '"+e+"' supplied, defaulting to refreshStrategy = 'rows'."),this.refreshStrategy="rows"}addThemeToDetailGrid(){for(let e of this.environment.getThemeClasses())this.comp.addOrRemoveDetailGridCssClass(e,!0)}createDetailGrid(){if(eD(this.params.detailGridOptions))return void ep("could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions");let e={...this.params.detailGridOptions};this.gos.get("detailRowAutoHeight")&&(e.domLayout="autoHeight"),e.theme||(e.theme=this.gos.get("theme")),this.comp.setDetailGrid(e)}registerDetailWithMaster(e){let t=this.params.node.id,i=this.params.api,s={id:t,api:e},r=this.params.node;i.isDestroyed()||(i.addDetailGridInfo(t,s),r.detailGridInfo=s,this.addDestroyFunc(()=>{r.detailGridInfo===s&&(i.isDestroyed()||i.removeDetailGridInfo(t),r.detailGridInfo=null)}))}loadRowData(){var e,t;this.loadRowDataVersion++;let i=this.loadRowDataVersion;if((null==(e=this.params.detailGridOptions)?void 0:e.rowModelType)==="serverSide"){null==(t=this.params.node.detailGridInfo)||null==(t=t.api)||t.refreshServerSide({purge:!0});return}let s=this.params.getDetailRowData;if(!s)return void ep("could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData");let r=e=>{this.loadRowDataVersion===i&&this.comp.setRowData(e)};s({node:this.params.node,data:this.params.node.data,successCallback:r,context:this.gos.getGridCommonParams().context})}refresh(){switch(this.refreshStrategy){case"nothing":return!0;case"everything":return!1}return this.loadRowData(),!0}},Nc=class{constructor(e){this.parentWrapper=e}wrap(e,t,i,s){return this.parentWrapper.wrap(e,t,i,s)}},Np=class extends s${constructor(){super(...arguments),this.eDetailGrid=s_}wireBeans(e){this.context=e.context}init(e){this.params=e,this.selectAndSetTemplate(),this.ctrl=this.createManagedBean(new Nu),this.ctrl.init({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveDetailGridCssClass:(e,t)=>this.eDetailGrid.classList.toggle(e,t),setDetailGrid:e=>this.setDetailGrid(e),setRowData:e=>this.setRowData(e),getGui:()=>this.eDetailGrid},e)}refresh(){return this.ctrl&&this.ctrl.refresh()}destroy(){super.destroy()}selectAndSetTemplate(){if(this.params.pinned)return void this.setTemplate('<div class="ag-details-row"></div>');let e=()=>{this.setTemplate(`<div class="ag-details-row" role="gridcell">
596                <div data-ref="eDetailGrid" class="ag-details-grid" role="presentation"></div>
597            </div>`)};if(eD(this.params.template))e();else if("string"==typeof this.params.template)this.setTemplate(this.params.template,[]);else if("function"==typeof this.params.template){let e=(0,this.params.template)(this.params);this.setTemplate(e,[])}else ep("detailCellRendererParams.template should be function or string"),e();null==this.eDetailGrid&&ep('Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.')}setDetailGrid(e){if(!this.eDetailGrid)return;let t=new Nc(this.context.getBean("frameworkComponentWrapper")),i=this.getFrameworkOverrides(),s=de(this.eDetailGrid,e,{frameworkOverrides:i,providedBeanInstances:{frameworkComponentWrapper:t},modules:rV.__getGridRegisteredModules(this.params.api.getGridId())});this.detailApi=s,this.ctrl.registerDetailWithMaster(s),this.addDestroyFunc(()=>{null==s||s.destroy()})}setRowData(e){this.detailApi&&this.detailApi.setGridOption("rowData",e)}},Ng=class extends tk{constructor(){super(...arguments),this.beanName="detailGridApiService",this.detailGridInfoMap={}}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;tK(this.detailGridInfoMap,(i,s)=>{eM(s)&&(e(s,t),t++)})}destroy(){this.detailGridInfoMap={},super.destroy()}},Nm="32.3.9",Nv={version:Nm,moduleName:`${eh.MasterDetailModule}-core`,userComponents:[{name:"agGroupRowRenderer",classImp:AD},{name:"agGroupCellRenderer",classImp:AD},{name:"agDetailCellRenderer",classImp:Np}],controllers:[{name:"detailCellRenderer",classImp:Nu},{name:"groupCellRendererCtrl",classImp:Ax}],dependantModules:[I9]},Nf={version:Nm,moduleName:`${eh.MasterDetailModule}-api`,beans:[Ng],apiFunctions:{addDetailGridInfo:function(e,t,i){var s;null==(s=e.detailGridApiService)||s.addDetailGridInfo(t,i)},removeDetailGridInfo:function(e,t){var i;null==(i=e.detailGridApiService)||i.removeDetailGridInfo(t)},getDetailGridInfo:function(e,t){var i;return null==(i=e.detailGridApiService)?void 0:i.getDetailGridInfo(t)}
597,forEachDetailGridInfo:function(e,t){var i;null==(i=e.detailGridApiService)||i.forEachDetailGridInfo(t)}},dependantModules:[Nv]},NC={version:Nm,moduleName:eh.MasterDetailModule,dependantModules:[Nv,Nf]},Ny=class e extends tk{constructor(){super(...arguments),this.beanName="chartMenuItemMapper"}wireBeans(e){this.chartService=e.chartService}getChartItems(t){var i;if(!this.chartService)return void this.gos.assertModuleRegistered(eh.GridChartsModule,`the Context Menu key "${t}"`);let s="pivotChart"===t?new Nw(this.gos,this.chartService,this.localeService):new Nb(this.gos,this.chartService,this.localeService),r=this.chartService.isEnterprise(),a=s.getMenuItem();if(a&&a.subMenu&&!r){let e=t=>{var i;return{...t,subMenu:null==(i=t.subMenu)?void 0:i.filter(e=>!e._enterprise).map(t=>e(t))}};a=e(a)}let o=null==(i=this.gos.get("chartToolPanelsDef"))||null==(i=i.settingsPanel)?void 0:i.chartGroupsDef;return o&&(a=e.filterAndOrderChartMenu(a,o,s.getConfigLookup())),this.cleanInternals(a)}cleanInternals(e){if(!e)return e;let t=e=>{var i;return null==e||delete e._key,null==e||delete e._enterprise,null==e||null==(i=e.subMenu)||i.forEach(e=>t(e)),e};return t(e)}static buildLookup(e){let t={},i=e=>{t[e._key]=e,e.subMenu&&e.subMenu.forEach(e=>i(e))};return i(e),t}static filterAndOrderChartMenu(e,t,i){var s;let r=this.buildLookup(e),a={...e,subMenu:[]};if(Object.entries(t).forEach(([e,t])=>{let s=i[e];if(null===s)return;
597if(void 0==s)return void ep(`invalid chartGroupsDef config '${e}'`);let o=r[s._key];if(o){var n,l;if(o.subMenu){let i=t.map(t=>{let i=s[t];return void 0==i?void ep(`invalid chartGroupsDef config '${e}.${t}'`):r[i]}).filter(e=>void 0!==e);i.length>0&&(o.subMenu=i,null==(n=a.subMenu)||n.push(o))}else null==(l=a.subMenu)||l.push(o)}}),(null==(s=a.subMenu)?void 0:s.length)!=0)return a}},Nw=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){let e=this.localeService.getLocaleTextFunc(),t=(t,i,s,r,a=!1)=>({name:e(t,i),action:()=>this.chartService.createPivotChart({chartType:s}),_key:r,_enterprise:a});return{name:e("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped&lrm;","groupedColumn","pivotGroupedColumn"),t("stackedColumn","Stacked&lrm;","stackedColumn","pivotStackedColumn"),t("normalizedColumn","100% Stacked&lrm;","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped&lrm;","groupedBar","pivotGroupedBar"),t("stackedBar","Stacked&lrm;","stackedBar","pivotStackedBar"),t("normalizedBar","100% Stacked&lrm;","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:e("pieChart","Pie"),subMenu:[t("pie","Pie&lrm;","pie","pivotPie"),t("donut","Donut&lrm;","donut","pivotDonut")]},t("line","Line&lrm;","line","pivotLineChart"),{_key:"pivotXYChart",name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter&lrm;","scatter","pivotScatter"),t("bubble","Bubble&lrm;","bubble","pivotBubble")]},{_key:"pivotAreaChart",name:e("areaChart","Area"),subMenu:[t("area","Area&lrm;","area","pivotArea"),t("stackedArea","Stacked&lrm;","stackedArea","pivotStackedArea"),t("normalizedArea","100% Stacked&lrm;","normalizedArea","pivotNormalizedArea")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:e("statisticalChart","Statistical"),subMenu:[t("histogramChart","Histogram&lrm;","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemapChart","Treemap&lrm;","treemap","pivotTreemap",!0),t("sunburstChart","Sunburst&lrm;","sunburst","pivotSunburst",!0)]},{_key:"pivotCombinationChart",name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line&lrm;","columnLineCombo","pivotColumnLineCombo"),t("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","pivotAreaColumnCombo")]}],icon:sq("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},polarGroup:null,specializedGroup:null}}},Nb=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){let e=this.localeService.getLocaleTextFunc(),t=(t,i,s,r,a=!1)=>({name:e(t,i),action:()=>this.chartService.createChartFromCurrentRange(s),_key:r,_enterprise:a});return{name:e("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped&lrm;","groupedColumn","rangeGroupedColumn"),t("stackedColumn","Stacked&lrm;","stackedColumn","rangeStackedColumn"),t("normalizedColumn","100% Stacked&lrm;","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped&lrm;","groupedBar","rangeGroupedBar"),t("stackedBar","Stacked&lrm;","stackedBar","rangeStackedBar"),t("normalizedBar","100% Stacked&lrm;","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:e("pieChart","Pie"),subMenu:[t("pie","Pie&lrm;","pie","rangePie"),t("donut","Donut&lrm;","donut","rangeDonut")],_key:"rangePieChart"},t("line","Line&lrm;","line","rangeLineChart"),{name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter&lrm;","scatter","rangeScatter"),t("bubble","Bubble&lrm;","bubble","rangeBubble")],_key:"rangeXYChart"},{name:e("areaChart","Area"),subMenu:[t("area","Area&lrm;","area","rangeArea"),t("stackedArea","Stacked&lrm;","stackedArea","rangeStackedArea"),t("normalizedArea","100% Stacked&lrm;","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:e("polarChart","Polar"),subMenu:[t("radarLine","Radar Line&lrm;","radarLine","rangeRadarLine"),t("radarArea","Radar Area&lrm;","radarArea","rangeRadarArea"),t("nightingale","Nightingale&lrm;","nightingale","rangeNightingale"),t("radialColumn","Radial Column&lrm;","radialColumn","rangeRadialColumn"),t("radialBar","Radial Bar&lrm;","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:e("statisticalChart","Statistical"),subMenu:[t("boxPlot","Box Plot&lrm;","boxPlot","rangeBoxPlot",!0),t("histogramChart","Histogram&lrm;","histogram","rangeHistogram",!1),t("rangeBar","Range Bar&lrm;","rangeBar","rangeRangeBar",!0),t("rangeArea","Range Area&lrm;","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemap","Treemap&lrm;","treemap","rangeTreemap"),t("sunburst","Sunburst&lrm;","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:e("specializedChart","Specialized"),subMenu:[t("heatmap","Heatmap&lrm;","heatmap","rangeHeatmap"),t("waterfall","Waterfall&lrm;","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0}
597,{name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line&lrm;","columnLineCombo","rangeColumnLineCombo"),t("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:sq("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},NS=class extends tk{constructor(){super(...arguments),this.beanName="columnChooserFactory"}wireBeans(e){this.focusService=e.focusService,this.menuUtils=e.menuUtils,this.visibleColsService=e.visibleColsService}createColumnSelectPanel(e,t,i,s){var r,a;let o=e.createManagedBean(new P4),{contractColumnSelection:n,suppressColumnExpandAll:l,suppressColumnFilter:h,suppressColumnSelectAll:d,suppressSyncLayoutWithGrid:u,columnLayout:c}=null!=(r=null!=(a=null!=s?s:null==t?void 0:t.getColDef().columnChooserParams)?a:null==t?void 0:t.getColDef().columnsMenuParams)?r:{};return o.init(!!i,this.gos.addGridCommonParams({suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!n,suppressColumnExpandAll:!!l,suppressColumnFilter:!!h,suppressColumnSelectAll:!!d,suppressSyncLayoutWithGrid:!!c||!!u,onStateUpdated:()=>{}}),"columnMenu"),c&&o.setColumnLayout(c),o}showColumnChooser({column:e,chooserParams:t,eventSource:i}){this.hideActiveColumnChooser();let s=this.createColumnSelectPanel(this,e,!0,t),r=this.localeService.getLocaleTextFunc(),a=this.visibleColsService.getAllCols().indexOf(e),o=e?this.focusService.getFocusedHeader():null;this.activeColumnChooserDialog=this.createBean(new Av({title:r("chooseColumns","Choose Columns"),component:s,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{var t;null==(t=this.focusService.findNextFocusableElement(s.getGui()))||t.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,e)},closedCallback:t=>{let s=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,e),e&&this.menuUtils.restoreFocusOnClose({column:e,headerPosition:o,columnIndex:a,eventSource:i},s,t,!0)},postProcessPopupParams:{type:"columnChooser",column:e,eventSource:i}})),this.activeColumnChooser=s}hideActiveColumnChooser(){this.activeColumnChooserDialog&&this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:"columnChooser",column:null!=t?t:null})}},Nx="separator",NM=class extends tk{constructor(){super(...arguments),this.beanName="columnMenuFactory"}wireBeans(e){this.menuItemMapper=e.menuItemMapper,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.menuService=e.menuService}createMenu(e,t,i,s){let r=e.createManagedBean(new Af(0,{column:null!=i?i:null,node:null,value:null}
597)),a=this.menuItemMapper.mapWithStockItems(t,null!=i?i:null,s,"columnMenu");return r.addMenuItems(a),r}getMenuItems(e,t){let i,s=this.getDefaultMenuOptions(e),r=null==e?void 0:e.getColDef().mainMenuItems;if(Array.isArray(r))i=r;else if("function"==typeof r)i=r(this.gos.addGridCommonParams({column:e,defaultItems:s}));else{let t=this.gos.getCallback("getMainMenuItems");i=t&&e?t({column:e,defaultItems:s}):s}return tv(i,Nx),i}getDefaultMenuOptions(e){let t=[],i=this.menuService.isLegacyMenuEnabled();if(!e)return i||t.push("columnChooser"),t.push("resetColumns"),t;let s=!e.getColDef().lockPinned,r=this.funcColsService.getRowGroupColumns().length,a=e.isAllowValue(),o=e.isAllowRowGroup(),n=e.isPrimary(),l=this.columnModel.isPivotMode(),h=eN(this.gos),d=this.gos.get("treeData"),u=n&&r>0&&a||!n;if(!i&&e.isSortable()){let i=e.getSort();"asc"!==i&&t.push("sortAscending"),"desc"!==i&&t.push("sortDescending"),i&&t.push("sortUnSort"),t.push(Nx)}return this.menuService.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push(Nx)),s&&t.push("pinSubMenu"),u&&t.push("valueAggSubMenu"),(s||u)&&t.push(Nx),t.push("autoSizeThis"),t.push("autoSizeAll"),t.push(Nx),e.getColDef().showRowGroup?t.push("rowUnGroup"):o&&e.isPrimary()&&(e.isRowGroupActive()?this.columnModel.isColGroupLocked(e)||t.push("rowUnGroup"):t.push("rowGroup")),t.push(Nx),i||t.push("columnChooser"),t.push("resetColumns"),h&&(d||r>+!!l)&&(t.push("expandAll"),t.push("contractAll")),t}},ND="ag-context-menu-open",NE=class extends tk{constructor(){super(...arguments),this.beanName="contextMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.menuUtils=e.menuUtils,this.rangeService=e.rangeService,this.focusService=e.focusService}hideActiveMenu(){this.destroyBean(this.activeMenu)}getMenuItems(e,t,i){let s=[];if(eM(e)&&this.gos.isModuleRegistered(eh.ClipboardModule)&&t&&(this.gos.get("suppressCutToClipboard")||s.push("cut"),s.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")),this.gos.get("enableCharts")&&this.gos.isModuleRegistered(eh.GridChartsModule)&&(this.columnModel.isPivotMode()&&s.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&s.push("chartRange")),eM(e)){let e=!this.gos.isModuleRegistered(eh.CsvExportModule),t=!this.gos.isModuleRegistered(eh.ExcelExportModule),i=this.gos.get("suppressExcelExport")||t,r=this.gos.get("suppressCsvExport")||e;sO()||i&&r||s.push("export")}let r=s.length?s:void 0,a=null==t?void 0:t.getColDef().contextMenuItems;if(Array.isArray(a))return a;if("function"==typeof a)return a(this.gos.addGridCommonParams({column:t,node:e,value:i,defaultItems:r}));let o=this.gos.getCallback("getContextMenuItems");return o?o({column:t,node:e,value:i,defaultItems:r}):s}onContextMenu(e,t,i,s,r,a){this.menuUtils.onContextMenu(e,t,e=>this.showMenu(i,s,r,e,a))}showMenu(e,t,i,s,r){let a=this.getMenuItems(e,t,i),o=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===a||eE(a))return!1;let n=new NI(a,t,e,i);this.createBean(n);let l=n.getGui();t||this.focusService.clearFocusedCell();let h={column:t,rowNode:e,type:"contextMenu",mouseEvent:s,ePopup:l,nudgeY:1},d=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:e=>{o.classList.remove(ND),this.destroyBean(n),this.dispatchVisibleChangedEvent(!1,void 0===e?"api":"ui")},click:s,positionCallback:()=>{let e=this.gos.get("enableRtl");this.popupService.positionPopupUnderMouseEvent({...h,nudgeX:e?-((l.offsetWidth+1)*1):1})},anchorToElement:r,ariaLabel:d("ariaLabelContextMenu","Context Menu")});u&&(o.classList.add(ND),n.afterGuiAttached({container:"contextMenu",hidePopup:u.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=n,n.addEventListener("destroyed",()=>{this.activeMenu===n&&(this.activeMenu=null)}),u&&n.addEventListener("closeMenu",e=>{var t,i;return u.hideFunc({mouseEvent:null!=(t=e.mouseEvent)?t:void 0,keyboardEvent:null!=(i=e.keyboardEvent)?i:void 0,forceHide:!0})});let c=s&&s instanceof MouseEvent&&"mousedown"===s.type;
597return this.dispatchVisibleChangedEvent(!0,c?"api":"ui"),!0}dispatchVisibleChangedEvent(e,t="ui"){this.eventService.dispatchEvent({type:"contextMenuVisibleChanged",visible:e,source:t})}},NI=class extends s${constructor(e,t,i,s){super('<div class="ag-menu" role="presentation"></div>'),this.menuItems=e,this.column=t,this.node=i,this.value=s,this.menuList=null,this.focusedCell=null}wireBeans(e){this.focusService=e.focusService,this.menuItemMapper=e.menuItemMapper,this.cellPositionUtils=e.cellPositionUtils}postConstruct(){let e=this.createManagedBean(new Af(0,{column:this.column,node:this.node,value:this.value})),t=this.menuItemMapper.mapWithStockItems(this.menuItems,null,()=>this.getGui(),"contextMenu");e.addMenuItems(t),this.appendChild(e),this.menuList=e,e.addEventListener("closeMenu",e=>this.dispatchLocalEvent(e))}afterGuiAttached(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())}restoreFocusedCell(){let e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){let{rowIndex:e,rowPinned:t,column:i}=this.focusedCell;eq(this.gos)&&this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!this.focusService.isKeyboardMode()})}}destroy(){this.restoreFocusedCell(),super.destroy()}},NA="filterMenuTab",NR="generalMenuTab",NT="columnsMenuTab",NL=[NR,NA,NT],NF=class extends tk{constructor(){super(...arguments),this.beanName="enterpriseMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.visibleColsService=e.visibleColsService,this.filterManager=e.filterManager,this.menuUtils=e.menuUtils,this.menuService=e.menuService,this.columnMenuFactory=e.columnMenuFactory}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,i,s){let{column:r,columnGroup:a}=this.splitColumnOrGroup(e),o=s?"filterMenuTab":void 0;this.showMenu(r,a,e=>{let s=e.getGui();if(this.popupService.positionPopupUnderMouseEvent({type:i,column:r,mouseEvent:t,ePopup:s}),o){var n;null==(n=e.showTab)||n.call(e,o)}this.dispatchVisibleChangedEvent(!0,!1,r,a,o)},i,o,void 0,t.target)}splitColumnOrGroup(e){let t=e&&t3(e);return{column:t?e:void 0,columnGroup:t?void 0:e}}showMenuAfterButtonClick(e,t,i,s){let r=-1,a="left";this.gos.get("enableRtl")&&(r=1,a="right");let o=s?"filterMenuTab":void 0,n=o?[o]:void 0,l=this.menuService.isLegacyMenuEnabled(),h=(l?9:4)*r,d=l?-23:4,{column:u,columnGroup:c}=this.splitColumnOrGroup(e);this.showMenu(u,c,e=>{let s=e.getGui();if(this.popupService.positionPopupByComponent({type:i,column:u,eventSource:t,ePopup:s,alignSide:a,nudgeX:h,nudgeY:d,position:"under",keepWithinBounds:!0}),o){var r;null==(r=e.showTab)||r.call(e,o)}this.dispatchVisibleChangedEvent(!0,!1,u,c,o)},i,o,n,t)}showMenu(e,t,i,s,r,a,o){let n=this.getMenuParams(e,t,a,o);if(!n)return;let{menu:l,eMenuGui:h,anchorToElement:d,restoreFocusParams:u}=n,c=[];c.push(t=>{let i=l.getGui();this.destroyBean(l),e&&(e.setMenuVisible(!1,"contextMenu"),this.menuUtils.restoreFocusOnClose(u,i,t))});let p=this.localeService.getLocaleTextFunc();if(this.popupService.addPopup({modal:!0,eChild:h,closeOnEsc:!0,closedCallback:i=>{c.forEach(e=>e(i)),this.dispatchVisibleChangedEvent(!1,!1,e,t,r)},afterGuiAttached:e=>l.afterGuiAttached(Object.assign({},{container:s},e)),positionCallback:r?()=>i(l):void 0,ariaLabel:p("ariaLabelColumnMenu","Column Menu")}),!r){var g;null==(g=l.showTabBasedOnPreviousSelection)||g.call(l),i(l)}if(this.menuService.isColumnMenuAnchoringEnabled()){let t=this.popupService.setPopupPositionRelatedToElement(h,d);t&&e&&this.addStopAnchoring(t,e,c)}l.addEventListener("tabSelected",t=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=t.key,this.dispatchVisibleChangedEvent(!0,!0,e)}),null==e||e.setMenuVisible(!0,"contextMenu"),this.activeMenu=l,l.addEventListener("destroyed",()=>{this.activeMenu===l&&(this.activeMenu=null)})}addStopAnchoring(e,t,i){e.then(e=>{t.addEventListener("leftChanged",e),t.addEventListener("visibleChanged",e),i.push(()=>{t.removeEventListener("leftChanged",e),t.removeEventListener("visibleChanged",e)})})}getMenuParams(e,t,i,s){let r={column:e,headerPosition:this.focusService.getFocusedHeader(),columnIndex:this.visibleColsService.getAllCols().indexOf(e),eventSource:s},a=this.createMenu(e,t,r,i,s);return a?{menu:a,eMenuGui:a.getGui(),anchorToElement:s||this.ctrlsService.getGridBodyCtrl().getGui(),restoreFocusParams:r}:void 0}createMenu(e,t,i,s,r){if(this.menuService.isLegacyMenuEnabled())return this.createBean(new NP(e,i,this.lastSelectedTab,s,r));{let s=this.columnMenuFactory.getMenuItems(e,t);return s.length?this.createBean(new Nk(s,e,i,r)):void 0}}dispatchVisibleChangedEvent(e,t,i,s,r){var a,o;this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:t,key:null!=(a=null!=(o=this.lastSelectedTab)?o:r)?a:this.menuService.isLegacyMenuEnabled()?NR:"columnMenu",column:null!=i?i:null,columnGroup:null!=s?s:null})}isMenuEnabled(e){var t,i;if(!this.menuService.isLegacyMenuEnabled())return!0;let s=!(null!=(t=this.filterManager)&&t.isFilterAllowed(e)),r=null!=(i=e.getColDef().menuTabs)?i:NL;return(s&&r.includes(NA)?r.length-1:r.length)>0}showMenuAfterContextMenuEvent(e,t,i){this.menuUtils.onContextMenu(t,i,t=>(this.showMenuAfterMouseEvent(e,t,"columnMenu"),!0))}},NP=class extends tk{constructor(e,t,i,s,r){super(),this.column=e,this.restoreFocusParams=t,this.initialSelection=i,this.restrictTo=s,this.sourceElement=r,this.tabFactories={},this.includeChecks={},this.tabFactories[NR]=this.createMainPanel.bind(this),this.tabFactories[NA]=this.createFilterPanel.bind(this),this.tabFactories[NT]=this.createColumnsPanel.bind(this),this.includeChecks[NR]=()=>!0,this.includeChecks[NA]=()=>{var t;return!!e&&!!(null!=(t=this.filterManager)&&t.isFilterAllowed(e))},this.includeChecks[NT]=()=>!0}wireBeans(e){this.filterManager=e.filterManager,this.columnChooserFactory=e.columnChooserFactory,this.columnMenuFactory=e.columnMenuFactory,this.menuUtils=e.menuUtils}postConstruct(){let e=this.getTabsToCreate().map(e=>this.createTab(e));this.tabbedLayout=new AS({items:e,cssClass:"ag-menu",onActiveItem
597Clicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout),this.addDestroyFunc(()=>this.destroyBean(this.tabbedLayout))}getTabsToCreate(){var e,t;return this.restrictTo?this.restrictTo:(null!=(e=null==(t=this.column)?void 0:t.getColDef().menuTabs)?e:NL).filter(e=>this.isValidMenuTabItem(e)).filter(e=>this.isNotSuppressed(e)).filter(e=>this.isModuleLoaded(e))}isModuleLoaded(e){return e!==NT||this.gos.isModuleRegistered(eh.ColumnsToolPanelModule)}isValidMenuTabItem(e){let t=!0,i=NL;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,i=this.restrictTo),(t=t&&NL.indexOf(e)>-1)||ep(`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of [${i}]`),t}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(e){this.tabItemColumns&&e===NT?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===NA?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===NR?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()}onTabItemClicked(e){let t=null;switch(e.item){case this.tabItemColumns:t=NT;break;case this.tabItemFilter:t=NA;break;case this.tabItemGeneral:t=NR}t&&this.activateTab(t)}activateTab(e){this.dispatchLocalEvent({type:"tabSelected",key:e})}createMainPanel(){return this.mainMenuList=this.columnMenuFactory.createMenu(this,this.columnMenuFactory.getMenuItems(this.column),this.column,()=>{var e;return null!=(e=this.sourceElement)?e:this.getGui()}),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.tabItemGeneral={title:sq("menu",this.gos,this.column),titleLabel:NR.replace("MenuTab",""),bodyPromise:rm.resolve(this.mainMenuList.getGui()),name:NR},this.tabItemGeneral}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){let e=this.column?this.createBean(new r5(this.column,"COLUMN_MENU")):null;if(this.filterComp=e,!(null!=e&&e.hasFilter()))throw Error("AG Grid - Unable to instantiate filter");return this.tabItemFilter={title:sq("filter",this.gos,this.column),titleLabel:NA.replace("MenuTab",""),bodyPromise:rm.resolve(null==e?void 0:e.getGui()),afterAttachedCallback:t=>e.afterGuiAttached(t),afterDetachedCallback:()=>e.afterGuiDetached(),name:NA},this.tabItemFilter}createColumnsPanel(){let e=document.createElement("div");e.classList.add("ag-menu-column-select-wrapper");let t=this.columnChooserFactory.createColumnSelectPanel(this,this.column).getGui();return t.classList.add("ag-menu-column-select"),e.appendChild(t),this.tabItemColumns={title:sq("columns",this.gos,this.column),titleLabel:NT.replace("MenuTab",""),bodyPromise:rm.resolve(e),name:NT},this.tabItemColumns}afterGuiAttached(e){let{container:t,hidePopup:i}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:i}),i&&(this.hidePopupFunc=i,this.addDestroyFunc(i))}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},Nk=class extends s${constructor(e,t,i,s){super(`
598            <div data-ref="eColumnMenu" role="presentation" class="ag-menu ag-column-menu"></div>
599        `),this.menuItems=e,this.column=t,this.restoreFocusParams=i,this.sourceElement=s,this.eColumnMenu=s_}wireBeans(e){this.columnMenuFactory=e.columnMenuFactory,this.menuUtils=e.menuUtils,this.focusService=e.focusService}postConstruct(){this.mainMenuList=this.columnMenuFactory.createMenu(this,this.menuItems,this.column,()=>{var e;return null!=(e=this.sourceElement)?e:this.getGui()}),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),this.focusService.focusInto(this.mainMenuList.getGui())}},NN=class extends tk{constructor(){super(...arguments),this.beanName="menuItemMapper"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.columnApplyStateService=e.columnApplyStateService,this.funcColsService=e.funcColsService,this.focusService=e.focusService,this.rowPositionUtils=e.rowPositionUtils,this.chartMenuItemMapper=e.chartMenuItemMapper,this.menuService=e.menuService,this.sortController=e.sortController,this.columnAutosizeService=e.columnAutosizeService,this.expansionService=e.expansionService,this.clipboardService=e.clipboardService,this.aggFuncService=e.aggFuncService,this.csvCreator=e.csvCreator,this.excelCreator=e.excelCreator}mapWithStockItems(e,t,i,s){if(!e)return[];let r=[];
599return e.forEach(e=>{let a;if(!(a="string"==typeof e?this.getStockMenuItem(e,t,i,s):{...e}))return;let{subMenu:o}=a;o&&o instanceof Array&&(a.subMenu=this.mapWithStockItems(o,t,i,s)),null!=a&&r.push(a)}),r}getStockMenuItem(e,t,i,s){var r;let a=this.localeService.getLocaleTextFunc(),o=this.gos.get("skipHeaderOnAutoSize");switch(e){case"pinSubMenu":return{name:a("pinColumn","Pin Column"),icon:sq("menuPin",this.gos,null),subMenu:["clearPinned","pinLeft","pinRight"]};case"pinLeft":return{name:a("pinLeft","Pin Left"),action:()=>this.columnModel.setColsPinned([t],"left",s),checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:a("pinRight","Pin Right"),action:()=>this.columnModel.setColsPinned([t],"right",s),checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:a("noPin","No Pin"),action:()=>this.columnModel.setColsPinned([t],null,s),checked:!!t&&!t.isPinned()};case"valueAggSubMenu":if(!this.gos.assertModuleRegistered(eh.RowGroupingModule,"Aggregation from Menu")||!(null!=t&&t.isPrimary())&&!(null!=t&&t.getColDef().pivotValueColumn))return null;return{name:a("valueAggregation","Value Aggregation"),icon:sq("menuValue",this.gos,null),subMenu:this.createAggregationSubMenu(t,this.aggFuncService),disabled:this.gos.get("functionsReadOnly")};case"autoSizeThis":return{name:a("autosizeThisColumn","Autosize This Column"),action:()=>this.columnAutosizeService.autoSizeColumn(t,s,o)};case"autoSizeAll":return{name:a("autosizeAllColumns","Autosize All Columns"),action:()=>this.columnAutosizeService.autoSizeAllColumns(s,o)};case"rowGroup":return{name:a("groupBy","Group by")+" "+ig(this.columnNameService.getDisplayNameForColumn(t,"header")),disabled:this.gos.get("functionsReadOnly")||(null==t?void 0:t.isRowGroupActive())||!(null!=t&&t.getColDef().enableRowGroup),action:()=>this.funcColsService.addRowGroupColumns([t],s),icon:sq("menuAddRowGroup",this.gos,null)};case"rowUnGroup":{let e=sq("menuRemoveRowGroup",this.gos,null),i=null==t?void 0:t.getColDef().showRowGroup,r=this.gos.get("groupLockGroupColumns");if(!0===i)return{name:a("ungroupAll","Un-Group All"),disabled:this.gos.get("functionsReadOnly")||-1===r||r>=this.funcColsService.getRowGroupColumns().length,action:()=>this.funcColsService.setRowGroupColumns(this.funcColsService.getRowGroupColumns().slice(0,r),s),icon:e};if("string"==typeof i){let t=this.columnModel.getColDefCol(i),r=null!=t?ig(this.columnNameService.getDisplayNameForColumn(t,"header")):i;return{name:a("ungroupBy","Un-Group by")+" "+r,disabled:this.gos.get("functionsReadOnly")||null!=t&&this.columnModel.isColGroupLocked(t),action:()=>this.funcColsService.removeRowGroupColumns([i],s),icon:e}}return{name:a("ungroupBy","Un-Group by")+" "+ig(this.columnNameService.getDisplayNameForColumn(t,"header")),disabled:this.gos.get("functionsReadOnly")||!(null!=t&&t.isRowGroupActive())||!(null!=t&&t.getColDef().enableRowGroup)||this.columnModel.isColGroupLocked(t),action:()=>this.funcColsService.removeRowGroupColumns([t],s),icon:e}}case"resetColumns":return{name:a("resetColumns","Reset Columns"),action:()=>this.columnApplyStateService.resetColumnState(s)};case"expandAll":return{name:a("expandAll","Expand All Row Groups"),action:()=>this.expansionService.expandAll(!0)};case"contractAll":return{name:a("collapseAll","Collapse All Row Groups"),action:()=>this.expansionService.expandAll(!1)};case"copy":if(this.gos.assertModuleRegistered(eh.ClipboardModule,"Copy from Menu"))return{name:a("copy","Copy"),shortcut:a("ctrlC","Ctrl+C"),icon:sq("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard()};return null;case"copyWithHeaders":if(this.gos.assertModuleRegistered(eh.ClipboardModule,"Copy with Headers from Menu"))return{name:a("copyWithHeaders","Copy with Headers"),icon:sq("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0})};return null;case"copyWithGroupHeaders":if(this.gos.assertModuleRegistered(eh.ClipboardModule,"Copy with Group Headers from Menu"))return{name:a("copyWithGroupHeaders","Copy with Group Headers"),icon:sq("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})};return null;case"cut":if(!this.gos.assertModuleRegistered(eh.ClipboardModule,"Cut from Menu"))return null;{let e=this.focusService.getFocusedCell(),t=e?this.rowPositionUtils.getRowNode(e):null,i=!!t&&(null==e?void 0:e.column.isCellEditable(t));return{name:a("cut","Cut"),shortcut:a("ctrlX","Ctrl+X"),icon:sq("clipboardCut",this.gos,null),disabled:!i||this.gos.get("suppressCutToClipboard"),action:()=>this.clipboardService.cutToClipboard(void 0,"contextMenu")}}case"paste":if(this.gos.assertModuleRegistered(eh.ClipboardModule,"Paste from Clipboard"))return{name:a("paste","Paste"),shortcut:a("ctrlV","Ctrl+V"),disabled:!0,icon:sq("clipboardPaste",this.gos,null),action:()=>this.clipboardService.pasteFromClipboard()};return null;
599case"export":{let e=[],t=this.gos.isModuleRegistered(eh.CsvExportModule),i=this.gos.isModuleRegistered(eh.ExcelExportModule);return!this.gos.get("suppressCsvExport")&&t&&e.push("csvExport"),!this.gos.get("suppressExcelExport")&&i&&e.push("excelExport"),{name:a("export","Export"),subMenu:e,icon:sq("save",this.gos,null)}}case"csvExport":return{name:a("csvExport","CSV Export"),icon:sq("csvExport",this.gos,null),action:()=>{var e;return null==(e=this.csvCreator)?void 0:e.exportDataAsCsv()}};case"excelExport":return{name:a("excelExport","Excel Export"),icon:sq("excelExport",this.gos,null),action:()=>{var e;return null==(e=this.excelCreator)?void 0:e.exportDataAsExcel()}};case"separator":return"separator";case"pivotChart":case"chartRange":return null!=(r=this.chartMenuItemMapper.getChartItems(e))?r:null;case"columnFilter":if(t)return{name:a("columnFilter","Column Filter"),icon:sq("filter",this.gos,null),action:()=>this.menuService.showFilterMenu({column:t,buttonElement:i(),containerType:"columnFilter",positionBy:"button"})};return null;case"columnChooser":if(this.gos.isModuleRegistered(eh.ColumnsToolPanelModule))return{name:a("columnChooser","Choose Columns"),icon:sq("columns",this.gos,null),action:()=>this.menuService.showColumnChooser({column:t,eventSource:i()})};return null;case"sortAscending":return{name:a("sortAscending","Sort Ascending"),icon:sq("sortAscending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"asc",!1,s)};case"sortDescending":return{name:a("sortDescending","Sort Descending"),icon:sq("sortDescending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"desc",!1,s)};case"sortUnSort":return{name:a("sortUnSort","Clear Sort"),icon:sq("sortUnSort",this.gos,null),action:()=>this.sortController.setSortForColumn(t,null,!1,s)};default:return ep(`unknown menu item type ${e}`),null}}createAggregationSubMenu(e,t){let i,s=this.localeService.getLocaleTextFunc();if(e.isPrimary())i=e;else{let t=e.getColDef().pivotValueColumn;i=eM(t)?t:void 0}let r=[];if(i){let e=i.isValueActive(),a=t.getFuncNames(i);r.push({name:s("noAggregation","None"),action:()=>{this.funcColsService.removeValueColumns([i],"contextMenu"),this.funcColsService.setColumnAggFunc(i,void 0,"contextMenu")},checked:!e}),a.forEach(a=>{r.push({name:s(a,t.getDefaultFuncLabel(a)),action:()=>{this.funcColsService.setColumnAggFunc(i,a,"contextMenu"),this.funcColsService.addValueColumns([i],"contextMenu")},checked:e&&i.getAggFunc()===a})})}return r}},NO=class extends tk{constructor(){super(...arguments),this.beanName="menuUtils"}wireBeans(e){this.focusService=e.focusService,this.headerNavigationService=e.headerNavigationService,this.visibleColsService=e.visibleColsService}restoreFocusOnClose(e,t,i,s){let{eventSource:r}=e,a=i instanceof KeyboardEvent;if(!s&&!a||!r)return;let o=eZ(this.gos);(t.contains(o)||eq(this.gos))&&this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,i){let s;i&&i.keyboardEvent&&(s=i.keyboardEvent),e(s&&{keyboardEvent:s});let r=this.focusService.getFocusedCell();if(eq(this.gos))if(r){let{rowIndex:e,rowPinned:t,column:i}=r;this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}onContextMenu(e,t,i){if(this.gos.get("allowContextMenuWithControlKey")||!e||!e.ctrlKey&&!e.metaKey){if((e&&this.blockMiddleClickScrollsIfNeeded(e),!this.gos.get("suppressContextMenu"))&&i(null!=e?e:t.touches[0])){let i=null!=e?e:t;i&&i.cancelable&&i.preventDefault()}}}async focusHeaderCell(e){let{column:t,columnIndex:i,headerPosition:s,eventSource:r}=e,a=await this.visibleColsService.getAllCols().some(e=>e===t);if(!t||t.isAlive()){if(a&&r&&sC(r)){let e=this.focusService.findTabbableParent(r);e&&(t&&this.headerNavigationService.scrollToColumn(t),e.focus())}else if(s&&-1!==i){let e=this.visibleColsService.getAllCols(),t=e[i]||tp(e);t&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:s.headerRowIndex,column:t}})}}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&2===e.which&&e.preventDefault()}},NG="32.3.9",NB={version:NG,moduleName:`${eh.MenuModule}-core`,beans:[NF,NE,NN,Ny,NS,NM,NO],dependantModules:[I9],userComponents:[{name:"agMenuItem",classImp:I7}]},Nz={version:NG,moduleName:`${eh.MenuModule}-api`,apiFunctions:{showContextMenu:function(e,t){let{rowNode:i,column:s,value:r,x:a,y:o}=t||{},{x:n,y:l}=e.menuService.getContextMenuPosition(i,s);null!=a&&(n=a),null!=o&&(l=o),e.menuService.showContextMenu({mouseEvent:ne
599w MouseEvent("mousedown",{clientX:n,clientY:l}),rowNode:i,column:s,value:r})},showColumnChooser:function(e,t){e.menuService.showColumnChooser({chooserParams:t})},hideColumnChooser:function(e){e.menuService.hideColumnChooser()}},dependantModules:[NB,hc]},NV={version:NG,moduleName:eh.MenuModule,dependantModules:[NB,Nz]},NH=class e extends lT{constructor(){super('<div class="ag-multi-filter ag-menu-list-compact"></div>'),this.filterDefs=[],this.filters=[],this.guiDestroyFuncs=[],this.filterGuis=[],this.activeFilterIndices=[],this.lastActivatedMenuItem=null,this.afterFiltersReadyFuncs=[]}wireBeans(e){this.filterManager=e.filterManager,this.userComponentFactory=e.userComponentFactory,this.focusService=e.focusService}postConstruct(){this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e)})}static getFilterDefs(e){let{filters:t}=e;return t&&t.length>0?t:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]}init(t){this.params=t,this.filterDefs=e.getFilterDefs(t);let{column:i,filterChangedCallback:s}=t;this.column=i,this.filterChangedCallback=s;let r=[];return this.filterDefs.forEach((e,t)=>{let i=this.createFilter(e,t);null!=i&&r.push(i)}),new rm(e=>{rm.all(r).then(t=>{this.filters=t,this.refreshGui("columnMenu").then(()=>{e()})})}).then(()=>{this.afterFiltersReadyFuncs.forEach(e=>e()),this.afterFiltersReadyFuncs.length=0})}refreshGui(e){return e===this.lastOpenedInContainer?rm.resolve():(this.tabGuardFeature.removeAllChildrenExceptTabGuards(),this.destroyChildren(),rm.all(this.filters.map((t,i)=>{let s,r=this.filterDefs[i],a=this.getFilterTitle(t,r);if("subMenu"===r.display&&"toolPanel"!==e)s=this.insertFilterMenu(t,a).then(e=>e.getGui());else if("subMenu"===r.display||"accordion"===r.display){let e=this.insertFilterGroup(t,a);s=rm.resolve(e.getGui())}else s=rm.resolve(t.getGui());return s})).then(t=>{t.forEach((e,t)=>{t>0&&this.appendChild(sy('<div class="ag-filter-separator"></div>')),this.appendChild(e)}),this.filterGuis=t,this.lastOpenedInContainer=e}))}getFilterTitle(e,t){return null!=t.title?t.title:e instanceof ao?e.getFilterTitle():"Filter"}destroyChildren(){this.guiDestroyFuncs.forEach(e=>e()),this.guiDestroyFuncs.length=0,this.filterGuis.length=0}insertFilterMenu(e,t){let i=this.createBean(new Ay);return i.init({menuItemDef:{name:t,subMenu:[],cssClasses:["ag-multi-filter-menu-item"],menuItem:I7,menuItemParams:{cssClassPrefix:"ag-compact-menu-option",isCompact:!0}},level:0,isAnotherSubMenuOpen:()=>!1,childComponent:e,contextParams:{column:null,node:null,value:null}}).then(()=>{i.setParentComponent(this),this.guiDestroyFuncs.push(()=>this.destroyBean(i)),this.addManagedListeners(i,{menuItemActivated:e=>{this.lastActivatedMenuItem&&this.lastActivatedMenuItem!==e.menuItem&&this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=e.menuItem}});let e=i.getGui();return i.addManagedElementListeners(e,{keydown:e=>{let{key:t}=e;switch(t){case s9.UP:case s9.RIGHT:case s9.DOWN:case s9.LEFT:e.preventDefault(),t===s9.RIGHT&&i.openSubMenu(!0)}},focusin:()=>i.activate(),focusout:()=>{i.isSubMenuOpen()||i.isSubMenuOpening()||i.deactivate()}}),i})}insertFilterGroup(e,t){let i=this.createBean(new Ae({title:t,cssIdentifier:"multi-filter"}));return this.guiDestroyFuncs.push(()=>this.destroyBean(i)),i.addItem(e.getGui()),i.toggleGroupExpand(!1),e.afterGuiAttached&&i.addManagedListeners(i,{expanded:()=>e.afterGuiAttached({container:this.lastOpenedInContainer,suppressFocus:!0,hidePopup:this.hidePopup})}),i}isFilterActive(){return this.filters.some(e=>e.isFilterActive())}getLastActiveFilterIndex(){return this.activeFilterIndices.length>0?this.activeFilterIndices[this.activeFilterIndices.length-1]:null}doesFilterPass(e,t){let i=!0;return this.filters.forEach(s=>{i&&s!==t&&s.isFilterActive()&&(i=s.doesFilterPass(e))}),i}getFilterType(){return"multi"}getModelFromUi(){return{filterType:this.getFilterType(),filterModels:this.filters.map(e=>"function"==typeof e.getModelFromUi?e.getModelFromUi():null)}}getModel(){return this.isFilterActive()?{filterType:this.getFilterType(),filterModels:this.filters.map(e=>e.isFilterActive()?e.getModel():null)}:null}setModel(e){let t=(e,t)=>new rm(i=>{let s=e.setModel(t);s?s.then(()=>i()):i()}),i=[];return null==e?i=this.filters.map((e,i)=>t(e,null).then(()=>{this.updateActiveList(i)}
599)):this.filters.forEach((s,r)=>{let a=t(s,e.filterModels.length>r?e.filterModels[r]:null).then(()=>{this.updateActiveList(r)});i.push(a)}),rm.all(i).then(()=>{})}applyModel(e="api"){let t=!1;return this.filters.forEach(i=>{i instanceof ao&&(t=i.applyModel(e)||t)}),t}getChildFilterInstance(e){return this.filters[e]}afterGuiAttached(e){let t;e?(this.hidePopup=e.hidePopup,t=this.refreshGui(e.container)):(this.hidePopup=void 0,t=rm.resolve());let i=null==e?void 0:e.suppressFocus;t.then(()=>{let{filterDefs:t}=this,s=!!i;t&&tD(t,(t,r)=>{var a;let o=0===r,n=t.display&&"inline"!==t.display,l=i||!o||n,h={...null!=e?e:{},suppressFocus:l},d=null==(a=this.filters)?void 0:a[r];if(d&&(this.executeFunctionIfExistsOnFilter(d,"afterGuiAttached",h),o&&!l&&(s=!0)),!i&&o&&n){let e=this.filterGuis[r];e&&(this.focusService.focusInto(e)||e.focus(),s=!0)}});let r=eZ(this.gos);!s&&(eq(this.gos)||this.getGui().contains(r))&&this.forceFocusOutOfContainer(!0)})}afterGuiDetached(){this.executeFunctionIfExists("afterGuiDetached")}onAnyFilterChanged(){this.executeFunctionIfExists("onAnyFilterChanged")}onNewRowsLoaded(){this.executeFunctionIfExists("onNewRowsLoaded")}destroy(){this.filters.forEach(e=>this.destroyBean(e)),this.filters.length=0,this.destroyChildren(),this.hidePopup=void 0,super.destroy()}executeFunctionIfExists(e,...t){tD(this.filters,i=>{this.executeFunctionIfExistsOnFilter(i,e,t)})}executeFunctionIfExistsOnFilter(e,t,...i){let s=e[t];"function"==typeof s&&s.apply(e,i)}createFilter(e,t){let i,{filterModifiedCallback:s,doesRowPassOtherFilter:r}=this.params,a={...this.filterManager.createFilterParams(this.column,this.column.getColDef()),filterModifiedCallback:s,filterChangedCallback:e=>{this.executeWhenAllFiltersReady(()=>this.filterChanged(t,e))},doesRowPassOtherFilter:e=>r(e)&&this.doesFilterPass({node:e,data:e.data},i)},o=this.userComponentFactory.getFilterDetails(e,a,"agTextColumnFilter");if(!o)return null;let n=o.newAgStackInstance();return n&&n.then(e=>i=e),n}executeWhenAllFiltersReady(e){this.filters&&this.filters.length>0?e():this.afterFiltersReadyFuncs.push(e)}updateActiveList(e){let t=this.filters[e];tC(this.activeFilterIndices,e),t.isFilterActive()&&this.activeFilterIndices.push(e)}filterChanged(e,t){this.updateActiveList(e),this.filterChangedCallback(t);let i=this.filters[e];this.filters.forEach(e=>{e!==i&&"function"==typeof e.onAnyFilterChanged&&e.onAnyFilterChanged()})}onFocusIn(e){null==this.lastActivatedMenuItem||this.lastActivatedMenuItem.getGui().contains(e.target)||(this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=null)}getModelAsString(e){var t,i,s,r;if(!this.filters||!(null!=e&&null!=(t=e.filterModels)&&t.length))return"";let a=null!=(i=this.getLastActiveFilterIndex())?i:0,o=this.filters[a];return null!=(s=null==(r=o.getModelAsString)?void 0:r.call(o,e.filterModels[a]))?s:""}},Nj=class extends s${constructor(){super('<div class="ag-multi-floating-filter ag-floating-filter-input"></div>'),this.floatingFilters=[],this.compDetailsList=[]}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.filterManager=e.filterManager}init(e){this.params=e;let{compDetailsList:t}=this.getCompDetailsList(e);return this.setParams(t)}setParams(e){let t=[];return e.forEach(e=>{let i=null==e?void 0:e.newAgStackInstance();null!=i&&(this.compDetailsList.push(e),t.push(i))}),rm.all(t).then(e=>{e.forEach((e,t)=>{this.floatingFilters.push(e);let i=e.getGui();this.appendChild(i),t>0&&ss(i,!1)})})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e;let{compDetailsList:t,floatingFilterParamsList:i}=this.getCompDetailsList(e);t.length===this.compDetailsList.length&&t.every((e,t)=>{var i;return!(null!=(i=this.filterManager)&&i.areFilterCompsDifferent(this.compDetailsList[t],e))})?i.forEach((e,t)=>{let i=this.floatingFilters[t],s=!1;if(i.refresh&&null!==i.refresh(e)&&(s=!0),!s){var r;null==(r=i.onParamsUpdated)||r.call(i,e)}}):(sm(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(t))}getCompDetailsList(e){let t=[],i=[],s=e.filterParams;
599return NH.getFilterDefs(s).forEach((s,r)=>{let a={...e,parentFilterInstance:e=>{this.parentMultiFilterInstance(t=>{let i=t.getChildFilterInstance(r);null!=i&&e(i)})}};tX(a.filterParams,s.filterParams);let o=this.getCompDetails(s,a);o&&(t.push(o),i.push(a))}),{compDetailsList:t,floatingFilterParamsList:i}}onParentModelChanged(e,t){t&&t.afterFloatingFilter||this.parentMultiFilterInstance(i=>{if(null==e)this.floatingFilters.forEach((e,i)=>{e.onParentModelChanged(null,t),ss(e.getGui(),0===i)});else{let s=i.getLastActiveFilterIndex();this.floatingFilters.forEach((i,r)=>{let a=e.filterModels.length>r?e.filterModels[r]:null;i.onParentModelChanged(a,t),ss(i.getGui(),null==s?0===r:r===s)})}})}destroy(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,super.destroy()}getCompDetails(e,t){var i;let s=null!=(i=a1(this.frameworkOverrides,e,()=>this.filterManager.getDefaultFloatingFilter(this.params.column)))?i:"agReadOnlyFloatingFilter";return this.userComponentFactory.getFloatingFilterCompDetails(e,t,s)}parentMultiFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof NH))throw Error("AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent");e(t)})}},NW="32.3.9",NU={version:NW,moduleName:`${eh.MultiFilterModule}-core`,userComponents:[{name:"agMultiColumnFilter",classImp:NH},{name:"agMenuItem",classImp:I7}],dependantModules:[I9,oo]},N_={version:NW,moduleName:eh.MultiFilterModule,dependantModules:[NU,{version:NW,moduleName:"@ag-grid-enterprise/multi-floating-filter",userComponents:[{name:"agMultiColumnFloatingFilter",classImp:Nj}],dependantModules:[NU,oh]}]},N$=class extends ru{constructor(){super('<div class="ag-cell-edit-wrapper"></div>')}init(e){this.params=e;let{cellStartedEdit:t,values:i}=e;eD(i)&&ep("agRichSelectCellEditor requires cellEditorParams.values to be set");let{params:s,valuesPromise:r}=this.buildRichSelectParams();this.richSelect=this.createManagedBean(new Au(s)),this.richSelect.addCssClass("ag-cell-editor"),this.appendChild(this.richSelect),r&&r.then(e=>{this.richSelect.setValueList({valueList:e,refresh:!0});let t=this.getSearchStringCallback(e);t&&this.richSelect.setSearchStringCreator(t)}),this.addManagedListeners(this.richSelect,{fieldPickerValueSelected:this.onEditorPickerValueSelected.bind(this)}),this.focusAfterAttached=t}onEditorPickerValueSelected(e){setTimeout(()=>this.params.stopEditing(!e.fromEnterKey))}buildRichSelectParams(){let e,t,{cellRenderer:i,cellHeight:s,value:r,values:a,formatValue:o,searchDebounceDelay:n,valueListGap:l,valueListMaxHeight:h,valueListMaxWidth:d,allowTyping:u,filterList:c,searchType:p,highlightMatch:g,valuePlaceholder:m,eventKey:v,multiSelect:f,suppressDeselectAll:C,suppressMultiSelectPillRenderer:y}=this.params,w={value:r,cellRenderer:i,cellRowHeight:s,searchDebounceDelay:n,valueFormatter:o,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list",pickerGap:l,allowTyping:u,filterList:c,searchType:p,highlightMatch:g,maxPickerHeight:h,maxPickerWidth:d,placeholder:m,initialInputValue:(null==v?void 0:v.length)===1?v:void 0,multiSelect:f,suppressDeselectAll:C,suppressMultiSelectPillRenderer:y};return Array.isArray(e="function"==typeof a?a(this.params):null!=a?a:[])?(w.valueList=e,w.searchStringCreator=this.getSearchStringCallback(e)):t=e,f&&u&&(this.params.allowTyping=w.allowTyping=!1,ep("agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.")),{params:w,valuesPromise:t}}getSearchStringCallback(e){let{colDef:t}=this.params;if("object"==typeof e[0]&&t.keyCreator)return e=>e.map(e=>{let i=this.gos.addGridCommonParams({value:e,colDef:this.params.colDef,column:this.params.column,node:this.params.node,data:this.params.data});return t.keyCreator(i)})}afterGuiAttached(){let{focusAfterAttached:e,params:t}=this;setTimeout(()=>{if(!this.isAlive())return;if(e){let e=this.richSelect.getFocusableElement();e.focus();let{allowTyping:t,eventKey:i}=this.params;t&&(!i||1!==i.length)&&e.select()}this.richSelect.showPicker();let{eventKey:i}=t;i&&(null==i?void 0:i.length)===1&&this.richSelect.searchTextFromString(i)})}focusIn(){this.richSelect.getFocusableElement().focus()}getValue(){return this.richSelect.getValue()}isPopup(){return!1}},NY={version:"32.3.9",moduleName:eh.RichSelectModule,beans:[],userComponents:[{name:"agRichSelect",classImp:N$},{name:"agRichSelectCellEditor",classImp:N$}],dependantModules:[I9,ld]},NK=class extends tk{constructor(){super(...arguments),this.beanName="ssrmBlockUtils"}wireBeans(e){this.valueService=e.valueService,this.showRowGroupColsService=e.showRowGroupColsService,this.nodeManager=e.ssrmNodeManager,this.beans=e,this.expansionService=e.expansionService,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}createRowNode(e){let t=new r4(this.beans),i=null!=e.rowHeight?e.rowHeight:ej(this.gos);return t.setRowHeight(i),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn),t}
599destroyRowNodes(e){e&&e.forEach(e=>this.destroyRowNode(e))}destroyRowNode(e,t=!1){e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),null!=e.id&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();let t=this.gos.get("getServerSideGroupKey");e.hasChildren()&&null!=t&&(e.key=t(e.data)),e.hasChildren()||null==e.childStore||(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){if(e.key=this.valueService.getValue(e.rowGroupColumn,e),(null===e.key||void 0===e.key)&&eu(()=>{ep("null and undefined values are not allowed for server side row model keys"),e.rowGroupColumn&&ep(`column = ${e.rowGroupColumn.getId()}`),ep("data is "+e.data)},"ServerSideBlock-CannotHaveNullOrUndefinedForKey"),this.gos.get("groupAllowUnbalanced")&&""===e.key){let t=this.serverSideRowModel.getParams();e.childStore=this.createBean(this.storeFactory.createStore(t,e))}e2(this.beans.gos)({node:e})&&(e.createFooter(),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){let t=this.gos.get("isRowMaster");null!=t?e.master=t(e.data):e.master=!0}updateDataIntoRowNode(e,t){e.updateData(t),this.gos.get("treeData")?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?(this.setChildCountIntoRowNode(e),!e.footer&&(e2(this.beans.gos)({node:e})?e.sibling?e.sibling.updateData(t):e.createFooter():e.sibling&&e.destroyFooter())):this.gos.get("masterDetail")}setDataIntoRowNode(e,t,i,s){e.stub=!1;let r=this.gos.get("treeData");if(eM(t)?(e.setDataAndId(t,i),r?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e)):(e.setDataAndId(void 0,void 0),e.key=null),(r||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),eM(t)){var a;e.setRowHeight(eH(this.gos,e,!1,s).height),null==(a=e.sibling)||a.setRowHeight(eH(this.gos,e.sibling,!1,s).height)}}setChildCountIntoRowNode(e){let t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){var t,i;let s=null!=(t=null==(i=this.showRowGroupColsService)?void 0:i.getShowRowGroupCols())?t:[],r=this.gos.get("treeData");s.forEach(t=>{if(null==e.groupData&&(e.groupData={}),r)e.groupData[t.getColId()]=e.key;else if(t.isRowGroupDisplayed(e.rowGroupColumn.getId())){let i=this.valueService.getValue(e.rowGroupColumn,e);e.groupData[t.getColId()]=i}})}clearDisplayIndex(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&eM(e.childStore)&&e.childStore.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode.clearRowTopAndRowIndex()}setDisplayIndex(e,t,i,s){let r=this.gos.get("groupAllowUnbalanced")&&e.group&&""===e.key;if((this.gos.get("groupHideOpenParents")&&e.group&&e.expanded||r?(e.setRowIndex(null),e.setRowTop(null)):(e.setRowIndex(t.next()),e.setRowTop(i.value),i.value+=e.rowHeight),e.setUiLevel(s),!e.footer)&&(e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.next()),e.detailNode.setRowTop(i.value),i.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&eM(e.childStore))){let a=e.childStore;e.expanded||r?a.setDisplayIndexes(t,i,r?s:s+1):a.clearDisplayIndexes()}}binarySearchForDisplayIndex(e,t){let i=0,s=t.length-1;if(eD(s)||eD(i))return void ep(`error: topPointer = ${s}, bottomPointer = ${i}`);for(;;){let r=Math.floor((i+s)/2),a=t[r];if(a.rowIndex===e)return a;let o=a.master&&a.expanded,n=a.detailNode;if(o&&n&&n.rowIndex===e)return a.detailNode;let l=a.childStore;if(a.expanded&&l&&l.isDisplayIndexInStore(e))return l.getRowUsingDisplayIndex(e);if(a.rowIndex<e)i=r+1;else{if(!(a.rowIndex>e))return void ep(`error: unable to locate rowIndex = ${e} in cache`);s=r-1}}}extractRowBounds(e,t){let i=e=>({rowHeight:e.rowHeight,rowTop:e.rowTop});if(e.rowIndex===t)return i(e);if(e.hasChildren()&&e.expanded&&eM(e.childStore)){let i=e.childStore;if(i.isDisplayIndexInStore(t))return i.getRowBounds(t)}else if(e.master&&e.expanded&&eM(e.detailNode)&&e.detailNode.rowIndex===t)return i(e.detailNode)}isPixelInNodeRange(e,t){return!!eM(e.rowTop)&&!!eM(e.rowHeight)&&t>=e.rowTop&&t<e.rowTop+e.rowHeight}getIndexAtPixel(e,t){if(this.isPixelInNodeRange(e,t))return e.rowIndex;let i=e.master&&e.expanded,s=e.detailNode;if(i&&s&&this.isPixelInNodeRange(s,t))return e.detailNode.rowIndex;if(e.hasChildren()&&e.expanded&&eM(e.childStore)){let i=e.childStore;if(i.isPixelInRange(t))return i.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){let t=[],i=e;for(;i&&i.level>=0;)""===i.key?t.push("ag-Grid-MissingKey"):t.push(i.key),i=i.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionService.checkOpenByDefault(e)}},NZ=class extends tk{constructor(){super(...arguments),this.beanName="ssrmExpandListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory,this.beans=e}postConstruct(){eO(this.gos)&&this.addManagedEventListeners({rowGroupOpened:this.onRowGroupOpened.bind(this)})}onRowGroupOpened(e){let t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(eD(t.childStore)){let e=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(e,t))}}else this.gos.get("purgeClosedRowNodes")&&eM(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));this.eventService.dispatchEvent({type:"storeUpdated"})}createDetailNode(e){if(eM(e.detailNode))return e.detailNode;let t=new r4(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,eM(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;let i=eH(this.gos,t).height;return t.rowHeight=i||200,e.detailNode=t,t}},Nq=class extends tk{constructor(){super(...arguments),this.beanName="ssrmFilterListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.filterManager=e.filterManager,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){eO(this.gos)&&this.addManagedEventListeners({advancedFilterEnabledChanged:()=>this.onFilterChanged(!0),filterChanged:()=>this.onFilterChanged()})}onFilterChanged(e){var t,i,s;let r,a,o=this.serverSideRowModel.getParams();if(!o)return;let n=o.filterModel;if(null!=(t=this.filterManager)&&t.isAdvancedFilterEnabled()){r=this.filterManager.getAdvancedFilterModel();let t=e?Object.keys(null!=n?n:{}):this.getAdvancedFilterColumns(n),i=this.getAdvancedFilterColumns(r);
599t.forEach(e=>i.add(e)),a=Array.from(i)}else if(r=null!=(i=null==(s=this.filterManager)?void 0:s.getFilterModel())?i:{},e){let e=this.getAdvancedFilterColumns(n);Object.keys(r).forEach(t=>e.add(t)),a=Array.from(e)}else a=this.findChangedColumns(n,r);let l={valueColChanged:this.listenerUtils.isSortingWithValueColumn(a),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(a),changedColumns:a};this.serverSideRowModel.refreshAfterFilter(r,l)}findChangedColumns(e,t){let i={};Object.keys(e).forEach(e=>i[e]=!0),Object.keys(t).forEach(e=>i[e]=!0);let s=[];return Object.keys(i).forEach(i=>{JSON.stringify(e[i])!=JSON.stringify(t[i])&&s.push(i)}),s}getAdvancedFilterColumns(e){let t=new Set;if(!e)return t;let i=e=>{"join"===e.filterType?e.conditions.forEach(e=>i(e)):t.add(e.colId)};return i(e),t}},NQ=class extends tk{constructor(){super(...arguments),this.beanName="ssrmListenerUtils"}wireBeans(e){this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService}isSortingWithValueColumn(e){let t=this.funcColsService.getValueColumns().map(e=>e.getColId());for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){let t=this.pivotResultColsService.getPivotResultCols();if(!t)return!1;let i=t.list.map(e=>e.getColId());for(let t=0;t<e.length;t++)if(i.indexOf(e[t])>-1)return!0;return!1}},NX=class extends tk{constructor(){super(...arguments),this.beanName="ssrmSortService"}wireBeans(e){this.sortController=e.sortController,this.serverSideRowModel=e.rowModel,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){eO(this.gos)&&this.addManagedEventListeners({sortChanged:this.onSortChanged.bind(this)})}onSortChanged(){let e=this.serverSideRowModel.getParams();if(!e)return;let t=this.sortController.getSortModel(),i=e.sortModel,s=this.findChangedColumnsInSort(t,i),r=this.listenerUtils.isSortingWithValueColumn(s),a=this.listenerUtils.isSortingWithSecondaryColumn(s);this.serverSideRowModel.refreshAfterSort(t,{valueColChanged:r,secondaryColChanged:a,changedColumns:s})}findChangedColumnsInSort(e,t){let i=[];return[e,t].forEach(e=>{if(e){let t=e.map(e=>e.colId);i=i.concat(t)}}),i.filter(i=>{let s=t.find(e=>e.colId===i),r=e.find(e=>e.colId===i);return(s?s.sort:null)!==(r?r.sort:null)||(s?t.indexOf(s):-1)!==(r?e.indexOf(r):-1)})}},NJ=class extends tk{constructor(){super(...arguments),this.beanName="ssrmNodeManager",this.rowNodes={}}addRowNode(e){let t=e.id;this.rowNodes[t]&&(ep(`Duplicate node id ${e.id}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`),ep("first instance",this.rowNodes[t].data),ep("second instance",e.data)),this.rowNodes[t]=e}removeNode(e){let t=e.id;this.rowNodes[t]&&(this.rowNodes[t]=void 0)}destroy(){this.clear(),super.destroy()}clear(){this.rowNodes={},super.destroy()}},N0=class extends lw{constructor(e,t,i){super(0),this.nodeIdSequence=new sL,this.info={},this.ssrmParams=e,this.parentRowNode=i,this.level=i.level+1,this.groupLevel=e.rowGroupCols?this.level<e.rowGroupCols.length:void 0,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1}wireBeans(e){this.storeUtils=e.ssrmStoreUtils,this.blockUtils=e.ssrmBlockUtils,this.funcColsService=e.funcColsService,this.rowNodeBlockLoader=e.rowNodeBlockLoader,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController,this.selectionService=e.selectionService,this.nodeManager=e.ssrmNodeManager,this.filterManager=e.filterManager,this.transactionManager=e.ssrmTransactionManager,this.serverSideRowModel=e.rowModel}postConstruct(){if(this.usingTreeData=this.gos.get("treeData"),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){let e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.funcColsService.getRowGroupColumns()[this.level]}let e=1,t=-1===this.parentRowNode.level,i=this.storeUtils.getServerSideInitialRowCount();t&&null!=i&&(e=i),this.initialiseRowNodes(e),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc(()=>this.rowNodeBlockLoader.removeBlock(this)),this.postSortFunc=this.gos.getCallback("postSortRows"),null!=i&&this.eventService.dispatchEventOnce({type:"rowCountReady"})}destroy(){this.destroyRowNodes(),super.destroy()}destroyRowNodes(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}}initialiseRowNodes(e,t=!1){this.destroyRowNodes();for(let i=0;i<e;i++){let e=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});t&&(e.failedLoad=!0),this.allRowNodes.push(e),this.nodesAfterFilter.push(e),this.nodesAfterSort.push(e)}}getBlockStateJson(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}}loadFromDatasource(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,success:this.success.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})}getStartRow(){return 0}getEndRow(){return this.nodesAfterSort.length}createDataNode(e,t){let i=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=t?ty(this.allRowNodes,i,t):this.allRowNodes.push(i);let s=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(i,e,s,void 0),this.nodeManager.addRowNode(i),this.blockUtils.checkOpenByDefault(i),this.allNodesMap[i.id]=i,i}prefixId(e){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+e:e.toString()}processServerFail(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}processServerResult(e){if(!this.isAlive())return;let t=e.groupLevelInfo;t&&Object.assign(this.info,t),e.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(e.pivotResultFields);let i=this.allRowNodes.length>0?this.allNodesMap:void 0;this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},e.rowData||ep('"params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.'),this.createOrRecycleNodes(i,e.rowData),i&&this.blockUtils.destroyRowNodes(tQ(i)),0===this.level&&this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}createOrRecycleNodes(e,t){if(!t)return;let i=t=>{var i;if(!e)return;let s=e6(this.gos);if(!s)return;let r=null!=(i=this.parentRowNode.getRoute())?i:[],a=this.level,o=s({data:t,parentKeys:r.length>0?r:void 0,level:a}),n=e[o];if(n)return delete e[o],n},s=(e,t)=>{this.allNodesMap[e.id]=e,this.blockUtils.updateDataIntoRowNode(e,t),this.allRowNodes.push(e)};
599t.forEach(e=>{let t=i(e);t?s(t,e):this.createDataNode(e)})}flushAsyncTransactions(){window.setTimeout(()=>this.transactionManager.flushAsyncTransactions(),0)}filterAndSortNodes(){this.filterRowNodes(),this.sortRowNodes()}sortRowNodes(){let e=this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerSideSortOnServer(),t=this.sortController.getSortOptions(),i=!t||0==t.length;if(e||i){this.nodesAfterSort=this.nodesAfterFilter;return}if(this.nodesAfterSort=this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t),this.postSortFunc){let e={nodes:this.nodesAfterSort};this.postSortFunc(e)}}filterRowNodes(){let e=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerSideFilterOnServer(),t=this.groupLevel;if(e||t){this.nodesAfterFilter=this.allRowNodes;return}this.nodesAfterFilter=this.filterManager?this.allRowNodes.filter(e=>this.filterManager.doesRowPassFilter({rowNode:e})):this.allRowNodes}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEach(e=>this.blockUtils.clearDisplayIndex(e))}getDisplayIndexEnd(){return this.displayIndexEnd}isDisplayIndexInStore(e){return 0!==this.getRowCount()&&e>=this.displayIndexStart&&e<this.displayIndexEnd}setDisplayIndexes(e,t,i){this.displayIndexStart=e.peek(),this.topPx=t.value;let s={};this.nodesAfterSort.forEach(r=>{this.blockUtils.setDisplayIndex(r,e,t,i),s[r.id]=!0}),this.allRowNodes.forEach(e=>{s[e.id]||this.blockUtils.clearDisplayIndex(e)}),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t=new sL){e(this,t.next()),this.allRowNodes.forEach(i=>{let s=i.childStore;s&&s.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t=new sL){this.allRowNodes.forEach(i=>{e(i,t.next());let s=i.childStore;s&&s.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t=new sL,i=!1){this.nodesAfterSort.forEach(s=>{e(s,t.next());let r=s.childStore;r&&r.forEachNodeDeepAfterFilterAndSort(e,t,i)}),i&&this.parentRowNode.sibling&&e(this.parentRowNode.sibling,t.next())}getRowUsingDisplayIndex(e){if(this.isDisplayIndexInStore(e))return this.blockUtils.binarySearchForDisplayIndex(e,this.nodesAfterSort)}getRowBounds(e){for(let t=0;t<this.nodesAfterSort.length;t++){let i=this.nodesAfterSort[t],s=this.blockUtils.extractRowBounds(i,e);if(s)return s}return null}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<=this.topPx)return this.nodesAfterSort[0].rowIndex;if(e>=this.topPx+this.heightPx){let t=this.nodesAfterSort[this.nodesAfterSort.length-1];if(!t)return null;if(e>=t.rowTop+t.rowHeight&&t.expanded){if(t.childStore&&t.childStore.getRowCount()>0)return t.childStore.getRowIndexAtPixel(e);if(t.detailNode)return t.detailNode.rowIndex}return t.rowIndex}let t=null;return(this.nodesAfterSort.forEach(i=>{let s=this.blockUtils.getIndexAtPixel(i,e);null!=s&&(t=s)}),null==t)?this.displayIndexEnd-1:t}getChildStore(e){return this.storeUtils.getChildStore(e,this,e=>this.allRowNodes.find(t=>t.key==e))}forEachChildStoreShallow(e){this.allRowNodes.forEach(t=>{let i=t.childStore;i&&e(i)})}refreshAfterFilter(e){let t=this.storeUtils.isServerSideFilterOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||t&&i){this.refreshStore(!0),this.sortRowNodes();return}this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(t=>t.refreshAfterFilter(e))}refreshAfterSort(e){let t=this.storeUtils.isServerSideSortOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(this.storeUtils.isServerSideSortAllLevels()||t&&i){this.refreshStore(!0),this.filterRowNodes();return}this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(t=>t.refreshAfterSort(e))}applyTransaction(e){switch(this.getState()){case"failed":return{status:ly.StoreLoadingFailed};case"loading":return{status:ly.StoreLoading};case"needsLoading":return{status:ly.StoreWaitingToLoad}}let t=this.gos.getCallback("isApplyServerSideTransaction");if(t&&!t({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:ly.Cancelled};let i={status:ly.Applied,remove:[],update:[],add:[]},s=[];return this.executeAdd(e,i),this.executeRemove(e,i,s),this.executeUpdate(e,i,s),this.filterAndSortNodes(),this.updateSelection(s),i}updateSelection(e){e.length>0&&(this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,clearSelection:!1,source:"rowDataChanged"}),this.eventService.dispatchEvent({type:"selectionChanged",source:"rowDataChanged"}))}executeAdd(e,t){let{add:i,addIndex:s}=e;eE(i)||("number"==typeof s&&s>
599=0?i.reverse().forEach(e=>{let i=this.createDataNode(e,s);t.add.push(i)}):i.forEach(e=>{let i=this.createDataNode(e);t.add.push(i)}))}executeRemove(e,t,i){let{remove:s}=e;if(null==s)return;let r={};s.forEach(e=>{let s=this.lookupRowNode(e);s&&(s.isSelected()&&i.push(s),s.clearRowTopAndRowIndex(),r[s.id]=!0,delete this.allNodesMap[s.id],t.remove.push(s),this.nodeManager.removeNode(s))}),this.allRowNodes=this.allRowNodes.filter(e=>!r[e.id])}executeUpdate(e,t,i){let{update:s}=e;null!=s&&s.forEach(e=>{let s=this.lookupRowNode(e);s&&(this.blockUtils.updateDataIntoRowNode(s,e),!s.selectable&&s.isSelected()&&i.push(s),t.update.push(s))})}lookupRowNode(e){let t=e6(this.gos);if(null!=t){var i;let s=null!=(i=this.parentRowNode.getRoute())?i:[],r=t({data:e,parentKeys:s.length>0?s:void 0,level:this.level}),a=this.allNodesMap[r];return a||(eg(`could not find row id=${r}, data item was not found for this id`),null)}{let t=this.allRowNodes.find(t=>t.data===e);return t||(eg("could not find data item as object was not found",e),null)}}addStoreStates(e){var t;e.push({suppressInfiniteScroll:!0,route:null!=(t=this.parentRowNode.getRoute())?t:[],rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}refreshStore(e){if(e){let e=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(e)}this.scheduleLoad(),this.fireStoreUpdatedEvent()}retryLoads(){"failed"===this.getState()&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow(e=>e.retryLoads())}scheduleLoad(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()}fireStoreUpdatedEvent(){this.eventService.dispatchEvent({type:"storeUpdated"})}getRowCount(){return this.nodesAfterSort.length}getTopLevelRowDisplayedIndex(e){return this.nodesAfterSort[e].rowIndex}isLastRowIndexKnown(){return"loaded"==this.getState()}getRowNodesInRange(e,t){let i=[],s=!1;return eD(e)&&(s=!0),this.nodesAfterSort.forEach(r=>{let a=r===e||r===t;(s||a)&&i.push(r),a&&(s=!s)}),s?[]:i}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}},N1=class extends tk{constructor(){super(...arguments),this.beanName="lazyBlockLoadingService",this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}wireBeans(e){this.rowNodeBlockLoader=e.rowNodeBlockLoader,this.rowRenderer=e.rowRenderer,this.rowModel=e.rowModel}postConstruct(){this.addManagedListeners(this.rowNodeBlockLoader,{blockLoaded:()=>this.queueLoadCheck()})}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}queueLoadAction(){let e=this.getBlockToLoad();if(!e)return;let t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!t&&(!this.nextBlockToLoad||!t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);let t=Number(this.nextBlockToLoad.index),i=this.nextBlockToLoad.cache,s=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{i.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(i,t,s),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,i){let s=this.rowNodeBlockLoader.getAvailableLoadingCount();(null==s||0!==s)&&(this.rowNodeBlockLoader.registerLoads(1),this.executeLoad(e,t,i),this.queueLoadCheck())}executeLoad(e,t,i){var s,r;let a=e.getSsrmParams(),o={startRow:t,endRow:i,rowGroupCols:a.rowGroupCols,valueCols:a.valueCols,pivotCols:a.pivotCols,pivotMode:a.pivotMode,groupKeys:null!=(s=e.store.getParentNode().getRoute())?s:[],filterModel:a.filterModel,sortModel:a.sortModel},n=this.cacheLoadingNodesMap.get(e),l=()=>{for(let e=0;e<i-t;e++)n.delete(t+e)},h=s=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadSuccess(t,i-t,s),l()},d=()=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadFailed(t,i-t),l()},u=this.gos.addGridCommonParams({request:o,success:h,fail:d,parentNode:e.store.getParentNode()});for(let e=0;e<i-t;e++)n.add(t+e);null==(r=e.getSsrmParams().datasource)||r.getRows(u)}getBlockToLoad(){var e;let t=this.rowRenderer.getFirstVirtualRenderedRow(),i=this.rowRenderer.getLastVirtualRenderedRow();for(let e=t;e<=i;e++){let t=this.rowModel.getRow(e);if(!t)continue;let i=t.parent&&t.parent.childStore;if(!i||!(i instanceof N4))continue;let s=i.getCache(),r=s.getNodes().getBy("node",t);if(!r)continue;let a=this.cacheLoadingNodesMap.get(s);if(!(null!=a&&a.has(r.index))&&(t.__needsRefreshWhenVisible||t.stub&&!t.failedLoad))return{cache:s,index:s.getBlockStartIndex(r.index)}}let s=null,r=null,a=Number.MAX_SAFE_INTEGER;for(let e of this.cacheLoadingNodesMap.keys())e.getNodesToRefresh().forEac
599h(o=>{if(null==o.rowIndex){r=o,s=e;return}let n=e.getNodes().getBy("node",o);if(!n)return;let l=this.cacheLoadingNodesMap.get(e);if(null!=l&&l.has(n.index))return;let h=Math.abs(t-o.rowIndex),d=Math.abs(o.rowIndex-i);h<a&&(r=o,a=h,s=e),d<a&&(r=o,a=d,s=e)});if(!s)return;let o=s,n=null==(e=o.getNodes().getBy("node",r))?void 0:e.index;return null==n?void 0:{cache:o,index:o.getBlockStartIndex(n)}}isRowLoading(e,t){var i,s;return null!=(i=null==(s=this.cacheLoadingNodesMap.get(e))?void 0:s.has(t))&&i}};N1.DEFAULT_BLOCK_SIZE=100;var N2=class{constructor(...e){if(e.length<1)throw Error("AG Grid: At least one index must be provided.");this.indexes=e,this.maps=new Map(this.indexes.map(e=>[e,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){let i=this.maps.get(e);if(!i)throw Error(`AG Grid: ${String(e)} not found`);return i.get(t)}set(e){this.indexes.forEach(t=>{let i=this.maps.get(t);if(!i)throw Error(`AG Grid: ${String(t)} not found`);i.set(e[t],e)})}delete(e){this.indexes.forEach(t=>{let i=this.maps.get(t);if(!i)throw Error(`AG Grid: ${String(t)} not found`);i.delete(e[t])})}clear(){this.maps.forEach(e=>e.clear())}getIterator(e){let t=this.maps.get(e);if(!t)throw Error(`AG Grid: ${String(e)} not found`);return t.values()}forEach(e){let t,i=this.getIterator(this.indexes[0]);for(;(t=i.next())&&!t.done;)e(t.value)}find(e){let t,i=this.getIterator(this.indexes[0]);for(;(t=i.next())&&!t.done;)if(e(t.value))return t.value}filter(e){let t,i=this.getIterator(this.indexes[0]),s=[];for(;(t=i.next())&&!t.done;)e(t.value)&&s.push(t.value);return s}},N3=class extends tk{constructor(e,t,i,s){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=i,this.storeParams=s}wireBeans(e){this.rowRenderer=e.rowRenderer,this.blockUtils=e.ssrmBlockUtils,this.focusService=e.focusService,this.nodeManager=e.ssrmNodeManager,this.serverSideRowModel=e.rowModel,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController,this.lazyBlockLoadingService=e.lazyBlockLoadingService}postConstruct(){this.lazyBlockLoadingService.subscribe(this),this.nodeMap=new N2("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=e6(this.gos),this.isMasterDetail=this.gos.get("masterDetail")}destroy(){this.lazyBlockLoadingService.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEac
599h(e=>this.blockUtils.destroyRowNode(e.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1,super.destroy()}getRowByDisplayIndex(e){var t,i,s,r,a;if(!this.store.isDisplayIndexInStore(e))return;let o=this.nodeDisplayIndexMap.get(e);if(o)return(o.stub||o.__needsRefreshWhenVisible)&&this.lazyBlockLoadingService.queueLoadCheck(),o;if(this.gos.get("groupHideOpenParents")||this.gos.get("groupAllowUnbalanced")){let t=this.nodeMap.find(t=>{var i;return!!(null!=(i=t.node.childStore)&&i.isDisplayIndexInStore(e))});if(t)return null==(i=t.node.childStore)?void 0:i.getRowUsingDisplayIndex(e)}if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);let n=this.nodeDisplayIndexMap.get(e-1);if(n){if(this.isMasterDetail&&n.master&&n.expanded)return n.detailNode;if(n.expanded&&null!=(s=n.childStore)&&s.isDisplayIndexInStore(e))return null==(r=n.childStore)?void 0:r.getRowUsingDisplayIndex(e);let t=this.nodeMap.getBy("node",n);return this.createStubNode(t.index+1,e)}let l=this.getSurroundingNodesByDisplayIndex(e);if(null==l){let t=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(t,e)}let{previousNode:h,nextNode:d}=l;if(h&&h.node.expanded&&null!=(t=h.node.childStore)&&t.isDisplayIndexInStore(e))return null==(a=h.node.childStore)?void 0:a.getRowUsingDisplayIndex(e);if(d){let t=d.node.rowIndex-e,i=d.index-t;return this.createStubNode(i,e)}let u=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(u,e)}createStubNode(e,t){let i=this.store.getRowBounds(t),s=this.createRowAtIndex(e,null,e=>{e.setRowIndex(t),e.setRowTop(i.rowTop),this.nodeDisplayIndexMap.set(t,e)});if(0===e&&this.gos.get("groupHideOpenParents")){let e=this.store.getParentNode().groupData;for(let t in e)s.setGroupValue(t,e[t])}return this.lazyBlockLoadingService.queueLoadCheck(),s}getRowByStoreIndex(e){var t;return null==(t=this.nodeMap.getBy("index",e))?void 0:t.node}skipDisplayIndexes(e,t,i){if(0===e)return;let s=ej(this.gos);t.skip(e),i.value+=e*s}setDisplayIndexes(e,t,i){this.nodeDisplayIndexMap.clear();let s={};
599this.nodeMap.forEach(e=>{s[e.index]=e.node});let r=-1;for(let a in s){let o=s[a],n=Number(a),l=n-1-r;this.skipDisplayIndexes(l,e,t);let h=0===n;if(o.setFirstChild(h),h&&this.gos.get("groupHideOpenParents")){let e=this.store.getParentNode().groupData;for(let t in e)o.setGroupValue(t,h?e[t]:void 0)}this.blockUtils.setDisplayIndex(o,e,t,i),null!=o.rowIndex&&this.nodeDisplayIndexMap.set(o.rowIndex,o),r=n}let a=this.numberOfRows-1-r;this.skipDisplayIndexes(a,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){if(e<0)throw Error("AG Grid: setRowCount can only accept a positive row count.");this.numberOfRows=e,null!=t&&(this.isLastRowKnown=t,!1===t&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){var t;return null!=(t=this.nodeDisplayIndexMap.get(e))?t:null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,i;return(this.nodeMap.forEach(s=>{if(e>s.node.rowIndex){(null==i||i.node.rowIndex<s.node.rowIndex)&&(i=s);return}if(null==t||t.node.rowIndex>s.node.rowIndex){t=s;return}}),i||t)?{previousNode:i,nextNode:t}:null}getDisplayIndexFromStoreIndex(e){var t,i;let s,r,a=this.nodeMap.getBy("index",e);if(a)return a.node.rowIndex;
599if(this.nodeMap.forEach(t=>{if(e>t.index){(null==r||r.index<t.index)&&(r=t);return}if(null==s||s.index>t.index){s=t;return}}),!s)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!r)return this.store.getDisplayIndexStart()+e;let o=e-r.index;return(null!=(t=null==(i=r.node.childStore)?void 0:i.getDisplayIndexEnd())?t:r.node.rowIndex)+o}createRowAtIndex(e,t,i){let s=this.nodeMap.getBy("index",e);if(s){let{node:i}=s;if(i.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,i))return this.blockUtils.updateDataIntoRowNode(i,t),this.nodesToRefresh.delete(i),i;if(null==this.getRowIdFunc&&i.hasChildren()&&i.expanded)return this.nodesToRefresh.delete(i),i;this.destroyRowAtIndex(e)}if(t&&null!=this.getRowIdFunc){var r,a;let i=this.getRowId(t),s=i&&(null==(r=this.removedNodeCache)?void 0:r.get(i));if(s)return null==(a=this.removedNodeCache)||a.delete(i),this.blockUtils.updateDataIntoRowNode(s,t),this.nodeMap.set({id:s.id,node:s,index:e}),this.nodesToRefresh.delete(s),s.__needsRefreshWhenVisible=!1,s;let o=this.nodeMap.getBy("id",i);if(o){this.nodeMap.delete(o);let{node:i,index:s}=o;return this.blockUtils.updateDataIntoRowNode(i,t),this.nodeMap.set({id:i.id,node:i,index:e}),this.nodesToRefresh.delete(i),i.__needsRefreshWhenVisible=!1,this.getBlockStartIndex(s)===this.getBlockStartIndex(e)||this.markBlockForVerify(s),i}}let o=this.blockUtils.createRowNode(this.store.getRowDetails());if(null!=t){let e=this.getPrefixedId(this.store.getIdSequence().next());this.blockUtils.setDataIntoRowNode(o,t,e,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(o),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(o)}return this.nodeMap.set({id:o.id,node:o,index:e}),i&&i(o),o}getBlockStates(){let e={},t={};
599this.nodeMap.forEach(({node:i,index:s})=>{let r=this.getBlockStartIndex(s);if(!i.stub&&!i.failedLoad){var a;e[r]=(null!=(a=e[r])?a:0)+1}let o="loaded";i.failedLoad?o="failed":this.lazyBlockLoadingService.isRowLoading(this,r)?o="loading":(this.nodesToRefresh.has(i)||i.stub)&&(o="needsLoading"),t[r]||(t[r]=new Set),t[r].add(o)});let i={loading:4,failed:3,needsLoading:2,loaded:1},s=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),r={};return Object.entries(t).forEach(([t,a])=>{var o;let n=[...a].sort((e,t)=>{var s,r;return(null!=(s=i[e])?s:0)-(null!=(r=i[t])?r:0)})[0],l=Number(t)/this.getBlockSize();r[s?`${s}-${l}`:String(l)]={blockNumber:l,startRow:Number(t),endRow:Number(t)+this.getBlockSize(),pageStatus:n,loadedRowCount:null!=(o=e[t])?o:0}}),r}destroyRowAtIndex(e){let t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){let[t,i]=this.getBlockBounds(e);this.nodeMap.filter(e=>e.index>=t&&e.index<i).forEach(({node:e})=>{e.__needsRefreshWhenVisible=!0})}doesNodeMatch(e,t){if(t.stub)return!1;let i=this.getRowId(e);return null===i?t.data===e:t.id===i}purgeStubsOutsideOfViewport(){let e=this.rowRenderer.getFirstVirtualRenderedRow(),t=this.rowRenderer.getLastVirtualRenderedRow(),i=this.getBlockStartIndex(e),[,s]=this.getBlockBounds(t);
599this.nodeMap.forEach(e=>{!this.lazyBlockLoadingService.isRowLoading(this,e.index)&&!e.node.failedLoad&&e.node.stub&&(e.index<i||e.index>s)&&this.destroyRowAtIndex(e.index)})}getBlocksDistanceFromRow(e,t){let i={};return e.forEach(({node:e,index:s})=>{let r,[a,o]=this.getBlockBounds(s);if(a in i)return;let n=Math.abs(e.rowIndex-t),l=this.nodeMap.getBy("index",[o-1]);l&&(r=Math.abs(l.node.rowIndex-t));let h=null==r||n<r?n:r;i[a]=h}),Object.entries(i)}purgeExcessRows(){var e;if(this.purgeStubsOutsideOfViewport(),null==this.store.getDisplayIndexEnd()||null==this.storeParams.maxBlocksInCache)return;let t=this.rowRenderer.getFirstVirtualRenderedRow(),i=this.rowRenderer.getLastVirtualRenderedRow(),s=new Set,r=new Set;this.nodeMap.forEach(({index:e,node:a})=>{let o=this.getBlockStartIndex(e);s.add(o),a.rowIndex>=t&&a.rowIndex<=i&&r.add(o)});let a=Math.max(r.size,null!=(e=this.storeParams.maxBlocksInCache)?e:0),o=s.size-a;if(o<=0)return;let n=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;r.forEach(e=>{n>e&&(n=e),l<e&&(l=e)});let h=this.nodeMap.filter(({node:e,index:t})=>{let i=this.getBlockStartIndex(t);return!(i>=n&&i<=l)&&!this.isNodeCached(e)});if(0===h.length)return;let d=this.getBlocksDistanceFromRow(h,t+(i-t)/2),u=this.getBlockSize();d.sort((e,t)=>Math.sign(t[1]-e[1]));for(let e=0;e<Math.min(o,d.length);e++){let t=Number(d[e][0]);for(let e=t;e<t+u;e++){let t=this.nodeMap.getBy("index",e);!t||this.isNodeCached(t.node)||this.destroyRowAtIndex(e)}}}isNodeFocused(e){let t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&null==t.rowPinned&&t.rowIndex===e.rowIndex}isNodeCached(e){let t=this.gos.get("groupAllowUnbalanced")&&""===e.key;return e.isExpandable()&&e.expanded||this.isNodeFocused(e)||t}extractDuplicateIds(e){if(null==this.getRowIdFunc)return[];let t=new Set,i=new Set;return e.forEach(e=>{let s=this.getRowId(e);t.has(s)?i.add(s):t.add(s)}),[...i]}onLoadSuccess(e,t,i){if(!this.live)return;let s=i.groupLevelInfo;if(this.store.setStoreInfo(s),null!=this.getRowIdFunc){let s=this.extractDuplicateIds(i.rowData);if(s.length>0){let i=s.join(", ");ep(`Unable to display rows as duplicate row ids (${i}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`),this.onLoadFailed(e,t);return}}i.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(i.pivotResultFields);let r=this.nodesToRefresh.size>0;if(i.rowData.forEach((t,i)=>{var s;let r=e+i,a=this.nodeMap.getBy("index",r);if(null!=a&&null!=(s=a.node)&&s.stub)return void this.createRowAtIndex(r,t);if(a&&this.doesNodeMatch(t,a.node)){this.blockUtils.updateDataIntoRowNode(a.node,t),this.nodesToRefresh.delete(a.node),a.node.__needsRefreshWhenVisible=!1;return}this.createRowAtIndex(r,t)}),void 0!=i.rowCount&&-1!==i.rowCount)this.numberOfRows=i.rowCount,this.isLastRowKnown=!0;else if(t>i.rowData.length)this.numberOfRows=e+i.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){let t=e+i.rowData.length+1;t>this.numberOfRows&&(this.numberOfRows=t)}this.isLastRowKnown&&this.nodeMap.filter(e=>e.index>
599=this.numberOfRows).forEach(e=>this.destroyRowAtIndex(e.index)),this.fireStoreUpdatedEvent();let a=0===this.nodesToRefresh.size;r&&a&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){0===this.nodesToRefresh.size&&(this.removedNodeCache.forEach(e=>{this.blockUtils.destroyRowNode(e)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){let e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t||this.nodesToRefresh.size>0)return;let i=-1;return null==this.nodeMap.find(e=>(i+=1,e.index!==i||!!e.node.__needsRefreshWhenVisible||!!e.node.stub))}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){if(!this.live)return;let i=this.nodesToRefresh.size>0;for(let i=e;i<e+t&&i<this.getRowCount();i++){var s;let{node:e}=null!=(s=this.nodeMap.getBy("index",i))?s:{};e&&this.nodesToRefresh.delete(e),e&&e.stub||(e&&!e.stub&&this.destroyRowAtIndex(i),e=this.createRowAtIndex(i)),e.__needsRefreshWhenVisible=!1,e.failedLoad=!0}let r=0===this.nodesToRefresh.size;i&&r&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}
599markNodesForRefresh(){this.nodeMap.forEach(e=>{(!e.node.stub||e.node.failedLoad)&&this.nodesToRefresh.add(e.node)}),this.lazyBlockLoadingService.queueLoadCheck(),this.isLastRowKnown&&0===this.numberOfRows&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){var t;if(null==this.getRowIdFunc)return null;let{level:i}=this.store.getRowDetails(),s=null!=(t=this.store.getParentNode().getRoute())?t:[];return this.getRowIdFunc({data:e,parentKeys:s.length>0?s:void 0,level:i})}getOrderedNodeMap(){let e={};return this.nodeMap.forEach(t=>e[t.index]=t),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){let e=this.sortController.getSortOptions();if(!e.some(e=>null!=e.sort))return;let t=Array(this.nodeMap.getSize());this.nodeMap.forEach(e=>t[e.index]=e.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(t,e).forEach((e,t)=>{this.nodeMap.set({id:e.id,node:e,index:t})})}updateRowNodes(e){if(null==this.getRowIdFunc)throw Error("AG Grid: Transactions can only be applied when row ids are supplied.");let t=[];return e.forEach(e=>{let i=this.getRowId(e),s=this.nodeMap.getBy("id",i);s&&(this.blockUtils.updateDataIntoRowNode(s.node,e),t.push(s.node))}),t}insertRowNodes(e,t){let i=this.store.getRowCount()-!!this.store.getParentNode().sibling,s=null==t&&this.isLastRowKnown?i:t;if(null==s||i<s)return[];if(null==this.getRowIdFunc)throw Error("AG Grid: Transactions can only be applied when row ids are supplied.");let r={};e.forEach(e=>{let t=this.getRowId(e);t&&this.isNodeInCache(t)||(r[t]=e)});let a=Object.values(r),o=a.length;if(0===o)return[];let n=this.nodeMap.filter(e=>e.index>=s);return n.forEach(e=>
599this.nodeMap.delete(e)),n.forEach(e=>{this.nodeMap.set({node:e.node,index:e.index+o,id:e.id})}),this.numberOfRows+=o,a.map((e,t)=>this.createRowAtIndex(s+t,e))}removeRowNodes(e){if(null==this.getRowIdFunc)throw Error("AG Grid: Transactions can only be applied when row ids are supplied.");let t=[],i=[],s=0,r=[...e],a=this.getOrderedNodeMap(),o=-1;for(let e in a){o+=1;let n=a[e],l=r.findIndex(e=>e===n.id);if(-1!==l){r.splice(l,1),this.destroyRowAtIndex(Number(e)),t.push(n.node),s+=1;continue}if(0===s)continue;let h=Number(e);o!==h&&i.push(n.node),this.nodeMap.delete(a[e]),this.nodeMap.set({id:n.id,node:n.node,index:h-s})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:s,r.length>0&&i.length>0&&(i.forEach(e=>e.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingService.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||N1.DEFAULT_BLOCK_SIZE}getBlockStartIndex(e){return e-e%this.getBlockSize()}getBlockBounds(e){let t=this.getBlockStartIndex(e);return[t,t+this.getBlockSize()]}},N4=class extends tk{constructor(e,t,i){super(),this.idSequence=new sL,this.ssrmParams=e,this.parentRowNode=i,this.storeParams=t,this.level=i.level+1,this.group=!!e.rowGroupCols&&this.level<e.rowGroupCols.length,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1,this.info={}}wireBeans(e){this.blockUtils=e.ssrmBlockUtils,this.storeUtils=e.ssrmStoreUtils,this.selectionService=e.selectionService,this.funcColsService=e.funcColsService}postConstruct(){let e=1;if(0===this.level){var t;e=null!=(t=this.storeUtils.getServerSideInitialRowCount())?t:1,this.eventService.dispatchEventOnce({type:"rowCountReady"})}if(this.cache=this.createManagedBean(new N3(this,e,!1,this.storeParams)),!this.gos.get("treeData")&&this.group){let e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.funcColsService.getRowGroupColumns()[this.level]}}destroy(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache),super.destroy()}applyRowData(e,t,i){this.cache.onLoadSuccess(t,i,e)}applyTransaction(e){var t,i,s,r,a;let o,n,l,h=e6(this.gos);if(!h)return ep("getRowId callback must be implemented for transactions to work. Transaction was ignored."),{status:ly.Cancelled};let d=this.gos.getCallback("isApplyServerSideTransaction");if(d&&!d({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:ly.Cancelled};let u=this.cache.isStoreFullyLoaded();if(null!=(t=e.update)&&t.length&&(o=this.cache.updateRowNodes(e.update)),null!=(i=e.add)&&i.length){let t=e.addIndex;null!=t&&t<0&&(t=void 0),n=this.cache.insertRowNodes(e.add,t)}if(null!=(s=e.remove)&&s.length){let t=[...new Set(e.remove.map(e=>{var t;return h({level:this.level,parentKeys:null!=(t=this.parentRowNode.getRoute())?t:[],data:e})}))];l=this.cache.removeRowNodes(t)}let c=this.gos.get("serverSideEnableClientSideSort"),p=(null==(r=o)?void 0:r.length)||(null==(a=n)?void 0:a.length);return u&&c&&p&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(o,l),{status:ly.Applied,update:o,add:n,remove:l}}updateSelectionAfterTransaction(e,t){let i=[];null==e||e.forEach(e=>{e.isSelected()&&!e.selectable&&i.push(e)}),null==t||t.forEach(e=>{e.isSelected()&&i.push(e)}),i.length&&this.selectionService.setNodesSelected({newValue:!1,clearSelection:!1,nodes:i,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(e=>this.blockUtils.clearDisplayIndex(e.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return 0!==this.cache.getRowCount()&&this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()}setDisplayIndexes(e,t,i){this.displayIndexStart=e.peek(),this.topPx=t.value;let s=this.parentRowNode.level>-1&&e2(this.gos)({node:this.parentRowNode});s||this.parentRowNode.destroyFooter(),"top"===s&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,i)),this.cache.setDisplayIndexes(e,t,i),"bottom"===s&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,i)),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t=new sL){e(this,t.next()),this.cache.getNodes().forEac
599h(i=>{let s=i.node.childStore;s&&s.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t=new sL){this.cache.getNodes().forEach(i=>{e(i.node,t.next());let s=i.node.childStore;s&&s.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t=new sL,i=!1){let s=this.parentRowNode.level>-1&&e2(this.gos)({node:this.parentRowNode});"top"===s&&e(this.parentRowNode.sibling,t.next());let r=this.cache.getOrderedNodeMap();for(let s in r){let a=r[s];e(a.node,t.next());let o=a.node.childStore;o&&o.forEachNodeDeepAfterFilterAndSort(e,t,i)}"bottom"===s&&e(this.parentRowNode.sibling,t.next())}retryLoads(){this.cache.getNodes().forEach(({node:e})=>{e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(e=>e.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){var t;if(!this.isDisplayIndexInStore(e))return null;let i=this.cache.getNodeCachedByDisplayIndex(e);if(i){let t=this.blockUtils.extractRowBounds(i,e);if(t)return t}let{previousNode:s,nextNode:r}=null!=(t=this.cache.getSurroundingNodesByDisplayIndex(e))?t:{};if(s){let t=this.blockUtils.extractRowBounds(s.node,e);if(null!=t)return t}let a=ej(this.gos);if(r){let t=(r.node.rowIndex-e)*a;return{rowTop:r.node.rowTop-t,rowHeight:a}}return{rowTop:this.topPx+this.heightPx-(this.getDisplayIndexEnd()-e)*a,rowHeight:a}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,i=null,s=Number.MAX_SAFE_INTEGER,r=null;if(this.cache.getNodes().forEach(({node:a})=>{let o=Math.abs(e-a.rowTop);if(a.rowTop<e){o<t&&(t=o,i=a);return}o<s&&(s=o,r=a)}),i){let t=this.blockUtils.getIndexAtPixel(i,e);if(null!=t)return t}let a=ej(this.gos);if(r){let t=Math.ceil((r.rowTop-e)/a);return r.rowIndex-t}let o=Math.floor((this.topPx+this.heightPx-e)/a);return this.getDisplayIndexEnd()-o}getChildStore(e){return this.storeUtils.getChildStore(e,this,e=>{let t=this.cache.getNodes().find(t=>t.node.key==e);return t?t.node:null})}forEachChildStoreShallow(e){this.cache.getNodes().forEach(({node:t})=>{t.childStore&&e(t.childStore)})}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){let e=this.cache.isStoreFullyLoaded(),t=this.gos.get("serverSideEnableClientSideSort");if(!(e&&t)){let e=this.cache.getRowCount(),t=this.cache.isLastRowIndexKnown();this.destroyBean(this.cache),this.cache=this.createManagedBean(new N3(this,e,t,this.storeParams));return}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(t=>t.refreshAfterSort(e))}refreshAfterFilter(e){!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)?this.refreshStore(!0):this.forEachChildStoreShallow(t=>t.refreshAfterFilter(e))}refreshStore(e){if(e){this.destroyBean(this.cache),this.cache=this.createManagedBean(new N3(this,1,!1,this.storeParams)),this.fireStoreUpdatedEvent();return}this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){let t=this.cache.getDisplayIndexFromStoreIndex(e);return null!=t?t:e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){return this.cache.getNodes().filter(({node:i})=>i.rowIndex>=e.rowIndex&&i.rowIndex<=t.rowIndex).map(({node:e})=>e)}addStoreStates(e){var t;e.push({suppressInfiniteScroll:!1,route:null!=(t=this.parentRowNode.getRoute())?t:[],rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}
599getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){this.eventService.dispatchEvent({type:"storeUpdated"})}fireRefreshFinishedEvent(){this.eventService.dispatchEvent({type:"storeRefreshed",route:this.parentRowNode.getRoute()})}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}},N6=class extends tk{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=ey(this.onRowHeightChanged.bind(this),100),this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService,this.filterManager=e.filterManager,this.sortController=e.sortController,this.rowRenderer=e.rowRenderer,this.nodeManager=e.ssrmNodeManager,this.storeFactory=e.ssrmStoreFactory,this.beans=e,this.pivotColDefService=e.pivotColDefService}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}postConstruct(){let e=this.resetRootStore.bind(this);this.addManagedEventListeners({newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onStoreUpdated.bind(this),columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e,columnPivotModeChanged:e}),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","suppressServerSideInfiniteScroll","cacheBlockSize"],e),this.addManagedPropertyListener("groupAllowUnbalanced",()=>this.onStoreUpdated()),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){let e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&ep("initialGroupOrderComparator cannot be used with Server Side Row Model."),eB(this.gos)&&!this.gos.exists("getRowId")&&ep("getRowId callback must be provided for Server Side Row Model selection to work correctly.")}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,i){let s=this.getRootStore();if(!s)return;let r=s.getChildStore(i);r&&(r instanceof N4?r.applyRowData(e,t,e.rowData.length):r instanceof N0&&r.processServerResult(e))}isLastRowIndexKnown(){let e=this.getRootStore();return!!e&&e.isLastRowIndexKnown()}onColumnEverything(){if(!this.storeParams)return void this.resetRootStore();let e=this.columnsToValueObjects(this.funcColsService.getRowGroupColumns()),t=this.columnsToValueObjects(this.funcColsService.getValueColumns()),i=this.columnsToValueObjects(this.funcColsService.getPivotColumns()),s=e=>{let t={};e.oldCols.forEach(e=>t[e.id]=e);let i=e.newCols.every(e=>{let i=t[e.id];return i&&delete t[e.id],i&&i.field===e.field&&i.aggFunc===e.aggFunc}),s=!e.allowRemovedColumns&&!!Object.values(t).length;return i&&!s},r=!eL(this.storeParams.sortModel,this.sortController.getSortModel()),a=!s({oldCols:this.storeParams.rowGroupCols,newCols:e}),o=!s({oldCols:this.storeParams.pivotCols,newCols:i}),n=!!(null!=e&&e.length)&&!s({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(r||a||o||n)this.resetRootStore();else{let e=this.createStoreParams();this.storeParams.rowGroupCols=e.rowGroupCols,this.storeParams.pivotCols=e.pivotCols,this.storeParams.valueCols=e.valueCols}}destroyRootStore(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);let i=this.getRootStore();i&&(i.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefService)return void this.gos.assertModuleRegistered(eh.RowGroupingModule,"pivotResultFields");let t=this.pivotColDefService.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.pivotResultColsService.setPivotResultCols(t,"rowModelUpdated")}resetRowHeights(){let e=this.resetRowHeightsForAllRowNodes(),t=eH(this.gos,this.rootNode);
599if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){let e=eH(this.gos,this.rootNode.sibling);this.rootNode.sibling.setRowHeight(e.height,e.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{let i=eH(this.gos,t);t.setRowHeight(i.height,i.estimated);let s=t.detailNode;if(s){let e=eH(this.gos,s);s.setRowHeight(e.height,e.estimated)}if(t.sibling){let e=eH(this.gos,t.sibling);s.setRowHeight(e.height,e.estimated)}e=!0}),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new r4(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.pivotResultColsService.setPivotResultCols(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e){return e.map(e=>({id:e.getId(),aggFunc:e.getAggFunc(),displayName:this.columnNameService.getDisplayNameForColumn(e,"model"),field:e.getColDef().field}))}createStoreParams(){var e,t,i,s;let r=this.columnsToValueObjects(this.funcColsService.getRowGroupColumns()),a=this.columnsToValueObjects(this.funcColsService.getValueColumns()),o=this.columnsToValueObjects(this.funcColsService.getPivotColumns()),n=eV(this.gos);return{valueCols:a,rowGroupCols:r,pivotCols:o,pivotMode:this.columnModel.isPivotMode(),filterModel:null!=(e=this.filterManager)&&e.isAdvancedFilterEnabled()?null==(t=this.filterManager)?void 0:t.getAdvancedFilterModel():null!=(i=null==(s=this.filterManager)?void 0:s.getFilterModel())?i:{},sortModel:this.sortController.getSortModel(),datasource:this.datasource,lastAccessedSequence:new sL,dynamicRowHeight:n}}getParams(){return this.storeParams}dispatchModelUpdated(e=!1){this.eventService.dispatchEvent({type:"modelUpdated",animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1})}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){let e=this.getRootStore();e&&e.setDisplayIndexes(new sL,{value:0},0)}retryLoads(){let e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){let t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode(t=>{!t.stub&&t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);let i=this.getRootStore();i&&(i.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore}getRowCount(){let e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){let e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){let t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){let t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:ej(this.gos)}}getBlockStates(){let e=this.getRootStore();if(!e)return;let t={};return e.forEachStoreDeep(e=>{if(e instanceof N0){let{id:i,state:s}=e.getBlockStateJson();t[i]=s}else if(e instanceof N4)Object.entries(e.getBlockStates()).forEach(([e,i])=>{t[e]=i});else throw Error("AG Grid: Unsupported store type")}),t}getRowIndexAtPixel(e){let t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return null!=this.getRootStore()&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){let t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachNodeAfterFilterAndSort(e,t=!1){let i=this.getRootStore();i&&i.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;let i=this.getRootStore();if(!i)return!0;let s=i.getChildStore(e);return s&&t(s),!0}refreshStore(e={}){let t=e.route?e.route:[];this.executeOnStore(t,t=>t.refreshStore(!0==e.purge))}getStoreState(){let e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){let i=e.rowIndex,s=t.rowIndex;if(null===i&&null===s)return[];if(null===s)return e?[e]:[];if(null===i)return[t];let r=[],[a,o]=[i,s].sort((e,t)=>
599e-t);return(this.forEachNode(e=>{let t=e.rowIndex;null!=t&&!e.stub&&t>=a&&t<=o&&r.push(e)}),r.length!==o-a+1)?e?[e,t]:[]:r}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i),i.detailNode&&i.detailNode.id===e&&(t=i.detailNode)}),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){let i=this.getRootStore();if(i){if(i instanceof N4)return void i.setRowCount(e,t);eg("Infinite scrolling must be enabled in order to set the row count.")}}destroy(){this.destroyDatasource(),this.destroyRootStore(),super.destroy()}},N5=class extends nY{constructor(){super(...arguments),this.beanName="expansionService",this.queuedRowIds=new Set}wireBeans(e){super.wireBeans(e),this.serverSideRowModel=e.rowModel}postConstruct(){super.postConstruct(),this.addManagedEventListeners({columnRowGroupChanged:()=>{this.queuedRowIds.clear()}})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id)){this.queuedRowIds.delete(e.id),e.setExpanded(!0);return}let t=this.gos.getCallback("isServerSideGroupOpenByDefault");!t||t({data:e.data,rowNode:e})&&e.setExpanded(!0)}expandRows(e){e.forEach(e=>{let t=this.serverSideRowModel.getRowNode(e);t?t.setExpanded(!0):this.queuedRowIds.add(e)})}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}},N8=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(e){this.rowModel=e}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(e){this.root=e,this.end=null,this.cachedRange.length=0}setEndRange(e){this.end=e,this.cachedRange.length=0}getRoot(){return this.root}getRange(){if(0===this.cachedRange.length){let e=this.root?this.rowModel.getRowNode(this.root):void 0,t=this.end?this.rowModel.getRowNode(this.end):void 0;if(null==e||null==t)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)}return this.cachedRange}isInRange(e){return null!==this.root&&this.getRange().some(t=>t.id===e)}truncate(e){let t=this.getRange();if(0===t.length)return{keep:[],discard:[]};let i=t[0].id===this.root,s=t.findIndex(t=>t.id===e);if(!(s>-1))return{keep:t,discard:[]};{let r=t.slice(0,s),a=t.slice(s+1);return this.setEndRange(e),i?{keep:r,discard:a}:{keep:a,discard:r}}}extend(e,t=!1){if(null==this.root){let i=this.getRange().slice(),s=this.rowModel.getRowNode(e);return s&&(t&&s.depthFirstSearch(e=>!e.group&&i.push(e)),i.push(s)),this.setRoot(e),{keep:i,discard:[]}}let i=this.rowModel.getRowNode(e),s=this.rowModel.getRowNode(this.root);if(null==i)return{keep:this.getRange(),discard:[]};if(null==s)return{keep:this.getRange().concat(i),discard:[]};if(this.rowModel.getNodesInRangeForSelection(s,i).find(e=>e.id===this.end))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}},N7=class extends tk{constructor(){super(...arguments),this.selectionCtx=new N8,this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectAllUsed=!1,this.selectedNodes={}}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.selectionCtx.init(this.rowModel)}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){let t={selectAll:!1,toggledNodes:new Set};if("object"!=typeof e)return eg("The provided selection state should be an object.");if(!("selectAll"in e))return eg("Invalid selection state. The state must conform to `IServerSideSelectionState`.");if("boolean"!=typeof e.selectAll)return eg("selectAll must be of boolean type.");if(t.selectAll=e.selectAll,!("toggledNodes"in e&&Array.isArray(e.toggledNodes)))return ep("`toggledNodes` must be an array of string ids.");e.toggledNodes.forEach(e=>{"string"==typeof e?t.toggledNodes.add(e):ep(`Provided ids must be of string type. Invalid id provided: ${e}`)});let i=t.selectAll||t.toggledNodes.size>1;if(e7(this.gos)&&!tl(this.gos)&&i)return ep("cannot multi select unless selection mode is 'multiRow'");this.selectedState=t}deleteSelectionStateFromParent(e,t){if(0===this.selectedState.toggledNodes.size)return!1;let i=!1;
599return t.forEach(e=>{this.selectedState.toggledNodes.delete(e)&&(i=!0)}),i}overrideSelectionValue(e,t){var i;if(!hk(t))return e;let s=this.selectionCtx.getRoot(),r=s?this.rowModel.getRowNode(s):null;return!r||null!=(i=r.isSelected())&&i}setNodesSelected(e){let{nodes:t,clearSelection:i,newValue:s,rangeSelect:r,source:a}=e;if(0===t.length)return 0;let o=i&&s&&!r;if(!tl(this.gos)||o){if(t.length>1)throw Error("AG Grid: cannot select multiple rows when rowSelection.mode is set to 'singleRow'");let e=t[0];return s&&e.selectable?(this.selectedNodes={[e.id]:e},this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),e.selectable&&this.selectionCtx.setRoot(e.id),1}let n=(e,t=s)=>{t&&e.selectable?this.selectedNodes[e.id]=e:delete this.selectedNodes[e.id],t!==this.selectedState.selectAll&&e.selectable?this.selectedState.toggledNodes.add(e.id):this.selectedState.toggledNodes.delete(e.id)};if(r){if(t.length>1)throw Error("AG Grid: cannot select multiple rows when using rangeSelect");let e=t[0],i=this.overrideSelectionValue(s,a);if(this.selectionCtx.isInRange(e.id)){let t=this.selectionCtx.truncate(e.id);i&&t.discard.forEach(e=>n(e,!1)),t.keep.forEach(e=>n(e,i))}else if(this.selectionCtx.getRoot()!==e.id){let t=this.selectionCtx.extend(e.id);i&&t.discard.forEach(e=>n(e,!1)),t.keep.forEach(e=>n(e,i))}return 1}return t.forEach(e=>n(e)),this.selectionCtx.setRoot(tp(t).id),1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){let t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(){return this.selectAllUsed&&ep("getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.\n                Use `api.getServerSideSelectionState()` instead."),Object.values(this.selectedNodes)}getSelectedRows(){return this.getSelectedNodes().map(e=>e.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}clearOtherNodes(e,t){let i=this.selectedState.selectAll?1:this.selectedState.toggledNodes.size-1;return this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])},this.rowModel.forEachNode(i=>{i!==e&&i.selectThisNode(!1,void 0,t)}),this.eventService.dispatchEvent({type:"selectionChanged",source:t}),i}isEmpty(){var e;return!this.selectedState.selectAll&&!(null!=(e=this.selectedState.toggledNodes)&&e.size)}selectAllRowNodes(){this.selectedState={selectAll:!0,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed=!0,this.selectionCtx.reset()}deselectAllRowNodes(){this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectedNodes={},this.selectionCtx.reset()}getSelectAllState(){return this.selectedState.selectAll?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}},N9=class extends tk{constructor(){super(...arguments),this.selectionCtx=new N8,this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}wireBeans(e){this.rowModel=e.rowModel,this.funcColsService=e.funcColsService,this.filterManager=e.filterManager,this.selectionService=e.selectionService}postConstruct(){this.addManagedEventListeners({modelUpdated:()=>this.removeRedundantState(),columnRowGroupChanged:()=>this.selectionService.reset("rowGroupChanged")}),this.selectionCtx.init(this.rowModel)}getSelectedState(){let e=this.gos.get("treeData"),t=(i,s,r)=>{let a={nodeId:r};if((e||s<=this.funcColsService.getRowGroupColumns().length)&&(a.selectAllChildren=i.selectAllChildren),i.toggledNodes.size){let e=[];i.toggledNodes.forEach((i,r)=>{let a=t(i,s+1,r);e.push(a)}),a.toggledNodes=e}return a};return t(this.selectedState,0)}setSelectedState(e){if("selectAll"in e)return eg("Invalid selection state. When `groupSelectsChildren` is enabled, the state must conform to `IServerSideGroupSelectionState`.");let t=(e,i)=>{var s,r;if("object"!=typeof e)throw Error("Each provided state object must be an object.");if("selectAllChildren"in e&&"boolean"!=typeof e.selectAllChildren)throw Error("`selectAllChildren` must be a boolean value or undefined.");if("toggledNodes"in e){if(!Array.isArray(e.toggledNodes))throw Error("`toggledNodes` must be an array.");if(!e.toggledNodes.every(e=>"object"==typeof e&&"nodeId"in e&&"string"==typeof e.nodeId))throw Error("Every `toggledNode` requires an associated string id.")}let a=null!=(s=e.selectAllChildren)?s:!i,o=null==(r=e.toggledNodes)?void 0:r.map(e=>[e.nodeId,t(e,a)]);if(null==o?void 0:o.some(([,e])=>a===e.selectAllChildren&&0===e.toggledNodes.size))throw Error(`
600                    Row selection state could not be parsed due to invali
600d data. Ensure all child state has toggledNodes or does not conform with the parent rule.
601                    Please rebuild the selection state and reapply it.
602                `);return{selectAllChildren:a,toggledNodes:new Map(o)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch(e){eg(e.message)}}deleteSelectionStateFromParent(e,t){let i=this.selectedState,s=[...e];for(;i&&s.length;)i=i.toggledNodes.get(s.pop());if(!i)return!1;let r=!1;return t.forEach(e=>{var t;null!=(t=i)&&t.toggledNodes.delete(e)&&(r=!0)}),r&&this.removeRedundantState(),r}overrideSelectionValue(e,t){var i;if(!hk(t))return e;let s=this.selectionCtx.getRoot(),r=s?this.rowModel.getRowNode(s):null;return!r||null!=(i=r.isSelected())&&i}setNodesSelected({nodes:e,newValue:t,rangeSelect:i,clearSelection:s,source:r}){if(0===e.length)return 0;if(i){if(e.length>1)throw Error("AG Grid: cannot select multiple rows when using rangeSelect");let i=e[0],s=this.overrideSelectionValue(t,r);if(this.selectionCtx.isInRange(i.id)){let e=this.selectionCtx.truncate(i.id);s&&this.selectRange(e.discard,!1),this.selectRange(e.keep,s)}else if(this.selectionCtx.getRoot()!==i.id){let e=this.selectionCtx.extend(i.id,!0);s&&this.selectRange(e.discard,!1),this.selectRange(e.keep,s)}return 1}let a=s&&t&&!i;if(!tl(this.gos)||a){if(e.length>1)throw Error("AG Grid: cannot select multiple rows when rowSelection.mode is set to 'singleRow'");this.deselectAllRowNodes()}return e.forEach(e=>{let i=this.getRouteToNode(e);this.recursivelySelectNode(i,this.selectedState,t)}),this.removeRedundantState(),this.selectionCtx.setRoot(tp(e).id),1}selectRange(e,t){let i=e.map(this.getRouteToNode).sort((e,t)=>t.length-e.length),s=new Set;i.forEach(e=>{s.has(tp(e))||(e.forEach(e=>s.add(e)),this.recursivelySelectNode(e,this.selectedState,t))}),this.removeRedundantState()}isNodeSelected(e){let t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected([e,...t],i){if(0===t.length){let t=i.toggledNodes.has(e.id);if(e.hasChildren()){let t=i.toggledNodes.get(e.id);if(t&&t.toggledNodes.size)return}return i.selectAllChildren?!t:t}if(i.toggledNodes.has(e.id)){let s=i.toggledNodes.get(e.id);if(s)return this.isNodePathSelected(t,s)}return i.selectAllChildren}getRouteToNode(e){let t=[],i=e;for(;i.parent;)t.push(i),i=i.parent;return t.reverse()}removeRedundantState(){var e;if(null!=(e=this.filterManager)&&e.isAnyFilterPresent())return;let t=(e=this.selectedState,i,s)=>{if(e.toggledNodes.forEach((i,s)=>{t(i,s,e)}),i){let t=this.rowModel.getRowNode(i),s=null==t?void 0:t.childStore;if((null==s?void 0:s.isLastRowIndexKnown())&&e.toggledNodes.size>=s.getRowCount()){for(let t of e.toggledNodes.entries()){let[e,i]=t;if(i.toggledNodes.size>0||!this.rowModel.getRowNode(e))return}e.selectAllChildren=!e.selectAllChildren,e.toggledNodes.clear()}}let r=0===e.toggledNodes.size,a=(null==s?void 0:s.selectAllChildren)===e.selectAllChildren;r&&a&&(null==s||s.toggledNodes.delete(i))};t()}recursivelySelectNode([e,...t],i,s){var r;if(!e)return;if(!t.length){let t=e.selectable;if(i.selectAllChildren===s||!t)return void i.toggledNodes.delete(e.id);let r={selectAllChildren:s,toggledNodes:new Map};return void i.toggledNodes.set(e.id,r)}let a=i.toggledNodes.has(e.id),o=null!=(r=i.toggledNodes.get(e.id))?r:{selectAllChildren:i.selectAllChildren,toggledNodes:new Map};a||i.toggledNodes.set(e.id,o),this.recursivelySelectNode(t,o,s),i.selectAllChildren===o.selectAllChildren&&0===o.toggledNodes.size&&i.toggledNodes.delete(e.id)}getSelectedNodes(){ep("`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model.\n            Use `api.getServerSideSelectionState()` instead.");let e=[];return this.rowModel.forEachNode(t=>{t.isSelected()&&e.push(t)}),e}processNewRow(){}getSelectedRows(){return this.getSelectedNodes().map(e=>e.data)}getSelectionCount(){return -1}isEmpty(){var e;return!this.selectedState.selectAllChildren&&!(null!=(e=this.selectedState.toggledNodes)&&e.size)}selectAllRowNodes(){this.selectedState={selectAllChildren:!0,toggledNodes:new Map},this.selectionCtx.reset()}deselectAllRowNodes(){this.selectedState={selectAllChildren:!1,toggledNodes:new Map},this.selectionCtx.reset()}getSelectAllState(){return this.selectedState.selectAllChildren?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}},Oe=class extends tk{constructor(){super(...arguments),this.beanName="selectionService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{let e=td(this.gos),t=e&&this.selectionStrategy instanceof N7?N9:!e&&this.selectionStrategy instanceof N9?N7:void 0;t&&(this.destroyBean(this.selectionStrategy),this.selectionStrategy=this.createManagedBean(new t),this.shotgunResetN
602odeSelectionState(),this.dispatchSelectionChanged("api"))}),this.addManagedPropertyListeners(["rowSelection"],()=>{let e=tn(this.gos);e!==this.selectionMode&&(this.selectionMode=e,this.deselectAllRowNodes({source:"api"}))}),this.selectionMode=tn(this.gos);let e=td(this.gos);this.selectionStrategy=this.createManagedBean(new(e?N9:N7))}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){Array.isArray(e)||(this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged(t))}setNodesSelected(e){let{nodes:t,...i}=e;if(t.length>1&&"multiRow"!==this.selectionMode)return ep("cannot multi select unless selection mode is 'multiRow'"),0;if(t.length>1&&e.rangeSelect)return ep("cannot use range selection when multi selecting rows"),0;let s={nodes:t.filter(e=>e.selectable),...i};if(!s.nodes.length)return 0;let r=this.selectionStrategy.setNodesSelected(s);return this.shotgunResetNodeSelectionState(s.source),this.dispatchSelectionChanged(s.source),r}deleteSelectionStateFromParent(e,t){this.selectionStrategy.deleteSelectionStateFromParent(e,t)&&(this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}shotgunResetNodeSelectionState(e){this.rowModel.forEachNode(t=>{if(t.stub)return;let i=this.selectionStrategy.isNodeSelected(t);i!==t.isSelected()&&t.selectThisNode(i,void 0,e)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e){this.selectionStrategy.processNewRow(e);let t=this.selectionStrategy.isNodeSelected(e);if(!1!=t&&!e.selectable){this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api");return}e.setSelectedInitialValue(t)}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"})}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(){return!0}selectAllRowNodes(e){if(Ot(e),e7(this.gos)&&"multiRow"!==tn(this.gos))return ep("cannot multi select unless selection mode is 'multiRow'");this.selectionStrategy.selectAllRowNodes(e),this.rowModel.forEachNode(t=>{t.stub||t.selectThisNode(!0,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}deselectAllRowNodes(e){Ot(e),this.selectionStrategy.deselectAllRowNodes(e),this.rowModel.forEachNode(t=>{t.stub||t.selectThisNode(!1,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}getSelectAllState(e,t){return this.selectionStrategy.getSelectAllState(e,t)}updateGroupsFromChildrenSelections(){return!1}getBestCostNodeSelection(){ep("calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.")}filterFromSelection(){}dispatchSelectionChanged(e){this.eventService.dispatchEvent({type:"selectionChanged",source:e})}};function Ot({justCurrentPage:e,justFiltered:t}){(e||t)&&ep(`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`)}var Oi=class extends tk{constructor(){super(...arguments),this.beanName="ssrmStoreFactory"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}createStore(e,t){let i=this.getStoreParams(e,t);return new(i.suppressInfiniteScroll?N0:N4)(e,i,t)}getStoreParams(e,t){let i=this.getLevelSpecificParams(t),s=this.isInfiniteScroll(i),r=this.getBlockSize(s,i),a=this.getMaxBlocksInCache(s,e,i);return{suppressInfiniteScroll:!s,cacheBlockSize:r,maxBlocksInCache:a}}getMaxBlocksInCache(e,t,i){if(!e)return;let s=i&&null!=i.maxBlocksInCache?i.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(null!=s&&s>=0)return t.dynamicRowHeight?void ep("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."):this.columnModel.isAutoRowHeightActive()?void ep("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."):s}getBlockSize(e,t){if(!e)return;
602let i=t&&null!=t.cacheBlockSize?t.cacheBlockSize:this.gos.get("cacheBlockSize");return null!=i&&i>0?i:100}getLevelSpecificParams(e){let t=this.gos.getCallback("getServerSideGroupLevelParams");if(t)return t({level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.funcColsService.getRowGroupColumns(),pivotColumns:this.funcColsService.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()})}isInfiniteScroll(e){return!(e&&null!=e.suppressInfiniteScroll?e.suppressInfiniteScroll:this.isSuppressServerSideInfiniteScroll())}isSuppressServerSideInfiniteScroll(){return this.gos.get("suppressServerSideInfiniteScroll")}},Os=class extends tk{constructor(){super(...arguments),this.beanName="ssrmStoreUtils"}wireBeans(e){this.columnModel=e.columnModel,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}loadFromDatasource(e){var t;let{storeParams:i,parentBlock:s,parentNode:r}=e,a=null!=(t=r.getRoute())?t:[];if(!i.datasource)return;let o={startRow:e.startRow,endRow:e.endRow,rowGroupCols:i.rowGroupCols,valueCols:i.valueCols,pivotCols:i.pivotCols,pivotMode:i.pivotMode,groupKeys:a,filterModel:i.filterModel,sortModel:i.sortModel},n=this.gos.addGridCommonParams({success:e.success,fail:e.fail,request:o,parentNode:e.parentNode});window.setTimeout(()=>{i.datasource&&s.isAlive()?i.datasource.getRows(n):e.fail()},0)}getChildStore(e,t,i){if(eE(e))return t;let s=i(e[0]);if(s){if(1===e.length&&!s.childStore){let e=this.serverSideRowModel.getParams();s.childStore=this.createBean(this.storeFactory.createStore(e,s))}let t=e.slice(1,e.length),i=s.childStore;return i?i.getChildStore(t):null}return null}isServerRefreshNeeded(e,t,i){if(i.valueColChanged||i.secondaryColChanged)return!0;let s=e.level+1;if(!(s<t.length))return!0;let r=t[s].id;return i.changedColumns.indexOf(r)>-1||this.columnModel.getCols().filter(e=>e.getColDef().showRowGroup&&i.changedColumns.includes(e.getId())).map(e=>e.getColDef().showRowGroup).some(e=>!0===e||e===r)}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}assertRowModelIsServerSide(e){return!!eO(this.gos)||(ep(`The '${e}' property can only be used with the Server Side Row Model.`),!1)}assertNotTreeData(e){return!this.gos.get("treeData")||(ep(`The '${e}' property cannot be used while using tree data.`),!1)}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&this.assertRowModelIsServerSide("serverSideSortAllLevels")}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&this.assertRowModelIsServerSide("serverSideOnlyRefreshFilteredGroups")}isServerSideSortOnServer(){return this.gos.get("serverSideSortOnServer")&&this.assertRowModelIsServerSide("serverSideSortOnServer")&&this.assertNotTreeData("serverSideSortOnServer")}isServerSideFilterOnServer(){return this.gos.get("serverSideFilterOnServer")&&this.assertRowModelIsServerSide("serverSideFilterOnServer")&&this.assertNotTreeData("serverSideFilterOnServer")}},Or=class extends tk{constructor(){super(...arguments),this.beanName="ssrmTransactionManager",this.asyncTransactions=[]}wireBeans(e){this.valueCache=e.valueCache,this.serverSideRowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){if(!eO(this.gos))return}applyTransactionAsync(e,t){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){let e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;let e=[],t=[],i=[],s=!1;this.asyncTransactions.forEach(r=>{let a;(this.serverSideRowModel.executeOnStore(r.transaction.route,e=>{a=e.applyTransaction(r.transaction)})?void 0==a&&(a={status:ly.StoreNotFound}):a={status:ly.StoreNotStarted},t.push(a),a.status==ly.StoreLoading)?i.push(r):(r.callback&&e.push(()=>r.callback(a)),a.status===ly.Applied&&(s=!0))}),e.length>0&&window.setTimeout(()=>{e.forEach(e=>e())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=i,s&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:"storeUpdated"})),t.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:t})}flushAsyncTransactions(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(!this.serverSideRowModel.executeOnStore(e.route,i=>{t=i.applyTransaction(e)}))return{status:ly.StoreNotStarted};if(!t)return{status:ly.StoreNotFound};if(this.valueCache.onDataChanged(),t.remove){let i=t.remove.map(e=>e.id);this.selectionService.deleteSelectionStateFromParent(e.route||[],i)}return this.eventService.dispatchEvent({type:"storeUpdated"}),t}},Oa="32.3.9",Oo={version:Oa,moduleName:`${eh.ServerSideRowModelModule}-core`,rowModel:"serverSide",beans:[N6,NZ,NX,Os,NK,NJ,Or,Nq,Oi,NQ,Oe,N5,N1],dependantModules:[I9,lS]},On={version:Oa,moduleName:`${eh.ServerSideRowModelModule}-api`,beans:[dr],apiFunctions:{getServerSideSelectionState:function(e){return e.selectionService.getSelectionState()},setServerSideSelectionState:function(e,t){e.selectionService.setSelectionState(t,"api")},applyServerSideTransaction:function(e,t){var i;return null==(i=e.ssrmTransactionManager)?void 0:i.applyTransaction(t)},applyServerSideTransactionAsync:function(e,t,i){var s;return null==(s=e.ssrmTransactionManager)?void 0:s.applyTransactionAsync(t,i)},applyServerSideRowData:function(e,t){var i,s,r;let a=null!=(i=t.startRow)?i:0,o=null!=(s=t.route)?s:[];
602a<0?ep(`invalid value ${t.startRow} for startRow, the value should be >= 0`):null==(r=e.rowModelHelperService)||null==(r=r.getServerSideRowModel())||r.applyRowData(t.successParams,a,o)},retryServerSideLoads:function(e){var t;null==(t=e.rowModelHelperService)||null==(t=t.getServerSideRowModel())||t.retryLoads()},flushServerSideAsyncTransactions:function(e){var t;return null==(t=e.ssrmTransactionManager)?void 0:t.flushAsyncTransactions()},refreshServerSide:function(e,t){var i;null==(i=e.rowModelHelperService)||null==(i=i.getServerSideRowModel())||i.refreshStore(t)},getServerSideGroupLevelState:function(e){var t,i;return null!=(t=null==(i=e.rowModelHelperService)||null==(i=i.getServerSideRowModel())?void 0:i.getStoreState())?t:[]}},dependantModules:[Oo,da,dn]},Ol={version:Oa,moduleName:eh.ServerSideRowModelModule,dependantModules:[Oo,On]},Oh=class{};Oh.SELECT_ALL="__AG_SELECT_ALL__",Oh.ADD_SELECTION_TO_FILTER="__AG_ADD_SELECTION_TO_FILTER__";var Od={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},Ou=class extends s${constructor(e){var t;super(e.isGroup?`
603            <div class="ag-set-filter-item" aria-hidden="true">
604                <span class="ag-set-filter-group-icons">
605                    <span class="ag-set-filter-group-closed-icon" data-ref="eGroupClosedIcon"></span>
606                    <span class="ag-set-filter-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
607                    <span class="ag-set-filter-group-indeterminate-icon" data-ref="eGroupIndeterminateIcon"></span>
608                </span>
609                <ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>
610            </div>`:`
611            <div class="ag-set-filter-item">
612                <ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>
613            </div>`,[rr]),this.eCheckbox=s_,this.eGroupOpenedIcon=s_,this.eGroupClosedIcon=s_,this.eGroupIndeterminateIcon=s_,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=null!=(t=e.depth)?t:0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}wireBeans(e){this.valueService=e.valueService,this.userComponentFactory=e.userComponentFactory}postConstruct(){this.addDestroyFunc(()=>{var e;return null==(e=this.destroyCellRendererComponent)?void 0:e.call(this)}),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),i_(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),this.params.readOnly||this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){this.eGroupClosedIcon.appendChild(sZ("setFilterGroupClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(sZ("setFilterGroupOpen",this.gos,null));let e=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:e}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:e}),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild(sZ("setFilterGroupIndeterminate",this.gos,null)),this.addManagedElementListeners(this.eGroupIndeterminateIcon,{click:e})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;
613let i={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(i),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){ss(this.eGroupClosedIcon,this.hasIndeterminateExpandState?!1===this.isExpanded:!this.isExpanded),ss(this.eGroupOpenedIcon,!0===this.isExpanded),this.hasIndeterminateExpandState&&ss(this.eGroupIndeterminateIcon,void 0===this.isExpanded)}onCheckboxChanged(e){this.isSelected=e;let t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;let e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),i=void 0===t?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),s=e("ariaToggleVisibility","Press SPACE to toggle visibility");iW(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}setupFixedAriaLabels(e){if(!this.isTree)return;let t=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();ij(i,`${e} ${t}`),iU(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){i8(this.getAriaElement(),this.eCheckbox.getValue())}refreshAriaExpanded(){iZ(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,i){if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(i,!0),this.valueFunction){let e=this.valueFunction();this.setTooltipAndCellRendererParams(e,e),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent){var s,r;if(!(null==(s=(r=this.cellRendererComponent).refresh)?void 0:s.call(r,this.cellRendererParams))){let e=this.cellRendererComponent;this.renderCell(),this.destroyBean(e)}}}render(){let{params:{column:e}}=this,{value:t}=this,i=null;"function"==typeof t?(this.valueFunction=t,t=i=this.valueFunction()):i=this.isTree?eI(t):this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,i),this.renderCell()}setTooltipAndCellRendererParams(e,t){let i="whenTruncated"===this.gos.get("tooltipShowMode");if(this.params.showTooltips&&(!i||!this.params.cellRenderer)){let s,r=null!=t?t:eI(e);i&&(s=()=>{let e=this.eCheckbox.getGui().querySelector(".ag-label");return!e||e.scrollWidth>e.clientWidth}),this.setTooltip({newTooltipText:r,location:"setFilterValue",getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,shouldDisplayTooltip:s})}this.cellRendererParams=this.gos.addGridCommonParams({value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,location:"setFilterValue",shouldDisplayTooltip:t})}})}getTooltipParams(){let e=super.getTooltipParams();return e.location="setFilterValue",e.colDef=this.getComponentHolder(),this.isTree&&(e.level=this.depth),e}getFormattedValue(e,t){return this.valueService.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){let e=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),t=e?e.newAgStackInstance():void 0;null==t?this.renderCellWithoutCellRenderer():t.then(e=>{e&&(this.cellRendererComponent=e,this.eCheckbox.setLabel(e.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(e))})}renderCellWithoutCellRenderer(){var e;let t=null!=(e=null==this.cellRendererParams.valueFormatted?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)?e:this.translate("blanks");"string"!=typeof t&&(ep(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects. See ${this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types")}`),t=""),this.eCheckbox.setLabel(t),this.setupFixedAriaLabels(t)}getComponentHolder(){return this.params.column.getColDef()}},Oc=class{getModelAsString(e,t){let{values:i}=e||t.getModel()||{},s=t.getValueModel();if(null==i||null==s)return"";let r=i.filter(e=>s.isKeyAvailable(e)),a=r.length,o=r.slice(0,10).map(e=>t.getFormattedValue(e));return`(${a}) ${o.join(",")}${a>10?",...":""}`}};function Op(e,t,i){let s=e;return s?(s=s.map(e=>eI(ex(e))),!t&&i&&s.some(e=>null==e))?null==tp(s)?null:s.filter(e=>null!=e):s:null}var Og=class{constructor(e,t,i,s,r,a,o,n,l,h,d){this.rowModel=e,this.filterParams=t,this.createKey=i,this.caseFormat=s,this.funcColsService=r,this.valueService=a,this.treeDataOrGrouping=o,this.treeData=n,this.getDataPath=l,this.groupAllowUnbalanced=h,this.addManagedEventListeners=d}extractUniqueValuesAsync(e,t){return new rm(i=>{if(this.rowModel.isRowDataLoaded())i(this.extractUniqueValues(e,t));else{let[s]=this.addManagedEventListeners({rowCountReady:()=>{null==s||s(),i(this.extractUniqueValues(e,t))}})}})}extractUniqueValues(e,t){let i=new Map,s=this.extractExistingFormattedKeys(t),r=new Set,a=this.treeData&&!!this.getDataPath,o=this.funcColsService.getRowGroupColumns(),n=(e,a)=>{let o=this.caseFormat(e);if(!r.has(o)){r.add(o);let n=e,l=ex(a),h=null==s?void 0:s.get(o);null!=h&&(n=h,l=t.get(h)),i.set(n,l)}};return this.rowModel.forEachLeafNode(t=>{if(!t.data||!e(t))return;if(this.treeDataOrGrouping)return void this.addValueForTreeDataOrGrouping(t,a,o,n);let i=this.getValue(t);
613null!=i&&Array.isArray(i)?(i.forEach(e=>{n(this.createKey(e,t),e)}),0===i.length&&n(null,null)):n(this.createKey(i,t),i)}),i}addValueForTreeDataOrGrouping(e,t,i,s){let r;if(t){var a;if(null!=(a=e.childrenAfterGroup)&&a.length)return;r=this.getDataPath(e.data)}else(r=i.map(t=>this.valueService.getKeyForNode(t,e))).push(this.getValue(e));let o=Op(r,t,this.groupAllowUnbalanced);s(this.createKey(o),o)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;let t=new Map;return e.forEach((e,i)=>{t.set(this.caseFormat(i),i)}),t}},Om=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}noAppliedFilteringKeys(){return this.hasNoAppliedFilteringKeys}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||0===this.filteringKeys.size,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(e=>this.filteringKeysCaseFormatted.add(this.caseFormat(e)))}addFilteringKey(e){null==this.filteringKeys&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},Ov=class{constructor(e,t,i,s){this.valueService=e,this.valueFormatter=t,this.formatter=i,this.column=s,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,i){this.displayedKeys=Array.from(i)}updateDisplayedValuesToMatchMiniFilter(e,t,i,s,r){for(let t of(this.displayedKeys=[],i))if(null==t)r&&this.displayedKeys.push(t);else{let i=e(t),r=this.valueService.formatValue(this.column,null,i,this.valueFormatter,!1);s(this.formatter(r))&&this.displayedKeys.push(t)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return Oh.SELECT_ALL}getAddSelectionToFilterItem(){return Oh.ADD_SELECTION_TO_FILTER}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},Of=e=>e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null,OC=class{constructor(e,t,i,s){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=i,this.treeDataOrGrouping=s,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:Oh.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:Oh.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:Oh.ADD_SELECTION_TO_FILTER,expanded:!0,key:Oh.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}updateOnParamsChange(e){this.treeListFormatter=e}updateDisplayedValuesToAllAvailable(e,t,i,s){"reload"===s?this.generateItemTree(e,t,i):"otherFilter"===s?(this.updateAvailable(i),this.updateExpandAll()):"miniFilter"===s&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,i,s,r,a){"reload"===a?this.generateItemTree(e,t,i):"otherFilter"===a&&this.updateAvailable(i),this.updateFilter(s,r),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,i){this.allDisplayedItemsTree=[],this.groupsExist=!1;let s=this.getTreeListPathGetter(e,i);for(let a of t){var r;let t,o=null!=(r=s(e(a)))?r:[null];o.length>1&&(this.groupsExist=!0);let n=i.has(a),l=this.allDisplayedItemsTree,h=[];o.forEach((e,i)=>{l||(l=[],t.children=l),(t=l.find(t=>{var i;return(null==(i=t.treeKey)?void 0:i.toUpperCase())===(null==e?void 0:e.toUpperCase())}))||(t={treeKey:e,depth:i,filterPasses:!0,expanded:!1,available:n,parentTreeKeys:h},i===o.length-1&&(t.key=a),l.push(t)),l=t.children,h=[...h,e]})}this.updateAvailable(i),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return e=>e;let i=!1;for(let s of t){let t=e(s);if(t instanceof Date){i=!0;break}if(null!=t)break}return i?Of:(ep("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),e=>[String(e)])}flattenItems(){this.activeDisplayedItemsFlat=[];let e=t=>{t.forEach(t=>
613{t.filterPasses&&t.available&&(this.activeDisplayedItemsFlat.push(t),t.children&&t.expanded&&e(t.children))})};e(this.allDisplayedItemsTree)}resetFilter(){let e=t=>{t.children&&t.children.forEach(t=>{e(t)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){let i=i=>!!i.available&&(null==i.treeKey?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)));this.allDisplayedItemsTree.forEach(e=>this.recursiveItemCheck(e,!1,i,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){let e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){let t=(i,s)=>{i.children?i.expanded&&s||i.children.forEach(e=>{e.filterPasses&&t(e,!1)}):e(i.key)};this.activeDisplayedItemsFlat.forEach(e=>t(e,!0))}someDisplayedKey(e){let t=(i,s)=>i.children?(!i.expanded||!s)&&i.children.some(e=>!!e.filterPasses&&t(e,!1)):e(i.key);return this.activeDisplayedItemsFlat.some(e=>t(e,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){let e=(t,i,s)=>{for(let r of t){if(!r.filterPasses||!r.available||!r.children)continue;if(i=i||!!r.expanded,s=s||!r.expanded,i&&s)return;let t=e(r.children,i,s);if(void 0===t)return;t?i=!0:s=!0}return i&&s?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,i,s){let r=!1;e.children&&e.children.forEach(a=>{let o=this.recursiveItemCheck(a,t||i(e),i,s);r=r||o});let a=t||r||i(e);return e[s]=a,a}updateAvailable(e){let t=t=>e.has(t.key);this.allDisplayedItemsTree.forEach(e=>this.recursiveItemCheck(e,!1,t,"available"))}},Oy=class{constructor(e){this.localEventService=new el,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;let{usingComplexObjects:t,funcColsService:i,valueService:s,treeDataTreeList:r,groupingTreeList:a,filterParams:o,gos:n,valueFormatter:l,addManagedEventListeners:h}=e,{column:d,colDef:u,textFormatter:c,doesRowPassOtherFilter:p,suppressSorting:g,comparator:m,rowModel:v,values:f,caseSensitive:C,treeList:y,treeListPathGetter:w,treeListFormatter:b}=o;this.filterParams=o,this.gos=n,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=null!=c?c:e=>null!=e?e:null,this.doesRowPassOtherFilters=p,this.suppressSorting=g||!1,this.filteringKeys=new Om({caseFormat:this.caseFormat});let S=null!=m?m:u.comparator,x=!!r||!!a;this.compareByValue=!!(t&&S||x||y&&!w),x&&!S?this.entryComparator=this.createTreeDataOrGroupingComparator():!y||w||S?this.entryComparator=([e,t],[i,s])=>S(t,s):this.entryComparator=([e,t],[i,s])=>eF(t,s),this.keyComparator=null!=S?S:eF,this.caseSensitive=!!C;let M=n.get("getDataPath"),D=n.get("groupAllowUnbalanced");eN(n)&&(this.clientSideValuesExtractor=new Og(v,this.filterParams,this.createKey,this.caseFormat,i,s,x,!!r,M,D,h)),null==f?this.valuesType=2:(this.valuesType=+!Array.isArray(f),this.providedValues=f),this.displayValueModel=y?new OC(this.formatter,w,b,r||a):new Ov(s,l,this.formatter,d),this.updateAllValues().then(e=>this.resetSelectionState(e||[]))}addEventListener(e,t,i){this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService.removeEventListener(e,t,i)}updateOnParamsChange(e){return new rm(t=>{let{values:i,textFormatter:s,suppressSorting:r,treeListFormatter:a}=e,o=this.providedValues,n=this.suppressSorting;if(this.filterParams=e,this.formatter=null!=s?s:e=>null!=e?e:null,this.suppressSorting=r||!1,this.providedValues=null!=i?i:null,this.displayValueModel instanceof OC&&this.displayValueModel.updateOnParamsChange(a),this.providedValues!==o||this.suppressSorting!==n){i&&0!==i.length?this.valuesType=+!Array.isArray(i):(this.valuesType=2,this.providedValues=null);let e=this.getModel();this.updateAllValues().then(()=>{this.setModel(e).then(()=>t())})}else t()})}refreshValues(){return new rm(e=>{this.allValuesPromise.then(()=>{let t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new rm(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(null!=e?e:[],"otherFilter"),!0)):rm.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new rm(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break;case 1:{this.setIsLoading(!0);let t=this.providedValues,{column:i,colDef:s}=this.filterParams,r=this.gos.addGridCommonParams({success:t=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(t))))},colDef:s,column:i});window.setTimeout(()=>t(r),0);break}default:throw Error("Unrecognised valuesType")}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){let t=this.sortKeys(e);return this.allValues=null!=e?e:new Map,t}
613validateProvidedValues(e){if(this.usingComplexObjects&&null!=e&&e.length){let t=e[0];t&&"object"!=typeof t&&"function"!=typeof t&&(null==this.createKey(t)?ep("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types"):ep("Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?"))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return 2===this.valuesType}updateAvailableKeys(e,t){let i=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(i),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){let t,i=null!=e?e:new Map;return this.suppressSorting?Array.from(i.keys()):(t=this.compareByValue?Array.from(i.entries()).sort(this.entryComparator).map(([e])=>e):Array.from(i.keys()).sort(this.keyComparator),this.filterParams.excelMode&&i.has(null)&&(t=t.filter(e=>null!=e)).push(null),t)}getParamsForValuesFromRows(e=!1){return this.clientSideValuesExtractor?{predicate:t=>!e||this.doesRowPassOtherFilters(t),existingValues:e&&!this.caseSensitive?this.allValues:void 0}:(eg("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"),null)}getValuesFromRows(e=!1){let t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingV
613alues):null}getValuesFromRowsAsync(e=!1){let t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):rm.resolve(null)}setMiniFilter(e){return e=ex(e),this.miniFilterText!==e&&(null===e&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if("expansion"===e)return void this.displayValueModel.refresh();if(null==this.miniFilterText)return void this.displayValueModel.updateDisplayedValuesToAllAvailable(e=>this.getValue(e),t,this.availableKeys,e);let i=this.caseFormat(this.formatter(this.miniFilterText)||""),s=e=>null!=e&&this.caseFormat(e).indexOf(i)>=0,r=!!this.filterParams.excelMode&&s(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(e=>this.getValue(e),t,this.availableKeys,s,r,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return"windows"===this.filterParams.excelMode}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&eM(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){null==this.miniFilterText?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.add(e)))}deselectAllMatchingMiniFilter(){null==this.miniFilterText?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;let e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;return e&&e.size>0?this.selectedKeys?Array.from(new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(t=>!e.has(t))])):Array.from(e):Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(null==e)this.resetSelectionState(null!=t?t:[]);else{this.selectedKeys.clear();let t=new Map;this.allValues.forEach((e,i)=>{t.set(this.caseFormat(i),i)}),e.forEach(e=>{let i=this.caseFormat(ex(e)),s=t.get(i);void 0!==s&&this.selectKey(s)})}})}uniqueValues(e){let t=new Map,i=new Set;
613return(null!=e?e:[]).forEach(e=>{let s=ex(e),r=this.createKey(s),a=this.caseFormat(r);i.has(a)||(i.add(a),t.set(r,s))}),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[i,s])=>{if(null==t)return null==s?0:-1;if(null==s)return 1;for(let e=0;e<t.length;e++){if(e>=s.length)return 1;let i=eF(t[e],s[e]);if(0!==i)return i}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.noAppliedFilteringKeys()}},Ow=class extends ao{constructor(){super("setFilter"),this.eMiniFilter=s_,this.eFilterLoading=s_,this.eSetFilterList=s_,this.eFilterNoMatches=s_,this.valueModel=null,this.setFilterParams=null,this.virtualList=null,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new Oc,this.updateSetFilterOnParamsChange=e=>{var t;this.setFilterParams=e,this.caseSensitive=!!e.caseSensitive;let i=null!=(t=e.keyCreator)?t:e.colDef.keyCreator;this.setValueFormatter(e.valueFormatter,i,!!e.treeList,!!e.colDef.refData);let s=e.column.getId().startsWith(tz);this.treeDataTreeList=this.gos.get("treeData")&&!!e.treeList&&s,this.getDataPath=this.gos.get("getDataPath"),this.groupingTreeList=!!this.funcColsService.getRowGroupColumns().length&&!!e.treeList&&s,this.createKey=this.generateCreateKey(i,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(e){super.wireBeans(e),this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.dataTypeService=e.dataTypeService}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return`
614            <div class="ag-set-filter">
615                <div data-ref="eFilterLoading" class="ag-filter-loading ag-hidden">${this.translateForSetFilter("loadingOoo")}</div>
616                <ag-input-text-field class="ag-mini-filter" data-ref="eMiniFilter"></ag-input-text-field>
617                <div data-ref="eFilterNoMatches" class="ag-filter-no-matches ag-hidden">${this.translateForSetFilter("noMatches")}</div>
618                <div data-ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>
619            </div>`}getAgComponents(){return[aC]}handleKeyDown(e){if(super.handleKeyDown(e),!e.defaultPrevented)switch(e.key){case s9.SPACE:this.handleKeySpace(e);break;case s9.ENTER:this.handleKeyEnter(e);break;case s9.LEFT:this.handleKeyLeft(e);break;case s9.RIGHT:this.handleKeyRight(e)}}handleKeySpace(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.toggleSelected()}handleKeyEnter(e){if(!this.setFilterParams)return;let{excelMode:t,readOnly:i}=this.setFilterParams||{};t&&!i&&(e.preventDefault(),this.onBtApply(!1,!1,e),"mac"===this.setFilterParams.excelMode&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.setExpanded(!1)}handleKeyRight(e){var t;null==(t=this.getComponentForKeyEvent(e))||t.setExpanded(!0)}getComponentForKeyEvent(e){var t;if(!this.eSetFilterList.contains(eZ(this.gos))||!this.virtualList)return;let i=this.virtualList.getLastFocusedRow();if(null==i)return;let s=this.virtualList.getComponentAt(i);if(null==s)return;e.preventDefault();let{readOnly:r}=null!=(t=this.setFilterParams)?t:{};if(!r)return s}getCssIdentifier(){return"set-filter"}setModel(e){var t;return null==e&&(null==(t=this.valueModel)?void 0:t.getModel())==null?(this.setMiniFilter(null),rm.resolve()):super.setModel(e)}refresh(e){var t;if(this.applyExcelModeOptions(e),!super.refresh(e))return!1;let i=this.setFilterParams;return!(["treeList","treeListPathGetter","caseSensitive","comparator","excelMode"].some(t=>e[t]!==(null==i?void 0:i[t]))||this.haveColDefParamsChanged(e))&&(super.updateParams(e),this.updateSetFilterOnParamsChange(e),this.updateMiniFilter(),e.suppressSelectAll!==(null==i?void 0:i.suppressSelectAll)&&this.createVirtualListModel(e),null==(t=this.valueModel)||t.updateOnParamsChange(e).then(()=>{this.refreshFilterValues()}),!0)}haveColDefParamsChanged(e){var t;let{colDef:i,keyCreator:s}=e,{colDef:r,keyCreator:a}=null!=(t=this.setFilterParams)?t:{},o=null!=s?s:i.keyCreator,n=null!=a?a:null==r?void 0:r.keyCreator,l=i.filterValueGetter!==(null==r?void 0:r.filterValueGetter),h=!!this.dataTypeService&&!!o&&this.dataTypeService.getFormatValue(i.cellDataType)===o&&i.valueFormatter!==(null==r?void 0:r.valueFormatter);return l||o!==n||h}setModelAndRefresh(e){return this.valueModel?this.valueModel.setModel(e).then(()=>{this.isAlive()&&this.checkAndRefreshVirtualList()}):rm.resolve()}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(e){this.setMiniFilter(null);let t=null==e?null:e.values;return this.setModelAndRefresh(t)}getModelFromUi(){if(!this.valueModel)throw Error("Value model has not been created.");let e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null}getFilterType(){return"set"}getValueModel(){return this.valueModel}areModelsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&tg(e.values,t.values)}setParams(e){var t;this.applyExcelModeOptions(e),super.setParams(e),this.updateSetFilterOnParamsChange(e);let i=null!=(t=e.keyCreator)?t:e.colDef.keyCreator;this.valueModel=new Oy({filterParams:e,setIsLoading:e=>this.setIsLoading(e),translate:e=>this.translateForSetFilter(e),caseFormat:e=>this.caseFormat(e),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!i,gos:this.gos,funcColsService:this.funcColsService,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:e=>this.addManagedEventListeners(e)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(e){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(e)}setValueFormatter(e,t,i,s){let r=e;if(!r){if(t&&!i)throw Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator");this.noValueFormatterSupplied=!0,s||(r=e=>eI(e.value))}this.valueFormatter=r}generateCreateKey(e,t){if(t&&!e)throw Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return e?(t,i=null)=>ex(e(this.getKeyCreatorParams(t,i))):e=>ex(eI(e))}getFormattedValue(e){var t;let i=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(i)&&(i=tp(i));let s=this.valueService.formatValue(this.setFilterParams.column,null,i,this.valueFormatter,!1);return null!=(t=null==s?eI(i):s)?t:this.translateForSetFilter("blanks")}applyExcelModeOptions(e){"windows"===e.excelMode?(e.buttons||(e.buttons=["apply","cancel"]),null==e.closeOnApply&&
619(e.closeOnApply=!0)):"mac"===e.excelMode&&(e.buttons||(e.buttons=["reset"]),null==e.applyMiniFilterWhileTyping&&(e.applyMiniFilterWhileTyping=!0),null==e.debounceMs&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&(e.defaultToNothingSelected=!1,ep('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))}addEventListenersForDataChanges(){this.isValuesTakenFromGrid()&&(this.addManagedEventListeners({cellValueChanged:e=>{this.setFilterParams&&e.column===this.setFilterParams.column&&this.syncAfterDataChange()}}),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],()=>{this.syncAfterDataChange()}))}syncAfterDataChange(){if(!this.valueModel)throw Error("Value model has not been created.");return this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),(!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi()))&&this.onBtApply(!1,!0)})}setIsLoading(e){ss(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter()}initVirtualList(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let e=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),t=!!this.setFilterParams.treeList,i=this.virtualList=this.createBean(new An({cssIdentifier:"filter",ariaRole:t?"tree":"listbox",listName:e})),s=this.eSetFilterList;t&&s.classList.add("ag-set-filter-tree-list"),s&&s.appendChild(i.getGui());let{cellHeight:r}=this.setFilterParams;null!=r&&i.setRowHeight(r);let a=(e,i)=>this.createSetListItem(e,t,i);i.setComponentCreator(a);let o=(e,t)=>this.updateSetListItem(e,t);i.setComponentUpdater(o),this.createVirtualListModel(this.setFilterParams)}createVirtualListModel(e){var t;let i;this.valueModel&&(i=e.suppressSelectAll?new Ob(this.valueModel):new OS(this.valueModel,()=>this.isSelectAllSelected()),e.treeList&&(i=new Ox(i)),null==(t=this.virtualList)||t.setModel(i))}getSelectAllLabel(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let e=null!=this.valueModel.getMiniFilter()&&this.setFilterParams.excelMode?"selectAllSearchResults":"selectAll";return this.translateForSetFilter(e)}getAddSelectionToFilterLabel(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(e,t,i){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let s=this.valueModel.hasGroups(),{isSelected:r,isExpanded:a}=this.isSelectedExpanded(e),{value:o,depth:n,isGroup:l,hasIndeterminateExpandState:h,selectedListener:d,expandedListener:u}=this.newSetListItemAttributes(e),c={focusWrapper:i,value:o,params:this.setFilterParams,translate:e=>this.translateForSetFilter(e),valueFormatter:this.valueFormatter,item:e,isSelected:r,isTree:t,depth:n,groupsExist:s,isGroup:l,isExpanded:a,hasIndeterminateExpandState:h},p=this.createBean(new Ou(c));return p.addEventListener("selectionChanged",d),u&&p.addEventListener("expandedChanged",u),p}newSetTreeItemAttributes(e){var t,i,s,r,a,o;if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let n=this.valueModel.hasGroups();return e.key===Oh.SELECT_ALL?{value:()=>this.getSelectAllLabel(),isGroup:n,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:e=>this.onSelectAll(e.isSelected),expandedListener:e=>this.onExpandAll(e.item,e.isExpanded)}:e.key===Oh.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:e.children?{value:null!=(r=null==(a=(o=this.setFilterParams).treeListFormatter)?void 0:a.call(o,e.treeKey,e.depth,e.parentTreeKeys))?r:e.treeKey,depth:e.depth,isGroup:!0,selectedListener:e=>this.onGroupItemSelected(e.item,e.isSelected),expandedListener:e=>this.onExpandedChanged(e.item,e.isExpanded)}:{value:null!=(t=null==(i=(s=this.setFilterParams).treeListFormatter)?void 0:i.call(s,e.treeKey,e.depth,e.parentTreeKeys))?t:e.treeKey,depth:e.depth,selectedListener:e=>this.onItemSelected(e.item.key,e.isSelected)}}newSetListItemAttributes(e){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e):e===Oh.SELECT_ALL?{value:()=>this.getSelectAllLabel(),selectedListener:e=>this.onSelectAll(e.isSelected)}:e===Oh.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:e=>this.onItemSelected(e.item,e.isSelected)}}updateSetListItem(e,t){let{isSelected:i,isExpanded:s}=this.isSelectedExpanded(e);t.refresh(e,i,s)}isSelectedExpanded(e){let t,i;return this.isSetFilterModelTreeItem(e)?(i=e.expanded,t=e.key===Oh.SELECT_ALL?this.isSelectAllSelected():e.key===Oh.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?this.areAllChildrenSelected(e):this.valueModel.isKeySelected(e.key)):t=e===Oh.SELECT_ALL?this.isSelectAllSelected():e===Oh.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:i}}isSetFilterModelTreeItem(e){return(null==e?void 0:e.treeKey)!==void 0}initMiniFilter(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let{eMiniFilter:e,localeService:t}=this,i=t.getLocaleTextFunc();e.setDisplayed(!this.setFilterParams.suppressMiniFilter),e.setValue(this.valueModel.getMiniFilter()),e.onValueChange(()=>this.onMiniFilterInput()),e.setInputAriaLabel(i("ariaSearchFilterValues","Search f
619ilter values")),this.addManagedElementListeners(e.getInputElement(),{keydown:e=>this.onMiniFilterKeyDown(e)})}updateMiniFilter(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let{eMiniFilter:e}=this;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);let t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)}afterGuiAttached(e){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");super.afterGuiAttached(e),this.resetExpansion(),this.refreshVirtualList();let{eMiniFilter:t}=this;if(t.setInputPlaceholder(this.translateForSetFilter("searchOoo")),!e||!e.suppressFocus)if(t.isDisplayed())t.getFocusableElement().focus();else{var i;null==(i=this.virtualList)||i.awaitStable(()=>{var e;return null==(e=this.virtualList)?void 0:e.focusRow(0)})}}afterGuiDetached(){var e,t;super.afterGuiDetached(),null!=(e=this.setFilterParams)&&e.excelMode&&this.resetMiniFilter();let i=this.getModel();(null!=(t=this.setFilterParams)&&t.excelMode||!this.areModelsEqual(i,this.getModelFromUi()))&&(this.resetUiToActiveModel(i),this.showOrHideResults())}applyModel(e="api"){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");this.setFilterParams.excelMode&&"rowDataUpdated"!==e&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();let t=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(t&&!this.getModel())return!1;let i=super.applyModel(e),s=this.getModel();return s?(t||this.valueModel.setAppliedModelKeys(new Set),s.values.forEach(e=>{this.valueModel.addToAppliedModelKeys(e)})):t||this.valueModel.setAppliedModelKeys(null),i}isModelValid(e){return!this.setFilterParams||!this.setFilterParams.excelMode||null==e||e.values.length>0}doesFilterPass(e){if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;let{node:t,data:i}=e;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(t,i);if(this.groupingTreeList)return this.doesFilterPassForGrouping(t);let s=this.getValueFromNode(t);return null!=s&&Array.isArray(s)?0===s.length?this.valueModel.hasAppliedModelKey(null):s.some(e=>this.isInAppliedModel(this.createKey(e,t))):this.isInAppliedModel(this.createKey(s,t))}doesFilterPassForTreeData(e,t){var i;return(null==(i=e.childrenAfterGroup)||!i.length)&&this.isInAppliedModel(this.createKey(Op(this.getDataPath(t),!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(e){let t=this.funcColsService.getRowGroupColumns().map(t=>this.valueService.getKeyForNode(t,e));return t.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(Op(t,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(e){return this.valueModel.hasAppliedModelKey(e)}getValueFromNode(e){return this.setFilterParams.getValue(e)}getKeyCreatorParams(e,t=null){return{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:null==t?void 0:t.data,api:this.setFilterParams.api,context:this.setFilterParams.context}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return!!this.valueModel&&2===this.valueModel.getValuesType()}setFilterValues(e){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.overrideValues(e).then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}resetFilterValues(){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged()})}onAnyFilterChanged(){setTimeout(()=>{if(this.isAlive()){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.refreshAfterAnyFilterChanged().then(e=>{e&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})}},0)}onMiniFilterInput(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");
619if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;let{applyMiniFilterWhileTyping:e,readOnly:t}=this.setFilterParams||{};!t&&e?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let{excelMode:e,readOnly:t}=this.setFilterParams||{};null==e||t?this.checkAndRefreshVirtualList():null==this.valueModel.getMiniFilter()?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){if(!this.valueModel)throw Error("Value model has not been created.");let e=null!=this.valueModel.getMiniFilter()&&1>this.valueModel.getDisplayedValueCount();ss(this.eFilterNoMatches,e),ss(this.eSetFilterList,!e)}resetMiniFilter(){var e;this.eMiniFilter.setValue(null,!0),null==(e=this.valueModel)||e.setMiniFilter(null)}resetUiToActiveModel(e,t){this.setModelAndRefresh(null==e?null:e.values).then(()=>{this.onUiChanged(!1,"prevent"),null==t||t()})}handleCancelEnd(e){this.setMiniFilter(null),super.handleCancelEnd(e)}onMiniFilterKeyDown(e){let{excelMode:t,readOnly:i}=this.setFilterParams||{};e.key!==s9.ENTER||t||i||this.filterOnAllVisibleValues()}filterOnAllVisibleValues(e=!0){let{readOnly:t}=this.setFilterParams||{};if(!this.valueModel)throw Error("Value model has not been created.");if(t)throw Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(e){null!=e&&window.setTimeout(()=>{if(!this.virtualList)throw Error("Virtual list has not been created.");this.isAlive()&&this.virtualList.focusRow(e)},0)}onSelectAll(e){if(!this.valueModel)throw Error("Value model has not been created.");if(!this.virtualList)throw Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(e,t){let i=e=>{e.children?e.children.forEach(e=>i(e)):this.selectItem(e.key,t)};i(e),this.refreshAfterSelection()}onItemSelected(e,t){if(!this.valueModel)throw Error("Value model has not been created.");if(!this.virtualList)throw Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()}selectItem(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)}onExpandAll(e,t){let i=e=>{e.filterPasses&&e.available&&e.children&&(e.children.forEach(e=>i(e)),e.expanded=t)};i(e),this.refreshAfterExpansion()}onExpandedChanged(e,t){e.expanded=t,this.refreshAfterExpansion()}refreshAfterExpansion(){let e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)}refreshAfterSelection(){let e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)}setMiniFilter(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel?this.valueModel.getMiniFilter():null}checkAndRefreshVirtualList(){if(!this.virtualList)throw Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel?this.valueModel.getKeys():[]}getFilterValues(){return this.valueModel?this.valueModel.getValues():[]}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(e){return this.localeService.getLocaleTextFunc()(e,Od[e])}isSelectAllSelected(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;
619if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(e){let t=e=>{if(!e.children)return this.valueModel.isKeySelected(e.key);{let i=!1,s=!1;return e.children.some(e=>{if(!e.filterPasses||!e.available)return!1;let r=t(e);return void 0===r||(r?i=!0:s=!0,i&&s)})?void 0:i}};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&t(e):t(e)}destroy(){null!=this.virtualList&&(this.virtualList.destroy(),this.virtualList=null),super.destroy()}caseFormat(e){return null==e||"string"!=typeof e||this.caseSensitive?e:e.toUpperCase()}resetExpansion(){var e,t;if(!(null!=(e=this.setFilterParams)&&e.treeList))return;let i=null==(t=this.valueModel)?void 0:t.getSelectAllItem();if(this.isSetFilterModelTreeItem(i)){let e=t=>{t.children&&(t.children.forEach(t=>e(t)),t.expanded=!1)};e(i),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e,this)}getPositionableElement(){return this.eSetFilterList}},Ob=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},OS=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){let e=this.model.showAddCurrentSelectionToFilter();return this.model.getDisplayedValueCount()+(e?2:1)}getRow(e){if(0===e)return this.model.getSelectAllItem();let t=this.model.showAddCurrentSelectionToFilter();return 1===e&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-(t?2:1))}areRowsEqual(e,t){return e===t}},Ox=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&e.treeKey===t.treeKey&&e.depth===t.depth}},OM=class extends s${constructor(){super(`
620            <div class="ag-floating-filter-input ag-set-floating-filter-input" role="presentation">
621                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
622            </div>`,[aC]),this.eFloatingFilterText=s_,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new Oc}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){let t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof Ow))throw Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{let t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}},OD="32.3.9",OE={version:OD,moduleName:`${eh.SetFilterModule}-core`,userComponents:[{name:"agSetColumnFilter",classImp:Ow}],dependantModules:[I9,oo]},OI={version:OD,moduleName:eh.SetFilterModule,dependantModules:[OE,{version:OD,moduleName:"@ag-grid-enterprise/set-floating-filter",userComponents:[{name:"agSetColumnFloatingFilter",classImp:OM}],dependantModules:[OE,ol]}]};function OA(e,t="solid"){let i={solid:[],dash:[4,3],dot:[1,3],dashDot:[4,3,1,3],dashDotDot:[4,3,1,3,1,3],shortDot:[1,1],shortDash:[3,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],longDash:[8,3],longDashDot:[8,3,1,3],longDashDotDot:[8,3,1,3,1,3]},s={solid:[],dash:[3,3],dot:[0,3],dashDot:[3,3,0,3],dashDotDot:[3,3,0,3,0,3],shortDot:[0,2],shortDash:[2,2],shortDashDot:[2,2,0,2],shortDashDotDot:[2,2,0,2,0,2],longDash:[7,3],longDashDot:[7,3,0,3],longDashDotDot:[7,3,0,3,0,3]};return"round"===e||"square"===e?void 0==s[t]?(OR(t),s.solid):s[t]:void 0==i[t]?(OR(t),i.solid):i[t]}function OR(e){ep(`'${e}' is not a valid 'lineDash' option.`)}function OT(e){switch(e){case"circle":default:return Ip.Circle;case"square":return Ip.Square;case"diamond":return Ip.Diamond}}var OL=`
623.ag-sparkline-tooltip-wrapper {
624    position: absolute;
625    user-select: none;
626    pointer-events: none;
627}
628
629.ag-sparkline-tooltip {
630    position: relative;
631    font: 12px arial,sans-serif;
632    border-radius: 2px;
633    box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);
634    line-height: 1.7em;
635    overflow: hidden;
636    white-space: nowrap;
637    z-index: 99999;
638    background-color: rgb(255, 255, 255);
639    color: rgba(0,0,0, 0.67);
640}
641
642.ag-sparkline-tooltip-content {
643    padding: 0 7px;
644    opacity: 1;
645}
646
647.ag-sparkline-tooltip-title {
648    padding-left: 7px;
649    opacity: 1;
650}
651
652.ag-sparkline-tooltip-wrapper-hidden {
653    top: -10000px !important;
654}
655
656.ag-sparkline-wrapper {
657    box-sizing: border-box;
658    overflow: hidden;
659}
660`,{extent:OF,isNumber:OP,isString:Ok,isStringObject:ON,isDate:OO,createId:OG,Padding:OB}=IA,{LinearScale:Oz,BandScale:OV,TimeScale:OH}=II,{Transformable:Oj}=Ip,OW=class{constructor(){this.type="category",this.stroke="rgb(204, 214, 235)",this.strokeWidth=1}},OU=class e{constructor(){this.id=OG(this),this.seriesRect={x:0,y:0,width:0,height:0},this._context=void 0,this._container=void 0,this._data=void 0,this.padding=new OB(3),this.xKey="x",this.yKey="y",this.dataType=void 0,this.xData=[],this.yData=[],this.min=void 0,this.max=void 0,this.yScale=new Oz,this.axis=new OW,this.highlightStyle={size:6,fill:"yellow",stroke:"silver",strokeWidth:1},this._width=100,this._height=100,this.smallestInterval=void 0,this.layoutId=0,this.defaultDateFormatter=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),this._onMouseMove=this.onMouseMove.bind(this),this._onMouseOut=this.onMouseOut.bind(this);let t=new Ip.TranslatableGroup;this.rootGroup=t;let i=document.createElement("div");i.setAttribute("class","ag-sparkline-wrapper");let s=new Ip.Scene({});this.scene=s,this.canvasElement=s.canvas.element,s.setRoot(t),s.setContainer(i),this.resizeAndSetDimensions(this.width,this.height),e.tooltipDocuments.includes(document)||this.initialiseTooltipStyles(),this.setupDomEventListeners(this.canvasElement)}set context(e){this._context!==e&&(this._context=e)}get context(){return this._context}set container(e){if(this._container!==e){let{parentNode:t}=this.canvasElement;null!=t&&t.removeChild(this.canvasElement),e&&e.appendChild(this.canvasElement),this._container=e}}get container(){return this._container}set data(e){this._data!==e&&(this._data=e,this.processData(),this.mouseMoveEvent&&this.highlightedDatum&&this.updateHitPoint(this.mouseMoveEvent))}get data(){return this._data}resizeAndSetDimensions(e,t){this.scene.resize(e,t),this.seriesRect.width=e,this.seriesRect.height=t}initialiseTooltipStyles(){let t=document.createElement("style");t.innerHTML=OL,document.head.insertBefore(t,document.head.querySelector("style")),e.tooltipDocuments.push(document)}set width(e){this._width!==e&&(this._width=e,this.scene.resize(e,this.height),this.scheduleLayout())}get width(){return this._width}set height(e){this._height!==e&&(this._height=e,this.scene.resize(this.width,e),this.scheduleLayout())}get height(){return this._height}update(){}updateYScale(){this.updateYScaleRange(),this.updateYScaleDomain()}updateYScaleDomain(){}updateYScaleRange(){let{yScale:e,seriesRect:t}=this;e.range=[t.height,0]}updateXScale(){let{type:e}=this.axis;this.xScale=this.getXScale(e),this.updateXScaleRange(),this.updateXScaleDomain()}updateXScaleRange(){this.xScale.range=[0,this.seriesRect.width]}updateXScaleDomain(){let e,{xData:t,xScale:i}=this;(i instanceof Oz||i instanceof OH)&&(e=OF(t)),this.xScale.domain=e?e.slice():t}getXScale(e="category"){switch(e){case"number":return new Oz;case"time":return new OH;default:return new OV}}updateAxisLine(){}updateAxes(){this.updateYScale(),this.updateXScale(),this.updateAxisLine()}updateCrosshairs(){this.updateXCrosshairLine(),this.updateYCrosshairLine()}generateNodeData(){return[]}getNodeData(){return[]}updateNodes(){}updateXCrosshairLine(){}updateYCrosshairLine(){}highlightDatum(e){this.updateNodes()}dehighlightDatum(){this.highlightedDatum=void 0,this.updateNodes(),this.updateCrosshairs()}onMouseMove(e){this.mouseMoveEvent=e,this.updateHitPoint(e)}renderScene(){this.scene.render().catch(e=>eg("chart rendering failed",e))}updateHitPoint(e){var t,i;
660let s=this.pickClosestSeriesNodeDatum(e.offsetX,e.offsetY);if(!s)return;let r=this.highlightedDatum;this.highlightedDatum=s,(this.highlightedDatum&&!r||this.highlightedDatum&&r&&this.highlightedDatum!==r)&&(this.highlightDatum(s),this.updateCrosshairs(),this.renderScene()),(null==(t=null==(i=this.processedOptions)||null==(i=i.tooltip)?void 0:i.enabled)||t)&&this.handleTooltip(e,s)}onMouseOut(e){this.dehighlightDatum(),this.tooltip.toggle(!1),this.renderScene()}processData(){let e,{data:t,yData:i,xData:s}=this;if(!t||this.invalidData(this.data))return;i.length=0,s.length=0;let r=t.length,a=this.getDataType(t);this.dataType=a;let{type:o}=this.axis,n="number"!==o&&"time"!==o?"category":o,l="number"===n||"time"===n,h=(e,t)=>{void 0==this.smallestInterval&&(this.smallestInterval={x:1/0,y:1/0});let{x:i}=this.smallestInterval,s=Math.abs(e-t);s>0&&s<i&&(this.smallestInterval.x=s)};if("number"===a)for(let a=0;a<r;a++){let r=a,o=t[a],d=this.getDatum(r,n),u=this.getDatum(o,"number");l&&h(d,e),s.push(d),i.push(u),e=d}else if("array"===a)for(let a=0;a<r;a++){let r=t[a];if(Array.isArray(r)){let t=r[0],a=r[1],o=this.getDatum(t,n),d=this.getDatum(a,"number");if(void 0==o)continue;l&&h(o,e),s.push(o),i.push(d),e=o}}else if("object"===a){let{yKey:a,xKey:o}=this;for(let d=0;d<r;d++){let r=t[d];if("object"==typeof r&&!Array.isArray(r)){let t=r[o],d=r[a],u=this.getDatum(t,n),c=this.getDatum(d,"number");if(void 0==u)continue;l&&h(u,e),s.push(u),i.push(c),e=u}}}this.updateAxes(),this.immediateLayout()}getDataType(e){for(let t of e)if(void 0!=t){if(OP(t))return"number";else if(Array.isArray(t))return"array";else if("object"==typeof t)return"object"}}getDatum(e,t){if("number"===t&&OP(e)||"time"===t&&(OP(e)||OO(e)))return e;if("category"===t){if(Ok(e)||OO(e)||OP(e))return{toString:()=>String(e)};else if(ON(e))return e}}get layoutScheduled(){return!!this.layoutId}scheduleLayout(){this.layoutId&&cancelAnimationFrame(this.layoutId),this.layoutId=requestAnimationFrame(()=>{this.immediateLayout(),this.layoutId=0})}immediateLayout(){this.setSparklineDimensions(),this.invalidData(this.data)||(this.updateXScaleRange(),this.updateYScaleRange(),this.updateAxisLine(),this.update(),this.renderScene())}setSparklineDimensions(){let{width:e,height:t,padding:i,seriesRect:s,rootGroup:r}=this,a=e-i.left-i.right,o=t-i.top-i.bottom;s.width=a,s.height=o,s.x=i.left,s.y=i.top,r.translationX=s.x,r.translationY=s.y}pickClosestSeriesNodeDatum(e,t){let i,s=1/0,r=Oj.fromCanvasPoint(this.rootGroup,e,t),a=this.getNodeData();for(let e=0;e<a.length;e++){let t=a[e];if(!t.point)return;let o=this.getDistance(r,t.point);o<=s&&(s=o,i=t)}return i}getDistance(e,t){return Math.abs(e.x-t.x)}handleTooltip(e,t){var i,s;let{seriesDatum:r}=t,{canvasElement:a}=this,{clientX:o,clientY:n}=e,l=null==(i=this.processedOptions)?void 0:i.tooltip,h={pageX:o,pageY:n,position:{xOffset:null==l?void 0:l.xOffset,yOffset:null==l?void 0:l.yOffset},container:null==l?void 0:l.container};void 0==h.container&&(h.container=a);let d=r.y,u=r.x,c=null==(s=null==l?void 0:l.enabled)||s,p=null==l?void 0:l.renderer;if(p){let e=p({context:this.context,datum:r,yValue:d,xValue:u});c="string"!=typeof e&&void 0!==e.enabled?e.enabled:c}let g=c&&void 0!==r.y&&this.getTooltipHtml(t);g&&this.tooltip.show(h,g)}formatNumericDatum(e){return String(Math.round(10*e)/10)}formatDatum(e){let t=this.axis.type||"category";return"number"===t&&"number"==typeof e?this.formatNumericDatum(e):"time"===t&&(e instanceof Date||OP(e))?this.defaultDateFormatter.format(e):String(e)}setupDomEventListeners(e){e.addEventListener("mousemove",this._onMouseMove),e.addEventListener("mouseout",this._onMouseOut)}cleanupDomEventListeners(e){e.removeEventListener("mousemove",this._onMouseMove),e.removeEventListener("mouseout",this._onMouseOut)}invalidData(e){return!e||!Array.isArray(e)}destroy(){this.cleanupDomEventListeners(this.canvasElement),this.scene.destroy(),this.container=void 0}};OU.tooltipDocuments=[];var O_=OU;function O$(e,t){var i,s,r;let a,o;if("string"==typeof e)return e;t=null!=t?t:{};let{content:n=null!=(i=t.content)?i:"",title:l=null!=(s=t.title)?s:void 0,color:h=t.color,backgroundColor:d=t.backgroundColor,opacity:u=null!=(r=t.opacity)?r:1}=e;h?(a=l?`<span class="${OY}-title"; style="color: ${h}">${l}</span>`:"",o=`<span class="${OY}-content" style="color: ${h}">${n}</span>`):(a=l?`<span class="${OY}-title">${l}</span>`:"",o=`<span class="${OY}-content">${n}</span>`);let c=`opacity: ${u}`;return d&&(c+=`; background-color: ${d.toLowerCase()}`),`<div class="${OY}" style="${c}">
661                ${a}
662                ${o}
663            </div>`}var OY="ag-sparkline-tooltip",OK=class{constructor(){this.created=!1,this.element=document.createElement("div")}isVisible(){let{element:e}=this;if(e.classList)return!e.classList.contains(`${OY}-wrapper-hidden`);let t=e.getAttribute("class");return!!t&&0>t.split(" ").indexOf(`${OY}-wrapper-hidden`)}updateClass(e){this.created||(document.body.appendChild(this.element),this.created=!0);let t=[`${OY}-wrapper`];!0!==e&&t.push(`${OY}-wrapper-hidden`),this.element.setAttribute("class",t.join(" "))}show(e,t){var i,s,r,a;this.toggle(!1);let{element:o}=this;if(void 0!==t)o.innerHTML=t;else if(!o.innerHTML)return;let n=null!=(i=null==(s=e.position)?void 0:s.xOffset)?i:10,l=null!=(r=null==(a=e.position)?void 0:a.yOffset)?r:0,h=e.pageX+n,d=e.pageY+l,u=o.getBoundingClientRect(),c=window.innerWidth-u.width;if(e.container){let t=e.container.getBoundingClientRect();c=t.left+(t.width-u.width)}h>c&&(h=e.pageX-o.clientWidth-n),"u">
663typeof scrollX&&(h+=scrollX),"u">typeof scrollY&&(d+=scrollY),o.style.left=`${Math.round(h)}px`,o.style.top=`${Math.round(d)}px`,this.toggle(!0)}toggle(e){this.updateClass(e)}destroy(){let{parentNode:e}=this.element;e&&e.removeChild(this.element)}},{extent:OZ}=IA,{BandScale:Oq}=II,OQ=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},OX=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},OJ=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},O0=class extends O_{constructor(){super(),this.fill="rgba(124, 181, 236, 0.25)",this.strokePath=new Ip.Path,this.fillPath=new Ip.Path,this.xCrosshairLine=new Ip.Line,this.yCrosshairLine=new Ip.Line,this.areaSparklineGroup=new Ip.Group,this.xAxisLine=new Ip.Line,this.markers=new Ip.Group,this.markerSelection=Ip.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new OQ,this.line=new OX,this.crosshairs=new OJ,this.rootGroup.append(this.areaSparklineGroup),this.xAxisLine.zIndex=500,this.fillPath.zIndex=50,this.strokePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.areaSparklineGroup.append([this.fillPath,this.xAxisLine,this.strokePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}markerFactory(){let{shape:e}=this.marker;return new(OT(e))}getNodeData(){return this.markerSelectionData}update(){let e=this.generateNodeData();if(!e)return;let{nodeData:t,fillData:i,strokeData:s}=e;this.markerSelectionData=t,this.updateSelection(t),this.updateNodes(),this.updateStroke(s),this.updateFill(i)}updateYScaleDomain(){let{yData:e,yScale:t}=this,i=OZ(e),s=0,r=1;null!=i&&(s=this.min=i[0],r=this.max=i[1]),t.domain=[s=s<0?s:0,r=r<0?0:r]}generateNodeData(){let e,t,i,s,{data:r,yData:a,xData:o,xScale:n,yScale:l}=this;if(!r)return;let h=!(n instanceof Oq),d=h?0:n.bandwidth/2,u=a.length,c=[],p=[],g=[],m=l.convert(0);for(let r=0;r<u;r++){let v=a[r],f=o[r],C=n.convert(h?n.toDomain(f):f)+d,y=void 0===v?0/0:l.convert(v);r+1<u&&(s=n.convert(h?n.toDomain(o[r+1]):o[r+1])+d),g.push({seriesDatum:{x:f,y:v},point:{x:C,y}}),void 0===v&&void 0!==i?(p.push({seriesDatum:void 0,point:{x:i,y:m}}),void 0!==s&&p.push({seriesDatum:void 0,point:{x:s,y:m}})):void 0!==v&&(p.push({seriesDatum:{x:f,y:v},point:{x:C,y}}),c.push({seriesDatum:{x:f,y:v},point:{x:C,y}}),e=void 0!==e?e:C,t=C),i=C}return p.push({seriesDatum:void 0,point:{x:t,y:m}},{seriesDatum:void 0,point:{x:e,y:m}}),{nodeData:c,fillData:p,strokeData:g}}updateAxisLine(){let{xScale:e,yScale:t,axis:{stroke:i,strokeWidth:s},xAxisLine:r}=this,a=t.convert(0);r.x1=e.range[0],r.x2=e.range[1],r.y1=r.y2=a,r.stroke=i,r.strokeWidth=s}updateSelection(e){this.markerSelection.update(e)}updateNodes(){let{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:s,fill:r,stroke:a,strokeWidth:o}=t,n=i.formatter;this.markerSelection.each((t,l,h)=>{let d,{point:u,seriesDatum:c}=l;if(!u)return;let p=l===e,g=p&&void 0!==r?r:i.fill,m=p&&void 0!==a?a:i.stroke,v=p&&void 0!==o?o:i.strokeWidth,f=p&&void 0!==s?s:i.size;if(n){let e=h===this.markerSelectionData.length-1,t=c.y===this.min,i=c.y===this.max;d=n({datum:l,xValue:c.x,yValue:c.y,min:t,max:i,first:0===h,last:e,fill:g,stroke:m,strokeWidth:v,size:f,highlighted:p})}t.size=d&&void 0!=d.size?d.size:f,t.fill=d&&void 0!=d.fill?d.fill:g,t.stroke=d&&void 0!=d.stroke?d.stroke:m,t.strokeWidth=d&&void 0!=d.strokeWidth?d.strokeWidth:v,t.translationX=u.x,t.translationY=u.y,t.visible=d&&void 0!=d.enabled?d.enabled:i.enabled&&t.size>0})}updateStroke(e){let{strokePath:t,yData:i,line:s}=this,r=t.path;if(r.clear(),i.length<2)return;let a=e.length,o=!0;for(let t=0;t<a;t++){let{point:i,seriesDatum:s}=e[t],a=i.x,n=i.y;void 0==s.y?o=!0:o?(r.moveTo(a,n),o=!1):r.lineTo(a,n)}t.lineJoin=t.lineCap="round",t.fill=void 0,t.stroke=s.stroke,t.strokeWidth=s.strokeWidth}updateFill(e){let{fillPath:t,yData:i,fill:s}=this,r=t.path,a=e.length;if(r.clear(),!(i.length<2)){for(let t=0;t<a;t++){let{point:i}=e[t],s=i.x,a=i.y;t>0?r.lineTo(s,a):r.moveTo(s,a)}r.closePath(),t.lineJoin="round",t.stroke=void 0,t.fill=s}}updateXCrosshairLine(){var e;let{yScale:t,xCrosshairLine:i,highlightedDatum:s,crosshairs:{xLine:r}}=this;if(!r.enabled||void 0==s){i.strokeWidth=0;return}i.y1=t.range[0],i.y2=t.range[1],i.x1=i.x2=s.point.x,i.stroke=r.stroke,i.strokeWidth=null!=(e=r.strokeWidth)?e:1,i.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;let{lineDash:a}=r;i.lineDash=Array.isArray(a)?a:OA(i.lineCap,r.lineDash)}updateYCrosshairLine(){var e;let{xScale:t,yCrosshairLine:i,highlightedDatum:s,crosshairs:{yLine:r}}=this;if(!r.enabled||void 0==s){i.strokeWidth=0;return}i.x1=t.range[0],i.x2=t.range[1],i.y1=i.y2=s.point.y,i.stroke=r.stroke,i.strokeWidth=null!=(e=r.strokeWidth)?e:1,i.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;let{lineDash:a}=r;i.lineDash=Array.isArray(a)?a:OA(i.lineCap,r.lineDash)}getTooltipHtml(e){var t;let{dataType:i}=this,{seriesDatum:s}=e,r=s.y,a=s.x,o={content:this.formatNumericDatum(r),title:"array"===i||"object"===i?this.formatDatum(a):void 0},n=null==(t=this.processedOptions)||null==(t=t.tooltip)?void 0:t.renderer;return n?O$(n({context:this.context,datum:s,yValue:r,xValue:a}),o):O$(o)}},O1=class{constructor(){this.enabled=!0,this.fontSize=8,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"}},{extent:O2}=IA,O3=class extends O1{constructor(){super(...arguments),this.formatter=void 0,this.placement="insideEnd"}},O4=class extends O_{constructor(){super(),this.fill="rgb(124, 181, 236)",this.stroke="silver",this.strokeWidth=0,this.paddingInner=.1,this.paddingOuter=.2,this.valueAxisDomain=void 0,this.formatter=void 0,this.axisLine=new Ip.Line,this.bandWidth=0,this.sparklineGroup=new Ip.Group,this.rectGroup=new Ip.Group,this.labelGroup=new Ip.Group,this.rectSelection=Ip.Selection.select(this.rectGroup,Ip.Rect),this.labelSelection=Ip.Selection.select(this.labelGroup,Ip.Text),this.nodeSelectionData=[],this.label=new O3,this.rootGroup.append(this.sparklineGroup),this.rectGroup.zIndex=50,this.axisLine.zIndex=500,this.labelGroup.zIndex=1500,this.sparklineGroup.append([this.rectGroup,this.axisLine,this.labelGroup]),this.axisLine.lineCap="round",this.label.enabled=!1}getNodeData(){return this.nodeSelectionData}update(){this.updateSelections(),this.updateNodes()}updateSelections(){let e=this.generateNodeData();e&&(this.nodeSelectionData=e,this.updateRectSelection(e),this.updateLabelSelection(e))}updateNodes(){this.updateRectNodes(),this.updateLabelNodes()}calculateStep(e){var t;let{xScale:i,paddingInner:s,paddingOuter:r,smallestInterval:a}=this,o=Math.min((i.domain[1]-i.domain[0])/(null!=(t=null==a?void 0:a.x)?t:1)+1,50);return e/Math.max(1,2*r+(o-1)*s+o)}updateYScaleDomain(){let{yScale:e,yData:t,valueAxisDomain:i}=this,s=O2(t),r=0,a=1;null!=s&&(r=this.min=s[0],a=this.max=s[1]),r=r<0?r:0,a=a<0?0:a,i&&(i[1]<a&&(i[1]=a),i[0]>r&&(i[0]=r)),e.domain=i||[r,a]}updateRectSelection(e){this.rectSelection.update(e)}updateRectNodes(){let{highlightedDatum:e,formatter:t,fill:i,stroke:s,strokeWidth:r}=this,{fill:a,stroke:o,strokeWidth:n}=this.highlightStyle;this.rectSelection.each((l,h,d)=>{let u,c=h===e,p=c&&void 0!==a?a:i,g=c&&void 0!==o?o:s,m=c&&void 0!==n?n:r,{x:v,y:f,width:C,height:y,seriesDatum:w}=h;if(t){let e=d===this.nodeSelectionData.length-1,i=w.y===this.min,s=w.y===this.max;u=t({datum:h,xValue:w.x,yValue:w.y,width:C,height:y,min:i,max:s,first:0===d,last:e,fill:p,stroke:g,strokeWidth:m,highlighted:c})}l.fill=u&&u.fill||p,l.stroke=u&&u.stroke||g,l.strokeWidth=u&&u.strokeWidth||m,l.x=v,l.y=f,l.width=C,l.height=y,l.visible=l.height>0})}updateLabelSelection(e){this.labelSelection.update(e,e=>{e.tag=1,e.pointerEvents=Ip.PointerEvents.None})}updateLabelNodes(){let{label:{enabled:e,fontStyle:t,fontWeight:i,fontSize:s,fontFamily:r,color:a}}=this;this.labelSelection.each((o,n)=>{let l=n.label;l&&e?(o.fontStyle=t,o.fontWeight=i,o.fontSize=s,o.fontFamily=r,o.textAlign=l.textAlign,o.textBaseline=l.textBaseline,o.text=l.text,o.x=l.x,o.y=l.y,o.fill=a,o.visible=!0):o.visible=!1})}getTooltipHtml(e){var t;let{dataType:i}=this,{seriesDatum:s}=e,r=s.y,a=s.x,o={content:this.formatNumericDatum(r),title:"array"===i||"object"===i?this.formatDatum(a):void 0},n=null==(t=this.processedOptions)||null==(t=t.tooltip)?void 0:t.renderer;return n?O$(n({context:this.context,datum:s,yValue:r,xValue:a}),o):O$(o)}formatLabelValue(e){return e%1!=0?e.toFixed(1):e.toFixed(0)}},{isNumber:O6}=IA,{BandScale:O5}=II,O8=class extends O4{updateYScaleRange(){let{seriesRect:e,yScale:t}=this;t.range=[0,e.width]}updateXScaleRange(){let{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:s}=this;if(e instanceof O5)e.range=[0,t.height],e.paddingInner=s,e.paddingOuter=i;else{let r=this.calculateStep(t.height),a=r*i;this.bandWidth=r*(1-s),e.range=[a,t.height-a-this.bandWidth]}}updateAxisLine(){let{yScale:e,axis:{stroke:t,strokeWidth:i}
663,axisLine:s,seriesRect:r}=this;s.x1=s.x2=e.convert(0),s.y1=0,s.y2=r.height,s.stroke=t,s.strokeWidth=i+ +(i%2==1)}generateNodeData(){let{data:e,yData:t,xData:i,xScale:s,yScale:r,fill:a,stroke:o,strokeWidth:n,label:l}=this;if(!e)return;let{fontStyle:h,fontWeight:d,fontSize:u,fontFamily:c,color:p,formatter:g,placement:m}=l,v=[],f=r.convert(0),C=!(s instanceof O5);for(let e=0,l=t.length;e<l;e++){let l,y,w,b=t[e],S=i[e],x=void 0===b;x&&(b=0);let M=s.convert(C?s.toDomain(S):S),D=Math.min(void 0===b?0/0:r.convert(b),f),E=Math.max(void 0===b?0/0:r.convert(b),f),I=C?this.bandWidth:s.bandwidth,A=E-D,R={x:f,y:M};l=g?g({value:b}):void 0!==b&&O6(b)?this.formatLabelValue(b):"";let T=M+I/2,L=void 0!==b&&b>=0;if("center"===m)y=D+A/2,w="center";else if("outsideEnd"===m)y=D+(L?A+4:-4),w=L?"start":"end";else if("insideEnd"===m){y=D+(L?A-4:4),w=L?"end":"start";let e=IR.CachedTextMeasurerPool.measureText(l,{font:c}).width||20,t=f+e,i=f-e;(L&&y<t||!L&&y>i)&&(y=f+4*(L?1:-1),w=L?"start":"end")}else y=f+4*(L?1:-1),w=L?"start":"end";v.push({x:D,y:M,width:A,height:I,fill:a,stroke:o,strokeWidth:n,seriesDatum:{x:S,y:x?void 0:b},point:R,label:{x:y,y:T,text:l,fontStyle:h,fontWeight:d,fontSize:u,fontFamily:c,textAlign:w,textBaseline:"middle",fill:p}})}return v}getDistance(e,t){return Math.abs(e.y-t.y)}},{isNumber:O7}=IA,{BandScale:O9}=II,Ge=class extends O4{updateYScaleRange(){let{seriesRect:e,yScale:t}=this;t.range=[e.height,0]}updateXScaleRange(){let{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:s}=this;if(e instanceof O9)e.range=[0,t.width],e.paddingInner=s,e.paddingOuter=i;else{let r=this.calculateStep(t.width),a=r*i;this.bandWidth=r*(1-s),e.range=[a,t.width-a-this.bandWidth]}}updateAxisLine(){let{yScale:e,axis:{stroke:t,strokeWidth:i},axisLine:s,seriesRect:r}=this,a=e.convert(0);s.x1=0,s.x2=r.width,s.y1=s.y2=a,s.stroke=t,s.strokeWidth=i+ +(i%2==1)}generateNodeData(){let{data:e,yData:t,xData:i,xScale:s,yScale:r,fill:a,stroke:o,strokeWidth:n,label:l}=this;if(!e)return;let{fontStyle:h,fontWeight:d,fontSize:u,fontFamily:c,color:p,formatter:g,placement:m}=l,v=[],f=r.convert(0),C=!(s instanceof O9);for(let e=0,l=t.length;e<l;e++){let l,y,w,b=t[e],S=i[e],x=void 0===b;x&&(b=0);let M=Math.min(void 0===b?0/0:r.convert(b),f),D=s.convert(C?s.toDomain(S):S),E=Math.max(void 0===b?0/0:r.convert(b),f),I=C?this.bandWidth:s.bandwidth,A=E-M,R={x:D+I/2,y:f};l=g?g({value:b}):void 0!==b&&O7(b)?this.formatLabelValue(b):"";let T=D+I/2,L=void 0!==b&&b>=0;if("center"===m)y=M+A/2,w="middle";else if("outsideEnd"===m)y=M+(L?-2:A+2),w=L?"bottom":"top";else if("insideEnd"===m){y=M+(L?2:A-2),w=L?"top":"bottom";let e=IR.CachedTextMeasurerPool.measureText(l,{font:c}).height||10,t=f-e,i=f+e;(L&&y>t||!L&&y<i)&&(y=f+2*(L?-1:1),w=L?"bottom":"top")}else y=f+2*(L?-1:1),w=L?"bottom":"top";v.push({x:D,y:M,width:I,height:A,fill:a,stroke:o,strokeWidth:n,seriesDatum:{x:S,y:x?void 0:b},point:R,label:{x:T,y:y,text:l,fontStyle:h,fontWeight:d,fontSize:u,fontFamily:c,textAlign:"center",textBaseline:w,fill:p}})}return v}},{extent:Gt}=IA,{BandScale:Gi}=II,Gs=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},Gr=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},Ga=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},Go=class extends O_{constructor(){super(),this.linePath=new Ip.Path,this.xCrosshairLine=new Ip.Line,this.yCrosshairLine=new Ip.Line,this.lineSparklineGroup=new Ip.Group,this.markers=new Ip.Group,this.markerSelection=Ip.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new Gs,this.line=new Gr,this.crosshairs=new Ga,this.rootGroup.append(this.lineSparklineGroup),this.linePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.lineSparklineGroup.append([this.linePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}getNodeData(){return this.markerSelectionData}markerFactory(){let{shape:e}=this.marker;return new(OT(e))}onMarkerShapeChange(){this.markerSelection=this.markerSelection.clear(),this.scheduleLayout()}update(){let e=this.generateNodeData();e&&(this.markerSelectionData=e,this.updateSelection(e),this.updateNodes(),this.updateLine()
663)}updateYScaleDomain(){let{yData:e,yScale:t}=this,i=Gt(e),s=0,r=1;if(null!=i&&(s=this.min=i[0],r=this.max=i[1]),s===r){let e=Math.abs(.01*s);s-=e,r+=e}t.domain=[s,r]}generateNodeData(){let{data:e,yData:t,xData:i,xScale:s,yScale:r}=this;if(!e)return;let a=!(s instanceof Gi),o=a?0:s.bandwidth/2,n=[];for(let e=0;e<t.length;e++){let l=t[e],h=i[e];if(void 0==l)continue;let d=s.convert(a?s.toDomain(h):h)+o,u=void 0===l?0/0:r.convert(l);n.push({seriesDatum:{x:h,y:l},point:{x:d,y:u}})}return n}updateSelection(e){this.markerSelection.update(e)}updateNodes(){let{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:s,fill:r,stroke:a,strokeWidth:o}=t,n=i.formatter;this.markerSelection.each((t,l,h)=>{let d,u=l===e,c=u&&void 0!==r?r:i.fill,p=u&&void 0!==a?a:i.stroke,g=u&&void 0!==o?o:i.strokeWidth,m=u&&void 0!==s?s:i.size,{seriesDatum:v,point:f}=l;if(n){let e=h===this.markerSelectionData.length-1,t=v.y===this.min,i=v.y===this.max;d=n({datum:l,xValue:v.x,yValue:v.y,min:t,max:i,first:0===h,last:e,fill:c,stroke:p,strokeWidth:g,size:m,highlighted:u})}t.size=d&&void 0!=d.size?d.size:m,t.fill=d&&void 0!=d.fill?d.fill:c,t.stroke=d&&void 0!=d.stroke?d.stroke:p,t.strokeWidth=d&&void 0!=d.strokeWidth?d.strokeWidth:g,t.translationX=f.x,t.translationY=f.y,t.visible=d&&void 0!=d.enabled?d.enabled:i.enabled&&t.size>0})}updateLine(){let{linePath:e,yData:t,xData:i,xScale:s,yScale:r,line:a}=this,o=e.path;if(o.clear(),t.length<2)return;let n=!(s instanceof Gi),l=t.length,h=n?0:s.bandwidth/2,d=!0;for(let e=0;e<l;e++){let a=i[e],l=t[e],u=s.convert(n?s.toDomain(a):a)+h,c=void 0===l?0/0:r.convert(l);void 0==l?d=!0:d?(o.moveTo(u,c),d=!1):o.lineTo(u,c)}e.fill=void 0,e.stroke=a.stroke,e.strokeWidth=a.strokeWidth}updateXCrosshairLine(){var e;let{yScale:t,xCrosshairLine:i,highlightedDatum:s,crosshairs:{xLine:r}}=this;if(!r.enabled||void 0==s){i.strokeWidth=0;return}i.y1=t.range[0],i.y2=t.range[1],i.x1=i.x2=s.point.x,i.stroke=r.stroke,i.strokeWidth=null!=(e=r.strokeWidth)?e:1,i.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;let{lineDash:a}=r;i.lineDash=Array.isArray(a)?a:OA(i.lineCap,r.lineDash)}updateYCrosshairLine(){var e;let{xScale:t,yCrosshairLine:i,highlightedDatum:s,crosshairs:{yLine:r}}=this;if(!r.enabled||void 0==s){i.strokeWidth=0;return}i.x1=t.range[0],i.x2=t.range[1],i.y1=i.y2=s.point.y,i.stroke=r.stroke,i.strokeWidth=null!=(e=r.strokeWidth)?e:1,i.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;let{lineDash:a}=r;i.lineDash=Array.isArray(a)?a:OA(i.lineCap,r.lineDash)}getTooltipHtml(e){var t;let{dataType:i}=this,{seriesDatum:s}=e,r=s.y,a=s.x,o={content:this.formatNumericDatum(r),title:"array"===i||"object"===i?this.formatDatum(a):void 0},n=null==(t=this.processedOptions)||null==(t=t.tooltip)?void 0:t.renderer;return n?O$(n({context:this.context,datum:s,yValue:r,xValue:a}),o):O$(o)}},{isNumber:Gn}=IA,Gl=class{static create(e,t){var i,s,r,a,o,n,l,h;let d=function(e="line"){switch(e){case"column":return new Ge;case"bar":return new O8;case"area":return new O0;default:return new Go}}((e=IA.deepClone(e)).type);return t&&(d.tooltip=t),Gm(i=d,"context",(s=e).context,s),Gm(i,"width",s.width,s),Gm(i,"height",s.height,s),Gm(i,"container",s.container,s),Gm(i,"xKey",s.xKey,s),Gm(i,"yKey",s.yKey,s),s.padding&&(r=i.padding,Gm(r,"top",(a=s.padding).top,a),Gm(r,"right",a.right,a),Gm(r,"bottom",a.bottom,a),Gm(r,"left",a.left,a)),s.axis&&(o=i.axis,Gm(o,"type",(n=s.axis).type,n),Gm(o,"stroke",n.stroke,n),Gm(o,"strokeWidth",n.strokeWidth,n)),s.highlightStyle&&(l=i.highlightStyle,Gm(l,"fill",(h=s.highlightStyle).fill,h),Gm(l,"size",h.size,h),Gm(l,"stroke",h.stroke,h),Gm(l,"strokeWidth",h.strokeWidth,h)),function(e,t){var i,s,r,a,o,n,l,h;switch(t.type){case"bar":case"column":Gm(i=e,"valueAxisDomain",(s=t).valueAxisDomain,s),Gm(i,"fill",s.fill,s),Gm(i,"stroke",s.stroke,s),Gm(i,"strokeWidth",s.strokeWidth,s),Gm(i,"paddingInner",s.paddingInner,s),Gm(i,"paddingOuter",s.paddingOuter,s),Gm(i,"formatter",s.formatter,s),s.label&&(r=i.label,Gm(r,"enabled",(a=s.label).enabled,a),Gm(r,"fontStyle",a.fontStyle,a),Gm(r,"fontWeight",a.fontWeight,a),Gm(r,"fontSize",a.fontSize,a),Gm(r,"fontFamily",a.fontFamily,a),Gm(r,"textAlign",a.textAlign,a),Gm(r,"textBaseline",a.textBaseline,a),Gm(r,"color",a.color,a),Gm(r,"formatter",a.formatter,a),Gm(r,"placement",a.placement,a));break;case"area":Gm(o=e,"fill",(n=t).fill,n),n.marker&&Gh(o.marker,n.marker),n.line&&Gd(o.line,n.line),n.crosshairs&&Gu(o.crosshairs,n.crosshairs);break;default:l=e,(h=t).marker&&Gh(l.marker,h.marker),h.line&&Gd(l.line,h.line),h.crosshairs&&Gu(l.crosshairs,h.crosshairs)}}(d,e),e.data&&(d.data=e.data),d.processedOptions=e,d}};function Gh(e,t){Gm(e,"enabled",t.enabled,t),Gm(e,"size",t.size,t),Gm(e,"shape",t.shape,t),Gm(e,"fill",t.fill,t),Gm(e,"stroke",t.stroke,t),Gm(e,"strokeWidth",t.strokeWidth,t),Gm(e,"formatter",t.formatter,t)}function Gd(e,t){Gm(e,"stroke",t.stroke,t),Gm(e,"strokeWidth",t.strokeWidth,t)}function Gu(e,t){e.xLine&&t.xLine&&Gc(e.xLine,t.xLine),e.yLine&&t.yLine&&Gc(e.yLine,t.yLine)}function Gc(e,t){Gm(e,"enabled",t.enabled,t),Gm(e,"stroke",t.stroke,t),Gm(e,"strokeWidth",t.strokeWidth,t),Gm(e,"lineDash",t.lineDash,t),Gm(e,"lineCap",t.lineCap,t)}var Gp=(e,t,i)=>!!Gn(t)||(ep(`${e} must be a number, the value you provided is not a valid number. Using the default of ${i}px.`),!1),Gg={xOffset:Gp,yOffset:Gp};function Gm(e,t,i,s){if(t in s)if(t in e){let s=Gg[t];(!s||s(t,i,e[t]))&&e[t]!==i&&(e[t]=i)}else ep(`Property ${t} does not exist on the target object.`)}var Gv=class extends s${constructor(){super(`<div class="ag-sparkline-wrapper">
664            <span data-ref="eSparkline"></span>
665        </div>`),this.eSparkline=s_}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.sparklineTooltipSingleton=e.sparklineTooltipSingleton}init(e){let t=!0,i=()=>{let{clientWidth:i,clientHeight:s}=this.getGui();if(0!==i&&0!==s)if(t){let r={data:e.value,width:i,height:s,context:{data:e.data},...e.sparklineOptions};this.sparkline=Gl.create(r,this.sparklineTooltipSingleton.getSparklineTooltip()),this.eSparkline.appendChild(this.sparkline.canvasElement),t=!1}else this.sparkline.width=i,this.sparkline.height=s},s=this.resizeObserverService.observeResize(this.getGui(),i);this.addDestroyFunc(()=>s())}refresh(e){return!!this.sparkline&&(this.sparkline.data=e.value,this.sparkline.context={data:e.data},!0)}destroy(){this.sparkline&&this.sparkline.destroy(),super.destroy()}},Gf=class extends tk{constructor(){super(...arguments),this.beanName="sparklineTooltipSingleton"}postConstruct(){this.tooltip=new OK}getSparklineTooltip(){return this.tooltip}destroy(){this.tooltip&&this.tooltip.destroy(),super.destroy()}},GC={version:"32.3.9",moduleName:eh.SparklinesModule,beans:[Gf],userComponents:[{name:"agSparklineCellRenderer",classImp:Gv}],dependantModules:[I9]},Gy=class extends s${constructor(){super(`<div class="ag-status-name-value">
666            <span data-ref="eLabel"></span>:&nbsp;
667            <span data-ref="eValue" class="ag-status-name-value-value"></span>
668        </div>`),this.eLabel=s_,this.eValue=s_}setLabel(e,t){this.setDisplayed(!1);let i=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=i(e,t)}setValue(e){this.eValue.innerHTML=e}},Gw={selector:"AG-NAME-VALUE",component:Gy},Gb=class extends s${constructor(){super(`<div class="ag-status-panel ag-status-panel-aggregations">
669            <ag-name-value data-ref="avgAggregationComp"></ag-name-value>
670            <ag-name-value data-ref="countAggregationComp"></ag-name-value>
671            <ag-name-value data-ref="minAggregationComp"></ag-name-value>
672            <ag-name-value data-ref="maxAggregationComp"></ag-name-value>
673            <ag-name-value data-ref="sumAggregationComp"></ag-name-value>
674        </div>`,[Gw]),this.sumAggregationComp=s_,this.countAggregationComp=s_,this.minAggregationComp=s_,this.maxAggregationComp=s_,this.avgAggregationComp=s_}wireBeans(e){this.valueService=e.valueService,this.cellNavigationService=e.cellNavigationService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.rangeService=e.rangeService}destroy(){super.destroy()}postConstruct(){eN(this.gos)||eO(this.gos)?(this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedEventListeners({cellSelectionChanged:this.onCellSelectionChanged.bind(this),modelUpdated:this.onCellSelectionChanged.bind(this)})):ep("agAggregationComponent should only be used with the client and server side row model.")}init(e){this.refresh(e)}refresh(e){return this.params=e,this.onCellSelectionChanged(),!0}setAggregationComponentValue(e,t,i){let s=this.getAllowedAggregationValueComponent(e);if(eM(s)&&s){let e=this.localeService.getLocaleTextFunc(),r=e("thousandSeparator",","),a=e("decimalSeparator",".");s.setValue(aP(t,r,a)),s.setDisplayed(i)}else{var r;null==(r=this.getAggregationValueComponent(e))||r.setDisplayed(!1)}}getAllowedAggregationValueComponent(e){let{aggFuncs:t}=this.params;return!t||t.includes(e)?this.getAggregationValueComponent(e):null}getAggregationValueComponent(e){return this[`${e}AggregationComp`]}onCellSelectionChanged(){var e;let t=null==(e=this.rangeService)?void 0:e.getCellRanges(),i=0,s=0,r=0,a=null,o=null,n={};if(t&&!eE(t)&&this.rangeService)for(let e=0;e<t.length;e++){let l=t[e],h=this.rangeService.getRangeStartRow(l),d=this.rangeService.getRangeEndRow(l);for(;!(eD(h)||!h||this.rowPositionUtils.before(d,h))&&h&&l.columns;)l.columns.forEach(e=>{if(null===h)return;let t=this.cellPositionUtils.createId({rowPinned:h.rowPinned,column:e,rowIndex:h.rowIndex});if(n[t])return;n[t]=!0;let l=this.rowPositionUtils.getRowNode(h);if(eD(l))return;let d=this.valueService.getValue(e,l);if(!eD(d)&&""!==d){if(s++,"object"==typeof d&&"value"in d&&""===(d=d.value))return;"string"==typeof d&&(d=Number(d)),"number"==typeof d&&!isNaN(d)&&(i+=d,(null===o||d>o)&&(o=d),(null===a||d<a)&&(a=d),r++)}}),h=this.cellNavigationService.getRowBelow(h)}let l=s>1,h=r>1;this.setAggregationComponentValue("count",s,l),this.setAggregationComponentValue("sum",i,h),this.setAggregationComponentValue("min",a,h),this.setAggregationComponentValue("max",o,h),this.setAggregationComponentValue("avg",i/r,h)}},GS=class extends Gy{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){if(this.setLabel("filteredRows","Filtered"),!eN(this.gos))return void ep("agFilteredRowCountComponent should only be used with the client side row model.");this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);let e=this.onDataChanged.bind(this);this.addManagedEventListeners({modelUpdated:e}),e()}onDataChanged(){let e=this.getTotalRowCountValue(),t=this.getFilteredRowCountValue(),i=this.localeService.getLocaleTextFunc(),s=i("thousandSeparator",","),r=i("decimalSeparator",".");this.setValue(ak(t,s,r)),this.setDisplayed(e!==t)}getTotalRowCountValue(){let e=0;return this.rowModel.forEachNode(()=>e+=1),e}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter(t=>{t.group||(e+=1)}),e}init(){}refresh(){return!0}destroy(){super.destroy()}},Gx=class extends Gy{wireBeans(e){this.selectionService=e.selectionService}postConstruct(){if(!eN(this.gos)&&!eO(this.gos))return void ep("agSelectedRowCountComponent should only be used with the client and server side row model.");this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();let e=this.onRowSelectionChanged.bind(this);this.addManagedEventListeners({modelUpdated:e,selectionChanged:e})}onRowSelectionChanged(){let e=this.selectionService.getSelectionCount();if(e<0){this.setValue("?"),this.setDisplayed(!0);return}let t=this.localeService.getLocaleTextFunc(),i=t("thousandSeparator",","),s=t("decimalSeparator",".");this.setValue(ak(e,i,s)),this.setDisplayed(e>0)}init(){}refresh(){return!0}destroy(){super.destroy()}},GM=class extends Gy{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){eN(this.gos)?(this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)}),this.onDataChanged()):ep("agTotalAndFilteredRowCountComponent should only be used with the client side row model.")}onDataChanged(){let e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator","."),s=ak(this.getFilteredRowCountValue(),t,i),r=ak(this.getTotalRowCount(),t,i);if(s===r)this.setValue(s);else{let e=this.localeService.getLocaleTextFunc();this.setValue(`${s} ${e("of","of")} ${r}`)}}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter(t=>{!t.group&&e++}),e}getTotalRowCount(){let e=0;return this.rowModel.forEachNode(t=>{!t.group&&e++}),e}init(){}refresh(){return!0}destroy(){super.destroy()}},GD=class extends Gy{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){(this.setLabel("totalRows","Total Rows"),eN(this.gos))?(this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)}),this.onDataChanged()):ep("agTotalRowCountComponent should only be used with the client side row model.")}onDataChanged(){let e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator",".");this.setValue(ak(this.getRowCountValue(),t,i))}getRowCountValue(){let e=0;return this.rowModel.forEachLeafNode(()=>e+=1),e}init(){}refresh(){return!0}destroy(){super.destroy()}},GE={selector:"AG-STATUS-BAR",component:class extends s${constructor(){super(`<div class="ag-status-bar">
675            <div data-ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>
676            <div data-ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>
677            <div data-ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>
678        </div>`),this.updateQueued=!1,this.panelsPromise=rm.resolve(),this.eStatusBarLeft=s_,this.eStatusBarCenter=s_,this.eStatusBarRight=s_,this.compDestroyFunctions={}}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.statusBarService=e.statusBarService}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))}processStatusPanels(e){var t;let i=null==(t=this.gos.get("statusBar"))?void 0:t.statusPanels;if(i){let t=i.filter(e=>
678"left"===e.align),s=i.filter(e=>"center"===e.align),r=i.filter(e=>!e.align||"right"===e.align);this.panelsPromise=rm.all([this.createAndRenderComponents(t,this.eStatusBarLeft,e),this.createAndRenderComponents(s,this.eStatusBarCenter,e),this.createAndRenderComponents(r,this.eStatusBarRight,e)])}else this.setDisplayed(!1)}handleStatusBarChanged(){this.updateQueued||(this.updateQueued=!0,this.panelsPromise.then(()=>{this.updateStatusBar(),this.updateQueued=!1}))}updateStatusBar(){var e;let t=null==(e=this.gos.get("statusBar"))?void 0:e.statusPanels,i=Array.isArray(t)&&t.length>0;this.setDisplayed(i);let s=new Map;i&&t.forEach(e=>{var t,i;let r=null!=(t=e.key)?t:e.statusPanel,a=this.statusBarService.getStatusPanel(r);if(null!=a&&a.refresh){let t=this.gos.addGridCommonParams(null!=(i=e.statusPanelParams)?i:{});a.refresh(t)&&(s.set(r,a),delete this.compDestroyFunctions[r],sv(a.getGui()))}}),this.resetStatusBar(),i&&this.processStatusPanels(s)}resetStatusBar(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()}destroy(){this.destroyComponents(),super.destroy()}destroyComponents(){Object.values(this.compDestroyFunctions).forEach(e=>e()),this.compDestroyFunctions={}}createAndRenderComponents(e,t,i){let s=[];return e.forEach(e=>{let t,r=e.key||e.statusPanel,a=i.get(r);if(a)t=rm.resolve(a);else if(null==(t=this.userComponentFactory.getStatusPanelCompDetails(e,{}).newAgStackInstance()))return;s.push({key:r,promise:t})}),rm.all(s.map(e=>e.promise)).then(()=>{s.forEach(e=>{e.promise.then(i=>{let s=()=>{this.destroyBean(i)};this.isAlive()?(this.statusBarService.registerStatusPanel(e.key,i),t.appendChild(i.getGui()),this.compDestroyFunctions[e.key]=s):s()})})})}}},GI=class extends tk{constructor(){super(),this.beanName="statusBarService",this.allComponents=new Map}registerStatusPanel(e,t){this.allComponents.set(e,t)}unregisterStatusPanel(e){this.allComponents.delete(e)}unregisterAllComponents(){this.allComponents.clear()}getStatusPanel(e){return this.allComponents.get(e)}getStatusPanelSelector(){return GE}destroy(){this.unregisterAllComponents(),super.destroy()}},GA="32.3.9",GR={version:GA,moduleName:`${eh.StatusBarModule}-core`,beans:[GI],userComponents:[{name:"agAggregationComponent",classImp:Gb},{name:"agSelectedRowCountComponent",classImp:Gx},{name:"agTotalRowCountComponent",classImp:GD},{name:"agFilteredRowCountComponent",classImp:GS},{name:"agTotalAndFilteredRowCountComponent",classImp:GM}],dependantModules:[I9]},GT={version:GA,moduleName:`${eh.StatusBarModule}-api`,apiFunctions:{getStatusPanel:function(e,t){return rB(e.statusBarService.getStatusPanel(t))}},dependantModules:[GR]},GL={version:GA,moduleName:eh.StatusBarModule,dependantModules:[GR,GT]},GF=class extends tk{constructor(){super(...arguments),this.beanName="rowModel",this.firstRow=-1,this.lastRow=-1,this.rowCount=-1,this.rowNodesByIndex={}}wireBeans(e){this.rowRenderer=e.rowRenderer,this.focusService=e.focusService,this.beans=e}ensureRowHeightsValid(e,t,i,s){return!1}postConstruct(){this.rowHeight=ej(this.gos),this.addManagedEventListeners({viewportChanged:this.onViewportChanged.bind(this)}),this.addManagedPropertyListener("viewportDatasource",()=>this.updateDatasource()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=ej(this.gos),this.updateRowHeights()})}start(){this.updateDatasource()}isLastRowIndexKnown(){return!0}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)}updateDatasource(){let e=this.gos.get("viewportDatasource");e&&this.setViewportDatasource(e)}getViewportRowModelPageSize(){return this.gos.get("viewportRowModelPageSize")}getViewportRowModelBufferSize(){return this.gos.get("viewportRowModelBufferSize")}calculateFirstRow(e){let t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),s=e-t;return s<0?0:Math.floor(s/i)*i}calculateLastRow(e){if(-1===e)return e;let t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize();return Math.min(Math.ceil((e+t)/i)*i,this.rowCount-1)}onViewportChanged(e){let t=this.calculateFirstRow(e.firstRow),i=this.calculateLastRow(e.lastRow);(this.firstRow!==t||this.lastRow!==i)&&(this.firstRow=t,this.lastRow=i,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))}purgeRowsNotInViewport(){Object.keys(this.rowNodesByIndex).forEac
678h(e=>{let t=parseInt(e,10);if(t<this.firstRow||t>this.lastRow){if(this.isRowFocused(t))return;delete this.rowNodesByIndex[t]}})}isRowFocused(e){let t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&null==t.rowPinned&&t.rowIndex===e}setViewportDatasource(e){this.destroyDatasource(),this.viewportDatasource=e,this.rowCount=-1,e.init?e.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):ep("viewport is missing init method.")}getType(){return"viewport"}getRow(e){return this.rowNodesByIndex[e]||(this.rowNodesByIndex[e]=this.createBlankRowNode(e)),this.rowNodesByIndex[e]}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}getRowCount(){return -1===this.rowCount?0:this.rowCount}getRowIndexAtPixel(e){return 0!==this.rowHeight?Math.floor(e/this.rowHeight):0}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.eventService.dispatchEvent({type:"modelUpdated",newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1})}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}isEmpty(){return this.rowCount>0}isRowsToRender(){return this.rowCount>0}getNodesInRangeForSelection(e,t){let i=e.rowIndex,s=t.rowIndex,r=i<this.firstRow||i>this.lastRow,a=s<this.firstRow||s>this.lastRow;if(r||a)return[];let o=[],n=i<=s?i:s,l=i<=s?s:i;for(let e=n;e<=l;e++)o.push(this.rowNodesByIndex[e]);return o}forEachNode(e){let t=0;Object.keys(this.rowNodesByIndex).forEach(i=>{let s=parseInt(i,10);e(this.rowNodesByIndex[s],t),t++})}setRowData(e){tK(e,(e,t)=>{let i=parseInt(e,10);if(i>=this.firstRow&&i<=this.lastRow){let e=this.rowNodesByIndex[i];eD(e)&&(e=this.createBlankRowNode(i),this.rowNodesByIndex[i]=e),e.setDataAndId(t,i.toString())}})}createBlankRowNode(e){let t=new r4(this.beans);return t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*e),t.setRowIndex(e),t}setRowCount(e,t=!1){e!==this.rowCount&&(this.rowCount=e,this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.eventService.dispatchEvent({type:"modelUpdated",newData:!1,newPage:!1,keepRenderedRows:t,animate:!1}))}isRowPresent(e){return!!this.getRowNode(e.id)}},GP={version:"32.3.9",moduleName:eh.ViewportRowModelModule,rowModel:"viewport",beans:[GF],dependantModules:[I9]};I1(I2,Ri),rV.__registerModules([hL,db,dX,dF,Rt,FN,F_,P7,Nr,Nd,NC,NV,N_,Rc,NY,PT,Ol,OI,PZ,GC,GL,GP],!1,void 0)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.