UNPKG

ag-grid-community

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

119 lines • 1.36 MB
var A1=vS,I1=US,k1=Rb,L1=Eb,V1=Db,H1=C3,B1=T2,O1=bE,G1=iF,N1=h6,_1=S6,z1=QP,W1=vM,U1=V5,q1=tA,$1=YA,K1=qA,j1=i8,Z1=dB,Q1=cB;import{LocalEventService as Bc,_escapeString as Y1}from"ag-stack";var Oc={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};import{_doOnce as J1,_missing as Gc}from"ag-stack";import{_areEqual as X1}from"ag-stack";var jo=e=>e==="__proto__"||e==="constructor"||e==="prototype",Ii=e=>{const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},Zo=e=>e!==null&&typeof e=="object"&&Ii(e),Nc=(e,t,i,o,s)=>{let r=e[t];if(r!==i){if(i===null||typeof i!="object"){(o||i!==void 0)&&(e[t]=i);return}s&&r==null&&Ii(i)&&(r={},e[t]=r),r!==null&&typeof r=="object"&&!Array.isArray(r)?he(r,i,o,s):e[t]=i}},he=(e,t,i=!0,o=!1)=>{if(!(t==null||t==="")){if(Array.isArray(t)){for(let s=0,r=t.length;s<r;++s)Nc(e,s,t[s],i,o);return}for(const s of Object.keys(t))jo(s)||Nc(e,s,t[s],i,o)}},Qo=e=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e)){const i=e.length,o=new Array(i);for(let s=0;s<i;++s)o[s]=Qo(e[s]);return o}if(!Ii(e))return e;const t={};for(const i of Object.keys(e))jo(i)||(t[i]=Qo(e[i]));return t},kt=(e,t,i)=>{if(e===t)return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;const o=Array.isArray(e);if(o!==Array.isArray(t))return!1;if(o)return X1(e,t);if(!Ii(e)||!Ii(t))return!1;const s=Object.keys(e),r=Object.keys(t),n=s.length,l=r.length;if(i===void 0){if(n!==l)return!1;for(let c=0;c<n;++c){const u=s[c];if(!(u in t)||!kt(e[u],t[u]))return!1}return!0}let a=0;for(let c=0;c<n;++c){const u=s[c];if(a===0&&u===i){a=1;continue}if(!(u in t)||!kt(e[u],t[u]))return!1}const d=i in t?1:0;return n-a===l-d},Qr=class ut{static applyGlobalGridOptions(t){if(!ut.gridOptions)return{...t};let i={};return he(i,ut.gridOptions,!0,!0),ut.mergeStrategy==="deep"?he(i,t,!0,!0):i={...i,...t},ut.gridOptions.context&&(i.context=ut.gridOptions.context),t.context&&(ut.mergeStrategy==="deep"&&i.context&&he(t.context,i.context,!0,!0),i.context=t.context),i}static applyGlobalGridOption(t,i){if(ut.mergeStrategy==="deep"){const o=Yr(t);if(o&&typeof o=="object"&&typeof i=="object")return ut.applyGlobalGridOptions({[t]:i})[t]}return i}};Qr.gridOptions=void 0,Qr.mergeStrategy="shallow";var ki=Qr;function eS(e,t="shallow"){ki.gridOptions=e,ki.mergeStrategy=t}function Yr(e){return ki.gridOptions?.[e]}var _c={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,noteTrigger:"hover",noteShowDelay:180,noteHideDelay:220,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,loadingRows:!1,suppressPdfExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,includeHiddenColumnsInCharts:!0,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,suppressInputClearButton:!1,enableInputAutoComplete:!1,rowBuffer:10,stickyRowsMaxViewportRatio:.5,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,alwaysShowGrandTotalRow:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupHideColumnsUntilExpanded:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,pivotPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,suppressContentVisibilityAuto:!0,contentVisibilityAutoDelay:1e3,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1};function Yo(e){return typeof e=="number"&&Number.isFinite(e)}function zc(e){const t=Number(e);return Number.isFinite(t)?t:null}function Lt(e,t,i){return Math.max(t,Math.min(e,i))}function Wc(e,t){if(typeof e!="number")return"";const i=t(),o=i("thousandSeparator",","),s=i("decimalSeparator","."),[r,n]=e.toString().split("."),l=r.replace(/(\d)(?=(\d{3})+(?!\d))/g,a=>a+o);return n===void 0?l:`${l}${s}${n}`}function Uc(e,t){return e.get("rowModelType")===t}function ie(e,t){return Uc(e,"clientSide")}function Jr(e){return ie(e)&&e.get("loading")===!0&&!!e.get("loadingRows")}function Ye(e,t){return!!t.stub&&ie(e)}function tS(e){const t=e.get("loadingRows");return!t||typeof t!="object"||t.rowCount==null?10:Number.isInteger(t.rowCount)&&t.rowCount>0?t.rowCount:10}function ht(e,t){return Uc(e,"serverSide")}function de(e,t){return e.get("domLayout")===t}function Jo(e){const{gos:t,environment:i}=e;return de(t,"normal")||de(t,"autoHeight")&&i.getAutoHeightMaxBodyHeight()!=null}function Je(e){return Oi(e)!==void 0}function Xr(e){return typeof e.get("getRowHeight")=="function"}function iS(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function qc({gos:e,formula:t}){const i=e.get("rowNumbers");return i||!!t?.active&&i!==!1}function gt(e,t,i=!1,o){const s=e.rowAutoHeight?.getMeasuredRowHeight(t);if(s!=null)return{height:s,estimated:!1};if(t.detail){const r=t.rowHeight,n=e.gos;if(r!=null&&n.get("masterDetail")&&n.get("detailRowAutoHeight"))return{height:r,estimated:!1}}return Xo(e,t,i,o)}function Xo(e,t,i=!1,o){const{gos:s,environment:r}=e;if(o??(o=r.getDefaultRowHeight()),Xr(s)){if(i)return{height:o,estimated:!0};const a={node:t,data:t.data},d=s.getCallback("getRowHeight")(a);if(Yo(d))return d===0&&e.log.warn(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return oS(s);const n=s.get("rowHeight");return{height:n&&Yo(n)?n:o,estimated:!1}}function oS(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Yo(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Li(e,t){e.addManagedEventListeners({stylesChanged:i=>{i.rowHeightChanged&&t()}}),e.addManagedPropertyListener("rowHeight",t)}function Ge(e){const{environment:t,gos:i}=e,o=i.get("rowHeight");if(!o||Gc(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(e.log.warn(24),t.getDefaultRowHeight())}function en(e,t,i){const o=t[e.getDomDataKey()];return o?o[i]:void 0}function Vt(e,t,i,o){const s=e.getDomDataKey();let r=t[s];Gc(r)&&(r={},t[s]=r),r[i]=o}function Ht(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function tn(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||de(e,"print"))}function Xe(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Vi(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function li(e){return e.get("grandTotalRow")}function on(e){switch(e){case"pinnedTop":return"top";case"pinnedBottom":return"bottom";default:return null}}function sS(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function $c(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Kc(e){return $c(e)&&e.get("groupHideColumnsUntilExpanded")&&ie(e)}function sn(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function rn(e,t,i){return!!t.group&&!t.footer&&sn(e,i)}function Bt(e){const t=e.gos.getCallback("getRowId");return t===void 0?t:i=>{let o=t(i);return typeof o!="string"&&(J1(()=>e.log.warn(25,{id:o}),`getRowIdString:${e.context.getId()}`),o=String(o)),o}}function nn(e,t){const i=e.get("groupHideParentOfSingleChild");return!!(i===!0||i==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function jc(e,t){return t.allChildrenCount===1&&t.childrenAfterGroup?.length===1&&nn(e,t)}function Zc(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function rS(e,t){const i=e.get("suppressGroupChangesColumnVisibility");if(i===!0||t&&i==="suppressHideOnGroup"||!t&&i==="suppressShowOnUngroup")return!1;const o=e.get("suppressRowGroupHidesColumns");if(t&&o)return!1;const s=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&s)}function Ot(e){return e?.checkboxes??!0}function Hi(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Bi(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function ln(e){return e?.hideDisabledCheckboxes??!1}function Qc(e){return typeof e.get("rowSelection")!="string"}function nS(e){return e.get("cellSelection")!==void 0}function lS(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function Ne(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function aS(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&t.handle?.mode==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function pt(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function Yc(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return i&&o?!1:i?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Jc(e){const t=Yc(e);return t===!0||t==="enableSelection"}function Xc(e){const t=Yc(e);return t===!0||t==="enableDeselection"}function es(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Oi(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function ai(e){return Oi(e)==="multiRow"}function dS(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Gi(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return i&&o?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function eu(e,t=!0){const i=e.get("rowSelection");return typeof i!="object"?t?"all":void 0:i.mode==="multiRow"?i.selectAll:"all"}function cS(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function di(e){const t=Gi(e);return t==="descendants"||t==="filteredDescendants"}function tu(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function iu(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function ge(e){return e.get("columnMenu")==="legacy"}function ou(e){return!ge(e)}function su(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function uS(e,t,i){typeof e!="object"&&(e={});const o={...e};for(const s of i){const r=t[s];r!==void 0&&(o[s]=r)}return o}function hS(e,t){if(!e)return;const i={};let o=!1;for(const n of Object.keys(e))i[n]=e[n],o=!0;if(!o)return;const s={type:"gridOptionsChanged",options:i};t.dispatchEvent(s);const r={type:"componentStateChanged",...i};t.dispatchEvent(r)}function G(e,t){return e.addCommon(t)}function gS(e,t){return e[t]??e.gridOptions?.[t]??Yr(t)??_c[t]}function ru({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}function an(e,t,i,o,s){const r=ts(e,t,i),n=new Gt(r,t,i,o,"user");return n.buildToken=s,e.context.createBean(n),n}function ts(e,t,i,o){const{gos:s,dataTypeSvc:r}=e,n={},l=s.get("defaultColDef");he(n,l,!1,!0);const a=r?.updateColDefAndGetColumnType(n,t,i),d=t.type??a??n.type;n.type=d,d&&pS(e,ns(d),n);const c=n.cellDataType;he(n,t,!1,!0),c!==void 0&&(n.cellDataType=c);const u=s.get("autoGroupColumnDef");return u&&t.rowGroup&&Xe(s)&&he(n,{sort:u.sort,initialSort:u.initialSort},!1,!0),r?.postProcess(n),r?.validateColDef(n,t,l,i),s.validateColDef(n,i,o),n}function pS(e,t,i){const o=t.length;if(o===0)return;const s=e.gos.get("columnTypes");if(s==null){nu(e,i,t,o,Oc);return}const r={...Oc},n=Object.keys(s);for(let l=0,a=n.length;l<a;++l){const d=n[l],c=s[d];d in r?e.log.warn(34,{key:d}):(c.type&&e.log.warn(35),r[d]=c)}nu(e,i,t,o,r)}function nu(e,t,i,o,s){for(let r=0;r<o;++r){const n=i[r].trim(),l=s[n];l?he(t,l,!1,!0):e.log.warn(36,{type:n})}}import{_areEqual as fS,_symmetricDiff as mS}from"ag-stack";import{_indexMap as CS}from"ag-stack";import{LocalEventService as lu}from"ag-stack";import{AgBeanStub as vS}from"ag-stack";var y=class extends A1{warn(...e){this.beans.log.warn(...e)}error(...e){this.beans.log.error(...e)}deprecated(...e){this.beans.log.deprecated(...e)}};function Ni(e){return e instanceof _i}var _i=class extends y{constructor(e,t,i,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=o,this.isColumn=!1,this.expandable=!1,this.expanded=!1,this.buildToken=0,this.displayInstances=null,this.lastVisible=!1,this.lastQueuedEventAt=0,this.instanceId=xu(),this.expanded=!!e?.openByDefault}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){const e=this.children;for(let t=0,i=e.length;t<i;++t)if(e[t].isVisible())return!0;return!1}isPadding(){return this.padding}setExpanded(e){return e=!!e,this.expanded===e?!1:(this.expanded=e,this.dispatchGroupEvent("expandedChanged"),!0)}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.groupId}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){const t=this.children;for(let i=0,o=t.length;i<o;++i){const s=t[i];s.isColumn?e.push(s):s.addLeafColumns(e)}}getColumnGroupShow(){return this.colGroupDef?.columnGroupShow}setExpandable(){if(this.padding)return!0;const e=hu(this.children,0),t=e===uu;this.expandable!==t&&(this.expandable=t,this.dispatchGroupEvent("expandableChanged"));const i=e!==0;return this.lastVisible===i?!1:(this.lastVisible=i,!0)}dispatchGroupEvent(e){const t=this.localEventService;if(!t?.hasListeners(e))return;const i=this.beans.colModel;i.colUpdateDepth===0?t.dispatchEvent({type:e}):i.queueColEvent(this,{type:e})}raiseQueuedEvent(e){this.isAlive()&&this.localEventService?.dispatchEvent(e)}__addEventListener(e,t){let i=this.localEventService;i||(i=new lu,this.localEventService=i),i.addEventListener(e,t)}__removeEventListener(e,t){this.localEventService?.removeEventListener(e,t)}addEventListener(e,t,i){if(typeof t!="function")return;let o=this.localEventService;o||(o=new lu,this.localEventService=o);const s=this.beans?.frameworkOverrides.wrapLocalListener?.(o,e,t,i)??t;o.addEventListener(e,s,i)}removeEventListener(e,t,i){const o=this.localEventService;if(!o)return;const s=o.listenerWrapper?.unwrap(e,t,i)??t;o.removeEventListener(e,s,i)}},au=1,du=2,cu=4,uu=7,hu=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i];if(Ni(s)&&s.padding)t=hu(s.children,t);else if(s.isVisible()){const r=s.getColumnGroupShow();r==="open"?t|=au|cu:r==="closed"?t|=du|cu:t|=au|du}if(t===uu)return t}return t};function gu(e,t){let i=0,o=0;const s=e.length;let r=s,n=-1,l=s,a=-1;for(let g=0;g<s;++g){const p=e[g].colDef.lockPosition;p==="right"?(++o,l===s&&(l=g),a=g):(p==="left"||p===!0)&&(++i,r===s&&(r=g),n=g)}if(i===0&&o===0)return e;let d,c,u;if(t.get("enableRtl")){if(a===o-1&&r===s-i)return e;u=0,c=o,d=s-i}else{if(n===i-1&&l===s-o)return e;d=0,c=i,u=s-o}const h=new Array(s);for(let g=0;g<s;++g){const p=e[g],f=p.colDef.lockPosition;let m;f==="right"?m=u++:f==="left"||f===!0?m=d++:m=c++,h[m]=p}return h}function pu(e,t){const i=CS(e);let o=0,s=0,r=0;const n=a=>{for(let d=0,c=a.length;d<c;++d){const u=a[d];if(Ni(u)){n(u.children);continue}const h=i.get(u)??-1;r===0?(o=h,s=h):h<o?o=h:h>s&&(s=h),++r}},l=a=>{for(let d=0,c=a.length;d<c;++d){const u=a[d];if(Ni(u)&&(u.colGroupDef?.marryChildren&&(r=0,n(u.children),r>1&&s-o>r-1)||!l(u.children)))return!1}return!0};return l(t)}function fu(e,t){if(!e||e.length==0)return;const i=t(e[0]);for(let o=1;o<e.length;o++)if(i!==t(e[o]))return;return i}function mu(e,t,i){if(!t.length)return;const o=t.length===1?t[0]:null,s=fu(t,r=>r.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:i})}function dn(e,t,i){if(!t.length)return;const o=t.length===1?t[0]:null,s=fu(t,r=>r.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:i})}function is(e,t,i,o){e.dispatchEvent({type:t,columns:i,column:i?.length==1?i[0]:null,source:o})}function ft(e,t,i,o,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:i,source:o})}function cn(e,t,i){e.dispatchEvent({type:"columnHeaderNameChanged",column:null,columns:null,columnGroup:t,source:i})}function et({ctrlsSvc:e},t){const i=e.isAlive()?e.get("gridBodyCtrl"):void 0;t?i?.startColumnWidthAnimation():i?.finishColumnWidthAnimation()}function un(e){const{gos:t,visibleCols:i,ctrlsSvc:o}=e,s=t.get("animateColumnResizing")&&t.get("suppressColumnMoveAnimation")?i.allCols:null;return et(e,!0),()=>{(o.isAlive()?o.get("gridBodyCtrl"):void 0)?.finishColumnWidthAnimation(s!=null&&wS(s,i.allCols))}}function hn({ctrlsSvc:e}){(e.isAlive()?e.get("gridBodyCtrl"):void 0)?.cancelColumnWidthAnimation()}function wS(e,t){const i=new Set(e),o=new Set(t),s=e.length,r=t.length;let n=0,l=0;for(;;){for(;n<s&&!o.has(e[n]);)++n;for(;l<r&&!i.has(t[l]);)++l;if(n>=s||l>=r)return!1;if(e[n]!==t[l])return!0;++n,++l}}var gn=e=>{const t=e.colModel.colsAllGroups,i=t.length,o=e.colModel.groupHeaderNameOverrides,s=new Array(i);for(let r=0;r<i;++r){const n=t[r];s[r]={groupId:n.groupId,open:n.expanded,headerName:o.get(n.groupId)??null}}return s},zi=(e,t,i,o)=>{const s=Ni(t)?t.groupId:t||"";Wi(e,[{groupId:s,open:i}],o)},pn=(e,t,i)=>{const{colModel:o}=e,s=o.groupHeaderNameOverrides;return(s.get(t)??null)===i?!1:(i==null?s.delete(t):s.set(t,i),o.getColGroup(t)?.dispatchGroupEvent("headerNameChanged"),!0)},Wi=(e,t,i)=>{const{colAnimation:o,visibleCols:s,eventSvc:r,colModel:n}=e,l=n.colsGroupsById,a=t.length;if(!(!l.size||!a)){n.beginColUpdate();try{o?.start(),et(e,!0);let d=null,c=null;for(let u=0;u<a;++u){const h=t[u],g=l.get(h.groupId);g&&(g.setExpanded(h.open)&&(d??(d=[]),d.push(g)),"headerName"in h&&pn(e,g.groupId,h.headerName??null)&&(c??(c=[]),c.push(g)))}c&&cn(r,c.length===1?c[0]:null,i),d&&(s.refresh(i,!0),r.dispatchEvent({type:"columnGroupOpened",columnGroup:d.length===1?d[0]:void 0,columnGroups:d}))}finally{et(e,!1),o?.finish(),n.endColUpdate()}}},SS=(e,t)=>{const i=[];e.colModel.colDefGroupsById.forEach(o=>{i.push({groupId:o.groupId,open:!!o.colGroupDef?.openByDefault,headerName:null})}),Wi(e,i,t)},Cu=(e,t,i,o,s,r,n,l)=>{const{sortSvc:a,pinnedCols:d,colFlex:c}=e;i!==void 0&&t.setVisible(!i,l),a&&(a.updateColSort(t,o,l),s!==void 0&&a.setColSortIndex(t,s,l)),r!==void 0&&d?.setColPinned(t,r,l),n!==void 0&&c?.setColFlex(t,n,l)};function Ui(e,t,i=!1,o,s=!1){const r=e.colModel;let n=null;r.beginColUpdate();try{for(let l=0,a=t.length;l<a;++l){const d=t[l],c=typeof d=="string"?r.getCol(d):d;c===void 0||s&&c.colDef.lockVisible||c.visible!==i&&(c.setVisible(i,o),n??(n=[]),n.push(c))}if(n){const{colAnimation:l,eventSvc:a}=e;l?.start(),et(e,!0);try{r.refreshColsDerivedState(),e.visibleCols.refresh(o,!1),a.dispatchEvent({type:"columnEverythingChanged",source:o}),dn(a,n,o)}finally{et(e,!1),l?.finish()}}}finally{r.endColUpdate()}}function tt(e,t,i,o=!1){const s=e.colModel;s.beginColUpdate();try{return bS(e,t,i,o)}finally{s.endColUpdate()}}function bS(e,t,i,o){const{colModel:s,colAnimation:r,calculatedColsSvc:n}=e,l=t.state;if(l&&!Array.isArray(l))return e.log.warn(32),!1;l&&n?.restoreDynamicColumnDefs(l)&&n.refreshDynamicColumns(i);const a=s.colDefList,d=e.selectionColSvc?.column;if(!a.length&&!d)return!1;r?.start();const c=un(e);try{const u=mn(e);let h=fn(e,l??null,a,t,i,!0,o);if(h!==null||t.defaultState){const g=e.pivotResultCols?.pivotCols;h=fn(e,h,g,t,i,!1,o)}return Su(e,t,i,u),h===null}finally{c(),r?.finish()}}function fn(e,t,i,o,s,r,n){const l=e.colModel,a=o.defaultState;let d=null,c=null,u=null;const h=a?new Set:null;if(t)for(let g=0,p=t.length;g<p;++g){const f=t[g],m=f.colId;let w;if(m!=null){if(m.startsWith(_t)){d??(d=[]),d.push(f);continue}if(m.startsWith(rs)){c??(c=[]),c.push(f);continue}if(r)w=l.getNonPivotColById(m);else{const v=l.getCol(m);w=v?.colDef.pivotKeys==null?null:v}}w?(os(e,w,f,a,s,n),h?.add(w)):(u??(u=[]),u.push(f))}if(h!==null&&i)for(let g=0,p=i.length;g<p;++g){const f=i[g];h.has(f)||os(e,f,null,a,s,n)}return r&&yS(e,d,c,a,s,n),u}function yS(e,t,i,o,s,r){const{autoColSvc:n,selectionColSvc:l,rowGroupColsSvc:a,pivotColsSvc:d,valueColsSvc:c}=e;a?.sortByPendingState(),d?.sortByPendingState(),c?.sortByPendingState(),e.colModel.refreshCols(!1,s);const u=l?.column,h=n?.columns??[];vu(e,t,h,o,s,r),vu(e,i,u?[u]:[],o,s,r)}function vu(e,t,i,o,s,r){let n=null;if(t!==null){n=new Set;for(let l=0,a=t.length;l<a;++l){const d=t[l],c=d.colId;for(let u=0,h=i.length;u<h;++u){const g=i[u];if(g.colId===c){n.add(g),os(e,g,d,o,s,r);break}}}}if(o)for(let l=0,a=i.length;l<a;++l){const d=i[l];n?.has(d)||os(e,d,null,o,s,r)}}function os(e,t,i,o,s,r){const n=it(i?.flex,o?.flex),l=it(i?.sort,o?.sort),a=it(i?.sortType,o?.sortType),c=ot(l)||An(a)?{type:_e(a),direction:Nt(l)}:void 0;Cu(e,t,it(i?.hide,o?.hide),c,it(i?.sortIndex,o?.sortIndex),it(i?.pinned,o?.pinned),n,s);const u=it(i?.headerName,o?.headerName);if(u!==void 0&&t.setHeaderNameOverride(u,s),n==null){const g=it(i?.width,o?.width);if(g!=null){const p=t.colDef.minWidth??e.environment.getDefaultColumnMinWidth();p!=null&&g>=p&&(r||t.setUserSized(!0),t.setActualWidth(g,s))}}if(t.colKind==="auto-group"||!t.primary)return;e.valueColsSvc?.syncColState(t,i,o,s),e.rowGroupColsSvc?.syncColState(t,i,o,s),e.pivotColsSvc?.syncColState(t,i,o,s),e.showValuesAsSvc?.syncColState(t,i,o,s);const h=it(i?.pivotSort,o?.pivotSort);h!==void 0&&(t.pivotSort=Nt(h))}function wu(e,t){const i=e.colModel;i.beginColUpdate();try{RS(e,t)}finally{i.endColUpdate()}}function RS(e,t){const{colModel:i,autoColSvc:o,selectionColSvc:s,eventSvc:r,gos:n,colAnimation:l,calculatedColsSvc:a}=e,d=a?.resetDynamicColumnDefs(!0)??!1,c=e.userColumnSvc?.clear()??!1;if(a?(d||c)&&a.refreshDynamicColumns(t):c&&i.rebuildCols(t),!i.colDefList.length)return;const u=s?.column??null,h=o?.columns,g=h?.length??0,p=new Array(g+(u?1:0)+i.colDefList.length);let f=0,m=-1,w=-1,v=-1;const S=b=>{const R=Eu(e,b),{rowGroupIndex:x,pivotIndex:D,valueIndex:A}=R;x!=null&&x>m&&(m=x),D!=null&&D>w&&(w=D),A!=null&&A>v&&(v=A),p[f++]=R};if(h)for(let b=0;b<g;++b)S(h[b]);u&&S(u),Cn(i.colDefTree,S);for(let b=0,R=p.length;b<R;++b){const x=p[b];x.rowGroup&&x.rowGroupIndex==null&&(x.rowGroupIndex=++m),x.pivot&&x.pivotIndex==null&&(x.pivotIndex=++w),x.aggFunc&&x.valueIndex==null&&(x.valueIndex=++v)}l?.start();const C=un(e);try{const b=mn(e);fn(e,p,i.colDefList,{},t,!0,!0);const R=i.colDefList;for(let $=0,ne=R.length;$<ne;++$){const j=R[$];j.pivotSort=In(j.colDef)}e.rowNumbersSvc?.resetColumnState(t);const x=i.getAllCols();for(let $=0,ne=x.length;$<ne;++$)x[$].resetWidthOwnership();const D=o?.columns,A=D?.length??0,L=new Array((u?1:0)+A+i.colDefList.length);let H=0;u&&(L[H++]={colId:u.colId});for(let $=0;$<A;++$)L[H++]={colId:D[$].colId};Cn(i.colDefTree,$=>{L[H++]={colId:$.colId}});const re=i.groupHeaderNameOverrides;if(re.size){for(const $ of Array.from(re.keys()))pn(e,$,null);cn(r,null,t)}Su(e,{state:L,applyOrder:!0},t,b)}finally{C(),l?.finish()}r.dispatchEvent(G(n,{type:"columnsReset",source:t}))}function Su(e,t,i,o){ES(e,t),e.visibleCols.refresh(i,!1),e.eventSvc.dispatchEvent({type:"columnEverythingChanged",source:i}),bu(e,i,o)}function ES(e,t){const i=e.colModel,o=t.state;if(!t.applyOrder||!o||!i.ready)return;const s=i.colsById,r=i.colsList,n=new Set,l=[];for(let c=0,u=o.length;c<u;++c){const h=o[c].colId;if(h==null)continue;const g=s[h];g!=null&&g.inColsList&&!n.has(g)&&(l.push(g),n.add(g))}let a=null;for(let c=0,u=r.length;c<u;++c){const h=r[c];n.has(h)||(h.colKind==="auto-group"?(a??(a=[]),a.push(h)):l.push(h))}a!==null&&xS(l,a);const d=gu(l,e.gos);if(!fS(d,r)){if(i.hasMarryChildren&&!pu(d,i.colsTree)){e.log.warn(39);return}i.colsList=d,i.markColsListIndexDirty()}}function xS(e,t){let i=0;for(let s=0,r=e.length;s<r;++s)e[s].colKind==="auto-group"&&(i=s+1);const o=t.length;for(let s=e.length-1;s>=i;--s)e[s+o]=e[s];for(let s=0;s<o;++s)e[i+s]=t[s]}function mn(e){const{rowGroupColsSvc:t,pivotColsSvc:i,colModel:o}=e,s=t?.columns,r=i?.columns,n=o.getColsInStateOrder(),l=new Map;for(let a=0,d=n.length;a<d;++a){const c=n[a],u=c.sortDef,h=u.direction;l.set(c.colId,{width:c.actualWidth,hide:!c.visible,pinned:c.pinned,sort:h,sortType:h?u.type:void 0,sortIndex:c.sortIndex??null,aggFunc:c.aggregationActive?c.aggFunc:null,pivotSort:c.pivotSort})}return{rowGroupColumns:s?.length?s.slice():void 0,pivotColumns:r?.length?r.slice():void 0,before:l,colsList:o.colsList}}function bu(e,t,i){const o=e.rowGroupColsSvc?.columns,s=e.pivotColsSvc?.columns;yu(e,t,"columnRowGroupChanged",i.rowGroupColumns,o),yu(e,t,"columnPivotChanged",i.pivotColumns,s),FS(e,t,i.before),PS(e,t,i)}function yu(e,t,i,o,s){TS(o,s)||is(e.eventSvc,i,mS(o,s),t)}function FS(e,t,i){const{eventSvc:o,sortSvc:s}=e,r=e.colModel.getAllCols();let n=null,l=null,a=null,d=null,c=null,u=null;for(let h=0,g=r.length;h<g;++h){const p=r[h],f=i.get(p.colId);f&&(f.width!=p.actualWidth&&(l??(l=[]),l.push(p)),f.pinned!=p.pinned&&(a??(a=[]),a.push(p)),f.hide==p.visible&&(d??(d=[]),d.push(p)),DS(p,f)&&(n??(n=[]),n.push(p)),s&&MS(p,f)&&(c??(c=[]),c.push(p)),f.pivotSort!==p.pivotSort&&(u??(u=[]),u.push(p)))}n&&is(o,"columnValueChanged",n,t),l&&ft(o,l,!0,t),a&&mu(o,a,t),d&&dn(o,d,t),c&&s?.dispatchSortChangedEvents(t,c),u&&is(o,"columnPivotChanged",u,t)}function PS(e,t,i){const o=e.colModel,s=o.colsList;if(s===i.colsList)return;const r=i.before,n=o.colsById;let l;for(const u of r.keys()){const h=n[u];h?.inColsList&&(l??(l=[]),l.push(h))}if(!l)return;let a=0,d;const c=l.length;for(let u=0,h=s.length;u<h&&a<c;++u){const g=s[u];if(r.has(g.colId)){const p=l[a++];p!==g&&(d??(d=[]),d.push(p))}}d&&e.eventSvc.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:t})}var Ru=e=>{const t=e.colModel;if(!t.isAlive())return[];const i=t.getColsInStateOrder(),o=kn(e),s=new Array(i.length);for(let r=0,n=i.length;r<n;++r){const l=i[r],a=l.rowGroupActive,d=l.pivotActive,c=l.sortDef,u=c.direction;s[r]={colId:l.colId,width:l.actualWidth,hide:!l.visible,pinned:l.pinned,sort:u,sortType:u?c.type??null:null,sortIndex:l.sortIndex??null,aggFunc:l.aggregationActive?l.aggFunc:null,valueIndex:l.aggregationActive?l.aggregationActiveIndex:null,rowGroup:a,rowGroupIndex:a?l.rowGroupActiveIndex:null,pivot:d,pivotIndex:d?l.pivotActiveIndex:null,pivotSort:l.pivotSort===void 0?o:l.pivotSort,flex:l.flex??null,showValuesAs:e.showValuesAsSvc?.toColState(l)??null,headerName:l.headerNameOverride}}return s};function Eu(e,t){const i=t.colDef,o=pe(i.sort??i.initialSort??null),s=i.rowGroupIndex??i.initialRowGroupIndex??null;let r=i.rowGroup??i.initialRowGroup??null;s==null&&r===!1&&(r=null);const n=i.pivotIndex??i.initialPivotIndex??null;let l=i.pivot??i.initialPivot??null;return n==null&&l===!1&&(l=null),{colId:t.colId,sort:o.direction,sortType:o.type,sortIndex:i.sortIndex??i.initialSortIndex??null,hide:i.hide??i.initialHide??null,pinned:i.pinned??i.initialPinned??null,width:i.width??i.initialWidth??null,flex:i.flex??i.initialFlex??null,rowGroup:r,rowGroupIndex:s,pivot:l,pivotIndex:n,pivotSort:In(i),aggFunc:i.aggFunc??i.initialAggFunc??null,valueIndex:i.valueIndex??i.initialValueIndex??null,showValuesAs:e.showValuesAsSvc?.colDefSelection(i)??null,headerName:null}}var it=(e,t)=>e!==void 0?e:t,Cn=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i],r=s.children;r?Cn(r,t):t(s)}},DS=(e,t)=>{const i=t.aggFunc,o=i!=null;return o!==e.aggregationActive||o&&i!=e.aggFunc},MS=(e,t)=>{if(t.sortIndex!=e.sortIndex)return!0;const i=e.getSortDef(),o=t.sortType??"default";return i?i.direction!==t.sort||i.type!==o:t.sort!==null},TS=(e,t)=>{if(e===t)return!0;const i=e?.length??0;if(i!==(t?.length??0))return!1;for(let o=0;o<i;++o){const s=e[o],r=t[o];if(s!==r&&s.colId!==r.colId)return!1}return!0};function qi(e,t){let i=e;for(let o=0,s=t.length;o<s;o++){if(i==null)return;i=i[t[o]]}return i}function vn(e,t){return t?t.includes("__proto__"):e==="__proto__"}var AS=0;function xu(){return AS++}var wn=e=>e instanceof Gt,mt=(e,t)=>{if(!t.group&&!t.rowPinned){const i=e.pivotValueColumn;if(i)return i}return e},IS=["asc","desc",null],kS=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],$i=1,Ki=2,Fu=4,Pu=8,ji=16,Sn=32,bn=64,yn=128,Rn=256,En=512,xn=1024,Fn=2048,Pn=4096,ss=8192,Dn=16384,Mn=32768,Zi=65536,Tn=131072,Gt=class extends y{constructor(e,t,i,o,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=o,this.colKind=s,this.isColumn=!0,this.instanceId=xu(),this.aggFunc=void 0,this.isCalculatedCol=!1,this.field=void 0,this.fieldPath=null,this.fieldHasProtoKey=!1,this.valueGetter=void 0,this.allowFormula=!1,this.showRowGroup=void 0,this.pivotValueColumn=void 0,this.valueFormatter=void 0,this.refData=void 0,this.enableCellChangeFlash=void 0,this.colSpan=void 0,this.rowSpan=void 0,this.calculatedExpression=void 0,this.actualWidth=0,this.reportedWidth=0,this.minWidth=0,this.maxWidth=0,this.flex=null,this.pinned=null,this.pinnedLane=1,this.left=null,this.reportedLeft=null,this.oldLeft=null,this.visible=!1,this.displayed=!1,this.sortDef=pe(),this.sortIndex=void 0,this.pivotSort=void 0,this.autoHeaderHeight=null,this.sortCycleIndex=void 0,this.lastQueuedEventAt=0,this.buildToken=0,this.allColsIndex=-1,this.colSpanIndex=-1,this.inColsList=!1,this.ariaColIndex=0,this.colsListIndex=-1,this.formulaRef=null,this.showValuesAsDef=void 0,this.showValuesAs=null,this.anchoredToColId=void 0,this.colFlags=0,this.rowGroupActive=!1,this.rowGroupActiveIndex=-1,this.pivotActive=!1,this.pivotActiveIndex=-1,this.aggregationActive=!1,this.aggregationActiveIndex=-1,this.showRowGroupCol=null,this.parent=null,this.originalParent=null,this.headerNameOverride=null,this.colIdSanitised=Y1(i)}destroy(){this.localEventService=null,super.destroy(),this.allColsIndex=-1,this.colSpanIndex=-1,this.displayed=!1,this.colsListIndex=-1,this.inColsList=!1,this.colFlags&=~($i|Ki),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{beans:e,colDef:t}=this,{sortSvc:i,pinnedCols:o,colFlex:s}=e;i?.initCol(this);const r=t.hide;this.visible=r!==void 0?!r:!t.initialHide,this.pivotSort=In(t),o?.initCol(this),s?.initCol(this)}setColDef(e,t,i){const o=this.colDef;if(this.userProvidedColDef=t,this.colDef=e,kt(e,o))return this.initCalculatedColumnState(e),!1;const{colModel:s,pivotResultCols:r,rowSpanSvc:n,showValuesAsSvc:l}=this.beans;++s.colDefsVersion,this.colFlags&=~Fn,this.sortCycleIndex=void 0,this.initColDefHotFields(),l?.resolveColumn(this,!1),this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),e.spanRows!==o.spanRows&&n?.columnRowSpanChanged(this),this.colFlags|=Tn,s.beginColUpdate();try{this.dispatchColEvent("colDefChanged",i),r?.recreateColDefsForSource(this,i)}finally{s.endColUpdate()}return!0}reapplyColDef(e,t,i){const o=ts(this.beans,e,this.colId);if(this.setColDef(o,e,t),i){Cu(this.beans,this,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,t);const s=o.pivotSort;s!==void 0&&(this.pivotSort=Nt(s));const r=this.flex;(r==null||r<=0)&&this.setActualWidth(o.width??this.actualWidth,t)}}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initColDefHotFields(),this.beans.showValuesAsSvc?.resolveColumn(this,!0),this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.reportedWidth=this.actualWidth,this.colFlags&=~Zi,this.initDotNotation(),this.initTooltip()}initDotNotation(){const{field:e,tooltipField:t,valueGetter:i,valueSetter:o}=this.colDef;this.field=e;const s=this.gos.get("suppressFieldDotNotation");this.colFlags&=~yn,s?this.fieldPath=null:(this.fieldPath=typeof e=="string"&&e.includes(".")?e.split("."):null,typeof t=="string"&&t.includes(".")&&(this.colFlags|=yn)),this.fieldHasProtoKey=!1,typeof e=="string"&&vn(e,this.fieldPath)&&(this.fieldHasProtoKey=!0,(!i||!o)&&this.warn(340,{field:e}))}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}resetWidthOwnership(){this.colFlags&=~ji}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return Lt(t,this.minWidth,this.maxWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldPath!==null}isTooltipEnabled(){return(this.colFlags&bn)!==0}setTooltipEnabled(e){this.colFlags=e?this.colFlags|bn:this.colFlags&~bn}isTooltipFieldContainsDots(){return(this.colFlags&yn)!==0}getHighlighted(){const e=this.colFlags;return(e&Dn)!==0?0:(e&Mn)!==0?1:null}setHighlighted(e){let t=this.colFlags&~(Dn|Mn);e===0?t|=Dn:e===1&&(t|=Mn),this.colFlags=t}__addEventListener(e,t){let i=this.localEventService;i||(i=new Bc,this.localEventService=i),i.addEventListener(e,t)}__removeEventListener(e,t){this.localEventService?.removeEventListener(e,t)}addEventListener(e,t){if(typeof t!="function")return;let i=this.localEventService;i||(i=new Bc,this.localEventService=i);const o=this.beans.frameworkOverrides.wrapLocalListener?.(i,e,t)??t;i.addEventListener(e,o)}removeEventListener(e,t){const i=this.localEventService;if(!i)return;const o=i.listenerWrapper?.unwrap(e,t)??t;i.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return G(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isCalculatedCol||this.isColumnFunc(e,this.colDef.suppressPaste??null)}initColDefHotFields(){const e=this.colDef;this.valueGetter=e.valueGetter,this.allowFormula=e.allowFormula===!0,this.showRowGroup=e.showRowGroup,this.pivotValueColumn=e.pivotValueColumn,this.valueFormatter=e.valueFormatter,this.refData=e.refData,this.enableCellChangeFlash=e.enableCellChangeFlash,this.colSpan=e.colSpan,this.rowSpan=e.rowSpan,this.initCalculatedColumnState(e)}initCalculatedColumnState(e){this.calculatedExpression=e.calculatedExpression,this.isCalculatedCol=this.calculatedExpression!==void 0&&this.beans.calculatedColsSvc?.isEnabled()===!0}isResizable(){return this.colDef.resizable??!0}isColumnFunc(e,t){return typeof t=="boolean"?t:typeof t=="function"&&t(this.createColumnFunctionCallbackParams(e))}isMoving(){return(this.colFlags&Rn)!==0}setMoving(e){this.colFlags=e?this.colFlags|Rn:this.colFlags&~Rn}isResizing(){return(this.colFlags&En)!==0}setResizing(e){this.colFlags=e?this.colFlags|En:this.colFlags&~En}getSort(){return this.sortDef.direction}getSortDef(){const e=this.sortDef;return e.direction?e:null}setSortDef(e){this.sortDef=e}isSortable(){return this.colDef.sortable??!0}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return!this.getSort()}isSorting(){return this.getSort()!=null}getSortIndex(){return this.sortIndex}isMenuVisible(){return(this.colFlags&xn)!==0}setMenuVisible(e){this.colFlags=e?this.colFlags|xn:this.colFlags&~xn}getAggFunc(){return this.aggFunc}getShowValuesAs(){return this.showValuesAs}getShowValuesAsDef(){return this.showValuesAsDef??null}getLeft(){return this.left}getRight(){return this.left+this.actualWidth}isFilterActive(){return(this.colFlags&Sn)!==0}setFilterActive(e){this.colFlags=e?this.colFlags|Sn:this.colFlags&~Sn}takeFilterRedefined(){const e=this.colFlags;return this.colFlags=e&~Tn,(e&Tn)!==0}isHovered(){return this.warn(261),!!this.beans.colHover?.isHovered(this)}isFirstRightPinned(){return(this.colFlags&Ki)!==0}isLastLeftPinned(){return(this.colFlags&$i)!==0}setLastLeftPinned(e){this.colFlags=e?this.colFlags|$i:this.colFlags&~$i}setFirstRightPinned(e){this.colFlags=e?this.colFlags|Ki:this.colFlags&~Ki}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){if(this.visible!==e){this.visible=e;let i=this.originalParent;for(;i&&i.setExpandable();)i=i.originalParent;this.dispatchColEvent("visibleChanged",t)}this.dispatchStateUpdatedEvent("hide",t)}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.colDef.suppressSpanHeaderHeight}getFirstRealParent(){let e=this.originalParent;for(;e?.padding;)e=e.originalParent;return e}getColumnGroupPaddingInfo(){let e=this.parent;if(!e?.providedColumnGroup.padding)return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.providedColumnGroup.padding){i=!1;break}e=e.parent}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getDisplayName(e="columnDrop"){return this.beans.colNames.getDisplayNameForColumn(this,e)||this.colDef.headerName||this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}isUserSized(){return(this.colFlags&ji)!==0}setUserSized(e){this.colFlags=e?this.colFlags|ji:this.colFlags&~ji}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){return this.autoHeaderHeight!==e?(this.autoHeaderHeight=e,!0):!1}getColSpan(e){const t=this.colSpan;if(t==null)return 1;const i=this.createColumnFunctionCallbackParams(e);return Mu(t(i))}getRowSpan(e){const t=this.rowSpan;if(t==null)return 1;const i=this.createColumnFunctionCallbackParams(e);return Mu(t(i))}setActualWidth(e,t){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.colFlags|=t==="uiColumnResized"?Zi|ji:Zi,this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null))}dispatchLayoutEvents(e){const t=this.actualWidth,i=(this.colFlags&Zi)!==0;if(i&&(this.colFlags&=~Zi),t!==this.reportedWidth){this.reportedWidth=t;const r=this.flex!=null?"flex":e;this.dispatchColEvent("widthChanged",r),this.dispatchStateUpdatedEvent("width",r)}else i&&this.dispatchStateUpdatedEvent("width",this.flex!=null?"flex":e);const o=this.left;o!==this.reportedLeft&&(this.reportedLeft=o,this.dispatchColEvent("leftChanged",e));let s=this.colFlags;Du(s,$i,Fu)&&(this.colFlags=s^Fu,this.dispatchColEvent("lastLeftPinnedChanged",e),s=this.colFlags),Du(s,Ki,Pu)&&(this.colFlags=s^Pu,this.dispatchColEvent("firstRightPinnedChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.pivotActive||this.rowGroupActive||this.aggregationActive}isAnyFunctionAllowed(){const e=this.colDef;return e.enablePivot===!0||e.enableRowGroup===!0||e.enableValue===!0}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.allowFormula}setHeaderNameOverride(e,t="api"){if(this.headerNameOverride===e)return;this.headerNameOverride=e;const i=this.beans.colModel;i.beginColUpdate();try{this.dispatchColEvent("headerNameChanged",t),this.beans.eventSvc.dispatchEvent({type:"columnHeaderNameChanged",column:this,columns:null,columnGroup:null,source:t})}finally{i.endColUpdate()}}dispatchColEvent(e,t,i){const o=this.localEventService;o?.hasListeners(e)&&this.raise(o,G(this.gos,{type:e,column:this,columns:[this],source:t,...i}))}dispatchStateUpdatedEvent(e,t){const i=this.beans.dataTypeSvc;i?.isPendingInference&&i.columnStateUpdated(this,e);const o=this.localEventService;o?.hasListeners("columnStateUpdated")&&this.raise(o,G(this.gos,{type:"columnStateUpdated",column:this,columns:[this],source:t,key:e}))}raise(e,t){const i=this.beans.colModel;i.colUpdateDepth>0?i.queueColEvent(this,t):e.dispatchEvent(t)}raiseQueuedEvent(e){this.localEventService?.dispatchEvent(e)}},Du=(e,t,i)=>(e&t)===0!=((e&i)===0),Mu=e=>e>=2?Math.floor(e):1,pe=e=>Ct(e)?{direction:e.direction,type:e.type}:{direction:Nt(e),type:_e(e)},Qi=e=>e==="absolute"?ss:Pn,Tu=e=>{const{sort:t,initialSort:i}=e.colDef;let o=0;return t!==null&&(o|=Qi(_e(t?.type))),i!==null&&(o|=Qi(_e(i?.type))),o},Au=(e,t,i)=>t.colDef.sortingOrder??e.get("sortingOrder")??((i&ss)!==0?kS:IS),LS=(e,t)=>{const i=Au(e,t,Tu(t)),o=new Array(i.length);for(let s=0,r=i.length;s<r;++s)o[s]=pe(i[s]);return o},VS=(e,t)=>{const i=e.get("sortingOrder")==null,o=t.colFlags;if(i&&(o&Fn)!==0)return o&(Pn|ss);let s=Tu(t);const r=Au(e,t,s);for(let n=0,l=r.length;n<l;++n){const a=r[n];if(!Ct(a)){Nt(a)&&(s|=Qi(_e(a)));continue}a.direction&&(s|=Qi(a.type))}return i&&(t.colFlags=o&~(Pn|ss)|s|Fn),s},HS=(e,t,i)=>(VS(e,t)&Qi(i))!==0,ot=e=>e==="asc"||e==="desc"||e===null,An=e=>e==="default"||e==="absolute",Ct=e=>{if(!e||typeof e!="object")return!1;const t=e;return An(t.type)&&ot(t.direction)},In=e=>{const t=e.pivotSort!==void 0?e.pivotSort:e.initialPivotSort;return t===void 0?void 0:Nt(t)},kn=e=>e.pivotResultCols?.suppliedColDefs!=null?null:"asc",BS=(e,t)=>t===void 0?kn(e):t,Nt=e=>ot(e)?e:null,_e=e=>An(e)?e:"default",Iu=(e,t,i)=>{const o=i?.(),s=o!==void 0?o:t.sortSvc?.getDisplaySort(e),r=_e(s?.type),n=Nt(s?.direction);return{isAbsoluteSort:r==="absolute",isDefaultSort:r==="default",isAscending:n==="asc",isDescending:n==="desc",direction:n}},Ln=e=>e==="right"?2:e==="left"||e===!0?0:1,ku=(e,t)=>t.allColsIndex>=0?e.getColAfter(t):null,Lu=(e,t)=>{const i=ku(e,t);return i?.isResizable()?i:null},Vn=(e,t)=>(e?t!==0:t===2)?-1:1,_t="ag-Grid-AutoColumn",rs="ag-Grid-SelectionColumn",Vu="ag-Grid-RowNumbersColumn",OS="ag-Grid-HierarchyColumn";function vt(e){let t=0;for(let i=0,o=e.length;i<o;++i)t+=e[i].actualWidth;return t}function Hn(e){return e.colKind==="auto-group"}function Yi(e){return e.colKind==="selection"}function fe(e){return e.colKind==="row-number"}function Bn(e){const t=e.colKind;return t==="selection"||t==="row-number"}function ns(e){return Array.isArray(e)?e:typeof e=="string"?e.split(","):[]}function zt(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function GS(e,t){return!e.columnGroup||e.columnGroup.getGroupId()===t}function Hu(e,t,i){const o=t.sort,s=Ct(o)||ot(o)?pe(o):null,r=e.showValuesAsSvc?.colDefSelection(t)??void 0;return s?{...t,colId:i,sort:s.direction,sortType:s.type,showValuesAs:r,headerName:void 0}:{...t,colId:i,sort:void 0,showValuesAs:r,headerName:void 0}}function NS(e){const{sort:t,initialSort:i}=e,o=Ct(t)||ot(t),s=Ct(i)||ot(i);return o?pe(t):s?pe(i):null}var Bu=(e,t)=>{if(e)for(let i=0,o=e.length;i<o;++i){const s=e[i];s.isAlive()&&s.destroy()}if(t)for(let i=0,o=t.length;i<o;++i){const s=t[i];s.isAlive()&&s.destroy()}},Ou=(e,t,i)=>{for(let o=0,s=e.length;o<s;++o){const r=e[o];r.buildToken!==i&&r.isAlive()&&r.destroy()}for(let o=0,s=t.length;o<s;++o){const r=t[o];r.buildToken!==i&&r.isAlive()&&r.destroy()}};function On(e,t){for(let i=0,o=e.length;i<o;++i){const s=e[i];"children"in s?On(s.children,t):t(s)}}import{LocalEventService as Gu,_escapeString as _S}from"ag-stack";var Me=e=>e instanceof ci,ci=class extends y{constructor(e,t,i,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=o,this.isColumn=!1,this.children=null,this.displayedChildren=[],this.reportedDisplayedChildren=this.displayedChildren,this.childrenReports=0,this.autoHeaderHeight=null,this.left=null,this.reportedLeft=null,this.oldLeft=null,this.parent=null,this.buildToken=0,this.pinnedLane=Ln(o),this.uniqueId=`${t}_${i}`,this.colIdSanitised=_S(this.uniqueId)}getParent(){return this.parent}getUniqueId(){return this.uniqueId}isEmptyGroup(){return!this.displayedChildren?.length}isMoving(){return Nu(this.providedColumnGroup)===!0}setLeftFromChildren(){const e=this.displayedChildren;let t=null;if(e)for(let i=0,o=e.length;i<o;++i){const s=e[i];Me(s)&&s.setLeftFromChildren();const r=s.left;r!=null&&(t==null||r<t)&&(t=r)}this.oldLeft=this.reportedLeft,this.left=t}getLeft(){return this.left}dispatchLayoutEvents(){if(!this.isAlive())return!1;const e=this.displayedChildren;let t=e!==this.reportedDisplayedChildren;this.reportedDisplayedChildren=e;const i=this.childrenReports,o=this.children;if(o!==null)for(let r=0,n=o.length;r<n;++r){const l=o[r];l.isColumn||l.dispatchLayoutEvents()&&(t=!0)}t&&i===this.childrenReports&&(++this.childrenReports,this.dispatchLocalEvent({type:"displayedChildrenChanged"}));const s=this.left;return s!==this.reportedLeft&&(this.reportedLeft=s,this.dispatchLocalEvent({type:"leftChanged"})),t}__addEventListener(e,t){let i=this.localEventService;i||(i=new Gu,this.localEventService=i),i.addEventListener(e,t)}__removeEventListener(e,t){this.localEventService?.removeEventListener(e,t)}addEventListener(e,t,i){if(typeof t!="function")return;let o=this.localEventService;o||(o=new Gu,this.localEventService=o);const s=this.beans?.frameworkOverrides.wrapLocalListener?.(o,e,t,i)??t;o.addEventListener(e,s,i)}removeEventListener(e,t,i){const o=this.localEventService;if(!o)return;const s=o.listenerWrapper?.unwrap(e,t,i)??t;o.removeEventListener(e,s,i)}getPinned(){return this.pinned}getGroupId(){return this.groupId}getDisplayName(e="columnDrop"){return this.beans.colNames.getDisplayNameForColumnGroup(this,e)||this.getColGroupDef()?.headerName||this.getGroupId()}getPartId(){return this.partId}getActualWidth(){let e=0;const t=this.displayedChildren;if(t)for(let i=0,o=t.length;i<o;++i)e+=t[i].getActualWidth();return e}isResizable(){const e=this.displayedChildren;if(e){for(let t=0,i=e.length;t<i;++t)if(e[t].isResizable())return!0}return!1}getMinWidth(){const e=this.displayedChildren;if(!e)return 0;let t=0;for(let i=0,o=e.length;i<o;++i){const s=e[i];t+=s.getMinWidth()}return t}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}get ariaColIndex(){return Wt(this,!1,!1)?.ariaColIndex??0}getDefinition(){return this.providedColumnGroup.colGroupDef}getColGroupDef(){return this.providedColumnGroup.colGroupDef}isPadding(){return this.providedColumnGroup.padding}isExpandable(){return this.providedColumnGroup.expandable}isExpanded(){return!!this.providedColumnGroup.expanded}isAutoHeaderHeight(){return!!this.providedColumnGroup.colGroupDef?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){return e===this.autoHeaderHeight?!1:(this.autoHeaderHeight=e,!0)}addDisplayedLeafColumns(e){const t=this.displayedChildren;if(t)for(let i=0,o=t.length;i<o;++i){const s=t[i];s.isColumn?e.push(s):Me(s)&&s.addDisplayedLeafColumns(e)}}addLeafColumns(e){const t=this.children;if(t)for(let i=0,o=t.length;i<o;++i){const s=t[i];s.isColumn?e.push(s):Me(s)&&s.addLeafColumns(e)}}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=0,t=this;for(;t?.providedColumnGroup.padding&&t.parent?.providedColumnGroup.padding;)++e,t=t.parent;return e}},Wt=(e,t,i)=>{const o=t?e.displayedChildren:e.children;if(o)for(let s=0,r=o.length;s<r;++s){const n=o[i?r-1-s:s];if(n.isColumn)return n;const l=Wt(n,t,i);if(l)return l}return null},Nu=e=>{let t=!1;const i=e.children;for(let o=0,s=i.length;o<s;++o){const r=i[o];if(r.isColumn){if(t=!0,!r.isMoving())return!1;continue}const n=Nu(r);if(n===!1)return!1;n===!0&&(t=!0)}return t||null},_u=(e,t)=>{let i=e.parent;if(i){let o=i.getPaddingLevel();for(;i&&i.providedColumnGroup.level+o>t;)i=i.parent,o=o>0?o-1:0}return i},zu=(e,t)=>{const i=Wt(t,!0,!0),o=i&&e.getColAfter(i),s=t.providedColumnGroup.level+t.getPaddingLevel();return o?_u(o,s):null},Ji="ROOT_NODE_ID",ls="rowGroupFooter_",Gn="detail_",Xi=ls+Ji;import{AgPromise as zS,KeyCode as WS}from"ag-stack";import{BaseDragAndDropService as US}from"ag-stack";function ui(e){return typeof e=="object"&&!!e.component}var qS={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},$S={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"],requiresBlockWrapper:!0},KS={name:"headerComponent",optionalMethods:["refresh"]},jS={name:"innerHeaderComponent"},ZS={name:"innerHeaderGroupComponent"},QS={name:"headerGroupComponent"},YS={name:"innerRenderer",supportsJsFunction:!0,optionalMethods:["afterGuiAttached"]},JS={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],supportsJsFunction:!0},XS={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],supportsJsFunction:!0},eb={name:"loadingCellRenderer",supportsJsFunction:!0},tb={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh","getValidationErrors","getValidationElement"]},ib={name:"tooltipComponent",requiresBlockWrapper:!0},Wu={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},ob={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},sb={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],supportsJsFunction:!0},rb={name:"loadingCellRenderer",supportsJsFunction:!0},nb={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],supportsJsFunction:!0},lb={name:"detailCellRenderer",optionalMethods:["refresh"],supportsJsFunction:!0};function ab(e,t){return e.getCompDetailsFromGridOptions($S,"agDragAndDropImage",t,!0)}function db(e,t,i){return e.getCompDetails(t,YS,void 0,i)}function cb(e,t,i){return e.getCompDetails(t,KS,"agColumnHeader",i)}function ub(e,t,i){return e.getCompDetails(t,jS,void 0,i)}function hb(e,t){const i=t.columnGroup.getColGroupDef();return e.getCompDetails(i,QS,"agColumnGroupHeader",t)}function gb(e,t,i){return e.getCompDetails(t,ZS,void 0,i)}function pb(e,t){return e.getCompDetailsFromGridOptions(sb,void 0,t,!0)}function fb(e,t){return e.getCompDetailsFromGridOptions(rb,"agLoadingCellRenderer",t,!0)}function mb(e,t){return e.getCompDetailsFromGridOptions(nb,"agGroupRowRenderer",t,!0)}function Cb(e,t){return e.getCompDetailsFromGridOptions(lb,"agDetailCellRenderer",t,!0)}function Nn(e,t,i){return e.getCompDetails(t,JS,void 0,i)}function vb(e,t,i){return e.getCompDetails(t,XS,void 0,i)}function Uu(e,t,i){return e.getCompDetails(t,eb,"agSkeletonCellRenderer",i,!0)}function qu(e,t,i){return e.getCompDetails(t,tb,"agCellEditor",i,!0)}function $u(e,t,i,o){const s=t.filter;return ui(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,Wu,o,i,!0)}function wb(e,t,i){return e.getCompDetails(t,qS,"agDateInput",i,!0)}function Sb(e,t,i){return e.getCompDetails(i??{},ib,"agTooltipComponent",t,!0)}function Ku(e,t,i,o){return e.getCompDetails(t,ob,o,i)}function as(e,t,i){return e.mergeParams(t,Wu,i)}var ju=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(ju||{}),bb=class extends I1{createEvent(e){return G(this.gos,e)}createDragImageComp(e){const{gos:t,beans:i}=this;return ab(i.userCompFactory,G(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){this.beans.log.warn(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const i={getContainer:e,isInterestedIn:o=>o===1||o===0,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}};function _n(e){return!!e.operator}import{_debounce as yb}from"ag-stack";import{AgPositionableFeature as Rb}from"ag-stack";var Zu=class extends k1{};import{AgComponentStub as Eb}from"ag-stack";var K=class extends L1{};import{_hasOwn as xb,_translate as Fb}from"ag-stack";var Qu={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,minDateInclusiveValidation:e=>`Date must be on or after ${e[0]}`,maxDateInclusiveValidation:e=>`Date must be on or before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`,minValueValidation:e=>`Must be greater than or equal to ${e[0]}`,maxValueValidation:e=>`Must be less than or equal to ${e[0]}`};function Yu(e){return xb(Qu,e)}function Ju(e,t){return t==null?"":Yu(t)?Te(e,t):e.getLocaleTextFunc()(t,t)}function Te(e,t,i){return Fb(e,Qu,t,i)}function zn(e,t,i){const{debounceMs:o}=t;return hi(t)?(o!=null&&e.warn(71),0):o??i}function hi(e){return(e.buttons?.indexOf("apply")??-1)>=0}function Xu(e,t,i){const o=t.getCustomOption(i);return o?e.getLocaleTextFunc()(o.displayKey,o.displayName):Ju(e,i)}function eh(e,t,i,o,s){let r=Te(e,i);if(typeof t=="function"){const n=Xu(e,s,o);r=t({filterOptionKey:o,filterOption:n,placeholder:r})}else typeof t=="string"&&(r=t);return r}var th=class extends K{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.positionableFeature=this.createBean(new Zu(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,i=this.params;this.params=t;const{source:o,state:s,additionalEventAttributes:r}=t;o==="colDef"&&this.updateParams(t,i);const n=this.state;this.state=s;const l=r?.fromAction;return(l&&l!=="apply"||s.model!==n.model||!this.areStatesEqual(s.state,n.state))&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=hi(e),this.setupApplyDebounced()}doesFilterPass(e){this.beans.log.warn(283);const{getHandler:t,model:i,column:o}=this.params;return t().doesFilterPass({...e,model:i,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return this.beans.log.warn(284),this.params.model!=null}setupApplyDebounced(){const e=zn(this.beans.log,this.params,this.defaultDebounceMs),t=yb(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return this.beans.log.warn(285),this.params.model}setModel(e,t){t||this.beans.log.warn(286);const{beans:i,params:o}=this;return i.colFilter.setModelForColumnLegacy(o.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:{valid:i=!0,model:o}}=this;if(!i)return!1;const s=!this.areModelsEqual(t.model,o);return s&&t.onAction("apply",e),s}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const i=this.getModelFromUi(),o={model:i,state:this.getState(),valid:this.canApply(i)};this.state=o;const{params:s,gos:r,eventSvc:n,applyActive:l}=this;s.onStateChange(o),s.onUiChange(this.getUiChangeEventParams()),r.get("enableFilterHandlers")||n.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),o.valid&&(e??(e=l?void 0:"debounce"),e==="immediately"?(this.debouncePending=!1,this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1})):e==="debounce"&&this.applyDebounced())}onUiCleared(){this.onUiChanged(this.applyActive?"prevent":"immediately")}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:i}=this;if(!t)return;const o=e==="floatingFilter"||e==="columnFilter";o?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return Te(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},Pb=["aggregation","filter","sort","pivot","columnVisibility","columnSizing","rowGroup"];import{AgPopupComponent as Db}from"ag-stack";var eo=class extends V1{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};import{LocalEventService as ih}from"ag-stack";var Wn="row-group-",ds="t-",cs="b-",Mb=0,ze=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Mb++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData??null:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling||this;if(e.rowPinned){const t=e.pinnedSibling;t&&(e=t,e.footer&&(e=e.sibling??e))}return e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){const e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,"set")}updateData(e){this.setDataCommon(e,"update")}_updateDataNoSibling(e){this.setDataCommon(e,"updateNoSibling")}setDataCommon(e,t){const{valueCache:i,eventSvc:o}=this.beans,s=this.data,r=t!=="set";this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,r);if(this.__localEventService?.dispatchEvent(n),t!=="updateNoSibling"){const a=this.sibling;if(a){a.data=e;const d=a.createDataChangedEvent(e,s,r);a.__localEventService?.dispatchEvent(d)}}o.dispatchEvent({type:"rowNodeDataChanged",node:this});const l=this.pinnedSibling;l&&(l.data=e,l.__localEventService?.dispatchEvent(l.createDataChangedEvent(e,s,r)),o.dispatchEvent({type:"rowNodeDataChanged",node:l}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return this.rowIndex==null?(this.beans.log.error(13),null):this.rowPinned==="top"?ds+this.rowIndex:this.rowPinned==="bottom"?cs+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const i=this.beans.selectionSvc,o=i?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i?.syncInRowNode(this,o);const r=this.__localEventService;if(r){const n=this.createDataChangedEvent(e,s,!1);r.dispatchEvent(n)}}setId(e){const t=this.beans,i=Bt(t);if(!i){this.id=e;return}const o=this.data;if(o==null){this.id=void 0;return}const s=this.parent?.getRoute()??[],r=i({data:o,parentKeys:s.length>0?s:void 0,level:this.level,rowPinned:this.rowPinned});this.id=r,r.startsWith(Wn)?t.log.error(14,{groupPrefix:Wn}):r===Ji&&t.log.error(331,{rowId:r})}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,i){this.beans.expansionSvc?.setExpanded(this,e,t,i)}setDataValue(e,t,i){const{colModel:o,valueSvc:s,gos:r,editSvc:n}=this.beans;if(e==null)return!1;let l=o.getCol(e);if(!l)return!1;l=mt(l,this);const a=s.getDisplayValue(l,this,"data",!1);if(r.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:h,rowPinned:g}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:l,colDef:l.colDef,data:u,node:this,oldValue:a,newValue:t,value:t,source:i}),!1}if(i!=="data"&&n&&!n.committing){const c=n.setDataValue({rowNode:this,column:l},t,i);if(c!=null)return c}const d=s.setValue(this,l,t,i);return this.dispatchCellChangedEvent(l,t,a),d&&this.pinnedSibling?.dispatchCellChangedEvent(l,t,a),d}getDataValue(e,t){const i=this.beans,o=i.colModel.getCol(e);if(!o)return;let s;if(t==="data"||!t){if(s=i.valueSvc.getValueFromData(mt(o,this),this,!1),s==null)return s}else{if(t==="transformed")return i.valueSvc.getTransformedValue(mt(o,this),this);const r=t==="data-raw",n=r||t==="value"?"data":t;if(s=i.valueSvc.getValue(mt(o,this),this,n,r),r||s==null)return s;if(typeof s=="object"&&o.aggFunc){if(typeof s.toNumber=="function")return s.toNumber();if("value"in s)return s.value}if(t!=="value")return s}if(o.allowFormula){const r=i.formula;r?.isFormula(s)&&(s=r.resolveValue(o,this))}return s}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){const o={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer){const t=this.sibling;return t?t.isSelected():!1}const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let i=0,o=t.length;i<o;++i)t[i].depthFirstSearch(e);e(this)}getAggregatedChildren(e,t){const i=this.beans;return i.aggChildrenSvc?.getAggregatedChildren(this,i.colModel.getCol(e),t)??[]}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,i="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:i})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){let i=this.__localEventService;i||(i=new ih,this.__localEventService=i),i.addEventListener(e,t)}__removeEventListener(e,t){const i=this.__localEventService;i&&(i.removeEventListener(e,t),i.noRegisteredListenersExist()&&(this.__localEventService=null))}addEventListener(e,t){if(this.beans.validation?.checkRowEvents(e),typeof t!="function")return;let i=this.__localEventService;i||(i=new ih,this.__localEventService=i);const o=this.beans.frameworkOverrides.wrapLocalListener?.(i,e,t)??t;i.addEventListener(e,o)}removeEventListener(e,t){const i=this.__localEventService;if(!i)return;const o=i.listenerWrapper?.unwrap(e,t)??t;i.removeEventListener(e,o),i.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(this.beans.log.warn(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.beans;t.editSvc?.releaseRowEdits(this);const i=this.pinnedSibling;if(i?.rowPinned&&t.pinnedRowModel?.pinRow(i,null),e===!0?this.clearRowTopAndRowIndex():e===!1?(this.setRowTop(null),this.setRowIndex(null)):(this.oldRowTop=null,this.rowTop=null,this.rowIndex=null,this.displayed=!1),!this.footer&&!(this.rowPinned&&i)){const o=this.detailNode;o&&o._destroy(e);const s=this.sibling;s&&s._destroy(e)}return!0}};function Un(e,t,i){return G(t,{type:i,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Tb=new Set(["__autoContentHeight","__autoHeights","__localEventService","__objectId","_groupData","_leafs","childStore","destroyed","groupValue","oldRowTop","pinnedSibling","rowHeight","rowHeightEstimated","rowPinned","sticky","treeNodeFlags","treeParent"]),oh=(e,t)=>{const i=new ze(t);for(const o of Object.keys(e))Tb.has(o)||(i[o]=e[o]);return i.oldRowTop=null,i},us=(e,t,i)=>{if(!i)return;let o=i.rowIndex;if(o==null)return;o+=t;const s=e.getRowCount();for(;o>=0&&o<s;){const r=e.getRow(o);if(!r||!r.footer&&!r.detail)return r;o+=t}},qn=e=>{let t=e;for(;t;){if(t.footer){t=t.sibling??t.parent;continue}if(t.rowIndex!=null&&!t.detail&&t.parent)return t;t=t.parent}return null},sh=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.hidden=new Set,this.queued=new Set,this.sorted=[],this.sortedValid=!0}getDisplayedCount(){return this.all.size-this.hidden.size}getSorted(){const e=this.sorted;return this.sortedValid||(this.sortedValid=!0,Ab(this.beans,this.all,this.hidden,e)),e}add(e,t){const i=this.all;i.has(e)||(i.add(e),t?this.hidden.add(e):this.sortedValid=!1)}delete(e){this.beans.editSvc?.releaseRowEdits(e),this.all.delete(e)&&(this.hidden.delete(e)||(this.sortedValid=!1))}getById(e){const t=this.hidden;for(const i of this.all)if(i.id==e&&!t.has(i))return i}refreshVisibility(){const{beans:e,hidden:t}=this;let i=!1;for(const o of this.all)nh(e,o.pinnedSibling)?t.has(o)||(t.add(o),o.setRowTop(null),o.setRowIndex(null),i=!0):i=t.delete(o)||i;return this.sortedValid=!1,i}},Ab=(e,t,i,o)=>{const{sortSvc:s,rowNodeSorter:r,gos:n}=e;o.length=0;let l;for(const d of t)i.has(d)||(lh(d)?l=d:o.push(d));const a=s?.getSortOptions()??[];if(o.sort((d,c)=>r?.compareRowNodes(a,d,c)||(d.pinnedSibling?.rowIndex??0)-(c.pinnedSibling?.rowIndex??0)),l){const d=li(n);d==="bottom"||d==="pinnedBottom"?o.push(l):o.unshift(l)}},rh=e=>{if(e.level===-1)return!0;const t=e.parent;return!!t?.childrenAfterSort?.includes(e)&&rh(t)},nh=(e,t)=>{const{gos:i,rowModel:o,filterManager:s}=e;return ht(i,o)?!o.getRowNode(t.id):i.get("pivotMode")&&!t.group?!0:!!s?.isAnyFilterPresent()&&!rh(t)},Ib=e=>!!e.footer&&e.level===-1,lh=e=>!!e.pinnedSibling&&Ib(e.pinnedSibling),ah=class extends y{constructor(){super(...arguments),this.userGrandTotalPinned=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new sh(t,"top"),this.bottom=new sh(t,"bottom");const i=()=>{const o=e.get("isRowPinned"),s=[];o&&e.get("enableRowPinning")&&t.rowModel.forEachNode(r=>this.pinLoaded(r,o(r),s),!0),this.dispatchPinningChanged(s)};Li(this,()=>{uh(this.top),uh(this.bottom),this.ensureRowHeightsValid()}),this.addManagedEventListeners({modelUpdated:({keepRenderedRows:o})=>{const s=[];this.emptyQueue(this.top,s),this.emptyQueue(this.bottom,s),this.pinGrandTotalRow(s);const r=this.top.refreshVisibility(),n=this.bottom.refreshVisibility()||r,l=this.refreshRowPositions();(!o||l||n||s.length)&&this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),ch(s)},columnRowGroupChanged:()=>{const o=this.detachPinnedRows(Lb);o.length&&this.dispatchPinningChanged(o)},rowNodeDataChanged:({node:o})=>{(e.get("isRowPinnable")?.(o)??!0)||this.pinRow(o,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.top.refreshVisibility(),this.bottom.refreshVisibility(),this.refreshRowPositions(),this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"})}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){const t=this.detachPinnedRows(e?hs:kb);e&&this.dispatchPinningChanged(t)}pinRow(e,t,i){if(t!=null&&e.destroyed)return;if(e.footer){if(e.level>-1)return;if(!(t==null&&!!(e.rowPinned?e.pinnedSibling:e)?.destroyed)){this.refreshGrandTotalPin(this.takeUserGrandTotalPin(t));return}}const o=i&&Hb(this.beans,e,i),s=[];for(const r of o??[e])this.collectPinChange(r,t,s);s.length&&this.dispatchPinningChanged(s)}isManual(){return!0}isEmpty(e){return this.getContainer(e).getDisplayedCount()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){const e=ph(this.beans,this.bottom),t=ph(this.beans,this.top)||e;return t&&this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),t}getPinnedTopTotalHeight(){return mh(this.top)}getPinnedBottomTotalHeight(){return mh(this.bottom)}getPinnedTopRowCount(){return this.top.getDisplayedCount()}getPinnedBottomRowCount(){return this.bottom.getDisplayedCount()}getPinnedTopRow(e){return this.top.getSorted()[e]}getPinnedBottomRow(e){return this.bottom.getSorted()[e]}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){const i=this.getContainer(e),o=i.getSorted();for(let s=0;s<i.getSorted().length;++s)t(o[s],s)}getPinnedState(){const e={top:dh(this.top),bottom:dh(this.bottom)},t=this.userGrandTotalPinned;return t&&e[t].push(Xi),e}setPinnedState(e){const{top:t,bottom:i}=this,o=t.queued,s=i.queued;o.clear(),s.clear();for(const l of e.bottom)s.add(l);for(const l of e.top)s.has(l)||o.add(l);let r=null;s.delete(Xi)?r="bottom":o.delete(Xi)&&(r="top"),this.takeUserGrandTotalPin(r);const n=this.detachPinnedRows(l=>{const a=l.pinnedSibling?.id;return hs(l)&&(a==null||!(o.has(a)||s.has(a)))});this.emptyQueue(t,n),this.emptyQueue(i,n),this.pinGrandTotalRow(n),this.dispatchPinningChanged(n)}getUserGrandTotalPinned(){return this.userGrandTotalPinned}setGrandTotalNode(e){this.grandTotalNode=e}resetGrandTotalPin(){const e=this.userGrandTotalPinned;this.userGrandTotalPinned=null,this.refreshGrandTotalPin(e!=null)}refreshGrandTotalPin(e){const t=[];this.pinGrandTotalRow(t),(e||t.length)&&this.dispatchPinningChanged(t)}takeUserGrandTotalPin(e){const t=li(this.gos);return!t||on(t)||!ie(this.gos)?!1:(this.userGrandTotalPinned=e,!0)}emptyQueue(e,t){const{queued:i,floating:o}=e,s=this.beans.rowModel;for(const r of i){const n=s.getRowNode(r);n&&(i.delete(r),this.pinLoaded(n,o,t))}}pinLoaded(e,t,i){e.footer?e.level===-1&&(this.takeUserGrandTotalPin(t),this.pinGrandTotalRow(i)):this.collectPinChange(e,t,i)}collectPinChange(e,t,i){const o=e.rowPinned?e:e.pinnedSibling,s=t?this.attachPinnedRow(e,t):this.detachPinnedRow(o);s&&i.push(s)}pinGrandTotalRow(e){const{grandTotalNode:t,pinnedGrandTotalNode:i}=this;if(!t&&!i)return;const o=on(li(this.gos))??this.userGrandTotalPinned,s=o&&t&&!t.destroyed?t:void 0;if(i?i.pinnedSibling===s&&i.rowPinned===o:!s)return;const r=this.detachPinnedRow(i);r&&r!==s&&e.push(r);let n;o&&s&&(n=fh(this.beans,s,o),this.getContainer(o).add(n,!1),e.push(s)),this.pinnedGrandTotalNode=n}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.all.has(e))return this.top;if(this.bottom.all.has(e))return this.bottom}detachPinnedRow(e){const t=e&&this.findPinnedRowNode(e);if(!t)return;t.delete(e);const i=e.pinnedSibling;return Vb(e),i}detachPinnedRows(e){const t=[];hh(this.top,e,t),hh(this.bottom,e,t);const i=[];for(let o=0,s=t.length;o<s;++o){const r=this.detachPinnedRow(t[o]);r&&i.push(r)}return i}attachPinnedRow(e,t){const i=e.rowPinned?e.pinnedSibling:e;if(!i||i.destroyed||i.pinnedSibling?.rowPinned===t)return;this.detachPinnedRow(i.pinnedSibling);const o=nh(this.beans,i);return this.getContainer(t).add(fh(this.beans,i,t),o),i}dispatchPinningChanged(e){this.refreshRowPositions(),this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),ch(e)}refreshRowPositions(){const e=this.beans,t=gh(e,this.top);return gh(e,this.bottom)||t}},hs=e=>!lh(e),kb=()=>!0,Lb=e=>!!e.group&&hs(e),dh=e=>{const t=[];for(const i of e.all){const o=i.pinnedSibling?.id;o!=null&&hs(i)&&t.push(o)}for(const i of e.queued)t.push(i);return t},ch=e=>{for(let t=0,i=e.length;t<i;++t)e[t].dispatchRowEvent("rowPinned")},uh=e=>{for(const t of e.all)t.setRowHeight(t.rowHeight,!0)},hh=(e,t,i)=>{for(const o of e.all)t(o)&&i.push(o)},gh=(e,t)=>{const i=t.getSorted();let o=0,s=!1;for(let r=0,n=i.length;r<n;++r){const l=i[r];if(s||(s=l.rowTop!==o),l.setRowTop(o),l.rowHeightEstimated||l.rowHeight==null){const a=gt(e,l).height;s||(s=l.rowHeight!==a),l.setRowHeight(a)}l.setRowIndex(r),o+=l.rowHeight}return s},ph=(e,t)=>{const i=t.getSorted();let o=0,s=!1;for(let r=0,n=i.length;r<n;++r){const l=i[r];if(l.rowHeightEstimated){const a=gt(e,l).height;s||(s=l.rowTop!==o||l.rowHeight!==a),l.setRowTop(o),l.setRowHeight(a),o+=a}}return s},fh=(e,t,i)=>{if(t.pinnedSibling)return t.pinnedSibling;const o=oh(t,e);o.setRowTop(null),o.setRowIndex(null),o.rowPinned=i;const s=i==="top"?ds:cs;return o.id=`${s}${i}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o},Vb=e=>{const t=e.pinnedSibling;t&&(e._destroy(!1),e.rowPinned=null,e.pinnedSibling=void 0,t.pinnedSibling=void 0,t.rowPinned=null)},Hb=(e,t,i)=>{const o=e.rowSpanSvc;return o?.isCellSpanning(i,t)?o.getCellSpan(i,t)?.spannedNodes:void 0},mh=e=>{const t=e.getSorted().at(-1);return t?t.rowTop+t.rowHeight:0},Ch=class extends y{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:new Map,order:[]},this.pinnedBottomRows={cache:new Map,order:[]},this.topHeight=0,this.bottomHeight=0}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),Li(this,()=>{vh(this.pinnedBottomRows.order),vh(this.pinnedTopRows.order),this.ensureRowHeightsValid()})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}ensureRowHeightsValid(){const e=this.beans,t=wh(e,this.pinnedBottomRows.order),i=wh(e,this.pinnedTopRows.order),o=gs(this.pinnedTopRows),s=gs(this.pinnedBottomRows);return!t&&!i&&o===this.topHeight&&s===this.bottomHeight?!1:(this.topHeight=o,this.bottomHeight=s,this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),!0)}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const i=this.getCache(t),o=i.cache;if(e===void 0){const u=i.order;for(let h=0,g=u.length;h<g;++h)u[h].clearRowTopAndRowIndex();i.order=[],o.clear();return}const s=Bt(this.beans),r=t==="top"?ds:cs,n=[],l=new Set;let a=0,d=-1;for(const u of e){const h=s?.({data:u,level:0,rowPinned:t})??r+this.nextId++;if(l.has(h)){this.warn(96,{id:h,data:u});continue}d++,l.add(h);const g=o.get(h);if(g!==void 0)g.data!==u&&g.updateData(u),a+=this.setRowTopAndRowIndex(g,a,d),n.push(g);else{const p=new ze(this.beans);p.id=h,p.data=u,p.rowPinned=t,a+=this.setRowTopAndRowIndex(p,a,d),o.set(h,p),n.push(p)}}const c=i.order;for(let u=0,h=c.length;u<h;++u){const g=c[u],p=g.id;l.has(p)||(g.clearRowTopAndRowIndex(),o.delete(p))}i.order=n}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(gt(this.beans,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return gs(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return gs(this.pinnedBottomRows)}getPinnedTopRowCount(){return this.pinnedTopRows.order.length}getPinnedBottomRowCount(){return this.pinnedBottomRows.order.length}getPinnedTopRow(e){return this.pinnedTopRows.order[e]}getPinnedBottomRow(e){return this.pinnedBottomRows.order[e]}getPinnedRowById(e,t){return this.getCache(t).cache.get(e)}forEachPinnedRow(e,t){const{cache:i,order:o}=this.getCache(e);for(let s=0,r=o.length;s<r;++s){const n=o[s];i.get(n.id)===n&&t(n,s)}}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getUserGrandTotalPinned(){}setGrandTotalNode(){}resetGrandTotalPin(){}};function gs(e){const t=e.order,i=t.length;if(i===0)return 0;const o=t[i-1];return o.rowTop+o.rowHeight}function vh(e){for(let t=0,i=e.length;t<i;++t){const o=e[t];o.setRowHeight(o.rowHeight,!0)}}function wh(e,t){let i=!1,o=0;for(let s=0,r=t.length;s<r;++s){const n=t[s];if(n.rowHeightEstimated){const l=gt(e,n).height;i||(i=l!==n.rowHeight),n.setRowHeight(l)}n.rowTop!==o&&(n.setRowTop(o),i=!0),o+=n.rowHeight}return i}var Sh=class extends y{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const i=e.get("enableRowPinning"),o=li(e),r=!!i||(o==="pinnedBottom"||o==="pinnedTop"),n=this.inner,l=r?n instanceof Ch:n instanceof ah;if(n&&l&&(n.resetGrandTotalPin(),this.destroyBean(n)),l||!n){const a=this.createManagedBean(r?new ah:new Ch);return this.inner=a,a.setGrandTotalNode(this.grandTotalNode),a.resetGrandTotalPin(),!0}return!1};this.addManagedPropertyListener("enableRowPinning",t),this.addManagedPropertyListener("grandTotalRow",()=>{t()||this.inner.resetGrandTotalPin()}),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,i){return this.inner.pinRow(e,t,i)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}getUserGrandTotalPinned(){return this.inner.getUserGrandTotalPinned()}setGrandTotalNode(e){return this.grandTotalNode=e,this.inner.setGrandTotalNode(e)}resetGrandTotalPin(){return this.inner.resetGrandTotalPin()}},bh=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(bh||{});import{FAST_TEST_TIMINGS as Bb,LocalEventService as Ob,_areEventsNear as Gb,_getFirstActiveTouch as $n,addTempEventHandlers as Nb,clearTempEventHandlers as _b,preventEventDefault as yh}from"ag-stack";var zb=500,Wb=Bb?0:550,Rh="__ag_Grid_Touch_Listener_State",to=e=>{const t=e;return t[Rh]??(t[Rh]={})},Ub=e=>{const t=to(e);return t.touchStartClaimed?!1:(t.touchStartClaimed=!0,!0)},Kn=(e,t)=>{const i=to(e);let o=i.handledEvents;if(!o)o=new Set,i.handledEvents=o;else if(o.has(t))return!1;return o.add(t),!0},wt=class{constructor(e,t){this.eElement=e,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1,this.longTapFired=!1,this.longTapTargetResolved=!1,this.touchStartEvent=null,this.listenerCounts={tap:0,doubleTap:0,longTap:0};const i=typeof t=="boolean"?{preventClick:t}:t;this.preventClick=i?.preventClick??!1,this.capture=i?.capture??!1,this.yieldsLongTap=i?.yieldsLongTap??!1,this.shouldHandleLongTap=i?.shouldHandleLongTap,this.onLongTapDetected=i?.onLongTapDetected,this.shouldTrackTouch=i?.shouldTrackTouch,this.getLongTapTarget=i?.getLongTapTarget}addEventListener(e,t){let i=this.eventSvc;if(!i){if(i===null)return;this.eventSvc=i=new Ob;const o=this.onTouchStart.bind(this);this.startListener=o,this.eElement.addEventListener("touchstart",o,{passive:!0,capture:this.capture})}i.addEventListener(e,t),this.listenerCounts[e]++}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t),this.listenerCounts[e]--}onTouchStart(e){if(this.touchStart||this.shouldTrackTouch?.(e)===!1||!this.capture&&!Ub(e))return;const t=e.touches[0];this.touchStart=t,this.touchStartEvent=e,this.registerLongTapCandidate(e);const i=this.handlers;if(!i.length){const o=this.eElement,s=o.ownerDocument??o,r=this.onTouchMove.bind(this),n=this.onTouchEnd.bind(this),l=this.onTouchCancel.bind(this),a=this.onContextMenu.bind(this),d={passive:!0},c={passive:!1};Nb(i,[o,"touchmove",r,d],[s,"touchcancel",l,d],[s,"touchend",n,c],[s,"contextmenu",a,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{if(this.longPressTimer=0,this.touchStart===t&&!this.moved){const o=this.isLongTapOwner(e,t)&&Kn(e,"longTap");this.moved=!0,this.longTapFired=o||!!this.onLongTapDetected;const s={type:"longTap",touchStart:t,touchEvent:e};this.onLongTapDetected?.(s),o&&this.eventSvc?.dispatchEvent(s)}},Wb)}onTouchMove(e){const{moved:t,touchStart:i}=this;if(!t&&i){const o=$n(i,e.touches);o&&!Gb(o,i,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;if(!t||!$n(t,e.changedTouches))return;const i=!!this.touchStartEvent&&to(this.touchStartEvent).handledEvents?.has("longTap");!this.moved&&!i&&(this.listenerCounts.tap>0&&Kn(e,"tap")&&this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t,e)),(this.preventClick||this.longTapFired)&&yh(e),this.cancel()}onTouchCancel(e){const t=this.touchStart;!t||!$n(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}onContextMenu(e){this.resolveLongTapTarget()&&this.canHandleLongTap()&&yh(e)}canHandleLongTap(){return this.longTapEligible??(this.longTapEligible=this.shouldHandleLongTap?.()??!0)}registerLongTapCandidate(e){if(this.listenerCounts.longTap===0)return;const t=to(e),i=t.longTapCandidates;i?i.push(this):t.longTapCandidates=[this]}isLongTapOwner(e,t){const i=to(e).longTapCandidates;let o;for(const s of i??[])if(s.canOwnLongTap(t))if(!o)o=s;else if(o.yieldsLongTap!==s.yieldsLongTap)o.yieldsLongTap&&(o=s);else{const r=o.resolveLongTapTarget(),n=s.resolveLongTapTarget();r!==n&&r.contains(n)&&(o=s)}return o===this}canOwnLongTap(e){return this.touchStart?.identifier===e.identifier&&!this.moved&&this.listenerCounts.longTap>0&&!!this.resolveLongTapTarget()&&this.canHandleLongTap()}resolveLongTapTarget(){if(!this.longTapTargetResolved){this.longTapTargetResolved=!0;const e=this.touchStart,t=this.touchStartEvent;this.longTapTarget=e&&t&&this.getLongTapTarget?this.getLongTapTarget(t,e):this.eElement instanceof Element?this.eElement:void 0}return this.longTapTarget}checkDoubleTap(e,t){let i=Date.now();const o=this.lastTapTime;o&&i-o<=zb&&this.listenerCounts.doubleTap>0&&Kn(t,"doubleTap")&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),i=null),this.lastTapTime=i}cancel(){this.clearLongPress(),_b(this.handlers),this.touchStart=null,this.touchStartEvent=null}clearLongPress(){this.longPressTimer!==0&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=0),this.moved=!1,this.longTapFired=!1,this.longTapEligible=void 0,this.longTapTarget=void 0,this.longTapTargetResolved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e,this.capture)),this.cancel(),this.eElement=null,this.eventSvc=null}},Eh=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(Eh||{});import{AgContext as qb,_createStyledRootElements as $b,_missing as Kb}from"ag-stack";function jb(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var Zb=["log","licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],xh=Object.fromEntries(Zb.map((e,t)=>[e,t]));function Qb(e,t){const i=(e.beanName?xh[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,o=(t.beanName?xh[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return i-o}function Yb(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}import{RefPlaceholder as St,_isVisible as Jb}from"ag-stack";import{RefPlaceholder as st,_setAriaColCount as Xb,_setAriaMultiSelectable as e3,_setAriaRole as t3,_setAriaRowCount as i3,_setDisplayed as o3}from"ag-stack";import{_createAgElement as s3}from"ag-stack";function O(e){return s3(e)}import{KeyCode as ps,_exists as Fh,_getActiveDomElement as r3}from"ag-stack";import{KeyCode as n3,_findFocusableElements as l3,_findNextFocusableElement as a3,_isKeyboardMode as d3,_isNothingFocused as c3}from"ag-stack";import{_exists as u3}from"ag-stack";function Ph(e){const{rowIndex:t,rowPinned:i,column:o}=e;return`${t}.${i??"null"}.${o.getId()}`}function fs(e,t){const i=e.column===t.column,o=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return i&&o&&s}function Dh(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(u3(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function Mh(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function jn(e){let t=0,i;const{pinnedRowModel:o,rowModel:s,pageBounds:r}=e;return o?.getPinnedTopRowCount()?i="top":s.getRowCount()?(i=null,t=r.getFirstRow()):o?.getPinnedBottomRowCount()&&(i="bottom"),i===void 0?null:{rowIndex:t,rowPinned:i}}function Zn(e){let t,i=null;const{pinnedRowModel:o,pageBounds:s}=e,r=o?.getPinnedBottomRowCount(),n=o?.getPinnedTopRowCount();return r?(i="bottom",t=r-1):e.rowModel.getRowCount()?t=s.getLastRow():n&&(i="top",t=n-1),t===void 0?null:{rowIndex:t,rowPinned:i}}function Re(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Ut(e,t){const i=e.spannedRowRenderer?.getCellByPosition(t);return i||e.rowRenderer.getRowByPosition(t)?.getCellCtrl(t.column)}function h3(e,t,i){const{rowModel:o,pinnedRowModel:s}=e;let r;return r??(r=o?.getRowNode(t)),i?r??(r=s?.getPinnedRowById(t,i)):(r??(r=s?.getPinnedRowById(t,"top")),r??(r=s?.getPinnedRowById(t,"bottom"))),r}function io(e,t,i=!1){const{rowIndex:o,rowPinned:s}=t,{pageBounds:r,pinnedRowModel:n,rowModel:l}=e;if(o===0)return s==="top"?null:s==="bottom"&&l.isRowsToRender()?{rowIndex:r.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(i){const a=s?void 0:l.getRow(o);return Th(e,a,!0)??{rowIndex:o-1,rowPinned:s}}return{rowIndex:o-1,rowPinned:s}}function Qn(e,t){const{pinnedRowModel:i,rowModel:o}=e,s=i?.getPinnedTopRowCount()??0,r=o.getRowCount(),{rowPinned:n,rowIndex:l}=t;return n==="top"?l:n==="bottom"?s+r+l:s+l}function Yn(e,t,i=!1){const{rowIndex:o,rowPinned:s}=t,{pageBounds:r,pinnedRowModel:n,rowModel:l}=e;if(g3(e,t))return s==="bottom"?null:s==="top"&&l.isRowsToRender()?{rowIndex:r.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(i){const a=s?void 0:l.getRow(o);return Th(e,a)??{rowIndex:o+1,rowPinned:s}}return{rowIndex:o+1,rowPinned:s}}function Th(e,t,i=!1){const{gos:o,rowRenderer:s}=e;if(!t?.sticky||!tn(o))return;const r=s.getStickyTopRowCtrls(),n=s.getStickyBottomRowCtrls(),l=!n.some(u=>u.rowNode.rowIndex===t.rowIndex);if(!(l?!i:i))return;const d=l?r:n,c=d.findIndex(u=>u.rowNode.rowIndex===t.rowIndex);if(!(c<=0))return{rowIndex:d[c-1].rowNode.rowIndex,rowPinned:null}}function g3(e,t){const{rowPinned:i,rowIndex:o}=t,{pinnedRowModel:s,pageBounds:r}=e;return i==="top"?(s?.getPinnedTopRowCount()??0)-1<=o:i==="bottom"?(s?.getPinnedBottomRowCount()??0)-1<=o:r.getLastRow()<=o}function Ah(e,t,i){t.addManagedElementListeners(i,{keydown:o=>{if(!o.defaultPrevented&&!m3(o)&&o.key===n3.TAB){const s=o.shiftKey;a3({beans:e,rootNode:i,backwards:s})||qt(e,s)&&o.preventDefault()}}})}function Ih(e,t){return e.ctrlsSvc.get("gridCtrl")?.focusInnerElement(t)??!1}function ve(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function oo(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function qt(e,t,i="auto"){const o=e.ctrlsSvc.get("gridCtrl");if(!o)return!1;const s=o.focusNextInnerContainer(t);return s===!0?!0:s===!1?s:i==="direct"?o.focusNextElementOutsideContainer(t):((i==="force"||!t&&!o.isDetailGrid()&&o.isFocusInsideGridBody())&&o.forceFocusOutOfContainer(t),!1)}function kh(e,t){const i=e.focusSvc,o=i.getFocusedCell();if(o&&t&&fs(o,t)){const{rowIndex:s,rowPinned:r,column:n}=t;c3(e)&&i.setFocusedCell({rowIndex:s,column:n,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!d3()})}}function p3(e,t){const i=e.getFocusableContainerName();return i==="gridBody"?t():Lh(e,()=>l3(e.getGui(),".ag-tab-guard").length>0)?i:null}function Lh(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var Vh="__ag_Grid_Skip_Focusable_Container";function f3(e){e[Vh]=!0}function m3(e){return e[Vh]===!0}import{AgManagedFocusFeature as C3}from"ag-stack";var Hh="__ag_Grid_Stop_Propagation";function bt(e){e[Hh]=!0}function Ae(e){return e[Hh]===!0}var gi={isStopPropagation:Ae,stopPropagation:bt},so=class extends H1{constructor(e,t){super(e,gi,t)}};function Bh(e){return e.ready?e.colsTreeDepth+1:-1}function Ee(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function pi(e,t,i){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getHeaderCtrlForColumn(t)?.getAnchorElementForMenu(i)}function ms(e,t,i){return()=>i.isConnected?i:e.ctrlsSvc.getHeaderRowContainerCtrl()?.getHtmlElementForColumnHeader(t)??i}function Oh(e,t){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getFloatingFilterCtrlForColumn(t)?.getAnchorElementForMenu()}function Jn(e){const{ctrlsSvc:t,colModel:i,filterManager:o}=e,s=t.getHeaderRowContainerCtrl()?.getRowCount(),r=Math.max(Bh(i),0)+(o?.hasFloatingFilters()?1:0);return(s??r)+(o?.getHeaderRowCount()??0)}function Xn(e){const t=[],i=e.ctrlsSvc.getHeaderRowContainerCtrl();if(!i)return t;const o=i.getGroupRowCount()||0;for(let s=0;s<o;s++){const r=i.getGroupRowCtrlAtIndex(s),n=t[s];if(r){const l=v3(e,r);(n==null||l>n)&&(t[s]=l)}}return t}function v3(e,t){let o=e.colModel.pivotMode?S3(e):Gh(e);const s=t.getHeaderCellCtrls();for(const r of s){const{column:n}=r,l=n.autoHeaderHeight;l!=null&&l>o&&n.isAutoHeaderHeight()&&(o=l)}return o}function el(e){let i=e.colModel.pivotMode?w3(e):ro(e);const o=e.visibleCols.allCols;for(let s=0,r=o.length;s<r;++s){const n=o[s],l=n.autoHeaderHeight;l!=null&&l>i&&n.isAutoHeaderHeight()&&(i=l)}return i}function ro(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function tl(e){return e.gos.get("floatingFiltersHeight")??ro(e)}function Gh(e){return e.gos.get("groupHeaderHeight")??ro(e)}function w3(e){return e.gos.get("pivotHeaderHeight")??ro(e)}function S3(e){return e.gos.get("pivotGroupHeaderHeight")??Gh(e)}function b3(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function y3(e){return e?.headerRowIndex!=null}function il(e,t){const i=e.getLeftStickyColumnContainerWidth(),o=e.bodyWidth,s=e.getRightStickyColumnContainerWidth();return t?{leftWidth:0,centerWidth:o+i+s,rightWidth:0}:{leftWidth:i,centerWidth:o,rightWidth:s}}function Nh(e,t,i,o){const{ePinnedLeft:s,eScrolling:r,ePinnedRight:n}=i,{leftWidth:l,centerWidth:a,rightWidth:d}=il(e,t);o.pinnedLeftWidth!==l&&(s.style.width=l+"px",s.style.display=l>0||t?"":"none",o.pinnedLeftWidth=l),o.centerWidth!==a&&(r.style.width=a+"px",o.centerWidth=a),o.pinnedRightWidth!==d&&(n.style.width=d+"px",n.style.display=d>0||t?"":"none",o.pinnedRightWidth=d)}function _h(e,t){const i=e.column,o=t.column;return i.pinnedLane-o.pinnedLane||(i.left??0)-(o.left??0)}var zh=class extends y{constructor(){super(...arguments),this.headerRowFocusFeatures=[]}setComp(e,t,i){this.comp=e,this.eGui=t,this.eGridViewport=i;const{beans:o}=this,{touchSvc:s,ctrlsSvc:r}=o;this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),this.setupHeaderHeight();const n=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:n}),s?.mockHeaderContextMenu(this,n),r.register("gridHeaderCtrl",this)}setHeaderRowFocusableElements(e){if(this.headerRowFocusFeatures=this.destroyBeans(this.headerRowFocusFeatures),!!this.beans.headerNavigation)for(const t of e)this.headerRowFocusFeatures.push(this.createManagedBean(new so(t,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})))}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:this.throttleToFrame(e),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const i=Xn(e).reduce((s,r)=>s+r,0),o=el(e);if(e.filterManager?.hasFloatingFilters()&&(t+=tl(e)),t+=i,t+=o,this.headerHeightWithBorder!==t){this.headerHeightWithBorder=t;const s=t+e.environment.getHeaderRowBorderWidth();this.eGridViewport.style.setProperty("--ag-internal-header-rows-height",`${s}px`),this.eGui.style.height=`${s}px`}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.pivotMode;this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const i=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",i)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,o=i!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:r,focusSvc:n}=s;(r.navigateHorizontally(o,!0,e)||!i&&n.focusOverlay(!1)||qt(s,i,"force"))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:i}=this.beans;switch(e.key){case ps.LEFT:t="LEFT";case ps.RIGHT:{Fh(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case ps.UP:t="UP";case ps.DOWN:{Fh(t)||(t="DOWN"),i.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:i,beans:o}=this;if(!t&&i.contains(r3(o)))return;t instanceof HTMLElement&&i.contains(t.closest(".ag-header-row"))||(o.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,i){const{menuSvc:o}=this.beans;if(!e&&!i||!o?.isHeaderContextMenuEnabled())return;const{target:s}=e??t;s instanceof Element&&!s.closest(".ag-header-cell, .ag-header-group-cell")&&o.showHeaderContextMenu(void 0,e,i)}};import{_ensureDomOrder as R3}from"ag-stack";import{_addOrRemoveAttribute as Wh,_setAriaRowIndex as E3,_setDomChildOrder as Cs}from"ag-stack";import{RefPlaceholder as Uh,_addStylesToElement as x3,_removeAriaSort as F3,_setAriaSort as P3}from"ag-stack";var ol=class extends K{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},D3={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},M3=class extends ol{constructor(e){super(D3,e),this.eResize=Uh,this.eHeaderCompWrapper=Uh,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=()=>{const o=this.ctrl.getSelectAllGui();o&&(this.eResize.insertAdjacentElement("afterend",o),this.addDestroyFunc(()=>o.remove()))},i={setWidth:o=>e.style.width=o,toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>x3(e,o),setAriaSort:o=>o?P3(e,o):F3(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>this.ctrl.getSelectAllGui()?.remove()};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.headerCompGui?.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(i=>this.afterCompCreated(t,i))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}};import{RefPlaceholder as qh,_addStylesToElement as T3,_setDisplayed as A3}from"ag-stack";import{KeyCode as I3,_getActiveDomElement as k3,_last as L3,_setAriaColSpan as V3}from"ag-stack";var H3=class extends y{};function fi(e,t){return e.compBean=t,t??e}function vs(e){const t=e.compBean;e.compBean=void 0,t?.isAlive()&&t.destroy()}var ws=class{constructor(){this.nextId=0,this.invalidatedUpTo=0}claim(){return this.invalidatedUpTo=this.nextId,this.provisionalClaim()}provisionalClaim(){const e=++this.nextId;return{isCurrent:()=>e>this.invalidatedUpTo}}supersede(){this.invalidatedUpTo=Math.max(this.invalidatedUpTo,this.nextId-1)}invalidate(){this.invalidatedUpTo=this.nextId}},$h="ag-column-header-edit-highlighted";import{KeyCode as We,_addOrRemoveAttribute as B3,_batchCall as O3,_exists as G3,_getActiveDomElement as Kh,_getVerticalPaddingAndBorder as N3,_normaliseQwertyAzerty as _3,_observeResize as z3,_setAriaColIndex as W3}from"ag-stack";function jh(e,t,i,o,s){if(e==null)return null;let r=e;if(o){let l;t===0?l=s.getLeftStickyColumnContainerWidth():t===2?l=s.getRightStickyColumnContainerWidth():l=s.bodyWidth,r=l-e-i}if(t===0)return r;const n=s.getLeftStickyColumnContainerWidth();return t===2?n+s.bodyWidth+r:n+r}var Zh=(e,t,i)=>!i&&(t||e===2),Qh=(e,t,i,o,s)=>i&&!o?s.getRightStickyColumnContainerWidth()-e-t:e;import{_missing as sl}from"ag-stack";var rl="ag-calculated-column",Yh="ag-calculated-column-highlighted",U3=[],q3=[rl],$3=[rl,Yh];function Jh(e,t){return t==null||!e?.isCalculatedCol?U3:t.isHighlightedColumn(e)?$3:q3}var K3="ag-column-first",j3="ag-column-last";function nl(e,t,i,o){const s=Jh(i,t.calculatedColsSvc);return sl(e)?s.length?[...s]:[]:[...s,...tg(e.headerClass,e,t.gos,i,o)]}function Z3(e,t,i,o){return sl(e)?[]:tg(e.toolPanelClass,e,t.gos,i,o)}function Xh(e,t,i){e.toggleCss(K3,i.isColAtEdge(t,"first")),e.toggleCss(j3,i.isColAtEdge(t,"last"))}function eg(e,t,i){if(!i.length){if(t)for(const s of t)e.toggleCss(s,!1);return}if(!t){for(const s of i)e.toggleCss(s,!0);return new Set(i)}const o=t;for(const s of i)o.has(s)?o.delete(s):e.toggleCss(s,!0);for(const s of o)e.toggleCss(s,!1);return new Set(i)}function Q3(e,t,i,o){return G(t,{colDef:e,column:i,columnGroup:o})}function tg(e,t,i,o,s){if(sl(e))return[];let r;if(typeof e=="function"){const n=Q3(t,i,o,s);r=e(n)}else r=e;return typeof r=="string"?[r]:Array.isArray(r)?[...r]:[]}var Y3=0,ll="headerCtrl",al=class extends y{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.diffIndex=0,this.isResizing=!1,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.compBean=void 0,this.lastFocusEvent=null,this.dragSource=null,this.drawnWidth=-1,this.drawnAriaColIndex=null,this.drawnPosition=null,this.drawnRightAnchored=!1,this.targetLeft=null,this.instanceId=e.getUniqueId()+"-"+Y3++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,i,o,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,i,o,s),this.beans.focusSvc.takeOwedHeaderFocus(this)&&this.focus(this.lastFocusEvent??void 0)}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader??{headerRowIndex:this.rowCtrl.rowIndex,column:this.column},o=i.getDefinition(),s=o?.suppressHeaderKeyboardEvent;if(!G3(s))return!1;const r=G(this.gos,{colDef:o,column:i,headerRowIndex:t,event:e});return!!s(r)}getWrapperHasFocus(){return Kh(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.drawnAriaColIndex=null,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let i;if(typeof t=="function"){const o=this.getHeaderClassParams();i=t(o)}else i=t;i=this.addHeaderStyleCleanup(i),i&&this.comp.setUserStyles(i)}addHeaderStyleCleanup(e){const t=this.userStyleKeys,i=e?Object.keys(e):[];if(this.userStyleKeys=i,!t?.length)return e;const o={};for(const s of t)i.includes(s)||(o[s]="");return{...o,...e}}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:i,compBean:o}=e,{beans:s}=this;let r=!1;const n=u=>{if(!r||!this.isAlive()||!o.isAlive())return;const h=N3(this.eGui),p=t.offsetHeight+h;if(u<5){const f=!t.isConnected,m=p==0;if(f||m){O3(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,p)};let l;const a=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),l=z3(this.beans,t,()=>n(0))},c=()=>{r=!1,l&&l(),this.comp.toggleCss("ag-header-cell-auto-height",!1),l=void 0,this.column.isAutoHeaderHeight()||this.setColHeaderHeight(this.column,null)};a(),o.addDestroyFunc(()=>c()),o.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),i&&i(a)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:i,eGui:o}=this;if(!e||!t||!o)return;Xh(e,t,i.visibleCols);const s=t.ariaColIndex;s!==this.drawnAriaColIndex&&(this.drawnAriaColIndex=s,W3(o,s))}addResizeAndMoveKeyboardListeners(e){const t=this.endKeyboardResize.bind(this);e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this),focusout:t}),e.addDestroyFunc(t)}refreshTabIndex(){const e=ve(this.beans);this.eGui&&B3(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){if(Ae(e))return;const t=e.defaultPrevented,i=e.key===We.LEFT||e.key===We.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey||Kh(this.beans)!==this.eGui)return;const o=(e.ctrlKey||e.metaKey)&&_3(e)===We.C;if(!o&&!i||t&&this.shouldStopEventPropagation(e))return;if(o)return this.beans.clipboardSvc?.copyToClipboard();if(e.preventDefault(),e.stopImmediatePropagation(),!e.altKey){const r=e.key===We.LEFT!==this.gos.get("enableRtl");this.moveHeader(r?"left":"right");return}if(!this.column.isResizable())return;window.clearTimeout(this.resizeToggleTimeout),this.isResizing=!0,this.resizeMultiplier+=1;const s=!!this.beans.colResize?.takesFromAdjacent(e.shiftKey);this.resizeHeader(this.getViewportAdjustedResizeDiff(e,s),s),this.resizeFeature?.toggleColumnResizing(!0)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.column.getPinned(),this)}getViewportAdjustedResizeDiff(e,t){const i=this.column,o=Vn(this.gos.get("enableRtl"),i.pinnedLane),s=(e.key===We.RIGHT?o:-o)*this.resizeMultiplier;return this.beans.pinnedCols?.limitResize(i,t,s)??s}onGuiKeyUp(){this.isResizing&&(this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>this.endKeyboardResize(),150))}endKeyboardResize(){!this.isResizing&&!this.resizeToggleTimeout||(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0,this.isResizing=!1,this.resizeMultiplier=1,this.resizeFeature?.toggleColumnResizing(!1))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case We.SPACE:case We.PAGE_DOWN:case We.PAGE_UP:case We.PAGE_HOME:case We.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=ll,{eGui:i,gos:o}=this;Vt(o,i,t,this),e.addDestroyFunc(()=>Vt(o,i,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e??null,this.beans.focusSvc.focusGridElement(t)):this.beans.focusSvc.deferFocus(this),!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const o=e??t,{menuSvc:s,gos:r}=this.beans;r.get("preventDefaultOnContextMenu")&&o.preventDefault(),s?.isHeaderContextMenuEnabled(i)&&s.showHeaderContextMenu(i,e,t,ms(this.beans,this.column,o.target)),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:i}=this;e.isColumn?i.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):i.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}refreshPosition(){if(!this.comp)return;const e=this.column.getActualWidth();e!==this.drawnWidth&&(this.drawnWidth=e,this.setWidth(e)),this.refreshLeft(e)}setWidth(e){this.comp.setWidth(`${e}px`)}setupPosition(){const{beans:e,column:t}=this,i=t.getActualWidth();this.drawnWidth=i,this.setWidth(i),this.drawnPosition=null;const{gos:o,colAnimation:s}=e,r=t.oldLeft;if(r==null||!s?.isActive()||o.get("suppressColumnMoveAnimation")){this.refreshLeft(i);return}const n=t.left;this.targetLeft=n,this.placeAt(r,i),s.executeNextVMTurn(()=>{this.targetLeft===n&&this.placeAt(n,this.drawnWidth)})}refreshLeft(e){const t=this.column.left;this.targetLeft=t,this.placeAt(t,e)}placeAt(e,t){const i=this.eGui;if(!i)return;const{gos:o,visibleCols:s}=this.beans,r=this.column.pinnedLane,n=de(o,"print"),l=o.get("enableRtl"),a=n?jh(e,r,t,l,s):e;if(a==null)return;const d=Zh(r,l,n),c=Qh(a,t,d,l,s);if(c===this.drawnPosition&&d===this.drawnRightAnchored)return;this.drawnPosition=c,this.drawnRightAnchored=d;const u=i.style;u.left=d?"":`${c}px`,u.right=d?`${c}px`:""}clearComponent(){this.removeDragSource(),this.userStyleKeys=void 0,this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){this.beans.focusSvc.dropOwedHeaderFocus(this),vs(this),super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}};function ig(e,t){t?e.style.setProperty("display","none"):e.style.removeProperty("display")}function og(e,t){t==null?e.style.removeProperty("max-height"):e.style.setProperty("max-height",`${t}px`),e.classList.toggle("ag-header-cell-comp-wrapper-limited-height",t!=null)}var J3=class extends al{constructor(){super(...arguments),this.componentTooltip={},this.headerCompGuard=new ws,this.ariaEl=null,this.drawnAriaColSpan=null,this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,i,o,s){const{column:r,beans:n}=this,{colNames:l,colHover:a,rangeSvc:d,colResize:c}=n;this.comp=e,s=fi(this,s),this.ariaEl=t.querySelector("[role=columnheader]")??t,this.drawnAriaColSpan=null,this.setGui(t,s),this.setupPosition(),this.displayName=l.getDisplayNameForColumnGroup(r,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:o,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s,o),s.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const u=r.getProvidedColumnGroup().getLeafColumns();this.addLeafColumnListeners(s,u),a?.createHoverFeature(s,u,t),d?.createRangeHighlightFeature(s,r,e),c?this.resizeFeature=s.createManagedBean(c.createGroupResizeFeature(e,i,r)):e.setResizableDisplayed(!1),s.createManagedBean(new so(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,u),s.addManagedPropertyListener("cellSelection",()=>{this.refreshSelectableCss(),this.refreshAnnouncement()}),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>{this.headerCompGuard.invalidate(),this.clearComponentTooltip(),this.clearComponent()})}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.getDefinition();return G(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");i!=null?i===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addLeafColumnListeners(e,t){e.addManagedEventListeners({columnPinned:({columns:i})=>{i&&t.some(o=>i.includes(o))&&this.refreshHeaderStyles()}})}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),i=t[0]===e,o=L3(t)===e;if(!i&&!o)return;const s=e.getHighlighted(),r=this.rowCtrl.getHeaderCellCtrls().some(a=>a.column.isMoving());let n=!1,l=!1;if(r){const a=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;i&&(a?l=d:n=c),o&&(a?n=c:l=d)}this.comp.toggleCss("ag-header-highlight-before",n),this.comp.toggleCss("ag-header-highlight-after",l)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged();const e=this.ariaEl;if(e===null)return;const t=this.column,i=Wt(t,!1,!0),o=i?i.ariaColIndex-t.ariaColIndex+1:1;o!==this.drawnAriaColSpan&&(this.drawnAriaColSpan=o,V3(e,o>1?o:void 0))}setWidth(e){super.setWidth(e),this.comp.toggleCss("ag-hidden",e===0)}resizeHeader(e,t){this.resizeFeature?.resizeByKey(e,t)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}createUserCompParams(){const e=this.beans,{gos:t,enterpriseMenuFactory:i}=e,o=this.column,s=o.getProvidedColumnGroup(),r=this.headerCompGuard.provisionalClaim();return G(t,{displayName:this.displayName,columnGroup:o,setExpanded:n=>{zi(this.beans,s,n,"gridInitializing")},setTooltip:(n,l)=>{t.assertModuleRegistered("Tooltip",3),r.isCurrent()&&this.setComponentTooltip(n,l)},showColumnMenu:(n,l)=>i?.showMenuAfterButtonClick(s,n,"columnMenu",l,{getEventSource:ms(e,o,n)}),showColumnMenuAfterMouseClick:(n,l)=>i?.showMenuAfterMouseEvent(s,n,"columnMenu",l,void 0,ms(e,o,n.target)),eGridHeader:this.eGui})}setupUserComp(){const e=hb(this.beans.userCompFactory,this.createUserCompParams());e&&(this.headerCompGuard.supersede(),this.comp.setUserCompDetails(e))}attemptUserCompRefresh(){const e=this.comp.getUserCompInstance();return e?.refresh?e.refresh(this.createUserCompParams()):!1}addHeaderMouseListeners(e,t){const{column:i,beans:{rangeSvc:o}}=this,s=a=>this.handleMouseOverChange(a.type==="mouseenter"),r=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",i.getProvidedColumnGroup()),n=a=>this.handleContextMenuMouseEvent(a,void 0,i.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:s,mouseleave:s,click:r,contextmenu:n}),this.refreshSelectableCss();const l=o?.createHeaderGroupCellMouseListenerFeature(this.column,t);l&&e.createManagedBean(l)}refreshSelectableCss(){this.comp.toggleCss("ag-header-group-cell-selectable",pt(this.gos))}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this,this.tooltipFeature,()=>this.componentTooltip)}setComponentTooltip(e,t){this.componentTooltip={value:e,shouldDisplay:t},this.tooltipFeature?.refreshTooltip()}clearComponentTooltip(){this.componentTooltip={}}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i,headerNameChanged:()=>this.refreshDisplayName()});const o=t.groupId;e.addManagedEventListeners({columnHeaderNameChanged:s=>{s.column&&this.refreshDisplayName()},columnHeaderEditHighlightChanged:s=>{(!s.groupId||s.groupId===o)&&this.refreshEditHighlight()}}),this.refreshEditHighlight()}refreshEditHighlight(){this.comp.toggleCss($h,!!this.beans.colHeaderEditSvc?.isHighlightedGroup(this.column.getProvidedColumnGroup()))}refreshDisplayName(){this.displayName=this.beans.colNames.getDisplayNameForColumnGroup(this.column,"header"),this.attemptUserCompRefresh()||(this.clearComponentTooltip(),this.setupUserComp()),this.tooltipFeature?.refreshTooltip(),this.refreshAnnouncement()}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles(),this.refreshAnnouncement()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),i=nl(t,this.beans,null,e);e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&i.push("ag-header-cell-wrap-text"));for(const o of i)this.comp.toggleCss(o,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const r of o)e.addManagedListeners(r,{movingChanged:s});s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:i,expandable:o,gos:s,beans:r}=this,n=pt(s);if(e.key==I3.ENTER){if(n&&!e.altKey)r.rangeSvc?.handleColumnSelection(i,e);else if(o){const l=!i.isExpanded(),a=i.getProvidedColumnGroup();if(zi(r,a,l,"uiColumnExpanded"),!i.isEmptyGroup())return;const d=a.displayInstances?.find(c=>!c.isEmptyGroup());d&&r.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:a.getLevel(),column:d}})}}}refreshAnnouncement(){let e;const{gos:t,expandable:i}=this,o=pt(t),s=this.getLocaleTextFunc();o&&i?e=s("ariaColumnGroupCellSelectionAndExpansion","Press Enter to toggle selection for all visible cells in this column group. Press ALT ENTER to expand or collapse this column group"):o?e=s("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group"):i&&(e=s("ariaColumnGroupExpansion","Press ENTER to expand or collapse this column group")),this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:i}=this;!i||!t.contains(k3(e))||e.ariaAnnounce?.announceValue(i,"columnHeader")}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.colDef.suppressMovable||e.colDef.lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}},X3={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},ey=class extends ol{constructor(e){super(X3,e),this.eResize=qh,this.eHeaderCompWrapper=qh}postConstruct(){const e=this.getGui(),t=(o,s)=>s!=null?e.setAttribute(o,s):e.removeAttribute(o),i={toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>T3(e,o),setHeaderWrapperHidden:o=>ig(this.eHeaderCompWrapper,o),setHeaderWrapperMaxHeight:o=>og(this.eHeaderCompWrapper,o),setResizableDisplayed:o=>A3(this.eResize,o),setWidth:o=>e.style.width=o,setAriaExpanded:o=>t("aria-expanded",o),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(i,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const i=this.getGui(),o=e.getGui(),s=this.headerGroupComp;s&&(s.getGui().remove(),this.destroyBean(s)),this.eHeaderCompWrapper.appendChild(o),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}};import{RefPlaceholder as dl,_addStylesToElement as ty,_setDisplayed as iy}from"ag-stack";var oy={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},sy=class extends ol{constructor(e){super(oy,e),this.eFloatingFilterBody=dl,this.eButtonWrapper=dl,this.eButtonShowMainFilter=dl}postConstruct(){const e=this.getGui(),t={toggleCss:(i,o)=>this.toggleCss(i,o),setUserStyles:i=>ty(e,i),addOrRemoveBodyCssClass:(i,o)=>this.eFloatingFilterBody.classList.toggle(i,o),setButtonWrapperDisplayed:i=>iy(this.eButtonWrapper,i),setCompDetails:i=>this.setCompDetails(i),getFloatingFilterComp:()=>this.compPromise,setWidth:i=>e.style.width=i,setMenuIcon:i=>this.eButtonShowMainFilter.appendChild(i)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp?.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached?.()}}},ry=(e,t)=>(e.getCtrl().column.left??0)-(t.getCtrl().column.left??0),ny=(e,t)=>_h(e.getCtrl(),t.getCtrl()),ly=class extends K{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={},this.pinnedWidthsCache={pinnedLeftWidth:void 0,centerWidth:void 0,pinnedRightWidth:void 0},this.ePinnedLeftCells=O({tag:"div",cls:"ag-grid-pinned-left-cells",role:"presentation"}),this.ePinnedLeftWrapper=O({tag:"div",cls:"ag-grid-container-wrapper",role:"presentation"}),this.ePinnedLeftCells.appendChild(this.ePinnedLeftWrapper),this.eScrollingCells=O({tag:"div",cls:"ag-grid-scrolling-cells",role:"presentation"}),this.ePinnedRightCells=O({tag:"div",cls:"ag-grid-pinned-right-cells",role:"presentation"}),this.ePinnedRightWrapper=O({tag:"div",cls:"ag-grid-container-wrapper",role:"presentation"}),this.ePinnedRightCells.appendChild(this.ePinnedRightWrapper),this.getGui().append(this.ePinnedLeftCells,this.eScrollingCells,this.ePinnedRightCells)}postConstruct(){this.setRowIndex(this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,i)=>this.setHeaderCtrls(t,i),refreshPinnedCellGroupWidths:()=>this.updatePinnedCellGroupWidths(),setWidth:t=>this.getGui().style.width=t,setRowIndex:t=>this.setRowIndex(t),setTabIndex:t=>Wh(this.getGui(),"tabindex",t),setAriaHidden:t=>Wh(this.getGui(),"aria-hidden",t?"true":null)};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;this.headerComps={};for(const o of e){const s=o.instanceId;let r=i[s];delete i[s],r??(r=this.createHeaderComp(o));const n=this.getHeaderCellGroup(o);r.getGui().parentElement!==n&&n.appendChild(r.getGui()),this.headerComps[s]=r}if(Object.values(i).forEach(o=>{o.getGui().remove(),this.destroyBean(o)}),this.updatePinnedCellGroupWidths(),t){if(this.gos.get("domLayout")==="print"){const r=Object.values(this.headerComps).sort(ry);Cs(this.eScrollingCells,r.map(n=>n.getGui()));return}const o=Object.values(this.headerComps);o.sort(ny);const s=[[],[],[]];for(let r=0,n=o.length;r<n;++r){const l=o[r];s[l.getCtrl().column.pinnedLane].push(l.getGui())}Cs(this.ePinnedLeftWrapper,s[0]),Cs(this.eScrollingCells,s[1]),Cs(this.ePinnedRightWrapper,s[2])}}getHeaderCellGroup(e){if(this.gos.get("domLayout")==="print")return this.eScrollingCells;const t=e.column.pinnedLane;return t===0?this.ePinnedLeftWrapper:t===2?this.ePinnedRightWrapper:this.eScrollingCells}updatePinnedCellGroupWidths(){const e=this.gos.get("domLayout")==="print";Nh(this.beans.visibleCols,e,{ePinnedLeft:this.ePinnedLeftCells,eScrolling:this.eScrollingCells,ePinnedRight:this.ePinnedRightCells},this.pinnedWidthsCache)}setRowIndex(e){const t=this.getGui();E3(t,e),t.classList.toggle("ag-header-row-not-first",e!==1)}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new ey(e);break;case"filter":t=new sy(e);break;default:t=new M3(e);break}return this.createBean(t),t.setParentComponent(this),t}};import{KeyCode as cl,_getActiveDomElement as ay,_isKeyboardMode as dy,_setDisplayed as cy}from"ag-stack";var sg=class extends al{constructor(){super(...arguments),this.refreshFunctions={},this.ariaDescriptionProperties=new Map,this.componentTooltip={},this.headerCompGuard=new ws}wireComp(e,t,i,o,s){this.comp=e;const{column:r,beans:n}=this,{colResize:l,colHover:a,rangeSvc:d}=n,c=fi(this,s);this.setGui(t,c),this.updateState(),this.setupPosition(),this.setupMovingCss(c),this.refreshPinnedEdges(),this.setupMenuClass(c),this.setupSortableClass(c),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:o,checkMeasuringCallback:g=>this.setRefreshFunction("measuring",g),compBean:c}),this.addColumnHoverListener(c),this.setupFilterClass(c),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(c),this.setupSelectAll(c),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=c.createManagedBean(l.createResizeFeature(r,i,e,this)):cy(i,!1),a?.createHoverFeature(c,[r],t),d?.createRangeHighlightFeature(c,r,e),c.createManagedBean(new so(t,{shouldStopEventPropagation:g=>this.shouldStopEventPropagation(g),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(c),c.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),c.addManagedPropertyListener("cellSelection",()=>this.refreshAria()),c.addManagedListeners(r,{colDefChanged:()=>this.refresh(),headerNameChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const u=()=>this.checkDisplayName(),h=r.colId;if(c.addManagedEventListeners({columnValueChanged:u,columnRowGroupChanged:u,columnPivotChanged:u,columnPinned:({columns:g})=>{g?.includes(r)&&(this.refreshHeaderStyles(),this.refreshFunctions.headerClasses?.())},headerHeightChanged:this.onHeaderHeightChanged.bind(this),columnHeaderEditHighlightChanged:g=>{(!g.colId||g.colId===h)&&this.refreshEditHighlight()}}),this.refreshEditHighlight(),n.showValuesAsSvc){const g=()=>this.refreshAriaShowValuesAs();c.addManagedListeners(r,{columnStateUpdated:g}),c.addManagedEventListeners({columnRowGroupChanged:g,columnPivotChanged:g,columnPivotModeChanged:g})}c.addDestroyFunc(()=>{this.headerCompGuard.invalidate(),this.clearComponentTooltip(),this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses?.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){const i=this.column;this.beans.colResize?.resizeColumn(i,i.actualWidth+e,t,!0)}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return G(t.gos,{colDef:i,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.headerCompGuard.supersede(),this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.headerCompGuard.provisionalClaim(),t=this.createParams(e),i=this.column.colDef;return cb(this.beans.userCompFactory,i,t)}createParams(e){const{beans:t,column:i}=this,{menuSvc:o,sortSvc:s,colFilter:r,gos:n}=t;return G(n,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!o?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!r&&(!this.openFilterEnabled||ge(this.gos)),showColumnMenu:(a,d)=>{o?.showColumnMenu({column:this.column,buttonElement:a,getButtonElement:()=>pi(t,i),positionBy:"button",onClosedCallback:d})},showColumnMenuAfterMouseClick:(a,d)=>{o?.showColumnMenu({column:this.column,mouseEvent:a,getEventSource:ms(t,i,a.target),positionBy:"mouse",onClosedCallback:d})},showFilter:a=>{o?.showFilterMenu({column:this.column,buttonElement:a,getButtonElement:()=>pi(t,i,!0),containerType:"columnFilter",positionBy:"button"})},progressSort:a=>{s?.progressSort(this.column,!!a,"uiColumnSorted")},setSort:(a,d)=>{s?.setSortForColumn(this.column,pe(a),!!d,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(a,d)=>{n.assertModuleRegistered("Tooltip",3),e.isCurrent()&&this.setComponentTooltip(a,d)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===cl.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===cl.ENTER?this.onEnterKeyDown(e):e.key===cl.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1);const t=this.beans.rowNumbersSvc;t&&this.getWrapperHasFocus()&&t.handleKeyDownOnHeader(this.column,e)}onEnterKeyDown(e){const{column:t,gos:i,sortable:o,beans:s}=this;let r=!1;(e.ctrlKey||e.metaKey)&&(r=this.showMenuOnKeyPress(e,!0)),r||(!e.altKey&&pt(i)?s.rangeSvc?.handleColumnSelection(t,e):o&&s.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();return rg(i)&&i.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),dy()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(){const e=this.beans.tooltipSvc?.setupHeaderTooltip(this,this.tooltipFeature,()=>this.componentTooltip);this.tooltipFeature=e,e&&this.setRefreshFunction("tooltip",()=>e.refreshTooltip())}setComponentTooltip(e,t){this.componentTooltip={value:e,shouldDisplay:t},this.tooltipFeature?.refreshTooltip()}clearComponentTooltip(){this.componentTooltip={}}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.colDef,i=nl(t,this.beans,this.column,null);this.userHeaderClasses=eg(this.comp,this.userHeaderClasses,i)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshEditHighlight(){this.comp.toggleCss($h,!!this.beans.colHeaderEditSvc?.isHighlightedColumn(this.column))}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):(this.clearComponentTooltip(),this.setCompDetails(e))}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.colDef;return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}refreshPinnedEdges(){const{comp:e,column:t}=this;e&&(e.toggleCss("ag-header-cell-last-left-pinned",t.isLastLeftPinned()),e.toggleCss("ag-header-cell-first-right-pinned",t.isFirstRightPinned()))}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:()=>{this.refreshAriaSort(),this.announceAriaDescription()}})}setupFilterClass(e){const t=()=>{const i=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",i),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.colDef.wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,i=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:o}=this,s=Xn(this.beans),r=s.reduce((h,g)=>h+g,0)===0;if(i.toggleCss("ag-header-parent-hidden",r),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.toggleCss("ag-header-span-height",!1),i.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:n,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();i.toggleCss("ag-header-span-height",n>0);const a=el(o);if(n===0){i.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${a}px`);return}i.toggleCss("ag-header-span-total",l);const d=(this.column.getFirstRealParent()?.getLevel()??-1)+1,c=s.length-d;let u=0;for(let h=0;h<c;h++)u+=s[s.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${a+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:i,comp:o,sortable:s,gos:r}=this,n=this.getLocaleTextFunc(),l=t.sortSvc;if(s){const c=l?.getDisplaySort(i)??null;o.setAriaSort(uy(c)),e=pt(r)?n("ariaSortableColumnWithCellSelection","Press ALT ENTER to sort"):n("ariaSortableColumn","Press ENTER to sort")}else o.setAriaSort();const a=l?.getDisplaySortIndex(i),d=l?.getDisplaySortCount()??0;if(a!=null&&d>1){const c=String(a+1),u=String(d),h=n("ariaSortPriority","Sort priority ${priority} of ${count}",[c,u]).replaceAll("${priority}",c).replaceAll("${count}",u);e=e?`${h}. ${e}`:h}this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:i}=this;t&&!ge(i)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaShowValuesAs(){const e=this.getLocaleTextFunc(),t=this.beans.showValuesAsSvc?.getActiveModeLabel(this.column);this.setAriaDescriptionProperty("showValuesAs",t?`${e("ariaColumnShowValuesAs","Showing Values As")} ${t}`:null)}refreshAriaCellSelection(){let e=null;const{gos:t,column:i}=this;pt(t)&&!fe(i)&&(e=this.getLocaleTextFunc()("ariaColumnCellSelection","Press Enter to toggle selection for all visible cells in this column")),this.setAriaDescriptionProperty("cellSelection",e)}refreshAriaCalculatedColumn(){let e=null;this.column.isCalculatedCol&&(e=this.getLocaleTextFunc()("ariaCalculatedColumn","Calculated column")),this.setAriaDescriptionProperty("calculatedColumn",e)}setAriaDescriptionProperty(e,t){const i=this.ariaDescriptionProperties;t!=null?i.set(e,t):i.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:i}=this;if(!t.contains(ay(e)))return;const o=Array.from(i.keys()).sort((s,r)=>s==="filter"?-1:r.charCodeAt(0)-s.charCodeAt(0)).map(s=>i.get(s)).join(". ");e.ariaAnnounce?.announceValue(o,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaShowValuesAs(),this.refreshAriaCellSelection(),this.refreshAriaCalculatedColumn()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),i=()=>{const{column:s,beans:{headerNavigation:r}}=this;this.setActiveHeader(!0),r?.onHeaderClicked(s),this.dispatchColumnMouseEvent("columnHeaderClicked",s)},o=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:o})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return rg(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function rg(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}function uy(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}var hy=0,ul=class extends y{constructor(e,t){super(),this.rowIndex=e,this.type=t,this.instanceId=hy++,this.comp=null,this.compBean=void 0,this.allCtrls=[],this.renderedHeaderRowsVersion=-1,this.retainedFocusedCtrl=null;let i="ag-header-row-column";t==="group"?i="ag-header-row-group":t==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=de(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,i=!0){this.comp=e,t=fi(this,t),i&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged());const o=this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.rowWidth;o!=null&&e.setWidth(`${o}px`),this.refreshPinnedCellGroupWidths(),this.addEventListeners(t),this.refreshAccessibility()}refreshAccessibility(){const{comp:e,beans:t,gos:i}=this;if(!e)return;const o=this.allCtrls.length>0;e.setAriaHidden(!o),e.setTabIndex(o&&!ve(t)?i.get("tabIndex"):void 0)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),i=this.onDisplayedColumnsChanged.bind(this),o=this.refreshAccessibility.bind(this),s=this.refreshPinnedCellGroupWidths.bind(this);e.addManagedEventListeners({displayedColumnsWidthChanged:s,leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,displayedColumnsChanged:i,virtualColumnsChanged:r=>this.onVirtualColumnsChanged(r.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t,overlayExclusiveChanged:o}),e.addManagedPropertyListeners(["suppressHeaderFocus"],o),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",r=>{this.isEnsureDomOrder=r.currentValue,this.onVirtualColumnsChanged(!1,!0)}),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){const e=de(this.gos,"print"),t=e!==this.isPrintLayout;this.isPrintLayout=e,this.onVirtualColumnsChanged(!1,t),t&&this.refreshCellPositions(),this.onRowHeightChanged()}refreshCellPositions(){const e=this.allCtrls;for(let t=0,i=e.length;t<i;++t)e[t].refreshPosition()}refreshPinnedEdges(e){const t=e&&this.ctrlsById?.get(e.getUniqueId());t instanceof sg&&t.column===e&&t.refreshPinnedEdges()}setRowWidth(e){this.comp?.setWidth(`${e}px`),this.refreshPinnedCellGroupWidths()}refreshPinnedCellGroupWidths(){this.comp?.refreshPinnedCellGroupWidths()}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(`${e}px`),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Xn(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[s]};e+=t[s]}const i=el(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:i};e+=i;const o=tl(this.beans);return{topOffset:e,rowHeight:o}}onVirtualColumnsChanged(e=!1,t=!1){if(!this.comp)return;const i=this.beans.colViewport.headerRowsVersion;if(!t&&i===this.renderedHeaderRowsVersion&&this.retainedFocusedCtrl?.column.displayed!==!1)return;this.renderedHeaderRowsVersion=i;const o=this.allCtrls.length>0,s=this.getUpdatedHeaderCtrls(),r=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(s,r,e),o!==s.length>0&&this.refreshAccessibility()}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const s of t)this.recycleAndCreateHeaderCtrls(s,this.ctrlsById,e);const i=s=>s.column.displayed&&this.beans.focusSvc.isHeaderWrapperFocused(s);let o=null;if(e)for(const[s,r]of e)i(r)?(this.ctrlsById.set(s,r),o=r):this.destroyBean(r);return this.allCtrls=Array.from(this.ctrlsById.values()),this.retainedFocusedCtrl=o,o&&this.allCtrls.sort(_h),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){if(e.isEmptyGroup())return;const o=e.getUniqueId();let s;if(i&&(s=i.get(o),i.delete(o)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new sg(e,this));break}t.set(o,s)}getColumnsInViewport(){const e=[];return this.appendComponentsToRender(0,e),this.appendComponentsToRender(1,e),this.appendComponentsToRender(2,e),e}appendComponentsToRender(e,t){const{colViewport:i}=this.beans,o=this.type==="group"?i.getHeadersToRender(e,this.rowIndex):i.getColumnHeadersToRender(e);if(o)for(let s=0,r=o.length;s<r;++s)t.push(o[s])}focusHeader(e,t){const i=this.allCtrls.find(s=>s.column==e);return i?i.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,vs(this),super.destroy()}},ng=class extends y{constructor(){super(...arguments),this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.rowWidth=null}setComp(e,t,i=t){this.comp=e,this.eViewport=i;const{ctrlsSvc:o,colModel:s,colMoves:r}=this.beans;this.setupDragAndDrop(r,t);const n=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:n,advancedFilterEnabledChanged:n}),o.register("headerRowContainerCtrl",this),s.ready&&this.refresh()}setRowWidths(e){if(e===this.rowWidth)return;this.rowWidth=e;const t=this.groupsRowCtrls;for(let i=0,o=t.length;i<o;++i)t[i].setRowWidth(e);this.columnsRowCtrl?.setRowWidth(e),this.filtersRowCtrl?.setRowWidth(e)}refreshCellPositions(){const e=this.groupsRowCtrls;for(let t=0,i=e.length;t<i;++t)e[t].refreshCellPositions();this.columnsRowCtrl?.refreshCellPositions(),this.filtersRowCtrl?.refreshCellPositions()}refreshPinnedEdgeCells(e,t,i,o){const s=this.columnsRowCtrl;s&&(s.refreshPinnedEdges(e),s.refreshPinnedEdges(t),s.refreshPinnedEdges(i),s.refreshPinnedEdges(o))}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:i,visibleCols:o}=this.beans;let s=0;const r=t.getFocusHeaderToUseAfterRefresh(),n=()=>{const u=o.headerGroupRowCount;s=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const p=this.createBean(new ul(g,"group"));this.groupsRowCtrls.push(p)}}},l=()=>{const u=s++;this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new ul(u,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},a=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters();const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new ul(h,"filter"))},d=this.getAllCtrls();n(),l(),a();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,r),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=i=>i?.getHeaderCellCtrls().find(o=>o.column===e);if(e.isColumn)return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let i=0;i<this.groupsRowCtrls.length;i++){const o=t(this.groupsRowCtrls[i]);if(o)return o}}getFloatingFilterCtrlForColumn(e){return this.filtersRowCtrl?.getHeaderCellCtrls().find(t=>t.column===e)}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,i){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,i):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const i=e?.createBodyDropTarget(t);i&&this.createManagedBean(i)}restoreFocusOnHeader(e,t){t&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}},gy=class extends y{constructor(e,t,i){super(),this.eHeaderWrapper=e,this.eGridViewport=t,this.setHeaderRowFocusableElements=i,this.headerRowComps={}}postConstruct(){const e={setCtrls:i=>this.setCtrls(i),setViewportScrollLeft:i=>{}};this.createManagedBean(new ng).setComp(e,this.eHeaderWrapper,this.eGridViewport)}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={};let i=null;const o=[];for(const s of e){const r=s.instanceId,n=t[r];delete t[r];const l=n??this.createBean(new ly(s));this.headerRowComps[r]=l;const a=l.getGui();o.push(a),a.parentElement!==this.eHeaderWrapper&&this.eHeaderWrapper.appendChild(a),R3(this.eHeaderWrapper,a,i),i=a}this.setHeaderRowFocusableElements(o);for(const s of Object.values(t))this.destroyRowComp(s)}},py={tag:"div",cls:"ag-header",attrs:{role:"presentation"}},fy=class extends y{constructor(e,t){super(),this.eTopSection=e,this.eGridViewport=t,this.eHeaderWrapper=O(py)}postConstruct(){this.eTopSection.prepend(this.eHeaderWrapper);const e={toggleCss:(t,i)=>this.eHeaderWrapper.classList.toggle(t,i)};this.gridHeaderCtrl=this.createManagedBean(new zh),this.gridHeaderCtrl.setComp(e,this.eHeaderWrapper,this.eGridViewport),this.createManagedBean(new gy(this.eHeaderWrapper,this.eGridViewport,t=>this.gridHeaderCtrl?.setHeaderRowFocusableElements(t)))}destroy(){this.gridHeaderCtrl=void 0,this.eHeaderWrapper.remove(),super.destroy()}},Ie={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"};function lg(e){return e==="autoHeight"?Ie.AUTO_HEIGHT:e==="print"?Ie.PRINT:Ie.NORMAL}var hl=class extends y{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"};this.view.updateLayoutClasses(lg(e),t)}};import{RefPlaceholder as my,_getScrollLeft as ag,_setFixedHeight as Ss,_setFixedWidth as Cy,_setScrollLeft as vy}from"ag-stack";import{RefPlaceholder as dg,_isIOSUserAgent as wy,_isMacOsUserAgent as Sy}from"ag-stack";var gl=16,cg=class extends K{constructor(e,t){super(),this.direction=t,this.eViewport=dg,this.eContainer=dg,this.hideTimeout=0,this.invisibleScrollbarListenersAdded=!1,this.queueSetScrollVisible=this.throttleToFrame(()=>this.setScrollVisible()),this.setTemplate(e)}postConstruct(){const e=this.onScrollVisibilityChanged.bind(this);this.addManagedEventListeners({scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Sy()||wy())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}refreshInvisibleScrollbar(){const e=this.beans.scrollVisibleSvc.isInvisibleScrollbar();e!==void 0&&(this.invisibleScrollbar=e,e&&!this.invisibleScrollbarListenersAdded&&(this.invisibleScrollbarListenersAdded=!0,this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),i=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){this.refreshInvisibleScrollbar(),this.queueSetScrollVisible()}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},by={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eEndSpacer",cls:"ag-body-horizontal-scroll-end-spacer"}]},ug=class extends cg{constructor(){super(by,"horizontal"),this.contentWidth=null,this.eEndSpacer=my,this.setScrollVisibleDebounce=0}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct(),this.addManagedEventListeners({pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}refreshInvisibleScrollbar(){const e=this.invisibleScrollbar;this.enableRtl=this.gos.get("enableRtl"),super.refreshInvisibleScrollbar(),this.invisibleScrollbar!==e&&this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar){this.getGui().style.bottom="";return}const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}setContentWidth(e){const t=Math.max(e,1);t!==this.contentWidth&&(this.contentWidth=t,this.eContainer.style.width=`${t}px`)}setScrollVisible(){this.enableRtl=this.gos.get("enableRtl");const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,r=i?0:o===0&&t?gl:o,n=()=>{if(!this.isAlive())return;this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",!!t),Ss(this.getGui(),r),Ss(this.eViewport,r),Ss(this.eContainer,r),Ss(this.eEndSpacer,r);const l=this.getVerticalSpacerWidth();Cy(this.eEndSpacer,l),this.eEndSpacer.style.display=l>0?"":"none",this.eViewport.style.width=l>0?`calc(100% - ${l}px)`:"100%",r||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0}),this.syncScrollPosition()};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(n,100):n()}getVerticalSpacerWidth(){const e=this.beans.ctrlsSvc.getGridBodyCtrl();if(e)return e.getVerticalScrollbarWidth();const t=this.scrollVisibleSvc;if(!t.verticalScrollShowing)return 0;const i=t.getScrollbarWidth()||0;return i>0?i:this.invisibleScrollbar?16:0}getScrollPosition(){return ag(this.eViewport,this.enableRtl)}syncScrollPosition(){const e=this.beans.ctrlsSvc.getGridBodyCtrl();e&&this.setScrollPosition(ag(e.eGridViewport,this.enableRtl))}setScrollPosition(e){vy(this.eViewport,e,this.enableRtl)}},yy={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:ug};import{RefPlaceholder as Ry,_observeResize as Ey,_setFixedWidth as pl}from"ag-stack";var xy={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eSpacer",cls:"ag-body-vertical-scroll-start-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},hg=class extends cg{constructor(){super(xy,"vertical"),this.eSpacer=Ry,this.queueContainerHeightSync=this.throttleToFrame(()=>this.syncContainerHeight())}postConstruct(){super.postConstruct();const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this);const t=this.queueContainerHeightSync;e.whenReady(this,({gridBodyCtrl:i})=>{this.addDestroyFunc(Ey(this.beans,i.eGridViewport,t))}),this.addManagedEventListeners({rowContainerHeightChanged:this.syncContainerHeight.bind(this),headerHeightChanged:this.onScrollVisibilityChanged.bind(this),pinnedRowsChanged:t,pinnedHeightChanged:t,pinnedRowDataChanged:t}),this.addManagedPropertyListeners(["suppressHorizontalScroll","enableRtl"],this.onScrollVisibilityChanged.bind(this))}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,i=this.invisibleScrollbar,o=this.beans.ctrlsSvc.getGridBodyCtrl(),s=e.getScrollbarWidth()||0,r=t?o?.getVerticalScrollbarWidth()??s:0,n=r===0&&i?gl:r,l=o?.getHorizontalScrollbarHeight()??0,a=o?.getHeaderRowsOffset()??0,d=this.getGui();d.style.bottom=`${l}px`,this.eSpacer.style.height=`${a}px`,this.toggleCss("ag-scrollbar-invisible",!!i),pl(d,n),pl(this.eViewport,n),pl(this.eContainer,n),this.setDisplayed(t,{skipAriaHidden:!0}),this.queueContainerHeightSync()}syncContainerHeight(){const e=this.beans.ctrlsSvc.getGridBodyCtrl();if(!e)return;const t=e.eGridViewport.clientHeight,i=e.getScrollContentHeight(t),o=this.eViewport.clientHeight,s=t-o;this.eContainer.style.height=`${Math.max(1,i-s)}px`,this.setScrollPosition(e.scrollFeature.getVerticalScrollPositionForSync())}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e){this.eViewport.scrollTop=e}},Fy={selector:"AG-FAKE-VERTICAL-SCROLL",component:hg};import{_debounce as Py,_getInnerWidth as gg,_getScrollLeft as Dy,_isElementChildOfClass as fl,_setScrollLeft as My}from"ag-stack";import{Direction as Ue,_debounce as bs,_getInnerHeight as Ty,_getInnerWidth as Ay,_getScrollLeft as yt,_isIOSUserAgent as pg,_setScrollLeft as ys}from"ag-stack";var qe="Viewport",fg="fakeVScrollComp",ml=["fakeHScrollComp"],Iy=[...ml,qe],mg=100,Cl=150,ky=class extends y{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=0,this.nextScrollTop=0,this.scrollTop=0,this.pendingFakeVScrollTop=null,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eGridViewport=e,this.resetLastHScrollDebounced=bs(this,()=>this.lastScrollSource[Ue.Horizontal]=null,Cl),this.resetLastVScrollDebounced=bs(this,()=>this.lastScrollSource[Ue.Vertical]=null,Cl)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eGridViewport,{scroll:()=>{e(),t()}}),this.ctrlsSvc.whenReady(this,i=>{this.fakeVScrollComp=i.fakeVScrollComp,this.fakeHScrollComp=i.fakeHScrollComp,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.eGridViewport,{scroll:this.onHScroll.bind(this,qe)});for(const e of ml)this.fakeHScrollComp.onScrollCallback(this.onHScroll.bind(this,e))}addVerticalScrollListeners(){const e=this.gos.get("debounceVerticalScrollbar"),t=e?bs(this,this.onVScroll.bind(this,qe),mg):this.onVScroll.bind(this,qe),i=e?this.debounceFakeVScroll():this.onVScroll.bind(this,fg);this.addManagedElementListeners(this.eGridViewport,{scroll:t}),this.fakeVScrollComp.onScrollCallback(i)}debounceFakeVScroll(){const e=bs(this,()=>{this.pendingFakeVScrollTop==null&&this.fakeVScrollComp.getScrollPosition()!==this.eGridViewport.scrollTop||(this.pendingFakeVScrollTop=null,this.onVScroll(fg))},mg);return()=>{const t=this.fakeVScrollComp.getScrollPosition();this.pendingFakeVScrollTop=t===this.eGridViewport.scrollTop?null:t,e()}}getVerticalScrollPositionForSync(){return this.pendingFakeVScrollTop??this.eGridViewport.scrollTop}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.fakeHScrollComp!=null&&(e??(e=yt(this.eGridViewport,this.enableRtl)),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of Iy){if(this.lastScrollSource[Ue.Horizontal]===t)continue;const i=this.getViewportForSource(t);ys(i,e,this.enableRtl)}}getViewportForSource(e){return e===qe?this.eGridViewport:this.fakeHScrollComp.eViewport}isControllingVScroll(e){const t=this.lastScrollSource[Ue.Vertical];return t==null?(this.lastScrollSource[Ue.Vertical]=e,!0):t===e}isControllingHScroll(e){const t=this.lastScrollSource[Ue.Horizontal];return t==null?(this.lastScrollSource[Ue.Horizontal]=e,!0):t===e}onHScroll(e){const t=this.getViewportForSource(e);let i=yt(t,this.enableRtl);if(i===this.scrollLeft&&(e!==qe||i===this.fakeHScrollComp.getScrollPosition())||!this.isControllingHScroll(e))return;const o=this.clampHorizontalScrollPosition(i);if(Math.abs(o-i)>.1&&(ys(t,Math.abs(o),this.enableRtl),i=yt(t,this.enableRtl)),this.shouldBlockHorizontalScroll(i)){this.resetLastHScrollDebounced();return}e!==qe&&(ys(this.eGridViewport,Math.abs(i),this.enableRtl),i=yt(this.eGridViewport,this.enableRtl)),this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){const{nextScrollTop:t,fakeVScrollComp:i}=this,o=e===qe,s=o?this.eGridViewport.scrollTop:i.getScrollPosition();if(s===t&&(!o||i.getScrollPosition()===t)||!this.isControllingVScroll(e))return;let r=s;if(this.shouldBlockVerticalScroll(r)){this.resetLastVScrollDebounced();return}e===qe?this.fakeVScrollComp.setScrollPosition(r):(this.eGridViewport.scrollTop=s,r=this.eGridViewport.scrollTop,this.invalidateVerticalScroll(),r!==s&&this.fakeVScrollComp.setScrollPosition(r));const{animationFrameSvc:n}=this;n?.setScrollTop(r),this.nextScrollTop=r,n?.active?n.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.fakeHScrollComp.getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(Ue.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.ctrlsSvc.getGridBodyCtrl()?.updateColumnViewport(!0,e))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===Ue.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Cl)}shouldBlockVerticalScroll(e){if(!pg())return!1;const t=Ty(this.eGridViewport),{scrollHeight:i}=this.eGridViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){return pg()?Math.abs(this.clampHorizontalScrollPosition(e)-e)>.1:!1}redrawRowsAfterScroll(){this.fireScrollEvent(Ue.Vertical)}checkScrollLeft(){const e=yt(this.eGridViewport,this.enableRtl);let t=!1;for(const i of ml){const o=this.getViewportForSource(i);if(yt(o,this.enableRtl)!==e){t=!0;break}}t&&this.onHScroll(qe)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){e=this.clampHorizontalScrollPosition(e),ys(this.eGridViewport,Math.abs(e),this.enableRtl),e=yt(this.eGridViewport,this.enableRtl),this.doHorizontalScroll(e)}getMaxHorizontalScrollLeft(){const e=this.ctrlsSvc.getGridBodyCtrl();if(!e){const s=Ay(this.eGridViewport);return Math.max(0,this.eGridViewport.scrollWidth-s)}const t=e.getHorizontalViewportWidth(),i=e.isPinnedWidthOverflowingViewport(t),o=Math.max(e.getHorizontalContentWidth(i),t);return Math.max(0,o-t)}clampHorizontalScrollPosition(e){const t=this.getMaxHorizontalScrollLeft();return Lt(e,0,t)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eGridViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:s}=this,r=this.getBodyViewportHeight(o);return{top:s,bottom:s+r}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eGridViewport;this.lastScrollTop=e,this.lastOffsetHeight=t;const i=this.getBodyViewportHeight(t);return{top:e,bottom:e+i}}getApproximateVScollPosition(){if(this.lastScrollTop>=0&&this.lastOffsetHeight>=0){const e=this.getBodyViewportHeight(this.lastOffsetHeight);return{top:this.scrollTop,bottom:this.scrollTop+e}}return this.getVScrollPosition()}getBodyViewportHeight(e){const t=this.ctrlsSvc.getGridBodyCtrl();return t?t.getBodyViewportHeight(e):e}getHScrollPosition(){return this.ctrlsSvc.getGridBodyCtrl()?.getHorizontalScrollPosition()??{left:0,right:0}}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.beans.scrollVisibleSvc.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=yt(this.eGridViewport,this.enableRtl);return this.setHorizontalScrollPosition(t+e),this.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){const{rowModel:i}=this.beans,o=i.getRowCount();let s=-1;for(let r=0;r<o;r++){const n=i.getRow(r);if(typeof e=="function"){if(n&&e(n)){s=r;break}}else if(e===n||e===n.data){s=r;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,i=0){if(de(this.gos,"print"))return;const{rowModel:o}=this.beans,s=o.getRowCount();if(typeof e!="number"||e<0||e>=s){this.warn(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:r,pageBounds:n,rowContainerHeight:l,rowRenderer:a}=this.beans;r.wrapIncoming(()=>{const d=this.ctrlsSvc.getGridBodyCtrl(),c=o.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:p,stickyBottomHeight:f}=d,m=c.rowTop,w=c.rowHeight,v=n.getPixelOffset(),S=c.rowTop-v,C=S+c.rowHeight,b=this.getVScrollPosition(),R=l.divStretchOffset,x=b.top+R,D=b.bottom+R,A=D-x,L=l.getScrollPositionForPixel(S),H=l.getScrollPositionForPixel(C-A),re=Math.min((L+H)/2,S),$=x+p>S,ne=D-f<C;let j=null;t==="top"?j=L-p:t==="bottom"?j=H+f:t==="middle"?j=re:$?j=L-p:ne&&(H-L>A?j=L-p:j=H+f),j!==null&&(this.setVerticalScrollPosition(j),a.redraw({afterScroll:!0})),u=m!==c.rowTop||w!==c.rowHeight,h=p!==d.stickyTopHeight||f!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),i<10&&(c?.stub||this.beans.rowAutoHeight?.areRowsMeasured()===!1)){const p=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const f=this.getVScrollPosition().top;p!==f&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=o.getRowCount())&&this.ensureIndexVisible(e,t,i+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:i,frameworkOverrides:o}=this.beans,s=i.getCol(e);if(!s||s.isPinned()||!s.displayed)return;const r=this.ctrlsSvc.getGridBodyCtrl()?.getCenterWidth()??0,n=this.getPositionedHorizontalScroll(s,t,r);o.wrapIncoming(()=>{const l=this.ctrlsSvc.getGridBodyCtrl();n!==null&&l?.setHorizontalScrollLeft(n),l?.updateColumnViewport(!1,void 0,r),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t,i){const o=this.ctrlsSvc.getGridBodyCtrl(),s=e.getLeft(),r=e.getActualWidth();if(t==="middle")return s+r/2-i/2;if(t==="start")return s;if(t==="end")return s+r-i;const n=o?.getHorizontalScrollLeft()??0;return n>s||i<r?s:n+i<s+r?s+r-i:null}};import{_isInDOM as Ly,_observeResize as Vy}from"ag-stack";import{_getInnerHeight as Hy,_getInnerWidth as Cg,_observeResize as By}from"ag-stack";var Oy=class extends y{constructor(e){super(),this.centerContainerCtrl=e,this.scheduleCenterViewportResize=this.throttleToFrame(()=>this.onCenterViewportResized()),this.scheduleViewportGeometryRefresh=this.throttleToFrame(()=>this.onViewportGeometryChanged()),this.scheduleScrollVisibilityRefresh=this.throttleToFrame(()=>this.scrollVisibleSvc.refresh())}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl,this.listenForResize()});const e=this.scheduleViewportGeometryRefresh;this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this),scrollVisibilityChanged:this.onViewportGeometryChanged.bind(this),pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:e}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:i}=this;if(!i)return;t.registerViewportResizeListener(this.scheduleCenterViewportResize);const o=By(e,t.eContainer,this.scheduleScrollVisibilityRefresh);this.addDestroyFunc(()=>o())}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onViewportGeometryChanged(){this.gridBodyCtrl&&this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.gridBodyCtrl)if(this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans,i=this.gridBodyCtrl,o=window.getComputedStyle(i.eGridViewport);i.refreshViewportWidth(Cg(i.eGridViewport,o)),e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls(o);const s=i.getReportedCenterWidth();t&&s!==t.flexViewportWidth&&(i.cancelColumnWidthAnimation(),t.refreshFlexedColumns({viewportWidth:s,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(e){const t=this.gridBodyCtrl;if(!t)return;const i=t.eGridViewport,o=e??window.getComputedStyle(i);t.refreshViewportWidth(Cg(i,o)),this.scrollVisibleSvc.refresh(),this.checkBodyHeight(Hy(i,o)),this.onHorizontalViewportChanged(),t.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(e){const t=this.gridBodyCtrl;if(!t)return;const i=t.getBodyViewportHeight(e);this.bodyHeight!==i&&(this.bodyHeight=i,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}onHorizontalViewportChanged(){this.gridBodyCtrl?.updateColumnViewport()}};import{KeyCode as le,_isEventFromPrintableCharacter as Gy,_isEventFromThisInstance as vg,_isEventSupported as wg,_normaliseQwertyAzerty as Ny}from"ag-stack";function no(e,t,i,o){const s=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return Sg(e,t,i,o,s)}function _y(e,t,i,o){const s=t?.suppressMouseEventHandling;return Sg(e,void 0,i,o,s)}function Sg(e,t,i,o,s){return s?s(G(e,{column:t,node:i,event:o})):!1}function bg(e,t,i){let o=t;for(;o;){const s=en(e,o,i);if(s)return s;o=o.parentElement}return null}var Rs="cellCtrl";function Es(e,t){return bg(e,t,Rs)}var xs="renderedRow";function yg(e,t){return bg(e,t,xs)}function vl(e,t,i,o,s){const r=o?o.colDef.suppressKeyboardEvent:void 0;if(!r)return!1;const n=G(e,{event:t,editing:s,column:o,node:i,data:i.data,colDef:o.colDef});return!!(r&&r(n))}function Rg(e){const{pinnedRowModel:t,rowModel:i,rangeSvc:o,visibleCols:s}=e;if(!o||s.allCols.length===0)return;const r=t?.isEmpty("top")??!0,n=t?.isEmpty("bottom")??!0,l=r?null:"top";let a,d;n?(a=null,d=i.getRowCount()-1):(a="bottom",d=(t?.getPinnedBottomRowCount()??0)-1),o.setCellRange({rowStartIndex:0,rowStartPinned:l,rowEndIndex:d,rowEndPinned:a})}var zy=class extends y{constructor(e){super(),this.element=e,this.mouseDownEvent="mousedown",this.pendingTouchDown=null}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){wg("pointerdown")?this.mouseDownEvent="pointerdown":wg("touchstart")&&(this.mouseDownEvent="touchstart");const e=["dblclick","contextmenu","mouseover","mouseout","click",this.mouseDownEvent];for(const t of e){const i=this.processMouseEvent.bind(this,t);this.addManagedElementListeners(this.element,{[t]:i})}}processMouseEvent(e,t){if(!vg(this.beans,t))return;const i=Ae(t);if(e===this.mouseDownEvent){if(this.pendingTouchDown=!i&&Wy(t)?t:null,this.pendingTouchDown)return}else(e==="click"||e==="contextmenu")&&this.confirmPendingTouchDown(t.target);i||this.dispatchMouseEvent(e,t)}confirmPendingTouchDown(e){const t=this.pendingTouchDown;this.pendingTouchDown=null,t?.target===e&&this.dispatchMouseEvent(this.mouseDownEvent,t)}dispatchMouseEvent(e,t){const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);if(e==="contextmenu"){if(!i&&!o)return;i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,i)}else i&&i.onMouseEvent(e,t),o&&o.onMouseEvent(e,t)}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Es(t,e),rowCtrl:yg(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,i){const o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!vl(this.gos,i,e.rowNode,e.column,o)&&t==="keydown"&&(!o&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,o),Gy(i)&&e.processCharacter(i)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const{rowNode:o}=e,r=this.beans.focusSvc.getFocusedCell()?.column;!vl(this.gos,i,o,r,!1)&&t==="keydown"&&this.processFullWidthRowKeyDown(e,i,r),t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}processFullWidthRowKeyDown(e,t,i){switch(t.key){case le.PAGE_HOME:case le.PAGE_END:case le.PAGE_UP:case le.PAGE_DOWN:this.beans.navigation?.handlePageScrollingKey(t,!0);return;case le.LEFT:case le.RIGHT:if(!this.gos.get("embedFullWidthRows"))return;case le.UP:case le.DOWN:e.onKeyboardNavigate(t);return;case le.F2:this.processFullWidthRowNoteShortcut(e,t,i,this.beans.notesSvc);return;case le.TAB:e.onTabKeyDown(t);return;case le.SPACE:if(t.target!==e.getCurrentRowElement())return;Je(this.gos)&&this.beans.selectionSvc?.handleSelectionEvent(t,e.rowNode,"spaceKey"),t.preventDefault();return;default:}}processFullWidthRowNoteShortcut(e,t,i,o=this.beans.notesSvc){if(!t.shiftKey||!o?.hasDataSource())return;const s=e.rowNode,r=e.findInfoForEvent(t);let n;if(r){const{pinned:a}=r;n={rowNode:s,location:"fullWidthRow",pinned:a==="left"||a==="right"?a:void 0}}else i&&(n={rowNode:s,column:i});if(!n)return;const l=o.getNoteAccess(n);l&&(!l.isSuppressed||l.canView)&&(o.showNote(l.params,!0),t.preventDefault())}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!vg(this.beans,e))return;const i=Ny(e),{clipboardSvc:o,undoRedo:s}=this.beans;if(i===le.A)return this.onCtrlAndA(e);if(i===le.C)return this.onCtrlAndC(o,e);if(i===le.D)return this.onCtrlAndD(o,e);if(i===le.V)return this.onCtrlAndV(o,e);if(i===le.X)return this.onCtrlAndX(o,e);if(i===le.Y)return this.onCtrlAndY(s);if(i===le.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:i,selectionSvc:o},gos:s}=this;i&&Ne(s)&&!cS(s)&&t.isRowsToRender()?Rg(this.beans):o&&o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:eu(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}};function Wy(e){return e.type==="touchstart"?!0:"pointerType"in e&&e.pointerType!=="mouse"&&e.pointerType!=="pen"}var Uy=class extends y{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.getAdjustedUiContainerHeight(),i=t!=null?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},wl=["scrolling","pinnedTop","pinnedBottom","stickyTop","stickyBottom"],qy=e=>e.topRowCtrls,$y=e=>e.bottomRowCtrls,Ky=e=>e.allRowCtrls,jy=e=>e.getStickyTopRowCtrls(),Zy=e=>e.getStickyBottomRowCtrls(),Qy=e=>e.getCtrls("top"),Yy=e=>e.getCtrls("center"),Jy=e=>e.getCtrls("bottom"),Xy={scrolling:{name:"grid-scrolling",getRowCtrls:Ky,getSpannedRowCtrls:Yy},pinnedTop:{name:"grid-pinned-top-rows",getRowCtrls:qy,getSpannedRowCtrls:Qy},pinnedBottom:{name:"grid-pinned-bottom-rows",getRowCtrls:$y,getSpannedRowCtrls:Jy},stickyTop:{name:"grid-sticky-top-rows",getRowCtrls:jy},stickyBottom:{name:"grid-sticky-bottom-rows",getRowCtrls:Zy}};function Eg(e){return`ag-${lo(e).name}-container`}function xg(e){return`ag-${lo(e).name}-spanned-cells-container`}function lo(e){return Xy[e]}var e2="scrolling",t2=["stickyTop","stickyBottom"],Fg=class extends y{constructor(e){super(),this.name=e,this.EMPTY_CTRLS=[],this.containerWidth=null,this.options=lo(e)}postConstruct(){this.isScrollingCenterContainer()&&(this.viewportSizeFeature=this.createManagedBean(new Oy(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)}))}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.beans.ctrlsSvc.register(this.name,this)}isScrollingCenterContainer(){return this.name==="scrolling"}isContainer(e){return Array.isArray(e)?e.includes(this.name):this.name===e}setComp(e,t,i,o){this.comp=e,this.eContainer=t,this.eViewport=o;const{rangeSvc:s}=this.beans;this.isScrollingCenterContainer()&&(this.createManagedBean(new zy(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),s&&this.createManagedBean(s.createDragListenerFeature(this.eViewport??this.eContainer))),this.listenOnDomOrder(),this.isContainer(e2)&&this.createManagedBean(new Uy(this.eContainer)),this.setPinnedRowBorderWidth(),this.addListeners(),this.registerWithCtrlsService()}setPinnedRowBorderWidth(){this.eContainer.style.setProperty("--ag-pinned-row-border-width",`${this.beans.environment.getPinnedRowBorderWidth()}px`)}setContainerWidth(e){e!==this.containerWidth&&(this.containerWidth=e,this.comp.setContainerWidth(`${e}px`))}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({stylesChanged:this.setPinnedRowBorderWidth.bind(this),displayedColumnsChanged:i,displayedColumnsWidthChanged:i,displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),i(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(this.isContainer(t2)){this.comp.setDomOrder(!0);return}const e=()=>{const t=this.gos.get("ensureDomOrder"),i=de(this.gos,"print");this.comp.setDomOrder(t||i)};this.addManagedPropertyListener("domLayout",e),e()}onDisplayedColumnsChanged(){this.isScrollingCenterContainer()&&this.beans.ctrlsSvc.getGridBodyCtrl()?.updateColumnViewport()}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()},i=this.eViewport??this.eContainer;i.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>i.removeEventListener("touchmove",t))}registerViewportResizeListener(e){const t=Vy(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Ly(this.eViewport)}setContainerHeight(e){this.eContainer.style.height=e>0?`${e}px`:""}setContainerTop(e){this.eContainer.style.top=`${e}px`}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer),i=t.length===0;this.comp.setRowCtrls({rowCtrls:i?this.EMPTY_CTRLS:t,useFlushSync:e}),this.comp.setHidden(i)}},i2="ag-selectable",o2="ag-column-moving",Fs="ag-animate-autosize",s2=250,Pg=class extends y{constructor(){super(...arguments),this.isTreeGrid=!1,this.topPinnedRowsHeight=0,this.bottomPinnedRowsHeight=0,this.stickyTopHeight=0,this.stickyBottomHeight=0,this.reportedViewportWidth=null,this.scrollableAreaWidth=null,this.pinnedLeftWidth=-1,this.pinnedRightWidth=-1,this.columnWidthAnimationDepth=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,i,o,s,r,n){this.comp=e,this.eGridBody=t,this.eGridViewport=i,this.eScrollingRows=o,this.eTop=s,this.eTopExtraRows=r,this.eBottom=n,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",l=>this.setCellTextSelection(l.currentValue)),this.createManagedBean(new hl(this.comp)),this.scrollFeature=this.createManagedBean(new ky(i)),this.beans.rowDragSvc?.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,n]),this.setGridRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.filterManager?.mountAdvFilterTopSectionComp({mountComp:l=>r.appendChild(l),unmountComp:l=>l.remove()}),this.setPinnedRowsHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updatePinnedColumnStickyOffsets(),this.updatePinnedWidths(),this.updateScrollingClasses(),this.addManagedListeners(this.ctrlsSvc,{ready:()=>this.updateWidths()}),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setPinnedRowsHeights.bind(this),t=this.setGridRole.bind(this),i=this.toggleRowResizeStyles.bind(this),o=this.updatePinnedColumnStickyOffsets.bind(this),s=()=>{this.updatePinnedWidths(),this.updateWidths(),this.updateScrollingClasses()},r=()=>this.updateWidths(),n=()=>this.updateViewportGeometry();this.addManagedPropertyListener("domLayout",r),this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:r,displayedColumnsWidthChanged:r,leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollbarWidthChanged:n,scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:e,stylesChanged:e,gridSizeChanged:()=>{const a=gg(this.eGridViewport);this.refreshViewportWidth(a)||this.updateViewportGeometry(a)},columnRowGroupChanged:t,columnPivotChanged:t,modelUpdated:t,rowResizeStarted:i,rowResizeEnded:i});const l=this.beans.masterDetailSvc;ht(this.gos)&&l&&this.addManagedListeners(l,{masterChanged:Py(this,t,0)}),this.addManagedPropertyListener("treeData",t),this.addManagedPropertyListener("enableRtl",o)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.comp.setPreventRowAnimationCssOnContainers(t)}onGridColumnsChanged(){const e=this.beans.colModel.colsList;this.comp.setColumnCount(e.length),this.updateWidths(),this.setGridRole()}onScrollVisibilityChanged(){this.setStickyWidth(this.scrollVisibleSvc.verticalScrollShowing),this.updateViewportGeometry(),this.updateScrollingClasses()}updateViewportGeometry(e=this.getReportedViewportWidth()){this.updateWidths(e),this.updatePinnedColumnStickyOffsets(),this.updateGridViewportWidth(e)}updateWidths(e=this.getReportedViewportWidth()){const t=this.scrollVisibleSvc.verticalScrollShowing,i=this.getVerticalScrollbarWidth(t),o=this.isPinnedWidthOverflowingViewport(e,t)&&this.isPinnedWidthOverflowingViewport(void 0,t),s=this.getHorizontalContentWidth(o,t),r=Math.max(s,e,1);r!==this.scrollableAreaWidth&&(this.scrollableAreaWidth=r,this.comp.setGridScrollableAreaWidth(`${r}px`)),this.comp.setPinnedColumnsOverflowing(o);const n=this.ctrlsSvc;for(let l=0,a=wl.length;l<a;++l)n.get(wl[l])?.setContainerWidth(r);n.get("fakeHScrollComp")?.setContentWidth(s-i),n.getHeaderRowContainerCtrl()?.setRowWidths(r),o&&this.getHorizontalScrollLeft()!==0&&this.setHorizontalScrollLeft(0)}getHorizontalContentWidth(e,t){return e?0:this.getColumnsWidth()+this.getVerticalScrollbarWidth(t)}getColumnsWidth(){return this.beans.visibleCols.bodyWidth+this.getPinnedWidth()}isPinnedWidthOverflowingViewport(e,t=this.scrollVisibleSvc.verticalScrollShowing){if(de(this.gos,"print"))return!1;const i=e??this.getHorizontalViewportWidth(),o=this.getPinnedWidth();return i>0&&o>0&&o>=this.getViewportWidthWithoutScrollbar(i,t)}getPinnedWidth(){const{visibleCols:e}=this.beans;return e.getLeftStickyColumnContainerWidth()+e.getRightStickyColumnContainerWidth()}getReportedViewportWidth(){const e=this.reportedViewportWidth;if(e!==null)return e;const t=this.getHorizontalViewportWidth();return this.reportedViewportWidth=t>0?t:null,t}getHorizontalViewportWidth(){return gg(this.eGridViewport)}refreshViewportWidth(e){const t=e>0?e:null;return t===this.reportedViewportWidth?!1:(this.reportedViewportWidth=t,t!==null&&this.updateViewportGeometry(t),this.eventSvc.dispatchEvent({type:"gridViewportWidthChanged"}),!0)}getViewportWidthWithoutScrollbar(e=this.getHorizontalViewportWidth(),t=this.scrollVisibleSvc.verticalScrollShowing){return Math.max(0,e-this.getVerticalScrollbarWidth(t))}getCenterWidth(e){return Math.max(0,this.getViewportWidthWithoutScrollbar(e)-this.getPinnedWidth())}getReportedCenterWidth(){return this.getCenterWidth(this.getReportedViewportWidth())}getHorizontalScrollLeft(){return Dy(this.eGridViewport,this.gos.get("enableRtl"))}setHorizontalScrollLeft(e){My(this.eGridViewport,e,this.gos.get("enableRtl"))}getHorizontalScrollPosition(){const e=this.getHorizontalScrollLeft();return{left:e,right:e+this.getCenterWidth()}}updateColumnViewport(e=!1,t,i=this.getReportedCenterWidth()){this.beans.colViewport.setScrollPosition(i,t??this.getHorizontalScrollLeft(),e)}updateGridViewportWidth(e){const t=this.getViewportWidthWithoutScrollbar(e);this.eGridViewport.style.setProperty("--ag-internal-grid-viewport-width",`${t}px`)}setGridRole(){const{rowGroupColsSvc:e,colModel:t,gos:i}=this;let o=i.get("treeData");if(!o){const s=t.pivotMode;o=(e?e.columns.length:0)>=(s?2:1)}if(!o&&i.get("masterDetail")&&(o=this.beans.masterDetailSvc?.hasExpandableMasterRows()??!1),this.comp.setGridRole(o?"treegrid":"grid"),this.isTreeGrid!==o){this.isTreeGrid=o;for(const s of this.beans.rowRenderer.getAllRowCtrls())s.refreshAriaLevel()}}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:i=>{const{target:o}=i,s=fl(o,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:i=>{const{target:o,relatedTarget:s}=i,r=t.contains(s),n=fl(s,"ag-root",t);fl(o,"ag-root",t)||(!r||n)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(o2,e)}startColumnWidthAnimation(){this.columnWidthAnimationDepth++;const e=this.gos;!e.get("animateColumnResizing")||e.get("enableRtl")||(window.clearTimeout(this.columnWidthAnimationTimeout),this.columnWidthAnimationTimeout=void 0,this.comp.setColumnMovingCss(Fs,!0))}finishColumnWidthAnimation(e){const t=Math.max(0,this.columnWidthAnimationDepth-1);if(this.columnWidthAnimationDepth=t,e){this.removeColumnWidthAnimation();return}t>0||!this.eGridBody.classList.contains(Fs)||(window.clearTimeout(this.columnWidthAnimationTimeout),this.columnWidthAnimationTimeout=window.setTimeout(()=>{this.columnWidthAnimationTimeout=void 0,this.isAlive()&&this.comp.setColumnMovingCss(Fs,!1)},s2))}cancelColumnWidthAnimation(){this.removeColumnWidthAnimation()}removeColumnWidthAnimation(){window.clearTimeout(this.columnWidthAnimationTimeout),this.columnWidthAnimationTimeout=void 0,this.comp.setColumnMovingCss(Fs,!1)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(i2,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t,beans:{visibleCols:i}}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap),e.toggle("ag-has-left-pinned-cols",i.getLeftStickyColumnContainerWidth()>0),e.toggle("ag-has-right-pinned-cols",i.getRightStickyColumnContainerWidth()>0)}updatePinnedWidths(){const e=this.beans.visibleCols,t=e.getLeftStickyColumnContainerWidth(),i=e.getRightStickyColumnContainerWidth(),o=this.eGridViewport.style;t!==this.pinnedLeftWidth&&(this.pinnedLeftWidth=t,o.setProperty("--ag-internal-pinned-left-width",`${t}px`)),i!==this.pinnedRightWidth&&(this.pinnedRightWidth=i,o.setProperty("--ag-internal-pinned-right-width",`${i}px`))}updatePinnedColumnStickyOffsets(){const{scrollVisibleSvc:e,gos:t,eGridBody:i}=this,o=e.verticalScrollShowing?this.getVerticalScrollbarWidth():0,s=t.get("enableRtl"),r=s?o:0,n=s?0:o;i.style.setProperty("--ag-internal-pinned-left-sticky-offset",`${r}px`),i.style.setProperty("--ag-internal-pinned-right-sticky-offset",`${n}px`)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eGridViewport,this.eBottom,this.eTop])}updateRowCount(){const e=Jn(this.beans),{rowModel:t,pinnedRowModel:i}=this.beans,o=i?.getPinnedTopRowCount()??0,s=i?.getPinnedBottomRowCount()??0,r=t.isLastRowIndexKnown()?t.getRowCount():-1,n=r===-1?-1:e+o+r+s;this.comp.setRowCount(n)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let i=t.sizesMeasured;const o=()=>{const s=i&&Ht(this.gos)&&!e.stretching;this.comp.setRowAnimationCssOnScrollableArea(s)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({stylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,o())}})}addBodyViewportListener(){const{eGridViewport:e,eTop:t,eBottom:i,beans:{popupSvc:o,touchSvc:s}}=this,r=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:r}),s?.mockBodyContextMenu(this,r),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,o)});const n=this.onStickyWheel.bind(this);for(const l of[t,i])this.addManagedElementListeners(l,{wheel:n})}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e??i).preventDefault();const o=(e??t)?.target,s=o instanceof Element?o:null,r=s!=null&&(s===this.eGridViewport||this.eGridViewport.contains(s)),n=!!s?.closest(".ag-row, .ag-spanned-row, .ag-header-row"),l=!!s?.closest(".ag-grid-pinned-top-rows");r&&!n&&!l&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eGridViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eGridViewport.scrollTop-t}setPinnedRowsHeights(){const{pinnedRowModel:e}=this,t=e?.getPinnedTopTotalHeight(),i=e?.getPinnedBottomTotalHeight(),{environment:o}=this.beans,s=o.getPinnedRowBorderWidth(),r=(t??0)+(t?s:0),n=(i??0)+(i?s:0);this.topPinnedRowsHeight=r,this.bottomPinnedRowsHeight=n,this.ctrlsSvc.get("pinnedTop")?.setContainerHeight(r),this.ctrlsSvc.get("pinnedBottom")?.setContainerHeight(n),this.refreshTopSection(),this.refreshBottomSection()}refreshTopSection(){const e=this.filterManager?.getHeaderHeight()??0,t=this.getHeaderRowsOffset();this.eTopExtraRows.style.top="var(--ag-internal-header-rows-height, 0px)";const i=t;this.ctrlsSvc.get("pinnedTop")?.setContainerTop(i);const o=i+this.topPinnedRowsHeight;this.ctrlsSvc.get("stickyTop")?.setContainerTop(o),this.comp.setPinnedSection("top",{height:this.topPinnedRowsHeight+e,invisible:this.topPinnedRowsHeight<=0})}refreshBottomSection(){this.ctrlsSvc.get("stickyBottom")?.setContainerTop(0),this.ctrlsSvc.get("pinnedBottom")?.setContainerTop(this.stickyBottomHeight),this.comp.setPinnedSection("bottom",{height:this.bottomPinnedRowsHeight,invisible:this.bottomPinnedRowsHeight<=0})}setStickyTopHeight(e=0){this.stickyTopHeight!==e&&(this.stickyTopHeight=e,this.ctrlsSvc.get("stickyTop")?.setContainerHeight(e),this.refreshTopSection())}setStickyBottomHeight(e=0){this.stickyBottomHeight!==e&&(this.stickyBottomHeight=e,this.ctrlsSvc.get("stickyBottom")?.setContainerHeight(e),this.comp.setStickyBottomHeight(`${e}px`),this.refreshBottomSection(),this.updateStickyRowsHeightAdjustment(),this.eventSvc.dispatchEvent({type:"stickyBottomOffsetChanged",offset:e}))}updateStickyRowsHeightAdjustment(){const{stickyBottomHeight:e,beans:{rowContainerHeight:t}}=this;t.stickyBottomRowsHeight!==e&&(t.stickyBottomRowsHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}setStickyWidth(e){this.comp.setStickyBottomWidth(e?`calc(100% - ${this.getVerticalScrollbarWidth()}px)`:"100%")}getHeaderRowsOffset(){const t=this.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight??0,i=this.filterManager?.getHeaderHeight()??0,o=this.beans.environment.getHeaderRowBorderWidth();return i+t+o}getTopPinnedRowsOffset(){return this.getHeaderRowsOffset()+this.topPinnedRowsHeight}getBottomPinnedRowsOffset(){return this.bottomPinnedRowsHeight}getBodyViewportHeight(e){const t=e-this.getTopPinnedRowsOffset()-this.bottomPinnedRowsHeight;return Math.max(0,t)}getScrollContentHeight(e){const t=this.getTopPinnedRowsOffset(),i=this.beans.rowContainerHeight.getAdjustedUiContainerHeight()??0,o=this.bottomPinnedRowsHeight+this.stickyBottomHeight,s=t+i+o;return Math.max(s,e)}getVerticalScrollbarWidth(e=this.scrollVisibleSvc.verticalScrollShowing){const{scrollVisibleSvc:t}=this;if(!e)return 0;const i=t.getScrollbarWidth()||0;return i===0?0:i}getHorizontalScrollbarHeight(){if(!(this.scrollVisibleSvc.horizontalScrollShowing&&!this.gos.get("suppressHorizontalScroll")))return 0;const i=this.ctrlsSvc.get("fakeHScrollComp")?.getGui().offsetHeight??0;if(i>0)return i;const o=this.scrollVisibleSvc,s=o.getScrollbarWidth()||0;return s===0&&o.isInvisibleScrollbar()?gl:s}};import{RefPlaceholder as Dg,_ensureDomOrder as r2,_setDisplayed as n2}from"ag-stack";import{_addStylesToElement as l2,_setDomChildOrder as Mg}from"ag-stack";import{CssClassManager as a2,_addStylesToElement as d2,_clearElement as Sl,_getActiveDomElement as Tg,_missing as c2,_removeFromParent as ao,_toString as u2}from"ag-stack";var h2=class extends K{constructor(e,t,i,o,s){super(),this.cellCtrl=t,this.drawnInPass=0,this.rowResizerElement=null,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=o;const r=O({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=r;let n;t.cellSpan!==null?(n=O({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),n.appendChild(r),this.setTemplateFromElement(n)):this.setTemplateFromElement(r),this.cellCssManager=new a2(()=>r),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const l={toggleCss:(a,d)=>this.cellCssManager.toggleCss(a,d),setUserStyles:a=>d2(r,a),getFocusableElement:()=>r,setIncludeSelection:a=>this.includeSelection=a,setIncludeRowDrag:a=>this.includeRowDrag=a,setIncludeDndSource:a=>this.includeDndSource=a,setRowResizerElement:a=>this.setRowResizerElement(a),setRenderDetails:(a,d,c)=>this.setRenderDetails(a,d,c),setEditDetails:(a,d,c)=>this.setEditDetails(a,d,c),getCellEditor:()=>this.cellEditor??null,getCellRenderer:()=>this.cellRenderer??null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(a,d)=>this.refreshEditStyles(a,d)};t.setComp(l,r,n,this.eCellWrapper,i,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRowResizerElement(e){this.rowResizerElement&&ao(this.rowResizerElement),this.rowResizerElement=e,e&&this.eCell.appendChild(e)}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||s)&&this.refreshCellRenderer(e)||(this.firstRender||this.destroyRenderer(),this.createCellRendererInstance(e)):(this.firstRender||this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),this.rowDraggingComp?.refreshVisibility()}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,o=i&&this.eCellWrapper==null;o&&(this.eCellWrapper=O({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!i&&this.eCellWrapper!=null;s&&(ao(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!i);const r=!e&&i,n=r&&this.eCellValue==null;if(n){const d=this.cellCtrl.getCellValueClass();this.eCellValue=O({tag:"span",cls:d,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const l=!r&&this.eCellValue!=null;l&&(ao(this.eCellValue),this.eCellValue=void 0);const a=o||s||n||l;return a&&this.removeControls(),!e&&t&&this.addControls(),a}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:i,includeRowDrag:o,includeDndSource:s,includeSelection:r}=this,n=l=>{l&&t.insertBefore(l.getGui(),i)};o&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),n(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),n(this.dndSourceComp)),r&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),n(this.checkboxSelectionComp))}createCellEditorInstance(e,t,i){const o=this.editorVersion,s=e.newAgStackInstance(),{params:r}=e;s.then(l=>this.afterCellEditorCreated(o,l,r,t,i)),c2(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell({forceBrowserFocus:!0})}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();Sl(t);const i=u2(e);i!=null&&(t.textContent=i),this.reattachDecorations(t)}reattachDecorations(e){this.cellCtrl.rangeFeature?.reattachHandle(e);const t=this.rowResizerElement;t&&!t.parentElement&&this.eCell.appendChild(t)}destroyRenderer(e=!0){const{context:t}=this.beans;this.cellRenderer=t.destroyBean(this.cellRenderer),ao(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++,e&&this.cellCtrl.resetCellRendererTooltip()}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(Tg(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),ao(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,i=r=>n=>{if(this.rendererVersion!==t||!this.isAlive())return;const a=r.newAgStackInstance(),d=this.afterCellRendererCreated.bind(this,t,r.componentClass);a?.then(d)},{animationFrameSvc:o}=this.beans;let s;if(o?.active&&this.firstRender?s=(r,n=!1)=>{o.createTask(i(r),this.rowNode.rowIndex,"p2",r.componentFromFramework,n)}:s=r=>i(r)(),e.params?.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:r,onReady:n}=this.cellCtrl.getDeferLoadingCellRenderer();r&&(s(r),n.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}this.cellRenderer=i,this.cellRendererClass=t;const s=i.getGui();if(this.cellRendererGui=s,s!=null){const r=this.getParentOfValue();Sl(r),r.appendChild(s),this.reattachDecorations(r)}}afterCellEditorCreated(e,t,i,o,s){const r=e!==this.editorVersion,{context:n}=this.beans;if(r){n.destroyBean(t);return}if(t.isCancelBeforeStart?.()){n.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){this.beans.log.warn(97,{colId:this.column.getId()}),n.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const a=o||t.isPopup?.();a?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,a),t.afterGuiAttached?.(),this.cellCtrl.enableEditorTooltipFeature(t),this.beans.editSvc?.onEditorAttached(this.cellCtrl)}refreshEditStyles(e,t){const{cellCssManager:i}=this;i.toggleCss("ag-cell-inline-editing",e&&!t),i.toggleCss("ag-cell-popup-editing",e&&!!t),i.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(Tg(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),Sl(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:i,context:o,popupSvc:s,editSvc:r}=this.beans;i.get("editType")==="fullRow"&&this.beans.log.warn(98);const n=this.cellEditorPopupWrapper=o.createBean(r.createPopupEditorWrapper(e)),{cellEditor:l,cellEditorGui:a,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=n.getGui();a&&g.appendChild(a);const p=i.get("stopEditingWhenCellsLoseFocus"),f=t??l.getPopupPosition?.()??"over",m=i.get("enableRtl"),w={ePopup:g,additionalParams:{column:u,rowNode:c},type:"popupCellEditor",eventSource:d,position:f,alignSide:m?"right":"left",keepWithinBounds:!0},v=s.positionPopupByComponent.bind(s,w),S=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:C=>{r.onPopupEditorClosed(h,C)},anchorToElement:d,positionCallback:v,ariaOwns:d});S&&(this.hideEditorPopup=S.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(!1),this.destroyEditor(),this.removeControls(),super.destroy()}};import{_areEqual as g2,_batchCall as p2}from"ag-stack";function bl(e,t,i){const o=e[t];if(o.colSpanIndex<0)return 1;const s=Math.min(o.getColSpan(i),e.length-t);for(let r=1;r<s;++r){const n=e[t+r];if(n.pinnedLane!==o.pinnedLane||n.allColsIndex!==o.allColsIndex+r)return r}return s}function Ag(e,t,i,o,s){const r=[];let n=null,a=t.length;for(;o!==null&&a>0&&!o(t[a-1]);)--a;for(let d=0;d<a;++d){const c=t[d],u=yl(e,t,d,i),h=o===null||f2(t,d,u,o);d+=u-1,h&&(r.length===0&&n&&s?.(c)&&r.push(n),r.push(c)),n=c}return r}function yl(e,t,i,o){const s=t[i].colSpanIndex;if(s<0)return 1;if(!o)return bl(t,i,e);let r=o[s];return r===0&&(r=bl(t,i,e),o[s]=r),r}var f2=(e,t,i,o)=>{for(let s=t,r=t+i;s<r;++s)if(o(e[s]))return!0;return!1};function m2(e,t){t.drawnPosition=null,t.drawnWidth=null,Rl(e,t),Lg(e,t)}function Ig(e,t){if(t.cellSpan!==null)return;const i=t.column.getRowSpan(t.rowNode);t.legacyRowSpan!==i&&(t.legacyRowSpan=i,Lg(e,t,!0))}function kg(e,t,i){const o=t.colsSpanning,s=e.visibleCols,r=s.displayedColsVersion;if(o===null){if(i===1||t.cellSpan!==null)return}else if(o.length===i&&t.colsSpanningVersion===r)return;const n=t.column.allColsIndex;t.colsSpanning=s.allCols.slice(n,n+i),t.colsSpanningVersion=r,Rl(e,t),t.refreshAriaColSpan()}function Rl(e,t){const i=t.eGui;if(!i)return;const o=C2(t);o!==t.drawnWidth&&(t.drawnWidth=o,i.style.width=`${o}px`);const{gos:s,visibleCols:r}=e,n=t.column,l=n.pinnedLane,a=t.printLayout,d=s.get("enableRtl"),c=n.left,u=a?jh(c,l,o,d,r):c;if(u==null)return;const h=Zh(l,d,a),g=Qh(u,o,h,d,r);if(g===t.drawnPosition)return;t.drawnPosition=g;const p=t.getRootElement().style;p.left=h?"":`${g}px`,p.right=h?`${g}px`:""}function C2(e){const{colsSpanning:t,column:i}=e;if(!t)return i.actualWidth;let o=0;for(let s=0,r=t.length;s<r;++s)o+=t[s].actualWidth;return o}function Lg(e,t,i){const o=t.legacyRowSpan;if(o===1&&!i)return;const s=t.eGui;if(!s)return;if(o===1){s.style.height="",s.style.zIndex="";return}const n=Ge(e)*o;s.style.height=`${n}px`,s.style.zIndex="1"}var v2=class extends y{constructor(e){super(),this.rowCtrl=e,this.centerCellCtrls=ke,this.leftCellCtrls=ke,this.rightCellCtrls=ke,this.allCellCtrls=null,this.cellByCol=new Map,this.cellCtrlsColsVersion=-1,this.keptCellCtrls=null,this.colSpans=void 0,this.colSpansColsVersion=-1,this.cellsStale=!0,this.updateColumnListsPending=!1,this.pinnedLanesStale=!0,this.releaseKeptCellsPending=!1}postConstruct(){this.addListenersForCellCtrls()}initialiseComp(){this.cellsStale?this.updateColumnLists(!this.rowCtrl.useAnimationFrameForCreate):this.giveLanes(!1),this.rowCtrl.refreshPinnedCellGroupWidths()}refreshRow(e){this.refreshSpans();const t=this.getAllCellCtrls();for(let i=0,o=t.length;i<o;++i)t[i].refreshCell(e);this.rowCtrl.onRowRefreshed()}shouldCreateCellSections(){return!0}prepareInitialCellCtrls(){this.rowCtrl.useAnimationFrameForCreate||this.createAllCellCtrls()}getInitialCellCtrls(e){if(!(this.rowCtrl.useAnimationFrameForCreate||!this.isAlive()))return this.cellsStale&&this.createAllCellCtrls(),this.getLane(e)}getAllCellCtrls(){let e=this.allCellCtrls;if(e===null){const t=this.centerCellCtrls,i=this.leftCellCtrls,o=this.rightCellCtrls;e=i.length===0&&o.length===0?t:t.concat(i,o),this.allCellCtrls=e}return e}recreateCell(e){this.allCellCtrls=null,this.centerCellCtrls=Fl(this.centerCellCtrls,e),this.leftCellCtrls=Fl(this.leftCellCtrls,e),this.rightCellCtrls=Fl(this.rightCellCtrls,e),this.destroyCell(e),this.updateColumnLists()}destroyCells(){this.allCellCtrls=null,xl(this.centerCellCtrls),xl(this.leftCellCtrls),xl(this.rightCellCtrls),this.centerCellCtrls=ke,this.leftCellCtrls=ke,this.rightCellCtrls=ke,this.cellByCol.clear(),this.keptCellCtrls=null}onDisplayedColumnsChanged(){this.updateColumnLists(!0)}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0,!0)}renderFocusedCell(){this.updateColumnLists(!0)}onSpannedCellsUpdated(e){e&&!this.rowCtrl.rowNode.rowPinned||this.updateColumnLists()}refreshSpans(){this.colSpansColsVersion=-1;const e=this.beans.visibleCols,t=e.rowSpanCols;for(let i=0,o=t.length;i<o;++i){const s=this.getOwnCellCtrl(t[i]);s!==void 0&&Ig(this.beans,s)}if(e.colSpanColCount!==0){if(!this.rowCtrl.getGui()){this.cellsStale=!0,this.pinnedLanesStale=!0;return}this.updateColumnLists()}}releaseKeptCells(e){const t=this.keptCellCtrls;if(t!==null){if(!e){this.hasReleasableKeptCell(t)&&this.updateColumnLists();return}this.releaseKeptCellsPending||(this.releaseKeptCellsPending=!0,p2(()=>{this.releaseKeptCellsPending=!1,this.isAlive()&&this.releaseKeptCells(!1)}))}}hasReleasableKeptCell(e){for(let t=0,i=e.length;t<i;++t){const o=e[t];if(!o.isAlive()||!this.isCellKept(o))return!0}return!1}updateColumnLists(e=!1,t=!1,i=!1){const{rowCtrl:o}=this,{animationFrameSvc:s}=this.beans,r=!s?.active||e||o.printLayout;if(i||(this.pinnedLanesStale=!0),r){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(this.cellsStale=!0,s.createTask(()=>{!o.isAlive()||!this.updateColumnListsPending||this.updateColumnListsImpl(!0)},o.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.giveLanes(e)}giveLanes(e){const t=this.rowCtrl.getGui();if(!t)return;const{leftCellCtrls:i,centerCellCtrls:o,rightCellCtrls:s,cellCtrlsColsVersion:r}=this;t.rowComp.setCellCtrls(i,o,s,e,r)}createAllCellCtrls(){this.cellsStale=!1;const{rowCtrl:e,beans:t}=this,{rowNode:i,printLayout:o}=e,s=t.visibleCols,r=this.centerCellCtrls,n=this.leftCellCtrls,l=this.rightCellCtrls,a=this.getColSpans(),d=s.displayedColsVersion,c=this.cellCtrlsColsVersion===d;this.cellCtrlsColsVersion=d;const u=this.pinnedLanesStale||!c||o;this.pinnedLanesStale=!1,this.keptCellCtrls=u?null:w2(this.keptCellCtrls);const h=t.focusSvc.getFocusedCell()?.column,g=h?.displayed?h:null,p=o?El(i,s.allCols,a):t.colViewport.getColsWithinViewport(i,a);if(this.centerCellCtrls=this.createCellCtrls(r,p,a,1,c,g),o)this.leftCellCtrls=this.destroyLane(n),this.rightCellCtrls=this.destroyLane(l);else if(u){const f=El(i,s.leftCols,a);this.leftCellCtrls=this.createCellCtrls(n,f,a,0,c,g);const m=El(i,s.rightCols,a);this.rightCellCtrls=this.createCellCtrls(l,m,a,2,c,g)}(this.centerCellCtrls!==r||this.leftCellCtrls!==n||this.rightCellCtrls!==l)&&(this.allCellCtrls=null)}getLane(e){return e===1?this.centerCellCtrls:e===0?this.leftCellCtrls:this.rightCellCtrls}getCellCtrl(e){const t=this.beans.visibleCols;if(t.colSpanColCount===0)return this.getOwnCellCtrl(e);this.updateColumnListsPending&&this.rowCtrl.isAlive()&&this.updateColumnListsImpl(!1);const i=this.getOwnCellCtrl(e);if(i!==void 0)return i;if(this.cellCtrlsColsVersion!==t.displayedColsVersion){const r=this.getAllCellCtrls();return Vg(r,e,0,r.length)}const o=this.getLane(this.rowCtrl.laneFor(e)),s=Pl(o,e.allColsIndex+1);return Vg(o,e,this.keptCellCtrls!==null?0:Math.max(s-1,0),s)}getOwnCellCtrl(e){return this.cellByCol.get(e)}getColSpans(){const e=this.beans.visibleCols;if(e.colSpanColCount===0){this.colSpans=void 0;return}const t=e.displayedColsVersion;let i=this.colSpans;if(i!==void 0&&this.colSpansColsVersion===t)return i;this.colSpansColsVersion=t;const o=e.colSpanColCount;return i?.length!==o?(i=new Array(o).fill(0),this.colSpans=i):i.fill(0),i}createCellCtrls(e,t,i,o,s,r){const{rowCtrl:n,beans:l,cellByCol:a}=this,d=e.length;if(!s)for(let f=0;f<d;++f)e[f].diffIndex=f;let c=null,u=0,h=0,g=0;for(let f=0,m=t.length;f<m;++f){const w=t[f];let v;if(s){const C=w.allColsIndex;for(;g<d&&e[g].column.allColsIndex<C;)++g;g<d&&e[g].column===w&&(v=e[g++])}else v=a.get(w),v!==void 0&&e[v.diffIndex]!==v&&(v=void 0);if(v!==void 0&&(n.isCorrectCtrlForSpan(v)?++h:(this.destroyCell(v),v=void 0)),v===void 0){if(v=n.getNewCellCtrl(w),!v)continue;a.set(w,v)}if(c!==null?c.push(v):u<d&&e[u]===v?++u:(c=e.slice(0,u),c.push(v)),i===void 0&&v.colsSpanning===null)continue;const S=w.colSpanIndex;kg(l,v,i===void 0||S<0?1:i[S])}let p=null;if(h<d){c??(c=e.slice(0,u));for(let f=0,m=c.length;f<m;++f)c[f].diffIndex=f;for(let f=0;f<d;++f){const m=e[f];c[m.diffIndex]===m||!m.isAlive()||(n.laneFor(m.column)!==o||!this.isCellKept(m)?this.destroyCell(m):(p??(p=[]),p.push(m)))}if(p!==null)for(let f=0,m=p.length;f<m;++f)this.addKeptCell(c,p[f])}if(r!==null&&n.laneFor(r)===o&&!S2(c??e,r)){const f=this.createFocusedCellCtrl();f&&(a.set(r,f),c??(c=e.slice()),this.addKeptCell(c,f),p??(p=[]),p.push(f))}if(c===null)return e;if(p!==null)for(let f=0,m=p.length;f<m;++f)this.setKeptCellColSpan(c,p[f],i);return g2(e,c)?e:c}addKeptCell(e,t){this.keptCellCtrls??(this.keptCellCtrls=[]),this.keptCellCtrls.push(t),e.splice(Pl(e,t.column.allColsIndex),0,t)}setKeptCellColSpan(e,t,i){const o=t.column.allColsIndex;let s=yl(this.rowCtrl.rowNode,this.beans.visibleCols.allCols,o,i);const r=e[e.indexOf(t)+1];r!==void 0&&(s=Math.min(s,r.column.allColsIndex-o)),kg(this.beans,t,s)}createFocusedCellCtrl(){const{rowCtrl:e}=this,{focusSvc:t,rowSpanSvc:i}=this.beans,o=t.getFocusedCell();if(!o)return;const s=i?.getCellSpan(o.column,e.rowNode);if(s){if(s.firstNode!==e.rowNode||!s.doesSpanContain(o))return}else if(!t.isRowFocused(e.rowNode.rowIndex,e.rowNode.rowPinned))return;return e.getNewCellCtrl(o.column)}isCellKept(e){return!e.column.displayed||!this.rowCtrl.isCorrectCtrlForSpan(e)?!1:!!this.beans.editSvc?.isEditing(e)||e.isCellFocused()}destroyLane(e){for(let t=0,i=e.length;t<i;++t)this.destroyCell(e[t]);return ke}destroyCell(e){const t=e.column;this.cellByCol.get(t)===e&&this.cellByCol.delete(t),e.destroy()}isSuppressMouseEvent(e){const t=Es(this.gos,e.target);return t!=null&&no(this.gos,t.column,this.rowCtrl.rowNode,e)}addListenersForCellCtrls(){const{rowCtrl:e}=this;this.addManagedListeners(e.rowNode,{rowIndexChanged:()=>{const t=this.getAllCellCtrls();for(let i=0,o=t.length;i<o;++i)t[i].onRowIndexChanged()},cellChanged:t=>{this.refreshSpans();const i=this.getAllCellCtrls();for(let o=0,s=i.length;o<s;++o)i[o].onCellChanged(t)}}),this.addManagedEventListeners({newColumnsLoaded:()=>{const t=this.beans,i=this.getAllCellCtrls();for(let o=0,s=i.length;o<s;++o)Ig(t,i[o])}})}},ke=[],El=(e,t,i)=>i===void 0?t:Ag(e,t,i,null,null),w2=e=>{if(e===null)return null;let t=null;for(let i=0,o=e.length;i<o;++i){const s=e[i];s.column.pinnedLane!==1&&(t??(t=[]),t.push(s))}return t},xl=e=>{for(let t=0,i=e.length;t<i;++t)e[t].destroy()},Fl=(e,t)=>{const i=e.indexOf(t);if(i<0)return e;const o=e.slice();return o.splice(i,1),o},S2=(e,t)=>e[Pl(e,t.allColsIndex)]?.column===t,Pl=(e,t)=>{let i=0,o=e.length;for(;i<o;){const s=i+o>>>1;e[s].column.allColsIndex<t?i=s+1:o=s}return i},Vg=(e,t,i,o)=>{for(let s=o-1;s>=i;--s){const r=e[s];if(r.colsSpanning?.includes(t))return r}},b2=new Set(["CANVAS","IMG","SVG","VIDEO","AUDIO","INPUT","IFRAME","PICTURE"]),Dl=(e,t)=>{const i=O({tag:"div",cls:e,role:"presentation"});if(!t)return{container:i,wrapper:i};const o=O({tag:"div",role:"presentation",cls:"ag-grid-container-wrapper"});return i.appendChild(o),{container:i,wrapper:o}},y2=class extends K{constructor(e,t){super(),this.drawnInPass=0,this.fullWidthCellRenderersBySection=null,this.fullWidthCellRendererParamsBySection=null,this.pinnedWidths=void 0,this.drawnLeft=ke,this.drawnCenter=ke,this.drawnRight=ke,this.cellsPass=0,this.beans=t,this.rowCtrl=e;const i=e.shouldCreateCellSections(),o=O({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});if(i){const n=Dl("ag-grid-pinned-left-cells",!0),l=Dl("ag-grid-scrolling-cells",!1),a=Dl("ag-grid-pinned-right-cells",!0);this.ePinnedLeftSection=n.container,this.ePinnedLeftCells=n.wrapper,this.eScrollingCells=l.wrapper,this.ePinnedRightSection=a.container,this.ePinnedRightCells=a.wrapper,o.append(l.container)}this.setInitialStyle(o),this.setTemplateFromElement(o);const s=o.style;this.domOrder=this.rowCtrl.getDomOrder();const r={setDomOrder:n=>this.setDomOrder(n),setCellCtrls:(n,l,a)=>this.setCellCtrls(n,l,a),getPinnedLeftRowElement:()=>this.ePinnedLeftCells,getScrollingRowElement:()=>this.eScrollingCells,getPinnedRightRowElement:()=>this.ePinnedRightCells,refreshPinnedSections:()=>this.refreshPinnedSections(),showFullWidth:n=>this.showFullWidth(n),showEmbeddedFullWidth:n=>this.showEmbeddedFullWidth(n),getFullWidthCellRenderers:()=>this.getAllFullWidthCellRenderers(),getFullWidthCellRendererParams:()=>this.getPrimaryFullWidthCellRendererParams(),getFullWidthCellRendererParamsForPinned:n=>this.getFullWidthCellRendererParamsForPinned(n),toggleCss:(n,l)=>this.toggleCss(n,l),setUserStyles:n=>l2(o,n),setTop:n=>s.top=n,setTransform:n=>s.transform=n,setRowIndex:n=>o.setAttribute("row-index",n),setRowId:n=>o.setAttribute("row-id",n),setRowBusinessKey:n=>o.setAttribute("row-business-key",n),refreshFullWidth:n=>{const l=n();return this.fullWidthCellRendererParams=l,this.fullWidthCellRenderer?.refresh?.(l)??!1},refreshEmbeddedFullWidth:n=>this.refreshEmbeddedFullWidth(n)};e.setComp(r,this.getGui(),void 0),this.addDestroyFunc(()=>{e.unsetComp()})}refreshPinnedSections(){const e=this.rowCtrl.getMappedPinnedCellGroupWidths();if(e===this.pinnedWidths)return;this.pinnedWidths=e;const t=this.eScrollingCells;t&&(t.style.width=`${e.centerWidth}px`),Hg(t,this.ePinnedLeftSection,e.leftWidth,e.renderLeft,"before"),Hg(t,this.ePinnedRightSection,e.rightWidth,e.renderRight,"after")}setInitialStyle(e){const t=this.rowCtrl.getInitialTransform();if(t)e.style.setProperty("transform",t);else{const i=this.rowCtrl.getInitialRowTop();i&&e.style.setProperty("top",i)}}showFullWidth(e){const t=this.getGui(),i=O({tag:"div",cls:"ag-full-width-anchor",role:this.rowCtrl.getFullWidthAnchorRole()});t.appendChild(i);const o=s=>{if(this.isAlive()){const r=s.getGui();i.appendChild(r),this.rowCtrl.setupDetailRowAutoHeight(r),this.setFullWidthRowComp(s,e.params)}else this.beans.context.destroyBean(s)};e.newAgStackInstance().then(o)}showEmbeddedFullWidth(e){this.showEmbeddedFullWidthSection("left",e.left,this.ePinnedLeftCells),this.showEmbeddedFullWidthSection("center",e.center,this.eScrollingCells),this.showEmbeddedFullWidthSection("right",e.right,this.ePinnedRightCells)}showEmbeddedFullWidthSection(e,t,i){const o=i??this.getGui(),s=r=>{if(!this.isAlive()){this.beans.context.destroyBean(r);return}const n=r.getGui();n?o.replaceChildren(n):o.replaceChildren();const l=o.firstElementChild,a=l!=null&&(l.childElementCount>0||!!l.textContent?.trim()||b2.has(l.tagName));this.rowCtrl.setEmbeddedSectionHasContent(e,a),this.setEmbeddedFullWidthRowComp(e,r,t.params),this.rowCtrl.refreshPinnedCellGroupWidths()};t.newAgStackInstance().then(s)}refreshEmbeddedFullWidth(e){const t=this.refreshEmbeddedSection("left",e("left")),i=this.refreshEmbeddedSection("center",e(null)),o=this.refreshEmbeddedSection("right",e("right"));return this.fullWidthCellRenderer=this.fullWidthCellRenderersBySection?.center??null,this.fullWidthCellRendererParams=this.fullWidthCellRendererParamsBySection?.center,t&&i&&o}refreshEmbeddedSection(e,t){return this.fullWidthCellRendererParamsBySection??(this.fullWidthCellRendererParamsBySection={}),this.fullWidthCellRendererParamsBySection[e]=t,this.fullWidthCellRenderersBySection?.[e]?.refresh?.(t)??!(e==="center"||this.rowCtrl.embeddedSectionHasContent[e])}getAllFullWidthCellRenderers(){if(!this.rowCtrl.isEmbeddedFullWidth){const t=this.fullWidthCellRenderer;return t?[t]:void 0}const e=this.fullWidthCellRenderersBySection;return e===null?void 0:[e.left,e.center,e.right]}getPrimaryFullWidthCellRendererParams(){return this.fullWidthCellRendererParams??this.fullWidthCellRendererParamsBySection?.center}getFullWidthCellRendererParamsForPinned(e){return this.fullWidthCellRendererParamsBySection?.[this.getEmbeddedSectionForPinned(e)]}getEmbeddedSectionForPinned(e){return e==="left"?"left":e==="right"?"right":"center"}setDomOrder(e){const t=e&&!this.domOrder;this.domOrder=e,t&&(Ml(this.ePinnedLeftCells,this.drawnLeft),Ml(this.eScrollingCells,this.drawnCenter),Ml(this.ePinnedRightCells,this.drawnRight))}setCellCtrls(e,t,i){const{drawnLeft:o,drawnCenter:s,drawnRight:r}=this;this.drawnLeft=e,this.drawnCenter=t,this.drawnRight=i,this.drawLane(this.ePinnedLeftCells,o,e),this.drawLane(this.eScrollingCells,s,t),this.drawLane(this.ePinnedRightCells,r,i)}drawLane(e,t,i){if(t===i||!e)return;const o=++this.cellsPass,s=i.length;let r=t.length===0?s:0,n=null;const l=this.domOrder?[]:null;for(let a=0;a<s;++a){const d=i[a];let c=d.drawnComp;if(c!==void 0)c.drawnInPass=o;else{if(r<=a)for(n=null,r=a+1;r<s;++r){const u=i[r].drawnComp;if(u){n=u.getGui();break}}c=this.newCellComp(d,e,n,o)}l!==null&&l.push(c.getGui())}Ps(t,o),l!==null&&Mg(e,l)}newCellComp(e,t,i,o){const s=this.beans.editSvc?.isEditing(e,{withOpenEditor:!0})??!1,r=new h2(this.beans,e,this.rowCtrl.printLayout,t,s);return r.drawnInPass=o,e.drawnComp=r,t.insertBefore(r.getGui(),i),r}destroy(){super.destroy(),Ps(this.drawnLeft,-1),Ps(this.drawnCenter,-1),Ps(this.drawnRight,-1)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}setEmbeddedFullWidthRowComp(e,t,i){this.fullWidthCellRenderersBySection??(this.fullWidthCellRenderersBySection={}),this.fullWidthCellRendererParamsBySection??(this.fullWidthCellRendererParamsBySection={});const o=this.fullWidthCellRenderersBySection,s=this.fullWidthCellRendererParamsBySection;o[e]=t,s[e]=i,e==="center"&&(this.fullWidthCellRenderer=t,this.fullWidthCellRendererParams=i),this.addDestroyFunc(()=>{o[e]=this.beans.context.destroyBean(o[e]),s[e]=void 0,e==="center"&&(this.fullWidthCellRenderer=null,this.fullWidthCellRendererParams=void 0)})}},Hg=(e,t,i,o,s)=>{if(t){if(!o){t.remove();return}t.style.width=`${i}px`,!t.parentNode&&e&&e[s](t)}},Ml=(e,t)=>{const i=t.length;if(!e||i===0)return;const o=[];for(let s=0;s<i;++s){const r=t[s].drawnComp;r!==void 0&&o.push(r.getGui())}Mg(e,o)},Ps=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i],r=s.drawnComp;r!==void 0&&r.drawnInPass!==t&&(r.detach(),r.destroy(),s.drawnComp=void 0)}};function R2(e,t,i){const o=!!i.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls;return{tag:"div",ref:"eContainer",cls:Eg(e),role:"presentation",children:[o?{tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${xg(e)}`,role:"presentation"}:null]}}var Tl=[],E2=class extends K{constructor(e){super(),this.eContainer=Dg,this.eSpannedContainer=Dg,this.drawnNoSpan=Tl,this.drawnWithSpan=Tl,this.rowsPass=0,this.initialised=!1,this.name=e?.name}postConstruct(){this.setTemplate(R2(this.name,lo(this.name),this.beans)),this.initialiseComp()}initialiseComp(){if(this.initialised||!this.isAlive())return;let t=this.beans.ctrlsSvc.getGridBodyCtrl()?.eGridViewport;t||(t=this.getParentComponent()?.eGridViewport);const i=this.eContainer,o=this.eSpannedContainer,s=t??i,r={setRowCtrls:({rowCtrls:l})=>this.setRowCtrls(l),setSpannedRowCtrls:l=>this.setRowCtrls(l,!0),setDomOrder:l=>this.domOrder=l,setContainerWidth:l=>{i.style.width=l,o&&(o.style.width=l)},setOffsetTop:l=>{const a=`translateY(${l})`;i.style.transform=a,o&&(o.style.transform=a)},setHidden:l=>n2(i,!l,{skipAriaHidden:!0})};this.createManagedBean(new Fg(this.name)).setComp(r,i,o,s),this.initialised=!0}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const i=this.beans,o=t?this.eSpannedContainer:this.eContainer;if(!o)return;const s=t?this.drawnWithSpan:this.drawnNoSpan,r=e.length===0?Tl:[];t?this.drawnWithSpan=r:this.drawnNoSpan=r,this.lastPlacedElement=null;const n=++this.rowsPass,l=this.domOrder;let a=null;for(let d=0,c=e.length;d<c;++d){const u=e[d];let h=u.drawnRowComp;if(h)l&&(a??(a=[]),a.push(h));else if(u.rowNode.displayed)h=new y2(u,i),u.drawnRowComp=h,a??(a=[]),a.push(h);else continue;h.drawnInPass=n,r.push(u)}if(a!==null)for(let d=0,c=a.length;d<c;++d){const u=a[d].getGui();l?this.ensureDomOrder(u,o):o.appendChild(u)}for(let d=0,c=s.length;d<c;++d){const u=s[d],h=u.drawnRowComp;h!==void 0&&h.drawnInPass<n&&(u.drawnRowComp=void 0,h.getGui().remove(),h.destroy())}}ensureDomOrder(e,t){r2(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},x2={selector:"AG-ROW-CONTAINER",component:E2};function Al(e,t){return t.map(i=>{const o=`e${i[0].toUpperCase()+i.substring(1)}RowContainer`;return e[o]={name:i},{tag:"ag-row-container",ref:o,attrs:{name:i}}})}function F2(e){const t={},i={tag:"div",cls:"ag-root ag-unselectable",role:"presentation",children:[{tag:"div",ref:"eGridViewport",cls:"ag-grid-viewport",role:"presentation",children:[{tag:"div",ref:"eGridScrollableArea",cls:"ag-grid-scrollable-area",role:"rowgroup",children:[{tag:"div",ref:"eTop",cls:"ag-grid-pinned-top-rows",role:"presentation",children:[{tag:"div",ref:"eTopExtraRows",cls:"ag-extra-rows-container",role:"presentation"},...Al(t,["pinnedTop","stickyTop"])]},{tag:"div",ref:"eBody",cls:"ag-grid-scrolling-rows",role:"presentation",children:Al(t,["scrolling"])},{tag:"div",ref:"eBottom",cls:"ag-grid-pinned-bottom-rows",role:"presentation",children:Al(t,["stickyBottom","pinnedBottom"])}]}]},{tag:"ag-fake-horizontal-scroll"},{tag:"ag-fake-vertical-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:i}}var P2=class extends K{constructor(){super(...arguments),this.eGridViewport=st,this.eGridScrollableArea=st,this.eTop=st,this.eTopExtraRows=st,this.eBottom=st,this.eBody=st,this.eScrollingRowContainer=st,this.ePinnedTopRowContainer=st,this.ePinnedBottomRowContainer=st,this.pinnedSectionState={top:{height:0,invisible:!0},bottom:{height:0,invisible:!0}},this.stickyBottomRowsHeight=0}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,i=e?.getOverlayWrapperSelector(),{paramsMap:o,elementParams:s}=F2(!!i);this.setTemplate(s,[...i?[i]:[],yy,Fy,x2],o);const r={setRowAnimationCssOnScrollableArea:n=>{this.toggleClassForContainers("ag-row-animation",!!n),this.toggleClassForContainers("ag-row-no-animation",!n)},setPreventRowAnimationCssOnContainers:n=>{this.toggleClassForContainers("ag-prevent-animation",n)},setColumnCount:n=>Xb(this.eGridViewport,n),setRowCount:n=>i3(this.eGridViewport,n),setPinnedSection:(n,l)=>this.setPinnedSection(n,l),setStickyBottomHeight:n=>{this.stickyBottomRowsHeight=Number.parseFloat(n)||0,this.refreshBottomSectionHeight()},setStickyBottomWidth:n=>this.eBottom.style.width=n,setColumnMovingCss:(n,l)=>this.toggleCss(n,l),updateLayoutClasses:(n,l)=>{const a=[this.eGridViewport.classList,this.eBody.classList];for(const d of a)d.toggle(Ie.AUTO_HEIGHT,l.autoHeight),d.toggle(Ie.NORMAL,l.normal),d.toggle(Ie.PRINT,l.print);this.toggleCss(Ie.AUTO_HEIGHT,l.autoHeight),this.toggleCss(Ie.NORMAL,l.normal),this.toggleCss(Ie.PRINT,l.print)},setCellSelectableCss:(n,l)=>{if(n)for(const a of[this.eTop,this.eBody,this.eBottom])a.classList.toggle(n,l)},setGridScrollableAreaWidth:n=>this.eGridScrollableArea.style.width=n,setPinnedColumnsOverflowing:n=>{this.eGridViewport.classList.toggle("ag-pinned-columns-overflow",n)},setGridRole:n=>t3(this.eGridViewport,n)};this.ctrl=this.createManagedBean(new Pg),this.ctrl.setComp(r,this.getGui(),this.eGridViewport,this.eBody,this.eTop,this.eTopExtraRows,this.eBottom),this.createManagedBean(new fy(this.eTop,this.eGridViewport)),(t&&Ne(this.gos)||ai(this.gos))&&e3(this.eGridViewport,!0)}toggleClassForContainers(e,t){for(const i of[this.eScrollingRowContainer,this.ePinnedTopRowContainer,this.ePinnedBottomRowContainer])i.getGui().classList.toggle(e,t)}setPinnedSection(e,t){this.pinnedSectionState[e]=t;const{height:i,invisible:o}=t,s=this.eGridScrollableArea;if(e==="top"){const r=this.eTop,n=`calc(var(--ag-internal-header-rows-height, 0px) + ${i}px)`;this.eGridViewport.style.setProperty("--ag-internal-top-rows-height",`${i}px`),r.style.minHeight=n,r.style.height=n,s.classList.toggle("ag-has-top-pinned-rows",!o)}else this.eGridViewport.style.setProperty("--ag-internal-bottom-rows-height",`${i}px`),s.classList.toggle("ag-has-bottom-pinned-rows",!o),this.refreshBottomSectionHeight()}refreshBottomSectionHeight(){const t=this.pinnedSectionState.bottom.height+this.stickyBottomRowsHeight,i=`${t}px`,o=this.eBottom;o.style.minHeight=i,o.style.height=i,o3(o,t>0,{skipAriaHidden:!0})}getFocusableContainerName(){return"gridBody"}},D2={selector:"AG-GRID-BODY",component:P2};import{_doOnce as Bg}from"ag-stack";function Og(e,...t){console.log("AG Grid: "+e,...t)}var Gg=!1;function M2(e){Gg=e}function Il(e){return!!e||Gg}function Rt(e,t,...i){Il(e.get("debug"))&&Og(t,...i)}function co(e,...t){Bg(()=>_g(e,...t),e+t?.join(""))}function Et(e,...t){Bg(()=>Ng(e,...t),e+t?.join(""))}function Ng(e,...t){console.error("AG Grid: "+e,...t)}function _g(e,...t){console.warn("AG Grid: "+e,...t)}import{AgTabGuardComp as T2}from"ag-stack";var kl=class extends B1{initialiseTabGuard(e){super.initialiseTabGuard(e,gi)}};import{Direction as zg,_findTabbableParent as A2,_focusInto as I2,_focusIntoTabbableFirst as k2,_getActiveDomElement as L2,_last as Wg,_observeIntersection as V2,_observeResize as H2}from"ag-stack";var Ug=(e,t)=>Lh(e,()=>k2(e.getGui(),t,!0)),qg=e=>e?.getFocusableContainerName()??"external",B2=e=>e==null?"external":typeof e=="string"?e:"gridBody",$g=class extends y{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,i){this.view=e,this.eGui=t,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:o,ctrlsSvc:s,ariaAnnounce:r}=this.beans;if(o?.registerGridDropTarget(()=>this.eGui,this),r.setDescriptionContainer(i),this.createManagedBean(new hl(this.view)),this.gos.get("enableContentVisibilityAuto")??!this.gos.get("suppressContentVisibilityAuto")){const[a]=this.addManagedEventListeners({firstDataRendered:()=>{a();const d=setTimeout(()=>{const c=V2(this.beans,t,u=>{u.isIntersecting?t.style.removeProperty("content-visibility"):t.style.setProperty("content-visibility","auto")},{rootMargin:"200px"});this.addDestroyFunc(()=>c())},this.gos.get("contentVisibilityAutoDelay"));this.addDestroyFunc(()=>clearTimeout(d))}})}const l=H2(this.beans,this.eGui,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>l()),s.register("gridCtrl",this)}isDetailGrid(){return A2(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans,t=e.registry;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:t?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:t?.getSelector("AG-STATUS-BAR"),toolbarSelector:t?.getSelector("AG-TOOLBAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){const e=this.eGui;this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:e.clientWidth,clientHeight:e.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e,t=!1){const{view:i}=this;e===!1?i.setCursor(null):t?i.setCursor(e===zg.Horizontal?"col-resize":"row-resize"):i.setCursor(e===zg.Horizontal?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:o}=this.getNextFocusableIndex(t,e),s=e?t.length-1:0,r=i===-1?s:o,{gos:n,beans:{focusSvc:l,navigation:a}}=this,d=n.getCallback("tabToNextGridContainer");if(d){const c=l.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:r}),u=qg(t[r]),h=c==null&&u==="gridBody"?"gridBody":B2(c),g=d({backwards:e,previousContainer:qg(t[i]),nextContainer:h,defaultTarget:c});if(g!==void 0){if(typeof g=="boolean")return g;if(typeof g=="string"){if(g==="gridBody")return this.focusGridBodyDefault(e)||void 0;const p=t.find(f=>f.getFocusableContainerName()===g);if(!p){_g(`tabToNextGridContainer - ${g} container not found`);return}return Ug(p,e)?!0:void 0}return y3(g)?l.focusHeaderPosition({headerPosition:g})||void 0:(a?.ensureCellVisible(g),l.setFocusedCell({...g,forceBrowserFocus:!0}),l.isCellFocused(g)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:i,nextIndex:r})||void 0}focusInnerElement(e){const{gos:t,beans:i,beans:{focusSvc:o,visibleCols:s}}=this;if(t.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const n=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:n,indexWithFocus:n.length,nextIndex:n.length-1})?!0:o.focusGridView({column:Wg(s.allCols),backwards:!0});const l=s.allCols;if(t.get("headerHeight")===0||ve(i)){if(o.focusGridView({column:l[0],backwards:e}))return!0;for(let a=1;a<n.length;a++)if(I2(n[a].getGui(),e))return!0;return!1}return o.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}focusNextElementOutsideContainer(e=!1){const t=[...this.additionalFocusableContainers].map(i=>i.getGui());return this.view.focusNextElementOutsideContainer(e,t)}isFocusInsideGridBody(){const e=this.getFocusableContainers(),{indexWithFocus:t}=this.getNextFocusableIndex(e);return e[t]?.getFocusableContainerName()==="gridBody"}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{indexWithFocus:i,nextIndex:o}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:i,nextIndex:o})||this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!oo(e)||!ve(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const i=L2(this.beans),o=e.findIndex(s=>s.getGui().contains(i));return{indexWithFocus:o,nextIndex:o+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:i,beans:{focusSvc:o,visibleCols:{allCols:s}}}=this;return e?o.focusGridView({column:Wg(s),backwards:!0}):t.get("headerHeight")===0||ve(i)?o.focusGridView({column:s[0]}):o.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:i,indexWithFocus:o}=e,s=t?-1:1;for(let r=e.nextIndex;r>=0&&r<i.length;r+=s){const n=i[r];if(n.getFocusableContainerName()==="gridBody"&&(o===-1||(t?o>r:o<r))){if(this.focusGridBodyDefault(t))return!0;continue}if(Ug(n,t))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},O2=class extends kl{constructor(e){super(),this.gridBody=St,this.toolbar=St,this.gridHeaderDropZones=St,this.sideBar=St,this.statusBar=St,this.pagination=St,this.rootWrapperBody=St,this.ariaDescription=St,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),focusNextElementOutsideContainer:(r,n)=>this.focusNextElementOutsideContainer(r,[this.getGui(),...n]),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:r=>{this.getGui().style.userSelect=r??"",this.getGui().style.webkitUserSelect=r??""},setCursor:r=>{this.getGui().style.cursor=r??""}},t=this.createManagedBean(new $g),i=t.getOptionalSelectors(),o=this.createTemplate(i),s=[D2,...Object.values(i).filter(r=>!!r)];this.setTemplate(o,s),t.setComp(e,this.getGui(),this.ariaDescription),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>t.focusInnerElement(r),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{e.remove(),Rt(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.rootWrapperBody.classList,{AUTO_HEIGHT:o,NORMAL:s,PRINT:r}=Ie,{autoHeight:n,normal:l,print:a}=t;i.toggle(o,n),i.toggle(s,l),i.toggle(r,a),this.toggleCss(o,n),this.toggleCss(s,l),this.toggleCss(r,a)}createTemplate(e){const t=e.toolbarSelector?{tag:"ag-toolbar",ref:"toolbar"}:null,i=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones",ref:"gridHeaderDropZones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,s=e.statusBarSelector?{tag:"ag-status-bar",ref:"statusBar"}:null,r=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,i,{tag:"div",ref:"ariaDescription",cls:"ag-aria-description-container"},{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},s,n,r]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[];this.toolbar&&e.push(this.toolbar),e.push(...this.gridHeaderDropZones?.getFocusableContainers?.()??[],this.gridBody);for(const t of[this.sideBar,this.statusBar,this.pagination])t&&e.push(t);return e.filter(t=>Jb(t.getGui()))}},Kg="https://www.ag-grid.com",jg=new Set,Ds={},$t={},Ms,Zg=!1,Qg=!1;function G2(e){const[t,i]=e.version.split(".")||[],[o,s]=Ms.split(".")||[];return t===o&&i===s}function N2(e,t){Ms||(Ms=e.version);const i=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?G2(e)||Et(i(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Ms}.`)):Et(i(`'${e.moduleName}' is incompatible.`));const o=e.validate?.();o&&!o.isValid&&(o.errorId!==void 0?Bs(o.errorId,o.errorParams,`
`,t):Et(`${o.message}`))}function Kt(e,t){N2(e,t);const i=e.rowModels??["all"];jg.add(e);let o;t!==void 0?(Zg=!0,$t[t]??($t[t]={}),o=$t[t]):o=Ds;for(const s of i)o[s]??(o[s]={}),o[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)Kt(s,t);e.onRegister?.()}function _2(e){delete $t[e]}function Yg(e,t,i){const o=s=>!!Ds[s]?.[e]||!!$t[t]?.[s]?.[e];return o(i)||o("all")}function Jg(){return Zg}function z2(e,t){const i=$t[e]??{};return[...Object.values(Ds.all??{}),...Object.values(i.all??{}),...Object.values(Ds[t]??{}),...Object.values(i[t]??{})]}function W2(){return new Set(jg)}function U2(e,t){const i=$t[e]??{};return[...Object.values(i.all??{}),...Object.values(i[t]??{})]}function Ll(){return Qg}function q2(){Qg=!0}var Xg=class{static register(e){Kt(e,void 0)}static registerModules(e){for(const t of e)Kt(t,void 0)}};function ep(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const i=ep(t.dependsOn);if(i)return i}}}var E="36.3.0",tp=2e3,ip=100,op="_version_",sp=null,Vl=`${Kg}/javascript-data-grid`;function $2(e){sp=e}function K2(e){Vl=e}function uo(){return Vl}function Hl(e,t){return t.includes(e)}function rp(e,t){const{id:i,params:o}=e;if(o==null)return`${i}`;try{return`${i}:${JSON.stringify(o)}`}catch{return`${i}:unserialisable:${t}`}}var Ts=new Set;function np(e,t){return t===void 0||e===void 0||e===t}var Le=[],j2=100,As=[],Z2=10;function Q2(){const e=As.splice(0);for(const{id:t,params:i,severity:o,defaultMessage:s,gridId:r}of e)go(t,i,o,s,r)}var ho=!1,lp=[],Bl=new Set;function ap(e){if(e.debug!==void 0&&M2(e.debug),e.throwOn!==void 0&&(lp=e.throwOn),e.suppress!==void 0&&(Bl=new Set(e.suppress)),e.capture!==void 0){const t=ho;ho=e.capture,ho?t||Q2():As.length=0}}function dp(e,t){const i={gridId:e,listener:t};Ts.add(i);for(let o=0,s=Le.length;o<s;++o){const r=Le[o];np(r.gridId,e)&&t(r)}return()=>{Ts.delete(i),Ts.size===0&&(Le.length=0)}}var Ol=null;function Y2(e){Ol=e}function J2(e,t){if(!Ol)return;const i=[];for(let o=0,s=Le.length;o<s;++o)Le[o].gridId===void 0&&i.push(Le[o]);if(i.length!==0){for(let o=Le.length-1;o>=0;--o)Le[o].gridId===void 0&&Le.splice(o,1);Ol(e,i,t)}}function go(e,t,i,o,s){if(!ho||Bl.has(e))return;const r={id:e,params:t,severity:i,gridId:s,defaultMessage:o};Le.length<j2&&Le.push(r);for(const n of Ts)np(s,n.gridId)&&n.listener(r)}function cp(e,t){return!Bl.has(e)&&Hl(t,lp)}function up(e,t,i,o){throw new Error(`${i} #${e} `+ks(e,t,o).join(" "))}function Gl(e,t,i,o,s){go(e,t,i,o,s),cp(e,i)&&up(e,t,i,o)}var Is=200,X2=50,po=[],Nl=new Set,xt;function eR(e){const t=Array.isArray(e.moduleName)?[...e.moduleName].sort():[e.moduleName];return`${e.gridId}::${t.join("|")}::${e.rowModelType}::${String(e.reasonOrId)}`}function tR(e){const t=e.map(({reasonOrId:i,moduleName:o,additionalText:s})=>JSON.stringify({reasonOrId:i,moduleName:o,additionalText:s}));return{...e[0],reports:t}}function hp(e){const t=eR(e);Nl.has(t)||(Nl.add(t),cp(Is,"error")&&up(Is,e,"error"),po.push(e),xt??(xt=setTimeout(iR,X2)))}function iR(){if(xt!==void 0&&(clearTimeout(xt),xt=void 0),po.length===0)return;const e=po.splice(0,po.length),t=new Map;for(let i=0,o=e.length;i<o;++i){const s=e[i],r=t.get(s.gridId);r?r.push(s):t.set(s.gridId,[s])}for(const[i,o]of t){const s=tR(o);Ls(Et,Is,s,!1),go(Is,s,"error",void 0,i)}}function oR(){xt!==void 0&&(clearTimeout(xt),xt=void 0),po.length=0,Nl.clear()}function fo(e,t,i,o,s,r){Ls(e,t,i,s),Gl(t,i,o,void 0,r)}function ks(e,t,i){return sp?.(e,t)??[aR(e,t,i)]}function Ls(e,t,i,o,s){e(`${o?"warning":"error"} #${t}`,...ks(t,i,s))}function gp(e){return typeof e!="object"&&typeof e!="function"}function sR(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))gp(e[i])&&(t[i]=e[i]);return JSON.stringify(t)}function rR(e){const t=[];for(let i=0,o=e.length;i<o;++i){const s=e[i];gp(s)&&t.push(s)}return JSON.stringify(t)}function pp(e){let t=e;return e instanceof Error?t=e.toString():Array.isArray(e)?t=rR(e):typeof e=="object"&&(t=sR(e)),t}function nR(e){const{id:t,params:i,defaultMessage:o}=e;return ks(t,i,o).map(pp).join(" ")}function _l(e){return e===void 0?"undefined":e??"null"}function zl(e,t){return`${e}?${t.toString()}`}function lR(e,t,i){const o=Array.from(t.entries()).sort((r,n)=>n[1].length-r[1].length);let s=zl(e,t);for(const[r,n]of o){if(r===op)continue;const l=s.length-i;if(l<=0)break;const a="...",d=l+a.length,c=n.length-d>ip?n.slice(0,n.length-d)+a:n.slice(0,ip)+a;t.set(r,c),s=zl(e,t)}return s}function Vs(e,t){const i=new URLSearchParams;if(i.append(op,E),t)for(const r of Object.keys(t))i.append(r,pp(t[r]));const o=`${Vl}/errors/${e}`,s=zl(o,i);return s.length<=tp?s:lR(o,i,tp)}var aR=(e,t,i)=>{const o=Vs(e,t),s=`${i?i+` 
`:""}Visit ${o}`;return Ll()?s:`${s}${i?"":` 
  Alternatively register the ValidationModule to see the full message in the console.`}`};function Wl(...e){fo(co,e[0],e[1],"warning",!0)}function Ul(...e){fo(Et,e[0],e[1],"error",!1)}function ql(e,t,i){fo(co,t,i,"warning",!0,e)}function dR(e,t,i){fo(co,t,i,"deprecation",!0,e)}function fp(e,t,i){fo(Et,t,i,"error",!1,e)}function Hs(e,t,i){return go(t,i,"error",void 0,e),new Error($l(void 0,[t,i]))}function cR(...e){return go(e[0],e[1],"error"),new Error($l(void 0,e))}function Bs(e,t,i,o){Ls(Et,e,t,!1,i),!ho&&As.length<Z2&&As.push({id:e,params:t,severity:"error",gridId:o,defaultMessage:i}),Gl(e,t,"error",i,o)}function uR(e,t,i){Ls(co,e,t,!0,i),Gl(e,t,"warning",i)}function $l(e,t){const i=t[0];return`error #${i} `+ks(i,t[1],e).join(" ")}function Ft(...e){return $l(void 0,e)}var B=(e,t)=>{for(const i of Object.keys(t))t[i]=e;return t},mp={dispatchEvent:"CommunityCore",...B("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0,getGridElement:0}),...B("GridState",{getState:0,setState:0}),...B("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...B("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...B("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...B("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...B("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...B("ValueCache",{expireValueCache:0}),...B("CellApi",{getCellValue:0}),...B("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...B("Sort",{onSortChanged:0}),...B("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...B("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...B("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...B("HighlightChanges",{flashCells:0}),...B("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...B("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...B("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...B("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...B("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...B("ColumnResize",{setColumnWidths:0}),...B("ColumnHover",{isColumnHovered:0}),...B("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0,getEditValidationErrors:0}),...B("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...B("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...B("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...B("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...B("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...B("Notes",{getNote:0,setNote:0,refreshNotes:0}),...B("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...B("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...B("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...B("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...B("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...B("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...B("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...B("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...B("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...B("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...B("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...B("PdfExport",{getDataAsPdf:0,exportDataAsPdf:0}),...B("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...B("Formula",{refreshFormulas:0}),...B("CalculatedColumns",{openCalculatedColumnDialog:0,openAddCalculatedColumnDialog:0,refreshCalculatedColumns:0}),...B("ContextMenu",{showContextMenu:0}),...B("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...B("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...B("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...B("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...B("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...B("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...B("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...B("Toolbar",{getToolbarItemInstance:0}),...B("StatusBar",{getStatusPanel:0}),...B("AiToolkit",{getStructuredSchema:0})},Kl={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},hR=(e,t)=>e.eventSvc.dispatchEvent(t),Cp=class{};Reflect.defineProperty(Cp,"name",{value:"GridApi"});var gR=class extends y{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Cp,this.fns={...Kl,dispatchEvent:hR},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(mp))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:i,beans:o}=this;i!==Kl&&(i[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:i,fns:{[e]:o}}=this;return o?o(i,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:o}=this;if(!t){Wl(26,{fnName:e,preDestroyLink:o});return}const s=mp[e];i.assertModuleRegistered(s,`\`api.${e}\``)&&t.log.warn(27,{fnName:e,module:s})}destroy(){super.destroy(),this.fns=Kl,this.beans=null}};function vp(e){return e.context.getId()}function pR(e){e.gridDestroySvc.destroy()}function fR(e){return e.gridDestroySvc.destroyCalled}function mR(e,t){return e.gos.get(t)}function CR(e,t,i){wp(e,{[t]:i})}function wp(e,t){e.gos.updateGridOptions({options:t})}function vR(e){return uC(e.gridApi)}function wR(e,t){const i=t.replace(/Module$/,"");return e.gos.isModuleRegistered(i)}function SR(e){e.expansionSvc?.expandAll(!0)}function bR(e){e.expansionSvc?.expandAll(!1)}function jl(e){e.rowModel?.onRowHeightChanged()}function Zl(e){e.rowModel?.resetRowHeights()}function yR(e){e.expansionSvc?.resetExpansion()}function Ve(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Os(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function Sp(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}function RR(e){const t=e.rowModel;return t.getType()==="viewport"?t:void 0}function ER(e,t,i){const o=Sp(e);if(o){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){e.log.error(238);return}o.setRowCount(t,i);return}e.log.error(28);return}Os(e)?.setRowCount(t,i)}function xR(e){return ht(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function FR(e){return e.rowModel.isLastRowIndexKnown()}var bp={moduleName:"CsrmSsrmSharedApi",version:E,apiFunctions:{expandAll:SR,collapseAll:bR,resetRowGroupExpansion:yR}},yp={moduleName:"RowModelSharedApi",version:E,apiFunctions:{onRowHeightChanged:jl,resetRowHeights:Zl}},Rp={moduleName:"SsrmInfiniteSharedApi",version:E,apiFunctions:{setRowCount:ER,getCacheBlockState:xR,isLastRowIndexKnown:FR}};import{_defaultComparator as Ep}from"ag-stack";var mo=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const i=t[0];if(i.sourceRowIndex>=0)return i;t=i.childrenAfterGroup}},xp=(e,t,i,o)=>{if(!t.size||!e)return!1;let s=!1;const r=e.length??0;let n=-1;i&&(n=i.sourceRowIndex,i=n<0?mo(i):null,i&&(n=i.sourceRowIndex)),n<0||n>=r?n=r:o||++n;let l=n,a=Math.min(n,r-1);for(const u of t){const h=u.sourceRowIndex;h<l&&(l=h),h>a&&(a=h)}let d=l;for(let u=l;u<n;++u){const h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,s=!0),++d)}let c=a;for(let u=a;u>=n;--u){const h=e[u];t.has(h)||(h.sourceRowIndex!==c&&(h.sourceRowIndex=c,e[c]=h,s=!0),--c)}for(const u of t)u.sourceRowIndex!==d&&(u.sourceRowIndex=d,e[d]=u,s=!0),++d;return s},PR=class extends y{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=ie(this.gos)?mo:DR;const e=()=>{this.pivotActive=this.colModel.isPivotActive()},t=()=>{const i=this.gos;this.accentedSort=!!i.get("accentedSort"),this.primaryColumnsSortGroups=Xe(i)};this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],t),this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),t(),e()}wireBeans(e){this.colModel=e.colModel,this.formula=e.formula,this.valueSvc=e.valueSvc}doFullSortInPlace(e,t){return e.sort((i,o)=>this.compareRowNodes(t,i,o))}compareRowNodes(e,t,i){const o=this.accentedSort;for(let s=0,r=e.length;s<r;++s){const n=e[s],l=n.column,a=n.descending,d=this.getValue(t,l),c=this.getValue(i,l),u=n.colComparator??(t.group?void 0:n.leafComparator);let h;if(u?h=u(d,c,t,i,a):n.absolute?h=Ep(Fp(d),Fp(c),o):h=Ep(d,c,o),h)return a?-h:h}return 0}getValue(e,t){if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.showRowGroup)return}const i=this.valueSvc.getValueFromData(t,e);if(t.allowFormula){const o=this.formula;if(o?.isFormula(i))return o.resolveValue(t,e)}return i}getGroupDataValue(e,t){if(sn(this.gos,this.pivotActive)){const o=this.firstLeaf(e);return o&&this.valueSvc.getValueFromData(t,o)}const i=t.showRowGroupCol;return i?e.groupData?.[i.colId]:void 0}},DR=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const i=t[0];if(i.data)return i;t=i.childrenAfterGroup}},Fp=e=>{if(!e)return e;if(typeof e=="bigint")return e<0n?-e:e;const t=Number(e);return Number.isNaN(t)?e:Math.abs(t)};function MR(e){e.sortSvc?.onSortChanged("api")}import{RefPlaceholder as jt,_clearElement as TR,_setDisplayed as Zt}from"ag-stack";import{_isNodeOrElement as AR,_loadTemplate as IR}from"ag-stack";function Pp(e,t,i){const o=X(e,t,i);if(o){const{className:r}=o;if(typeof r=="string"&&r.includes("ag-icon")||typeof r=="object"&&r["ag-icon"])return o}const s=O({tag:"span"});return s.appendChild(o),s}function X(e,t,i){let o=null;e==="smallDown"?t.log.warn(262):e==="smallLeft"?t.log.warn(263):e==="smallRight"&&t.log.warn(264);const s=i?.colDef.icons;if(s&&(o=s[e]),t.gos&&!o){const r=t.gos.get("icons");r&&(o=r[e])}if(o){let r;if(typeof o=="function")r=o();else if(typeof o=="string")r=o;else{t.log.warn(38,{iconName:e});return}if(typeof r=="string")return IR(r);if(AR(r))return r;t.log.warn(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||t.validation?.validateIcon(e),O({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Qt=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),kR={tag:"span",cls:"ag-sort-indicator-container",children:[Qt("Order","order"),Qt("Asc","ascending-icon"),Qt("Desc","descending-icon"),Qt("Mixed","mixed-icon"),Qt("AbsoluteAsc","absolute-ascending-icon"),Qt("AbsoluteDesc","absolute-descending-icon"),Qt("None","none-icon")]},Ql=class extends K{constructor(e){super(),this.eSortOrder=jt,this.eSortAsc=jt,this.eSortDesc=jt,this.eSortMixed=jt,this.eSortNone=jt,this.eSortAbsoluteAsc=jt,this.eSortAbsoluteDesc=jt,e||this.setTemplate(kR)}attachCustomElements(e,t,i,o,s,r,n){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=o,this.eSortNone=s,this.eSortAbsoluteAsc=r,this.eSortAbsoluteDesc=n}setupSort(e,t=!1,i){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=i,this.setupMultiSortIndicator(),!e.isSortable()&&!e.showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const o=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(t==null)return;const o=X(e,this.beans,i);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:i,eSortAbsoluteDesc:o,eSortNone:s,column:r,gos:n,beans:l}=this,{isAbsoluteSort:a,isDefaultSort:d,isAscending:c,isDescending:u,direction:h}=Iu(r,l,this.getSortDefOverride);if(e&&Zt(e,c&&d,{skipAriaHidden:!0}),t&&Zt(t,u&&d,{skipAriaHidden:!0}),s){const g=!r.colDef.unSortIcon&&!n.get("unSortIcon");Zt(s,!g&&!h,{skipAriaHidden:!0})}i&&Zt(i,c&&a,{skipAriaHidden:!0}),o&&Zt(o,u&&a,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);const o=t.showRowGroup;Xe(i)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:i}=this;if(e){const o=t.sortSvc.getDisplaySort(i)?.direction==="mixed";Zt(e,o,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;const o=i.getDisplaySortIndex(t)??-1,s=o>=0&&i.isMultiSort();Zt(e,s,{skipAriaHidden:!0}),o>=0?e.textContent=(o+1).toString():TR(e)}refresh(){this.onSortChanged()}},LR={selector:"AG-SORT-INDICATOR",component:Ql},Dp=(e,t)=>{if(e!=null)return typeof e=="object"?e[_e(t)]:e},Mp=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i],r=s.column,n=s.type,l=Dp(r.colDef.comparator,n);let a;if(!l&&r.showRowGroup){const d=r.field,c=d?t.getNonPivotCol(d):null;c&&(a=Dp(c.colDef.comparator,n))}s.colComparator=l,s.leafComparator=a,s.descending=s.sort==="desc",s.absolute=n==="absolute"}},VR=class extends y{constructor(){super(...arguments),this.beanName="sortSvc",this.SortIndicatorSelector=LR,this.SortIndicatorComp=Ql,this.cols=null,this.map=null,this.opts=null,this.displaySortCount=0}destroy(){super.destroy(),this.invalidate()}invalidate(){this.cols=null,this.map=null,this.opts=null}progressSort(e,t,i){const{sortDef:o,index:s}=this.getNextSortDefAndIndex(e,e.getSortDef(),e.sortCycleIndex);this.setSortForColumn(e,o,t,i,s)}progressSortFromEvent(e,t){const o=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,i,o,s){const{gos:r,showRowGroupCols:n,colModel:l}=this.beans,a=Xe(r),d=[e];if(e.showRowGroup&&a){const c=n?.getSourceColumnsForGroupColumn?.(e);for(let u=0,h=c?.length??0;u<h;++u){const g=c[u];g.isSortable()&&d.push(g)}}l.beginColUpdate();try{for(let g=0,p=d.length;g<p;++g)this.setColSort(d[g],t,o,g===0?s:void 0);const c=a?e.showRowGroupCol:null;c&&d.push(c);const h=(i||r.get("alwaysMultiSort"))&&!r.get("suppressMultiSort")?[]:this.clearSortBarTheseColumns(d,o);c&&this.setColSort(c,this.getCoupledGroupSortDef(c),o),this.updateSortIndex(e,o);for(let g=0,p=d.length;g<p;++g)h.push(d[g]);this.dispatchSortChangedEvents(o,h)}finally{l.endColUpdate()}}getCoupledGroupSortDef(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);for(let i=0,o=t?.length??0;i<o;++i){const s=t[i].getSortDef();if(s)return s}return pe()}updateSortIndex(e,t){const{gos:i,colModel:o}=this.beans,s=Xe(i),r=s?e.showRowGroupCol??e:e,n=this.getSortedCols(),l=new Map;let a=0;for(let c=0,u=n.length;c<u;++c){const h=n[c];s&&h.showRowGroup||h===r||l.set(h,a++)}r.getSortDef()&&l.set(r,a);const d=o.getAllCols();for(let c=0,u=d.length;c<u;++c){const h=d[c],g=l.get(h)??null;(h.sortIndex??null)!==g&&this.setColSortIndex(h,g,t)}}onSortChanged(e,t){this.invalidate(),this.dispatchSortChangedEvents(e,t)}dispatchSortChangedEvents(e,t){const i={type:"sortChanged",source:e,columns:t};this.eventSvc.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[],o=new Set(e),s=this.beans.colModel.getAllCols();for(let r=0,n=s.length;r<n;++r){const l=s[r];o.has(l)||(l.getSortDef()&&i.push(l),this.setColSort(l,pe(),t))}return i}getNextSortDirection(e,t){const i=t===void 0,o=i?e.getSortDef():pe(t);return this.getNextSortDefAndIndex(e,o,i?e.sortCycleIndex:0).sortDef}getNextSortDefAndIndex(e,t,i=0){const o=LS(this.gos,e),s=o.length;if(s===0)return{sortDef:pe(),index:0};let r=-1;for(let l=i<s?i:0;l<s;++l)if(Yl(o[l],t)){r=l;break}const n=r===-1||r+1>=s?0:r+1;return{sortDef:pe(o[n]),index:n}}getSortedCols(){return this.cols??this.loadSortedCols()}getIndexMap(){return this.map??this.loadIndexMap(this.getSortedCols())}loadSortedCols(){const{colModel:e,showRowGroupCols:t}=this.beans,i=Xe(this.gos),o=e.pivotMode,s=e.getAllCols(),r=[];for(let l=0,a=s.length;l<a;++l){const d=s[l];if(d.getSortDef()){if(o){const c=i?d.showRowGroupCol:d.showRowGroup;if(!d.aggFunc&&d.primary&&!c)continue}r.push(d)}}r.length>1&&r.sort(HR);const n=i&&t?t.interleaveSortedColumns(r):r;return this.cols=n,n}loadIndexMap(e){const t=new Map,i=e.length,o=this.beans.showRowGroupCols;let s;if(Xe(this.gos)&&o)s=o.fillCoupledSortIndexMap(e,t);else{for(let r=0;r<i;++r)t.set(e[r],r);s=i-1}return this.displaySortCount=s+1,this.map=t,t}getSortOptions(){let e=this.opts;if(e===null){e=[];const t=this.getSortedCols();for(let i=0,o=t.length;i<o;++i){const s=t[i],r=s.getSortDef(),n=r?.direction;n&&e.push({sort:n,type:_e(r.type),column:s,colComparator:void 0,leafComparator:void 0,descending:!1,absolute:!1})}Mp(e,this.beans.colModel),this.opts=e}return e}getDisplaySort(e){const t=e.getSortDef();if(!e.showRowGroup||!Xe(this.gos))return t;const i=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!i?.length)return t;const s=e.field!=null||!!e.valueGetter?t:i[0].getSortDef();let r=!0;for(let n=0,l=i.length;r&&n<l;++n)r=Yl(i[n].getSortDef(),s);return r?s:{type:_e(t?.type),direction:"mixed"}}getDisplaySortIndex(e){return this.getIndexMap().get(e)}isMultiSort(){return this.getDisplaySortCount()>1}getDisplaySortCount(){return this.getIndexMap(),this.displaySortCount}setupHeader(e,t){const i=()=>{const{type:o,direction:s}=pe(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",s==="asc"),e.toggleCss("ag-header-cell-sorted-desc",s==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",o==="absolute"&&s==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",o==="absolute"&&s==="desc"),e.toggleCss("ag-header-cell-sorted-none",!s),t.showRowGroup){const r=this.beans.showRowGroupCols?.isGroupSortMixed(t,s)??!0;e.toggleCss("ag-header-cell-sorted-mixed",r)}};e.addManagedEventListeners({sortChanged:i,columnPinned:i,columnRowGroupChanged:i,displayedColumnsChanged:i}),i()}initCol(e){const{sortIndex:t,initialSortIndex:i}=e.colDef,o=NS(e.colDef);o&&e.setSortDef(o);const s=t!==void 0?t:i;s!=null&&(e.sortIndex=s)}updateColSort(e,t,i){t!==void 0&&this.setColSort(e,pe(t),i)}setColSort(e,t,i,o){const s=e.getSortDef();e.sortCycleIndex=o,Yl(s,t)||(!!s?.direction!=!!t.direction?this.invalidate():this.opts=null,e.setSortDef(t),e.dispatchColEvent("sortChanged",i)),e.dispatchStateUpdatedEvent("sort",i)}setColSortIndex(e,t,i){e.sortIndex=t,this.invalidate(),e.dispatchStateUpdatedEvent("sortIndex",i)}},HR=(e,t)=>(e.sortIndex??2147483647)-(t.sortIndex??2147483647),Yl=(e,t)=>e?t?e.type===t.type&&e.direction===t.direction:e.direction===null:t?t.direction===null:!0;function Jl(e){const t=e?.getSortOptions();if(!t)return[];const i=t.length,o=new Array(i);for(let s=0;s<i;++s){const r=t[s];o[s]={sort:r.sort,type:r.type,colId:r.column.colId}}return o}var Xl={moduleName:"Sort",version:E,beans:[VR,PR],apiFunctions:{onSortChanged:MR},userComponents:{agSortIndicator:Ql},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}};import{_debounce as BR}from"ag-stack";var Co=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},OR=class extends y{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},Tp(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=Tp(this.rootNode),i=new Array(e.length);t._leafs=i;let o=0;const s=this.beans.groupStage?.getNestedDataGetter(),r=s?new Set:null,n=(l,a)=>{const d=l.level+1;for(let c=0,u=a.length;c<u;++c){const h=a[c];if(!h)continue;const g=this.createRowNode(h,d,o);if(i[o++]=g,r&&!r.has(h)){r.add(h),g.treeParent=l;const p=s(h);p&&n(g,p)}}};n(t,e),i.length=o}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:i}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),i?.clearNonLeafs();const o=this.rootNode._leafs;if(o)for(let s=0,r=o.length;s<r;++s)o[s]._destroy(null);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:i,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const s=Bt(this.beans),r=e.changedRowNodes,{adds:n,updates:l}=r,a=new Set,d=this.beans.groupStage?.getNestedDataGetter();let c=o.get("suppressMaintainUnsortedOrder")?void 0:!1,u=-1,h=!1;const g=(m,w)=>{if(!c&&c!==void 0){const v=m.sourceRowIndex;c=v<=u,u=v}m.data!==w&&(m.updateData(w),n.has(m)||l.add(m))},p=(m,w,v)=>{for(let S=0,C=w.length;S<C;++S){const b=w[S];if(!b)continue;let R=this.getRowNode(s({data:b,level:v}));if(R?(g(R,b),h||(h=!!d&&R.treeParent!==m)):(R=this.createRowNode(b,v),n.add(R)),!d||a.has(R)){a.add(R);continue}a.add(R),R.treeParent=m;const x=d(b);x&&p(R,x,v+1)}};p(i,t,0);const f=this.deleteUnusedNodes(a,r,!!e.animate)||c||n.size>0;if(f){const m=i._leafs??(i._leafs=[]);c===void 0?WR(m,a,r):zR(m,a)&&(r.reordered=!0)}(f||h||l.size)&&(e.rowDataUpdated=!0)}deleteUnusedNodes(e,{removals:t},i){const o=this.rootNode._leafs,s=this.beans.selectionSvc;for(let r=0,n=o.length;r<n;r++){const l=o[r];e.has(l)||this.destroyNode(l,i)&&(t.push(l),l.isSelected()&&s?.removeFromSelection?.(l,"rowDataChanged"))}return t.length>0}updateRowData(e,t,i){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return this.warn(268),{remove:[],update:[],add:[]};const o=Bt(this.beans),s=this.executeRemove(o,e,t,i),r=this.executeUpdate(o,e,t),n=this.executeAdd(e,t);return{remove:s,update:r,add:n}}executeRemove(e,{remove:t},{adds:i,updates:o,removals:s},r){const n=this.rootNode._leafs,l=n?.length,a=t?.length;if(!a||!l)return[];const d=this.beans.selectionSvc;let c=0,u=l,h=0;const g=new Array(a);for(let p=0;p<a;++p){const f=this.lookupNode(e,t[p]);if(!f)continue;const m=f.sourceRowIndex;m<u&&(u=m),m>h&&(h=m),g[c++]=f,this.destroyNode(f,r)&&(f.isSelected()&&d?.removeFromSelection?.(f,"rowDataChanged"),i.delete(f)||(o.delete(f),s.push(f)))}return g.length=c,c&&_R(n,u,h),g}executeUpdate(e,{update:t},{adds:i,updates:o}){const s=t?.length;if(!s)return[];const r=new Array(s);let n=0;for(let l=0;l<s;l++){const a=t[l],d=this.lookupNode(e,a);d&&(d.updateData(a),r[n++]=d,i.has(d)||o.add(d))}return r.length=n,r}executeAdd(e,t){var i;const o=(i=this.rootNode)._leafs??(i._leafs=[]),s=o.length,r=e.add,n=r?.length;if(!n)return[];const l=s+n;let a=this.sanitizeAddIndex(o,e.addIndex);if(a<s){for(let u=s-1,h=l-1;u>=a;--u){const g=o[u];g.sourceRowIndex=h,o[h--]=g}t.reordered=!0}o.length=l;const d=new Array(n),c=t.adds;for(let u=0;u<n;u++){const h=this.createRowNode(r[u],0,a);c.add(h),o[a]=h,d[u]=h,a++}return d}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",rowData:e??null})}createRowNode(e,t,i){const o=new ze(this.beans);o.parent=this.rootNode,o.level=t,o.group=!1,i!=null&&(o.sourceRowIndex=i),o.setDataAndId(e,String(this.nextId++));const s=o.id,r=this.allNodesMap;return r[s]&&this.warn(2,{nodeId:s}),r[s]=o,o}destroyNode(e,t){if(!e._destroy(t))return!1;const i=e.id,o=this.allNodesMap;return o[i]===e&&delete o[i],!0}lookupNode(e,t){if(!e)return NR(this.beans.log,this.rootNode._leafs,t);const i=e({data:t,level:0}),o=this.allNodesMap[i];return o||(this.error(4,{id:i}),null)}sanitizeAddIndex(e,t){const i=e.length;if(typeof t!="number"||t<0||t>=i||Number.isNaN(t))return i;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=GR(e,t)),t}},GR=(e,t)=>{for(let i=0,o=e.length;i<o;i++)if(e[i]?.rowIndex==t-1)return i+1;return t},Tp=e=>{e.group=!0,e.level=-1,e._expanded=!0,e.id=Ji,e._leafs?.length!==0&&(e._leafs=[]);const t=[],i=[],o=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=i,e.childrenAfterAggFilter=o,e.childrenAfterFilter=s;const r=e.sibling;return r&&(r.childrenAfterGroup=t,r.childrenAfterSort=i,r.childrenAfterAggFilter=o,r.childrenAfterFilter=s,r.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},NR=(e,t,i)=>{if(t)for(let o=0,s=t.length;o<s;o++){const r=t[o];if(r.data===i)return r}return e.error(5,{data:i}),null},_R=(e,t,i)=>{t=Math.max(0,t);for(let o=t,s=e.length;o<s;++o){const r=e[o];o<=i&&r.destroyed||(r.sourceRowIndex=t,e[t++]=r)}e.length=t},zR=(e,t)=>{const i=t.size;e.length=i;let o=0,s=!1,r=!1;for(const n of t){const l=n.sourceRowIndex;l===o?r||(r=s):(l>=0?r=!0:s=!0,n.sourceRowIndex=o,e[o]=n),++o}return r},WR=(e,t,{adds:i})=>{const o=e.length,s=t.size;s>o&&(e.length=s);let r=0;for(let n=0;n<o;++n){const l=e[n];l.destroyed||(r!==n&&(l.sourceRowIndex=r,e[r]=l),++r)}for(const n of i)n.sourceRowIndex<0&&(n.sourceRowIndex=r,e[r++]=n);e.length=r},UR=class extends y{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowsToRender=this.rowsToDisplay,this.loadingRows=null,this.formulaRows=[],this.positionedRows=[],this.positionedRowsNext=[],this.positioningRows=0,this.stages=null,this.asyncTransactions=null,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=BR(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new ze(e);this.rootNode=t,this.nodeManager=this.createBean(new OR(t));const i=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:i,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.onPivotChanged.bind(this),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,i=[e.groupStage,e.filterStage,e.groupFilterStage,e.pivotStage,e.aggStage,e.sortStage,e.groupSortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=i;for(let o=i.length-1;o>=0;--o){const s=i[o].refreshProps;if(s)for(const r of s)t.set(r,o)}this.addManagedPropertyListeners([...t.keys(),"rowData"],o=>{const s=o.changeSet?.properties;s&&this.onPropChange(s)}),Li(this,()=>this.resetRowHeights()),this.addManagedPropertyListeners(["loading","loadingRows"],()=>this.onLoadingRowsChanged())}start(){this.updateLoadingRows(),this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):(this.setInitialData(),this.loadingRows&&!this.rowNodesCountReady&&this.refreshModel({step:"nothing"}))}onLoadingRowsChanged(){!this.updateLoadingRows()||!this.started||this.refreshModel({step:"nothing",keepRenderedRows:!1,animate:!1})}updateLoadingRows(){if(!Jr(this.gos)){const n=this.loadingRows;if(this.loadingRows=null,this.rowsToRender=this.rowsToDisplay,!n)return!1;for(const l of n)l._destroy(null);return!0}const t=tS(this.gos),i=this.loadingRows==null,o=this.loadingRows??(this.loadingRows=[]);this.rowsToRender=o;let s=i;const r=Ge(this.beans);for(;o.length<t;){const n=new ze(this.beans);n.parent=this.rootNode,n.level=0,n.uiLevel=0,n.group=!1,n.stub=!0,n.selectable=!1,n.setRowHeight(r),o.push(n),s=!0}for(;o.length>t;)o.pop()._destroy(null),s=!0;return s}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,i,o){let s,r=!1;do{s=!1;const n=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(n,i),d=Math.min(l,o);for(let c=a;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const h=gt(this.beans,u);u.setRowHeight(h.height),s=!0,r=!0}}s&&this.setRowTopAndRowIndex()}while(s);return r}onPropChange(e){const{nodeManager:t,gos:i,beans:o}=this,s=o.groupStage;if(!t)return;const r=new Set(e),n=s?.onPropChange(r);let l;r.has("rowData")?l=i.get("rowData"):n&&(l=s?.extractData()),l&&!Array.isArray(l)&&(l=null,this.warn(1));const a={step:"nothing",changedProps:r};if(l){const c=!n&&!!this.rootNode?._leafs?.length&&l.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate");this.refreshingData=!0,c?(a.keepRenderedRows=!0,a.animate=!i.get("suppressAnimationFrame"),a.changedRowNodes=new Co,t.setImmutableRowData(a,l)):(a.rowDataUpdated=!0,a.newData=!0,t.setNewRowData(l),this.rowNodesCountReady=!0)}const d=a.rowDataUpdated?"group":this.getRefreshedStage(e);d&&(a.step=d,this.refreshModel(a))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:i}=this;if(!t)return null;const o=t.length;let s=o;for(let r=0,n=e.length;r<n&&s;++r)s=Math.min(s,i.get(e[r])??s);return s<o?t[s].step:null}setRowTopAndRowIndex(){if(this.positioningRows){++this.positioningRows;return}this.positioningRows=1;try{this.positionAndClearRows(),this.positioningRows>1&&this.positionAndClearRows()}finally{this.positioningRows=0}}positionAndClearRows(){const e=this.positionedRows,t=this.positionedRowsNext;this.positionedRows=t,this.positionedRowsNext=e,t.length=0;try{this.positionRows(t),this.updateFormulaRowIndexes(),this.clearStaleRowTops(e)}catch(i){throw this.retainStaleRows(e),i}}updateFormulaRowIndexes(){if(this.beans.formula?.isEvaluationActive()){const e=this.formulaRows;for(let t=0,i=e.length;t<i;++t)e[t].formulaRowIndex=t}}positionRows(e){const t=this.beans,i=this.rowsToRender,o=t.environment.getDefaultRowHeight();let s=0;const r=Jo(t)||!t.environment.sizesMeasured;for(let n=0,l=i.length;n<l;++n){const a=i[n];if(e[n]=a,a.rowHeight==null){const d=gt(t,a,r,o);a.setRowHeight(d.height,d.estimated)}a.setRowTop(s),a.setRowIndex(n),s+=a.rowHeight}}clearStaleRowTops(e){const t=this.rowsToRender;for(const i of e){const o=i.rowIndex;(o==null||t[o]!==i)&&!i.destroyed&&i.clearRowTopAndRowIndex()}e.length=0}retainStaleRows(e){const t=this.positionedRows,i=this.rowsToRender,o=t.length;for(const s of e){const r=s.rowIndex;(r==null||r>=o||i[r]!==s)&&t.push(s)}e.length=0}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToRender.length}getTopLevelRowCount(){if(this.loadingRows)return this.loadingRows.length;const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+o}getTopLevelRowDisplayedIndex(e){if(this.loadingRows)return e;const{beans:t,rootNode:i,rowsToDisplay:o}=this;if(!i||!o.length||o[0]===i)return e;const r=i.childrenAfterSort,n=a=>{let d=r[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},l=t.footerSvc;return l?l?.getTopDisplayIndex(o,e,r,n):n(e)}getTopLevelIndexFromDisplayedIndex(e){if(this.loadingRows)return e;const{rootNode:t,rowsToDisplay:i}=this;if(!t||!i.length||i[0]===t)return e;let s=this.getRow(e).primaryRow,r=s.parent;for(;r&&r!==t;)s=r,r=s.parent;const n=t.childrenAfterSort?.indexOf(s)??-1;return n>=0?n:e}getRowBounds(e){const t=this.rowsToRender[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:Ht(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:Ht(this.gos)})}}onPivotChanged(){this.beans.filterManager?.isAnyFilterPresent()||this.refreshModel({step:"pivot"})}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:Ht(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:i,rowDataUpdated:o}=e;return!(!t||i||!o||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:i,started:o}=this;if(!t)return;const s=!!e.rowDataUpdated;o&&s&&i.dispatchEvent({type:"rowDataUpdated"});const r=this.isSuppressModelUpdateAfterUpdateTransaction(e);if(this.deferRefresh(r)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s);const l=this.beans.selectionSvc;s&&o&&!this.refreshingModel&&l&&(r?l.updateSelectableAfterGrouping(void 0,e.changedRowNodes):l.flushPendingSelectionChanged?.());return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let n=!1;this.refreshingModel=!0;try{this.executeRefresh(e,s),n=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,n||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),this.beans.formula?.onRowsChanged(e.changedRowNodes,e.newData),i.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){const{beans:i,rootNode:o}=this;i.masterDetailSvc?.refreshModel(e),t&&e.step!=="group"&&i.colFilter?.refreshModel();let s=e.changedPath;switch(s?.addRow(o),e.step==="group"&&(this.doGrouping(o,e),s??(s=e.changedPath),i.selectionSvc?.updateSelectableAfterGrouping(s,e.changedRowNodes)),s??(s=i.changedPathFactory?.ensureRowsPath(e,o)),e.step){case"group":case"filter":this.doFilter(s);case"pivot":this.doPivot(s,e.changedProps)&&(s=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(s);case"filter_aggregates":this.doFilterAggregates(s);case"sort":this.doSort(s,e.changedRowNodes);case"map":this.doRowsToDisplay()}this.setRowTopAndRowIndex(),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:e?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.loadingRows&&(!this.rootNode?._leafs?.length||!this.beans.colModel?.ready)}isRowsToRender(){return this.rowsToRender.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.loadingRows)return null;const i=this.rootNode;if(i?._leafs?.length){const o=i.sibling?.displayed?1:0;if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===o)return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){const i=di(this.gos),o=i?e:qn(e),s=i?t:qn(t);if(!o||!s)return null;let r=!1,n=!1;const l=[],a=d=>(n=!0,i&&d.group?(Ap(l,d),!0):!1);return this.forEachNodeAfterFilterAndSort(d=>{if(n||r&&(d===s||d===o)&&a(d)||!r&&(d!==s&&d!==o||(r=!0,s===o&&a(d))))return;(!d.group||!i)&&(i||d.rowIndex!=null)&&l.push(d)}),l}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToRender[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToRender.includes(e)}getRowIndexAtPixel(e){const t=this.rowsToRender,i=t.length;if(i===0||this.isEmpty()&&!this.rootNode?.sibling?.displayed)return-1;let o=0,s=i-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let n=-1,l=-1;for(;;){const a=Math.floor((o+s)/2),d=t[a];if(this.isRowInPixel(d,e)||(d.rowTop<e?o=a+1:d.rowTop>e&&(s=a-1),n===o&&l===s))return a;n=o,l=s}}isRowInPixel(e,t){const i=e.rowTop,o=i+e.rowHeight;return i<=t&&o>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToRender;for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterSort)}forEachPivotNode(e,t,i){const{colModel:o,rowGroupColsSvc:s}=this.beans;if(!o.pivotMode)return;if(!s?.columns.length){e(this.rootNode,0);return}const r=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,n=>n.leafGroup?null:n[r])}depthFirstSearchRowNodes(e,t=!1,i=r=>r.childrenAfterGroup,o=this.rootNode,s=0){let r=s;if(!o)return r;const n=o===this.rootNode;if(n||e(o,r++),o.hasChildren()&&!o.footer){const l=n||this.hierarchical?i(o):null;if(l){const a=this.beans.footerSvc;r=a?.addTotalRows(r,o,e,t,n,"top")??r;for(const d of l)r=this.depthFirstSearchRowNodes(e,t,i,d,r);return a?.addTotalRows(r,o,e,t,n,"bottom")??r}}return r}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){if(this.hierarchical){const o=this.beans.filterAggStage;if(o){o.execute(e);return}}const t=this.rootNode;t.childrenAfterAggFilter=t.childrenAfterFilter;const i=t.sibling;i&&(i.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){const i=this.beans;(this.hierarchical&&i.groupSortStage||i.sortStage).execute(e,t)}doGrouping(e,t){const o=this.beans.groupStage?.execute(t);if(o===void 0){const s=e._leafs;e.childrenAfterGroup=s,e.updateHasChildren();const r=e.sibling;r&&(r.childrenAfterGroup=s)}(o||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEvent({type:"rowCountReady"}))}doFilter(e){const t=this.beans;(this.hierarchical&&t.groupFilterStage||t.filterStage).execute(e);const i=this.rootNode,o=i.sibling;o&&(o.childrenAfterFilter=i.childrenAfterFilter)}doPivot(e,t){return this.beans.pivotStage?.execute(e,t)??!1}getRowNode(e){typeof e!="string"&&(e=String(e));const t=this.nodeManager?.getRowNode(e);if(typeof t=="object")return t;const i=this.beans.groupStage?.getNonLeaf(e);return i||this.getSpecialRowNode(e)}getSpecialRowNode(e){if(e===Ji)return this.rootNode??void 0;if(e===Xi){const t=this.rootNode?.sibling;return t?.footer?t:void 0}if(e.startsWith(ls)){const t=e.slice(ls.length),i=this.getRowNode(t);return i?.sibling?.footer?i.sibling:void 0}if(e.startsWith(Gn)){const t=e.slice(Gn.length),i=this.nodeManager?.getRowNode(t);if(typeof i=="object"&&i.detailNode?.id===e)return i.detailNode}}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const i=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),i)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:i,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();const s=[],r=[],n=new Co,l=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:a,callback:d}of o??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const c=e.updateRowData(a,n,l);s.push(c),d&&r.push(d.bind(null,c))}this.commitTransactions(n,l),r.length>0&&setTimeout(()=>{for(let a=0,d=r.length;a<d;a++)r[a]()},0),s.length>0&&i.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=void 0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const i=new Co,o=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const s=t.updateRowData(e,i,o);return this.commitTransactions(i,o),s}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){const{rootNode:e,beans:t}=this,{formula:i,flattenStage:o}=t;let s;if(i?.active){const r=e?.childrenAfterSort??[];this.formulaRows=r,s=qR(r)}else if(o)s=o.execute();else{s=e?.childrenAfterSort??[];for(let r=0,n=s.length;r<n;++r)s[r].setUiLevel(0)}this.rowsToDisplay=s,i?.active||(this.formulaRows=i?.isEvaluationActive()?s:[]),this.loadingRows||(this.rowsToRender=s)}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes(),i=Ge(this.beans),o=this.loadingRows;if(o)for(const r of o)r.setRowHeight(i);e.setRowHeight(e.rowHeight,!0);const s=e.sibling;s?.setRowHeight(s.rowHeight,!0),(t||o)&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i?.setRowHeight(i.rowHeight,!0);const o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy();const e=this.loadingRows;if(e)for(const t of e)t._destroy(null);this.loadingRows=null,this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.rowsToRender=[],this.positionedRows.length=0,this.positionedRowsNext.length=0,this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},qR=e=>{for(let t=0,i=e.length;t<i;++t){const o=e[t];if(o.softFiltered)return $R(e,t,i);o.setUiLevel(0)}return e},$R=(e,t,i)=>{const o=e.slice(0,t);for(let s=t+1;s<i;++s){const r=e[s];r.softFiltered||(r.setUiLevel(0),o.push(r))}return o},Ap=(e,t)=>{const i=t.childrenAfterGroup;if(i)for(let o=0,s=i.length;o<s;++o){const r=i[o];r.data&&e.push(r),r.group&&Ap(e,r)}};function KR(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function jR(e,t){const i=Ve(e);i&&((!t||t==="everything")&&(t="group"),i.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function ZR(e){return Ve(e)?.isEmpty()??!0}function QR(e,t){Ve(e)?.forEachLeafNode(t)}function YR(e,t){Ve(e)?.forEachNodeAfterFilter(t)}function JR(e,t){Ve(e)?.forEachNodeAfterFilterAndSort(t)}function XR(e,t){return e.frameworkOverrides.wrapIncoming(()=>Ve(e)?.updateRowData(t))}function eE(e,t,i){e.frameworkOverrides.wrapIncoming(()=>Ve(e)?.batchUpdateRowData(t,i))}function tE(e){e.frameworkOverrides.wrapIncoming(()=>Ve(e)?.flushAsyncTransactions())}function iE(e){return e.selectionSvc?.getBestCostNodeSelection()}var oE=class extends y{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=null}wireBeans(e){this.filterManager=e.filterManager}execute(){const e=this.beans,t=e.rowModel.rootNode,i=t.childrenAfterGroup,o=i.length,s=this.filterManager,r=!!s?.isChildFilterPresent();if(e.formula?.active)if(t.childrenAfterFilter=i,r)for(let n=0;n<o;++n){const l=i[n];l.softFiltered=!s.doesRowPassFilter(l)}else for(let n=0;n<o;++n)i[n].softFiltered=!1;else r?t.childrenAfterFilter=sE(i,o,t.childrenAfterFilter??i,s):t.childrenAfterFilter=i}},sE=(e,t,i,o)=>{const s=i.length;let r=0;for(let n=0;n<t;++n){const l=e[n];if(o.doesRowPassFilter(l)){if(r>=s||i[r]!==l)return Ip(e,t,n,r,i,o);++r}else if(r<s)return Ip(e,t,n,r,i,o)}return r===s?i:e},Ip=(e,t,i,o,s,r)=>{const n=o>0?s.slice(0,o):[];for(;i<t;){const l=e[i++];r.doesRowPassFilter(l)&&n.push(l)}return n};import{_reuseArrayIfEqual as rE}from"ag-stack";var nE=4,kp=(e,t,i,o,s)=>{const r=t.childrenAfterSort,n=t.childrenAfterAggFilter;if(!n)return r&&r.length>0?r:[];const l=n.length;if(l<=1)return r?.length===l&&(l===0||r[0]===n[0])?r:n.slice();if(!r||l<=nE)return e.doFullSortInPlace(n.slice(),s);const a=new Map,{updates:d,adds:c}=i,u=[];for(let g=0;g<l;++g){const p=n[g];d.has(p)||c.has(p)||o?.hasRow(p)?(a.set(p,~g),u.push(p)):a.set(p,g)}const h=u.length;return h===0?l===r.length?r:aE(r,a,u):(u.sort((g,p)=>e.compareRowNodes(s,g,p)||~a.get(g)-~a.get(p)),h===l?u:lE(e,s,u,r,a,l))},lE=(e,t,i,o,s,r)=>{const n=new Array(r);let l=0,a=i[l],d,c=-1,u=0,h=0;const g=i.length,p=o.length;for(;;){if(c<0){if(u>=p)break;if(d=o[u++],c=s.get(d)??-1,c<0)continue}if((e.compareRowNodes(t,a,d)||~s.get(a)-c)<0){if(n[h++]=a,++l>=g)break;a=i[l]}else n[h++]=d,c=-1}for(;l<g;)n[h++]=i[l++];if(c<0)return n;for(n[h++]=d;u<p;){const f=o[u++];s.get(f)>=0&&(n[h++]=f)}return n},aE=(e,t,i)=>{let o=0;i.length=t.size;for(let s=0,r=e.length;s<r;++s){const n=e[s];t.has(n)&&(i[o++]=n)}return i.length=o,i},Lp=e=>{const t=e.childrenAfterSort,i=e.sibling;if(i&&(i.childrenAfterSort=t),!!t)for(let o=0,s=t.length-1;o<=s;o++){const r=t[o],n=o===0,l=o===s;r.firstChild!==n&&(r.firstChild=n,r.dispatchRowEvent("firstChildChanged")),r.lastChild!==l&&(r.lastChild=l,r.dispatchRowEvent("lastChildChanged")),r.childIndex!==o&&(r.childIndex=o,r.dispatchRowEvent("childIndexChanged"))}},dE=class extends y{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","accentedSort"]}execute(e,t){const{rowModel:i,sortSvc:o,rowNodeSorter:s}=this.beans,r=i.rootNode,n=o.getSortOptions(),l=n.length>0,a=this.gos.getCallback("postSortRows"),d=l&&!a&&this.gos.get("deltaSort")&&t,c=r.childrenAfterSort,u=r.childrenAfterAggFilter;let h;l?d?h=kp(s,r,d,e,n):h=s.doFullSortInPlace(u?.slice()??[],n):h=rE(c,u),r.childrenAfterSort=h,Lp(r),a?.({nodes:h})}},ea={moduleName:"ClientSideRowModel",version:E,rowModels:["clientSide"],beans:[UR,oE,dE],dependsOn:[Xl]},Vp={moduleName:"ClientSideRowModelApi",version:E,apiFunctions:{onGroupExpandedOrCollapsed:KR,refreshClientSideRowModel:jR,isRowDataEmpty:ZR,forEachLeafNode:QR,forEachNodeAfterFilter:YR,forEachNodeAfterFilterAndSort:JR,applyTransaction:XR,applyTransactionAsync:eE,flushAsyncTransactions:tE,getBestCostNodeSelection:iE,resetRowHeights:Zl,onRowHeightChanged:jl},dependsOn:[bp,yp]},cE={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},uE=class extends K{constructor(e,t,i){super(cE),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(X("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:i,eCell:o,gos:s}=this,r=i.colDef.dndSourceOnRowDrag,n=e.dataTransfer;if(n.setDragImage(o,0,0),r){const l=G(s,{rowNode:t,dragEvent:e});r(l)}else try{const l=JSON.stringify(t.data);n.setData("application/json",l),n.setData("text/plain",l)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};import{RefPlaceholder as Hp,_clearElement as hE}from"ag-stack";var gE=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",pE={tag:"div",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]},fE=class extends K{constructor(){super(),this.dragSource=null,this.eIcon=Hp,this.eLabel=Hp,this.registerCSS(gE)}postConstruct(){const e=t=>Pp(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(pE)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:i,dragSource:o,dropIconMap:s,gos:r}=this,n=this.getGui();hE(i),e||(e=o?.getDefaultIconName?o.getDefaultIconName():"notAllowed");const l=s[e];n.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(l===s.hide&&r.get("suppressDragLeaveHidesColumns"))&&l&&i.appendChild(l)}setLabel(e){this.eLabel.textContent=e}};function mE(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function CE(e,t){const i=e.dragAndDrop?.findExternalZone(t.getContainer());i&&e.dragAndDrop?.removeDropTarget(i)}function vE(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function wE(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function SE(e,t){const i=e.rowDropHighlightSvc;if(!i)return;const o=t?.row;let s=t?.dropIndicatorPosition;s!=="above"&&s!=="below"&&s!=="inside"&&(s="none");const r=o?.rowIndex;r==null||s==="none"?i.clear():i.set(o,s)}import{BaseDragService as bE}from"ag-stack";var yE=class extends O1{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}};import{Direction as RE}from"ag-stack";var EE=class extends y{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:i}=this.beans;return i.addDragSource(t),()=>i.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons(!!e.isColumn);const i=t instanceof MouseEvent&&t.shiftKey;e.onResizeStart(i)}setResizeIcons(e){const t=this.beans.ctrlsSvc.get("gridCtrl");t?.setResizeCursor(RE.Horizontal,e),t?.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e?.setResizeCursor(!1),e?.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}};import{_isEventSupported as xE,preventEventDefault as Bp}from"ag-stack";import{AutoScrollService as FE,_areEqual as PE}from"ag-stack";function Op(e,t){return Es(e,t.target)?.getFocusedCellPosition()??null}function ta(e,t){const i=Jo(e),o=t;let s,r;o.clientX!=null||o.clientY!=null?(s=o.clientX,r=o.clientY):(s=o.x,r=o.y,r-=DE(e,t));const{pageFirstPixel:n}=e.pageBounds.getCurrentPagePixelRange();if(r+=n,i){const l=e.ctrlsSvc.getScrollFeature(),a=l.getVScrollPosition(),d=l.getHScrollPosition();s+=d.left,r+=a.top}return{x:s,y:r}}function DE(e,t){const{eGridViewport:i,eScrollingRows:o}=e.ctrlsSvc.getGridBodyCtrl(),r=t.dropZoneTarget??i;if(!o)return 0;const l=o.getBoundingClientRect().top-r.getBoundingClientRect().top+i.scrollTop;return l>0?l:0}var ME=.25,TE=class extends y{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const i=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,o=new FE({scrollContainer:t.gridBodyCtrl.eGridViewport,scrollAxis:"y",getVerticalPosition:i,setVerticalPosition:s=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(s),getTopOffset:()=>t.gridBodyCtrl.getTopPinnedRowsOffset(),onScrollCallback:()=>{const s=i();if(this.autoScrollOldV!==s){this.autoScrollOldV=s,this.autoScrollChanging=!0;return}const r=this.autoScrollChanging;this.autoScrollChanged=r,this.autoScrollChanging=!1,r&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=o,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){const t=e.dragItem.rowNodes??[];return!this.isFromThisGrid(e)||t.length<=1?t:t.slice().sort(AE)}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:i,beans:o}=this;if(t){const l=this.getRowNodes(e);e.dragItem.rowNodes=l,Np(l,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,r=this.makeRowsDrop(i,e,s,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const n=this.autoScroll;r?.rowDragManaged&&r.moved&&r.allowed&&r.sameGrid&&!r.suppressMoveWhenRowDragging&&(!s&&!n?.scrolling||this.autoScrollChanged)&&this.dropRows(r),n?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,i,o){const{beans:s,gos:r}=this,n=this.newRowsDrop(t,o),l=s.rowModel;if(t.dropTarget=n,t.changed=!1,!n)return null;const{sameGrid:a,rootNode:d,source:c}=n;let{target:u}=n;u??(u=l.getRow(l.getRowCount()-1)??null);const h=this.beans.groupEditSvc,g=!!h?.canSetParent(n);let p=null;if(u?.footer){const m=us(l,-1,u)??us(l,1,u);g&&(p=u.sibling??d),u=m??null}u?.detail&&(u=u.parent),n.moved&&(n.moved=c!==u);let f=.5;if(u&&(a&&n.moved&&(p||!g)?f=c.rowIndex>u.rowIndex?-.5:.5:f=(n.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&a&&u&&n.moved&&ie(r)){const m=kE(l,n);m&&(f=c.rowIndex>m.rowIndex?-.5:.5,u=m,n.moved&&(n.moved=c!==u))}return n.target=u,n.newParent=p,n.pointerPos=LE(u,n.y),n.yDelta=f,h?.fixRowsDrop(n,g,i,f),this.validateRowsDrop(n,g,o),t.changed||(t.changed=Gp(e?.dropTarget,n)),n}newRowsDrop(e,t){const{beans:i,gos:o}=this,s=i.rowModel.rootNode,r=ie(o)?o.get("rowDragManaged"):!1,n=o.get("suppressMoveWhenRowDragging"),l=this.isFromThisGrid(e);let{rowNode:a,rowNodes:d}=e.dragItem;if(d??(d=a?[a]:[]),a??(a=d[0]),!a||!s)return null;const c=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;r&&(!d.length||i.rowDragSvc.visibility!=="visible"||(n||!l)&&!c)&&(u=!1);const h=ta(i,e).y,g=this.getOverNode(h);return{api:i.gridApi,context:i.gridOptions.context,draggingEvent:e,rowDragManaged:r,suppressMoveWhenRowDragging:n,sameGrid:l,withinGrid:c,treeData:!1,rootNode:s,moved:a!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:a,target:g??null,newParent:null,rows:d,allowed:u,highlight:!t&&r&&n&&(c||!l),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,i){const{source:o,target:s,yDelta:r,inside:n,moved:l,rowDragManaged:a,suppressMoveWhenRowDragging:d}=e;e.moved&&(e.moved=o!==s);const{position:c,fallbackPosition:u}=this.computeDropPosition(l,n,r);e.position=c,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,d,"initial");const h=(!a||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,i,a,h),a&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,d,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,i){const o=i<0?"above":"below";return e?{position:t?"inside":o,fallbackPosition:o}:{position:"none",fallbackPosition:o}}enforceSuppressMoveWhenRowDragging(e,t,i){if(t){if(i==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,i,o,s){this.beans.groupEditSvc?.clearNewSameParent(e,t);const r=s(e);if(!r){e.allowed=!1;return}if(typeof r!="object")return;r.rows!==void 0&&(e.rows=r.rows??[]),t&&r.newParent!==void 0&&(e.newParent=r.newParent),r.target!==void 0&&(e.target=r.target),r.position&&(e.position=r.position),r.allowed!==void 0?e.allowed=r.allowed:o||(e.allowed=!0);const n=e.draggingEvent;r.changed&&n&&(n.changed=!0),!i&&r.highlight!==void 0&&(e.highlight=r.highlight)}addRowDropZone(e){if(!e.getContainer()){this.warn(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){this.warn(56);return}const i=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(s=>e.onDragEnter(this.rowDragEvent("rowDragEnter",s))),onDragLeave:e.onDragLeave&&(s=>e.onDragLeave(this.rowDragEvent("rowDragLeave",s))),onDragging:e.onDragging&&(s=>e.onDragging(this.rowDragEvent("rowDragMove",s))),onDragStop:e.onDragStop&&(s=>e.onDragStop(this.rowDragEvent("rowDragEnd",s))),onDragCancel:e.onDragCancel&&(s=>e.onDragCancel(this.rowDragEvent("rowDragCancel",s)))},o={isInterestedIn:s=>s===2,getIconName:()=>"move",external:!0,...i};t.addDropTarget(o),this.addDestroyFunc(()=>t.removeDropTarget(o))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:i=>{this.onDragEnter(i),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",i))},onDragLeave:i=>{this.onDragLeave(i),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",i))},onDragging:i=>{this.onDragging(i),e?.onDragging?.(this.rowDragEvent("rowDragMove",i))},onDragStop:i=>{this.onDragStop(i),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",i))},onDragCancel:i=>{this.onDragCancel(i),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",i))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:i}=this.beans,s=e>t.getCurrentPagePixelRange().pageLastPixel?-1:i.getRowIndexAtPixel(e);return s>=0?i.getRow(s):void 0}rowDragEvent(e,t){const i=this.beans,{dragItem:o,dropTarget:s,event:r,vDirection:n}=t,l=s?.rootNode===i.rowModel.rootNode,a=l?s.y:ta(i,t).y,d=l?s.overNode:this.getOverNode(a),c=l?s.overIndex:d?.rowIndex??-1;return{api:i.gridApi,context:i.gridOptions.context,type:e,event:r,node:o.rowNode,nodes:o.rowNodes,overIndex:c,overNode:d,y:a,vDirection:n,rowsDrop:s}}dispatchGridEvent(e,t){const i=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,i=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),i?.allowed&&i.rowDragManaged&&(!t?.droppedManaged||Gp(t,i))&&this.dropRows(i),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),Np(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:i}){const o=Bt(this.beans),s=this.beans.rowModel,r=i.filter(({data:l,rowPinned:a})=>!s.getRowNode(o?.({data:l,level:0,rowPinned:a})??l.id)).map(({data:l})=>l);if(r.length===0)return!1;let n;if(t){const l=t.sourceRowIndex>=0?t:mo(t);l&&(n=l.sourceRowIndex+(e==="above"?0:1))}return s.updateRowData({add:r,addIndex:n}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:i,sameGrid:o}=e;let s;for(let r=0,n=i.length;r<n;++r){let l=!0;const a=i[r];(!a||a.footer||o&&a.destroyed&&!a.group||!this.csrmGetLeaf(a))&&(l=!1),l&&t&&!t.canDropRow(a,e)&&(l=!1),l?s?.push(a):s??(s=i.slice(0,r))}return s??i}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:i,newParent:o,rootNode:s}){let r=!1;const n=new Set;for(const h of i){o&&h.parent!==o&&(h.treeParent=o,r=!0);const g=this.csrmGetLeaf(h);g&&n.add(g)}if(!r&&n.size===0)return!1;const l=this.beans.focusSvc,a=l.getFocusedCell(),d=a&&Ut(this.beans,a);if(n.size&&xp(s._leafs,n,t,e==="above")&&(r=!0),!r)return!1;const c=this.beans.rowModel,u=new Co;return u.reordered=!0,c.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:u}),d?d.focusCell({forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0}):l.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):mo(e)}},Gp=(e,t)=>e!==t&&(e?.sameGrid!==t.sameGrid||e?.allowed!==t.allowed||e?.position!==t.position||e?.target!==t.target||e?.source!==t.source||e?.newParent!==t.newParent||!PE(e?.rows,t.rows)),AE=(e,t)=>(e.rowIndex??2147483647)-(t.rowIndex??2147483647)||e.sourceRowIndex-t.sourceRowIndex,IE=(e,t,i)=>{if(!t.get("rowDragMultiRow")||!i||!e.isSelected())return[e];if(t.get("treeData")&&ie(t)){const s=i.getBestCostNodeSelection();if(s?.length)return s}const o=i.getSelectedNodes();return o.length?o:[e]},Np=(e,t)=>{for(let i=0,o=e?.length||0;i<o;++i){const s=e[i];s.dragging!==t&&(s.dragging=t,s.dispatchRowEvent("draggingChanged"))}},kE=(e,t)=>{let i=null,o=t.target;if(o&&t.rows.indexOf(o)<0)return null;const s=t.source;if(!o||!s)return null;let r=o.rowIndex-s.rowIndex;const n=r<0?-1:1;r=t.suppressMoveWhenRowDragging?Math.abs(r):1;const l=new Set(t.rows);do{const a=us(e,n,o);if(!a)break;l.has(a)||(i=a,--r),o=a}while(r>0);return i},LE=(e,t)=>{const i=e?.rowTop,o=e?.rowHeight??0;if(i==null||!o||o<=0)return"none";const s=t-i,r=o*ME;return s<=r?"above":s>=o-r?"below":"inside"},VE={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Gs={skipAriaHidden:!0},HE=class extends K{constructor(e,t,i,o,s,r=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=o,this.dragStartPixels=s,this.alwaysVisible=r,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(VE),this.getGui().appendChild(X("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,i=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:i}),this.addManagedListeners(t,{dataChanged:i,cellChanged:i}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:i}=this,{gos:o,dragAndDrop:s,rowDragSvc:r}=e,n=r?.visibility;let a=!(n==="suppress"||n==="hidden"&&!s?.hasExternalDropZones()),d=a;if(a&&!this.isCustomGui()&&t){const c=t.getColDef().rowDrag;if(c===!1)a=!1;else{const u=typeof c=="function";d=t.isRowDrag(i),a=u||d}}a&&d&&i.footer&&o.get("rowDragManaged")&&(d=!1,a=!0),d&&(d=a),a||this.setDisplayed(a,Gs),d||this.setVisible(d,Gs),this.setDisabled(!d||n==="disabled"&&!s?.hasExternalDropZones()),a&&this.setDisplayed(a,Gs),d&&this.setVisible(d,Gs)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){return IE(this.rowNode,this.gos,this.beans.selectionSvc)}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const o=xE("pointerdown")?{pointerdown:Bp}:{mousedown:Bp};this.mouseDownListener=this.addManagedElementListeners(t,o)[0]}const i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:o=>this.getDragItemName(o,i),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const i=e?.dragItem??this.getDragItem(),o=(e?.dropTarget?.rows.length??i.rowNodes?.length)||1,s=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(s)return s(i,o);if(o!==1)return`${o} ${t("rowDragRows","rows")}`;const r=this.cellValueFn();return r||`1 ${t("rowDragRow","rows")}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},BE=class extends y{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const i=t.createManagedBean(new TE(e)),o=this.beans.dragAndDrop;o.addDropTarget(i),t.addDestroyFunc(()=>o.removeDropTarget(i)),this.rowDragFeature=i;const s=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],s),this.addManagedEventListeners({newColumnsLoaded:s,columnRowGroupChanged:s,columnPivotModeChanged:s,sortChanged:s,filterChanged:s}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,i,o,s,r){return new HE(e,t,i,o,s,r)}createRowDragCompForRow(e,t){if(Ne(this.gos))return;const i=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${i("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,i,o,s,r){const n=this.gos;return n.get("rowDragManaged")&&(!ie(n)||n.get("pagination"))?void 0:this.createRowDragComp(i,e,t,o,s,r)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const o=e.colModel.pivotMode;return(o||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":o||e.filterManager?.isAnyFilterPresent()||OE(e.colModel.getAllCols())?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},OE=e=>{for(let t=0,i=e.length;t<i;++t)if(e[t].getSortDef())return!0;return!1},GE=class extends y{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const i=e!==this.row,o=e.uiLevel,s=t!==this.position,r=o!==this.uiLevel;this.dragging=!1,(i||s||r)&&(i&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:i,target:o,position:s}=t;if(i&&o&&s!=="none"){this.set(o,s),this.dragging=!0;return}}this.dragging&&this.clear()}},ia={moduleName:"Drag",version:E,beans:[yE]},_p={moduleName:"DragAndDrop",version:E,dynamicBeans:{dndSourceComp:uE},icons:{rowDrag:"grip"}},oa={moduleName:"SharedDragAndDrop",version:E,beans:[bb],dependsOn:[ia],userComponents:{agDragAndDropImage:fE},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},zp={moduleName:"RowDrag",version:E,beans:[GE,BE],apiFunctions:{addRowDropZone:mE,removeRowDropZone:CE,getRowDropZoneParams:vE,getRowDropPositionIndicator:wE,setRowDropPositionIndicator:SE},dependsOn:[oa]},Wp={moduleName:"HorizontalResize",version:E,beans:[EE],dependsOn:[ia]},NE=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s,right .2s}.ag-header-group-cell{transition:left .2s,right .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s,left .2s}.ag-header-group-cell{transition:right .2s,left .2s,width .2s}}",_E=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-spanned-cell-wrapper{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-spanned-cell-wrapper{transition:width .2s ease-in-out,right .2s ease-in-out}}",zE=class extends y{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0,this.startDepth=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.startDepth++,this.active)return;const{gos:e,gridBodyCtrl:t}=this;!t||this.suppressAnimation||e.get("suppressColumnMoveAnimation")||(this.ensureAnimationCssClassPresent(t),this.active=!0,this.activeNext=!0)}finish(){const e=Math.max(0,this.startDepth-1);this.startDepth=e,!(e>0||!this.active)&&this.flush()}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(e){this.animationThreadCount++;const t=this.animationThreadCount;e.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===t&&e.setColumnMovingCss(!1)})}flush(){const{executeNextFuncs:e,executeLaterFuncs:t}=this;if(e.length===0&&t.length===0){this.activeNext=!1,this.active=!1;return}this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.activeNext=!1,Up(e)},0),window.setTimeout(()=>{this.active=!1,Up(t)},200)})}},Up=e=>{for(;e.length;){const t=e.pop();t&&t()}};function WE(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")}function UE(e,t,i){e.colMoves?.moveColumns(t,i,"api")}import{_last as qE,_moveInArray as sa,_removeFromArray as $E}from"ag-stack";var KE=class extends y{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const i of t)i.primary&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{colModel:t,valueColsSvc:i,rowGroupColsSvc:o,pivotColsSvc:s}=this.beans;t.beginColUpdate();try{this.columnsToAggregate.length>0&&i?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&s?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}finally{t.endColUpdate()}}onDragCancel(){this.clearColumnsList()}};import{FAST_TEST_TIMINGS as jE,_exists as ZE,_last as QE,_missing as YE}from"ag-stack";import{_areEqual as JE}from"ag-stack";function XE(e,t){!t||t.length<=1||t.some(i=>!i.inColsList)||(e.ensureColsListIndex(),t.sort((i,o)=>i.colsListIndex-o.colsListIndex))}function ex(e){const t=[...e],i=new Set(t);for(const o of e){let s=null,r=o.parent;for(;r?.getDisplayedLeafColumns().length===1;)s=r,r=r.parent;if(s!=null){const l=!!s.getColGroupDef()?.marryChildren?s.getProvidedColumnGroup().getLeafColumns():s.getLeafColumns();for(let a=0,d=l.length;a<d;++a){const c=l[a];i.has(c)||(i.add(c),t.push(c))}}}return t}function tx(e,t,i){let o=null,s=null;for(let r=0;r<e.length;r++){const n=e[r],l=i.getProposedColumnOrder(t,n);if(!i.doesOrderPassRules(l))continue;const a=l.filter(c=>c.displayed);if(s===null)s=a;else if(!JE(a,s))break;const d=ox(l);(o===null||d<o.fragCount)&&(o={move:n,fragCount:d})}return o}function qp(e){const{isFromHeader:t,fromLeft:i,xPosition:o,fromEnter:s,fakeEvent:r,pinned:n,gos:l,colModel:a,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=ex(u));const h=u.slice();XE(a,h);const g=nx({movingCols:h,draggingRight:i,xPosition:o,pinned:n,gos:l,colModel:a,visibleCols:c}),p=ix(h,a);if(g.length===0)return;const f=g[0];if(p!==null&&(t||!s)&&!r&&(!i&&f>=p||i&&f<=p))return;const w=tx(g,h,d);if(!w)return;const v=w.move;if(!(v>a.colsList.length-h.length))return{columns:h,toIndex:v}}function $p(e){const{columns:t,toIndex:i}=qp(e)??{},{finished:o,colMoves:s}=e;return!t||i==null?null:(s.moveColumns(t,i,"uiColumnMoved",o),o?null:{columns:t,toIndex:i})}function ix(e,t){const i=e.length;if(i===0)return null;t.ensureColsListIndex();const o=e[0];let s=o.inColsList?o.colsListIndex:-1,r=s;for(let n=1;n<i;++n){const l=e[n],a=l.inColsList?l.colsListIndex:-1;a<s?s=a:a>r&&(r=a)}return r-s===i-1?s:null}function ox(e){function t(o){const s=[];let r=o.getOriginalParent();for(;r!=null;)s.push(r),r=r.getOriginalParent();return s}let i=0;for(let o=0;o<e.length-1;o++){let s=t(e[o]),r=t(e[o+1]);[s,r]=s.length>r.length?[s,r]:[r,s];for(const n of s)r.indexOf(n)===-1&&i++}return i}function sx(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function rx(e,t){if(!e?.displayed)return!0;const i=e.pinned;return t==="left"||t==="right"?i!==t:i!=null}function nx(e){const{movingCols:t,draggingRight:i,xPosition:o,pinned:s,gos:r,colModel:n,visibleCols:l}=e;if(r.get("suppressMovableColumns")||t.some(C=>C.colDef.suppressMovable))return[];const d=sx(l,s),c=n.colsList,u=new Set(t),h=d.filter(C=>u.has(C)),g=d.filter(C=>!u.has(C)),p=c.filter(C=>!u.has(C));let f=0,m=o;if(i){let C=0;for(const b of h)C+=b.getActualWidth();m-=C}if(m>0){for(let C=0;C<g.length;C++){const b=g[C];if(m-=b.getActualWidth(),m<0)break;f++}i&&f++}let w;if(f>0){const C=g[f-1];w=p.indexOf(C)+1}else w=p.indexOf(g[0]),w===-1&&(w=0);const v=[w],S=(C,b)=>C-b;if(i){let C=w+1;const b=c.length-1;for(;C<=b;)v.push(C),C++;v.sort(S)}else{let C=w;const b=c.length-1;let R=c[C];for(;C<=b&&rx(R,s);)C++,v.push(C),R=c[C];C=w-1;const x=0;for(;C>=x;)v.push(C),C--;v.sort(S).reverse()}return v}function Kp(e,t){let i;return e==="left"?i="ag-grid-pinned-left-cells":e==="right"?i="ag-grid-pinned-right-cells":i="ag-grid-scrolling-cells",t.getHeaderRowContainerCtrl()?.eViewport?.querySelector(`.ag-header-row .${i}`)}function jp(e,t,i){const o=Kp(t,i);return o?e-o.getBoundingClientRect().left:e}var lx=(e,t)=>{if(t)switch(e){case"left":return"right";case"right":return"left"}return e};function Zp(e){const{isRtl:t,ctrlsSvc:i,pinned:o}=e;let{x:s}=e;if(t){const r=Kp(o??null,i);if(!r)return 0;s=r.getBoundingClientRect().width-s}return s}function ra(e,t){for(const i of e)i.setMoving(t),i.dispatchColEvent("movingChanged","uiColumnMoved")}var Qp=7,na=100,Yp=na/2,ax=5,dx=jE?20:100,cx=class extends y{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!ZE(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:i}=t??{},o=i?.columns??[];for(const s of o){const r=s.getPinned();if(s.getColDef().lockPinned){if(r==e)return"move";continue}const n=i?.containerType;if(n===e||!e)return"move";if(e&&(!r||n!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,i=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const s=t.visibleState,r=(i??[]).filter(n=>s[n.getId()]&&!n.isVisible());this.setColumnsVisible(r,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,o=!1){const{gos:s,ctrlsSvc:r}=this.beans,n=s.get("suppressMoveWhenColumnDragging");if(o&&!n){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!o&&YE(e.hDirection))return;const l=jp(e.event.clientX,this.pinned,r),a=Zp({x:l,pinned:this.pinned,isRtl:s.get("enableRtl"),ctrlsSvc:r});t||this.checkCenterForScrolling(e),n?this.handleColumnDragWhileSuppressingMovement(e,t,i,a,o):this.handleColumnDragWhileAllowingMovement(e,t,i,a,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){e?.length&&Ui(this.beans,e,t,i,!0)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;e&&this.beans.colMoves.moveColumns(e.columns,e.toIndex,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,i,o,s){const r=this.getAllMovingColumns(e,!0);if(s){const n=this.isAttemptingToPin(r);n&&this.attemptToPinColumns(r,void 0,!0);const{fromLeft:l,xPosition:a}=this.getNormalisedXPositionInfo(r,n)??{};if(l==null||a==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:r,xPosition:a,fromEnter:t,fakeEvent:i,fromLeft:l})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(r,o)}}handleColumnDragWhileAllowingMovement(e,t,i,o,s){const r=this.getAllMovingColumns(e),n=lx(e.hDirection,this.gos.get("enableRtl"))==="right",l=e.dragSource.type===1,a=this.getMoveColumnParams({allMovingColumns:r,isFromHeader:l,xPosition:o,fromLeft:n,fromEnter:t,fakeEvent:i}),d=$p({...a,finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const i=e.dragSource.getDragItem();let o;t?(o=i.columnsInSplit,o||(o=i.columns)):o=i.columns;const s=r=>r.colDef.lockPinned?r.getPinned()==this.pinned:!0;return o?o.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:o,fromLeft:s,fromEnter:r,fakeEvent:n}=e,{gos:l,colModel:a,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:s,xPosition:o,pinned:this.pinned,fromEnter:r,fakeEvent:n,gos:l,colModel:a,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{colModel:i}=this.beans,o=i.getCols().filter(a=>a.isVisible()&&a.getPinned()===this.pinned);let s=null,r=null,n=null;for(const a of o){if(r=a.getActualWidth(),s=this.getNormalisedColumnLeft(a,0),s!=null){const d=s+r;if(s<=t&&d>=t){n=a;break}}s=null,r=null}if(n)e.indexOf(n)!==-1&&(n=null);else{for(let a=o.length-1;a>=0;a--){const d=o[a],c=o[a].parent;if(!c){n=d;break}const u=c?.getDisplayedLeafColumns();if(u.length){n=QE(u);break}}if(!n)return;s=this.getNormalisedColumnLeft(n,0),r=n.getActualWidth()}if(n==null||s==null||r==null){this.lastHighlightedColumn?.column!==n&&this.clearHighlighted();return}let l;if(t-s<r/2){const a=o.indexOf(n);a===0?l=0:(l=1,n=o[a-1])}else l=1;(this.lastHighlightedColumn?.column!==n||this.lastHighlightedColumn?.position!==l)&&this.clearHighlighted(),Jp(n,l),this.lastHighlightedColumn={column:n,position:l}}getNormalisedXPositionInfo(e,t){const{gos:i,visibleCols:o}=this.beans,s=i.get("enableRtl"),{firstMovingCol:r,column:n,position:l}=this.getColumnMoveAndTargetInfo(e,t,s);if(!r||!n||l==null)return;const a=o.allCols,d=r.allColsIndex,c=n.allColsIndex,u=l===0,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=a[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,i){const o=this.lastHighlightedColumn??{},{firstMovingCol:s,lastMovingCol:r}=ux(e);if(!s||!r||o.column||!t)return{firstMovingCol:s,...o};const l=this.getPinDirection()==="left";return{firstMovingCol:s,position:l?1:0,column:l!==i?s:r}}getNormalisedColumnLeft(e,t){const i=e.getLeft();return i==null?null:i+t}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>Qp;return t&&i||e.some(o=>o.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:o,fakeEvent:s,fromLeft:r}=e,n=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:r,fromEnter:o,fakeEvent:s}),{columns:l,toIndex:a}=qp(n)??{};l&&a!=null&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Jp(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const{visibleCols:t}=this.beans,i=this.gridBodyCon.eGridViewport.getBoundingClientRect(),o=e.event.clientX-i.left,s=t.getLeftStickyColumnContainerWidth(),r=t.getRightStickyColumnContainerWidth(),n=o<s+Yp,l=o>i.width-r-Yp;this.needToMoveLeft=n,this.needToMoveRight=l,this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),dx),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*ax,e>na&&(e=na);let t=null;const i=this.gridBodyCon.scrollFeature,o=this.gos.get("enableRtl")?-1:1;if(this.needToMoveLeft?t=i.scrollHorizontally(-e*o):this.needToMoveRight&&(t=i.scrollHorizontally(e*o)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{dragAndDrop:s,gos:r}=this.beans;if(this.failedMoveAttempts<=Qp+1)return;const n=this.lastDraggingEvent?.dragItem.columns,l=(n??[]).some(a=>!a.colDef.lockPinned);s.setDragImageCompIcon(l?"pinned":this.getIconName()),l&&!r.get("suppressMoveWhenColumnDragging")&&this.attemptToPinColumns(n,void 0,!0)}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,i=!1){const o=(e??[]).filter(n=>!n.colDef.lockPinned);if(!o.length)return 0;i&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:r}=this.beans;return s?.setColsPinned(o,t,"uiColumnDragged"),i&&r.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Jp(e,t){e.getHighlighted()!==t&&(e.setHighlighted(t),e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function ux(e){const t=e.length;let i,o;for(let s=0;s<t;s++){if(!i){const r=e[s];r.getLeft()!=null&&(i=r)}if(!o){const r=e[t-1-s];r.getLeft()!=null&&(o=r)}if(i&&o)break}return{firstMovingCol:i,lastMovingCol:o}}var hx=class extends y{constructor(e){super(),this.eContainer=e,this.currentDropListener=null,this.lastDetectedSection=null}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans;e.whenReady(this,s=>{const r=s.gridBodyCtrl.eGridViewport,n=s.pinnedTop.eViewport,l=s.pinnedBottom.eViewport;this.eGridViewport=r;const a=[];r&&a.push([r]),n&&n!==r&&a.push([n]),l&&l!==r&&l!==n&&a.push([l]),this.eSecondaryContainers=a});const i=s=>this.createManagedBean(new cx(s));this.moveColumnFeatures={left:i("left"),center:i(null),right:i("right")};const o=s=>this.createManagedBean(new KE(s));this.bodyDropPivotTargets={left:o("left"),center:o(null),right:o("right")},t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener?.getIconName()??null}isDropColumnInPivotMode(e){return this.beans.colModel.pivotMode&&e.dragSource.type===0}onDragEnter(e){const t=this.getDropListener(e);this.lastDetectedSection=null,this.currentDropListener=t,t.onDragEnter(e)}onDragLeave(e){const t=this.currentDropListener;t&&(t.onDragLeave(e),this.currentDropListener=null),this.lastDetectedSection=null}onDragging(e){let t=this.currentDropListener;if(!t)return;const i=this.getDropListener(e);t!==i&&(t.onDragLeave(e),t=i,this.currentDropListener=i,t.onDragEnter(e),e.changed=!0),t.onDragging(e)}onDragStop(e){const t=this.currentDropListener;t&&(t.onDragStop(e),this.currentDropListener=null)}onDragCancel(){const e=this.currentDropListener;e&&(e.onDragCancel(),this.currentDropListener=null)}getSection(e){const t=this.getPinnedSection(e);switch(t){case"left":case"right":return t;default:return"center"}}getDropListener(e){const t=this.getSection(e);return this.isDropColumnInPivotMode(e)?this.bodyDropPivotTargets[t]:this.moveColumnFeatures[t]}getPinnedSection(e){const t=this.eGridViewport.getBoundingClientRect(),i=e.event.clientX-t.left,{visibleCols:o}=this.beans,s=o.getLeftStickyColumnContainerWidth(),r=o.getRightStickyColumnContainerWidth();let n=null;i<s?n="left":i>t.width-r&&(n="right");const l=this.lastDetectedSection;return e.fromNudge&&n!==l&&l!==null?l:(this.lastDetectedSection=n,n)}},gx=class extends y{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){const o=this.beans.colModel.colsList[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,o=!0){const{colModel:s,visibleCols:r}=this.beans,n=this.beans.colAnimation,l=s.colsList;if(t>l.length-e.length){this.warn(30,{toIndex:t});return}this.gos.get("suppressColumnMoveAnimation")&&hn(this.beans),n?.start();try{const a=[];for(let d=0,c=e.length;d<c;++d){const u=s.getCol(e[d]);u&&a.push(u)}this.doesMovePassRules(a,t)&&(sa(s.colsList,a,t),s.markColsListIndexDirty(),r.refresh(i,!1),this.eventSvc.dispatchEvent({type:"columnMoved",columns:a,column:a.length===1?a[0]:null,toIndex:t,finished:o,source:i}))}finally{n?.finish()}}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){const{colModel:t,gos:i}=this.beans;return!(t.hasMarryChildren&&!pu(e,t.colsTree)||!(s=>{const r=d=>d?d==="left"||d===!0?-1:1:0,n=i.get("enableRtl");let l=n?1:-1,a=!0;for(const d of s){const c=r(d.colDef.lockPosition);n?c>l&&(a=!1):c<l&&(a=!1),l=c}return a})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.colsList.slice();return sa(i,e,t),i}isMovingSuppressed(e){return!e.length||this.gos.get("suppressMovableColumns")||e.some(t=>t.colDef.suppressMovable||t.colDef.lockPosition)}getColumnMoveTarget(e,t,i,o=this.beans.colModel.colsList){if(this.isMovingSuppressed(e)||t.some(d=>e.includes(d)))return null;const s=o.filter(d=>e.includes(d)),r=o.filter(d=>t.includes(d));if(s.length!==e.length||!r.length)return null;const n=o.indexOf(i?r[0]:r.at(-1))+(i?0:1),l=n-o.slice(0,n).filter(d=>s.includes(d)).length,a=o.slice();return sa(a,s,l),a.every((d,c)=>d===o[c])||!this.doesOrderPassRules(a)?null:{columns:s,toIndex:l}}createBodyDropTarget(e){return new hx(e)}moveHeader(e,t,i,o,s){const{ctrlsSvc:r,gos:n,colModel:l,visibleCols:a,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=Me(i),g=h?c.width:i.getActualWidth(),p=n.get("enableRtl"),f=e==="left"!==p,m=f?u-20:u+g+20,w=jp(m,o,r),v=Zp({x:w,pinned:o,isRtl:p,ctrlsSvc:r}),S=d.focusedHeader;$p({allMovingColumns:h?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:e==="right",xPosition:v,pinned:o,fromEnter:!1,fakeEvent:!1,gos:n,colModel:l,colMoves:this,visibleCols:a,finished:!0});let C;if(h){const b=i.getDisplayedLeafColumns();C=f?b[0]:qE(b)}else C=i;if(r.getScrollFeature().ensureColumnVisible(C,"auto"),(!s.isAlive()||n.get("ensureDomOrder"))&&S){let b;if(h){const R=i.getGroupId(),x=i.getLeafColumns();if(!x.length)return;const D=x[0].parent;if(!D)return;b=px(D,R)}else b=i;b&&d.focusHeaderPosition({headerPosition:{...S,column:b}})}}setDragSourceForHeader(e,t,i){const o=this.beans,{gos:s,dragAndDrop:r,visibleCols:n}=o;let l=!s.get("suppressDragLeaveHidesColumns");const a=Me(t),d=a?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:a?()=>mx(t,n.allCols):()=>fx(t),dragItemName:i,onDragStarted:()=>{l=!s.get("suppressDragLeaveHidesColumns"),ra(d,!0)},onDragStopped:()=>ra(d,!1),onDragCancelled:()=>ra(d,!1),onGridEnter:h=>{if(l){const{columns:g=[],visibleState:p}=h??{},f=a?g.filter(m=>!p||p[m.colId]):g;Ui(o,f,!0,"uiColumnMoved",!0)}},onGridExit:h=>{l&&Ui(o,h?.columns??[],!1,"uiColumnMoved",!0)}};return r.addDragSource(u,!0),u}};function px(e,t){for(;e;){if(e.groupId===t)return e;e=e.parent}}function fx(e){const t=Object.create(null);return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function mx(e,t){const i=e.getProvidedColumnGroup().getLeafColumns(),o=Object.create(null);for(const l of i)o[l.getId()]=l.isVisible();const s=[];for(const l of t)i.indexOf(l)>=0&&(s.push(l),$E(i,l));for(const l of i)s.push(l);const r=[],n=e.getLeafColumns();for(const l of s)n.indexOf(l)!==-1&&r.push(l);return{columns:s,columnsInSplit:r,visibleState:o,containerType:r[0]?.pinned}}var Xp={moduleName:"ColumnMove",version:E,beans:[gx,zE],apiFunctions:{moveColumnByIndex:WE,moveColumns:UE},dependsOn:[oa],css:[NE,_E]},Cx=class extends y{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.scrollingRowContainerCtrl=e.scrolling})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(i),this.getPreferredWidthForElements(o)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const i=O({tag:"form"});i.style.position="fixed";const o=this.scrollingRowContainerCtrl.eViewport;for(const r of e)this.cloneItemIntoDummy(r,i);o.appendChild(i);const s=i.offsetWidth;return i.remove(),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){return this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getHtmlElementForColumnHeader(e)??null}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="",i.style.right="";const o=O({tag:"div"}),s=o.classList;["ag-header-cell","ag-header-group-cell"].some(l=>i.classList.contains(l))?(s.add("ag-header","ag-header-row"),o.style.position="static"):s.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(a=>n.classList.contains(a))){for(let a=0;a<n.classList.length;a++){const d=n.classList[a];d!="ag-row-position-absolute"&&s.add(d)}break}n=n.parentElement}o.appendChild(i),t.appendChild(o)}},ef={moduleName:"AutoWidth",version:E,beans:[Cx]};function vx(e,t,i=!0,o="api"){e.colResize?.setColumnWidths(t,i,o)}var wx=class extends y{constructor(e,t,i){super(),this.comp=e,this.eResize=t,this.columnGroup=i,this.dragPlan=null,this.dragTakeFromAdjacent=!1,this.dragGroupWidth=0,this.dragSign=1}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,isColumn:!0,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnGroup:t,beans:i}=this,o=i.colResize,s=o.takesFromAdjacent(e);this.dragPlan=o.planGroupResize(t,s),this.dragTakeFromAdjacent=s,this.dragGroupWidth=t.getActualWidth(),this.dragSign=Vn(this.gos.get("enableRtl"),t.pinnedLane),hn(i),this.toggleColumnResizing(!0)}onResizing(e,t){const i=this.dragPlan;if(!i)return;const{columnGroup:o,beans:s}=this,r=t*this.dragSign,n=s.pinnedCols?.limitResize(o,this.dragTakeFromAdjacent,r,this.dragGroupWidth)??r;s.colResize.resizeGroup(i,i.group.startWidth+n,e,"uiColumnResized"),e&&(this.dragPlan=null,this.toggleColumnResizing(!1))}resizeByKey(e,t){const i=this.beans.colResize,o=i.planGroupResize(this.columnGroup,t);i.resizeGroup(o,o.group.startWidth+e,!0,"uiColumnResized")}resizeLeafColumnsToFit(e){const{autoWidthCalc:t,colResize:i,pinnedCols:o}=this.beans,s=this.columnGroup,r=t.getPreferredWidthForColumnGroup(s)-s.getActualWidth(),n=o?.limitsAutoSize(e)?o.limitResize(s,!1,r):r;if(n<=0)return;const l=i.planGroupResize(s,!1);i.resizeGroup(l,l.group.startWidth+n,!0,e,!0)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}destroy(){super.destroy(),this.dragPlan=null}};import{_setDisplayed as Sx}from"ag-stack";var bx=class extends y{constructor(e,t,i,o){super(),this.column=e,this.eResize=t,this.comp=i,this.ctrl=o,this.resizeStartWidth=0,this.takeFromAdjacent=!1,this.dragSign=1}postConstruct(){const e=[];let t,i;const o=()=>{if(Sx(this.eResize,t),!t)return;const{horizontalResizeSvc:n,colAutosize:l}=this.beans,a=n.addResizeBar({eResizeBar:this.eResize,isColumn:!0,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(a),i&&l&&e.push(l.addColumnAutosizeListeners(this.eResize,this.column))},s=()=>{for(const n of e)n();e.length=0},r=()=>{const n=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.colDef.suppressAutoSize;(n!==t||l!==i)&&(t=n,i=l,s(),o())};r(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",r)}onResizing(e,t){const{column:i,resizeStartWidth:o,takeFromAdjacent:s,beans:r}=this,n=t*this.dragSign,l=r.pinnedCols?.limitResize(i,s,n,o)??n;r.colResize?.resizeColumn(i,o+l,s,e),e&&this.toggleColumnResizing(!1)}onResizeStart(e){const{column:t,beans:i}=this;this.resizeStartWidth=t.actualWidth,this.takeFromAdjacent=i.colResize.takesFromAdjacent(e),this.dragSign=Vn(this.gos.get("enableRtl"),t.pinnedLane),hn(i),this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.setResizing(e),this.comp.toggleCss("ag-column-resizing",e)}},yx=class extends y{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i){const{colModel:o,visibleCols:s}=this.beans,r=[],n=[],l=this.takesFromAdjacent(!1)?new Map:null;for(const a of e){const d=o.getCol(a.key);d&&(l?l.set(d,a.newWidth):(r.push(d),n.push(a.newWidth)))}l?.forEach((a,d)=>{const c=s.getColBefore(d);if(c&&l.has(c))return;let u=0,h=d,g=a;for(;h&&g!==void 0;)r.push(h),n.push(g),u+=g-h.actualWidth,h=ku(s,h),g=h?l.get(h):void 0;h?.isResizable()&&(r.push(h),n.push(h.actualWidth-u))});for(let a=0,d=r.length;a<d;++a){const c=r[a],u=n[a],h=c.maxWidth;if(!(u>=Math.min(c.minWidth,h)&&u<=h)){if(!t)return;ft(this.eventSvc,r,t,i,[]);return}}this.applyColumnWidths(r,n,t,i,r,!1)}setClampedColumnWidths(e,t,i,o,s){for(let r=0,n=e.length;r<n;++r){const l=e[r];t[r]=Math.min(Math.max(t[r],l.minWidth),l.maxWidth)}this.applyColumnWidths(e,t,i,o,s,!1)}takesFromAdjacent(e){return e!==(this.gos.get("colResizeDefault")==="shift")}resizeColumn(e,t,i,o){const{colModel:s,visibleCols:r}=this.beans,n=s.getCol(e);if(!n)return;const l=i?Lu(r,n):null,a=l?n.actualWidth+l.actualWidth:0,d=nf(t,n,l,a);if(Number.isNaN(d)){if(!o)return;ft(this.eventSvc,[n],o,"uiColumnResized",[]);return}if(!o&&d===n.actualWidth)return;const c=l?[n,l]:[n],u=l?[d,a-d]:[d];this.applyColumnWidths(c,u,o,"uiColumnResized",c,!1)}planGroupResize(e,t){const i=[];da(e,i);const o=i.length;da(t?zu(this.beans.visibleCols,e):null,i);const s=i.length,r=[],n=rf(i,0,o,r),l=s>o?rf(i,o,s,r):null,a=[],d=[];for(let c=0;c<s;++c)a.push(0),d.push(la);return{columns:i,ratios:r,group:n,next:l,widths:a,states:d,fitted:Number.NaN}}resizeGroup(e,t,i,o,s=!1){const{group:r,next:n}=e,l=n?r.startWidth+n.startWidth:0,a=nf(t,r,n,l);if(Number.isNaN(a)){if(!i)return;ft(this.eventSvc,e.columns.slice(0,r.to),i,o,[]);return}a!==e.fitted&&(e.fitted=a,sf(e,r,a),sf(e,n,l-a));const d=e.columns;this.applyColumnWidths(d,e.widths,i,o,s?void 0:d,!0)}applyColumnWidths(e,t,i,o,s,r){let n=!1,l=!1;for(let d=0,c=e.length;d<c;++d){const u=e[d],h=t[d];u.actualWidth!==h&&(u.setActualWidth(h,o),n=!0,l||(l=u.pinnedLane!==1))}let a;if(n){const{colFlex:d,visibleCols:c,colViewport:u,ctrlsSvc:h}=this.beans;a=d?.refreshFlexedColumns({resizingCols:s,skipSetLeft:!0,viewportWidth:l&&h.get("gridBodyCtrl")?.getReportedCenterWidth()||void 0}),c.updateBodyWidths(o,c.setLeftValues()),u.checkViewportColumns()}if(n||i){let d=e;a?.length?d=s?e.concat(a):Rx(e,a):r&&(d=e.slice());const c=s?a??[]:null;ft(this.eventSvc,d,i,o,c)}}createResizeFeature(e,t,i,o){return new bx(e,t,i,o)}createGroupResizeFeature(e,t,i){return new wx(e,t,i)}},la=0,tf=1,of=2,aa=3;function sf(e,t,i){if(!t)return;const{columns:o,ratios:s,widths:r,states:n}=e,{from:l,to:a}=t;n.fill(la,l,a);let d=i,c=t.ratioTotal,u=a-l,h=a-1;for(let g=l;g<=a;++g){const p=d,f=1/c,m=c>0,w=p/u;let v=0;for(let C=l;C<=h;++C){if(n[C]===aa)continue;let b;C===h?b=d:(b=Math.round(m?s[C]*p*f:w),d-=b);const R=o[C],x=R.maxWidth,D=Math.min(R.minWidth,x);let A=la;b<D?(v+=D-b,b=D,A=tf):b>x&&(v-=b-x,b=x,A=of),n[C]=A,r[C]=b}if(v===0)return;const S=v>0?tf:of;d=i,c=0,u=0,h=-1;for(let C=l;C<a;++C){const b=n[C];b===aa||b===S?(n[C]=aa,d-=r[C]):(c+=s[C],++u,h=C)}}}function Rx(e,t){const i=[];for(let o=0,s=e.length;o<s;++o){const r=e[o],n=r.flex;(n==null||n<=0||r.pinnedLane!==1)&&i.push(r)}for(let o=0,s=t.length;o<s;++o)i.push(t[o]);return i}function da(e,t){const i=e?.displayedChildren;if(i)for(let o=0,s=i.length;o<s;++o){const r=i[o];r.isColumn?r.isResizable()&&t.push(r):da(r,t)}}function rf(e,t,i,o){let s=0,r=0,n=0;for(let a=t;a<i;++a){const d=e[a],c=d.maxWidth;s+=d.actualWidth,r+=Math.min(d.minWidth,c),n+=c}let l=0;for(let a=t;a<i;++a){const d=s>0?e[a].actualWidth/s:0;o.push(d),l+=d}return{from:t,to:i,startWidth:s,minWidth:r,maxWidth:n,ratioTotal:l}}function nf(e,t,i,o){let s=t.maxWidth,r=Math.min(t.minWidth,s);if(i){const l=i.maxWidth;r=Math.max(r,o-l),s=Math.min(s,o-Math.min(i.minWidth,l))}const n=Lt(e,r,s);return n<=s?n:Number.NaN}var Ex={moduleName:"ColumnResize",version:E,beans:[yx],apiFunctions:{setColumnWidths:vx},dependsOn:[Wp,ef]};function xx(e,t,i){zi(e,t,i,"api")}function Fx(e,t,i){const o=t!=null?e.colModel.colsGroupsById.get(t)?.displayInstances:void 0;return(o&&(typeof i=="number"?o[i]:o[0]))??null}function Px(e,t){return e.colModel.getColGroup(t)??null}function Dx(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""}function Mx(e){return gn(e)}function Tx(e,t){Wi(e,t,"api")}function Ax(e){SS(e,"api")}function Ix(e){return e.visibleCols.treeLeft}function kx(e){return e.visibleCols.treeCenter}function Lx(e){return e.visibleCols.treeRight}function Vx(e){const{treeLeft:t,treeCenter:i,treeRight:o}=e.visibleCols;return t.concat(i,o)}var lf=class{constructor(e){this.entries=new Map,this.context=e.context}wrap(e,t,i){const o=this.entries,s=o.get(e);if(s?.depth===t)return s.buildToken=i,e.originalParent=s.parent,s.wrapper;if(s!==void 0&&ca(s.wrapper),t===0)return s!==void 0&&o.delete(e),e.originalParent=null,e;const r=e.colId,n=this.context;let l=e;for(let a=t-1;a>=0;--a){const d=new _i(null,"FAKE_PATH_"+r+"_"+a,!0,a);n.createBean(d),d.children=[l],l.originalParent=d,l=d}return l.originalParent=null,o.set(e,{wrapper:l,parent:e.originalParent,depth:t,buildToken:i}),l}evict(e){const t=this.entries;t.size!==0&&t.forEach((i,o)=>{i.buildToken!==e&&(ca(i.wrapper),t.delete(o))})}destroy(){const e=this.entries;e.forEach(Hx),e.clear()}},Hx=e=>ca(e.wrapper),ca=e=>{let t=e;for(;t&&!t.isColumn;){const i=t.children[0];t.isAlive()&&t.destroy(),t=i??null}},Bx=class extends y{constructor(){super(...arguments),this.beanName="colGroupSvc",this.groupVersion=0}wireBeans(e){this.colModel=e.colModel,this.wrapperCache=new lf(e)}destroy(){this.wrapperCache.destroy(),super.destroy()}createGroups(e,t,i,o=1,s=!1){const r=!s;if(e.length===0||e[0].originalParent===null){if(r)for(let a=0,d=e.length;a<d;++a){const c=e[a];c.parent&&(c.parent=null,++this.groupVersion)}return e}const n=[];let l=e;for(;l.length;){const a=l.length,d=[];let c=0,u=af(l[0]);for(let h=1;h<=a;++h){const g=h===a?void 0:af(l[h]);if(!(h<a&&g===u)){if(u==null)for(let p=c;p<h;++p){const f=l[p];n.push(f),r&&f.parent!==null&&(f.parent=null,++this.groupVersion)}else{let p;const f=u.groupId,m=t.getInstanceIdForKey(f),w=r?u.displayInstances?.[m]:void 0;if(w&&w.buildToken!==o)w.buildToken=o,w.pinned=i,w.pinnedLane=Ln(i),w.children=null,w.displayedChildren=[],p=w;else if(p=new ci(u,f,m,i),p.buildToken=o,r){this.createBean(p);let S=u.displayInstances;S===null&&(S=[],u.displayInstances=S),S[m]=p}let v=p.children;v===null&&(v=[],p.children=v);for(let S=c;S<h;++S){const C=l[S];v.push(C),r&&C.parent!==p&&(C.parent=p,++this.groupVersion)}d.push(p)}c=h,h<a&&(u=g)}}l=d}return n}prune(e){const t=this.colModel.colsAllGroups;for(let i=0,o=t.length;i<o;++i){const s=t[i].displayInstances;if(!s)continue;let r=0;for(let n=0,l=s.length;n<l;++n){const a=s[n];a.buildToken===e&&(s[r++]=a)}s.length=r}}},af=e=>(e.isColumn?e:e.providedColumnGroup).originalParent,df={moduleName:"ColumnGroup",version:E,dynamicBeans:{headerGroupCellCtrl:J3},beans:[Bx],apiFunctions:{getAllDisplayedColumnGroups:Vx,getCenterDisplayedColumnGroups:kx,getColumnGroup:Fx,getColumnGroupState:Mx,getDisplayNameForColumnGroup:Dx,getLeftDisplayedColumnGroups:Ix,getProvidedColumnGroup:Px,getRightDisplayedColumnGroups:Lx,resetColumnGroupState:Ax,setColumnGroupOpened:xx,setColumnGroupState:Tx}};import{_areEqual as cf}from"ag-stack";function uf(e,t,i,o,s,r,n,l,a,d){const{context:c,gos:u,userColumnSvc:h}=e,g=u.get("defaultColGroupDef"),p=g??null,f=new Set,m=new Set,w=P=>f.has(P)||P in r;let v=0,S=0;if(t){const P=(M,k)=>{k>v&&(v=k);for(let V=0,Q=M.length;V<Q;++V){const U=M[V],Z=U.children;if(Z)U.groupId==null&&++S,P(Z,k+1);else{const W=U.colId??U.field;W==null?++S:m.add(W)}}};if(P(t,0),v>0){const M=k=>{for(let V=0,Q=k.length;V<Q;++V){const U=k[V],Z=U.children;if(Z){M(Z);continue}const W=U,J=s.get(W.colId??W.field??U);let te=J?hf(J,v):null;for(;te?.padding;)f.add(te.groupId),te=te.originalParent}};M(t)}}let C=0;const b=P=>{let M;if(P==null){do M=`${C++}`;while(w(M)||m.has(M));return f.add(M),M}if(!w(P))return f.add(P),P;let k=1;do M=`${P}_${k++}`;while(w(M));return e.log.warn(273,{providedId:P,usedId:M}),f.add(M),M},R=[],x=[];let D=!1;const A=new Map,L=P=>P.colKind==="user"&&P.primary===i&&P.buildToken!==a,H=P=>{for(;;){const M=`${C++}`;if(f.has(M)||m.has(M))continue;const k=r[M];if(k!==void 0){const V=k.userProvidedColDef;if(L(k)&&V&&V.colId==null&&V.field==null)return f.add(M),k.buildToken=a,k.reapplyColDef(P,n,l),k;continue}return f.add(M),an(e,P,M,i,a)}},re=(P,M,k)=>{const V=M??k,Q=s.get(V);if(Q?.colId===V&&L(Q))return Q.buildToken=a,Q.reapplyColDef(P,n,l),Q;let U=0;for(;;){const Z=U===0?V:`${V}_${U}`;if(U++,f.has(Z))continue;const W=r[Z];if(W!==void 0){const J=W.userProvidedColDef;if((J?J.colId??J.field:null)!==V||!L(W))continue}return f.add(Z),M!=null&&Z!==M&&e.log.warn(273,{providedId:M,usedId:Z}),W!==void 0?(W.buildToken=a,W.reapplyColDef(P,n,l),W):an(e,P,Z,i,a)}},$=P=>{const M=h?.overrideFor(P);if(M===null)return;M!==void 0&&(P=M);const k=P.colId;let V;if(k!=null){const U=s.get(k);V=U?.colId===k&&L(U)?U:void 0}else{const U=s.get(P);V=U!==void 0&&L(U)?U:void 0}if(V!==void 0)V.buildToken=a,V.reapplyColDef(P,n,l);else{const U=P.field;V=k==null&&U==null?H(P):re(P,k,U)}const Q=V.userProvidedColDef;if(Q){A.set(V.colId,V),A.has(Q)||A.set(Q,V);const U=Q.field;U&&!A.has(U)&&A.set(U,V)}return V},ne=new Map;if(v===0){const P=[],M=t?.length??0;for(let k=0;k<M;++k){const V=$(t[k]);V!==void 0&&(V.originalParent=null,P.push(V))}return{columnTree:P,treeDepth:0,columns:P,allGroups:x,marryChildren:!1,groupsById:ne,colsByKey:A,source:n,newColDefs:l,buildToken:a,wrapperCache:d}}const j=(P,M,k)=>{let V=hf(P,v);if(V===null||V.buildToken===a)return null;for(;V.level>M;)V.buildToken=a,x.push(V),V=V.originalParent;return V.buildToken=a,x.push(V),V.originalParent=k,V};p&&u.validateColDef(p,"");const _=(P,M,k)=>{let V,Q;for(let Z=P;Z<v;++Z){let W;do W=`${S++}`;while(w(W)||m.has(W));f.add(W);const J=new _i(p,W,!0,Z);J.buildToken=a,c.createBean(J),x.push(J),Q?(Q.children=[J],Q.setExpandable(),J.originalParent=Q):(J.originalParent=M,V=J),Q=J}const U=Q;U.children=k,U.setExpandable();for(let Z=0,W=k.length;Z<W;++Z)k[Z].originalParent=U;return V},z=(P,M)=>{if(P==null)return null;const k=o.get(P);return!k||k.buildToken===a||k.padding?null:f.has(k.groupId)||!kt(M,k.colGroupDef,"children")?{reused:null,existing:k}:(k.buildToken=a,k.colGroupDef=M,f.add(k.groupId),{reused:k,existing:k})},Y=(P,M,k)=>{const V=P.length;if(V===0)return[];const Q=M<v;if(Q){let Z=!0;for(let W=0;W<V;++W)if(P[W].children!==void 0){Z=!1;break}if(Z){const W=[];for(let be=0;be<V;++be){const Ce=$(P[be]);Ce!==void 0&&(R.push(Ce),W.push(Ce))}if(W.length===0)return W;const J=W[0].originalParent;let te=J!==null;if(te){for(let be=1,Ce=W.length;be<Ce;++be)if(W[be].originalParent!==J){te=!1;break}}if(te){const be=j(W[0],M,k);if(be!==null){J.children=W;for(let Ce=0,Ko=W.length;Ce<Ko;++Ce)W[Ce].originalParent=J;return[be]}}return[_(M,k,W)]}}const U=[];for(let Z=0;Z<V;++Z){const W=P[Z],J=W.children;if(J){const te=W,be=te.groupId,Ce={...g,...te},Ko=z(be,Ce),jr=Ko?.reused;let ye;if(jr)jr.level=M,ye=jr;else{const Zr=b(be);u.validateColDef(Ce,Zr),ye=new _i(Ce,Zr,!1,M),ye.buildToken=a,c.createBean(ye);const Hc=Ko?.existing??o.get(Zr);Hc&&ye.setExpanded(Hc.expanded)}ye.children=Y(J,M+1,ye),ye.originalParent=k,ye.setExpandable(),D||(D=!!Ce.marryChildren),ne.set(ye.groupId,ye),x.push(ye),U.push(ye)}else{const te=$(W);if(te===void 0)continue;R.push(te),Q?U.push(j(te,M,k)??_(M,k,[te])):(te.originalParent=k,U.push(te))}}return U};return{columnTree:Y(t,0,null),treeDepth:v,columns:R,allGroups:x,marryChildren:D,groupsById:ne,colsByKey:A,source:n,newColDefs:l,buildToken:a,wrapperCache:d}}var hf=(e,t)=>{const i=e.originalParent;return i!=null&&i.padding&&i.level===t-1?i:null},Ox=e=>{e.edit?.commit(e),e.wrapperCache?.evict(e.buildToken)};import{_pushToMapArray as Ns}from"ag-stack";var Gx=(e,t,i)=>{const o=e.length,s=i.length;if(o===s){let C=!0;for(let b=0;b<s;++b)if(e[b].colId!==i[b]){C=!1;break}if(C)return e}const r=[],n=new Map,l=new Map;let a=!1;for(let C=0;C<s;++C){const b=t[i[C]];if(b!=null){n.set(b,r.length),r.push(b),a||(a=b.colKind==="auto-group");let R=b.originalParent;for(;R!=null;)l.set(R,b),R=R.originalParent}}if(a&&Nx(r,e,n),r.length===o)return r;if(r.length===0)return e;const d=[],c=[],u=[],h=[];let g=null,p=null,f=null;for(let C=0;C<o;++C){const b=e[C];if(n.has(b)){f=b;continue}const R=b.colKind;if(R==="auto-group"||R==="selection"||R==="row-number")f===null?d.push(b):(g??(g=new Map),Ns(g,f,b));else if(b.isCalculatedCol){const x=b.anchoredToColId,D=x!=null?t[x]:void 0;D!==void 0&&n.has(D)?(p??(p=new Map),Ns(p,D,b)):x==null?h.push(b):f===null?u.push(b):(p??(p=new Map),Ns(p,f,b))}else c.push(b)}let m=null,w=c;if(c.length>0&&_x(r)){const C=zx(c,n,l);m=C.followers,w=C.orphans}const v=new Array(o);let S=0;for(let C=0,b=d.length;C<b;++C)v[S++]=d[C];for(let C=0,b=u.length;C<b;++C)v[S++]=u[C];for(let C=0,b=r.length;C<b;++C){const R=r[C];v[S++]=R;const x=g?.get(R);if(x!==void 0)for(let L=0,H=x.length;L<H;++L)v[S++]=x[L];const D=p?.get(R);if(D!==void 0)for(let L=0,H=D.length;L<H;++L)v[S++]=D[L];const A=m?.get(R);if(A!==void 0)for(let L=0,H=A.length;L<H;++L)v[S++]=A[L]}for(let C=0,b=w.length;C<b;++C)v[S++]=w[C];for(let C=0,b=h.length;C<b;++C)v[S++]=h[C];return v},Nx=(e,t,i)=>{let o=0;const s=t.length;for(let r=0,n=e.length;r<n;++r)if(e[r].colKind==="auto-group")for(;o<s;){const l=t[o++];if(l.colKind==="auto-group"&&i.has(l)){e[r]=l,i.set(l,r);break}}},_x=e=>{for(let t=0,i=e.length;t<i;++t){let o=e[t].originalParent;for(;o!=null;){if(o.children.length>1)return!0;o=o.originalParent}}return!1},zx=(e,t,i)=>{const o=new Map,s=[];for(let r=0,n=e.length;r<n;++r){const l=e[r],a=Wx(l,t,i);if(a==null){s.push(l);continue}Ns(o,a,l)}return{followers:o,orphans:s}},Wx=(e,t,i)=>{let o=e.originalParent,s=null;for(;o!=null;){let r=-1,n=null;const l=o.children;for(let a=0,d=l.length;a<d;++a){const c=l[a];if(c===s||c===e)continue;let u;if(c.isColumn?u=c:u=i.get(c),u!==void 0){const h=t.get(u);h!==void 0&&h>r&&(r=h,n=u)}}if(n!=null)return n;s=o,o=o.originalParent}return null},Ux=class extends y{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1,this.showingPivotResult=!1,this.pendingRefresh=!1,this.everythingChangedInUpdate=!1,this.pendingRaiseEverything=!1,this.pendingChangesSource=null,this.colsList=[],this.colsTree=[],this.colsTreeDepth=0,this.colDefList=[],this.colDefsVersion=0,this.colUpdateDepth=0,this.queuedColEvents=[],this.colEventsRaisingAt=0,this.colDefTree=[],this.colDefTreeDepth=0,this.colDefHasMarryChildren=!1,this.hasMarryChildren=!1,this.colsById=Object.create(null),this.colDefGroupsById=new Map,this.colDefColsByKey=new Map,this.colDefAllGroups=[],this.colsGroupsById=new Map,this.colsAllGroups=[],this.groupHeaderNameOverrides=new Map,this.cachedColsByDef=null,this.cachedAllCols=null,this.cachedColsInStateOrder=null,this.lastOrder=null,this.lastPivotOrder=null,this.prevPivotStrict=!1,this.colsListIndexDirty=!0,this.colDefs=void 0,this.buildTokenCounter=0}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.hierarchyWrapperCache=new lf(this.beans),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","hidePaddedHeaderRows"],e=>this.refreshAll(zt(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),zt(e.source)))}destroy(){Bu(this.colDefList,this.colDefAllGroups),this.hierarchyWrapperCache.destroy(),super.destroy()}nextBuildToken(){return++this.buildTokenCounter}isPivotActive(){return this.pivotMode&&!!this.beans.pivotColsSvc?.columns?.length}getCols(){return this.colsList}getAllCols(){let e=this.cachedAllCols;return e||(e=(this.showingPivotResult?this.beans.pivotResultCols?.buildAllCols():void 0)??this.colsList,this.cachedAllCols=e),e}getColGroup(e){return this.colsGroupsById.get(e)??(this.showingPivotResult?this.colDefGroupsById.get(e):void 0)}getColsInStateOrder(){if(!this.showingPivotResult)return this.colsList;let e=this.cachedColsInStateOrder;return e||(e=this.beans.pivotResultCols?.buildColsInStateOrder()??this.colsList,this.cachedColsInStateOrder=e,e)}buildFromColDefs(e,t){const i=this.beans,{valueCache:o,colAutosize:s,rowGroupColsSvc:r,pivotColsSvc:n,valueColsSvc:l,visibleCols:a,eventSvc:d,groupHierarchyColSvc:c,calculatedColsSvc:u}=i,h=this.colDefs,g=this.ready?mn(i):void 0;o?.expire();const p=this.colDefList,f=this.colDefTree,m=this.colDefAllGroups;this.beginColUpdate();const w=g?un(i):null;try{const v=uf(i,h,!0,this.colDefGroupsById,this.colDefColsByKey,this.colsById,e,t,this.nextBuildToken(),this.hierarchyWrapperCache);c?.contributeTo(v),u?.contributeTo(v),Ox(v);const S=v.columnTree,C=v.columns;this.colDefTree=S,this.colDefTreeDepth=v.treeDepth,this.colDefList=C,++this.colDefsVersion,this.colDefHasMarryChildren=v.marryChildren,this.colDefGroupsById=v.groupsById,this.colDefColsByKey=v.colsByKey,this.colDefAllGroups=v.allGroups;const b=Object.create(null);for(let x=0,D=C.length;x<D;++x)b[C[x].colId]=C[x];this.colsById=b,f!==S&&Ou(p,m,v.buildToken),this.invalidateColsDerivedState();const R=p.length>0?new Set(p):null;for(let x=0,D=C.length;x<D;++x){const A=C[x],L=!R?.has(A);r?.extractCol(A,L,e),n?.extractCol(A,L,e),l?.extractCol(A,L,e)}r?.commitExtract(e),n?.commitExtract(e),l?.commitExtract(e),this.ready=!0,this.changeEventsDispatching=!0;try{this.refreshCols(t,e),a.refresh(e,!1)}finally{this.changeEventsDispatching=!1}if(d.dispatchEvent({type:"columnEverythingChanged",source:e}),this.colUpdateDepth>1&&(this.everythingChangedInUpdate=!0),g){this.changeEventsDispatching=!0;try{bu(i,e,g)}finally{this.changeEventsDispatching=!1}}d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&s?.applyAutosizeStrategy()}finally{w?.(),this.endColUpdate()}}beginColUpdate(){++this.colUpdateDepth}endColUpdate(){const e=this.colUpdateDepth;if(e>1){this.colUpdateDepth=e-1;return}this.colUpdateDepth=1;let t=!1,i;const o=this.beans.colFilter;do try{o?.refreshRedefinedFilters(),this.runColChanges(),this.flushColEvents()}catch(s){i=t?i:s,t=!0}while(this.queuedColEvents.length!==0||this.hasColChangesStaged()||o?.hasRedefinedFilters());this.colUpdateDepth=0,this.everythingChangedInUpdate=!1;try{this.beans.visibleCols.raiseDeferredLayoutEvents()}catch(s){i=t?i:s,t=!0}if(t)throw i}queueColEvent(e,t){const i=this.queuedColEvents;let o=e.lastQueuedEventAt;if(o<i.length&&i[o]===e){const s=t.type;for(let r=o,n=this.colEventsRaisingAt;r>=n;r=i[r+2]){const l=i[r+1];if(l.type===s&&(s!=="columnStateUpdated"||l.key===t.key)){i[r+1]=t;return}}}else o=-1;e.lastQueuedEventAt=i.length,i.push(e,t,o)}flushColEvents(){const e=this.queuedColEvents;if(e.length===0)return;let t=!1,i;for(let o=0;o<e.length;)try{if(this.hasColChangesStaged())this.runColChanges();else{const s=o;o+=3,this.colEventsRaisingAt=o,e[s].raiseQueuedEvent(e[s+1])}}catch(s){i=t?i:s,t=!0}if(this.colEventsRaisingAt=0,e.length=0,t)throw i}stageColChanges(e,t){t!=="dispatch"&&(this.pendingRefresh=!0,t!=="reorder"&&(this.pendingRaiseEverything=!0)),this.pendingChangesSource??(this.pendingChangesSource=e)}hasColChangesStaged(){const{rowGroupColsSvc:e,pivotColsSvc:t,valueColsSvc:i}=this.beans;return this.pendingRefresh||!!e?.pendingChanged||!!t?.pendingChanged||!!i?.pendingChanged}runColChanges(){const e=this.everythingChangedInUpdate;if(this.everythingChangedInUpdate=!1,!this.hasColChangesStaged()){this.pendingChangesSource=null;return}const{rowGroupColsSvc:t,pivotColsSvc:i,valueColsSvc:o}=this.beans,s=this.pendingChangesSource??"api",r=this.pendingRefresh,n=this.pendingRaiseEverything&&!e;this.pendingChangesSource=null,this.pendingRaiseEverything=!1;const l=r?this.beans.colAnimation:void 0;l?.start();try{t?.flushReindex(),i?.flushReindex(),o?.flushReindex(),r&&(this.performRefresh(s),n&&this.eventSvc.dispatchEvent({type:"columnEverythingChanged",source:s})),t?.dispatchColChange(s),i?.dispatchColChange(s),o?.dispatchColChange(s)}finally{l?.finish()}}refreshCols(e,t){if(!this.ready)return;const i=this.beans,o=this.gos,s=i.formula,r=this.isPivotSortReorder();r&&i.colAnimation?.start();try{const n=this.colDefList,l=this.colsTree,a=this.showingPivotResult,d=this.pivotMode?i.pivotResultCols:null,c=d?.pivotCols??null,u=c!=null?d:null,h=!!u;this.showingPivotResult=h;const g=c??n,p=u?u.pivotTree:this.colDefTree,f=u?u.pivotTreeDepth:this.colDefTreeDepth;this.colsTreeDepth=f,this.hasMarryChildren=u?u.pivotHasMarryChildren:this.colDefHasMarryChildren,this.colsGroupsById=u?u.pivotGroupsById:this.colDefGroupsById,this.colsAllGroups=u?u.pivotAllGroups:this.colDefAllGroups,s?.setFormulasActive(n);const m=i.autoColSvc?.refreshCols(t),w=i.selectionColSvc?.refreshCols(),v=i.rowNumbersSvc?.refreshCols(),S=this.colsList;S.length>0&&(a?this.prevPivotStrict||(this.lastPivotOrder=gf(S,this.lastPivotOrder)):this.lastOrder=gf(S,this.lastOrder)),this.prevPivotStrict=h&&(i.pivotColsSvc?.isStrictColumnOrder()??!1);const C=m?.length??0,b=g.length,R=p.length,x=(v?1:0)+(w?1:0)+C,D=new Array(x+b),A=new Array(x+R),L=Object.create(null);let H=0;v&&(D[H++]=v),w&&(D[H++]=w);for(let P=0;P<C;++P)D[H++]=m[P];const re=i.colGroupSvc.wrapperCache;if(f>0){const P=this.nextBuildToken();for(let M=0;M<x;++M){const k=D[M];L[k.colId]=k,k.inColsList=!0,A[M]=re.wrap(k,f,P)}re.evict(P)}else{re.destroy();for(let P=0;P<x;++P){const M=D[P];L[M.colId]=M,M.inColsList=!0,M.originalParent=null,A[P]=M}}if(u){a||this.ensureColsListIndex();let P=-1;for(let M=0,k=n.length;M<k;++M){const V=n[M];L[V.colId]=V,V.inColsList=!1,V.colsListIndex<0?V.colsListIndex=P:P=V.colsListIndex}}for(let P=0;P<b;++P){const M=g[P];D[H++]=M,L[M.colId]=M,M.inColsList=!0}for(let P=0;P<R;++P)A[x+P]=p[P];const $=!e||iS(o,h),ne=h?this.lastPivotOrder:this.lastOrder;let j=$?ne:null;const _=i.pivotColsSvc;j!=null&&h&&_?.hasInteractivePivotSort()&&(j=_.reRankByPivotGroupOrder(D,j,L));const z=j==null?D:Gx(D,L,j),Y=gu(z,o),ee=!cf(Y,S);ee&&(this.colsListIndexDirty=!0),this.colsList=ee?Y:S,this.colsTree=cf(A,l)?l:A,this.colsById=L,this.invalidateColsDerivedState(),this.refreshColsDerivedState(),s?.onColsRefreshed(),ee&&(i.rowSpanSvc?.refreshCols(),i.editSvc?.releaseColumnsLeaving(Y)),(this.colsTree!==l||ee)&&this.eventSvc.dispatchEvent({type:"gridColumnsChanged"})}finally{r&&i.colAnimation?.finish()}}isPivotSortReorder(){return!!this.beans.pivotColsSvc?.hasInteractivePivotSort()||this.prevPivotStrict}refreshColsDerivedState(){const e=this.beans;e.showRowGroupCols?.refresh(),e.quickFilter?.refreshCols(),e.visibleCols.clear(),e.colViewport.clear()}refreshAll(e){if(this.ready){if(this.colUpdateDepth>0){this.pendingRefresh=!0,this.pendingChangesSource??(this.pendingChangesSource=e);return}this.performRefresh(e)}}performRefresh(e){if(this.pendingRefresh=!1,!!this.ready){this.beginColUpdate();try{this.refreshCols(!1,e),this.beans.visibleCols.refresh(e,!1)}finally{this.endColUpdate()}}}replaceColDefList(e){this.ready&&(this.colDefList=e)}setPivotMode(e,t){if(e!==this.pivotMode&&(this.pivotMode=e,this.ready)){this.beginColUpdate();try{this.refreshCols(!1,t),this.beans.visibleCols.refresh(t,!1),this.eventSvc.dispatchEvent({type:"columnPivotModeChanged"})}finally{this.endColUpdate()}}}recreateColumnDefs(e){if(this.ready){this.beginColUpdate();try{this.beans.autoColSvc?.updateColumns(e),this.buildFromColDefs(zt(e.source),!0)}finally{this.endColUpdate()}}}setColumnDefs(e,t){const i=this.beans;i.userColumnSvc?.clear(),i.calculatedColsSvc?.resetDynamicColumnDefs(),this.colDefs=e,this.buildFromColDefs(t,!0)}rebuildCols(e){this.ready&&this.buildFromColDefs(e,!1)}markColsListIndexDirty(){this.colsListIndexDirty=!0,this.cachedColsInStateOrder=null,this.cachedAllCols=null}invalidateColsDerivedState(){this.cachedColsByDef=null,this.cachedAllCols=null,this.cachedColsInStateOrder=null,this.beans.sortSvc?.invalidate()}ensureColsListIndex(){if(this.colsListIndexDirty){const e=this.colsList;for(let t=0,i=e.length;t<i;++t)e[t].colsListIndex=t;this.colsListIndexDirty=!1}}getCol(e){if(typeof e=="string")return this.colsById[e]??this.getColFallback(e);const t=e?.colId;if(typeof t=="string"){const i=this.colsById[t];if(i!==void 0)return i}return e==null?void 0:this.getColFallback(e)}getColFallback(e){const t=this.cachedColsByDef??this.loadColsByDef(),i=t.get(e);if(i!==void 0)return i;if(typeof e!="object")return;const o=e.field;return typeof o=="string"?t.get(o):void 0}getNonPivotCol(e){const t=this.getCol(e);return t!==void 0&&t.colDef.pivotKeys==null?t:void 0}getNonPivotColById(e){const t=this.colsById[e];return t!==void 0&&t.colDef.pivotKeys==null?t:void 0}loadColsByDef(){const e=new Map;return pf(e,this.colsList),this.showingPivotResult&&pf(e,this.colDefList),this.cachedColsByDef=e,e}},gf=(e,t)=>{const i=e.length;t??(t=[]),t.length=i;for(let o=0;o<i;++o)t[o]=e[o].colId;return t},pf=(e,t)=>{for(let i=0,o=t.length;i<o;++i){const s=t[i],r=s.colDef;e.set(r,s);const n=s.userProvidedColDef;n!=null&&e.set(n,s);const l=r.field;l&&l!==s.colId&&!e.has(l)&&e.set(l,s)}};import{KeyCode as qx,RefPlaceholder as $x,_getActiveDomElement as Kx,_getAriaCheckboxStateName as jx,_setAriaLive as Zx}from"ag-stack";import{RefPlaceholder as ua,_addOrRemoveAttribute as _s,_setAriaLabel as Qx,_setDisabled as Yx,_setElementWidth as Jx}from"ag-stack";import{_getAriaLabel as Xx,_setAriaLabel as eF,_setAriaLabelledBy as ff,_setFixedWidth as tF}from"ag-stack";import{AgComponentStub as iF,_clearElement as oF,_setAriaRole as mf,_setDisabled as sF,_setDisplayed as Cf,_setElementWidth as rF}from"ag-stack";var nF=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",ha=class extends G1{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e??{},this.registerCSS(nF)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:o,disabled:s,labelEllipsis:r}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),r!=null&&this.setLabelEllipsis(r),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;oF(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Cf(t,!1),mf(t,"presentation")):(Cf(t,!0),mf(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(rF(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return sF(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},vf=class extends ha{constructor(e,t,i,o){super(e,t,i),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i,ariaLabel:o}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),i!=null&&this.onValueChange(i),o!=null&&this.setAriaLabel(o),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();i==null||i==""||Xx(e)!==null?ff(e,""):ff(e,t??"")}setAriaLabel(e){return eF(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 tF(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}},lF=new Set(["button","checkbox","file","hidden","radio","range","reset","submit"]);function aF(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var rt=class extends vf{constructor(e,t,i="text",o="input"){super(e,e?.template??aF(o),[],t),this.inputType=i,this.displayFieldTag=o,this.eLabel=ua,this.eWrapper=ua,this.eInput=ua}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:i,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),i.classList.add(`${o}-input`),this.addCss("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:r,inputPlaceholder:n,autoComplete:l,tabIndex:a}=this.config;s!=null&&this.setInputName(s),r!=null&&this.setInputWidth(r),n!=null&&this.setInputPlaceholder(n),l!=null?this.setAutoComplete(l):this.refreshAutoComplete(),this.addManagedPropertyListener("enableInputAutoComplete",()=>this.refreshAutoComplete()),this.addInputListeners(),this.activateTabIndex([i],a)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,_s(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return Jx(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return _s(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Qx(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Yx(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return this.autoCompleteOverride=e,e==null?this.refreshAutoComplete():this.applyAutoComplete(e),this}refreshAutoComplete(){this.autoCompleteOverride==null&&this.isAutoCompleteCapableField()&&this.applyAutoComplete(this.gos.get("enableInputAutoComplete")===!0)}isAutoCompleteCapableField(){const{eInput:e}=this;if(e.tagName==="TEXTAREA")return!0;if(e.tagName!=="INPUT")return!1;const{type:t}=e;return!lF.has(t)}applyAutoComplete(e){if(e===!0)_s(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";_s(this.eInput,"autocomplete",t)}}},vo=class extends rt{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t,name:i}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),i!=null&&this.setName(i)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),this.selected=typeof e=="boolean"?e:void 0,this.refreshInput(),t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(!this.passive&&!this.eInput.disabled){const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}this.refreshInput()}refreshInput(){const{eInput:e,selected:t}=this;e.checked=!!t,e.indeterminate=t===void 0}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},zs={selector:"AG-CHECKBOX",component:vo},dF=".ag-checkbox-cell{height:100%}",cF={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},uF=class extends K{constructor(){super(cF,[zs]),this.eCheckbox=$x,this.registerCSS(dF)}init(e){this.refresh(e);const{eCheckbox:t,beans:i}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),Zx(o,"polite"),this.addManagedListeners(o,{click:s=>{if(bt(s),t.isDisabled())return;const r=t.getValue();this.onCheckboxChanged(r)},dblclick:s=>{bt(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===qx.SPACE&&!t.isDisabled()){e.eGridCell===Kx(i)&&t.toggle();const r=t.getValue();this.onCheckboxChanged(r),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0;const{value:o,column:s,node:r}=e;if(r.group&&s)if(typeof o=="boolean")t=o;else{const u=s.getColId();u.startsWith(_t)?t=o==null||o===""?void 0:o==="true":r.aggData?.[u]!==void 0||r.sourceRowIndex>=0?t=o??void 0:i=!1}else t=o??void 0;const{eCheckbox:n}=this;if(!i){n.setDisplayed(!1);return}n.setValue(t);const l=e.disabled??!s?.isCellEditable(r);n.setDisabled(l);const a=this.getLocaleTextFunc(),d=jx(a,t),c=l?d:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;n.setInputAriaLabel(c)}onCheckboxChanged(e){const{params:t}=this,{column:i,node:o,value:s}=t,{editSvc:r}=this.beans;if(!i)return;const n={rowNode:o,column:i};r?.dispatchCellEvent(n,null,"cellEditingStarted",{value:s});const l=o.setDataValue(i,e,"ui");r?.dispatchCellEvent(n,null,"cellEditingStopped",{oldValue:s,newValue:e,valueChanged:l}),l||this.updateCheckbox(t)}};import{_setAriaLabel as wf,_setAriaLabelledBy as Sf}from"ag-stack";var hF={tag:"div",cls:"ag-skeleton-container"},gF=class extends K{constructor(){super(hF)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Sf(e.eParentOfValue)),Sf(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");wf(this.getGui(),t)}setupLoading(e){const t=O({tag:"div",cls:"ag-skeleton-effect"}),i=e.node.rowIndex;if(i!=null){const r=75+25*(i%2===0?Math.sin(i):Math.cos(i));t.style.width=`${r}%`}this.getGui().appendChild(t);const o=this.getLocaleTextFunc(),s=e.deferRender?o("ariaDeferSkeletonCellLoading","Cell is loading"):o("ariaSkeletonCellLoading","Row data is loading");wf(this.getGui(),s)}refresh(e){return!1}},pF={moduleName:"CheckboxCellRenderer",version:E,userComponents:{agCheckboxCellRenderer:uF}},fF={moduleName:"SkeletonCellRenderer",version:E,userComponents:{agSkeletonCellRenderer:gF}};function mF(e,t){const i=e.colModel.getCol(t);return i?i.colDef:null}function CF(e){return e.colDefFactory?.getColumnDefs()}function vF(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""}function wF(e,t){return e.colModel.getCol(t)??null}function SF(e){const t=e.colModel;return t.ready?t.colDefList:null}function bF(e,t){return tt(e,t,"api")}var yF=Ru;function RF(e){wu(e,"api")}function EF(e){return e.visibleCols.leftCols.length>0||e.visibleCols.rightCols.length>0}function xF(e){return e.visibleCols.leftCols.length>0}function FF(e){return e.visibleCols.rightCols.length>0}function PF(e,t){return e.visibleCols.getColAfter(t)}function DF(e,t){return e.visibleCols.getColBefore(t)}function MF(e,t,i){Ui(e,t,i===!0,"api")}function TF(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")}function AF(e){return e.colModel.colsList}function IF(e){return e.visibleCols.leftCols}function kF(e){return e.visibleCols.centerCols}function LF(e){return e.visibleCols.rightCols}function VF(e){return e.visibleCols.allCols}function HF(e){return e.colViewport.getViewportColumns()}function ga(e,t){if(!e)return;const i=e,o={};for(const s of Object.keys(i)){if(s===t||jo(s))continue;const r=i[s];Zo(r)?o[s]=ga(r):o[s]=r}return o}var BF=class extends y{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.colModel=e.colModel}getColumnDefs(){const e=this.colModel;if(!e.ready)return;const t=e.colDefList;e.ensureColsListIndex();const i=t.slice().sort(GF),o=[],s=Object.create(null),r=e.colDefTreeDepth+1;for(let n=0,l=i.length;n<l;++n){const a=i[n];if(a.colKind==="hierarchy")continue;const d=OF(a);let c=!0,u=d,h=a.originalParent,g=0;for(;h&&!(++g>r);){if(h.padding){h=h.originalParent;continue}const p=s[h.groupId];if(p){p.children.push(u),c=!1;break}const f=ga(h.colGroupDef,"children");if(!f){c=!1;break}f.groupId=h.groupId,f.children=[u],s[f.groupId]=f,u=f,h=h.originalParent}c&&o.push(u)}return o}},OF=e=>{const{colId:t,colDef:i,actualWidth:o,aggregationActive:s,rowGroupActive:r,visible:n,pivotActive:l,pinned:a}=e,d=ga(i);return d.colId=t,d.width=o,d.rowGroup=r,d.rowGroupIndex=r?e.rowGroupActiveIndex:null,d.pivot=l,d.pivotIndex=l?e.pivotActiveIndex:null,d.aggFunc=s?e.aggFunc:null,d.hide=n?void 0:!0,d.pinned=a==="left"||a==="right"?a:null,d.sort=e.getSortDef(),d.sortIndex=e.sortIndex??null,d},GF=(e,t)=>e.colsListIndex-t.colsListIndex,NF=class extends y{constructor(){super(...arguments),this.beanName="colFlex",this.flexViewportWidth=0,this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const i=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:s}=this.beans,r=o.lastFlexIndex;if(r<0||!i)return this.revealColumns(s),[];const n=o.centerCols,l=n.length,a=n[0].allColsIndex;let d=-1;const c=e.resizingCols;if(c){for(let v=0,S=c.length;v<S;++v){const C=c[v],b=C.allColsIndex-a;b<=d||n[b]!==C||(d=b)}if(a+d>=r)return this.revealColumns(s),[]}const u=[];let h=0;const g=[];for(let v=d+1;v<l;++v){const S=n[v],C=S.flex;C==null||C<=0||(u.push(S),h+=C,g.push({col:S,flex:C,initialSize:S.actualWidth,min:S.minWidth,max:S.maxWidth,targetSize:0,frozenSize:void 0,violationType:void 0}))}const p=g.length;if(!p)return this.revealColumns(s),u;s?.hideColumns("colFlex"),this.columnsHidden=!0;let f=p,m=i;for(let v=0;v<l;++v){const S=n[v],C=S.flex;if(v>d&&C!=null&&C>0)continue;const b=S.actualWidth;S.setActualWidth(b,t),m-=b}for(;f>0;){const v=Math.round(h<1?m*h:m);let S,C=0,b=0;for(let D=0;D<p;++D){const A=g[D];if(A.frozenSize!=null)continue;S=A,b+=v*(A.flex/h);const L=b-C,H=Math.round(L);A.targetSize=H,C+=H}S&&(S.targetSize+=v-C);let R=0;for(let D=0;D<p;++D){const A=g[D];if(A.frozenSize!=null)continue;const L=A.targetSize,H=Math.min(Math.max(L,A.min),A.max);R+=H-L,A.violationType=H===L?void 0:H<L?"max":"min",A.targetSize=H}const x=R===0?"all":R>0?"min":"max";for(let D=0;D<p;++D){const A=g[D];if(A.frozenSize!=null||x!=="all"&&A.violationType!==x)continue;const L=A.targetSize;A.frozenSize=L,A.col.setActualWidth(L,t),m-=L,h-=A.flex,--f}}const w=e.skipSetLeft?void 0:o.setLeftValues();if(e.updateBodyWidths&&o.updateBodyWidths(t,w),e.fireResizedEvent){const v=[];for(let S=0;S<p;++S){const C=g[S];C.initialSize!==C.frozenSize&&v.push(C.col)}ft(this.eventSvc,v,!0,t,u)}return this.revealColumns(s),u}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:i}=e.colDef;t!==void 0?e.flex=t:i!==void 0&&(e.flex=i)}setColFlex(e,t,i){e.flex=t??null,e.dispatchStateUpdatedEvent("flex",i)}};import{KeyCode as _F,_isValidDate as pa,_isValidDateTime as zF,_parseBigIntOrNull as Ws,_parseDateTimeFromString as bf,_serialiseDate as yf,_toStringOrNull as Rf}from"ag-stack";var WF=["dateTimeString","dateString","text","number","bigint","boolean","date"],UF=["cellRenderer","cellEditorParams","comparator","getFindText","keyCreator","suppressKeyboardEvent","valueFormatter","valueParser"],qF=class extends y{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.objectFilterValueGetter=({column:e,node:t})=>{const i=e,o=this.formatValueFuncs,s=t?this.beans.valueSvc.getValueFromData(i,t):void 0,r=this.getBaseDataType(i);return r&&r!=="object"?s:(o[i.colDef.cellDataType]??o.object)({column:e,node:t,value:s})},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference=Object.create(null),this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:e}){return e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:QF,absolute:YF}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:i})=>t.key===_F.SPACE&&i.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:i}){return{cellEditorParams:{useFormatter:!0},comparator:(o,s)=>{const r=t.getNonPivotColById(i),n=r?.colDef;if(!r||!n)return 0;const l=o==null?"":e({column:r,node:null,value:o}),a=s==null?"":e({column:r,node:null,value:s});return l===a?0:l>a?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},i={},o=c=>u=>{const{column:h,node:g,value:p}=u;let f=h.getColDef().valueFormatter;return f===c.groupSafeValueFormatter&&(f=c.valueFormatter),this.beans.valueSvc.formatValue(h,g,p,f)};for(const c of Object.keys(e)){const u=e[c],h={...u,groupSafeValueFormatter:Ff(u,this.gos)};t[c]=h,i[c]=o(h)}const s=this.gos.get("dataTypeDefinitions")??{},r={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(r[c]=u.dataTypeMatcher),i[c]=o(h))}const{valueParser:n,valueFormatter:l}=e.object,{valueParser:a,valueFormatter:d}=t.object;this.hasObjectValueParser=a!==n,this.hasObjectValueFormatter=d!==l,this.formatValueFuncs=i,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(r,e)}sortKeysInMatchers(e,t){const i={...e};for(const o of WF)delete i[o],i[o]=e[o]??t[o].dataTypeMatcher;return i}processDataTypeDefinition(e,t,i,o){let s;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=o[r];const l=t[r];if(n&&l&&(n=l),!xf(this.beans.log,e,n,r))return;s=Ef(n,e)}else{if(i.includes(r)){this.warn(44);return}const n=t[r];if(!xf(this.beans.log,e,n,r))return;const l=this.processDataTypeDefinition(n,t,[...i,r],o);if(!l)return;s=Ef(l,e)}return{...s,groupSafeValueFormatter:Ff(s,this.gos)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:o}=t;o===void 0&&(o=e.cellDataType);const{field:s}=t;if((o==null||o===!0)&&(o=this.canInferCellDataType(e,t)?this.inferCellDataType(s,i):!1),this.addFormulaCellEditorToColDef(e,t),!o){e.cellDataType=!1;return}const r=this.dataTypeDefinitions[o];if(!r){this.warn(47,{cellDataType:o});return}return e.cellDataType=o,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,r,i),r.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}columnStateUpdated(e,t){this.columnStateUpdatesPendingInference[e.colId]?.add(t)}canInferCellDataType(e,t){const{gos:i}=this;if(!ie(i))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(fa(t,o))return!1;const s=t.type===null?e.type:t.type;if(s){const r=i.get("columnTypes")??{};if(ns(s).some(l=>{const a=r[l.trim()];return a&&fa(a,o)}))return!1}return!fa(e,o)}inferCellDataType(e,t){if(!e)return;const i=e.includes(".")&&!this.gos.get("suppressFieldDotNotation")?e.split("."):null;if(vn(e,i))return;const o=l=>{if(l!=null)return i?qi(l,i):l[e]};let s;const r=this.getInitialRowData();if(r)for(let l=0,a=r.length;s==null&&l<a;++l)s=o(r[l]);else{const l=this.beans.rowModel.rootNode?._leafs;if(!l?.length){this.initWaitForRowData(t);return}for(let a=0,d=l.length;s==null&&a<d;++a)s=o(l[a].data)}return s==null?void 0:Object.keys(this.dataTypeMatchers).find(l=>this.dataTypeMatchers[l](s))??"object"}getInitialRowData(){const e=this.gos.get("rowData");return e?.length?e:this.initialData?.length?this.initialData:null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:i,eventSvc:o}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:({rowData:r})=>{r?.length&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference=Object.create(null),t&&i?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const i=this.colModel;i.beginColUpdate();try{this.applyInferredColDefs(t)}finally{i.endColUpdate()}this.initialData=null}applyInferredColDefs(e){const t=this.beans,i=[],o=Object.create(null),s=Object.create(null);for(const r of Object.keys(this.columnStateUpdatesPendingInference)){const n=this.resetColDefAndGetColumnState(r,e);n&&(n.rowGroup&&n.rowGroupIndex==null&&(o[r]=n),n.pivot&&n.pivotIndex==null&&(s[r]=n),i.push(n))}if(e){const r=Object.create(null);t.rowGroupColsSvc?.restoreColumnOrder(o,r),t.pivotColsSvc?.restoreColumnOrder(s,r);const n=Object.keys(r);for(let l=0,a=n.length;l<a;++l)i.push(r[n[l]])}i.length&&tt(t,{state:i},"cellDataTypeInferred",!0)}resetColDefAndGetColumnState(e,t){const i=this.colModel.colsById[e];if(!i)return null;const o=i.colDef;if(!this.resetColDefIntoCol(i,"cellDataTypeInferred"))return null;const s=i.colDef;return!t||!s.type||s.type===o.type?null:JF(this.beans,i,this.columnStateUpdatesPendingInference[e])}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const o=ts(this.beans,i,e.colId);return e.setColDef(o,i,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.colDef;if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!i||e.allowFormula&&this.beans.formula?.isFormula(t)?!0:i(t)}validateColDef(e,t,i,o){if(e.cellDataType==="object"){const s=a=>a?.cellDataType==null||a?.cellDataType===!0,r=s(t)&&s(i),n=a=>this.warn(48,{property:a,inferred:r,colId:o}),{object:l}=this.dataTypeDefinitions;e.valueFormatter===l.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&n("Formatter"),e.editable&&e.valueParser===l.valueParser&&!this.hasObjectValueParser&&n("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:i,beans:o,formatValueFuncs:s}=this,r=i[t];r&&o.colFilter?.setColDefPropsForDataType(e,r,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isInferring(){return this.initialData!=null}isDataTypeRegistered(e){return this.dataTypeDefinitions[e]!=null}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,o){const s=this.formatValueFuncs[t],r=this.columnDefinitionPropsPerDataType[i.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:i,colId:o,formatValue:s,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&r.cellEditor!==e.cellEditor&&(r.cellEditor=e.cellEditor),Object.assign(e,r)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),i=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:o=>bf(o.newValue&&String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||Number.isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):yf(o.value,i)??"",dataTypeMatcher:o=>o instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:i=>bf(i)??void 0,dateFormatter:i=>yf(i??null,t)??void 0,valueParser:i=>pa(String(i.newValue))?i.newValue:null,valueFormatter:i=>pa(String(i.value))?String(i.value):"",dataTypeMatcher:i=>typeof i=="string"&&pa(i)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||Number.isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:i}=t;return i==null||typeof i=="string"&&i.trim()===""?null:Ws(i)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Rf(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&zF(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Rf(t.value)??""}}}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference=Object.create(null),super.destroy()}};function Ef(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...ns(e.columnTypes),...ns(t.columnTypes)]),i}function xf(e,t,i,o){return i?i.baseDataType!==t.baseDataType?(e.warn(46),!1):!0:(e.warn(45,{parentCellDataType:o}),!1)}var $F=e=>typeof e=="bigint"||typeof e=="number",KF=e=>e==="number"||e==="bigint",jF=(e,t)=>{switch(e){case"date":case"dateTime":return t instanceof Date;case"dateString":case"dateTimeString":return typeof t=="string";default:return!1}};function Ff(e,t){if(e.valueFormatter)return i=>{const{node:o,column:s,value:r}=i;if(o?.group){const n=s,l=(n.pivotValueColumn??n).aggFunc;if(l){if(l==="first"||l==="last")return e.valueFormatter(i);const{baseDataType:a}=e;if((l==="min"||l==="max")&&jF(a,r))return e.valueFormatter(i);if(KF(a)&&l!=="count"){if($F(r))return e.valueFormatter(i);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...i,value:r.toNumber()});if("value"in r)return e.valueFormatter({...i,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&typeof i.value=="string"&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function ZF(e,t,i,o){if(!t[i])return!1;const s=e[i];return s===null?(t[i]=!1,!1):o===void 0?!!s:s===o}function QF(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const i=Ws(e),o=Ws(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:0}function YF(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const i=Pf(e),o=Pf(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:0}function Pf(e){const t=Ws(e);return t==null?null:t<0n?-t:t}function fa(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,o])=>ZF(e,t,i,o))}function JF(e,t,i){const o=Eu(e,t);for(const s of i)delete o[s],s==="rowGroup"?delete o.rowGroupIndex:s==="pivot"&&delete o.pivotIndex;return o}var XF={moduleName:"DataType",version:E,beans:[qF],dependsOn:[pF]},e6={moduleName:"ColumnFlex",version:E,beans:[NF]},ma={moduleName:"ColumnApi",version:E,beans:[BF],apiFunctions:{getColumnDef:mF,getDisplayNameForColumn:vF,getColumn:wF,getColumns:SF,applyColumnState:bF,getColumnState:yF,resetColumnState:RF,isPinning:EF,isPinningLeft:xF,isPinningRight:FF,getDisplayedColAfter:PF,getDisplayedColBefore:DF,setColumnsVisible:MF,setColumnsPinned:TF,getAllGridColumns:AF,getDisplayedLeftColumns:IF,getDisplayedCenterColumns:kF,getDisplayedRightColumns:LF,getAllDisplayedColumns:VF,getAllDisplayedVirtualColumns:HF,getColumnDefs:CF}};import{_camelCaseToHumanText as t6}from"ag-stack";var i6=class extends y{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const o=this.getHeaderName(e.colDef,e,null,null,t),s=this.beans.aggColNameSvc;return i&&s?s.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,i,o=t?.colGroupDef){return o?this.getHeaderName(o,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.providedColumnGroup,t)}getHeaderName(e,t,i,o,s){const r=o?this.beans.colModel.groupHeaderNameOverrides.get(o.groupId)??null:null,n=t?.headerNameOverride??r;if(n!=null)return n;const l=e.headerValueGetter;if(l){const a=G(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:o,location:s});return typeof l=="function"?l(a):typeof l=="string"?this.beans.expressionSvc?.evaluate(l,a)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return t6(e.field)}return""}};import{_areEqual as Ca,_isRealCssEngine as o6}from"ag-stack";var s6=class extends y{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.extractedLayoutVersion=-1,this.extractedGroupVersion=-1,this.headerRowsVersion=0,this.rowsOfHeadersToRenderLeft=[],this.rowsOfHeadersToRenderRight=[],this.rowsOfHeadersToRenderCenter=[],this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[],this.viewportLeft=0,this.viewportRight=0,this.inRowViewport=e=>this.isColumnInRowViewport(e),this.emptySpaceBeforeColumn=e=>{const t=e.getLeft();return t!=null&&t>this.viewportLeft}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.colGroupSvc=e.colGroupSvc}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,i=!1){e===this.scrollWidth&&t===this.scrollPosition&&this.visibleCols.layoutVersion===this.extractedLayoutVersion||(this.scrollWidth=e,this.scrollPosition=t,this.viewportLeft=t,this.viewportRight=e+t,this.colModel.ready&&this.checkViewportColumns(i))}getColumnHeadersToRender(e){return e===0?this.columnsToRenderLeft:e===2?this.columnsToRenderRight:this.columnsToRenderCenter}getHeadersToRender(e,t){return e===0?this.rowsOfHeadersToRenderLeft[t]:e===2?this.rowsOfHeadersToRenderRight[t]:this.rowsOfHeadersToRenderCenter[t]}extractViewportColumns(){const e=this.visibleCols.centerCols;if(this.isColumnVirtualisationSuppressed()){this.colsWithinViewport=e,this.headerColsWithinViewport=e;return}const t=[];let i=null;for(let o=0,s=e.length;o<s;++o){const r=e[o];this.isColumnInRowViewport(r)?(t.push(r),i?.push(r)):n6(r)&&(i??(i=t.slice()),i.push(r))}this.colsWithinViewport=t,this.headerColsWithinViewport=i??t}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0&&!o6()}clear(){this.rowsOfHeadersToRenderLeft=[],this.rowsOfHeadersToRenderRight=[],this.rowsOfHeadersToRenderCenter=[],this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[],this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.extractedLayoutVersion=-1,this.extractedGroupVersion=-1}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0;return t+e.getActualWidth()>=this.viewportLeft-200&&t<=this.viewportRight+200}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e,t)}getColsWithinViewport(e,t){if(this.visibleCols.colSpanColCount===0)return this.colsWithinViewport;const i=this.isColumnVirtualisationSuppressed()?null:this.inRowViewport;return Ag(e,this.visibleCols.centerCols,t,i,this.emptySpaceBeforeColumn)}checkViewportColumns(e=!1){const{leftCols:t,rightCols:i,layoutVersion:o}=this.visibleCols,s=this.colGroupSvc?.groupVersion??0;this.extractViewportColumns(),this.extractedLayoutVersion=o;const r=!Ca(this.columnsToRenderCenter,this.colsWithinViewport)||!Ca(this.columnsToRenderLeft,t)||!Ca(this.columnsToRenderRight,i);(r||s!==this.extractedGroupVersion)&&(this.extractedGroupVersion=s,this.calculateHeaderRows()),r&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport,this.rowsOfHeadersToRenderLeft=va(e),this.rowsOfHeadersToRenderRight=va(t),this.rowsOfHeadersToRenderCenter=va(this.headerColsWithinViewport),++this.headerRowsVersion}},Us=new Set,r6=(e,t,i)=>{for(;e;){if(Us.has(e))return;if(t&&e.isPadding()){e=e.parent;continue}const o=e.getProvidedColumnGroup().getLevel(),s=i[o];s?s.push(e):i[o]=[e],Us.add(e),e=e.parent}},va=e=>{Us.clear();const t=[];let i=null,o=!1;for(let s=0,r=e.length;s<r;++s){const n=e[s],l=n.parent,a=n.isSpanHeaderHeight();(l!==i||a!==o)&&(i=l,o=a,r6(l,a,t))}return Us.clear(),t},n6=e=>{for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.parent}return!1},Df=class{constructor(){this.existingIds=Object.create(null)}getInstanceIdForKey(e){const t=(this.existingIds[e]??-1)+1;return this.existingIds[e]=t,t}},l6=class extends y{constructor(){super(...arguments),this.beanName="visibleCols",this.lastFlexIndex=-1,this.treeLeft=[],this.treeRight=[],this.treeCenter=[],this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.autoHeightCols=[],this.colSpanColCount=0,this.rowSpanCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.totalWidth=0,this.layoutVersion=0,this.cellsMoved=!1,this.pendingLayoutSource=null,this.displayedColsVersion=0,this.lastLeftPinnedCol=null,this.firstRightPinnedCol=null}wireBeans(e){this.colModel=e.colModel,this.colGroupSvc=e.colGroupSvc,this.colViewport=e.colViewport,this.ctrlsSvc=e.ctrlsSvc,this.colFlex=e.colFlex,this.colFilter=e.colFilter,this.rowRenderer=e.rowRenderer,this.rowAutoHeight=e.rowAutoHeight}refresh(e,t){const{colFlex:i,colModel:o,colViewport:s,ctrlsSvc:r}=this;t||this.buildTrees();const n=this.treeLeft,l=this.treeCenter,a=this.treeRight;let d,c,u;if(o.colsTreeDepth===0)d=n,c=l,u=a;else{d=[],c=[],u=[];for(let f=0,m=n.length;f<m;++f)wo(n[f],null,d);for(let f=0,m=l.length;f<m;++f)wo(l[f],null,c);for(let f=0,m=a.length;f<m;++f)wo(a[f],null,u)}this.leftCols=d,this.centerCols=c,this.rightCols=u;const h=this.joinCols();this.setLeftValuesOfGroups(),this.setPinnedEdges(d,u);const g=this.lastFlexIndex>=0||i?.columnsHidden;let p;if(g){const f=r?.getGridBodyCtrl()?.getViewportWidthWithoutScrollbar();let m;if(f!=null){const w=f-h.left-h.right;m={viewportWidth:w>0?w:0}}p=i?.refreshFlexedColumns(m)}return this.cellsMoved=!0,this.layoutBodyWidths(g?void 0:h),s.checkViewportColumns(!1),this.rowAutoHeight?.requestCheckAutoHeight(),this.colFilter?.refreshRedefinedFilters(),this.dispatchLayoutEvents(e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e}),p}updateBodyWidths(e,t){this.layoutBodyWidths(t),this.dispatchLayoutEvents(e)}layoutBodyWidths(e){++this.layoutVersion;const t=e?e.center:vt(this.centerCols),i=e?e.left:vt(this.leftCols),o=e?e.right:vt(this.rightCols);if(this.bodyWidth===t&&this.leftWidth===i&&this.rightWidth===o){this.cellsMoved&&(this.cellsMoved=!1,this.refreshCellPositions());return}this.bodyWidth=t,this.leftWidth=i,this.rightWidth=o,this.totalWidth=t+i+o,this.cellsMoved=!1,this.refreshCellPositions();const s=this.eventSvc;s.dispatchEvent({type:"columnContainerWidthChanged"}),s.dispatchEvent({type:"displayedColumnsWidthChanged"})}refreshCellPositions(){this.rowRenderer.refreshCellPositions(),this.ctrlsSvc.getHeaderRowContainerCtrl()?.refreshCellPositions()}dispatchLayoutEvents(e){this.colModel.colUpdateDepth===0?this.raiseLayoutEvents(e):this.pendingLayoutSource??(this.pendingLayoutSource=e)}raiseDeferredLayoutEvents(){const e=this.pendingLayoutSource;e!==null&&(this.pendingLayoutSource=null,this.raiseLayoutEvents(e))}raiseLayoutEvents(e){const t=this.colModel;Mf(t.colsList,e),t.showingPivotResult&&Mf(t.colDefList,e),t.colsTreeDepth!==0&&(Sa(this.treeLeft),Sa(this.treeCenter),Sa(this.treeRight))}setLeftValues(){const e=this.setLeftsLeftToRight(this.leftCols),t=this.setLeftsLeftToRight(this.rightCols),i=this.setLeftsLeftToRight(this.centerCols);return this.setLeftValuesOfGroups(),{left:e,center:i,right:t}}setLeftValuesOfGroups(){this.colModel.colsTreeDepth!==0&&(wa(this.treeLeft),wa(this.treeRight),wa(this.treeCenter))}setPinnedEdges(e,t){const i=this.gos.get("enableRtl"),o=e.length;let s=null;o&&(s=i?e[0]:e[o-1]);let r=null;const n=t.length;n&&(r=i?t[n-1]:t[0]);const l=this.lastLeftPinnedCol,a=l!==s;a&&(l?.setLastLeftPinned(!1),s?.setLastLeftPinned(!0),this.lastLeftPinnedCol=s);const d=this.firstRightPinnedCol,c=d!==r;if(c&&(d?.setFirstRightPinned(!1),r?.setFirstRightPinned(!0),this.firstRightPinnedCol=r),a||c){const u=a?l:null,h=a?s:null,g=c?d:null,p=c?r:null;this.rowRenderer.refreshPinnedEdgeCells(u,h,g,p),this.ctrlsSvc.getHeaderRowContainerCtrl()?.refreshPinnedEdgeCells(u,h,g,p)}}buildTrees(){const{colModel:e,colGroupSvc:t}=this,{leftCols:i,rightCols:o,centerCols:s,leftCount:r,centerCount:n}=this.partitionVisibleCols();this.stampAriaColIndexes(r,n);const l=new Df;if(t){const a=e.nextBuildToken();this.treeLeft=t.createGroups(i,l,"left",a),this.treeRight=t.createGroups(o,l,"right",a),this.treeCenter=t.createGroups(s,l,null,a),t.prune(a)}else this.treeLeft=i,this.treeRight=o,this.treeCenter=s}partitionVisibleCols(){const e=this.colModel,t=[],i=[],o=[];let s=0,r=0;if(!e.ready)return{leftCols:t,rightCols:i,centerCols:o,leftCount:s,centerCount:r};const n=this.beans,l=e.pivotMode&&!e.showingPivotResult,a=n.selectionColSvc?.isEnabled()??!1,d=qc(n),c=Kc(this.gos),u=e.colsList;let h=null,g=!1;for(let p=0,f=u.length;p<f;++p){const m=u[p],w=m.colKind,v=m.pinnedLane;v!==2&&(v===0?++s:++r);const S=w==="auto-group";let C;if(l?C=m.aggregationActive||S&&(!c||m.visible)||a&&w==="selection"||d&&w==="row-number":C=S&&!c||m.visible,!!C){if(w==="selection"&&m.visible&&!g){h=m;continue}if(w!=="selection"&&w!=="row-number"&&(g=!0),h!==null&&w!=="row-number"){const b=h.pinnedLane;b===2?i.push(h):b===0?t.push(h):o.push(h),h=null}v===2?i.push(m):v===0?t.push(m):o.push(m)}}return{leftCols:t,rightCols:i,centerCols:o,leftCount:s,centerCount:r}}clear(){const e=this.allCols;for(let t=0,i=e.length;t<i;++t){const o=e[t];o.allColsIndex=-1,o.colSpanIndex=-1,o.displayed=!1,o.left=null}this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.lastFlexIndex=-1,++this.displayedColsVersion,this.autoHeightCols.length=0,this.colSpanColCount=0,this.rowSpanCols.length=0}stampAriaColIndexes(e,t){const i=this.colModel.colsList;let o=1,s=e+1,r=e+t+1;for(let n=0,l=i.length;n<l;++n){const a=i[n],d=a.pinnedLane;d===2?a.ariaColIndex=r++:d===0?a.ariaColIndex=o++:a.ariaColIndex=s++}}joinCols(){const{leftCols:e,centerCols:t,rightCols:i}=this,o=this.allCols;for(let d=0,c=o.length;d<c;++d){const u=o[d];u.allColsIndex=-1,u.colSpanIndex=-1,u.displayed=!1,u.left=null}const s=[];this.autoHeightCols.length=0,this.colSpanColCount=0,this.rowSpanCols.length=0,this.lastFlexIndex=-1;const r=!!this.gos.get("hidePaddedHeaderRows");this.headerGroupRowCount=r?0:this.colModel.colsTreeDepth;let n,l,a;return this.gos.get("enableRtl")?(a=this.layoutSection(i,s,r),l=this.layoutSection(t,s,r),n=this.layoutSection(e,s,r)):(n=this.layoutSection(e,s,r),l=this.layoutSection(t,s,r),a=this.layoutSection(i,s,r)),this.allCols=s,++this.displayedColsVersion,{left:n,center:l,right:a}}layoutSection(e,t,i){const{autoHeightCols:o,rowSpanCols:s}=this;let r=0,n=null;for(let l=0,a=e.length;l<a;++l){const d=e[l];if(d.allColsIndex=t.length,d.displayed=!0,d.oldLeft=d.reportedLeft,d.left=r,t.push(d),d.colDef.autoHeight&&o.push(d),d.colSpan!=null?(d.colSpanIndex=this.colSpanColCount,++this.colSpanColCount):d.colSpanIndex=-1,d.rowSpan!=null&&s.push(d),d.pinned==null){const c=d.flex;c!=null&&c>0&&(this.lastFlexIndex=d.allColsIndex)}if(i){const c=d.parent;if(c!==null&&c!==n){n=c;const u=a6(c);u>this.headerGroupRowCount&&(this.headerGroupRowCount=u)}}r+=d.actualWidth}return r}setLeftsLeftToRight(e){let t=0,i=!1;for(let o=0,s=e.length;o<s;++o){const r=e[o];i||(i=r.left!==t),r.oldLeft=r.reportedLeft,r.left=t,t+=r.actualWidth}return this.cellsMoved||(this.cellsMoved=i),t}getColBefore(e){const t=e.allColsIndex;return t>0?this.allCols[t-1]:null}getColAfter(e){const t=this.allCols,i=e.allColsIndex;return i<t.length-1?t[i+1]:null}getLeftStickyColumnContainerWidth(){return this.leftCols.length?vt(this.leftCols):this.leftWidth}getRightStickyColumnContainerWidth(){return this.rightCols.length?vt(this.rightCols):this.rightWidth}isColAtEdge(e,t){const i=this.allCols,o=i.length;if(!o)return!1;const s=t==="first",r=Me(e)?Wt(e,!0,!s):e;return r?(s?i[0]:i[o-1])===r:!1}},wo=(e,t,i)=>{if(e.isColumn){i.push(e);return}const o=e.isPadding()?t:e,s=o?.providedColumnGroup??null,r=s?.expandable,n=e.displayedChildren,l=n?.length??0;let a=null,d=0;const c=e.children;if(c!==null){const u=r&&s.expanded;for(let h=0,g=c.length;h<g;++h){const p=c[h];if(r){const f=p.getColumnGroupShow();if(f==="open"&&!u||f==="closed"&&u)continue;const m=i.length;if(wo(p,o,i),i.length===m)continue}else wo(p,o,i);a!==null?a.push(p):(d>=l||n[d]!==p)&&(n===null?a=[p]:(a=n.slice(0,d),a.push(p))),++d}}(a!==null||d!==l)&&(e.displayedChildren=a??n.slice(0,d))},a6=e=>{let t=e;for(;t;){const i=t.providedColumnGroup;if(!i.padding)return i.level+1;t=t.parent}return 0},Mf=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i];s.isAlive()&&s.dispatchLayoutEvents(t)}},wa=e=>{for(let t=0,i=e.length;t<i;++t){const o=e[t];Me(o)&&o.setLeftFromChildren()}},Sa=e=>{for(let t=0,i=e.length;t<i;++t){const o=e[t];Me(o)&&o.dispatchLayoutEvents()}};import{_loadTemplate as d6}from"ag-stack";var c6=class extends y{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.supportsJsFunction)return null;class i{refresh(){return!1}getGui(){return this.eGui}init(s){const r=t(s),n=typeof r;if(n==="string"||n==="number"||n==="boolean"){this.eGui=d6("<span>"+r+"</span>");return}if(r==null){this.eGui=O({tag:"span"});return}this.eGui=r}}return i}},u6={moduleName:"CellRendererFunction",version:E,beans:[c6]};import{BaseRegistry as h6}from"ag-stack";function g6(e){return typeof e=="object"&&!!e.getComp}var p6=class extends N1{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:i,dynamicBeans:o,selectors:s}=e;if(i){const r=(n,l,a,d)=>{this.agGridDefaults[n]=l,(a||d)&&(this.agGridDefaultOverrides[n]={params:a,processParams:d})};for(const n of Object.keys(i)){let l=i[n];if(g6(l)&&(l=l.getComp(this.beans)),typeof l=="object"){const{classImp:a,params:d,processParams:c}=l;r(n,a,d,c)}else r(n,l)}}this.registerDynamicBeans(o);for(const r of s??[])this.selectors[r.selector]=r;if(t)for(const r of Object.keys(t))this.icons[r]=t[r]}getUserComponent(e,t){const i=(l,a,d,c)=>({componentFromFramework:a,component:l,params:d,processParams:c}),{frameworkOverrides:o}=this.beans,s=o.frameworkComponent(t,this.gos.get("components"),e);if(s!=null)return i(s,!0);const r=this.jsComps[t];if(r){const l=o.isFrameworkComponent(r);return i(r,l)}const n=this.agGridDefaults[t];if(n){const l=this.agGridDefaultOverrides[t];return i(n,!1,l?.params,l?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}hasUserComponent(e,t){return this.jsComps[t]||this.agGridDefaults[t]||this.beans.frameworkOverrides.frameworkComponent(t,this.gos.get("components"),e)!=null?!0:(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),!1)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}createDynamicError(e,t){const i=this.beans.context.getId();return t?Hs(i,279,{name:e}):this.beans.validation?.missingDynamicBean(e)??Hs(i,256)}};import{AgPromise as f6}from"ag-stack";function m6(e){return e?e.prototype&&"getGui"in e.prototype:!1}function C6(e,t,i,o){const{name:s}=i;let r,n,l,a,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(o):null,p=f=>{typeof f=="string"?r=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?l=f:n=f)};g?(p(g.component),a=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:r,jsComp:n,fwComp:l,paramsFromSelector:a,popupFromSelector:d,popupPositionFromSelector:c}}var v6=class extends y{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.frameworkCompWrapper?.setGridId?.(e.context.getId()),this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,i,o=!1){return this.getCompDetails(this.gridOptions,e,t,i,o)}getCompDetails(e,t,i,o,s=!1){const{name:r,supportsJsFunction:n}=t;let{compName:l,jsComp:a,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=C6(this.beans.frameworkOverrides,e,t,o),g,p;const f=S=>{const C=this.registry.getUserComponent(r,S);C&&(a=C.componentFromFramework?void 0:C.component,d=C.componentFromFramework?C.component:void 0,g=C.params,p=C.processParams)};if(l!=null&&f(l),a==null&&d==null&&i!=null&&f(i),a&&n&&!m6(a)&&(a=this.agCompUtils?.adaptFunction(t,a)),!a&&!d){const{validation:S}=this.beans;s&&(l!==i||!i)?l?S?.isProvidedUserComp(l)||this.error(50,{compName:l}):i?S||this.error(260,{...this.gos.getModuleErrorParams(),propName:r,compName:i}):this.error(216,{name:r}):i&&!S&&this.error(146,{comp:i});return}const m=this.mergeParams(e,t,o,c,g,p),w=a==null,v=a??d;return{componentFromFramework:w,componentClass:v,params:m,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(v,w,m,t)}}newAgStackInstance(e,t,i,o){const s=!t;let r;s?r=new e:r=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(r);const n=r.init?.(i);return n==null?f6.resolve(r):n.then(()=>r)}mergeParams(e,t,i,o=null,s,r){const n={...i,...s},a=e?.[t.name+"Params"];if(typeof a=="function"){const d=a(i);he(n,d)}else typeof a=="object"&&he(n,a);return he(n,o),r?r(n,this.beans):n}},Tf=["gridCtrl","gridBodyCtrl",...wl,"fakeHScrollComp","fakeVScrollComp","gridHeaderCtrl","headerRowContainerCtrl"],w6=class extends y{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=this.params;for(let t=0,i=Tf.length;t<i;++t)if(!e[Tf[t]]?.isAlive()){this.ready=!1;return}this.ready=!0}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const i=this.readyCallbacks.indexOf(t);i>=0&&this.readyCallbacks.splice(i,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrl(){return this.params.headerRowContainerCtrl}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}};import{BaseEnvironment as S6}from"ag-stack";var b6='.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}:where(.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible))>.ag-body-horizontal-scroll-viewport,:where(.ag-body-vertical-scroll:not(.ag-scrollbar-invisible))>.ag-body-vertical-scroll-viewport{background-color:var(--ag-data-background-color)}:where(.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible))>.ag-body-horizontal-scroll-end-spacer,:where(.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible))>.ag-body-horizontal-scroll-viewport{border-top:var(--ag-body-scrollbar-border)}.ag-scrollbar-probe,:where(.ag-body-vertical-scroll:not(.ag-scrollbar-invisible))>.ag-body-vertical-scroll-viewport{border-inline-start:var(--ag-body-scrollbar-border)}.ag-viewport{position:relative}.ag-grid-viewport{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;position:relative;-webkit-overflow-scrolling:touch;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-grid-viewport:where(.ag-pinned-columns-overflow){overflow-x:hidden}.ag-grid-viewport::-webkit-scrollbar{display:none!important}.ag-grid-scrollable-area{display:flex;flex-direction:column;min-height:100%;min-width:100%;position:relative}.ag-spanning-container{height:100%;pointer-events:none;position:absolute;top:0}.ag-grid-scrolling-container{display:block;isolation:isolate;min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll;pointer-events:all}.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-grid-scrolling-container{position:relative}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-full-width-anchor{height:100%;position:sticky;width:var(--ag-internal-grid-viewport-width,100%)}:where(.ag-ltr) .ag-full-width-anchor{left:0}:where(.ag-rtl) .ag-full-width-anchor{right:0}.ag-grid-scrolling-rows{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;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;z-index:2;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{flex:none;width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-horizontal-scroll-end-spacer{flex:0 0 auto;min-width:0;overflow:scroll}.ag-body-vertical-scroll{flex-direction:column;pointer-events:none;position:absolute;top:0;z-index:2}:where(.ag-ltr) .ag-body-vertical-scroll{right:0}:where(.ag-rtl) .ag-body-vertical-scroll{left:0}.ag-body-vertical-scroll-start-spacer{border-bottom:var(--ag-header-row-border);flex:none;opacity:0}:where(.ag-ltr .ag-has-right-pinned-cols),:where(.ag-rtl .ag-has-left-pinned-cols){.ag-body-vertical-scroll-start-spacer{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-header-background-color),var(--ag-header-background-color));opacity:1;pointer-events:all}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-header-row,.ag-row:where(:not(.ag-full-width-row)),.ag-spanned-row,:where(.ag-row.ag-embedded-full-width-row){display:flex;width:100%}:where(.ag-header-row):after,:where(.ag-row.ag-embedded-full-width-row:after),:where(.ag-row:not(.ag-full-width-row)):after,:where(.ag-spanned-row):after{align-self:stretch;content:"";flex:1 0 0px}:where(.ag-row.ag-embedded-full-width-row:after),:where(.ag-row:not(.ag-header-row,.ag-full-width-row)):after{background-color:var(--ag-data-background-color)}:where(.ag-header-row):after{background-color:var(--ag-header-background-color)}.ag-header{border-bottom:var(--ag-header-row-border);left:0;position:absolute;right:0;top:0;z-index:1}.ag-grid-pinned-left-cells,.ag-grid-pinned-right-cells,.ag-grid-scrolling-cells{height:100%;position:relative;white-space:nowrap}.ag-grid-scrolling-cells{flex:0 0 auto;z-index:0}:where(.ag-row.ag-embedded-full-width-row)>.ag-grid-scrolling-cells{flex:1 0 auto;margin-right:var(--ag-internal-pinned-right-sticky-offset,0)}.ag-grid-pinned-left-cells,.ag-grid-pinned-right-cells{flex:0 0 auto;overflow:hidden;position:sticky;z-index:2}.ag-grid-pinned-left-cells{left:var(--ag-internal-pinned-left-sticky-offset,0)}.ag-grid-pinned-right-cells{right:var(--ag-internal-pinned-right-sticky-offset,0)}:where(.ag-header-row),:where(.ag-row.ag-embedded-full-width-row),:where(.ag-row:not(.ag-full-width-row)),:where(.ag-spanned-row){>.ag-grid-pinned-right-cells{order:1}}.ag-rtl{:where(.ag-header-row),:where(.ag-row.ag-embedded-full-width-row),:where(.ag-row:not(.ag-full-width-row)),:where(.ag-spanned-row){>:where(.ag-grid-scrolling-cells){order:1}}:where(.ag-row .ag-grid-scrolling-cells),:where(.ag-spanned-row .ag-grid-scrolling-cells){margin-left:var(--ag-internal-pinned-left-sticky-offset,0)}}.ag-spanning-container .ag-grid-scrolling-cells{z-index:1}.ag-spanning-container .ag-grid-pinned-left-cells,.ag-spanning-container .ag-grid-pinned-right-cells{overflow:visible;z-index:3}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:4}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-spanning-container .ag-cell{pointer-events:auto}.ag-cell-value{flex:1 1 auto}.ag-cell-value:where(:not(.ag-allow-overflow)),.ag-group-value{overflow:hidden;text-overflow:ellipsis;:where(.ag-selectable) &{min-width:0;overflow:clip}}.ag-cell-wrap-text{overflow-wrap:break-word;white-space:normal}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-grid-pinned-bottom-rows,.ag-grid-pinned-top-rows{background-color:var(--ag-data-background-color);position:sticky;width:100%;z-index:2}.ag-grid-pinned-top-rows{top:0;white-space:nowrap}.ag-grid-pinned-bottom-rows{border-bottom:none;bottom:0;box-sizing:content-box!important;white-space:nowrap}.ag-grid-pinned-bottom-rows-container,.ag-grid-pinned-top-rows-container,.ag-grid-sticky-bottom-rows-container,.ag-grid-sticky-top-rows-container{background-color:var(--ag-data-background-color);overflow:visible;position:absolute;white-space:nowrap;width:100%}.ag-grid-pinned-top-rows-container{border-bottom:var(--ag-pinned-row-border);display:flex;z-index:1}.ag-grid-pinned-bottom-rows-container{border-top:var(--ag-pinned-row-border);display:flex}.ag-extra-rows-container{position:absolute;width:100%}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-grid-pinned-bottom-rows,.ag-grid-pinned-bottom-rows-container,.ag-grid-pinned-top-rows,.ag-grid-pinned-top-rows-container,.ag-grid-scrolling-rows,.ag-grid-sticky-bottom-rows-container,.ag-grid-sticky-top-rows-container{flex-direction:row}.ag-header-row,.ag-row:where(.ag-embedded-full-width-row),.ag-row:where(:not(.ag-full-width-row)),.ag-spanned-row{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-grid-pinned-bottom-rows,.ag-grid-pinned-bottom-rows-container,.ag-grid-pinned-top-rows,.ag-grid-pinned-top-rows-container,.ag-grid-scrolling-rows,.ag-grid-sticky-bottom-rows-container,.ag-grid-sticky-top-rows-container{flex-direction:row-reverse}.ag-header-row,.ag-row:where(.ag-embedded-full-width-row),.ag-row:where(:not(.ag-full-width-row)),.ag-spanned-row{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-show-values-as-inapplicable{opacity:.5}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s var(--ag-internal-accessible-color-transition-mode)}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s var(--ag-internal-accessible-color-transition-mode);@media (forced-colors:active){background-color:Mark;color:MarkText}}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}.ag-row.ag-full-width-row:not(.ag-embedded-full-width-row){border-bottom:var(--ag-row-border)}.ag-row:where(.ag-embedded-full-width-row),.ag-row:where(:not(.ag-header-row,.ag-full-width-row)){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:var(--ag-row-border)}}:where(.ag-grid-pinned-bottom-rows-container){.ag-row-last:where(.ag-embedded-full-width-row),.ag-row-last:where(:not(.ag-header-row,.ag-full-width-row)){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:none}}}:where(.ag-grid-sticky-bottom-rows-container){.ag-row:where(.ag-embedded-full-width-row),.ag-row:where(:not(.ag-header-row,.ag-full-width-row)){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:none;border-top:var(--ag-row-border)}}}:where(.ag-row:not(.ag-header-row)){background-color:var(--ag-data-background-color);--ag-internal-row-overlay-color:transparent;--ag-internal-row-overlay-image:none}.ag-grid-container-wrapper{height:100%;width:100%}.ag-row:not(.ag-header-row){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells{background-color:inherit;background-image:linear-gradient(var(--ag-data-background-color),var(--ag-data-background-color))}>.ag-grid-pinned-left-cells>.ag-grid-container-wrapper,>.ag-grid-pinned-right-cells>.ag-grid-container-wrapper{background-color:inherit}}.ag-body-vertical-content-no-gap .ag-has-bottom-pinned-rows{.ag-grid-pinned-bottom-rows .ag-grid-sticky-bottom-rows-container .ag-row-last,.ag-grid-scrolling-container .ag-row-last{>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:none}}}.ag-grid-scrollable-area.ag-has-top-pinned-rows .ag-grid-pinned-top-rows>.ag-grid-pinned-top-rows-container>.ag-row.ag-row-last{>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom:none}}.ag-body-vertical-content-no-gap>.ag-grid-viewport>.ag-grid-scrollable-area>.ag-grid-scrolling-rows>.ag-grid-scrolling-container>.ag-row-last.ag-full-width-row{border-bottom-color:transparent}.ag-body-vertical-content-no-gap>.ag-grid-viewport>.ag-grid-scrollable-area>.ag-grid-scrolling-rows>.ag-grid-scrolling-container>.ag-row-last:not(.ag-full-width-row){>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells,>.ag-grid-scrolling-cells{border-bottom-color:transparent}}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased;@media (forced-colors:active){border-bottom-color:Canvas;border-left-color:Canvas;border-right-color:Canvas;border-top-color:Canvas;--ag-value-change-value-highlight-background-color:Mark;--ag-range-selection-highlight-color:Mark}}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial;@media (forced-colors:active){outline:2px solid var(--ag-internal-forced-colors-cell-focus-outline-color,Highlight);outline-offset:-2px}}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-full-width-row:not(.ag-embedded-full-width-row):after,.ag-grid-pinned-left-cells:after,.ag-grid-pinned-right-cells:after,.ag-grid-scrolling-cells:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:var(--ag-internal-row-highlight-content,none);height:var(--ag-row-drag-indicator-width);inset:var(--ag-internal-row-highlight-inset,auto);inset-inline-start:anchor(--ag-internal-row-highlight-label start,0);pointer-events:none;position:absolute}.ag-root-wrapper{--ag-internal-row-highlight-content:initial;--ag-internal-row-highlight-anchor:initial;anchor-scope:--ag-internal-row-highlight-label}.ag-row-highlight-above{--ag-internal-row-highlight-content:"";--ag-internal-row-highlight-inset:0 0 auto}.ag-row-highlight-below{--ag-internal-row-highlight-content:"";--ag-internal-row-highlight-inset:auto 0 0}.ag-row-highlight-indent{--ag-internal-row-highlight-anchor:--ag-internal-row-highlight-label}:where(.ag-group-cell-all-levels)>.ag-group-value{anchor-name:var(--ag-internal-row-highlight-anchor,none)}.ag-row-highlight-inside{&.ag-full-width-row:not(.ag-embedded-full-width-row):after,>.ag-grid-pinned-left-cells:after,>.ag-grid-pinned-right-cells:after,>.ag-grid-scrolling-cells:after{--ag-internal-row-highlight-content:"";background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);border-radius:0;height:auto;inset:0}}.ag-grid-pinned-bottom-rows-container,.ag-grid-scrolling-rows{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-hover:not(.ag-full-width-row),.ag-row-selected{.ag-grid-pinned-left-cells:before,.ag-grid-pinned-right-cells:before,.ag-grid-scrolling-cells:before{background-color:var(--ag-internal-row-overlay-color);background-image:var(--ag-internal-row-overlay-image);content:"";display:block;inset:0;pointer-events:none;position:absolute}}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-selected.ag-full-width-row:before{background-color:var(--ag-internal-row-overlay-color);background-image:var(--ag-internal-row-overlay-image);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row.ag-row-selected{--ag-internal-row-overlay-color:var(--ag-selected-row-background-color)}.ag-row-hover.ag-full-width-row.ag-row-group,.ag-row-hover:not(.ag-full-width-row){--ag-internal-row-overlay-color:var(--ag-row-hover-color)}.ag-row-hover.ag-row-selected{--ag-internal-row-overlay-color:var(--ag-row-hover-color);--ag-internal-row-overlay-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}@media (forced-colors:active){.ag-row.ag-row-selected{--ag-internal-row-overlay-color:SelectedItem}}:where(.ag-cell).ag-column-hover{background-color:var(--ag-column-hover-color);--ag-internal-column-hover-image:linear-gradient(var(--ag-column-hover-color),var(--ag-column-hover-color))}:where(.ag-header-cell).ag-column-hover{background-image:linear-gradient(var(--ag-column-header-hover-color),var(--ag-column-header-hover-color))}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-grid-scrolling-rows{min-height:var(--ag-auto-height-min-body-height)}}.ag-grid-viewport{--ag-internal-header-rows-height:0px;--ag-internal-top-rows-height:0px;--ag-internal-bottom-rows-height:0px}.ag-grid-viewport.ag-layout-auto-height{max-height:calc(var(--ag-auto-height-max-body-height) + var(--ag-internal-header-rows-height) + var(--ag-internal-top-rows-height) + var(--ag-internal-bottom-rows-height))}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%;@media (prefers-reduced-motion:no-preference){animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite}@media (forced-colors:active){animation-name:ag-skeleton-loading-forced-colors;background-color:CanvasText;opacity:.3}}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}@keyframes ag-skeleton-loading-forced-colors{0%{opacity:.3}50%{opacity:.12}to{opacity:.3}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{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)}.ag-header-row{border-bottom:none;height:var(--ag-header-height);position:absolute;.ag-grid-scrolling-cells{background-color:var(--ag-header-background-color)}>.ag-grid-pinned-left-cells,>.ag-grid-pinned-right-cells{background-image:linear-gradient(var(--ag-background-color),var(--ag-background-color))}.ag-grid-container-wrapper{background-color:var(--ag-header-background-color);height:100%;width:100%}.ag-grid-pinned-left-cells,.ag-grid-pinned-right-cells{overflow:visible}}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}:where(.ag-header-row.ag-header-row-not-first){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:visible}:where(.ag-grid-pinned-top-rows-container.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{overflow-wrap:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-calculated-column-icon,.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-calculated-column-icon,.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-show-values-as-dormant{opacity:.35}.ag-header-cell:after,.ag-header-group-cell:after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1;@media (forced-colors:active){height:100%;top:0}}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:after{border-right:var(--ag-header-column-border);right:0;@media (forced-colors:active){border-right-color:currentcolor;border-right-style:solid;border-right-width:1px}}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:after{border-left:var(--ag-header-column-border);left:0;@media (forced-colors:active){border-left-color:currentcolor;border-left-style:solid;border-left-width:1px}}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap){.ag-header-cell:where(.ag-column-last):after,.ag-header-group-cell:where(.ag-column-last):after{border-right-color:transparent}}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap){.ag-header-cell:where(.ag-column-last):after,.ag-header-group-cell:where(.ag-column-last):after{border-left-color:transparent}}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-grid-pinned-left-cells) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-grid-pinned-left-cells) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:col-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-grid-scrolling-rows{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}.ag-full-width-anchor,.ag-grid-scrollable-area,.ag-grid-scrolling-container,.ag-header-row{width:auto!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-grid-scrolling-container,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{background-color:var(--ag-wrapper-background-color);border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-has-menu-open,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px;@media (forced-colors:active){background-color:CanvasText}}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}';import{accentColor as Yt,accentMix as ba,backgroundColor as So,createPart as Af,defaultFontFamily as If,foregroundBackgroundMix as He,foregroundColor as mi,foregroundMix as nt}from"ag-stack";import{createSharedTheme as y6}from"ag-stack";import{accentColor as Ci,accentMix as Pt,backgroundColor as bo,foregroundColor as qs,foregroundHeaderBackgroundMix as R6,foregroundMix as lt}from"ag-stack";var kf={wrapperBorder:!0,bodyScrollbarBorder:!1,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},grandTotalRowBorder:!1,columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:bo,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Ci,rangeSelectionBackgroundColor:Pt(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Pt(.5),rangeHeaderHighlightColor:R6(.08),calculatedColumnHighlightColor:Pt(.12),columnHeaderEditHighlightColor:Pt(.12),calculatedColumnParentSuggestionColor:lt(.75),calculatedColumnSuggestionListWidth:200,calculatedColumnReferenceColor:"#3269c6",calculatedColumnFunctionColor:"#007c1f",calculatedColumnOperatorColor:{ref:"foregroundColor"},calculatedColumnErrorUnderlineColor:{ref:"invalidColor"},rowNumbersSelectedColor:Pt(.5),rowHeaderHoverColor:{ref:"rowHoverColor"},columnHoverColor:Pt(.05),columnHeaderHoverColor:{ref:"columnHoverColor"},selectedRowBackgroundColor:Pt(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:bo,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBackgroundColor:bo,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,autoHeightMinBodyHeight:150,autoHeightMaxBodyHeight:"none",rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{calc:"pickerFieldHeight + spacing * 1.25"},dragHandleColor:lt(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:lt(.1),iconButtonActiveColor:Ci,iconButtonActiveBackgroundColor:Pt(.28),iconButtonActiveIndicatorColor:Ci,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:lt(.8),cellEditingBorder:{color:Ci},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"},columnSelectIndentSize:{ref:"iconSize"},toolbarBackgroundColor:{ref:"headerBackgroundColor"},toolbarTextColor:{ref:"headerTextColor"},toolbarSeparatorBorder:!0,toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:lt(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:lt(.13)},selectCellBackgroundColor:lt(.07),selectCellBorder:{color:lt(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:bo,filterPanelApplyButtonBackgroundColor:Ci,columnPanelApplyButtonColor:bo,columnPanelApplyButtonBackgroundColor:Ci,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:qs,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:qs,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:lt(.15),statusBarLabelColor:qs,statusBarLabelFontWeight:500,statusBarValueColor:qs,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2,formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}},noteIndicatorColor:{ref:"accentColor"},noteIndicatorSize:"8px",notePopupBackgroundColor:{ref:"menuBackgroundColor"},notePopupTextColor:{ref:"menuTextColor",mix:.75},notePopupInputTextColor:{ref:"inputTextColor"},notePopupInputBackgroundColor:{ref:"inputBackgroundColor"},notePopupBorder:{ref:"dialogBorder"},notePopupPadding:{calc:"spacing * 0.5"}},E6={warn:(...e)=>{Wl(e[0],e[1])},error:(...e)=>{Ul(e[0],e[1])},preInitErr:(...e)=>{Bs(e[0],e[2],e[1])}},yo=()=>y6(E6).withParams(kf);import{accentColor as $s,backgroundColor as Ks,createPart as js,foregroundBackgroundMix as x6,foregroundColor as Lf}from"ag-stack";var Zs=":where(.ag-button){background:none;border:none;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:var(--ag-internal-accessible-no-outline,revert)}}:where(.ag-button:not(:disabled)){cursor:pointer}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding)}.ag-standard-button:hover:where(:not(:disabled)){background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}.ag-standard-button:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}.ag-standard-button:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}",Qs={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},F6=()=>js({feature:"buttonStyle",params:Qs,css:Zs}),Vf=F6(),P6=()=>js({feature:"buttonStyle",params:{...Qs,buttonBackgroundColor:Ks,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:$s}},css:Zs}),Hf=P6(),D6=()=>js({feature:"buttonStyle",params:{...Qs,buttonBackgroundColor:Ks,buttonBorder:{color:$s},buttonFontWeight:600,buttonTextColor:$s,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBackgroundColor:$s,buttonActiveTextColor:Ks},css:Zs}),Bf=D6(),M6=()=>js({feature:"buttonStyle",params:{...Qs,buttonBorder:{color:Lf,width:2,style:"outset"},buttonActiveBorder:{color:Lf,width:2,style:"inset"},buttonBackgroundColor:x6(.07),buttonHoverBackgroundColor:Ks,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:Zs}),Of=M6();import{accentColor as T6,backgroundColor as ya,createPart as A6,foregroundBackgroundMix as Gf}from"ag-stack";var I6='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size)}.ag-checkbox-input,.ag-radio-button-input{display:block;height:var(--ag-icon-size);margin:0;width:var(--ag-icon-size)}.ag-checkbox-input:where(:not(:disabled)),.ag-radio-button-input:where(:not(:disabled)){cursor:pointer}@media not (forced-colors:active){.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);-webkit-print-color-adjust:exact;print-color-adjust:exact;&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}:where(.ag-set-filter-item-missing) .ag-checkbox-input-wrapper{border-style:dashed;&:where(.ag-checked){background-color:color-mix(in srgb,var(--ag-checkbox-checked-background-color),transparent)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}}',k6=()=>A6({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ya,checkboxUncheckedBorderColor:Gf(.3),checkboxCheckedBackgroundColor:T6,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:ya,checkboxIndeterminateBackgroundColor:Gf(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:ya,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:I6}),Ro=k6();import{accentMix as Nf,backgroundColor as _f,createPart as Jt,defaultLightColorSchemeParams as vi,foregroundBackgroundMix as Eo,foregroundColor as zf}from"ag-stack";var L6=()=>Jt({feature:"colorScheme",params:vi}),V6=L6(),H6=()=>Jt({feature:"colorScheme",params:{...vi,foregroundColor:"#000000de",borderColor:"#60300026",chromeBackgroundColor:"#60300005"}}),B6=H6(),O6=()=>Jt({feature:"colorScheme",params:{...vi,foregroundColor:"#000",chromeBackgroundColor:"#f3f8f8"}}),G6=O6(),Ra=()=>({...vi,cellBatchEditTextColor:"#f3d0b3",backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Eo(.05),rowHoverColor:Nf(.15),selectedRowBackgroundColor:Nf(.2),menuBackgroundColor:Eo(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:zf,columnPanelApplyButtonColor:zf,findMatchColor:_f,findActiveMatchColor:_f,checkboxUncheckedBorderColor:Eo(.4),toggleButtonOffBackgroundColor:Eo(.4),rowBatchEditBackgroundColor:Eo(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff",calculatedColumnReferenceColor:"#4da3e5",calculatedColumnFunctionColor:"#24bb4a"}),N6=()=>Jt({feature:"colorScheme",params:Ra()}),_6=N6(),z6=()=>Jt({feature:"colorScheme",params:{backgroundColor:"hsl(29, 10%, 17%)",foregroundColor:"#FFF",browserColorScheme:"dark"}}),Wf=()=>({...Ra(),backgroundColor:"#1f2836"}),W6=z6(),U6=()=>Jt({feature:"colorScheme",params:Wf()}),q6=U6(),$6=()=>Jt({feature:"colorScheme",params:vi,modeParams:{light:vi,dark:Ra(),"dark-blue":Wf()}}),xo=$6();import{createPart as Uf}from"ag-stack";var K6=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",j6=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",Z6=()=>Uf({feature:"columnDropStyle",css:K6}),Ea=Z6(),Q6=()=>Uf({feature:"columnDropStyle",css:j6}),xa=Q6();import{createPart as Y6}from"ag-stack";var J6=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-document:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath stroke='currentColor' stroke-width='2' d='M5 28.667V3.333C5 2.597 5.597 2 6.333 2H19l8 8v18.667c0 .736-.597 1.333-1.333 1.333H6.333A1.333 1.333 0 0 1 5 28.667Z'/%3E%3Cpath stroke='currentColor' stroke-width='2' d='M27 12H17V2'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-pdf:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.29v.08H.13Zm.21-.228h.08v.308H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .66h.29v.08H.13Zm.21-.58h.08v.58H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.21v.08H.13Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-fx:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M17.251 5.705h-2.182a3 3 0 0 0-2.901 2.238l-1.1 4.19h4.077v2h-4.601L7.489 25.772A4.64 4.64 0 0 1 3 29.235v-2c1.2 0 2.25-.81 2.555-1.97l2.92-11.132H4.61v-2h4.391l1.232-4.697a5 5 0 0 1 4.836-3.73h2.182zM21.69 16.33l4.553-4.25h2.932l-6.416 5.987 4.093 6.653h-2.348l-3.237-5.261-5.636 5.26H12.7l7.496-6.997-3.471-5.643h2.348z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-values-as:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M11.763 2.75c2.63 1.519 3.196 5.464 1.263 8.812s-5.632 4.831-8.263 3.312C2.133 13.356 1.567 9.41 3.5 6.062s5.633-4.83 8.263-3.312m-.5.866c-1.196-.69-3.508 1.076-5.165 3.946s-2.03 5.756-.835 6.446c1.196.69 3.508-1.076 5.165-3.946s2.03-5.756.835-6.446M27.163 17.05c2.63 1.519 3.196 5.464 1.263 8.812s-5.632 4.831-8.263 3.312c-2.63-1.518-3.196-5.464-1.263-8.812s5.633-4.83 8.263-3.312m-.5.866c-1.196-.69-3.508 1.076-5.165 3.946s-2.03 5.756-.835 6.446c1.196.69 3.508-1.076 5.165-3.946s2.03-5.756.835-6.446M22.704 2.388l1.732 1L9.294 29.615l-1.732-1z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}.ag-icon-search:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M11 2a9 9 0 1 0 0 18 9 9 0 1 0 0-18m0 2a7 7 0 1 1 0 14 7 7 0 1 1 0-14m10.71 16.29-4.35-4.35-1.42 1.42 4.35 4.35Z'/%3E%3C/svg%3E")}`,qf=Y6({feature:"iconSet",css:J6});import{createPart as X6}from"ag-stack";var eP=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-document:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath stroke='currentColor' stroke-width='2.5' d='M5.333 28.667V3.333C5.333 2.597 5.93 2 6.667 2h12l8 8v18.667c0 .736-.597 1.333-1.334 1.333H6.667a1.333 1.333 0 0 1-1.334-1.333Z'/%3E%3Cpath stroke='currentColor' stroke-width='2.5' d='M26 12H16V2'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-pdf:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.29v.08H.13Zm.21-.228h.08v.308H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .66h.29v.08H.13Zm.21-.58h.08v.58H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.21v.08H.13Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-fx:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16.506 5.955h-2.182a2.75 2.75 0 0 0-2.659 2.052l-1.017 3.876h3.751v2.5H9.992L6.986 25.835a4.89 4.89 0 0 1-4.731 3.65v-2.5a2.39 2.39 0 0 0 2.313-1.784l2.838-10.818h-3.54v-2.5h4.196l1.184-4.51a5.25 5.25 0 0 1 5.078-3.918h2.182z'/%3E%3Cpath fill='currentColor' d='m20.997 15.938 4.135-3.859h3.665l-6.463 6.031 4.067 6.61h-2.936l-2.996-4.87-5.216 4.87h-3.664l7.543-7.041-3.446-5.6h2.936z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-values-as:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M11.763 2.75c2.63 1.519 3.196 5.464 1.263 8.812s-5.632 4.831-8.263 3.312C2.133 13.356 1.567 9.41 3.5 6.062s5.633-4.83 8.263-3.312m-.5.866c-1.196-.69-3.508 1.076-5.165 3.946s-2.03 5.756-.835 6.446c1.196.69 3.508-1.076 5.165-3.946s2.03-5.756.835-6.446M27.163 17.05c2.63 1.519 3.196 5.464 1.263 8.812s-5.632 4.831-8.263 3.312c-2.63-1.518-3.196-5.464-1.263-8.812s5.633-4.83 8.263-3.312m-.5.866c-1.196-.69-3.508 1.076-5.165 3.946s-2.03 5.756-.835 6.446c1.196.69 3.508-1.076 5.165-3.946s2.03-5.756.835-6.446M22.704 2.388l1.732 1L9.294 29.615l-1.732-1z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E")}.ag-icon-search:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M11 2a9 9 0 1 0 0 18 9 9 0 1 0 0-18m0 2a7 7 0 1 1 0 14 7 7 0 1 1 0-14m10.71 16.29-4.35-4.35-1.42 1.42 4.35 4.35Z'/%3E%3C/svg%3E")}`,$f=X6({feature:"iconSet",css:eP});import{createPart as tP}from"ag-stack";var iP=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-document:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath stroke='currentColor' stroke-miterlimit='3.994' stroke-width='2.5' d='M5.333 30V2h13.334l8 8v20z'/%3E%3Cpath stroke='currentColor' stroke-width='2.5' d='M26.5 12H16V2'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-pdf:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.29v.08H.13Zm.21-.228h.08v.308H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .66h.29v.08H.13Zm.21-.58h.08v.58H.34Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='M.05-.728h.08v.74H.05Zm.08 0h.29v.08H.13Zm0 .308h.21v.08H.13Z' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E")}.ag-icon-fx:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16.506 5.955h-2.182a2.75 2.75 0 0 0-2.659 2.052l-1.017 3.876h3.751v2.5H9.992L6.986 25.835a4.89 4.89 0 0 1-4.731 3.65v-2.5a2.39 2.39 0 0 0 2.313-1.784l2.838-10.818h-3.54v-2.5h4.196l1.184-4.51a5.25 5.25 0 0 1 5.078-3.918h2.182z'/%3E%3Cpath fill='currentColor' d='m20.997 15.938 4.135-3.859h3.665l-6.463 6.031 4.067 6.61h-2.936l-2.996-4.87-5.216 4.87h-3.664l7.543-7.041-3.446-5.6h2.936z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E")}.ag-icon-values-as:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M25.414 8 8 25.414 6.586 24 24 6.586zM10 6a4 4 0 1 1 0 8 4 4 0 0 1 0-8m0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4M22 18a4 4 0 1 1 0 8 4 4 0 0 1 0-8m0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11'/%3E%3Cpath fill='currentColor' d='M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28zM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972z'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22M3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22M12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M18.666 24h-5.333v-2.667h5.333zM24 17.333H8v-2.667h16zm3.59-9.344h3.221v2.657h-3.22v3.22h-2.656v-3.22h-3.221V7.989h3.22V4.77h2.657zm-8.582 2.678H4V8h15.008z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E")}.ag-icon-search:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M11 2a9 9 0 1 0 0 18 9 9 0 1 0 0-18m0 2a7 7 0 1 1 0 14 7 7 0 1 1 0-14m10.71 16.29-4.35-4.35-1.42 1.42 4.35 4.35Z'/%3E%3C/svg%3E")}`,Kf=tP({feature:"iconSet",css:iP});import{colorValueToCss as oP,createPart as sP,fontFamilyValueToCss as rP,fontWeightValueToCss as nP,imageValueToCss as lP}from"ag-stack";var aP=e=>{const t=[];if(e.type==="image"){const{icons:i,mask:o}=e;for(const s of Object.keys(i)){const r=lP(i[s]);o?t.push(`.ag-icon-${s}::before { mask-image: ${r}; }`):t.push(`.ag-icon-${s}::before { background-image: ${r}; ${jf} }`)}}if(e.type==="font"){const{family:i,weight:o,color:s,icons:r}=e;let n=jf;i&&(n+=` font-family: ${rP(i)};`),o&&(n+=` font-weight: ${nP(o)};`),s&&(n+=` color: ${oP(s)};`);for(const l of Object.keys(r))t.push(`.ag-icon-${l}::before { content: ${JSON.stringify(r[l])}; ${n} }`)}return sP({css:t.join(`;
`),cssImports:e.cssImports})},jf="background-color: unset; mask-image: unset; -webkit-mask-image: unset;";import{createPart as dP}from"ag-stack";var Zf={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',pdf:'<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="M7 17V12h2.2a1.4 1.4 0 0 1 0 2.8H7"/><path d="M12 17v-5h1.4a2.5 2.5 0 0 1 0 5H12z"/><path d="M17 17v-5h3"/><path d="M17 14h2.5"/>',expanded:'<path d="m15 18-6-6 6-6"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',search:'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>'},Qf={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',document:'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.66663 14.3333V1.66667C2.66663 1.29848 2.9651 1 3.33329 1H9.33329L13.3333 5V14.3333C13.3333 14.7015 13.0348 15 12.6666 15H3.33329C2.9651 15 2.66663 14.7015 2.66663 14.3333Z" stroke="currentColor" stroke-width="1.33333"/><path d="M12.6667 6H8V1" stroke="currentColor" stroke-width="1.33333"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',fx:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.49158 3.12305H7.50623C6.93834 3.12323 6.44152 3.5064 6.29724 4.05566L5.87439 5.66797H7.48083V7.16797H5.48083L4.06775 12.5527C3.77958 13.6508 2.787 14.417 1.65173 14.417V12.917C2.10521 12.917 2.50147 12.6105 2.61658 12.1719L3.93005 7.16797H2.42419V5.66797H4.32361L4.84607 3.6748C5.16341 2.46608 6.25655 1.62323 7.50623 1.62305H8.49158V3.12305ZM10.6781 7.5293L12.4115 5.91211H14.6097L14.5648 5.9541L11.4808 8.83203L13.4301 12H11.6683L10.3617 9.87598L8.08728 12H5.88904L9.55994 8.57324L7.92224 5.91211H9.68396L10.6781 7.5293Z" fill="currentColor"/></svg>',"values-as":'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.7631 2.75003C14.3937 4.26881 14.9593 8.21416 13.0263 11.5622C11.0933 14.9103 7.39373 16.3932 4.76312 14.8744C2.13251 13.3556 1.56698 9.41025 3.49998 6.0622C5.43297 2.71416 9.13251 1.23124 11.7631 2.75003ZM11.2631 3.61605C10.0674 2.9257 7.75491 4.69245 6.09805 7.5622C4.4412 10.432 4.06739 13.318 5.26312 14.0084C6.45885 14.6987 8.77133 12.932 10.4282 10.0622C12.085 7.19245 12.4588 4.30641 11.2631 3.61605Z" fill="currentColor"/><path d="M27.1631 17.05C29.7938 18.5688 30.3593 22.5142 28.4263 25.8622C26.4933 29.2103 22.7938 30.6932 20.1631 29.1744C17.5325 27.6556 16.967 23.7103 18.9 20.3622C20.833 17.0142 24.5325 15.5312 27.1631 17.05ZM26.6631 17.9161C25.4674 17.2257 23.1549 18.9924 21.4981 21.8622C19.8412 24.732 19.4674 27.618 20.6631 28.3084C21.8589 28.9987 24.1714 27.232 25.8282 24.3622C27.4851 21.4924 27.8589 18.6064 26.6631 17.9161Z" fill="currentColor"/><path d="M22.7042 2.38759L24.4363 3.38759L9.29419 29.6145L7.56214 28.6145L22.7042 2.38759Z" fill="currentColor"/></svg>'},cP=(e={})=>{let t="";for(const i of[...Object.keys(Zf),...Object.keys(Qf)]){const o=uP(i,e.strokeWidth);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
`}return t},uP=(e,t=1.5)=>{const i=Qf[e];if(i)return i;const o=Zf[e];if(!o)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+o+"</svg>"},Ys=(e={})=>dP({feature:"iconSet",css:()=>cP(e)}),hP=Ys({strokeWidth:1}),Yf=Ys(),gP=Ys({strokeWidth:2});import{accentColor as pP,backgroundColor as fP,createPart as Fa,foregroundBackgroundMix as mP,foregroundMix as CP}from"ag-stack";var Pa=":where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-clear-button{align-items:center;background:transparent;border:0;border-radius:var(--ag-border-radius);color:inherit;cursor:pointer;display:flex;height:var(--ag-icon-size);inset-inline-end:var(--ag-spacing);justify-content:center;padding:0;position:absolute;width:var(--ag-icon-size)}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);min-height:var(--ag-input-height);padding-inline:var(--ag-input-padding-start);&:where(.ag-input-field-input:not(.ag-input-frameless)){background-color:var(--ag-input-background-color);border:var(--ag-input-border);&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow)}&:where(.invalid),&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border)}}&:where(.ag-input-frameless){background-color:transparent;border:none;@media (forced-colors:active){outline:none}}&:where(:disabled){color:var(--ag-input-disabled-text-color)}&:where(:focus){color:var(--ag-input-focus-text-color)}&:where(.invalid),&:where(:invalid){color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}.ag-input-field-search-icon{align-items:center;display:inline-flex;inset-inline-start:var(--ag-spacing);opacity:.5;pointer-events:none;position:absolute;--ag-icon-color:var(--ag-input-icon-color)}:where(.ag-input-field-search){.ag-number-field-input,.ag-text-field-input{padding-inline-start:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}}.ag-input-field-input-with-clear-button{padding-inline-end:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}",vP=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:where(.ag-input-field-input:not(.ag-input-frameless)):focus{box-shadow:var(--ag-input-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",wP=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){border-left:none;border-right:none;border-top:none}",Da={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonBorderRadius:{ref:"borderRadius"},pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},SP=()=>Fa({feature:"inputStyle",params:Da,css:Pa}),bP=SP(),yP=()=>Fa({feature:"inputStyle",params:{...Da,inputBackgroundColor:fP,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:pP},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:mP(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>Pa+vP}),Js=yP(),RP=()=>Fa({feature:"inputStyle",params:{...Da,inputBackgroundColor:"transparent",inputBorder:{width:2,color:CP(.3)},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}},css:()=>Pa+wP}),Jf=RP();import{accentColor as Ma,backgroundColor as Xf,createPart as Fo,foregroundMix as EP}from"ag-stack";var Po='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color);@media (forced-colors:active){background-color:SelectedItem}}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}',xP=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",Do={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},FP=()=>Fo({feature:"tabStyle",params:Do,css:Po}),PP=FP(),DP=()=>Fo({feature:"tabStyle",params:{...Do,tabBarBorder:!0,tabBarBackgroundColor:EP(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Xf},css:Po}),em=DP(),MP=()=>Fo({feature:"tabStyle",params:{...Do,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:0},css:Po}),tm=MP(),TP=()=>Fo({feature:"tabStyle",params:{...Do,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:Ma,tabSelectedTextColor:Ma,tabSelectedUnderlineColor:Ma,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:Po}),im=TP(),AP=()=>Fo({feature:"tabStyle",params:{...Do,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:Xf},css:()=>Po+xP}),om=AP(),IP=".ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}:where(.ag-toolbar) .ag-column-drop-horizontal{background-color:transparent}:where(.ag-toolbar) .ag-toolbar-panel{padding-inline:var(--ag-cell-horizontal-padding) 0}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:solid var(--ag-border-width) var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-filter-add-button,.ag-filter-add-button:hover{border-bottom:2px solid var(--ag-primary-color)}.ag-toolbar-button-wrapper{transition:background-color .2s,color .2s}.ag-toolbar-find,.ag-toolbar-input{border-left:none;border-right:none;border-top:none;box-shadow:none}.ag-toolbar-find:focus-within{border-left:none;border-right:none;border-top:none;box-shadow:none}.ag-toolbar-input-field{border-left:none;border-right:none;border-top:none}.ag-toolbar-input-field:focus{border-left:none;border-right:none;border-top:none;box-shadow:none}",kP=":where(.ag-number-field.ag-paging-number) .ag-input-field-input{padding-bottom:1px}",sm=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},...If()]}),LP=()=>Af({feature:"styleQuartz",css:kP}),VP=LP(),HP=()=>yo().withPart(Hf).withPart(Ro).withPart(xo).withPart(Yf).withPart(em).withPart(Js).withPart(Ea).withPart(VP).withParams(sm()),rm=HP(),nm=()=>({accentColor:"#2196f3",selectedRowBackgroundColor:ba(.3),inputFocusBorder:{color:ba(.4)},focusShadow:{radius:2,spread:1.6,color:ba(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:He(.45),checkboxIndeterminateBackgroundColor:He(.45),checkboxIndeterminateBorderColor:He(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:Yt,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:Yt,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:Yt,iconButtonHoverColor:Yt,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:He(.45),colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),BP=()=>yo().withPart(Bf).withPart(Ro).withPart(xo).withPart($f).withPart(im).withPart(Js).withPart(Ea).withParams(nm()),OP=BP(),lm=()=>({accentColor:"#0091ea",borderColor:nt(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:So,checkboxUncheckedBorderColor:He(.5),checkboxCheckedBackgroundColor:So,checkboxCheckedBorderColor:Yt,checkboxCheckedShapeColor:Yt,checkboxIndeterminateBackgroundColor:So,checkboxIndeterminateBorderColor:He(.5),checkboxIndeterminateShapeColor:He(.5),focusShadow:{radius:2,spread:1,color:Yt},headerTextColor:nt(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:So,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:He(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:nt(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:mi,toolbarTextColor:{ref:"headerTextColor"},colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),GP=()=>yo().withPart(Of).withPart(Ro).withPart(xo).withPart(qf).withPart(om).withPart(Js).withPart(xa).withParams(lm()),NP=GP(),_P=()=>{const e={tabSelectedUnderlineColor:{ref:"primaryColor"},sideButtonSelectedUnderlineColor:{ref:"primaryColor"},buttonTextColor:{ref:"primaryColor"},rangeSelectionBackgroundColor:{ref:"primaryColor",mix:.2},rangeSelectionBorderColor:{ref:"primaryColor"},rangeSelectionHighlightColor:{ref:"primaryColor",mix:.5},rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08},rowNumbersSelectedColor:{ref:"primaryColor",mix:.5},inputFocusBorder:{width:2,color:{ref:"primaryColor"}},pickerButtonFocusBorder:{width:1,color:{ref:"primaryColor"}},cellEditingBorder:{color:{ref:"primaryColor"}},menuBackgroundColor:{ref:"backgroundColor"},sideButtonBarBackgroundColor:So,sideButtonSelectedBackgroundColor:"transparent",sideButtonBarTopPadding:{calc:"spacing * 4"},headerColumnResizeHandleColor:"none",headerBackgroundColor:{ref:"backgroundColor"},rowHoverColor:nt(.08),columnHoverColor:nt(.08),headerCellHoverBackgroundColor:nt(.05),headerTextColor:nt(.615),statusBarLabelColor:nt(.63),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,valueChangeValueHighlightBackgroundColor:"#00acc1",panelTitleBarIconColor:mi,toolbarTextColor:mi,advancedFilterBuilderButtonBarBorder:!1,filterPanelApplyButtonColor:{ref:"buttonTextColor"},filterPanelApplyButtonBackgroundColor:{ref:"buttonBackgroundColor"},columnPanelApplyButtonColor:{ref:"buttonTextColor"},columnPanelApplyButtonBackgroundColor:{ref:"buttonBackgroundColor"},colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2,rowDragIndicatorColor:{ref:"primaryColor"},columnDragIndicatorColor:{ref:"primaryColor"}},t={...e,primaryColor:"#3f51b5",foregroundColor:"#000D",accentColor:"#ff4081",checkboxUncheckedBorderColor:mi,checkboxIndeterminateBackgroundColor:mi,toggleButtonOffBackgroundColor:mi,selectedRowBackgroundColor:"rgba(33, 150, 243, 0.3)"},i={...e,primaryColor:"#3f51b5",foregroundColor:"#fffD",accentColor:"#bb86fc",checkboxUncheckedBorderColor:He(.5),checkboxIndeterminateBackgroundColor:He(.5),toggleButtonOffBackgroundColor:He(.5),selectedRowBackgroundColor:"#bb86fc33"};return Af({feature:"styleMaterial",css:IP,params:t,modeParams:{light:t,dark:i,"dark-blue":i}})},am=_P(),dm=()=>({rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.75 * rowVerticalPaddingScale"},headerHeight:{calc:"max(iconSize, headerFontSize) + spacing * 4.75 * headerVerticalPaddingScale"},widgetVerticalSpacing:{calc:"spacing * 1.75"},cellHorizontalPadding:{calc:"spacing * 3"},buttonHorizontalPadding:{ref:"spacing"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 2"},fontSize:13,iconSize:18,borderRadius:0,wrapperBorderRadius:0,wrapperBorder:!1,menuBorder:!1,dialogBorder:!1,panelTitleBarBorder:!1,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sidePanelBorder:!1,sideButtonSelectedBorder:!1,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,buttonBorder:!1,buttonDisabledBorder:!1,focusShadow:{spread:4,color:nt(.16)},fontFamily:[{googleFont:"Roboto"},...If()],inputHeight:{calc:"max(iconSize, fontSize) + spacing * 3"},pickerButtonBorder:{width:1,color:"transparent"},headerFontWeight:600,headerFontSize:{calc:"fontSize - 1px"},checkboxBorderWidth:2,checkboxBorderRadius:2,toggleButtonWidth:34,toggleButtonSwitchInset:1,cardShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)"}),zP=()=>yo().withPart(Vf).withPart(Ro).withPart(xo).withPart(Kf).withPart(tm).withPart(Jf).withPart(xa).withPart(am).withParams(dm()),WP=zP(),at=(e,t,i)=>({changeKey:e,type:t,defaultValue:i}),UP=at("autoHeightMaxBodyHeight","length",1/0),qP=at("cellHorizontalPadding","length",16),$P=at("cellWidgetSpacing","length",12),KP=at("iconSize","length",16),cm=at("rowHeight","length",42),um=at("headerHeight","length",48),Ta=at("rowBorderWidth","border",1),hm=at("pinnedRowBorderWidth","border",1),jP=at("headerRowBorderWidth","border",1);function gm(e,t){for(const i of t.sort((o,s)=>o.moduleName.localeCompare(s.moduleName))){const o=i.css;o&&e.set(`module-${i.moduleName}`,o)}}var ZP=class extends _1{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(cm),this.getSizeEl(um),this.getSizeEl(Ta),this.getSizeEl(hm),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(hm)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Ta)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(jP)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(cm)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(um)}getAutoHeightMaxBodyHeight(){const e=this.getCSSVariablePixelValue(UP);return e<1/0?e:null}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(qP)}getDefaultCellWidgetSpacing(){return this.getCSSVariablePixelValue($P)}getDefaultIconSize(){return this.getCSSVariablePixelValue(KP)}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(i==null||Number.isNaN(Number(i))||!Number.isFinite(Number(i)))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const o=`${i}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),i):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),e!=="theme"&&this.checkLegacyThemeVariables(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Ta);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")?t?this.beans.log.error(106):this.beans.log.error(239):e&&this.checkLegacyThemeVariables()}checkLegacyThemeVariables(){this.beans.validation?.checkLegacyThemeVariables(this.eRootDiv)}getAdditionalCss(){const e=new Map;return e.set("core",[b6]),gm(e,Array.from(W2())),e}getDefaultTheme(){return rm}varError(e,t){this.beans.log.warn(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){this.beans.log.error(240,{theme:e})}shadowRootError(){this.beans.log.error(293)}};import{BaseEventService as QP}from"ag-stack";var YP=class extends z1{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};import{KeyCode as Aa,_focusInto as JP,_getActiveDomElement as Xs,_getDeepActiveElement as er,_getDocument as pm,_isNothingFocused as fm,_last as Ia,_makeNull as ka,_registerKeyboardFocusEvents as XP}from"ag-stack";import{_getDocument as e4,_last as La}from"ag-stack";function Va(e,t,i){const o=e.visibleCols.headerGroupRowCount;if(i>=o)return{column:t,headerRowIndex:i};let s=t.parent;for(;s&&s.getProvidedColumnGroup().getLevel()>i;)s=s.parent;const r=t.isSpanHeaderHeight();return!s||r&&s.isPadding()?{column:t,headerRowIndex:o}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var t4=class extends y{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,i=>{this.gridBodyCon=i.gridBodyCtrl});const t=e4(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}onHeaderClicked(e){e.isSpanHeaderHeight()&&(this.currentHeaderRowWithoutSpan=(e.getFirstRealParent()?.getLevel()??-1)+1)}getHeaderPositionForColumn(e,t){let i;const{colModel:o,ctrlsSvc:s}=this.beans;if(typeof e=="string"?i=o.getCol(e)??o.colsGroupsById.get(e)?.displayInstances?.[0]??null:i=e,!i)return null;const n=s.getHeaderRowContainerCtrl()?.getAllCtrls(),l=La(n??[]).type==="filter",a=Ee(this.beans)-1;let d=-1,c=i;for(;c;)d++,c=c.parent;let u=d;return t&&l&&u===a-1&&u++,u===-1?null:{headerRowIndex:u,column:i}}navigateVertically(e,t){const{focusSvc:i,visibleCols:o}=this.beans,{focusedHeader:s}=i;if(!s)return!1;const{headerRowIndex:r}=s,n=s.column,l=Ee(this.beans),a=this.getHeaderRowType(r),d=o.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?i4(a,n,r):o4(n,r,d),g=!1;return c<0&&(c=0,u=n,g=!0),c>=l?(c=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:i.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,i){const{focusSvc:o,gos:s}=this.beans;if(!o.focusedHeader)return!1;const r={...o.focusedHeader};let n,l;this.currentHeaderRowWithoutSpan!==-1?r.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=r.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(l="Before",n=this.findHeader(r,l)):(l="After",n=this.findHeader(r,l));const a=s.getCallback("tabToNextHeader");if(t&&a){const d=o.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:n,direction:l});if(d){const{headerRowIndex:c}=o.focusedHeader||{};c!=null&&c!=r.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return n||!t?o.focusHeaderPosition({headerPosition:n,direction:l,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(r,l,i)}focusNextHeaderRow(e,t,i){const o=this.beans,s=e.headerRowIndex;let r,n;const l=Ee(o),a=this.beans.visibleCols.allCols;if(t==="Before"){if(s<=0)return!1;r=La(a),n=s-1,this.currentHeaderRowWithoutSpan-=1}else r=a[0],n=s+1,this.currentHeaderRowWithoutSpan<l?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:d,headerRowIndex:c}=Va(this.beans,r,n);return c>=l&&(c=-1),o.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.pinnedLane!==1)return;let i;if(Me(e)){const o=e.getDisplayedLeafColumns();i=t==="Before"?La(o):o[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(e,t){const{visibleCols:i}=this.beans;let o=e.column;if(o instanceof ci){const l=o.getDisplayedLeafColumns();o=t==="Before"?l[0]:l[l.length-1]}const s=t==="Before"?i.getColBefore(o):i.getColAfter(o);if(!s)return;const r=i.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:s};const n=_u(s,e.headerRowIndex);return n?n.isPadding()&&s.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:s}:{headerRowIndex:e.headerRowIndex,column:n??s}:{headerRowIndex:s instanceof Gt&&s.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:s}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function i4(e,t,i){const o=i-1;if(e!=="filter"){const s=t instanceof Gt&&t.isSpanHeaderHeight();let r=t.parent;for(;r&&(r.getProvidedColumnGroup().getLevel()>o||s&&r.isPadding());)r=r.parent;if(r)if(s){const n=r.getProvidedColumnGroup().getLevel();return{column:r,headerRowIndex:n,headerRowIndexWithoutSpan:n}}else return{column:r,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}function o4(e,t,i){const o=t+1,s={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof ci){if(o>=i)return{column:Wt(e,!0,!1),headerRowIndex:i,headerRowIndexWithoutSpan:o};let n=e.displayedChildren[0];if(n instanceof ci&&n.isPadding()){const a=Wt(n,!0,!1);a?.isSpanHeaderHeight()&&(n=a)}s.column=n,n instanceof Gt&&n.isSpanHeaderHeight()&&(s.headerRowIndex=i,s.headerRowIndexWithoutSpan=o)}return s}var s4=class extends y{constructor(){super(...arguments),this.beanName="focusSvc",this.focusedCell=null,this.previousCellFocusParams=null,this.focusedHeader=null,this.elementToReveal=null,this.owedFocus=null,this.onActionWhileFocusOwed=e=>{(e.type==="focusin"?this.isFocusFreeForGrid():this.mayPressBeOnGrid(e))||this.dropOwedFocus()}}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(XP(this.beans))}destroy(){this.focusedCell=null,this.dropOwedFocus(),super.destroy()}oweFocus(e){const t=this.owedFocus;t?.header||this.setOwedFocus(void 0,e??t?.event,t?t.activeAtOwed:er(this.beans))}deferFocus(e){this.setOwedFocus(e,void 0,er(this.beans))}setOwedFocus(e,t,i){let o=this.owedFocus?.shadowRoots;if(!o){const s=pm(this.beans);s.addEventListener("pointerdown",this.onActionWhileFocusOwed,!0),s.addEventListener("focusin",this.onActionWhileFocusOwed,!0);const r=[];for(let n=this.beans.eRootDiv.getRootNode();n instanceof ShadowRoot;n=n.host.getRootNode())n.addEventListener("pointerdown",this.onActionWhileFocusOwed,!0),n.addEventListener("focusin",this.onActionWhileFocusOwed,!0),r.push(n);o=r}this.owedFocus={header:e,event:t,activeAtOwed:i,shadowRoots:o}}takeOwedFocusEvent(){const e=this.owedFocus?.event;return e&&this.takeOwedFocus()?e:void 0}takeOwedFocus(){const e=this.owedFocus;return!e||e.header||(this.dropOwedFocus(),!e.event&&this.gos.get("suppressFocusAfterRefresh"))?!1:er(this.beans)===e.activeAtOwed||this.isFocusFreeForGrid()}dropOwedFocus(){const e=this.owedFocus;if(!e)return;this.owedFocus=null;const t=pm(this.beans);t.removeEventListener("pointerdown",this.onActionWhileFocusOwed,!0),t.removeEventListener("focusin",this.onActionWhileFocusOwed,!0);const i=e.shadowRoots;for(let o=0,s=i.length;o<s;++o){const r=i[o];r.removeEventListener("pointerdown",this.onActionWhileFocusOwed,!0),r.removeEventListener("focusin",this.onActionWhileFocusOwed,!0)}}mayPressBeOnGrid(e){let t=this.beans.eRootDiv,i=t.getRootNode();for(;i!==e.currentTarget&&i instanceof ShadowRoot;){const o=i.host;t=i.mode==="closed"?o:t,i=o.getRootNode()}return e.composedPath().includes(t)}shouldTakeFocus(){return!this.gos.get("suppressFocusAfterRefresh")&&this.doesRowOrCellHaveBrowserFocus()}dropOwedHeaderFocus(e){this.owedFocus?.header===e&&this.dropOwedFocus()}takeOwedHeaderFocus(e){const t=this.owedFocus;return t?.header!==e?!1:(this.dropOwedFocus(),er(this.beans)===t.activeAtOwed||fm(this.beans))}isFocusFreeForGrid(){return fm(this.beans)||this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Xs(this.beans),ll)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Xs(this.beans);return!e||!this.gos.isElementInThisInstance(e)?!1:this.isDomDataPresentInHierarchy(e,Rs)?!0:this.isDomDataPresentInHierarchy(e,xs)}isDomDataPresentInHierarchy(e,t){let i=e;for(;i;){if(en(this.gos,i,t))return!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:i,column:o}=e,s={rowIndex:t,rowPinned:i,column:o,isFullWidthCell:!1},r=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return r&&(s.isFullWidthCell=r.isFullWidth()),s}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.owedFocus?.header||this.dropOwedFocus(),this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCellOrSpan(e){const{rowIndex:t,rowPinned:i}=e,o=this.visibleCols.colSpanColCount!==0?this.colModel.getCol(e.column):null,s=o&&t!=null?Re(this.beans,{rowIndex:t,rowPinned:i}):void 0,r=o&&s?this.rowRenderer.getSpanningCol(o,s):null;if(o&&r&&r!==o){this.setFocusedCell({...e,column:r}),this.navigation?.setCurrentColumnWithoutSpan(o);return}this.setFocusedCell(e)}setFocusedCell(e){this.dropOwedFocus();const{column:t,rowIndex:i,rowPinned:o,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:r=!1,sourceEvent:n}=e,l=this.colModel.getCol(t);if(!l){this.focusedCell=null;return}this.focusedCell={rowIndex:i,rowPinned:ka(o),column:l};const a=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...a,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:r,sourceEvent:n}),this.previousCellFocusParams=a}isCellFocused(e){return this.focusedCell==null?!1:fs(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:i}}=e,{column:o,headerRowIndex:s}=this.focusedHeader;return t===o&&i===s}focusGridElement(e){const t=this.beans.colAnimation;if(!t?.isActive()){e.focus();return}e.focus({preventScroll:!0}),this.elementToReveal||t.executeLaterVMTurn(()=>this.revealElement()),this.elementToReveal=e}revealElement(){const e=this.elementToReveal;if(!e||!this.isAlive()||!e.contains(Xs(this.beans))){this.elementToReveal=null;return}const t=this.beans.colAnimation;if(t?.isActive()){t.executeLaterVMTurn(()=>this.revealElement());return}const i=e.getAnimations?.().filter(r4);if(i?.length){Promise.allSettled(i.map(o=>o.finished)).then(()=>this.revealElement());return}this.elementToReveal=null,e.scrollIntoView({block:"nearest",inline:"nearest"})}focusHeaderPosition(e){if(this.dropOwedFocus(),ve(this.beans))return!1;const{direction:t,fromTab:i,allowUserOverride:o,event:s,fromCell:r,rowWithoutSpanValue:n,scroll:l=!0}=e;let{headerPosition:a}=e;if(r&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(o){const d=this.focusedHeader,c=Ee(this.beans);if(i){const u=this.gos.getCallback("tabToNextHeader");u&&(a=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:a,headerRowCount:c}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&s){const h={key:s.key,previousHeaderPosition:d,nextHeaderPosition:a,headerRowCount:c,event:s},g=u(h);a=g===null?d:g}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:s,fromCell:r,rowWithoutSpanValue:n,scroll:l}):!1}focusHeaderPositionFromUserFunc(e){if(ve(this.beans))return!1;const{userFunc:t,headerPosition:i,direction:o,event:s}=e,r=this.focusedHeader,n=Ee(this.beans),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:r,headerPosition:i,headerRowCount:n});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:o,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:o,headerPosition:s,headerRowCount:r}=e,l=t({backwards:i==="Before",previousHeaderPosition:o,nextHeaderPosition:s,headerRowCount:r});return l===!0?o:l===!1?null:l}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:o,rowWithoutSpanValue:s,event:r,scroll:n=!0}=e,{column:l,headerRowIndex:a}=t,{filterManager:d,ctrlsSvc:c,headerNavigation:u}=this.beans;if(this.isDomDataPresentInHierarchy(Xs(this.beans),ll)&&this.focusedHeader&&b3(e.headerPosition,this.focusedHeader))return!1;if(a===-1)return d?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:l,event:r});n&&u?.scrollToColumn(l,i);const p=c.getHeaderRowContainerCtrl()?.focusHeader(t.headerRowIndex,l,r)||!1;return u&&p&&(s!=null||o)&&(u.currentHeaderRowWithoutSpan=s??-1),p}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=Va(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;const t=Ee(this.beans)-1,i=Ia(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===ka(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&JP(t,e)}getDefaultTabToNextGridContainerTarget(e){const{backwards:t,focusableContainers:i}=e,o=t?-1:1;let s;const r=()=>(s===void 0&&(s=this.getGridBodyTabTarget(t)),s);for(let n=e.nextIndex;n>=0&&n<i.length;n+=o){const l=p3(i[n],r);if(l)return l}return null}getGridBodyTabTarget(e){if(e)return this.getGridViewTabTarget({column:Ia(this.visibleCols.allCols),backwards:!0});const t=this.visibleCols.allCols[0];return this.gos.get("headerHeight")===0||ve(this.beans)?this.getGridViewTabTarget({column:t}):t?Va(this.beans,t,0):null}getGridViewTabTarget(e){const{backwards:t=!1}=e,i=e.column??this.focusedHeader?.column;if(!i||this.overlays?.exclusive)return null;if(oo(this.beans))return t&&!ve(this.beans)?{headerRowIndex:Ee(this.beans)-1,column:i}:null;const o=t?Zn(this.beans):jn(this.beans);if(o?.rowIndex==null){if(this.overlays?.isVisible())return null;if(t&&!ve(this.beans)){const r=Ia(this.visibleCols.allCols);if(r)return{headerRowIndex:Ee(this.beans)-1,column:r}}return null}const s=Re(this.beans,o);return!s||i.isSuppressNavigable(s)||t&&this.rowRenderer.getRowByPosition(o)?.isFullWidth()?null:{rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:i}}focusGridView(e){const{backwards:t=!1,canFocusOverlay:i=!0,event:o}=e;if(this.overlays?.exclusive)return i&&this.focusOverlay(t);if(oo(this.beans))return t&&!ve(this.beans)?this.focusLastHeader():i&&this.focusOverlay(t)?!0:t?!1:qt(this.beans,t);const s=t?Zn(this.beans):jn(this.beans);if(s){const r=e.column??this.focusedHeader?.column,{rowIndex:n,rowPinned:l}=s,a=Re(this.beans,s);if(!r||!a||n==null)return!1;if(r.isSuppressNavigable(a)){if(Ye(this.gos,a))return t&&!ve(this.beans)?this.focusLastHeader():i&&this.focusOverlay(t);const d=this.gos.get("enableRtl");let c;return!o||o.key===Aa.TAB?c=d?Aa.LEFT:Aa.RIGHT:c=o.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:n,column:r,rowPinned:l||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:n,column:r,rowPinned:l}),t&&this.rowRenderer.getRowByPosition(s)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(s,t)||(this.setFocusedCell({rowIndex:n,column:r,rowPinned:ka(l),forceBrowserFocus:!0}),fe(r)||this.beans.rangeSvc?.setRangeToCell({rowIndex:n,rowPinned:l,column:r})),!0}return!!(i&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const i=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:Ee(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}};function r4(e){const t="transitionProperty"in e?e.transitionProperty:null;return t==="left"||t==="right"||t==="width"}var n4=class extends y{constructor(){super(...arguments),this.beanName="scrollVisibleSvc",this.refreshTimer=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}destroy(){window.clearTimeout(this.refreshTimer),super.destroy()}postConstruct(){const{gos:e}=this;this.horizontalScrollShowing=!!e.get("alwaysShowHorizontalScroll"),this.verticalScrollShowing=!!e.get("alwaysShowVerticalScroll"),this.ctrlsSvc.whenReady(this,()=>this.measureScrollbar());const t=this.refresh.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t,stylesChanged:i=>{i.themeChanged&&this.measureScrollbar()}})}refresh(){this.refreshImpl(),window.clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout(()=>this.refreshImpl(),500)}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}refreshImpl(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.refreshScrollState())}):this.refreshScrollState()}refreshScrollState(){const e=this.ctrlsSvc.getGridBodyCtrl();if(!this.isAlive()||!e||this.colAnimation?.isActive())return;const t=this.calculateScrollVisibilityState(e);this.applyScrollVisibility(t),this.applyScrollGap(this.calculateScrollGapState(e,t.verticalScrollShowing))}calculateScrollVisibilityState(e){const t=e.eGridViewport.clientHeight,i=this.calculateVerticalScrollShowing(e,!1,t),o=this.calculateHorizontalScrollShowing(e,i),s=i||o&&this.calculateVerticalScrollShowing(e,!0,t);return{horizontalScrollShowing:o,verticalScrollShowing:s}}calculateVerticalScrollShowing(e,t,i){if(this.gos.get("alwaysShowVerticalScroll"))return!0;if(!Jo(this.beans))return!1;const s=i+this.getAppliedHorizontalScrollbarLayoutHeight()-this.getHorizontalScrollbarLayoutHeight(t),r=e.getBodyViewportHeight(s);return(this.beans.rowContainerHeight.uiContainerHeight??0)-r>.5}getHorizontalScrollbarLayoutHeight(e){return!e||this.gos.get("suppressHorizontalScroll")||this.isInvisibleScrollbar()?0:this.getScrollbarWidth()||0}getAppliedHorizontalScrollbarLayoutHeight(){if(this.gos.get("suppressHorizontalScroll")||this.isInvisibleScrollbar())return 0;const e=Number.parseFloat(this.ctrlsSvc.get("fakeHScrollComp")?.getGui().style.height??"");return Number.isFinite(e)?e:0}calculateHorizontalScrollShowing(e,t){if(this.gos.get("alwaysShowHorizontalScroll"))return!0;const i=e.getReportedViewportWidth(),o=e.isPinnedWidthOverflowingViewport(i,t);return e.getHorizontalContentWidth(o,t)-i>.5}calculateScrollGapState(e,t){const{rowContainerHeight:i}=this.beans,o=e.getColumnsWidth(),s=e.getViewportWidthWithoutScrollbar(e.getReportedViewportWidth(),t),r=i.getAdjustedUiContainerHeight()??0,n=e.getBodyViewportHeight(e.eGridViewport.clientHeight);return{horizontalScrollGap:o<s-.5,verticalScrollGap:r<n-.5}}applyScrollGap({horizontalScrollGap:e,verticalScrollGap:t}){(this.horizontalScrollGap!==e||this.verticalScrollGap!==t)&&(this.horizontalScrollGap=e,this.verticalScrollGap=t,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}applyScrollVisibility(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){return this.scrollbarWidth==null&&this.measureScrollbar(),this.scrollbarWidth}isInvisibleScrollbar(){return this.invisibleScrollbar==null&&this.measureScrollbar(),this.invisibleScrollbar}measureScrollbar(){const e=this.measureScrollbarProbe();if(e==null)return;const{nativeWidth:t,borderWidth:i}=e,o=this.gos.get("scrollbarWidth"),s=typeof o=="number"&&o>=0,r=t===0,n=(s?o:t)+(r?0:i);(n!==this.scrollbarWidth||r!==this.invisibleScrollbar)&&(this.scrollbarWidth=n,this.invisibleScrollbar=r,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}measureScrollbarProbe(){const e=this.ctrlsSvc.getGridBodyCtrl()?.eGridBody;if(!e)return null;const t=O({tag:"div",cls:"ag-body-vertical-scroll-viewport ag-scrollbar-probe"}),i=t.style;i.width=i.height="100px",i.opacity="0",i.overflow="scroll",i.msOverflowStyle="scrollbar",i.position="absolute",e.appendChild(t);const o=t.clientWidth,s=t.offsetWidth-o,r=getComputedStyle(t),n=(Number.parseFloat(r.borderLeftWidth)||0)+(Number.parseFloat(r.borderRightWidth)||0);return t.remove(),s===0&&o===0?null:{nativeWidth:Math.max(0,s-n),borderWidth:n}}},l4=class extends y{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:i}=this.beans;try{this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}})}finally{this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),i.destroy(),super.destroy()}}};import{LocalEventService as a4,_exists as mm}from"ag-stack";var tr=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnHeaderNameChanged","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","calculatedColumnCreated","calculatedColumnChanged","calculatedColumnExpressionChanged","calculatedColumnRemoved","calculatedColumnValidationStateChanged","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped","issueRaised"],d4=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","gridViewportWidthChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","rowDragVisibilityChanged","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","stylesChanged","storeUpdated","filterDestroyed","filterHandlerDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","stickyBottomOffsetChanged","overlayExclusiveChanged","rowNodeDataChanged","cellEditValuesChanged","filterSwitched","filterClosed","headerRowsChanged","rowExpansionStateChanged","showRowGroupColsSetChanged","columnHeaderEditHighlightChanged","columnShowValuesAsChanged"],c4=()=>[...tr,...d4],wi=new Set(["gridPreDestroyed","fillStart","pasteStart","issueRaised"]),Ha=tr.reduce((e,t)=>(e[t]=su(t),e),{});function u4(e){return e?.calculatedExpression!==void 0}function Cm(e){return e!=null&&e!==!1}function h4(e){return e===void 0?void 0:e??""}function Ba(e,t,i,o){o?e.deprecated(t,i):e.warn(t,i)}function N(e,t){return{errorId:e,emit:i=>Ba(i,e,t,!1)}}function vm(e,t){return{errorId:e,emit:i=>Ba(i,e,t,!0)}}function wm(e,t){typeof e=="string"?Ba(t,322,{message:e},!1):e.emit(t)}var g4=["__ob__","__v_skip","__metadata__"];function Sm(e,t,i){return new Set([...g4,...i??[],...Object.keys(t),...e])}var Si={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agFileInputOverlay:"FileInputOverlay",agErrorOverlay:"Validation",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find",agButtonToolbarItem:"Toolbar",agFindToolbarItem:"Toolbar",agMenuToolbarItem:"Toolbar",agPivotPanelToolbarItem:"Toolbar",agQuickFilterToolbarItem:"Toolbar",agRowGroupPanelToolbarItem:"Toolbar"};function bm(e){return`"${e}"`}var p4=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."},headerTooltipValueGetter:{version:"36.2",message:"Use `headerTooltip` with a callback instead."},tooltipField:{version:"36.2",message:"Use `tooltip` with a callback instead."},tooltipValueGetter:{version:"36.2",message:"Use `tooltip` with a callback instead."}}),f4={allowFormula:"Formula",calculatedExpression:"CalculatedColumns",calculatedColumnReadOnly:"CalculatedColumns",aggFunc:"SharedAggregation",showValuesAs:"ShowValuesAs",initialShowValuesAs:"ShowValuesAs",showValuesAsDef:"ShowValuesAs",enableShowValuesAs:"ShowValuesAs",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:i})=>!!t||!!i?typeof e=="string"?Si[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Si[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?Si[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",columnMenuItems:["ColumnMenu","ColumnsToolPanel"],menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",pivotSort:"SharedPivot",initialPivotSort:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltip:"Tooltip",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},m4=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:i})=>i?N(318,{feature:"`colDef.autoHeight`",conflictsWith:"`paginationAutoPageSize`"}):null},allowFormula:{supportedRowModels:["clientSide"]},showValuesAs:{supportedRowModels:["clientSide"]},initialShowValuesAs:{supportedRowModels:["clientSide"]},showValuesAsDef:{supportedRowModels:["clientSide"]},enableShowValuesAs:{supportedRowModels:["clientSide"]},calculatedExpression:{validate:(t,i)=>u4(t)?Cm(i.calculatedColumns)?t.pivotValueColumn?null:t.colId?t.field||t.valueGetter||t.valueSetter?"colDef.calculatedExpression is used as the value source and should not be combined with field, valueGetter or valueSetter.":t.editable?"colDef.calculatedExpression columns are read-only and should not be combined with editable.":null:N(319,{feature:"`colDef.calculatedExpression`",requirement:"`colId` to be set on the calculated column"}):N(319,{feature:"`colDef.calculatedExpression`",requirement:"`gridOptions.calculatedColumns` to be set to true or an options object"}):null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?vm(306,{version:"33.0",name:"cellRendererParams.checkbox",message:'Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.'}):null},flex:{validate:(t,i)=>i.autoSizeStrategy?N(318,{feature:"`colDef.flex`",conflictsWith:"`gridOptions.autoSizeStrategy`"}):null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const i=t.headerValueGetter;return typeof i=="function"||typeof i=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Ft(262);if(t.smallLeft)return Ft(263);if(t.smallRight)return Ft(264)}return null}},sort:{validate:t=>Ct(t.sort)||ot(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):_l(t.sort)}`},initialSort:{validate:t=>Ct(t.initialSort)||ot(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):_l(t.initialSort)}`},sortingOrder:{validate:t=>{const i=t.sortingOrder;if(Array.isArray(i)&&i.length>0){const o=i.filter(s=>!(Ct(s)||ot(s)));if(o.length>0)return N(324,{property:"sortingOrder",invalidItems:o})}else if(!Array.isArray(i)||!i.length)return N(325,{property:"sortingOrder",value:i});return null}},type:{validate:t=>{const i=t.type;return i instanceof Array?i.some(s=>typeof s!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof i=="string"?null:N(321,{property:"colDef.type",expected:"of type `string` | `string[]`"})}},rowSpan:{validate:(t,{suppressRowTransform:i})=>i?null:N(319,{feature:"`colDef.rowSpan`",requirement:"`suppressRowTransform` to be enabled"})},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:i,cellSelection:o,enableCellSpan:s,rowDragEntireRow:r,enableCellTextSelection:n})=>typeof i=="object"&&i?.mode==="singleRow"&&i?.enableClickSelection?N(318,{feature:"`colDef.spanRows`",conflictsWith:"`rowSelection.clickSelection`"}):o?N(318,{feature:"`colDef.spanRows`",conflictsWith:"`cellSelection`"}):s?r?N(318,{feature:"`colDef.spanRows`",conflictsWith:"`rowDragEntireRow`"}):n?N(318,{feature:"`colDef.spanRows`",conflictsWith:"`enableCellTextSelection`"}):null:N(319,{feature:"`colDef.spanRows`",requirement:"`enableCellSpan` to be enabled"})},groupHierarchy:{validate(t,{groupHierarchyConfig:i={}},o){const s=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),r=[];for(const n of t.groupHierarchy??[]){if(typeof n=="object"){o.validation?.validateColDef(n);continue}!s.has(n)&&!(n in i)&&r.push(bm(n))}if(r.length>0){const n=`The following parts of colDef.groupHierarchy are not recognised: ${r.join(", ")}.`,l=`Choose one of ${[...s].map(bm).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${n}
${l}`}return null}}}),C4={headerName:void 0,headerNameEditable:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltip:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,valueIndex:void 0,initialValueIndex:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,calculatedExpression:void 0,calculatedColumnReadOnly:void 0,showValuesAs:void 0,initialShowValuesAs:void 0,showValuesAsDef:void 0,enableShowValuesAs:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,pivotSort:void 0,initialPivotSort:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,columnMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0,suppressNoteActions:void 0},v4=()=>Object.keys(C4),ym,w4=()=>ym??(ym=(()=>{const e=v4(),t=p4();return{objectName:"colDef",allProperties:e,allValidNames:Sm(e,t),docsUrl:"column-properties/",deprecations:t,validations:m4()}})()),Rm=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","noteTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],S4=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","defaultPdfExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","toolbar","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","notesDataSource","calculatedColumns","columnHeaderEdit","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],b4=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","paginationPanels","suppressOverlays"],Oa=["rowHeight","detailRowHeight","rowBuffer","stickyRowsMaxViewportRatio","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","masterDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","noteShowDelay","noteHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","contentVisibilityAutoDelay","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],y4=["theme","rowSelection"],Ga=["autoGenerateColumnDefs","cellSelection","sideBar","rowNumbers","loadingRows","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],Na=["loading","loadThemeGoogleFonts","suppressInputClearButton","enableInputAutoComplete","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","alwaysShowGrandTotalRow","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","suppressPdfExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressContentVisibilityAuto","enableContentVisibilityAuto","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","includeHiddenColumnsInCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","pivotPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],Em=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","processFileInput","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","getColumnMenuItems","getColumnDropZoneMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","isMasterOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition","processAutoGeneratedColumnDefs"],xm=()=>[...b4,...S4,...Rm,...Oa,...Em,...Na,...Ga,...y4],R4=()=>[...Rm,...Oa,...Em,...Na,...Ga],E4=()=>({onCalculatedColumnExpressionChanged:{version:"36.3",message:"Use `onCalculatedColumnChanged` and check `event.changes.calculatedExpression` 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."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."},suppressContentVisibilityAuto:{version:"36.1",message:"Use `enableContentVisibilityAuto` instead."},debug:{version:"36.3",message:"Use `enableDevValidations({ debug: true })` instead."}});function $e(e,t,i){return typeof t=="number"||t==null?t==null||t>=i?null:N(317,{property:String(e),min:i}):`${e}: value should be a number`}var x4={autoGenerateColumnDefs:"AutoGenerateColumns",processFileInput:"FileInputOverlay",alignedGrids:"AlignedGrids",alwaysShowGrandTotalRow:["CsrmHierarchy","ServerSideRowModel"],allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",calculatedColumns:"CalculatedColumns",columnHeaderEdit:"ColumnHeaderEdit",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getColumnMenuItems:["ColumnMenu","ColumnsToolPanel"],getColumnDropZoneMenuItems:["RowGroupingPanel","ColumnsToolPanel"],getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"RowGrouping",grandTotalRow:["CsrmHierarchy","ServerSideRowModel"],initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isMasterOpenByDefault:"MasterDetail",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDefaultExpanded:"MasterDetail",masterDetail:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"MasterDetail",notesDataSource:"Notes",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"Pivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"RowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:(e,t)=>t.rowModelType==="serverSide"?"ServerSideRowModel":"TreeData",toolbar:"Toolbar",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},F4=["isColumnReferenceable","getValidationErrors","processColDef"],P4=new Set(["columns","functions","operators"]);function D4(e){for(const r of F4){const n=e[r];if(n!=null&&typeof n!="function")return N(321,{property:`calculatedColumns.${r}`,expected:"a function"})}const{dataTypes:t,expressionPickers:i,applyMode:o,applyDebounce:s}=e;return t!=null&&(!Array.isArray(t)||t.some(r=>typeof r!="string"))?N(321,{property:"calculatedColumns.dataTypes",expected:"an array of strings"}):i!=null&&(!Array.isArray(i)||i.some(r=>!P4.has(r)))?"calculatedColumns.expressionPickers should contain only 'columns', 'functions' or 'operators'.":o!=null&&o!=="live"&&o!=="deferred"?N(320,{property:"calculatedColumns.applyMode",allowed:["live","deferred"]}):s!==void 0&&(!Number.isInteger(s)||s<0)?N(321,{property:"calculatedColumns.applyDebounce",expected:"a non-negative integer"}):null}var M4=()=>{const e={autoSizePadding:{validate({autoSizePadding:i}){return $e("autoSizePadding",i,0)}},calculatedColumns:{validate({calculatedColumns:i}){return i==null||typeof i=="boolean"?null:typeof i!="object"||Array.isArray(i)?N(321,{property:"calculatedColumns",expected:"a boolean or an object"}):D4(i)}},columnHeaderEdit:{validate({columnHeaderEdit:i}){if(i==null)return null;if(typeof i!="object"||Array.isArray(i))return N(321,{property:"columnHeaderEdit",expected:"an object"});const{applyMode:o}=i;return o!=null&&o!=="live"&&o!=="deferred"?N(320,{property:"columnHeaderEdit.applyMode",allowed:["live","deferred"]}):null}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:i}){return $e("cacheBlockSize",i,1)}},cacheOverflowSize:{validate({cacheOverflowSize:i}){return $e("cacheOverflowSize",i,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:i=>{const o=i.domLayout,s=["autoHeight","normal","print"];return o&&!s.includes(o)?N(320,{property:"domLayout",allowed:s,value:o}):null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,pinnedTopRowData:o,pinnedBottomRowData:s}){return i&&(o||s)?N(318,{feature:"Manual row pinning",conflictsWith:"pinned row data",advice:"Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`."}):null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,isRowPinnable:o,pinnedTopRowData:s,pinnedBottomRowData:r}){return o&&(s||r)?N(318,{feature:"Manual row pinning",conflictsWith:"pinned row data",advice:"Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`."}):!i&&o?N(319,{feature:"`isRowPinnable`",requirement:"`enableRowPinning` to be set"}):null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,isRowPinned:o,pinnedTopRowData:s,pinnedBottomRowData:r}){return o&&(s||r)?N(318,{feature:"Manual row pinning",conflictsWith:"pinned row data",advice:"Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`."}):!i&&o?N(319,{feature:"`isRowPinned`",requirement:"`enableRowPinning` to be set"}):null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},masterDefaultExpanded:{supportedRowModels:["clientSide"]},isMasterOpenByDefault:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:i,groupHideOpenParents:o,groupDisplayType:s}){return i&&!o&&s!=="multipleColumns"?N(319,{feature:"`groupHideColumnsUntilExpanded = true`",requirement:"either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`"}):null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},groupDisplayType:{required:[void 0,"multipleColumns"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:i={}},o,s){for(const r of Object.keys(i))s.validation?.validateColDef(i[r]);return null}},icons:{validate:({icons:i})=>{if(i){if(i.smallDown)return Ft(262);if(i.smallLeft)return Ft(263);if(i.smallRight)return Ft(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:i}){return $e("infiniteInitialRowCount",i,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:i=>{if(typeof i.ssrmExpandAllAffectsAllRows=="boolean"){if(i.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(i.ssrmExpandAllAffectsAllRows&&typeof i.getRowId!="function")return N(319,{feature:"Server Side Row Model grouping",requirement:"the `getRowId` callback"})}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:i}){return $e("keepDetailRowsCount",i,1)}},paginationPageSize:{validate({paginationPageSize:i}){return $e("paginationPageSize",i,1)}},paginationPageSizeSelector:{validate:i=>{const o=i.paginationPageSizeSelector;return typeof o=="boolean"||o==null||o.length?null:`'paginationPageSizeSelector' cannot be an empty array.
                    If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},paginationPanels:{validate:({paginationPanels:i})=>{const o=new Set(["pageSize","rowSummary","pageSummary","pageNumbers"]);return i!=null&&!Array.isArray(i)?N(323,{validNames:Array.from(o)}):i?.some(s=>typeof s=="string"?!o.has(s):typeof s=="object"&&s!==null?!o.has(s.type):!0)?N(323,{validNames:Array.from(o)}):null}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:i}){return $e("rowBuffer",i,0)}},rowClass:{validate:i=>typeof i.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:i}){return i&&typeof i=="string"?vm(306,{version:"32.2.1",name:'using `rowSelection` with the values "single" or "multiple"',message:"Use the object value instead."}):i&&typeof i!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":i&&i.mode!=="multiRow"&&i.mode!=="singleRow"?N(320,{property:"Selection mode",allowed:["singleRow","multiRow"],value:i.mode}):null}},rowStyle:{validate:i=>{const o=i.rowStyle;return o&&typeof o=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},loadingRows:{validate({loadingRows:i,rowModelType:o}){if(i==null||i===!1)return null;if(i!==!0&&(typeof i!="object"||Array.isArray(i)))return N(321,{property:"loadingRows",expected:"a boolean or an object"});if(o!=null&&o!=="clientSide")return"`loadingRows` is only supported with the Client-Side Row Model.";const s=typeof i=="object"?i.rowCount:void 0;return s!=null&&(!Number.isInteger(s)||s<1)?"loadingRows.rowCount: value should be an integer greater than or equal to 1":null}},notesDataSource:{validate:({getRowId:i})=>i?null:N(319,{feature:"Notes",requirement:"the `getRowId` callback"})},noteHideDelay:{validate:i=>i.noteHideDelay!=null&&i.noteHideDelay<0?N(317,{property:"noteHideDelay",min:0}):null},noteShowDelay:{validate:i=>i.noteShowDelay!=null&&i.noteShowDelay<0?N(317,{property:"noteShowDelay",min:0}):null},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:i}){return $e("serverSideInitialRowCount",i,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:i=>{const o=i.sortingOrder;if(Array.isArray(o)&&o.length>0){const s=o.filter(r=>!pe(r));if(s.length>0)return N(324,{property:"sortingOrder",invalidItems:s})}else if(!Array.isArray(o)||!o.length)return N(325,{property:"sortingOrder",value:o});return null}},stickyRowsMaxViewportRatio:{validate({stickyRowsMaxViewportRatio:i}){return i==null||typeof i=="number"&&i>=0&&i<=1?null:"stickyRowsMaxViewportRatio: value should be a number between 0 and 1"}},tooltipHideDelay:{validate:i=>i.tooltipHideDelay&&i.tooltipHideDelay<0?N(317,{property:"tooltipHideDelay",min:0}):null},tooltipShowDelay:{validate:i=>i.tooltipShowDelay&&i.tooltipShowDelay<0?N(317,{property:"tooltipShowDelay",min:0}):null},tooltipSwitchShowDelay:{validate:i=>i.tooltipSwitchShowDelay&&i.tooltipSwitchShowDelay<0?N(317,{property:"tooltipSwitchShowDelay",min:0}):null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:i=>{const o=i.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:r,getDataPath:n,getRowId:l}=i;if(!s&&!r&&!n)return N(319,{feature:"`treeData`",requirement:"either `treeDataChildrenField` or `treeDataParentIdField` or `getDataPath` in the `clientSide` row model"});if(s){if(n)return N(318,{feature:"`treeDataChildrenField`",conflictsWith:"`getDataPath`"});if(r)return N(318,{feature:"`treeDataChildrenField`",conflictsWith:"`treeDataParentIdField`"})}if(r){if(!l)return"getRowId callback not provided, tree data with parent id cannot be built.";if(n)return N(318,{feature:"`treeDataParentIdField`",conflictsWith:"`getDataPath`"})}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`;return i.isServerSideGroup&&i.getServerSideGroupKey?null:s}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:i}){return $e("viewportRowModelBufferSize",i,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:i}){return $e("viewportRowModelPageSize",i,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:i,showOpenedGroup:o}){return i?.field&&o?N(318,{feature:"`autoGroupColumnDef.field`",conflictsWith:"`showOpenedGroup`"}):i?.valueGetter&&o?N(318,{feature:"`autoGroupColumnDef.valueGetter`",conflictsWith:"`showOpenedGroup`"}):null}},renderingMode:{validate:i=>{const o=i.renderingMode,s=["default","legacy"];return o&&!s.includes(o)?N(320,{property:"renderingMode",allowed:s,value:o}):null}},autoSizeStrategy:{validate:({autoSizeStrategy:i})=>{if(!i)return null;const o=["fitCellContents","fitGridWidth","fitProvidedWidth"],s=i.type;return s!=="fitCellContents"&&s!=="fitGridWidth"&&s!=="fitProvidedWidth"?N(320,{property:"autoSizeStrategy",allowed:o,value:s}):s==="fitProvidedWidth"&&typeof i.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${i.width}`:i.shouldAutoSizeColumns!==void 0&&!i.continuous?"The `shouldAutoSizeColumns` auto-size option only applies when `continuous` is true.":null}}},t={};for(const i of Na)t[i]={expectedType:"boolean"};for(const i of Oa)t[i]={expectedType:"number"};return he(t,e),t},Fm,T4=()=>Fm??(Fm=(()=>{const e=[...xm(),...Object.values(Ha)],t=E4(),i=["api"];return{objectName:"gridOptions",allProperties:e,allValidNames:Sm(e,t,i),propertyExceptions:i,docsUrl:"grid-options/",deprecations:t,validations:M4()}})()),A4=0,I4=0,Pm="__ag_grid_instance",k4=new Set(tr.filter(e=>!wi.has(e))),L4=class extends y{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=I4++,this.gridReadyFired=!1,this.gridReadyStarted=!1,this.queueEvents=[],this.propEventSvc=new a4}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions);const e=this.eventSvc,t=this.onGlobalEvent.bind(this);e.addGlobalListener(t,!0,k4),e.addGlobalListener(t,!1,wi),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:i})=>{this.updateGridOptions({options:i,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??_c[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return mm(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>e(this.addCommon(i)))}updateGridOptions({options:e,force:t,source:i="api"}){const o={id:A4++,properties:[]},s=[],{gridOptions:r,validation:n}=this;for(const l of Object.keys(e)){const a=ki.applyGlobalGridOption(l,e[l]);n?.warnOnInitialPropertyUpdate(i,l);const d=t||typeof a=="object"&&i==="api",c=r[l];if(d||c!==a){r[l]=a;const u={type:l,currentValue:a,previousValue:c,changeSet:o,source:i};s.push(u)}}this.validateGridOptions(this.gridOptions),o.properties=s.map(l=>l.type);for(const l of s)Rt(this,`Updated property ${l.type} from`,l.previousValue," to ",l.currentValue),this.propEventSvc.dispatchEvent(l)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}onGlobalEvent(e,t){if(!this.isAlive())return;const i=e;if(this.gridReadyFired||i==="issueRaised"||i==="gridPreDestroyed"&&this.gridReadyStarted)this.callEventHandler(i,t);else if(i==="gridReady"){this.gridReadyStarted=!0,this.callEventHandler(i,t),this.gridReadyFired=!0;for(const o of this.queueEvents)this.callEventHandler(o.eventName,o.event);this.queueEvents=[]}else this.queueEvents.push({eventName:i,event:t})}callEventHandler(e,t){const i=this.gridOptions[Ha[e]];typeof i=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>i(t))}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t,i=""){for(const o of Object.keys(e)){const s=e[o];if(s==null||s===!1)continue;let r=t[o];typeof r=="function"&&(r=r(e,this.gridOptions,this.beans)),r&&this.assertModuleRegistered(r,`\`${i}${o}\``)}}validateGridOptions(e){this.validateOptions(e,x4),this.validation?.processGridOptions(e)}validateColDef(e,t,i){(i||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,f4,"colDef."),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const i=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return i||hp({...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Jg(),rowModelType:this.get("rowModelType"),isUmd:Ll(),usesAgGridProvider:this.beans.frameworkOverrides.usesAgGridProvider??!1}}isModuleRegistered(e){return Yg(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[Pm]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const i=t[Pm];if(mm(i))return i===this.instanceId;t=t.parentElement}return!1}};import{RefPlaceholder as ce,_removeFromParent as Dm,_setDisplayed as Mo,_toString as V4}from"ag-stack";function _a(e,t,i){e.addManagedElementListeners(t,{mousedown:s=>{s.button===0&&i()==="opened"&&s.preventDefault()},click:s=>{s.detail===0&&i()}});const o=new wt(t,!0);o.addEventListener("tap",i),e.addDestroyFunc(()=>o.destroy())}var H4=class extends y{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:i,gos:o}=this.beans;if(!(pt(o)?e.altKey:!0))i?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){const r=this.column.isMoving(),l=Date.now()-this.lastMovingChanged<50;r||l||t?.progressSortFromEvent(this.column,e)}}};function B4(e,t,i,o){const s={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:s},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:s},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,t?{tag:"span",ref:"eCalculatedColumn",cls:"ag-header-icon ag-calculated-column-icon",attrs:s}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:s},o?{tag:"span",ref:"eShowValuesAs",cls:"ag-header-icon ag-header-label-icon ag-show-values-as-icon",attrs:s}:null,i?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var Mm=class extends K{constructor(){super(...arguments),this.eFilter=ce,this.eShowValuesAs=ce,this.eFilterButton=ce,this.eSortIndicator=ce,this.eMenu=ce,this.eLabel=ce,this.eText=ce,this.eColRef=ce,this.eCalculatedColumn=ce,this.eSortOrder=ce,this.eSortAsc=ce,this.eSortDesc=ce,this.eSortMixed=ce,this.eSortNone=ce,this.eSortAbsoluteAsc=ce,this.eSortAbsoluteDesc=ce,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const i={...e};he(i,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(i)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:i,showValuesAsSvc:o}=this.beans,s=e.template;return s?s?.trim?s.trim():s:B4(!!i?.active,e.column.isCalculatedCol,t,!!o)}init(e){this.params=e;const{sortSvc:t,touchSvc:i,rowNumbersSvc:o,userCompFactory:s}=this.beans,r=t?.SortIndicatorSelector;this.currentTemplate=this.workOutTemplate(e,!!r),this.setTemplate(this.currentTemplate,r?[r]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new H4(e.column,this.eLabel)))),i?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),this.setupCalculatedColumnIcon(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.setupShowValuesAsIcon(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const i=ub(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText&&this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,i=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||i===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=V4(t))}addInIcon(e,t,i){const o=X(e,this.beans,i);o&&t.appendChild(o)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Dm(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:i}=this,o=ge(e);this.addInIcon(o?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!o);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,_a(this,t,()=>this.toggleColumnMenu(t)),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:i}=this;t||this.toggleMenuAlwaysShow(!0),i.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}toggleColumnMenu(e){const{currentSuppressMenuHide:t,params:i}=this,o=this.beans.menuSvc?.toggleColumnMenu({column:i.column,buttonElement:e,getButtonElement:()=>pi(this.beans,i.column),positionBy:"button",onClosedCallback:()=>{t||this.toggleMenuAlwaysShow(!1)}})??"declined";return o==="opened"&&!t&&this.toggleMenuAlwaysShow(!0),o}onMenuKeyboardShortcut(e){const{params:t,gos:i,beans:o,eMenu:s,eFilterButton:r}=this,n=t.column,l=ge(i);if(e&&!l){if(o.menuSvc?.isFilterMenuInHeaderEnabled(n))return t.showFilter(r??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??r??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:i}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(new e.SortIndicatorComp(!0));const{eSortIndicator:o,eSortOrder:s,eSortAsc:r,eSortDesc:n,eSortMixed:l,eSortNone:a,eSortAbsoluteAsc:d,eSortAbsoluteDesc:c}=this;o.attachCustomElements(s,r,n,l,a,d,c)}this.eSortIndicator.setupSort(i),this.currentSort&&e.setupHeader(this,i)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:i}=this;e&&(this.currentRef=i.column.formulaRef,e.textContent=this.currentRef,Mo(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const o=t?.getEditPositions(),s=!!this.currentRef&&!!o?.some(r=>r.column.allowFormula);Mo(e,s)},cellEditingStopped:()=>{Mo(e,!1)}}))}setupCalculatedColumnIcon(){const{eCalculatedColumn:e,params:t}=this;e&&this.addInIcon("calculatedColumnsHeader",e,t.column)}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const i=()=>{const o=t.column.isFilterActive();Mo(e,o,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,i,"filterActive")}setupShowValuesAsIcon(){const{eShowValuesAs:e,params:t}=this,{showValuesAsSvc:i}=this.beans;if(!e||!i)return;const o=t.column;this.addInIcon("showValuesAs",e,o);const s=()=>{const n=o.showValuesAs!=null&&!o.showValuesAsDef?.suppressHeaderIndicator;Mo(e,n,{skipAriaHidden:!0}),n&&(e.classList.toggle("ag-show-values-as-dormant",!i.isApplying(o)),e.title=i.getActiveModeTooltip(o)??"")};this.addManagedListeners(o,{columnStateUpdated:s}),this.addManagedEventListeners({columnRowGroupChanged:s,columnPivotChanged:s,columnPivotModeChanged:s}),s()}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?_a(this,e,()=>this.beans.menuSvc?.toggleFilterMenu({column:t.column,buttonElement:e,getButtonElement:()=>pi(this.beans,t.column,!0),containerType:"columnFilter",positionBy:"button"})??"declined"):this.eFilterButton=void 0}configureFilter(e,t,i,o){if(!e)return Dm(t),!1;const s=this.params.column;return this.addInIcon(o,t,s),this.addManagedListeners(s,{filterChanged:i}),i(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:i}=this;return e?t??i??this.getGui():i??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}};import{RefPlaceholder as za,_exists as Tm,_setDisplayed as bi,_toString as Am}from"ag-stack";var O4="calc(var(--ag-cell-horizontal-padding) + var(--ag-internal-pinned-left-width, 0px))",G4="calc(var(--ag-cell-horizontal-padding) + var(--ag-internal-pinned-right-width, 0px))",N4=class extends y{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:i}=t;i.whenReady(this,()=>{const o=this.refreshPosition.bind(this);this.gos.get("enableRtl")?this.eLabel.style.setProperty("right",G4):this.eLabel.style.setProperty("left",O4),this.addManagedEventListeners({bodyScroll:s=>{s.direction==="horizontal"&&this.updateSticky(s.left)},columnResized:o}),this.addManagedListeners(e,{leftChanged:o,displayedChildrenChanged:o}),this.refreshPosition()})}refreshPosition(){const{columnGroup:e,beans:t}=this,i=e.getLeft(),o=e.getActualWidth();if(e.pinnedLane!==1||i==null||o===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=i,this.right=i+o;const s=t.colViewport.getScrollPosition();s!=null&&this.updateSticky(s)}updateSticky(e){const{left:t,right:i}=this;if(t==null||i==null){this.setSticky(!1);return}this.setSticky(t<e&&i>e)}setSticky(e){const{isSticky:t,eLabel:i}=this;t!==e&&(this.isSticky=e,i.classList.toggle("ag-sticky-label",e))}},_4={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},z4=class extends K{constructor(){super(_4),this.agOpened=za,this.agClosed=za,this.agLabel=za,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:i}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),i?.setupForHeaderGroup(this)}refresh(e){const{innerHeaderGroupComponent:t,isLoadingInnerComponent:i}=this;if(i)return!1;if(t){if(!t.refresh)return!1;const s=t.refresh(e);return s&&(this.params=e),s}this.params=e;const{displayName:o}=e;return this.agLabel.textContent=Tm(o)?Am(o):"",!0}checkWarnings(){this.params.template&&this.beans.log.warn(89)}workOutInnerHeaderGroupComponent(e,t){const i=gb(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderGroupComponent=o,this.agLabel.appendChild(o.getGui())):this.destroyBean(o))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const o=l=>{if(Ae(l))return;const a=!i.isExpanded();zi(this.beans,i.getProvidedColumnGroup(),a,"uiColumnExpanded")};this.addTouchAndClickListeners(t,o),this.addTouchAndClickListeners(e,o);const s=l=>{bt(l)};this.addManagedElementListeners(t,{dblclick:s}),this.addManagedElementListeners(e,{dblclick:s}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();const r=i.getProvidedColumnGroup(),n=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:n,expandableChanged:n})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){const o=i.isExpanded();bi(e,o),bi(t,!o)}else bi(e,!1),bi(t,!1)}addInIcon(e,t){const i=X(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:i}=this;bi(t,!1),bi(i,!1)}}setupLabel(e){const{displayName:t,columnGroup:i}=e,{innerHeaderGroupComponent:o,isLoadingInnerComponent:s}=this,r=o??s;Tm(t)&&!r&&(this.agLabel.textContent=Am(t)),i.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new N4(this.getGui(),i))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},W4={moduleName:"ColumnHeaderComp",version:E,userComponents:{agColumnHeader:Mm},icons:{menu:"menu",menuAlt:"menu-alt"}},U4={moduleName:"ColumnGroupHeaderComp",version:E,userComponents:{agColumnGroupHeader:z4},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}};import{_requestAnimationFrame as Im}from"ag-stack";var q4=class extends y{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0,this.onFrame=()=>{const{p1:e,p2:t,f1:i,destroyTasks:o}=this;try{this.runFrameTasks(60)}finally{e.list.length||t.list.length||i.list.length||o.length?Im(this.beans,this.onFrame):this.ticking=!1}}}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&this.warn(92)}createTask(e,t,i,o,s=!1){this.verify();let r=i;o&&this.batchFrameworkComps&&(r="f1");const n={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[r],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((i,o)=>i.deferred!==o.deferred?i.deferred?-1:1:i.index!==o.index?t*(o.index-i.index):o.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}runFrameTasks(e){const{p1:t,p2:i,f1:o,destroyTasks:s,beans:r}=this,{ctrlsSvc:n,frameworkOverrides:l}=r,a=t.list,d=i.list,c=o.list,u=Date.now();let h=0;const g=e<=0,p=n.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded())if(a.length)this.sortTaskList(t),a.pop().task();else if(d.length)this.sortTaskList(i),d.pop().task();else if(c.length)l.wrapOutgoing(()=>{for(;(g||h<e)&&!p.scrollGridIfNeeded();){if(c.length)this.sortTaskList(o),c.pop().task();else break;h=Date.now()-u}});else if(s.length)s.pop()();else break;h=Date.now()-u}}flushAllFrames(){this.active&&(this.runFrameTasks(-1),this.ticking=!1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,Im(this.beans,this.onFrame)))}isQueueEmpty(){return!this.ticking}},$4={moduleName:"AnimationFrame",version:E,beans:[q4]},K4=class extends y{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return X(e,this.beans,t?.column)}};import{_isEventFromThisInstance as km,_isEventSupported as j4,_isIOSUserAgent as Wa}from"ag-stack";import{_isBrowserSafari as Z4,_isElementChildOfClass as Lm,_isFocusableFormField as Q4}from"ag-stack";function Y4(e,t,i,o){if(!Ae(o))switch(i){case"click":J4(e,t,o);break;case"pointerdown":case"mousedown":case"touchstart":X4(e,t,o);break;case"dblclick":Vm(e,t,o);break;case"mouseout":iD(e,t,o);break;case"mouseover":oD(e,t,o);break}}function J4(e,t,i){if(e.touchSvc?.handleCellDoubleClick(t,i))return;const{eventSvc:o,rangeSvc:s,editSvc:r,editModelSvc:n,frameworkOverrides:l,gos:a}=e,d=i.ctrlKey||i.metaKey,{column:c,cellPosition:u,rowNode:h}=t,g=no(a,c,h,i);s&&d&&!g&&s.getCellRangeCount(u)>1&&s.intersectLastRange(!0);const p=t.createEvent(i,"cellClicked");p.isEventHandlingSuppressed=g,o.dispatchEvent(p);const f=c.colDef;if(f.onCellClicked&&window.setTimeout(()=>{l.wrapOutgoing(()=>{f.onCellClicked(p)})},0),!g&&n?.getState(t)!=="editing"){const m=r?.isEditing(),w=r?.isRangeSelectionEnabledWhileEditing(),v=n?.getCellValidationModel().getCellValidationMap().size??0,S=n?.getRowValidationModel().getRowValidationMap().size??0;if(m&&(w||v>0||S>0))return;r?.shouldStartEditing(t,i)?r?.startEditing(t,{event:i}):r?.shouldStopEditing(t,i)&&(a.get("editType")==="fullRow"?r?.stopEditing(t,{event:i,source:"edit"}):r?.stopEditing(void 0,{event:i,source:"edit"}))}}function Vm(e,t,i){const{eventSvc:o,frameworkOverrides:s,editSvc:r,editModelSvc:n,gos:l}=e,{column:a}=t,d=no(l,t.column,t.rowNode,i),c=a.colDef,u=t.createEvent(i,"cellDoubleClicked");if(u.isEventHandlingSuppressed=d,o.dispatchEvent(u),typeof c.onCellDoubleClicked=="function"&&window.setTimeout(()=>{s.wrapOutgoing(()=>{c.onCellDoubleClicked(u)})},0),!d&&r?.shouldStartEditing(t,i)&&n?.getState(t)!=="editing"){const h=r?.isEditing(),g=r?.isRangeSelectionEnabledWhileEditing(),p=n?.getCellValidationModel().getCellValidationMap().size??0,f=n?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(g||p>0||f>0))return;r?.startEditing(t,{event:i})}}function X4(e,t,i){const{shiftKey:o}=i,s=i.target,{eventSvc:r,rangeSvc:n,rowNumbersSvc:l,focusSvc:a,gos:d,editSvc:c}=e,{column:u,rowNode:h,cellPosition:g}=t,p=no(d,u,h,i),f=()=>{const S=t.createEvent(i,"cellMouseDown");S.isEventHandlingSuppressed=p,r.dispatchEvent(S)};if(p){f();return}if(eD(e,t,i))return;const m=n&&!n.isEmpty(),w=tD(s),v=fe(u);if(!(l&&v&&!l.handleMouseDownOnCell(g,i))){if(!o||!m){const S=c?.isEditing(t),b=d.get("enableCellTextSelection")&&i.defaultPrevented,R=(Z4()||b)&&!S&&!Q4(s)&&!w;t.focusCell({forceBrowserFocus:R,sourceEvent:i})}if(o&&m&&!a.isCellFocused(g)){i.preventDefault();const S=a.getFocusedCell();if(S){const{column:C,rowIndex:b,rowPinned:R}=S,x=!!c?.isRangeSelectionEnabledWhileEditing?.();c?.isEditing(S)&&!x&&c?.stopEditing(S),x||a.setFocusedCell({column:C,rowIndex:b,rowPinned:R,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:i})}}w||(n?.handleCellMouseDown(i,g),f())}}function eD(e,t,i){const{rangeSvc:o}=e;if(o){const s=o.isCellInAnyRange(t.cellPosition),r=ru(e,i);if(s&&r)return!0}return!1}function tD(e){return Lm(e,"ag-selection-checkbox",3)||Lm(e,"ag-drag-handle",3)}function iD(e,t,i){if(Hm(t,i))return;const{eventSvc:o,colHover:s}=e;o.dispatchEvent(t.createEvent(i,"cellMouseOut")),s?.clearMouseOver()}function oD(e,t,i){if(Hm(t,i))return;const{eventSvc:o,colHover:s}=e;o.dispatchEvent(t.createEvent(i,"cellMouseOver")),s?.setMouseOver([t.column])}function Hm(e,t){if(!t.target||!t.relatedTarget)return!1;const i=e.eGui,o=i.contains(t.target),s=i.contains(t.relatedTarget);return o&&s}var sD=(e,t,i)=>t||e&&i,rD=class extends y{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eGridViewport,t,{shouldHandleLongTap:()=>this.isBodyContextMenuEnabled()})}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t,{shouldHandleLongTap:()=>!!this.beans.menuSvc?.isHeaderContextMenuEnabled()})}mockRowContextMenu(e){if(!Wa())return;const t=(i,o,s)=>{const{rowCtrl:r,cellCtrl:n}=e.getControlsForEventTarget(s?.target??null);this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,r,n)};this.mockContextMenu(e,e.element,t,{shouldHandleLongTap:()=>this.isBodyContextMenuEnabled(),onLongTapDetected:({touchEvent:i})=>{if(!km(this.beans,i))return;e.confirmPendingTouchDown(i.target);const{cellCtrl:o}=e.getControlsForEventTarget(i.target);o?.column&&o.dispatchCellContextMenuEvent(i)}})}handleCellDoubleClick(e,t){return(()=>{if(!Wa()||j4("dblclick"))return!1;const o=Date.now(),s=o-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=o,s})()?(Vm(this.beans,e,t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:i,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:r,eFilterButton:n}=e,l=new wt(e.getGui(),!0);e.addDestroyFunc(()=>l.destroy());const a=e.shouldSuppressMenuHide(),d=!!o?.isHeaderContextMenuEnabled(s.column),c=sD(s.enableMenu,d,ge(t)),u=h=>s.showColumnMenuAfterMouseClick(h.touchStart);if(c&&e.addManagedListeners(l,{longTap:u}),s.enableSorting){const h=g=>{const p=g.touchStart.target;a&&(r?.contains(p)||n?.contains(p))||i?.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(l,{tap:h})}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const i=new wt(t.eGridHeader,!0),o=s=>t.showColumnMenuAfterMouseClick(s.touchStart);e.addManagedListeners(i,{longTap:o}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,i){const o=new wt(t,!0);e.addManagedListeners(o,{tap:i}),e.addDestroyFunc(()=>o.destroy())}isBodyContextMenuEnabled(){return!!this.beans.contextMenuSvc&&!this.gos.get("suppressContextMenu")}mockContextMenu(e,t,i,o){if(!Wa())return;const s=new wt(t,o),r=n=>{km(this.beans,n.touchEvent)&&i(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(s,{longTap:r}),e.addDestroyFunc(()=>s.destroy())}},nD={moduleName:"Touch",version:E,beans:[rD]};import{KeyCode as Xt,_last as lD,_missing as Bm}from"ag-stack";var aD=class extends y{constructor(){super(...arguments),this.beanName="cellNavigation"}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===Xt.UP,o=e===Xt.DOWN,s=e===Xt.LEFT;let r,n;const{pageBounds:l,gos:a,visibleCols:d,pinnedRowModel:c}=this.beans,{rowPinned:u}=t;if(i||o)u&&c?i?n=0:n=u==="top"?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:n=i?l.getFirstRow():l.getLastRow(),r=t.column;else{const h=a.get("enableRtl");n=t.rowIndex,r=(s!==h?d.allCols:[...d.allCols].reverse()).find(p=>!fe(p)&&this.isCellGoodToFocusOn({rowIndex:n,rowPinned:null,column:p}))}return r?{rowIndex:n,rowPinned:u,column:r}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,o=!1;for(;!o;){switch(e){case Xt.UP:i=this.getCellAbove(i);break;case Xt.DOWN:i=this.getCellBelow(i);break;case Xt.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case Xt.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,this.warn(8,{key:e});break}i?o=this.isCellGoodToFocusOn(i):o=!0}return i}isCellGoodToFocusOn(e){const t=e.column;let i;const{pinnedRowModel:o,rowModel:s}=this.beans;switch(e.rowPinned){case"top":i=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":i=o?.getPinnedBottomRow(e.rowIndex);break;default:i=s.getRow(e.rowIndex);break}return i?!this.isSuppressNavigable(t,i):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const{beans:t}=this,i=t.rowSpanSvc?.getCellEnd(e)??e,o=Yn(t,i,!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){if(!e)return null;const{beans:t}=this,i=t.rowSpanSvc?.getCellStart(e)??e,o=io(t,{rowIndex:i.rowIndex,rowPinned:i.rowPinned},!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:i}=this.beans,o=t.allCols;let s=e.rowIndex,r=e.rowPinned,n=t.getColAfter(e.column);if(!n){n=o[0];const l=Yn(this.beans,e,!0);if(Bm(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??!0))return null;s=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:s,column:n,rowPinned:r}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:i,pagination:o}=t,s=i.allCols;let r=e.rowIndex,n=e.rowPinned,l=i.getColBefore(e.column);if(!l){l=lD(s);const a=io(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Bm(a)||!a.rowPinned&&!(o?.isRowInPage(a.rowIndex)??!0))return null;r=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:r,column:l,rowPinned:n}}isSuppressNavigable(e,t){if(Ye(this.gos,t))return!0;const{suppressNavigable:i}=e.colDef;if(typeof i=="boolean")return i;if(typeof i=="function"){const o=e.createColumnFunctionCallbackParams(t);return i(o)}return!1}};function dD(e){return e.focusSvc.getFocusedCell()}function cD(e){return e.focusSvc.clearFocusedCell()}function uD(e,t,i,o){e.focusSvc.setFocusedCellOrSpan({rowIndex:t,column:i,rowPinned:o,forceBrowserFocus:!0})}function hD(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function gD(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function pD(e,t,i=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,i);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})}import{KeyCode as me,_exists as yi,_last as Ua,_missing as Om,_throttle as Gm}from"ag-stack";import{AgPromise as Nm,_addOrRemoveAttribute as fD,_findFocusableElements as mD,_getActiveDomElement as CD,_makeNull as vD,_placeCaretAtEnd as wD,_setAriaColIndex as SD,_setAriaColSpan as bD,_setAriaRowIndex as yD}from"ag-stack";function ir(e){return!!(e.rowPinned&&e.pinnedSibling)}function xe(e,t,i,o){const s=t==="top";if(!i)return xe(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return xe(e,t,i,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let r=!1,n=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===i&&!r){r=!0,l.push(a);return}if(r&&a===o){n=!0,l.push(a);return}r&&!n&&l.push(a)}),l}function _m(e,t,i,{rowNode:o,column:s},r){return G(e.gos,{type:i,node:o,data:o.data,value:r,column:s,colDef:s.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}import{KeyCode as oe,_isMacOsUserAgent as RD}from"ag-stack";function ED(e,t=!1){return e===oe.DELETE?!0:!t&&e===oe.BACKSPACE?RD():!1}function xD(e,t,i){const o=i.key;if(!(o===oe.ENTER&&fe(t.column)&&e.rowNumbersSvc?.handleKeyDownOnCell(t.cellPosition,i)))switch(o){case oe.ENTER:TD(e,t,i);break;case oe.F2:ID(e,t,i);break;case oe.ESCAPE:kD(e,t,i);break;case oe.TAB:DD(e,t,i);break;case oe.BACKSPACE:case oe.DELETE:MD(e,t,o,i);break;case oe.DOWN:case oe.UP:case oe.RIGHT:case oe.LEFT:FD(e,t,i,o);break}}function FD(e,t,i,o){if(!e.editSvc?.isEditing(t,{withOpenEditor:!0})){if(i.shiftKey&&t.isRangeSelectionEnabled())PD(e,i);else{const s=t.getFocusedCellPosition();e.navigation?.navigateToNextCell(i,o,s,!0)}i.preventDefault()}}function PD(e,t){const{rangeSvc:i,navigation:o}=e;if(!i)return;const s=i.extendLatestRangeInDirection(t);s&&(t.key===oe.LEFT||t.key===oe.RIGHT?o?.ensureColumnVisible(s.column):o?.ensureRowVisible(s.rowIndex))}function DD(e,t,i){e.navigation?.onTabKeyDown(t,i)}function MD(e,t,i,o){const{rowNode:s}=t,{gos:r,rangeSvc:n,eventSvc:l,editSvc:a}=e;if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),ED(i,r.get("enableCellEditingOnBackspace"))&&!a?.isEditing(t,{withOpenEditor:!0})){if(n&&Ne(r))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(t.isCellEditable()){const d=e.valueSvc.getDeleteValue(t.column,s);s.setDataValue(t.column,d,"cellClear")}}else a?.isEditing(t,{withOpenEditor:!0})||e.editSvc?.startEditing(t,{startedEdit:!0,event:o});l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}function TD(e,t,i){const{editSvc:o,navigation:s}=e,r=o?.isEditing(t,{withOpenEditor:!0}),n=t.rowNode,l=o?.isRowEditing(n,{withOpenEditor:!0}),a=d=>{o?.startEditing(d,{startedEdit:!0,event:i,source:"edit"})&&i.preventDefault()};if(r||l){if(AD(i)){o?.applyBulkEdit(t,e?.rangeSvc?.getCellRanges()??[]);return}const d=o?.checkNavWithValidationAndCache(void 0,i);if(d?.result==="block-stop"){e.gos.get("editType")==="fullRow"&&o?.announceFullRowEditValidationErrors(n);return}o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:i,source:"edit"},d?.validationCache):l&&!t.isCellEditable()?o?.stopEditing({rowNode:n},{event:i,source:"edit"},d?.validationCache):a(t)}else if(e.gos.get("enterNavigatesVertically")){const d=i.shiftKey?oe.UP:oe.DOWN;s?.navigateToNextCell(null,d,t.cellPosition,!1)}else{if(o?.revalidateAndCheck())return;o?.checkValidated(t)&&o.revertSingleCellEdit(t,!0),a(t)}}function AD(e){return(e.ctrlKey||e.metaKey)&&e.key===oe.ENTER}function ID(e,t,i){const{editSvc:o,notesSvc:s}=e,r=o?.isEditing();if(i.shiftKey&&s?.hasDataSource()&&!r){const n=s.getNoteAccess({rowNode:t.rowNode,column:t.column});if(n&&(!n.isSuppressed||n.canView)){s.showNote(n.params,!0),i.preventDefault();return}}r&&o?.checkNavWithValidation(void 0,i)==="block-stop"||o?.startEditing(t,{startedEdit:!0,event:i})}function kD(e,t,i){const{editSvc:o}=e;o?.isEditing()&&(i.preventDefault(),setTimeout(()=>{o?.stopEditing(t,{event:i,cancel:!0})}))}function LD(e,t,i){const s=i.target!==t.eGui,{editSvc:r}=e;if(s||r?.isEditing(t,{withOpenEditor:!0}))return;if(i.key===oe.SPACE)VD(e,t,i);else if(r?.isCellEditable(t,"ui")){if(r?.revalidateAndCheck()&&!r.checkValidated(t))return;r?.startEditing(t,{startedEdit:!0,event:i,source:"api",editable:!0}),!t.editCompDetails?.params?.suppressPreventDefault&&i.preventDefault()}}function VD(e,t,i){const{gos:o,editSvc:s}=e,{rowNode:r}=t;!s?.isEditing(t,{withOpenEditor:!0})&&Je(o)&&e.selectionSvc?.handleSelectionEvent(i,r,"spaceKey",t.column),i.preventDefault()}var HD="ag-cell",BD="ag-cell-auto-height",OD="ag-cell-normal-height",GD="ag-cell-focus",ND="ag-cell-first-right-pinned",_D="ag-cell-last-left-pinned",zD="ag-cell-not-inline-editing",WD="ag-cell-wrap-text",UD=0,Ri=class extends y{constructor(e,t,i,o,s){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.cellSpan=s,this.diffIndex=0,this.drawnPosition=null,this.drawnWidth=null,this.drawnComp=void 0,this.drawnAriaColIndex=-1,this.drawnAriaColSpan=1,this.compBean=void 0,this.lastIPadMouseClickEvent=0,this.colsSpanning=null,this.colsSpanningVersion=-1,this.legacyRowSpan=1,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.notesFeature=void 0,this.calculatedColumnCssApplied=!1,this.calculatedColumnHighlightedCssApplied=!1,this.hasActiveRenderer=!1,this.suppressRefreshCell=!1,this.pendingEditStart=null,this.hasBeenFocused=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.rendererTooltipValue=void 0,this.rendererTooltipShouldDisplay=void 0,this.beans=i,this.gos=i.gos,this.editSvc=i.editSvc;const{colId:r}=e;this.instanceId=r+"-"+UD++,this.createCellPosition(),this.isClientSideLoadingCell()||this.updateAndFormatValue(!1),s===null&&(this.legacyRowSpan=e.getRowSpan(t))}isClientSideLoadingCell(){return Ye(this.gos,this.rowNode)}addFeatures(e){const{beans:t}=this;this.enableTooltipFeature();const{rangeSvc:i}=t;i&&Ne(t.gos)&&(this.rangeFeature=i.createCellRangeFeature(this)),fe(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this)),this.notesFeature=this.beans.notesSvc?.createNotesFeature(this,e)}removeFeatures(){const e=this.beans.context;this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.notesFeature=e.destroyBean(this.notesFeature),this.disableTooltipFeature()}enableTooltipFeature(){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature),this.rendererTooltipValue=void 0,this.rendererTooltipShouldDisplay=void 0}resetCellRendererTooltip(){this.rendererTooltipValue==null||!this.isAlive()||(this.rendererTooltipValue=void 0,this.rendererTooltipShouldDisplay=void 0,this.tooltipFeature?.refreshTooltip())}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),this.editSvc?.populateModelValidationErrors(this)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,i,o,s,r,n){this.comp=e,this.eGui=t,this.drawnAriaColIndex=-1,this.drawnAriaColSpan=1,this.printLayout=s,n=fi(this,n),this.addDomData(n);const l=this.isClientSideLoadingCell();l||(this.addFeatures(n),n.addDestroyFunc(()=>this.removeFeatures())),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.refreshPinnedEdges(),this.onColumnHover(),l||this.setupControlComps(),this.setupAutoHeight(o,n),this.refreshFirstAndLastStyles(),l||this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),this.refreshAriaColSpan(),m2(this.beans,this),l||(this.beans.cellStyles?.setupCellCustomStyle(this),this.editSvc?.applyCellEditStyles(this)),this.tooltipFeature?.refreshTooltip(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer(),this.editSvc?.onCompAttached(this,r)||this.showValue(!1,!0),this.pendingEditStart&&this.editSvc.replayPendingStart(this)}checkFormulaError(){const e=this.beans.formula;!e||!e.active&&!this.isCalculatedColumn()||this.eGui.classList.toggle("formula-error",this.hasFormulaError())}hasFormulaError(){const e=this.beans.formula;return!e||!e.active&&!this.isCalculatedColumn()?!1:!!e.getFormulaError(this.column,this.rowNode)}hasCellValidationError(){const{editModelSvc:e}=this.beans;return e?e.getCellValidationModel().hasCellValidation(this):!1}setupAutoHeight(e,t){if(this.isClientSideLoadingCell()){this.isAutoHeight=!1;return}this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.colDef.cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.colDef;return e.cellRenderer!=null||e.cellRendererSelector!=null}hasActiveCellRenderer(){return this.hasActiveRenderer}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:i,ctrlsSvc:o,eventSvc:s}=e,r=t.colDef,n=this.createCellRendererParams();n.deferRender=!0;const l=Uu(i,r,n);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let a;const d=new Nm(u=>{a=u}),[c]=this.addManagedListeners(s,{bodyScrollEnd:()=>{a(),c()}});return{loadingComp:l,onReady:d}}return{loadingComp:l,onReady:Nm.resolve()}}showValue(e,t){const{beans:i,column:o,rowNode:s,rangeFeature:r}=this,{userCompFactory:n}=i;let l=this.getValueToDisplay(),a;const d=s.stub&&s.groupData?.[o.getId()]==null,c=o.colDef;if(d||this.isCellRenderer()){const h=this.createCellRendererParams();!d||fe(o)?a=Nn(n,c,h):a=Uu(n,c,h)}if(!a&&!d&&i.findSvc?.isMatch(s,o)){const h=this.createCellRendererParams();a=Nn(n,{...o.colDef,cellRenderer:"agFindCellRenderer"},h)}const u=this.editSvc;if(u?.isBatchEditing()&&u.isRowEditing(s,{checkSiblings:!0})){const h=u.prepDetailsDuringBatch(this,{compDetails:a,valueToDisplay:l});h&&(h.compDetails?a=h.compDetails:h.valueToDisplay&&(l=h.valueToDisplay))}this.hasActiveRenderer=a!=null,this.comp.setRenderDetails(a,l,e),this.customRowDragComp?.refreshVisibility(),!t&&r&&r.scheduleRefreshRangeStyleAndHandle(),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.colDef;this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.colDef.cellRenderer==="agCheckboxCellRenderer";let i="";return t&&(i=" ag-allow-overflow"),`${e}${i}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&ir(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,o=Bi(t),s=Yi(this.column);return i==="custom"&&o!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&Ot(t)}refreshShouldDestroy(){const e=this.column.colDef,t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||i||o||s}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:i,rowNode:o,comp:s,eGui:r,beans:{valueSvc:n,gos:l,editSvc:a}}=this;return G(l,{value:e,valueFormatted:t,getValue:()=>n.getDisplayValue(i,o,"edit",this.shouldUseShowValuesAsValue()),setValue:c=>a?.setDataValue({rowNode:o,column:i},c)||o.setDataValue(i,c),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:i.getPinned(),colDef:i.colDef,column:i,refreshCell:this.refreshCell.bind(this),eGridCell:r,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{l.assertModuleRegistered("Tooltip",3),this.rendererTooltipValue=c,this.rendererTooltipShouldDisplay=u,this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){if(this.isClientSideLoadingCell())return;this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e);const t=this.editSvc;t&&this.editCompDetails&&!this.comp?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}refreshCell(e){if(this.isClientSideLoadingCell())return;const{beans:{cellFlashSvc:t,filterManager:i,cellStyles:o},column:s,comp:r,suppressRefreshCell:n}=this;if(n)return;const l=s.enableCellChangeFlash,a=s.field==null&&s.valueGetter==null&&s.showRowGroup==null&&!s.isCalculatedCol,d=e?.newData??!1,c=a||e&&(e.force||d),u=!!r,h=this.updateAndFormatValue(u),g=c||h;if(u){if(g){this.showValue(!!d,!1);const p=i?.isSuppressFlashingCellsBecauseFiltering();!e?.suppressFlash&&!p&&l&&t?.flashCell(this),this.editSvc?.applyCellEditStyles(this),o?.applyCellUserStyles(this),o?.applyCellClassesFromColDef(this),this.editSvc?.applyRowEditStyles(this.rowCtrl),this.checkFormulaError()}this.tooltipFeature?.refreshTooltip(),this.refreshNoteState(),o?.applyCellClassRules(this)}}showNote(e=!1){this.notesFeature?.show({focusEditor:e})}refreshNoteState(){this.notesFeature?.refresh()}isNoteHoverSuppressed(){return!!this.editSvc?.isEditing(this)||this.hasFormulaError()||this.hasCellValidationError()}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){const t=this.beans.valueSvc,i=this.column,o=this.rowNode;if(this.shouldUseShowValuesAsValue()){const s=t.formatTransformedValue(i,o,e);if(s!==void 0)return s??e}return t.formatValue(i,o,e)??e}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted,{value:o,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit",transformValues:this.shouldUseShowValuesAsValue()});return this.value=o,this.valueFormatted=s,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i:!0}shouldUseShowValuesAsValue(){return this.column.showValuesAs!=null&&!this.editSvc?.isEditing(this,{withOpenEditor:!0})}valuesAreEqual(e,t){const i=this.column.colDef;return i.equals?i.equals(e,t):e===t}addDomData(e){const t=this.eGui;Vt(this.beans.gos,t,Rs,this),e.addDestroyFunc(()=>Vt(this.beans.gos,t,Rs,null))}createEvent(e,t){const{rowNode:i,column:o,value:s,beans:r}=this;return _m(r,e,t,{rowNode:i,column:o},s)}processCharacter(e){LD(this.beans,this,e)}onKeyDown(e){xD(this.beans,this,e)}onMouseEvent(e,t){Y4(this.beans,this,e,t)}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles(),this.rangeFeature?.onDisplayedColumnsChanged())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:i}=this;Xh(e,t,i.visibleCols)}refreshAriaColIndex(){const e=this.column.ariaColIndex;e!==this.drawnAriaColIndex&&(this.drawnAriaColIndex=e,SD(this.eGui,e))}refreshAriaColSpan(){const{eGui:e,colsSpanning:t}=this;if(!e)return;const i=t?.[t.length-1],o=i?i.ariaColIndex-this.column.ariaColIndex+1:1;o!==this.drawnAriaColSpan&&(this.drawnAriaColSpan=o,bD(e,o>1?o:void 0))}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e){if(this.isClientSideLoadingCell())return;const{forceBrowserFocus:t=!1,preventScrollOnBrowserFocus:i=!1,sourceEvent:o}=e??{},s=this.editSvc?.allowedFocusTargetOnValidation(this);s&&s!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:t,preventScrollOnBrowserFocus:i,sourceEvent:o})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:i},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused())return;const s=i.takeOwedFocusEvent();if(s){this.onCellFocused(s);return}const r=i.shouldTakeFocus(),n=()=>{this.isAlive()&&this.isCellFocused()&&(i.takeOwedFocus()||r)&&i.isFocusFreeForGrid()&&o.getFocusableElement().focus({preventScroll:!0})};if(e){setTimeout(n,0);return}n()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&fD(t,"tabindex",e?void 0:-1)}refreshPinnedEdges(){const{comp:e,column:t}=this;e&&(e.toggleCss(ND,t.isFirstRightPinned()),e.toggleCss(_D,t.isLastLeftPinned()))}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused()}onCellFocused(e){const{beans:t}=this;if(oo(t))return;if(!this.comp){e&&this.isCellFocused()&&t.focusSvc.oweFocus(e);return}const i=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(GD,i),i&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let s=this.comp.getFocusableElement();if(o){const n=mD(s,null,!0);n.length&&(s=n[0])}const r=e?e.preventScrollOnBrowserFocus:!0;s.focus({preventScroll:r}),wD(t,s)}i&&e&&this.rowCtrl.announceDescription(this)}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:vD(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(HD,!0),e.toggleCss(zD,!0);const t=this.column.isAutoHeight();e.toggleCss(BD,t),e.toggleCss(OD,!t),this.setCalculatedColumnCss()}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.tooltipFeature?.refreshTooltip(),this.setWrapText(),this.setCalculatedColumnCss(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.colDef.wrapText===!0;this.comp.toggleCss(WD,e)}setCalculatedColumnCss(){const e=this.beans.calculatedColsSvc,t=e!=null&&this.column.isCalculatedCol;(t||this.calculatedColumnCssApplied)&&(this.comp.toggleCss(rl,t),this.calculatedColumnCssApplied=t);const i=e!=null&&t&&e.isHighlightedColumn(this.column);(i||this.calculatedColumnHighlightedCssApplied)&&(this.comp.toggleCss(Yh,i),this.calculatedColumnHighlightedCssApplied=i)}isCalculatedColumn(){return this.column.isCalculatedCol}refreshCalculatedColumnCss(){this.setCalculatedColumnCss()}dispatchCellContextMenuEvent(e){const t=this.column.colDef,i=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{o.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.editSvc?.onCellDestroyed(this),this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.oweFocus(),vs(this),super.destroy()}hasBrowserFocus(e){const t=CD(this.beans),i=this.eGui;return e?i===t:i?.contains(t)??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const o=this.createRowDragComp(e,t,i);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}),o.refreshVisibility())}createRowDragComp(e,t,i){const o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(o)return this.beans.context.createBean(o),o}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!fe(this.column)||!this.eGui)return;const{ariaRowIndex:e}=this.rowCtrl;e!=null&&yD(this.eGui,e)}getRootElement(){return this.eGui}};import{_addOrRemoveAttribute as qD,_batchCall as zm,_escapeString as or,_exists as sr,_getActiveDomElement as $D,_isElementChildOfClass as KD,_isVisible as jD,_makeNull as ZD,_setAriaExpanded as QD,_setAriaLevel as YD,_setAriaRowIndex as JD}from"ag-stack";function qa(e,t,i,o,s,r){if(i==null&&t==null)return;const n={},l={},a=(d,c)=>{for(const u of d.split(" "))u.trim()!=""&&c(u)};if(i){const d=Object.keys(i);for(let c=0;c<d.length;c++){const u=d[c],h=i[u];let g;typeof h=="string"?g=e?e.evaluate(h,o):!0:typeof h=="function"&&(g=h(o)),a(u,p=>{g?n[p]=!0:l[p]=!0})}}if(t&&r)for(const d of Object.keys(t))a(d,c=>{n[c]||(l[c]=!0)});r&&Object.keys(l).forEach(r),Object.keys(n).forEach(s)}function $a(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var XD=class extends y{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const i=this.gos,o=n=>{if(typeof n=="string")e.push(n);else if(Array.isArray(n))for(const l of n)e.push(l)},s=i.get("rowClass");s&&o(s);const r=i.getCallback("getRowClass");if(r){const n={data:t.data,node:t,rowIndex:t.rowIndex},l=r(n);o(l)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,i=>{e.push(i)},()=>{})}processRowClassRules(e,t,i){const{gos:o,expressionSvc:s}=this.beans,r=G(o,{data:e.data,node:e,rowIndex:e.rowIndex});qa(s,void 0,o.get("rowClassRules"),r,t,i)}processStylesFromGridOptions(e){const t=this.gos,i=t.get("rowStyle"),o=t.getCallback("getRowStyle");let s;if(o){const r={data:e.data,node:e,rowIndex:e.rowIndex};s=o(r)}if(s||i)return{...i,...s}}};import{_findNextFocusableElement as eM,_getActiveDomElement as tM,_isBrowserSafari as iM,_isFocusableFormField as oM}from"ag-stack";var sM=class extends y{constructor(e){super(),this.rowCtrl=e}initialiseComp(){const e=this.rowCtrl.getCurrentRowComp(),t=this.rowCtrl.getCurrentRowElement();if(!(!e||!t)){if(this.tooltips?.pruneStaleElements(),this.shouldCreateCellSections()&&e.showEmbeddedFullWidth)this.rowCtrl.isEmbeddedFullWidth=!0,this.rowCtrl.embeddedSectionHasContent={left:!0,center:!0,right:!0},e.showEmbeddedFullWidth({left:this.createFullWidthCompDetails(e.getPinnedLeftRowElement()??t,"left",!0),center:this.createFullWidthCompDetails(e.getScrollingRowElement()??t,null,!0),right:this.createFullWidthCompDetails(e.getPinnedRightRowElement()??t,"right",!0)}),this.rowCtrl.refreshPinnedCellGroupWidths();else{this.rowCtrl.isEmbeddedFullWidth=!1;const i=this.createFullWidthCompDetails(t,null,!0);e.showFullWidth(i),this.rowCtrl.refreshPinnedCellGroupWidths()}this.notesFeature?.destroy(),this.notesFeature=this.beans.notesSvc?.createFullWidthNotesFeature(this.rowCtrl)}}refreshRow(e){if(!this.refreshFullWidthComp()){this.rowCtrl.redrawThisRow();return}this.rowCtrl.onRowRefreshed(),this.notesFeature?.refresh()}refreshFullWidthComp(){const e=this.rowCtrl.getCurrentRowComp(),t=this.rowCtrl.getCurrentRowElement();return!e||!t?!0:(this.tooltips?.pruneStaleElements(),this.shouldCreateCellSections()&&e.refreshEmbeddedFullWidth?e.refreshEmbeddedFullWidth(i=>{const o=i==="left"?e.getPinnedLeftRowElement():i==="right"?e.getPinnedRightRowElement():e.getScrollingRowElement();return this.createFullWidthCompDetails(o??t,i).params}):e.refreshFullWidth(()=>this.createFullWidthCompDetails(t,null).params))}shouldCreateCellSections(){return this.rowCtrl.printLayout||this.gos.get("embedFullWidthRows")}getModeCellRenderers(){return this.rowCtrl.getCurrentRowComp()?.getFullWidthCellRenderers()}getAllCellCtrls(){return ke}recreateCell(e){}destroyCells(){}onDisplayedColumnsChanged(){this.notesFeature?.refresh()}onVirtualColumnsChanged(){}onSpannedCellsUpdated(e){}createFullWidthCompDetails(e,t,i=!1){const{rowCtrl:o}=this,{gos:s}=this,{rowNode:r}=o,n=this.getTooltips(),l=n?.claimRenderer(e,i),a=G(s,{fullWidth:!0,data:r.data,node:r,value:r.key,valueFormatted:r.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:o.addEventListener.bind(o),registerRowDragger:(c,u,h,g)=>this.addFullWidthRowDragging(c,u,h,g),setTooltip:(c,u)=>{s.assertModuleRegistered("Tooltip",3),l&&n.setRendererTooltip(e,r,c,u,l)}}),d=this.beans.userCompFactory;switch(o.getRowType()){case"FullWidthDetail":return Cb(d,a);case"FullWidthGroup":{const{value:c,valueFormatted:u}=this.beans.valueSvc.getValueForDisplay({node:r,includeValueFormatted:!0,from:"edit"});return a.value=c,a.valueFormatted=u,n?.setupGroupRowsTooltip(r,e),mb(d,a)}case"FullWidthLoading":return fb(d,a);default:return pb(d,a)}}setupDetailRowAutoHeight(e){this.rowCtrl.getRowType()==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this.rowCtrl,e)}getTooltips(){return this.tooltips??(this.tooltips=this.beans.tooltipSvc?.createFullWidthRowTooltips(this.rowCtrl))}addFullWidthRowDragging(e,t,i="",o){const{rowDragSvc:s,context:r}=this.beans;if(!s)return;const n=s.createRowDragComp(()=>i,this.rowCtrl.rowNode,void 0,e,t,o);this.createBean(n,r),this.addDestroyFunc(()=>{this.destroyBean(n,r)})}setupFocus(){this.restoreFullWidthFocus(!0),this.onRowFocused()}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:i}=this.beans,{rowCtrl:o}=this;if(i?.isEditing(o)||!this.isFocused())return;const s=t.takeOwedFocusEvent();if(s){this.onRowFocused(s);return}const r=t.shouldTakeFocus(),n=()=>{const l=o.getCurrentRowElement();l&&o.isAlive()&&this.isFocused()&&(t.takeOwedFocus()||r)&&t.isFocusFreeForGrid()&&l.focus({preventScroll:!0})};if(e){setTimeout(n,0);return}n()}isFocused(){const e=this.rowCtrl.rowNode;return this.beans.focusSvc.isRowFocused(e.rowIndex,e.rowPinned)}onRowFocused(e){const{focusSvc:t}=this.beans,{rowCtrl:i}=this,o=this.isFocused(),s=i.getCurrentRowElement();if(!o){s?.classList.remove("ag-full-width-focus");return}if(!s){e&&t.oweFocus(e);return}s.classList.add("ag-full-width-focus"),e?.forceBrowserFocus&&s.focus({preventScroll:!0})}onKeyboardNavigate(e){const{rowCtrl:t}=this,i=t.getCurrentRowElement();if(!i?.contains(e.target)||!(i===e.target))return;const s=t.rowNode,{focusSvc:r,navigation:n}=this.beans,l=r.getFocusedCell(),a={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:l?.column??this.getNavigationColumn()},d=!!n?.isCtrlArrowJump(e);n?.navigateToNextCell(e,e.key,a,!0,d),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Ae(e))return;const{rowCtrl:t,beans:i}=this,o=t.getCurrentRowElement(),s=o?.contains(e.target)?o:null,r=s===e.target,n=tM(this.beans);let l=!1;s&&n&&(l=s.contains(n)&&n.classList.contains("ag-cell"));let a=null;!r&&!l&&(a=eM({beans:i,rootNode:s,backwards:e.shiftKey})),(r||!a)&&this.beans.navigation?.onTabKeyDown(t,e)}getRowContentElement(){return this.rowCtrl.getCurrentRowElement()??null}getNavigationColumn(){return this.getDefaultTarget()?.column??this.getFirstDisplayedColumnForFullWidth()}onRowMouseDown(e){if(this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:i}=this.beans;t?.removeAllCellRanges();const{rowCtrl:o}=this,s=o.getCurrentRowElement();if(!s)return;const r=e.target;if(!s.contains(r))return;const n=this.getTarget(r)?.column;if(!n)return;const l=o.rowNode;let a=e.defaultPrevented||iM();s.contains(r)&&oM(r)&&(a=!1),i.setFocusedCell({rowIndex:l.rowIndex,column:n,rowPinned:l.rowPinned,forceBrowserFocus:a})}isSuppressMouseEvent(e){const{rowCtrl:t}=this,{gos:i}=this,o=t.getCurrentRowComp(),r=t.getCurrentRowElement()?.contains(e.target)&&o?o:void 0,n=rM(r,e.target),l=r?.getFullWidthCellRendererParamsForPinned?.(n)??r?.getFullWidthCellRendererParams();return _y(i,l,t.rowNode,e)}getTargets(){const{rowCtrl:e}=this,t=e.getGui(),i=t?.rowComp,o=t?.element,s=t?.compBean;if(!i||!o||!s)return[];const r=i.getPinnedLeftRowElement(),n=i.getScrollingRowElement(),l=i.getPinnedRightRowElement();if(!r&&!n&&!l){const d=this.getFirstDisplayedColumnForFullWidth();return d?[{compBean:s,element:o,column:d,pinned:null}]:[]}const a=new Map;return this.addFullWidthTarget(a,r,s,this.getFirstColumnForFullWidthSection("left"),"left"),this.addFullWidthTarget(a,n??o,s,this.getFirstColumnForFullWidthSection(null),null),this.addFullWidthTarget(a,l,s,this.getFirstColumnForFullWidthSection("right"),"right"),[...a.values()]}getTarget(e){const t=e instanceof Node?e:void 0,i=this.getTargets();if(i.length)return t?i.find(o=>o.element.contains(t))??i[0]:i[0]}getDefaultTarget(){return this.getTargets()[0]}findInfoForEvent(e){const t=this.getTarget(e?.target);if(t)return{column:t.column,pinned:t.pinned}}addFullWidthTarget(e,t,i,o,s){!t||!o||e.has(t)||e.set(t,{compBean:i,element:t,column:o,pinned:s})}getFirstColumnForFullWidthSection(e){const{visibleCols:t}=this.beans;switch(e){case"left":return t.leftCols[0]??t.centerCols[0]??t.rightCols[0];case"right":return t.rightCols[0]??t.centerCols[0]??t.leftCols[0];default:return t.centerCols[0]??t.leftCols[0]??t.rightCols[0]}}getFirstDisplayedColumnForFullWidth(){return this.beans.visibleCols.allCols[0]}getNotesFeature(){return this.notesFeature}addInitialRowClasses(e){e.push("ag-full-width-row"),this.shouldCreateCellSections()&&e.push("ag-embedded-full-width-row")}destroy(){this.tooltips=this.destroyBean(this.tooltips,this.beans.context),this.notesFeature?.destroy(),this.notesFeature=void 0,super.destroy()}};function rM(e,t){return!e||!(t instanceof HTMLElement)?null:e.getPinnedLeftRowElement()?.contains(t)?"left":e.getPinnedRightRowElement()?.contains(t)?"right":null}var nM=0,Wm={},rr=class extends y{constructor(e,t,i,o,s){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=s,this.diffIndex=0,this.drawnRowComp=void 0,this.compBean=void 0,this.mappedPinnedWidths=void 0,this.spannedRow=!1,this.active=!0,this.slideInAnimation=!1,this.fadeInAnimation=!1,this.rowDragComp=void 0,this.lastMouseDownOnDragger=!1,this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.isEmbeddedFullWidth=!1,this.embeddedSectionHasContent={left:!0,center:!0,right:!0},this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.useTopPositioning=!!(this.gos.get("suppressRowTransform")||this.gos.get("enableCellSpan")),this.instanceId=e.id+"-"+nM++,this.rowId=or(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=$a(this.rowNode),this.rowType=nr(this.beans,this.rowNode),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.rowModeFeature=this.createRowModeFeature();try{this.addListeners(),this.rowModeFeature.prepareInitialCellCtrls?.()}catch(r){throw this.destroyFirstPass(!0),this.destroySecondPass(),r}}isClientSideLoadingRow(){return Ye(this.gos,this.rowNode)}createRowModeFeature(){const{context:e}=this.beans,t=this.isFullWidth()?new sM(this):new v2(this);return this.createBean(t,e),this.addDestroyFunc(()=>this.destroyBean(t,e)),t}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(this.isClientSideLoadingRow()||typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=or(e)}setComp(e,t,i){const o=this.beans.rowRenderer,s={rowComp:e,element:t,compBean:fi(this,i)};this.rowGui=s,this.initialiseRowComp();const r=this.rowNode,n=this.rowType==="FullWidthLoading"||r.stub,l=!r.data&&this.beans.rowModel.getType()==="infinite";!n&&!l&&!r.rowPinned&&o.dispatchFirstDataRenderedEvent(),this.rowModeFeature.setupFocus?.()}unsetComp(){this.destroyRowDragComp(),this.rowGui=void 0}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.rowGui?.element.style.setProperty("display",t)}initialiseRowComp(){const e=this.rowGui;if(!e)return;const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(),this.updateRowIndexes(),this.setFocusedClasses(),this.setStylesFromGridOptions(!1),Je(t)&&this.rowNode.selectable&&this.onRowSelected(),this.rowModeFeature.initialiseComp();const{rowComp:i,element:o,compBean:s}=e,r=this.getInitialRowClasses();for(const n of r)i.toggleCss(n,!0);this.beans.editSvc?.applyRowEditStyles(this),this.beans.rowDropHighlightSvc?.row===this.rowNode&&this.onRowNodeHighlightChanged(),this.executeSlideAndFadeAnimations(),this.rowNode.isExpandable()&&QD(o,!!this.rowNode.expanded),this.refreshAriaLevel(),this.setRowCompRowId(),this.setRowCompRowBusinessKey(),Vt(t,o,xs,this),s.addDestroyFunc(()=>Vt(t,o,xs,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&i.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(){this.businessKey!=null&&this.rowGui?.rowComp.setRowBusinessKey(this.businessKey)}setRowCompRowId(){const e=or(this.rowNode.id);this.rowId=e,e!=null&&this.rowGui?.rowComp.setRowId(e)}executeSlideAndFadeAnimations(){const e=this.rowGui;e&&(this.slideInAnimation&&(zm(()=>{this.active&&this.onTopChanged()}),this.slideInAnimation=!1),this.fadeInAnimation&&(zm(()=>{this.active&&e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation=!1))}addRowDraggerToRow(){const e=this.rowGui;if(!e)return;const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);t&&(this.rowDragComp=this.createBean(t,this.beans.context))}destroyRowDragComp(){this.rowDragComp=this.destroyBean(this.rowDragComp,this.beans.context)}getModeCellRenderers(){return this.rowModeFeature.getModeCellRenderers?.()}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate"),t=this.rowGui;if(this.isClientSideLoadingRow()||!e||t===void 0)return;const{visibleCols:i}=this.beans,o=t.element,s={eRow:o,ePinnedLeftRow:i.leftCols.length?o:void 0,ePinnedRightRow:i.rightCols.length?o:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(s)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new Ri(e,this.rowNode,this.beans,this,null)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}laneFor(e){return this.printLayout?1:e.pinnedLane}setEmbeddedSectionHasContent(e,t){this.embeddedSectionHasContent[e]=t}refreshPinnedCellGroupWidths(){const e=this.rowGui;e&&e.rowComp.refreshPinnedSections()}getMappedPinnedCellGroupWidths(){let{leftWidth:e,centerWidth:t,rightWidth:i}=this.getPinnedCellGroupWidths();if(this.isEmbeddedFullWidth){const l=this.embeddedSectionHasContent.left,a=this.embeddedSectionHasContent.right;t=t+(l?0:e)+(a?0:i),e=l?e:0,i=a?i:0}const o=this.isFullWidth(),s=e>0||o,r=i>0||o;let n=this.mappedPinnedWidths;return(n?.leftWidth!==e||n.centerWidth!==t||n.rightWidth!==i||n.renderLeft!==s||n.renderRight!==r)&&(n={leftWidth:e,centerWidth:t,rightWidth:i,renderLeft:s,renderRight:r},this.mappedPinnedWidths=n),n}getPinnedCellGroupWidths(){return il(this.beans.visibleCols,this.printLayout)}getInitialCellCtrls(e){return this.rowModeFeature.getInitialCellCtrls?.(e)}getDomOrder(){return this.gos.get("ensureDomOrder")||de(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){this.rowNode.sticky||!e||(sr(this.rowNode.oldRowTop)?this.slideInAnimation=!0:this.fadeInAnimation=!0)}isFullWidth(){return this.rowType!=="Normal"}onRowRefreshed(){or(this.rowNode.id)!==this.rowId&&this.setRowCompRowId();const e=this.businessKey;this.updateRowBusinessKey(),this.businessKey!==e&&this.setRowCompRowBusinessKey(),this.onRowSelected(),this.postProcessCss()}getCurrentRowComp(){return this.rowGui?.rowComp}getCurrentRowElement(){return this.rowGui?.element}redrawThisRow(){this.beans.rowRenderer.redrawRow(this.rowNode)}getRowType(){return this.rowType}getFullWidthAnchorRole(){return this.rowType==="FullWidthLoading"?"gridcell":"presentation"}shouldCreateCellSections(){return this.rowModeFeature.shouldCreateCellSections()}getNotesFeature(){return this.rowModeFeature.getNotesFeature?.()}addListeners(){const{beans:e,gos:t,rowNode:i}=this,{expansionSvc:o,eventSvc:s,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)}),i.detail&&this.addManagedListeners(i.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(i,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)});const n=()=>this.rowModeFeature.releaseKeptCells?.(!0);this.addManagedListeners(s,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),headerHeightChanged:this.onTopChanged.bind(this),headerRowsChanged:this.updateRowIndexes.bind(this),advancedFilterEnabledChanged:this.updateRowIndexes.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),pinnedRowDataChanged:this.onPinnedRowsChanged.bind(this),stickyBottomOffsetChanged:this.onStickyBottomOffsetChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.refreshPinnedCellGroupWidths.bind(this),leftPinnedWidthChanged:this.refreshPinnedCellGroupWidths.bind(this),rightPinnedWidthChanged:this.refreshPinnedCellGroupWidths.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),cellEditingStopped:n,batchEditingStopped:n,cellEditValuesChanged:n,paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:()=>{this.refreshAriaLevel(),this.rowNode.rowPinned==="bottom"&&this.updateRowIndexes(),this.refreshFirstAndLastRowStyles()}}),r?.active&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:l})=>{this.rowModeFeature.onSpannedCellsUpdated(l)}}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){this.addRowDraggerToRow();return}this.destroyRowDragComp()})}onRowPinned(){this.rowGui?.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(nr(this.beans,this.rowNode)!==this.rowType){this.beans.rowRenderer.redrawRow(this.rowNode);return}this.rowModeFeature.refreshRow(e??{})}refreshSpans(){this.rowModeFeature.refreshSpans?.()}getColSpans(){return this.rowModeFeature.getColSpans?.()}postProcessCss(){this.isClientSideLoadingRow()||(this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.beans.editSvc?.applyRowEditStyles(this),this.postProcessRowDragging())}onRowNodeHighlightChanged(){const{rowGui:e,beans:{rowDropHighlightSvc:t}}=this,i=t?.row===this.rowNode?t.position:"none",o=i==="above",s=i==="inside",r=i==="below",n=i!=="none",l=o||r,a=this.rowNode.uiLevel,d=l&&a>0,c=d?a.toString():"0";e?.rowComp.toggleCss("ag-row-highlight-above",o),e?.rowComp.toggleCss("ag-row-highlight-inside",s),e?.rowComp.toggleCss("ag-row-highlight-below",r),e?.rowComp.toggleCss("ag-row-highlight-indent",d),n?e?.element.style.setProperty("--ag-row-highlight-level",c):e?.element.style.removeProperty("--ag-row-highlight-level")}postProcessRowDragging(){const{rowNode:e,rowGui:t}=this,i=e.dragging;t?.rowComp.toggleCss("ag-row-dragging",i)}onDisplayedColumnsChanged(){this.rowModeFeature.onDisplayedColumnsChanged()}onVirtualColumnsChanged(){this.rowModeFeature.onVirtualColumnsChanged()}getRowPosition(){return{rowPinned:ZD(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){this.rowModeFeature.onKeyboardNavigate?.(e)}onTabKeyDown(e){this.rowModeFeature.onTabKeyDown?.(e)}getRowContentElement(){return this.rowModeFeature.getRowContentElement?.()??null}getNavigationColumn(){return this.rowModeFeature.getNavigationColumn()}getRowYPosition(){const e=this.rowGui?.element;return e&&jD(e)?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");this.rowGui&&qD(this.rowGui.element,"tabindex",t)}onRowFocused(e){this.rowModeFeature.onRowFocused?.(e)}renderFocusedCell(){this.rowModeFeature.renderFocusedCell?.()}recreateCell(e){this.rowModeFeature.recreateCell(e)}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:i}=this;return G(this.gos,{type:e,node:i,data:i.data,rowIndex:i.rowIndex,rowPinned:i.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){if(Ae(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findInfoForEvent(e){return this.rowModeFeature.findInfoForEvent?.(e)}getTargets(){return this.rowModeFeature.getTargets?.()??[]}getTarget(e){return this.rowModeFeature.getTarget?.(e)}onRowMouseDown(e){this.lastMouseDownOnDragger=KD(e.target,"ag-row-drag",3),this.rowModeFeature.onRowMouseDown?.(e)}isSuppressMouseEvent(e){return this.rowModeFeature.isSuppressMouseEvent(e)}onRowClick(e){if(Ae(e)||this.lastMouseDownOnDragger)return;const i=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:s}=this.beans,r=this.createRowEventWithSource("rowClicked",e);r.isEventHandlingSuppressed=i,o.dispatchEvent(r),!i&&s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowModeFeature.setupDetailRowAutoHeight?.(e)}refreshAriaLevel(){const{rowGui:e,rowNode:t,beans:i,gos:o}=this;if(!e)return;let s;if(i.ctrlsSvc.get("gridBodyCtrl")?.isTreeGrid&&(s=1,!t.rowPinned)){s=Math.max(1,$a(t)+1);const r=ht(o)&&o.get("groupAllowUnbalanced");for(let n=t.parent;n&&n.level>=0;n=n.parent)(n.childrenAfterGroup?.length===1&&nn(o,n)||r&&n.group&&n.key==="")&&--s}YD(e.element,s)}onUiLevelChanged(){const e=$a(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.rowGui?.rowComp.toggleCss(t,!0),this.rowGui?.rowComp.toggleCss(i,!1)}this.rowLevel=e}isFirstRowOnPage(){const{rowNode:{rowIndex:e,rowPinned:t},beans:{pageBounds:i}}=this;return t?e===0:e===i.getFirstRow()}isLastRowOnPage(){const{rowNode:{rowIndex:e,rowPinned:t},beans:{pageBounds:i,pinnedRowModel:o}}=this;if(t){const s=t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount();return s==null?!1:e===s-1}return e===i.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.rowGui?.rowComp.toggleCss("ag-row-first",e)),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.rowGui?.rowComp.toggleCss("ag-row-last",t))}getAllCellCtrls(){return this.rowModeFeature.getAllCellCtrls()}postProcessClassesFromGridOptions(){if(this.isClientSideLoadingRow())return;const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)this.rowGui?.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.isClientSideLoadingRow()||this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>this.rowGui?.rowComp.toggleCss(e,!0),e=>this.rowGui?.rowComp.toggleCss(e,!1))}setStylesFromGridOptions(e){if(e){const t=this.processStylesFromGridOptions();if(t===this.rowStyles)return;this.rowStyles=t}this.rowGui?.rowComp.setUserStyles(this.rowStyles)}getInitialRowClasses(){const{rowNode:e,beans:t}=this,i=[];if(i.push("ag-row",this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation&&i.push("ag-opacity-zero"),i.push(e.rowIndex%2===0?"ag-row-even":"ag-row-odd"),e.isRowPinned()&&(i.push("ag-row-pinned"),t.pinnedRowModel?.isManual()&&i.push("ag-row-pinned-manual")),!e.isRowPinned()&&e.pinnedSibling&&i.push("ag-row-pinned-source"),e.isSelected()&&i.push("ag-row-selected"),e.footer&&(i.push("ag-row-footer"),e.level===-1)){i.push("ag-row-grand-total");const s=e.rowPinned??li(this.gos),r=s==="top"||s==="pinnedTop";i.push(`ag-row-grand-total-border-${r?"bottom":"top"}`)}i.push("ag-row-level-"+this.rowLevel),e.stub&&i.push("ag-row-loading"),this.rowModeFeature.addInitialRowClasses?.(i),t.expansionSvc?.addExpandedCss(i,e),e.dragging&&i.push("ag-row-dragging");const{rowStyleSvc:o}=t;return o&&!this.isClientSideLoadingRow()&&(o.processClassesFromGridOptions(i,e),o.preProcessRowClassRules(i,e)),i.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&i.push("ag-row-first"),this.isLastRowOnPage()&&i.push("ag-row-last"),i}processStylesFromGridOptions(){return this.isClientSideLoadingRow()?Wm:this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??Wm}onRowSelected(){this.beans.selectionSvc?.onRowCtrlSelected(this,()=>this.announceDescription())}announceDescription(e){const{selectionSvc:t,focusSvc:i}=this.beans,o=e?.column??(this.isFullWidth()?void 0:i.getFocusedCell()?.column);t?.announceAriaRowSelection(this.rowNode,o),this.announceNoteDescription(e)}announceNoteDescription(e){const{notesSvc:t,ariaAnnounce:i}=this.beans;if(!t||!i||!e&&!this.isFullWidth())return;const o={rowNode:this.rowNode},s=e?{column:e.column}:{location:"fullWidthRow"},r={...o,...s};if(t.getNoteAccess(r)?.canView){const l=this.getLocaleTextFunc();i.announceValue(l("ariaHasNote","This cell has a note."),"note")}}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:i}=e,{rowNode:o,beans:s,gos:r}=this;i.addManagedListeners(t,{pointerenter:n=>{n.pointerType==="mouse"&&o.dispatchRowEvent("mouseEnter")},pointerleave:n=>{n.pointerType==="mouse"&&o.dispatchRowEvent("mouseLeave")}}),i.addManagedListeners(o,{mouseEnter:()=>{!s.dragSvc?.dragging&&!r.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),o.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){(e??this.rowGui?.element)?.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}getGui(){return this.rowGui}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,o=this.applyPaginationOffset(t.bottom,!0)+100;return Lt(e,i,o)}isRowRendered(){return!!this.rowGui}onRowHeightChanged(){if(this.rowNode.rowHeight==null)return;const e=this.rowNode.rowHeight,t=this.beans.environment.getDefaultRowHeight(),o=Xr(this.gos)&&!this.isClientSideLoadingRow()?Xo(this.beans,this.rowNode).height:void 0,s=o?`${Math.min(t,o)-2}px`:void 0;this.rowGui?.element.style.setProperty("height",`${e}px`),s&&this.rowGui?.element.style.setProperty("--ag-line-height",s)}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&Ht(this.gos)&&!t.sticky)if(t.rowTop!=null){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else this.rowGui?.rowComp.toggleCss("ag-opacity-zero",!0);this.isFullWidth()&&this.rowGui?.element.contains($D(this.beans))&&this.beans.focusSvc.oweFocus(),t.setHovered(!1);const i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventSvc.dispatchEvent(i),this.destroyRowDragComp(),vs(this),super.destroy()}destroySecondPass(){this.rowGui=void 0,this.rowModeFeature.destroyCells()}setFocusedClasses(){const{rowGui:e}=this;e?.rowComp.toggleCss("ag-row-focus",this.rowFocused),e?.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)}onCellFocusChanged(){this.updateRowFocused(),this.rowModeFeature.releaseKeptCells?.(!1)}updateRowFocused(){const e=this.beans.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses())}onPinnedRowsChanged(){this.updateRowIndexes(),this.refreshFirstAndLastRowStyles()}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){const e=this.getCalculatedRowTop();sr(e)&&this.setRowTop(e)}onPaginationPixelOffsetChanged(){this.onTopChanged()}onStickyBottomOffsetChanged(){this.rowNode.rowPinned==="bottom"&&this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const i=this.beans.pageBounds.getPixelOffset();return e+i*(t?1:-1)}setRowTop(e){this.printLayout||sr(e)&&this.setRowTopStyle(`${this.calculateRowTopPx(e)}px`)}calculateRowTopPx(e){const{rowNode:t,beans:{rowContainerHeight:i}}=this,o=this.applyPaginationOffset(e);return t.isRowPinned()||t.sticky?o:i.getRealPixelPosition(o)}getInitialRowTop(){return this.useTopPositioning?this.getInitialRowTopShared():void 0}getInitialTransform(){return this.useTopPositioning?void 0:`translateY(${this.getInitialRowTopShared()})`}getInitialRowTopShared(){if(this.printLayout)return"";const{rowNode:e}=this;let t;if(e.sticky){const i=this.getCalculatedRowTop();t=sr(i)?i:e.stickyRowTop}else t=this.slideInAnimation?this.roundRowTopToBounds(e.oldRowTop):e.rowTop;return`${this.calculateRowTopPx(t)}px`}getCalculatedRowTop(){const{sticky:e,rowTop:t,stickyRowTop:i}=this.rowNode;return e?i:t}setRowTopStyle(e){const{rowGui:t,useTopPositioning:i}=this;t&&(i?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e){return this.rowModeFeature.getCellCtrl?.(e)}getOwnCellCtrl(e){return this.rowModeFeature.getOwnCellCtrl?.(e)}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.updateRowFocused(),this.updateRowIndexes(),this.postProcessCss(),this.refreshSpans(),this.beans.visibleCols.colSpanColCount===0&&this.rowModeFeature.releaseKeptCells?.(!1))}getAriaRowIndex(){const{rowNode:e,beans:t}=this,{rowIndex:i}=e;return i==null||e.getRowIndexString()===null?null:Um(t,e,i)}updateRowIndexes(){const{rowNode:e,rowGui:t,beans:i}=this,{rowIndex:o}=e;if(o==null)return;const s=e.getRowIndexString();if(s===null)return;const r=o%2===0,n=this.ariaRowIndex=Um(i,e,o);t&&(t.rowComp.setRowIndex(s),t.rowComp.toggleCss("ag-row-even",r),t.rowComp.toggleCss("ag-row-odd",!r),JD(t.element,n))}};function Um(e,t,i){const o={rowIndex:i,rowPinned:t.rowPinned??null};return Jn(e)+Qn(e,o)+1}var lM=(e,t)=>{const i=e.gos;if(Ye(i,t))return!1;if(t.detail)return!0;const o=i.getCallback("isFullWidthRow");return o?o({rowNode:t}):!1},nr=(e,t)=>{const i=e.gos,o=t.stub,s=o&&i.get("groupHideOpenParents"),r=o&&i.get("suppressServerSideFullWidthLoadingRow");return o&&!r&&!s&&e.rowModel.getType()==="serverSide"?"FullWidthLoading":t.detail&&i.get("masterDetail")?"FullWidthDetail":lM(e,t)?"FullWidth":!(r&&!s)&&rn(i,t,e.colModel.pivotMode)?"FullWidthGroup":"Normal"},aM=class extends y{constructor(){super(),this.beanName="navigation",this.currentColumnWithoutSpan=null,this.hasColumnWithoutSpanListener=!1,this.onPageDown=Gm(this.onPageDown,100),this.onPageUp=Gm(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,o=e.altKey,s=e.ctrlKey||e.metaKey,r=Op(this.gos,e);let n=!1;switch(i){case me.PAGE_HOME:case me.PAGE_END:!s&&!o&&(this.onHomeOrEndKey(i),n=!0);break;case me.LEFT:case me.RIGHT:case me.UP:case me.DOWN:if(!r)return!1;this.isCtrlArrowJump(e)&&(this.onCtrlUpDownLeftRight(i,r),n=!0);break;case me.PAGE_DOWN:case me.PAGE_UP:!s&&!o&&(n=this.handlePageUpDown(i,r,t));break}return n&&e.preventDefault(),n}isCtrlArrowJump(e){const t=e.ctrlKey||e.metaKey,i=!!this.beans.rangeSvc&&e.shiftKey;return t&&!e.altKey&&!i}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===me.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:i,focusIndex:o,focusColumn:s,isAsync:r,rowPinned:n}){const{scrollFeature:l}=this.gridBodyCon;yi(i)&&!i.isPinned()&&l.ensureColumnVisible(i),yi(e)&&l.ensureIndexVisible(e,t),r||l.ensureIndexVisible(o);const{focusSvc:a}=this.beans;a.setFocusedCell({rowIndex:o,column:s,rowPinned:n,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:o,rowPinned:n,column:s})}onPageDown(e){const t=this.beans,i=Ka(t),o=this.getViewportHeight(),{pageBounds:s,rowModel:r,rowAutoHeight:n}=t,l=s.getPixelOffset(),a=i.top+o,d=r.getRowIndexAtPixel(a+l);n?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,i=Ka(t),{pageBounds:o,rowModel:s,rowAutoHeight:r}=t,n=o.getPixelOffset(),l=i.top,a=s.getRowIndexAtPixel(l+n);r?.active?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)}navigateToNextPage(e,t,i=!1){const{pageBounds:o,rowModel:s}=this.beans,r=this.getViewportHeight(),n=o.getFirstRow(),l=o.getLastRow(),a=o.getPixelOffset(),d=s.getRow(e.rowIndex),c=i?d?.rowHeight-r-a:r-a,u=d?.rowTop+c;let h=s.getRowIndexAtPixel(u+a);if(h===e.rowIndex){const v=i?-1:1;t=h=e.rowIndex+v}let g;i?(g="bottom",h<n&&(h=n),t<n&&(t=n)):(g="top",h>l&&(h=l),t>l&&(t=l)),this.isRowTallerThanView(s.getRow(h))&&(t=h,g="top");const p={rowIndex:h,column:e.column,rowPinned:null},f=this.getNormalisedPosition(p),{rowIndex:m,column:w}=f??p;this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:m,focusColumn:w})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const o=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const i=t?-1:1,o=this.getViewportHeight(),{pageBounds:s,rowModel:r}=this.beans,n=s.getLastRow();let l=0,a=e.rowIndex;for(;a>=0&&a<=n;){const d=r.getRow(a);if(d){const c=d.rowHeight??0;if(l+c>o)break;l+=c}a+=i}return Lt(a,0,n)}getViewportHeight(){const e=this.beans,t=Ka(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth()??0;let o=t.bottom-t.top;return e.scrollVisibleSvc.isHorizontalScrollShowing()&&(o-=i),o}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!i)return;const o=this.getNormalisedPosition(i),{rowIndex:s,rowPinned:r,column:n}=o??i,l=n;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:l,focusIndex:s,focusColumn:l,rowPinned:r})}onHomeOrEndKey(e){const t=e===me.PAGE_HOME,{visibleCols:i,pageBounds:o,rowModel:s}=this.beans,r=i.allCols,n=t?o.getFirstRow():o.getLastRow(),l=s.getRow(n);if(!l)return;const a=(t?r:[...r].reverse()).find(d=>!d.isSuppressNavigable(l)&&!fe(d));a&&this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:a,focusIndex:n,focusColumn:a})}onTabKeyDown(e,t){const i=t.shiftKey,o=this.tabToNextCellCommon(e,i,t),s=this.beans,{ctrlsSvc:r,pageBounds:n,focusSvc:l,gos:a}=s;if(o!==!1){o?t.preventDefault():o===null&&r.get("gridCtrl")?.allowFocusForNextCoreContainer(i);return}if(i){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===n.getFirstRow())&&(a.get("headerHeight")===0||ve(s)?qt(s,!0,"force"):(t.preventDefault(),l.focusPreviousFromFirstCell(t)))}else e instanceof Ri&&!e.hasBrowserFocus(!0)&&e.focusCell({forceBrowserFocus:!0}),(l.focusOverlay(!1)||qt(s,i))&&t.preventDefault()}tabToNextCell(e,t){const i=this.beans,{focusSvc:o,rowRenderer:s}=i,r=o.getFocusedCell();if(!r)return!1;let n=Ut(i,r);return!n&&(n=s.getRowByPosition(r),!n?.isFullWidth())?!1:!!this.tabToNextCellCommon(n,e,t,"api")}tabToNextCellCommon(e,t,i,o="ui"){const{editSvc:s,focusSvc:r}=this.beans;let n;const l=e instanceof Ri?e:e.getAllCellCtrls()?.[0],a=s?.isEditing();return a&&(n=s?.moveToNextCell(l,t,i,o)),(!a||n===!1&&!s?.isEditing())&&(n=this.moveToNextCellNotEditing(e,t)),n===null?n:n||!!r.focusedHeader}moveToNextCellNotEditing(e,t){const i=this.beans.visibleCols.allCols;let o;e instanceof rr?(o={...e.getRowPosition(),column:t?i[0]:Ua(i)},this.gos.get("embedFullWidthRows")&&(o.column=e.getNavigationColumn())):o=e.getFocusedCellPosition();const s=this.findNextCellToFocusOn(o,{backwards:t,startEditing:!1});if(s===!1)return null;if(s instanceof Ri)s.focusCell({forceBrowserFocus:!0});else if(s)return this.tryToFocusFullWidthRow(s,t);return yi(s)}findNextCellToFocusOn(e,{backwards:t,startEditing:i,skipToNextEditableCell:o}){let s=e;const r=this.beans,{cellNavigation:n,gos:l,focusSvc:a,rowRenderer:d}=r;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=n.getNextTabbedCell(s,t);const c=l.getCallback("tabToNextCell");if(yi(c)){const f=c({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s??null});if(f===!0)s=e;else{if(f===!1)return!1;s={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const p=Ee(r);return a.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:s.column},fromCell:!0}),null}const u=l.get("editType")==="fullRow";if(i&&(!u||o)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const h=Ut(r,s);if(!h){const p=d.getRowByPosition(s);if(!p||!p.isFullWidth()||i)continue;return{...p.getRowPosition(),column:s?.column}}if(n.isSuppressNavigable(h.column,h.rowNode))continue;h.setFocusedCellPosition(s);const g=h.getFocusedCellPosition();return g.column!==s.column&&this.ensureCellVisible(g),this.setRangeToCellIfSupported(s),h}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:i,rowModel:o}=this.beans;return t==="top"?i?.getPinnedTopRow(e):t==="bottom"?i?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,i,o,s=!1){const n=(t===me.UP||t===me.DOWN)&&this.currentColumnWithoutSpan?{...i,column:this.currentColumnWithoutSpan}:i,l=this.beans,{cellNavigation:a,focusSvc:d,gos:c}=l;let u=s?a.getNextCellToFocus(t,n,!0):n,h=!1;for(;!s&&u&&(u===n||!this.isValidNavigateCell(u));)c.get("enableRtl")?t===me.LEFT&&(u=this.getLastCellOfColSpan(u)):t===me.RIGHT&&(u=this.getLastCellOfColSpan(u)),u=a.getNextCellToFocus(t,u),h=Om(u);if(h&&e?.key===me.UP&&(u={rowIndex:-1,rowPinned:null,column:n.column}),o){const p=c.getCallback("navigateToNextCell");if(yi(p)){const m=p({key:t,previousCellPosition:i,nextCellPosition:u??null,event:e});yi(m)?u={rowPinned:m.rowPinned,rowIndex:m.rowIndex,column:m.column}:u=null}}if(!u)return;if(u.rowIndex<0){const p=Ee(l);d.focusHeaderPosition({headerPosition:{headerRowIndex:p+u.rowIndex,column:u.column??i.column},event:e??void 0,fromCell:!0});return}const g=this.getNormalisedPosition(u);g?(this.focusPosition(g),u.column!==g.column&&this.setCurrentColumnWithoutSpan(u.column)):this.tryToFocusFullWidthRow(u)}setCurrentColumnWithoutSpan(e){if(!this.hasColumnWithoutSpanListener){const t=()=>{this.currentColumnWithoutSpan=null};this.addManagedEventListeners({cellFocused:t,headerFocused:t}),this.hasColumnWithoutSpanListener=!0}this.currentColumnWithoutSpan=e}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const i=Ut(this.beans,e);return i?(e=i.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:i,rowRenderer:o,focusSvc:s,eventSvc:r}=this.beans,n=i.allCols;if(!o.getRowByPosition(e)?.isFullWidth())return!1;const a=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Ua(n):n[0])};this.focusPosition(d);const c=t??(a!=null&&Dh(d,a));return r.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){fe(e.column)||this.beans.rangeSvc?.setRangeToCell(e)}isValidNavigateCell(e){return!!Re(this.beans,e)}getLastCellOfColSpan(e){const t=Ut(this.beans,e)?.colsSpanning;return!t||t.length===1?e:{rowIndex:e.rowIndex,column:Ua(t),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=tn(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),o=t&&i?.sticky,{scrollFeature:s}=this.gridBodyCon;!o&&Om(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function Ka(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var qm={moduleName:"KeyboardNavigation",version:E,beans:[aM,aD,t4],apiFunctions:{getFocusedCell:dD,clearFocusedCell:cD,setFocusedCell:uD,setFocusedHeader:pD,tabToNextCell:hD,tabToPreviousCell:gD}},dM=class extends y{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:i}=this.beans;t?t.calculatePages():e.calculateBounds(0,i.getRowCount()-1)}},cM=class extends y{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,i=e?.rowTop??0,o=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:i,pageLastPixel:o}}calculateBounds(e,t){const{rowModel:i}=this.beans,o=i.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;const s=i.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},uM=".ag-header-row .ag-grid-pinned-right-cells .ag-grid-container-wrapper{border-left:var(--ag-pinned-column-border)}.ag-header-row .ag-grid-pinned-left-cells .ag-grid-container-wrapper{border-right:var(--ag-pinned-column-border)}.ag-layout-print .ag-header-row .ag-grid-pinned-left-cells,.ag-layout-print .ag-header-row .ag-grid-pinned-right-cells{display:none}.ag-layout-print .ag-header-cell-last-left-pinned{border-right:var(--ag-pinned-column-border)}.ag-layout-print .ag-header-cell-first-right-pinned{border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-grid-pinned-left-cells .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-grid-pinned-right-cells .ag-header-cell-resize:after{left:50%}.ag-grid-pinned-left-cells .ag-header-cell-resize{right:-3px}.ag-grid-pinned-right-cells .ag-header-cell-resize{left:-3px}";import{_setDisplayed as hM,_setFixedWidth as gM}from"ag-stack";var pM=class extends y{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const i of this.elements)i&&(hM(i,t),gM(i,e))}},lr=50,fM=new Set(["uiColumnResized","columnMenu","contextMenu","toolPanelUi"]),mM=class extends y{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,columnPinned:this.keepPinnedColumnsNarrowerThanViewport.bind(this)}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:i}=this.beans,o=de(e,"print"),s=o?0:t.getLeftStickyColumnContainerWidth(),r=o?0:t.getRightStickyColumnContainerWidth();s!=this.leftWidth&&(this.leftWidth=s,i.dispatchEvent({type:"leftPinnedWidthChanged"})),r!=this.rightWidth&&(this.rightWidth=r,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){if(!this.gridBodyCtrl)return;const e=this.gridBodyCtrl.getViewportWidthWithoutScrollbar();if(e<=lr)return;const t=this.getPinnedColumnsOverflowingViewport(e-lr),i=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:s}=t;let r=o;!r.length&&!s||(i&&(r=i({columns:r,viewportWidth:e})),r?.length&&(r=r.filter(n=>!fe(n)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new pM(e,t)}setColsPinned(e,t,i){const{colModel:o,visibleCols:s,gos:r,colAnimation:n}=this.beans;if(!o.ready||!e?.length)return;if(de(r,"print")){this.warn(37);return}const l=$m(t);let a=null;o.beginColUpdate();try{for(let d=0,c=e.length;d<c;++d){const u=e[d],h=u?o.getCol(u):null;h&&h.pinned!==l&&(this.setColPinned(h,l,i),a??(a=[]),a.push(h))}if(a){n?.start();try{s.refresh(i,!1),mu(this.eventSvc,a,i)}finally{n?.finish()}}}finally{o.endColUpdate()}}initCol(e){const{pinned:t,initialPinned:i}=e.colDef;Km(e,t!==void 0?t:i)}setColPinned(e,t,i){Km(e,t),e.dispatchStateUpdatedEvent("pinned",i)}limitResize(e,t,i,o){const s=e.pinnedLane===1;if(!(s?i<0&&t&&this.isNextPinned(e):i>0&&!(t&&this.isNextPinned(e))))return i;const n=o===void 0?0:e.getActualWidth()-o;return s?Math.max(i,-this.getPinnedRoom(-n)):Math.min(i,this.getPinnedRoom(n))}limitsAutoSize(e){return fM.has(e)}getPinnedRoom(e){if(de(this.gos,"print"))return 1/0;const t=this.gridBodyCtrl,i=t?t.getViewportWidthWithoutScrollbar(t.getReportedViewportWidth()):0;return Math.max(i-lr-this.leftWidth-this.rightWidth+e,0)}isNextPinned(e){const t=this.beans.visibleCols;if(wn(e)){const o=Lu(t,e);return!!o&&o.pinnedLane!==1}const i=zu(t,e);return!!i&&i.pinnedLane!==1&&i.isResizable()}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,i=this.leftWidth??0,o=t+i;let s=!1;if(o<e)return{columns:[],hasLockedPinned:s};const{visibleCols:r}=this.beans,n=[...r.leftCols],l=[...r.rightCols];let a=0,d=0;const c=0,u=[];let h=o-c-e;for(;(d<n.length||a<l.length)&&h>0;){if(a<l.length){const g=l[a++];if(g.colDef.lockPinned){s=!0;continue}h-=g.actualWidth,u.push(g)}if(d<n.length&&h>0){const g=n[d++];if(g.colDef.lockPinned){s=!0;continue}h-=g.actualWidth,u.push(g)}}return{columns:u,hasLockedPinned:s}}},$m=e=>e===!0||e==="left"?"left":e==="right"?"right":null,Km=(e,t)=>{const i=$m(t);e.pinned=i,e.pinnedLane=Ln(i)},CM={moduleName:"PinnedColumn",version:E,beans:[mM],css:[uM]};import{BaseAriaAnnouncementService as vM}from"ag-stack";var wM=class extends W1{},SM={moduleName:"Aria",version:E,beans:[wM]},bM=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",jm="ag-delay-render",yM=class extends y{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(jm)}),this.hideRequested=!0))}revealColumns(e){this.alreadyRevealed||!this.isAlive()||!this.requesters.has(e)||(this.requesters.delete(e),this.revealWhenRendered())}revealWhenRendered(){if(this.alreadyRevealed||!this.isAlive()||this.requesters.size>0)return;const{renderStatus:e,ctrlsSvc:t}=this.beans;if(e){if(!e.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealWhenRendered());return}this.timesRetried=0}t.getGridBodyCtrl().eGridBody.classList.remove(jm),this.alreadyRevealed=!0}},RM={moduleName:"ColumnDelayRender",version:E,beans:[yM],css:[bM]};import{RefPlaceholder as Zm}from"ag-stack";var Ei=class extends K{constructor(){super()}},EM={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},xM=class extends Ei{constructor(){super(...arguments),this.eExportingIcon=Zm,this.eExportingText=Zm}init(e){const{beans:t}=this;this.setTemplate(EM);const i=X("overlayExporting",t,null);i&&this.eExportingIcon.appendChild(i);const o=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}};import{RefPlaceholder as Qm,_makeNull as FM}from"ag-stack";var PM={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},DM=class extends Ei{constructor(){super(...arguments),this.eLoadingIcon=Qm,this.eLoadingText=Qm}init(e){const{beans:t,gos:i}=this,o=FM(i.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(o??PM),!o){const s=X("overlayLoading",t,null);s&&this.eLoadingIcon.appendChild(s);const r=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=r,t.ariaAnnounce.announceValue(r,"overlay")}}},MM={tag:"span",cls:"ag-overlay-no-matching-rows-center"},TM=class extends Ei{init(e){const{beans:t}=this;this.setTemplate(MM);const i=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}};import{_makeNull as AM}from"ag-stack";var IM={tag:"span",cls:"ag-overlay-no-rows-center"},kM=class extends Ei{init(e){const{beans:t,gos:i}=this,o=AM(i.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(o??IM),!o){const s=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}}};function LM(e){e.overlays?.showLoadingOverlay()}function VM(e){e.overlays?.showNoRowsOverlay()}function HM(e){e.overlays?.hideOverlay()}import{AgPromise as BM,FAST_TEST_TIMINGS as OM}from"ag-stack";import{AgPromise as GM,KeyCode as NM,RefPlaceholder as _M,_clearElement as zM,_findNextFocusableElement as WM,_focusInto as UM,_getActiveDomElement as Ym,_isNothingFocused as qM,_last as $M}from"ag-stack";var KM=".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-no-matching-rows-wrapper,.ag-overlay-no-rows-wrapper{align-items:safe center}.ag-overlay-exporting-wrapper,.ag-overlay-file-input-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{padding:var(--ag-spacing)}.ag-overlay-exporting-center,.ag-overlay-file-input-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex}.ag-overlay-file-input-center{align-items:center;flex-direction:column;gap:calc(var(--ag-spacing)*2);max-width:420px;padding:calc(var(--ag-spacing)*2)}.ag-file-input-error-banner{background:color-mix(in srgb,var(--ag-invalid-color) 10%,var(--ag-background-color));border-radius:var(--ag-border-radius);color:var(--ag-invalid-color);font-size:.9em;padding:calc(var(--ag-spacing)*.75) calc(var(--ag-spacing)*2);text-align:center;width:100%}.ag-file-input-drop-zone{align-items:center;border:dashed calc(var(--ag-border-width)*2) var(--ag-border-color);border-radius:var(--ag-border-radius);display:flex;flex-direction:column;gap:var(--ag-spacing);padding:calc(var(--ag-spacing)*4);width:100%}.ag-file-input-drop-zone-active{background:var(--ag-row-hover-color);border-color:var(--ag-accent-color)}.ag-file-input-processing{padding:calc(var(--ag-spacing)*4)}.ag-file-input-processing,.ag-file-input-text-row{align-items:center;display:flex;gap:calc(var(--ag-spacing)*.75)}.ag-file-input-text{font-weight:600}.ag-file-input-browse{background:transparent;border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);color:var(--ag-text-color);cursor:pointer;font:inherit;padding:calc(var(--ag-spacing)*.5) calc(var(--ag-spacing)*2)}",jM={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},Jm=class extends K{constructor(){super(jM),this.eOverlayWrapper=_M,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(KM)}handleKeyDown(e){if(e.key!==NM.TAB||e.defaultPrevented||Ae(e))return;const{beans:t,eOverlayWrapper:i}=this;if(i&&WM({beans:t,rootNode:i,backwards:e.shiftKey}))return;let s;e.shiftKey?s=t.focusSvc.focusGridView({column:$M(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):s=qt(t,!1),s&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper;if(!i)return;const o=i.classList,{AUTO_HEIGHT:s,NORMAL:r,PRINT:n}=Ie;o.toggle(s,t.autoHeight),o.toggle(r,t.normal),o.toggle(n,t.print)}postConstruct(){this.createManagedBean(new hl(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=i,!e)return this.refreshWrapperPadding(),GM.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),i&&this.isGridFocused()){const o=Ym(this.beans);o&&!qM(this.beans)&&(this.elToFocusAfter=o)}return e.then(o=>{const s=this.eOverlayWrapper;if(!s){this.destroyBean(o);return}if(this.activePromise!==e){this.activeOverlay!==o&&this.destroyBean(o);return}this.activePromise=null,o&&(this.activeOverlay!==o&&(s.appendChild(o.getGui()),this.activeOverlay=o),i&&this.isGridFocused()&&UM(s))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}const e=!!this.activeOverlay||!!this.activePromise;let t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const i=this.eOverlayWrapper;i&&zM(i),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Ym(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},ZM={selector:"AG-OVERLAY-WRAPPER",component:Jm},QM=OM?150:300,YM=["refresh"],ei=e=>({name:e,optionalMethods:YM}),ti={id:"agLoadingOverlay",overlayType:"loading",comp:ei("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return t===!1||!!e.get("suppressLoadingOverlay")&&!t}},xi={id:"agNoRowsOverlay",overlayType:"noRows",comp:ei("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},ja={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:ei("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},ar={id:"agExportingOverlay",overlayType:"exporting",comp:ei("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},dr={id:"agFileInputOverlay",overlayType:"fileInput",comp:ei("fileInputOverlayComponent"),wrapperCls:"ag-overlay-file-input-wrapper",exclusive:!0},cr={id:"activeOverlay",comp:ei("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},JM={id:"agErrorOverlay",comp:ei("agErrorOverlay"),wrapperCls:"ag-overlay-error-wrapper",exclusive:!1,noUserOverride:!0},XM=e=>e?{agLoadingOverlay:ti,agNoRowsOverlay:xi,agNoMatchingRowsOverlay:ja,agExportingOverlay:ar,agFileInputOverlay:dr}[e]??cr:null,eT=e=>e?{loading:ti,noRows:xi,noMatchingRows:ja,exporting:ar,fileInput:dr}[e]:null,tT=class extends y{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.devErrorOverlayActive=!1,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=ie(e);const t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[i,o,s,r]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),o()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=i,this.addManagedPropertyListeners(["loading","loadingRows","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","autoGenerateColumnDefs","processFileInput"],n=>this.onPropChange(new Set(n.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}setDevErrorOverlay(e){this.devErrorOverlayActive!==e&&(this.devErrorOverlayActive=e,this.updateOverlay(!1))}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.devErrorOverlayActive||Jr(e)||this.isDisabled(ti))return;const t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(ti)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(xi)||this.devErrorOverlayActive||(this.userForcedNoRows=!0,this.doShowOverlay(xi))}showExportOverlay(e){const t=this.gos;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(ar)||this.devErrorOverlayActive||this.userForcedNoRows&&this.currentDef===xi){e();return}const i=this.getDesiredDefWithOverride(ar);if(!i){e();return}this.runWithExportOverlay(i,e)}async runWithExportOverlay(e,t){const i=this.beans;this.exportsInProgress++,this.focusedCell=i.focusSvc.getFocusedCell(),await this.doShowOverlay(e),await new Promise(s=>setTimeout(()=>s()));const o=Date.now();try{t()}finally{const s=Date.now()-o,r=Math.max(0,QM-s),n=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),kh(i,this.focusedCell),this.focusedCell=null)};r>0?setTimeout(()=>n(),r):n()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){this.warn(99);return}if(e.get("activeOverlay")){this.warn(296);return}if(this.currentDef===ja){this.warn(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==xi&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return ZM}getOverlayWrapperCompClass(){return Jm}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading")||e.has("loadingRows"))&&this.updateOverlay(t))return;const i=this.currentDef,o=this.eWrapper?.activeOverlay;if(o&&i){const s=e.has("activeOverlayParams");if(i===cr)s&&o.refresh?.(this.makeCompParams(!0));else{const r=i.paramsKey;(e.has("overlayComponentParams")||r&&e.has(r))&&o.refresh?.(this.makeCompParams(!1,r,i.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const i=this.getDesiredDefWithOverride(),o=this.currentDef,s=i===cr&&e;return i!==o?i?(this.doShowOverlay(i),!0):(this.disableInitialOverlay(),this.doHideOverlay()):s&&i?(t.hideOverlay(),this.doShowOverlay(i),!0):(i||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let i=XM(t.get("activeOverlay"));return i||(i=e??this.getOverlayDef(),i&&this.isDisabled(i)&&(i=null)),i}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:i}=t;if(this.devErrorOverlayActive&&this.eWrapper)return JM;const o=e.get("loading");if(o!==void 0){if(this.disableInitialOverlay(),o)return Jr(e)?null:ti}else if(this.showInitialOverlay){const n=!e.get("columnDefs")&&!e.get("autoGenerateColumnDefs"),l=!e.get("rowData");if(n||l){if(l&&e.get("processFileInput")&&!this.isDisabled(dr))return dr;if(!this.isDisabled(ti))return ti}this.disableInitialOverlay()}else this.disableInitialOverlay();const r=i.getOverlayType();return eT(r)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:i}=this,{userCompFactory:o}=i;this.currentDef=e;const s=e!==cr,r=!!e.exclusive;this.exclusive=r;let n;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(n=e.paramsKey);let l;s&&!e.noUserOverride&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(l=o.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),l??(l=o.getCompDetailsFromGridOptions(e.comp,s?e.id:void 0,this.makeCompParams(!s,n,e.overlayType),!1));const a=l?.newAgStackInstance()??null,d=this.eWrapper?this.eWrapper.showOverlay(a,e.wrapperCls,r):BM.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(r),d}makeCompParams(e,t,i){const{gos:o}=this,s=e?o.get("activeOverlayParams"):{...o.get("overlayComponentParams"),...t&&o.get(t)||null,overlayType:i};return G(o,s??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},Xm={moduleName:"Overlay",version:E,userComponents:{agLoadingOverlay:DM,agNoRowsOverlay:kM,agNoMatchingRowsOverlay:TM,agExportingOverlay:xM},apiFunctions:{showLoadingOverlay:LM,showNoRowsOverlay:VM,hideOverlay:HM},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[tT]};import{_getMaxDivHeight as iT}from"ag-stack";var oT=class extends y{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.stickyBottomRowsHeight=0,this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=iT(),Rt(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Rt(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getAdjustedUiContainerHeight(){return this.uiContainerHeight==null?null:this.uiContainerHeight-this.stickyBottomRowsHeight}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}};import{_exists as ur,_removeFromArray as sT,_requestAnimationFrame as rT}from"ag-stack";var nT=400,hr=0,gr=1,pr=2,lT=class extends y{constructor(){super(...arguments),this.beanName="rowRenderer",this.listenedCols=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.drawState=hr,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{const s=this.getAllRowCtrls();for(let r=0,n=s.length;r<n;++r){const l=s[r].getAllCellCtrls();for(let a=0,d=l.length;a<d;++a)l[a].onCellSelectionChanged()}},t=()=>{this.eventSvc.addListener("cellSelectionChanged",e)},i=()=>{this.eventSvc.removeListener("cellSelectionChanged",e)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{Ne(this.gos)?t():i()}),Ne(this.gos)&&t()},this.onColDefChanged=e=>{const t=e.column,i=this.getAllRowCtrls();for(let o=0,s=i.length;o<s;++o)i[o].getOwnCellCtrl(t)?.onColDefChanged()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc,this.visibleCols=e.visibleCols}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer","stickyRowsMaxViewportRatio"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",o=>this.onSuppressCellFocusChanged(o.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:o,previousValue:s})=>{(!s&&o||s&&!o)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i){const o=()=>{const s=i.columns;s.length&&this.refreshCells({columns:s,force:!0})};this.addManagedPropertyListener("showOpenedGroup",o),this.addManagedEventListeners({columnRowGroupChanged:o})}if(e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),o=>this.destroyRowCtrls(o,!1));else{const o=this.gridBodyCtrl;o.setStickyTopHeight(0),o.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=de(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const t=this.getKeepDetailRowsCount()??3;this.cachedRowCtrls=new aT(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),i=this.cachedRowCtrls?.getEntries()??[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}updateCellFocus(e){const t=this.getAllRowCtrls();for(let i=0,o=t.length;i<o;++i){const s=t[i].getAllCellCtrls();for(let r=0,n=s.length;r<n;++r)s[r].onCellFocused(e)}for(const i of this.getFullWidthRowCtrls())i.onRowFocused(e)}onCellFocusChanged(e){const t=e?.rowIndex;if(t!=null){const i=e.rowPinned??null,o=this.getRowByPosition({rowIndex:t,rowPinned:i}),s=this.beans.colModel.getCol(e.column);!o&&!i?this.redraw():o&&s&&!o.isFullWidth()&&!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:t,column:s,rowPinned:i})&&!o.getCellCtrl(s)&&o.renderFocusedCell()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){const t=this.getAllRowCtrls();for(let i=0,o=t.length;i<o;++i){const s=t[i].getAllCellCtrls();for(let r=0,n=s.length;r<n;++r)s[r].onSuppressCellFocusChanged(e)}for(const i of this.getFullWidthRowCtrls())i.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t){const i=this.getAllRowCtrls();for(let o=0,s=i.length;o<s;++o){const r=i[o].getAllCellCtrls();for(let n=0,l=r.length;n<l;++n)t.onFlashCells(r[n],e)}}},columnHoverChanged:()=>{const e=this.getAllRowCtrls();for(let t=0,i=e.length;t<i;++t){const o=e[t].getAllCellCtrls();for(let s=0,r=o.length;s<r;++s)o[s].onColumnHover()}},displayedColumnsChanged:()=>{const e=this.getAllRowCtrls();for(let t=0,i=e.length;t<i;++t){const o=e[t].getAllCellCtrls();for(let s=0,r=o.length;s<r;++s)o[s].onDisplayedColumnsChanged()}}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){const e=this.listenedCols;for(let t=0,i=e.length;t<i;++t)e[t].__removeEventListener("colDefChanged",this.onColDefChanged);this.listenedCols=[]}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.colsList.slice();for(let t=0,i=e.length;t<i;++t)e[t].__addEventListener("colDefChanged",this.onColDefChanged);this.listenedCols=e}refreshCellPositions(){const e=this.beans,t=this.getAllRowCtrls();for(let i=0,o=t.length;i<o;++i){const s=t[i].getAllCellCtrls();for(let r=0,n=s.length;r<n;++r)Rl(e,s[r])}}refreshPinnedEdgeCells(e,t,i,o){const s=this.getAllRowCtrls();for(let r=0,n=s.length;r<n;++r){const l=s[r];fr(l,e),fr(l,t),fr(l,i),fr(l,o)}}onDomLayoutChanged(){const e=de(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const i of this.getAllRowCtrls()){const o=i.getOwnCellCtrl(e)?.eGui;o&&t.push(o)}return t}refreshPinnedRowComps(e=!0){this.topRowCtrls=this.refreshPinnedRows(this.topRowCtrls,"top",e),this.bottomRowCtrls=this.refreshPinnedRows(this.bottomRowCtrls,"bottom",e)}refreshPinnedRows(e,t,i){const{pinnedRowModel:o,beans:s,printLayout:r}=this,n=new Map;for(let c=0,u=e.length;c<u;++c){const h=e[c];n.set(h.rowNode,h)}const l=[],a=[];try{o?.forEachPinnedRow(t,(c,u)=>{const h=i?n.get(c):void 0;if(h)l[u]=h,n.delete(c);else{const g=new rr(c,s,!1,!1,r);a.push(g),l[u]=g}})}catch(c){for(let u=0,h=a.length;u<h;++u){const g=a[u];g.destroyFirstPass(),g.destroySecondPass()}throw c}for(const c of n.values())c.destroyFirstPass(),c.destroySecondPass();const d=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;return l.length=d,l}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){try{if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.removeRow(e))this.updateAllRowCtrls();else{const i=o=>{const s=o[e.rowIndex];if(!s||s.rowNode!==e)return;const r=this.createRowCon(e,!1,!1);s.destroyFirstPass(),s.destroySecondPass(),o[e.rowIndex]=r};switch(e.rowPinned){case"top":this.topRowCtrls=this.topRowCtrls.slice(),i(this.topRowCtrls);break;case"bottom":this.bottomRowCtrls=this.bottomRowCtrls.slice(),i(this.bottomRowCtrls);break;default:i(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}}catch(i){throw this.showDrawnRows(),i}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const o of e??[])this.redrawRow(o,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){const t=e.onlyBody&&this.drawState!==pr;this.getLockOnRefresh();try{const i=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const o=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&Ht(this.gos),r=o?this.getRowsToRecycle():null,{stickyRowFeature:n,gos:l}=this;try{if(o||this.removeAllRowComps(!s),this.workOutFirstAndLastRowsToRender(),n){n.checkStickyRows();const a=n.extraTopHeight+n.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(r,s)}finally{r&&this.destroyRowCtrls(Object.values(r),!!s&&!this.printLayout)}this.updateAllRowCtrls(),this.gridBodyCtrl.updateRowCount(),t||this.refreshPinnedRowComps(l.get("enableRowPinning")?o:void 0),this.dispatchDisplayedRowsChanged(),i!=null&&this.restoreFocusedCell(i),this.drawState=hr}finally{this.releaseLockOnRefresh()}this.beans.aggStage?.refreshAggregateDependentCells()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}const i=this.pageBounds.getCurrentPageHeight();t.setModelHeight(i+e)}getLockOnRefresh(){if(this.drawState===gr)throw this.beans.log.errorToThrow(252);this.drawState=gr,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){const e=this.drawState===gr;e&&(this.drawState=pr),this.beans.frameworkOverrides.releaseLockOnRefresh?.(),e&&this.showDrawnRows()}showDrawnRows(){this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}isRefreshInProgress(){return this.drawState===gr}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,i=this.findPositionToFocus(e);if(!i){t.focusHeaderPosition({headerPosition:{headerRowIndex:Ee(this.beans)-1,column:e.column}});return}if(e.rowIndex!==i.rowIndex||e.rowPinned!=i.rowPinned){t.setFocusedCellOrSpan({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(G(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:i}=this.beans;let o=e;for(o.rowPinned==null&&t&&i&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:i.getFirstRow()});o;){if(o.rowPinned==null&&i)if(o.rowIndex<i.getFirstRow()){if(o=io(this.beans,{rowPinned:null,rowIndex:0}),!o)return null}else o.rowIndex>i.getLastRow()&&(o={rowPinned:null,rowIndex:i.getLastRow()});const s=this.getRowByPosition(o);if(s?.isAlive())return{...s.getRowPosition(),column:e.column};o=io(this.beans,o)}return null}getAllRowCtrls(){const e=[];return To(e,this.topRowCtrls),To(e,this.bottomRowCtrls),To(e,this.getStickyTopRowCtrls()),To(e,this.getStickyBottomRowCtrls()),this.beans.spannedRowRenderer?.pushAllCtrls(e),To(e,Object.values(this.rowCtrlsByRowIndex)),e}addRenderedRowListener(e,t,i){const o=this.getRowByPosition({rowIndex:t,rowPinned:null});o&&o.addEventListener(e,i)}refreshCells({rowNodes:e,columns:t,force:i,suppressFlash:o}={}){const s={force:i,newData:!1,suppressFlash:o};for(const r of this.getCellCtrls(e,t))r.refreshOrDestroyCell(s);if(e?.length)for(const r of this.getRowCtrls(e))r.isFullWidth()&&r.refreshRow(s)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e)}getRowCtrlByNode(e){const t=this.getIndexedRowCtrlByNode(e);return t||e.rowPinned?t:this.getStickyRowCtrlByNode(e)}getIndexedRowCtrlByNode(e){const t=e.rowIndex;if(t==null)return;const i=e.rowPinned;if(i==="top"){const s=this.topRowCtrls[t];return s?.rowNode===e?s:void 0}if(i==="bottom"){const s=this.bottomRowCtrls[t];return s?.rowNode===e?s:void 0}const o=this.rowCtrlsByRowIndex[t];return o?.rowNode===e?o:void 0}getStickyRowCtrlByNode(e){const t=this.stickyRowFeature;if(t){for(const i of t.stickyTopRowCtrls)if(i.rowNode===e)return i;for(const i of t.stickyBottomRowCtrls)if(i.rowNode===e)return i}}refreshRowByNode(e){if(!e)return;const t=this.getIndexedRowCtrlByNode(e);t?.refreshRow();const i=e.rowPinned?void 0:this.getStickyRowCtrlByNode(e);i&&i!==t&&i.refreshRow(),this.beans.spannedRowRenderer?.refreshRowsOf(e)}getRowCtrls(e){const t=Za(e),i=this.getAllRowCtrls();return!e||!t?i:i.filter(o=>{const s=o.rowNode;return Qa(s,t)})}getCellCtrls(e,t){let i;if(ur(t)){i=new Set;for(let s=0,r=t.length;s<r;++s){const n=this.colModel.getCol(t[s]);n&&i.add(n)}}const o=[];for(const s of this.getRowCtrls(e))for(const r of s.getAllCellCtrls())i&&!i.has(r.column)||o.push(r);return o}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const i of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[i].rowNode.id==null&&e.push(i);this.removeRowCtrls(e);const t=Object.create(null);for(const i of Object.values(this.rowCtrlsByRowIndex)){const o=i.rowNode;t[o.id]=i}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const i of e){const o=this.rowCtrlsByRowIndex[i];o&&(o.destroyFirstPass(t),o.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){if(this.drawState===pr){this.redrawAfterModelUpdate({recycleRows:!0});return}const{focusSvc:t,animationFrameSvc:i}=this.beans,{afterScroll:o,force:s}=e;let r;const n=this.stickyRowFeature;n&&(r=t?.getFocusCellToUseAfterRefresh()??void 0);const l=this.firstRenderedRow,a=this.lastRenderedRow;try{this.workOutFirstAndLastRowsToRender();let d=!1;if(n){d=n.checkStickyRows();const u=n.extraTopHeight+n.extraBottomHeight;u&&this.updateContainerHeights(u)}const c=this.firstRenderedRow!==l||this.lastRenderedRow!==a;if(o&&!d&&!c&&!s)return;this.getLockOnRefresh();try{this.recycleRows(null,!1,o),this.updateAllRowCtrls(),this.drawState=hr}finally{this.releaseLockOnRefresh()}this.dispatchDisplayedRowsChanged(o&&!d)}catch(d){throw this.drawState===hr&&(this.drawState=pr,this.showDrawnRows()),d}if(r!=null){const d=t?.getFocusCellToUseAfterRefresh();r!=null&&d==null&&(i?.flushAllFrames(),this.restoreFocusedCell(r))}}removeRowCompsNotToDraw(e,t){const i={};for(const r of e)i[r]=!0;const s=Object.keys(this.rowCtrlsByRowIndex).filter(r=>!i[r]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=[];for(let n=this.firstRenderedRow;n<=this.lastRenderedRow;n++)t.push(n);const i=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;o!=null&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&(!i||i.isRowInPage(o))&&o<this.rowModel.getRowCount()&&t.push(o);const s=n=>{const l=n.rowNode.rowIndex;l==null||l===o||(l<this.firstRenderedRow||l>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(n)&&t.push(l)};for(const n of Object.values(this.rowCtrlsByRowIndex))s(n);if(e)for(const n of Object.values(e))s(n);t.sort((n,l)=>n-l);const r=[];for(let n=0;n<t.length;n++){const l=t[n],a=this.rowModel.getRow(l);a&&!a.sticky&&r.push(l)}return r}recycleRows(e,t=!1,i=!1){const o=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(o,!t);for(const s of o)this.createOrUpdateRowCtrl(s,e,t,i)}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const e=this.visibleCols,t=e.leftCols.length>0,i=e.rightCols.length>0;(this.pinningLeft!==t||i!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const i=t.rowNode.rowIndex;e.push(i.toString())}this.refreshPinnedRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0,force:!0})}getFullWidthRowCtrls(e){const t=Za(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const o=i.rowNode;return!(t!=null&&!Qa(o,t))})}createOrUpdateRowCtrl(e,t,i,o){let s,r=this.rowCtrlsByRowIndex[e];if(r||(s=this.rowModel.getRow(e),ur(s)&&ur(t)&&t[s.id]&&s.alreadyRendered&&(r=t[s.id],t[s.id]=null)),!r)if(s??(s=this.rowModel.getRow(e)),ur(s))r=this.createRowCon(s,i,o);else return;s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r}destroyRowCtrls(e,t){const i=[];for(let o=0,s=e.length;o<s;++o){const r=e[o];if(r){if(this.cachedRowCtrls&&r.isCacheable()){this.cachedRowCtrls.addRow(r);continue}if(r.destroyFirstPass(!t),t){const n=r.instanceId;this.zombieRowCtrls[n]=r,i.push(()=>{r.destroySecondPass(),delete this.zombieRowCtrls[n]})}else r.destroySecondPass()}}t&&(i.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const o of i)o()},nT))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Ge(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:i}=this;e.updateOffset();let o,s;if(!i.isRowsToRender())o=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),this.ensureAllRowsInRangeHaveHeightsCalculated(0,1/0),o=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g,p,f;do{const C=t.getPixelOffset(),{pageFirstPixel:b,pageLastPixel:R}=t.getCurrentPagePixelRange(),x=e.divStretchOffset,D=u.getVScrollPosition(),A=D.top,L=D.bottom;h?(p=b+x,f=R+x):(p=Math.max(A+C-c,b)+x,f=Math.min(L+C+c,R)+x),this.firstVisibleVPixel=Math.max(A+C,b)+x,this.lastVisibleVPixel=Math.min(L+C,R)+x,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=i.getRowIndexAtPixel(p),w=i.getRowIndexAtPixel(f);const v=t.getFirstRow(),S=t.getLastRow();m<v&&(m=v),w>S&&(w=S),o=m,s=w}const r=de(this.gos,"normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),l=Math.max(this.getRowBuffer(),500);r&&!n&&s-o>l&&(s=o+l);const a=o!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(a||d)&&(this.firstRenderedRow=o,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,rT(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:r}=this,n=r.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(n||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),o||n||i?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const o=e.rowNode,s=this.focusSvc.isRowFocused(o.rowIndex,o.rowPinned),r=this.editSvc?.isEditing(e),n=o.detail;return s||r||n?!!this.isRowPresent(o):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,i){const o=this.cachedRowCtrls?.getRow(e)??null;if(o)return o;const s=i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new rr(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(o=>o.rowNode),t=this.getStickyTopRowCtrls().map(o=>o.rowNode),i=this.getStickyBottomRowCtrls().map(o=>o.rowNode);return[...t,...e,...i]}getSpanningCol(e,t){if(e.allColsIndex<0)return e;const i=this.getRowCtrlByNode(t);if(i?i.isFullWidth():nr(this.beans,t)!=="Normal")return e;const s=this.visibleCols,r=e.pinnedLane;let n;r===1?n=s.centerCols:r===0?n=s.leftCols:n=s.rightCols;const l=e.allColsIndex-n[0].allColsIndex,a=i?.getColSpans();for(let d=0;d<l;){const c=d+yl(t,n,d,a);if(c>l)return n[d];d=c}return e}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i]??this.getStickyTopRowCtrls().find(o=>o.rowNode.rowIndex===i)??this.getStickyBottomRowCtrls().find(o=>o.rowNode.rowIndex===i)??null;break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const o=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!o}},aT=class{constructor(e){this.entriesMap=new Map,this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap.set(e.rowNode,e),this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){const t=this.entriesMap.get(e);return t?(this.removeFromCache(t),t.setCached(!1),t):null}removeRow(e){const t=this.entriesMap.get(e);return t?(t.destroyFirstPass(!0),t.destroySecondPass(),this.removeFromCache(t),!0):!1}removeFromCache(e){this.entriesMap.delete(e.rowNode),sT(this.entriesList,e)}getEntries(){return this.entriesList}};function Za(e){if(!e)return;const t={top:new Set,bottom:new Set,normal:new Set};for(const i of e){const o=i.id;switch(i.rowPinned){case"top":t.top.add(o);break;case"bottom":t.bottom.add(o);break;default:t.normal.add(o);break}}return t}function Qa(e,t){const i=e.id;switch(e.rowPinned){case"top":return t.top.has(i);case"bottom":return t.bottom.has(i);default:return t.normal.has(i)}}var fr=(e,t)=>{t!==null&&e.getOwnCellCtrl(t)?.refreshPinnedEdges()},To=(e,t)=>{for(let i=0,o=t.length;i<o;++i)e.push(t[i])},dT=class extends y{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:i}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),i.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Rt(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,zt(e.source))}}},cT=class extends y{constructor(){super(...arguments),this.beanName="log"}wireBeans(e){this.gridId=e.context.getId()}warn(...e){ql(this.gridId,e[0],e[1])}deprecated(...e){dR(this.gridId,e[0],e[1])}error(...e){fp(this.gridId,e[0],e[1])}errorToThrow(...e){return Hs(this.gridId,e[0],e[1])}};import{_toString as uT}from"ag-stack";function hT(e){e.valueCache?.expire()}function gT(e,t){const{colKey:i,rowNode:o,useFormatter:s,from:r="edit",transformValues:n}=t,l=e.colModel.getCol(i);if(!l)return null;const a=e.valueSvc.getValueForDisplay({column:mt(l,o),node:o,includeValueFormatted:s,from:r,transformValues:n});return s?a.valueFormatted??uT(a.value):a.value}var pT="paste",fT=class extends y{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=Ve(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0||--this.deferredDepth>0)return;const e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&this.csrm?.doAggregate(e);const{rowRenderer:i}=this.beans;if(t)for(const o of t)eC(i,o);if(e){const o=e.getSortedRows();for(let s=0,r=o.length;s<r;++s)eC(i,o[s])}this.beans.aggStage?.refreshAggregateDependentCells(t,e),(this.batchedPath||this.batchedNodes)&&(this.deferredDepth=1,this.endDeferred())}onCellValueChanged(e){const{gos:t,rowModel:i,changedPathFactory:o}=this.beans;if(e.source===pT||t.get("suppressChangeDetection")||!i.rootNode)return;const s=e.node.primaryRow;if(this.csrm){let r=this.batchedPath;r||(r=o?.newPath(t.get("aggregateOnlyChangedColumns"))??null,this.batchedPath=r);let n=s;s.group||((this.batchedNodes??(this.batchedNodes=new Set)).add(s),n=s.parent),r?.addCell(n,e.column.colId)}else(this.batchedNodes??(this.batchedNodes=new Set)).add(s);this.deferredDepth===0&&(this.deferredDepth=1,this.endDeferred())}},eC=(e,t)=>{const{sibling:i,pinnedSibling:o}=t;e.refreshRowByNode(t),e.refreshRowByNode(i),e.refreshRowByNode(o),e.refreshRowByNode(i?.pinnedSibling),e.refreshRowByNode(o?.sibling)},mT=class extends y{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);this.error(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return this.error(16,{expression:e,params:t,e:i}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const i=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return t[e]=o,o}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},CT=class extends y{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0,this.neverExpires=!1}postConstruct(){this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){const o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=i}getValue(e,t){if(e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}},tC={moduleName:"ValueCache",version:E,beans:[CT],apiFunctions:{expireValueCache:hT}},vT={moduleName:"Expression",version:E,beans:[mT]},wT={moduleName:"ChangeDetection",version:E,beans:[fT]},iC={moduleName:"CellApi",version:E,apiFunctions:{getCellValue:gT}};import{_isExpressionString as ST}from"ag-stack";var bT=class extends y{constructor(){super(...arguments),this.beanName="valueSvc",this.isTreeData=!1,this.isSsrm=!1,this.cellExpressions=!1,this.groupSuppressBlankHeader=!1,this.editSvc=void 0,this.valueCache=void 0,this.expressionSvc=void 0,this.dataTypeSvc=void 0,this.formula=void 0,this.showValuesAsSvc=void 0,this.formulaDataSvc=void 0,this.changeDetectionSvc=void 0,this.showRowGroupColValueSvc=void 0,this.rowGroupingEditValueSvc=void 0,this.frameworkOverrides=void 0,this.gridApi=void 0,this.gridOptions=void 0}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.formula=e.formula,this.showValuesAsSvc=e.showValuesAsSvc,this.changeDetectionSvc=e.changeDetectionSvc,this.showRowGroupColValueSvc=e.showRowGroupColValueSvc,this.rowGroupingEditValueSvc=e.rowGroupingEditValueSvc,this.frameworkOverrides=e.frameworkOverrides,this.gridApi=e.gridApi,this.gridOptions=e.gridOptions,this.init()}init(){const e=this.gos;this.isSsrm=ht(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.groupSuppressBlankHeader=e.get("groupSuppressBlankHeader"),e.get("valueCache")||(this.valueCache=void 0)}postConstruct(){this.init();const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue),this.addManagedPropertyListener("groupSuppressBlankHeader",t=>this.groupSuppressBlankHeader=t.currentValue)}getValueForDisplay(e){const t=e.column,i=e.node,o=i.group,s=this.showRowGroupColValueSvc;if(s&&(!t&&o||t?.showRowGroup)&&(!this.isTreeData||i.footer)){const c=s.getGroupValue(i,t,o?this.displayIgnoresAggData(i):!1);return c==null?{value:null,valueFormatted:null}:{value:c.value,valueFormatted:e.includeValueFormatted?s.formatAndPrefixGroupColValue(c,t,e.exporting):null}}if(!t)return{value:i.key,valueFormatted:null};const n=o?this.displayIgnoresAggData(i):!1;let l=this.getValue(t,i,e.from,n),a=l;if(t.allowFormula){const c=this.formula;c?.isFormula(l)&&(e.useRawFormula?(l=c.normaliseFormula(l,!0),a=c.resolveValue(t,i)):(l=c.resolveValue(t,i),a=l))}const d=e.includeValueFormatted&&!(e.exporting&&t.colDef.useValueFormatterForExport===!1);if(e.transformValues){const c=this.showValuesAsSvc;if(c&&!n&&t.showValuesAs!=null){const u=c.isApplying(t),h=u?c.transform(t,i,a):a;return{value:h,valueFormatted:d?c.formatValue(t,i,h,a,!u):null}}}return{value:l,valueFormatted:d?this.formatValue(t,i,a):null}}getTransformedValue(e,t){const i=t.group?this.displayIgnoresAggData(t):!1,o=this.getValue(e,t,"edit",i);return this.resolveTransformed(e,t,o,i)}resolveTransformed(e,t,i,o){if(e.allowFormula){const r=this.formula;r?.isFormula(i)&&(i=r.resolveValue(e,t))}const s=this.transformingSvc(e,o);return s?s.transform(e,t,i):i}getDisplayValue(e,t,i,o){const s=t.group,r=this.showRowGroupColValueSvc;if(r&&(!e&&s||e?.showRowGroup)&&(!this.isTreeData||t.footer)){const d=r.getGroupValue(t,e,s?this.displayIgnoresAggData(t):!1);return d==null?null:d.value}if(!e)return t.key;const l=s?this.displayIgnoresAggData(t):!1,a=this.getValue(e,t,i,l);if(o)return this.resolveTransformed(e,t,a,l);if(e.allowFormula){const d=this.formula;if(d?.isFormula(a))return d.resolveValue(e,t)}return a}getValueFromData(e,t,i=!1){let s=e.isCalculatedCol&&!(e.aggregationActive&&t.group)?this.formula?.resolveValue(e,t):this.resolveCoreValue(e,t,i);if(this.cellExpressions&&ST(s)){const r=s.substring(1);s=this.executeValueGetter(r,t.data,e,t)}return s}getValue(e,t,i,o=!1){if(t){if(i!=="data"){const s=this.editSvc?.getPendingEditValue(t,e,i);if(s!==void 0)return s}return this.getValueFromData(e,t,o)}}displayIgnoresAggData(e){return e.footer||e.level===-1||!e.sibling||this.groupSuppressBlankHeader||e.leafGroup&&this.colModel.pivotMode?!1:!!e.expanded}transformingSvc(e,t){const i=this.showValuesAsSvc;return i&&!t&&e.showValuesAs&&i.isApplying(e)?i:void 0}resolveCoreValue(e,t,i){const o=t.group;if(!o&&e.allowFormula){const c=this.formula?.getDataSourceFormula(t,e);if(c!==void 0)return c}const s=t.data,r=this.isTreeData;if(o||r){const c=o&&!i?t.aggData:void 0,u=e.colId,h=c?.[u];if(r){if(h!==void 0)return h;const p=e.valueGetter;let f;if(p)f=this.executeValueGetter(p,s,e,t);else if(s){const m=e.field;if(m&&!e.fieldHasProtoKey){const w=e.fieldPath;f=w?qi(s,w):s[m]}}if(f!==void 0)return f}const g=t.groupData;if(g&&u in g)return g[u];if(h!==void 0)return h}const n=e.valueGetter,l=i&&this.isSsrm&&!!e.aggFunc;if(o){const c=e.showRowGroup;if(n&&!l)return typeof c=="string"?oC(this.colModel,c,t.level):this.executeValueGetter(n,s,e,t);if(this.isSsrm&&s){const u=RT(t,s,c);if(u!==void 0)return u}if(typeof c=="string")return oC(this.colModel,c,t.level)}if(n)return l?void 0:this.executeValueGetter(n,s,e,t);const a=e.field;if(!a||!s||l||e.fieldHasProtoKey)return;const d=e.fieldPath;return d?qi(s,d):s[a]}parseValue(e,t,i,o){const s=e.colDef;if(e.allowFormula&&this.formula?.isFormula(i))return i;const r=s.valueParser;if(r!=null&&r!==""){const n={api:this.gridApi,context:this.gridOptions.context,node:t,data:t?.data,oldValue:o,newValue:i,colDef:s,column:e};return typeof r=="function"?r(n):this.expressionSvc?.evaluate(r,n)}return i}getDeleteValue(e,t){const i=e.colDef.valueParser;return i!=null&&i!==""?this.parseValue(e,t,"",this.getDisplayValue(e,t,"edit",!1))??null:null}formatValue(e,t,i,o,s=!0){if(this.formula?.isFormulaErrorValue(e,t,i))return i;let r=null;const n=o??(s?e.valueFormatter:void 0);if(n){const l={api:this.gridApi,context:this.gridOptions.context,value:i,node:t,data:t?t.data:null,colDef:e.colDef,column:e};if(typeof n=="function")r=n(l);else{const a=this.expressionSvc;r=a?a.evaluate(n,l):null}}else{const l=e.refData;if(l)return l[i]||""}return r==null&&Array.isArray(i)&&(r=i.join(", ")),r}formatTransformedValue(e,t,i){if(!t)return;const o=this.showValuesAsSvc,s=t.group?this.displayIgnoresAggData(t):!1;if(!o||s||e.showValuesAs==null)return;const r=this.getValue(e,t,"edit",s);return o.formatValue(e,t,i,r,!o.isApplying(e))}setValue(e,t,i,o){const s=t.colDef;if(!e.data&&yT(e,s)&&(e.data={}),!this.isSetValueSupported(t,e,i,s))return!1;const r=this.getValueFromData(t,e),n=e.data,l={api:this.gridApi,context:this.gridOptions.context,node:e,data:n,oldValue:r,newValue:i,colDef:s,column:t};let a=!1;if(n){const c=this.handleExternalFormulaChange({column:t,eventSource:o,newValue:i,setterParams:l,rowNode:e});if(c!==null)return c;a=this.computeValueChange({column:t,rowNode:e,newValue:i,params:l,rowData:n,valueSetter:s.valueSetter,field:s.field})??!0}const d=this.changeDetectionSvc;d?.beginDeferred();try{if(e.group){const c=this.rowGroupingEditValueSvc?.setGroupDataValue(e,t,i,r,o,a||i!==r);if(c!==void 0)return!a&&!c?!1:this.finishValueChange(e,t,l,o,i)}return a?this.finishValueChange(e,t,l,o):!1}finally{d?.endDeferred()}}finishValueChange(e,t,i,o,s){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const r=s===void 0?this.getValueFromData(t,e):s;this.dispatchCellValueChangedEvent(e,i,r,o);const n=e.pinnedSibling;return n&&this.dispatchCellValueChangedEvent(n,i,r,o),!0}isSetValueSupported(e,t,i,o){const{field:s,valueSetter:r}=o;if(e.isCalculatedCol)return!1;const n=this.formula,l=e.allowFormula&&n?.isFormula(i),a=!!this.formulaDataSvc?.hasDataSource(),d=s==null||s==="",c=r==null||r==="";return d&&c&&!(a&&l)?t.group&&(o.groupRowValueSetter||o.groupRowEditable)?!0:(this.warn(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,i)?(this.warn(135),!1):!0}handleExternalFormulaChange(e){const{column:t,rowNode:i,newValue:o,eventSource:s,setterParams:r}=e,n=this.formula,l=this.formulaDataSvc;if(!t.allowFormula||!l?.hasDataSource())return null;const a=n?.isFormula(o),d=l.getFormula({column:t,rowNode:i});if(a){if(!(d!==o))return!1;l.setFormula({column:t,rowNode:i,formula:o});const u=n?.resolveValue(t,i),{valueSetter:h,field:g}=t.colDef;return(h!=null&&h!==""||g!=null&&g!=="")&&this.computeValueChange({column:t,rowNode:i,newValue:u,params:{...r,newValue:u},rowData:i.data,valueSetter:h,field:g}),this.finishValueChange(i,t,r,s)}return d!==void 0&&l.setFormula({column:t,rowNode:i,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:i,rowData:o,field:s,column:r,newValue:n}=e;if(t!=null&&t!=="")return typeof t=="function"?t(i):this.expressionSvc?.evaluate(t,i);if(!o||!s||r.fieldHasProtoKey)return!1;const l=r.fieldPath;let a=!1;if(l===null)a=o[s]===n,a||(o[s]=n);else{let d=o;const c=l.length-1;for(let u=0;u<c&&d;++u){const h=l[u],g=d[h];if(g!=null&&typeof g!="object")return this.refuseFieldWrite(s,h);d=g}if(d){const u=l[c];a=d[u]===n,a||(d[u]=n)}}return!a}refuseFieldWrite(e,t){return this.beans.log.warn(339,{field:e,key:t}),!1}dispatchCellValueChangedEvent(e,t,i,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:i,newRawValue:t.newValue,value:i,source:o})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.frameworkOverrides.wrapOutgoing(()=>t(e))}executeValueGetter(e,t,i,o){const s=this.valueCache;if(s){const l=s.getValue(o,i.colId);if(l!==void 0)return l}const r={api:this.gridApi,context:this.gridOptions.context,data:t,node:o,column:i,colDef:i.colDef,getValue:l=>this.getValueCallback(o,l)},n=typeof e=="function"?e(r):this.expressionSvc?.evaluate(e,r);return s&&s.setValue(o,i.colId,n),n}getValueCallback(e,t){const i=this.colModel.getCol(t);return i?this.getValueFromData(mt(i,e),e):null}getKeyForNode(e,t){let i=this.getValueFromData(e,t);const o=e.colDef,s=o.keyCreator;if(s){const r={api:this.gridApi,context:this.gridOptions.context,value:i,colDef:o,column:e,node:t,data:t.data};i=s(r)}return typeof i=="string"||i==null||(i=String(i),i==="[object Object]"&&this.warn(121)),i}},yT=(e,t)=>e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0,oC=(e,t,i)=>{const o=e.colsById[t];return o?.rowGroupActive&&o.rowGroupActiveIndex>i?null:void 0},RT=(e,t,i)=>{if(!e.footer)return;const o=e.field;if(!(!o||i!==!0&&i!==o))return o.includes(".")?qi(t,o.split(".")):t[o]},ET={moduleName:"CommunityCore",version:E,beans:[cT,l4,gR,p6,v6,oT,l6,YP,L4,Ux,cM,dM,lT,bT,s4,ZP,n4,w6,dT,i6,s6,K4],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:vp,getGridElement:vR,destroy:pR,isDestroyed:fR,getGridOption:mR,setGridOption:CR,updateGridOptions:wp,isModuleRegistered:wR},dependsOn:[ea,XF,Xp,Ex,Xl,W4,df,U4,Xm,wT,$4,qm,CM,SM,nD,u6,e6,vT,fF,RM]},sC=new WeakMap;function xT(e,t,i){sC.set(e,{packageName:t,version:i})}function rC(e){const t=[`ag-grid-community=${E}`],i=e.find(({moduleName:s})=>s==="EnterpriseCore");i&&t.push(`ag-grid-enterprise=${i.version}`);const o=new Set;for(const s of e){const r=sC.get(s);r&&o.add(`${r.packageName}=${r.version}`)}return t.push(...o),t.join(", ")}function nC(e,t){e&&Og(`Version: ${rC(t)}`)}var lC=e=>e(),aC=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.usesAgGridProvider=void 0,this.wrapIncoming=lC,this.wrapOutgoing=lC,this.baseDocLink=`${Kg}/${this.frameworkName}-data-grid`,K2(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},Ya=new WeakMap,Ja=new WeakMap;function FT(e,t,i){if(!t)return Ul(11),{};const[o,s]=$b();return e.appendChild(o),new dC().create(o,s,t,n=>{const l=new O2(s);n.createBean(l)},void 0,i,()=>o.remove())}var PT=1,dC=class{create(e,t,i,o,s,r,n){const l=ki.applyGlobalGridOptions(i),a=l.gridId??String(PT++),d=this.getRegisteredModules(r,a,l.rowModelType),c=rC(d),u=this.createBeansList(l.rowModelType,d,a),h=this.createProvidedBeans(t,l,c,r);if(!u){nC(Il(l.debug),d),J2(e,c);return}const p={providedBeanInstances:h,beanClasses:u,id:a,beanInitComparator:Qb,beanDestroyComparator:Yb,derivedBeans:[jb],destroyCallback:()=>{Ja.delete(m),Ya.delete(e),_2(a),n?.()}},f=new qb(p);nC(Il(l.debug),d),this.registerModuleFeatures(f,d),o(f),f.getBean("syncSvc").start(),s?.(f);const m=f.getBean("gridApi");return Ya.set(e,m),Ja.set(m,e),m}getRegisteredModules(e,t,i){return Kt(ET,void 0),e?.modules?.forEach(o=>Kt(o,t)),z2(t,cC(i))}registerModuleFeatures(e,t){const i=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(const s of t){i.registerModule(s);const r=s.apiFunctions;if(r){const n=Object.keys(r);for(const l of n)o?.addFunction(l,r[l])}}}createProvidedBeans(e,t,i,o){let s=o?o.frameworkOverrides:null;Kb(s)&&(s=new aC);const r={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:s,hasAncestorStyledRoot:o?.hasAncestorStyledRoot,agVersionsText:i};return o?.providedBeanInstances&&Object.assign(r,o.providedBeanInstances),r}createBeansList(e,t,i){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=cC(e),r=o[s];if(!r){Bs(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!Yg(r,i,s)){const l=Ll(),a=`rowModelType = '${s}'`,d=l?`Unable to use ${a} as that requires the ag-grid-enterprise script to be included.
`:`Missing module ${r}Module for rowModelType ${s}.`;Bs(200,{reasonOrId:a,moduleName:r,gridScoped:Jg(),gridId:i,rowModelType:s,isUmd:l},d);return}const n=new Set;for(const l of t)for(const a of l.beans??[])n.add(a);return Array.from(n)}};function cC(e){return e??"clientSide"}function DT(e){if(typeof e=="string")try{e=document.querySelector(`[grid-id="${e}"]`)??document.querySelector(e)??document.getElementById(e)}catch{e=null}for(e=e?.firstElementChild??e;e;){const t=Ya.get(e);if(t)return t;e=e.parentElement}}function uC(e){return Ja.get(e)}function hC(e,t=!1){const i=[],o=[],s=[],r=[],n=[],l=[],a=[],d=[],c=[],u=[],h=[],g=[];let p=0;for(let f=0;f<e.length;f++){const{colId:m,sort:w,sortType:v,sortIndex:S,rowGroup:C,rowGroupIndex:b,aggFunc:R,valueIndex:x,showValuesAs:D,pivot:A,pivotIndex:L,pivotSort:H,pinned:re,hide:$,width:ne,flex:j,headerName:_}=e[f];g.push(m),_!=null&&h.push({colId:m,headerName:_}),w&&(i[S??p++]={colId:m,sort:w,type:v??void 0}),C&&(o[b??0]=m),typeof R=="string"&&s.push({colId:m,aggFunc:R,valueIndex:x}),D!=null&&r.push({colId:m,showValuesAs:Qo(D)}),A&&(n[L??0]=m,H!==void 0&&l.push({colId:m,sort:H})),re&&(re==="right"?d:a).push(m),$&&c.push(m),(j!=null||ne)&&u.push({colId:m,flex:j??void 0,width:ne===null?void 0:ne})}return{sort:i.length?{sortModel:Xa(i)}:void 0,rowGroup:o.length?{groupColIds:Xa(o)}:void 0,aggregation:s.length?{aggregationModel:MT(s)}:void 0,showValuesAs:r.length?{showValuesAsModel:r}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:Xa(n),pivotSortModel:l.length?l:void 0}:void 0,columnPinning:a.length||d.length?{leftColIds:a,rightColIds:d}:void 0,columnVisibility:c.length?{hiddenColIds:c}:void 0,columnSizing:u.length?{columnSizingModel:u}:void 0,columnOrder:g.length?{orderedColIds:g}:void 0,columnHeaderName:h.length?{columnHeaderNames:h}:void 0}}function Xa(e){return e.filter(t=>t!=null)}function MT(e){return e.sort((t,i)=>(t.valueIndex??1/0)-(i.valueIndex??1/0)).map(t=>({colId:t.colId,aggFunc:t.aggFunc}))}function gC(e){const t=[],i=[];for(const{groupId:o,open:s,headerName:r}of e)s&&t.push(o),r!=null&&i.push({groupId:o,headerName:r});if(!(!t.length&&!i.length))return{openColumnGroupIds:t,headerNames:i.length?i:void 0}}function TT(e){return{columnGroup:gC(e)}}var AT=class extends y{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(o=>{if(!o){this.error(18),t||this.error(20);return}if(this.isGridApi(o))return o;const s=o;return"current"in s?s.current?.api:(s.api||this.error(19),s.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}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":this.warn(21);break}})}processGroupOpenedEvent(e){const t=this.beans,i=t.colModel.colsGroupsById;for(const o of e.columnGroups){let s;o&&(s=i.get(o.getGroupId())),!(o&&!s)&&zi(t,s,o.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let i;const o=this.beans,{colResize:s,colModel:r,scrollVisibleSvc:n}=o;if(t&&(i=r.getNonPivotCol(t.getColId())),t&&!i)return;switch(e.type){case"columnMoved":{const d=e.api.getColumnState().map(c=>({colId:c.colId}));tt(o,{state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const d=e.api.getColumnState().map(c=>({colId:c.colId,hide:c.hide}));tt(o,{state:d},"alignedGridChanged")}break;case"columnPinned":{const d=e.api.getColumnState().map(c=>({colId:c.colId,pinned:c.pinned}));tt(o,{state:d},"alignedGridChanged")}break;case"columnResized":{const{flexColumns:a,finished:d}=e,c=e.columns,u=a!=null,h=u?c.length-a.length:0,g=[],p=[];let f=u?g:void 0;for(let m=0,w=c.length;m<w;++m){const v=c[m],S=ed(v),C=S&&m<h,b=S&&!C,R=v===t?i:r.getNonPivotCol(v.colId);if(R){if(C&&ed(R)){f===g&&(f=g.slice()),f.push(R);continue}IT(v,R,b,u)||(R.setUserSized(v.isUserSized()),R.flex=null,b&&f===g?f=g.slice():!b&&f!==g&&f?.push(R),g.push(R),p.push(v.actualWidth))}}s?.setClampedColumnWidths(g,p,d,"alignedGridChanged",f);break}}const l=n.isVerticalScrollShowing();for(const a of this.getAlignedGridApis())a.setGridOption("alwaysShowVerticalScroll",l)}};function ed(e){return(e.flex??0)>0&&e.pinnedLane===1}function IT(e,t,i,o){return i&&(o||t.flex===e.flex)&&ed(t)}var pC={moduleName:"AlignedGrids",version:E,beans:[AT],dependsOn:[ma]};function kT(e,t={}){const i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))}function fC(e,t,i,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&fC(e,t.parent,i,o,s),t.setExpanded(i,void 0,s))}function LT(e,t){return e.rowModel.getRowNode(t)}function VT(e,t,i,o){e.rowRenderer.addRenderedRowListener(t,i,o)}function HT(e){return e.rowRenderer.getRenderedNodes()}function BT(e,t,i){e.rowModel.forEachNode(t,i)}function OT(e){return e.rowRenderer.firstRenderedRow}function GT(e){return e.rowRenderer.lastRenderedRow}function NT(e,t){return e.rowModel.getRow(t)}function _T(e){return e.rowModel.getRowCount()}function zT(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function WT(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function mC(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function CC(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}function UT(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}var vC={moduleName:"RowApi",version:E,apiFunctions:{redrawRows:kT,setRowNodeExpanded:fC,getRowNode:LT,addRenderedRowListener:VT,getRenderedNodes:HT,forEachNode:BT,getFirstDisplayedRowIndex:OT,getLastDisplayedRowIndex:GT,getDisplayedRowAtIndex:NT,getDisplayedRowCount:_T}},wC={moduleName:"ScrollApi",version:E,apiFunctions:{getVerticalPixelRange:zT,getHorizontalPixelRange:WT,ensureColumnVisible:mC,ensureIndexVisible:CC,ensureNodeVisible:UT}};import{RefPlaceholder as td,_clearElement as SC}from"ag-stack";var qT={tag:"div",cls:"ag-overlay-file-input-center",children:[{tag:"div",ref:"eErrorBanner",cls:"ag-file-input-error-banner"},{tag:"div",ref:"eDropZone",cls:"ag-file-input-drop-zone"},{tag:"div",ref:"eProcessingState",cls:"ag-file-input-processing"}]},$T=class extends Ei{constructor(){super(...arguments),this.eErrorBanner=td,this.eDropZone=td,this.eProcessingState=td,this.state="ready",this.dragCounter=0,this.processingToken=0}init(e){this.setTemplate(qT),this.buildDropZone(e),this.showState("ready"),this.setupDragListeners(),this.gos.get("processFileInput")||(this.beans.log.warn(305),this.showError("gridOptions.processFileInput is missing"))}buildDropZone(e){const{beans:t}=this,i=this.getLocaleTextFunc(),o=e.fileInput?.overlayText??i("fileInputOverlay","Drag & Drop file to import data"),s=X("document",t,null),r={tag:"span",cls:"ag-file-input-text",children:o},n=O({tag:"div",cls:"ag-file-input-text-row",children:s?[()=>s,r]:[r]});this.eDropZone.appendChild(n),this.appendBrowseButton(this.eDropZone),t.ariaAnnounce.announceValue(o,"overlay")}updateProcessingState(e){const{beans:t}=this,i=this.getLocaleTextFunc();SC(this.eProcessingState);const o=X("overlayLoading",t,null);o&&(o.classList.add("ag-loading-icon"),this.eProcessingState.appendChild(o));const s=i("fileInputProcessing",`Processing ${e}`,[e]),r=O({tag:"span",cls:"ag-file-input-text",children:s});this.eProcessingState.appendChild(r),t.ariaAnnounce.announceValue(s,"overlay")}showError(e){this.eErrorBanner.textContent=e,this.showState("error"),this.beans.ariaAnnounce.announceValue(e,"overlay")}appendBrowseButton(e){const t=this.getLocaleTextFunc(),i=O({tag:"input",cls:"ag-file-input-input",attrs:{type:"file",style:"display:none"}});this.addManagedElementListeners(i,{change:()=>this.onFileInputChange(i)}),e.appendChild(i);const o=O({tag:"button",cls:"ag-file-input-browse",attrs:{type:"button"},children:t("fileInputOverlayBrowse","Browse files")});this.addManagedElementListeners(o,{click:()=>i.click()}),e.appendChild(o)}showState(e){this.state=e;const t=this.getGui();switch(SC(t),e){case"error":t.appendChild(this.eErrorBanner),t.appendChild(this.eDropZone);break;case"processing":t.appendChild(this.eProcessingState);break;default:t.appendChild(this.eDropZone);break}}setupDragListeners(){const e=this.getGui();this.addManagedElementListeners(e,{dragenter:t=>{this.isFileDrag(t)&&(t.preventDefault(),this.dragCounter++,this.dragCounter===1&&this.eDropZone.classList.add("ag-file-input-drop-zone-active"))},dragover:t=>{this.isFileDrag(t)&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="copy"))},dragleave:t=>{this.isFileDrag(t)&&(t.preventDefault(),this.dragCounter--,this.dragCounter<=0&&(this.dragCounter=0,this.eDropZone.classList.remove("ag-file-input-drop-zone-active")))},drop:t=>{this.isFileDrag(t)&&(t.preventDefault(),this.dragCounter=0,this.eDropZone.classList.remove("ag-file-input-drop-zone-active"),this.handleFileList(t.dataTransfer?.files))}})}isFileDrag(e){return e.dataTransfer?.types?.includes("Files")??!1}onFileInputChange(e){this.handleFileList(e.files),e.value=""}handleFileList(e){e&&e.length>0&&this.handleFiles(Array.from(e))}handleFiles(e){if(this.state==="processing")return;const{gos:t}=this,i=t.get("processFileInput"),o=e[0].name;this.updateProcessingState(o),this.showState("processing");const s=++this.processingToken,r=l=>{if(!this.isAlive()||s!==this.processingToken)return;const a={rowData:l};t.get("activeOverlay")==="agFileInputOverlay"&&(a.activeOverlay=void 0),t.updateGridOptions({options:a,source:"api"})},n=l=>{if(!this.isAlive()||s!==this.processingToken)return;const a=this.getLocaleTextFunc(),d=l??a("fileInputProcessingFailed",`Error processing ${o}`,[o]);this.showError(d)};if(!i)n();else try{i(G(t,{files:e,success:r,fail:n}))}catch(l){n(l instanceof Error?l.message:void 0)}}},bC={moduleName:"FileInputOverlay",version:E,userComponents:{agFileInputOverlay:$T},icons:{document:"document"},dependsOn:[Xm]};import{_camelCaseToHumanText as yC}from"ag-stack";var KT=class extends y{constructor(){super(...arguments),this.beanName="autoGenColsSvc"}postConstruct(){this.generateColumns(!0),this.addManagedPropertyListener("rowData",()=>this.generateColumns(!1)),this.addManagedPropertyListener("autoGenerateColumnDefs",()=>this.generateColumns(!1))}generateColumns(e){const t=this.gos,i=t.get("autoGenerateColumnDefs");if(!i)return;const o=t.get("rowData")??[],s=typeof i=="object"?i:{};let r;for(let a=0,d=o.length;a<d;++a)if(Zo(o[a])){r=o[a];break}if(!r){e||t.updateGridOptions({options:{columnDefs:[]},source:"optionsUpdated"});return}let n=id(r,void 0,s,!t.get("suppressFieldDotNotation"));const l=t.getCallback("processAutoGeneratedColumnDefs");if(l){const a=l({columnDefs:n,rowData:o});Array.isArray(a)&&(n=a)}t.updateGridOptions({options:{columnDefs:n},source:"optionsUpdated"})}};function id(e,t,i,o,s=new Set){const{objectValues:r="group",arrayValues:n="primitives",nullishValues:l="include"}=i,a=Object.keys(e),d=[];for(let c=0,u=a.length;c<u;++c){const h=a[c];if(vn(h,o&&h.includes(".")?h.split("."):null))continue;const g=t?`${t}.${h}`:h,p=e[h];if(Zo(p)){if(s.has(p))continue;if(s.add(p),r==="group"){const f=id(p,g,i,o,s);f.length>0&&d.push({headerName:yC(h)??h,children:f})}else if(r==="flatten"){const f=id(p,g,i,o,s);d.push(...f)}continue}else if(Array.isArray(p)){if(n==="skip"||n==="primitives"&&!jT(p))continue;d.push(RC(g,h,t,!0));continue}else if(p==null){if(l!=="include")continue}else if(typeof p=="function")continue;d.push(RC(g,h,t))}return d}function RC(e,t,i,o){const s={field:e};return i&&(s.headerName=yC(t)??t),o&&(s.cellDataType=!1),s}function jT(e){if(e.length===0)return!1;const t=e[0];return t!=null&&!Array.isArray(t)&&!Zo(t)&&typeof t!="function"}var EC={moduleName:"AutoGenerateColumns",version:E,beans:[KT],dependsOn:[bC]};function ZT(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function xC({colAutosize:e,visibleCols:t},i,o){Array.isArray(i)?e?.autoSizeCols({colKeys:i,skipHeader:o,source:"api"}):e?.autoSizeCols({...i,colKeys:i.colIds??t.allCols,source:"api"})}function QT(e,t){t&&typeof t=="object"?xC(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}import{_debounce as YT,_getInnerWidth as JT,_removeFromArray as XT,_requestAnimationFrame as FC}from"ag-stack";var e5=new Set(["autosizeColumns","sizeColumnsToFit"]),t5=new Set(["columnMenu","contextMenu"]),i5=150,o5=[0,100,500],s5=["dataChanged","columnsChanged","gridSizeChanged","viewportChanged"],r5=class extends y{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[],this.continuousStrategy=null,this.continuousRunning=!1,this.continuousFrameScheduled=!1,this.pendingReasons=null,this.continuousRetries=0,this.continuousRetryScheduled=!1,this.continuousEchoing=!1,this.gridSizeSettling=!1,this.runDebouncedContinuousAutoSize=YT(this,()=>{this.gridSizeSettling=!1,this.scheduleContinuousAutoSize()},i5)}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")i=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const s=e.get("rowData");i=s!=null&&s.length>0&&ie(e),i&&this.revealOnEmptyModel()}t.continuous&&this.initContinuousAutoSize(t),i&&this.beans.colDelayRenderSvc?.hideColumns(o)}}withUiActionStrategyParams(e){const{source:t}=e;if(!t||!t5.has(t))return e;const i=this.gos.get("autoSizeStrategy");return i?.type!=="fitCellContents"||!i.applyToUiActions?e:{...e,skipHeader:i.skipHeader??e.skipHeader,defaultMinWidth:i.defaultMinWidth??e.defaultMinWidth,defaultMaxWidth:i.defaultMaxWidth??e.defaultMaxWidth,columnLimits:i.columnLimits??e.columnLimits,scaleUpToFitGridWidth:i.scaleUpToFitGridWidth??e.scaleUpToFitGridWidth}}autoSizeCols(e){this.autoSizeColsAsync(this.withUiActionStrategyParams(e)).then(t=>this.dispatchAutoSized(t))}dispatchAutoSized(e){ft(this.beans.eventSvc,Array.from(e),!0,"autosizeColumns")}autoSizeColsAsync(e){const{colModel:t}=this.beans;return et(this.beans,!0),this.innerAutoSizeCols(e).then(o=>{if(!e.scaleUpToFitGridWidth)return o;const s=od(this.beans),r=e.colKeys.filter(n=>{const l=t.getCol(n);return!l||l.colDef.suppressAutoSize||l.colKind==="row-number"?!1:!(l.displayed&&l.pinnedLane!==1)});return this.sizeColumnsToFit(s,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(n=>({...n,key:n.colId})),colKeys:r,onlyScaleUp:!0,animate:!1}),o}).finally(()=>et(this.beans,!1))}innerAutoSizeCols(e){return new Promise((t,i)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,i));const{colKeys:o,skipHeader:s,skipHeaderGroups:r,stopAtGroup:n,defaultMaxWidth:l,defaultMinWidth:a,columnLimits:d=[],source:c="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:p,visibleCols:f,pinnedCols:m}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,i)});return}this.timesDelayed=0;const w=new Set;let v,S=-1;const C=Object.fromEntries(d.map(({colId:D,...A})=>[D,A])),b=s??this.gos.get("skipHeaderOnAutoSize"),R=r??b,x=m?.limitsAutoSize(c)?m:void 0;for(;S!==0;){S=0;const D=[],A=[];for(const L of o){if(!L)continue;const H=g.getCol(L);if(!H||w.has(H)||H.colDef.suppressAutoSize||Bn(H))continue;const re=p.getPreferredWidthForColumn(H,b);if(re>0){const $=C[H.colId]??{};$.minWidth??($.minWidth=a),$.maxWidth??($.maxWidth=l),D.push(H),A.push(l5(H,re,$)),w.add(H),S++}}n5(D,A,c,x)&&(v=f.refresh(c,!0))}if(v)for(let D=0,A=v.length;D<A;++D)w.add(v[D]);R||this.autoSizeColumnGroupsByColumns(o,c,n),t(w)})}autoSizeColumn(e,t,i){this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const{colModel:o,ctrlsSvc:s}=this.beans,r=new Set;for(let l=0,a=e.length;l<a;++l){let c=o.getCol(e[l])?.parent;for(;c&&c!=i;)c.providedColumnGroup.padding||r.add(c),c=c.parent}const n=s.getHeaderRowContainerCtrl();if(n)for(const l of r)n.getHeaderCtrlForColumn(l)?.resizeLeafColumnsToFit(t)}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",i)};e.addEventListener("dblclick",o);const s=new wt(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,i){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const r=[],n=t.getDisplayedLeafColumns();for(const l of n)l.colDef.suppressAutoSize||r.push(l.colId);r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),i()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let i=od(this.beans);if(i>0&&this.beans.visibleCols.centerCols.length===0&&(i=Math.max(i-lr,0)),i>0){this.sizeColumnsToFit(i,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):this.warn(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",i,o){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,o));return}const s=o?.animate??!0;s&&et(this.beans,!0);try{this.fitColumnsToWidth(e,t,i,o)}finally{s&&et(this.beans,!1)}}fitColumnsToWidth(e,t,i,o){const s=Object.create(null);for(const{key:g,...p}of o?.columnLimits??[])s[typeof g=="string"?g:g.getColId()]=p;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const n=vt(r);if(o?.onlyScaleUp&&n>e||e===n&&d5(r,s,o))return;const a=[],d=[];for(const g of r){const p=o?.colKeys?.some(f=>g5(g,f))??!0;g.colDef.suppressSizeToFit||!p?d.push(g):a.push(g)}const c=a.slice(0),u=c5(a,s,o,t);u5(e,a,d,u,s,o,t);const h=this.beans.visibleCols;h.updateBodyWidths(t,h.setLeftValues()),!i&&ft(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,i=e.get("autoSizeStrategy");i?.type!=="fitGridWidth"&&i?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=i.type;if(this.continuousStrategy)this.runContinuousNow("dataChanged");else if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:r,defaultMaxWidth:n}=i,l=s?.map(({colId:a,minWidth:d,maxWidth:c})=>({key:a,minWidth:d,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:n,columnLimits:l})}else this.sizeColumnsToFit(i.width,"sizeColumnsToFit");t?.revealColumns(o)})}revealOnEmptyModel(){const[e]=this.addManagedEventListeners({modelUpdated:()=>{this.beans.rowModel.getRowCount()>0||(e?.(),this.beans.colDelayRenderSvc?.revealColumns("fitCellContents"))}})}onFirstDataRendered(e){const{colIds:t,...i}=e;setTimeout(()=>{if(!this.isAlive())return;const o="autosizeColumns";this.continuousStrategy?this.runContinuousNow("dataChanged"):t?this.autoSizeCols({...i,source:o,colKeys:t}):this.autoSizeAllColumns({...i,source:o}),this.beans.colDelayRenderSvc?.revealColumns(i.type)})}initContinuousAutoSize(e){const t=e.type==="fitCellContents";if(t&&!a5(this.gos)){this.warn(328,{rowModel:this.gos.get("rowModelType")});return}this.continuousStrategy=e,this.addManagedEventListeners({modelUpdated:i=>{(t||i.newData)&&this.scheduleContinuousAutoSize("dataChanged")},paginationChanged:i=>{(i.newPage||i.newPageSize)&&this.scheduleContinuousAutoSize("dataChanged")},cellValueChanged:()=>this.scheduleContinuousAutoSize("dataChanged"),displayedColumnsChanged:i=>{e5.has(i.source)||this.scheduleContinuousAutoSize("columnsChanged")},newColumnsLoaded:()=>this.scheduleContinuousAutoSize("columnsChanged"),gridSizeChanged:()=>this.scheduleDebouncedContinuousAutoSize("gridSizeChanged"),scrollVisibilityChanged:()=>{this.isContinuousEcho()||(this.gridSizeSettling?this.scheduleDebouncedContinuousAutoSize("gridSizeChanged"):this.scheduleContinuousAutoSize("gridSizeChanged"))}}),this.addManagedEventListeners({rowNodeDataChanged:()=>this.scheduleContinuousAutoSize("dataChanged")}),!(!t||!e.shouldAutoSizeColumns)&&this.addManagedEventListeners({virtualColumnsChanged:()=>this.scheduleDebouncedContinuousAutoSize("viewportChanged"),viewportChanged:()=>this.scheduleDebouncedContinuousAutoSize("viewportChanged"),bodyScroll:i=>{i.direction==="horizontal"&&this.scheduleDebouncedContinuousAutoSize("viewportChanged")}})}scheduleDebouncedContinuousAutoSize(e){this.isContinuousEcho()||(e==="gridSizeChanged"&&(this.gridSizeSettling=!0),(this.pendingReasons??(this.pendingReasons=new Set)).add(e),this.runDebouncedContinuousAutoSize())}isContinuousEcho(){return this.continuousRunning||this.continuousEchoing}scheduleContinuousAutoSize(e){const t=this.pendingReasons??(this.pendingReasons=new Set);e&&t.add(e),!(this.continuousRunning||this.continuousFrameScheduled)&&(this.continuousFrameScheduled=!0,FC(this.beans,()=>{this.continuousFrameScheduled=!1,this.isAlive()&&this.runContinuousAutoSize()}))}runContinuousAutoSize(){if(!this.pendingReasons?.size)return;const e=this.pendingReasons;this.pendingReasons=null,this.runContinuousNow(s5.find(t=>e.has(t)))}runContinuousNow(e){const t=this.continuousStrategy;if(!t||this.continuousRunning)return;if(t.type!=="fitProvidedWidth"&&od(this.beans)<=0){this.retryContinuousWhenSized(e);return}this.continuousRetries=0;const i=this.getAutoSizeCandidates(t);if(!i.length)return;const o=t.shouldAutoSizeColumns;if(o){let s;try{s=o(G(this.gos,{reason:e,columns:i}))}catch(r){this.warn(329,{error:r});return}if(!s)return}this.continuousRunning=!0,this.reapplyStrategy(t,i).then(()=>this.onContinuousAutoSizeComplete(),()=>this.onContinuousAutoSizeComplete())}reapplyStrategy(e,t){const i=e.type;if(i==="fitCellContents"){const{skipHeader:o,defaultMinWidth:s,defaultMaxWidth:r,columnLimits:n,scaleUpToFitGridWidth:l}=e;return this.autoSizeColsAsync({colKeys:t,skipHeader:o,defaultMinWidth:s,defaultMaxWidth:r,columnLimits:n,scaleUpToFitGridWidth:l,source:"autosizeColumns"}).then(a=>this.dispatchAutoSized(a))}if(i==="fitProvidedWidth")this.sizeColumnsToFit(e.width,"sizeColumnsToFit",!1,{colKeys:t});else{const{defaultMinWidth:o,defaultMaxWidth:s,columnLimits:r}=e;this.sizeColumnsToFitGridBody({defaultMinWidth:o,defaultMaxWidth:s,colKeys:t,columnLimits:r?.map(({colId:n,minWidth:l,maxWidth:a})=>({key:n,minWidth:l,maxWidth:a}))})}return Promise.resolve()}retryContinuousWhenSized(e){const t=o5[this.continuousRetries];t===void 0||this.continuousRetryScheduled||(this.continuousRetries++,this.continuousRetryScheduled=!0,window.setTimeout(()=>{this.continuousRetryScheduled=!1,this.isAlive()&&this.runContinuousNow(e)},t))}onContinuousAutoSizeComplete(){if(this.continuousRunning=!1,this.continuousEchoing=!0,FC(this.beans,()=>{this.continuousEchoing=!1}),this.pendingReasons?.size&&this.isAlive()){const e=this.pendingReasons;this.pendingReasons=null;for(const t of e)this.scheduleContinuousAutoSize(t)}}getAutoSizeCandidates(e){const{colModel:t,visibleCols:i}=this.beans,o=e.type==="fitCellContents",s=o?e.colIds:void 0,r=s?s.map(l=>t.getCol(l)):i.allCols,n=[];for(let l=0,a=r.length;l<a;++l){const d=r[l];if(!d||d.isUserSized()||Bn(d))continue;const c=d.colDef;if(o?c.suppressAutoSize:c.suppressSizeToFit)continue;const u=d.flex;u!=null&&u>0||n.push(d)}return n}processResizeOperations(){this.shouldQueueResizeOperations=!1;const e=this.resizeOperationQueue;this.resizeOperationQueue=[];for(let t=0,i=e.length;t<i;++t)e[t]()}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.continuousStrategy=null,this.pendingReasons=null,this.resizeOperationQueue.length=0,super.destroy()}};function n5(e,t,i,o){let s=!1,r=0;for(let l=0,a=e.length;l<a;++l){const d=e[l],c=d.actualWidth,u=t[l],h=o!==void 0&&d.pinnedLane!==1;if(h&&u>c)continue;d.setActualWidth(u,i);const g=d.actualWidth-c;s||(s=g!==0),r-=h?g:0}if(!o)return s;let n=o.getPinnedRoom(r);for(let l=0,a=e.length;l<a;++l){const d=e[l],c=d.actualWidth,u=t[l];if(d.pinnedLane===1||u<=c)continue;d.setActualWidth(c+Math.min(u-c,n),i);const h=d.actualWidth-c;s||(s=h!==0),n-=h}return s}function l5(e,t,i={}){const o=i.minWidth??e.minWidth;t<o&&(t=o);const s=i.maxWidth??e.maxWidth;return t>s&&(t=s),t}function a5(e){return e.get("rowModelType")!=="viewport"}function od({ctrlsSvc:e,scrollVisibleSvc:t}){const i=e.getGridBodyCtrl(),s=t.isVerticalScrollShowing()?t.getScrollbarWidth()??0:0;return JT(i.eGridBody)-s}function d5(e,t,i){return e.every(o=>{if(o.colDef.suppressSizeToFit)return!0;const s=t?.[o.colId],r=s?.minWidth??i?.defaultMinWidth,n=s?.maxWidth??i?.defaultMaxWidth,l=o.actualWidth;return(r==null||l>=r)&&(n==null||l<=n)})}function c5(e,t,i,o){const s=Object.create(null);for(const r of e){i?.onlyScaleUp&&(s[r.colId]=r.actualWidth),r.resetActualWidth(o);const n=t?.[r.colId],l=n?.minWidth??i?.defaultMinWidth??-1/0,a=n?.maxWidth??i?.defaultMaxWidth??1/0,d=r.actualWidth,c=Lt(d,l,a);c!=d&&r.setActualWidth(c,o)}return s}function u5(e,t,i,o,s,r,n){let l=!1;for(;!l;)l=h5(e,t,i,o,s,r,n)}function h5(e,t,i,o,s,r,n){const l=e-vt(i);if(l<=0){for(const h of t){const g=s?.[h.colId]?.minWidth??r?.defaultMinWidth??h.minWidth;h.setActualWidth(g,n)}return!0}const a=h=>{XT(t,h),i.push(h)};let d=!0;const c=l/vt(t);let u=l;for(let h=t.length-1;h>=0;h--){const g=t[h],p=g.colId,f=o[p],m=s?.[p],w=m?.minWidth??r?.defaultMinWidth??f,v=m?.maxWidth??r?.defaultMaxWidth,S=Math.max(w??-1/0,g.minWidth),C=Math.min(v??1/0,g.maxWidth);let b=Math.round(g.actualWidth*c);b<S?(b=S,a(g),d=!1):b>C?(b=C,a(g),d=!1):h===0&&(b=u),g.setActualWidth(b,n),u-=b}return d}function g5(e,t){return e===t||e.colId==t||e.colDef===t}var PC={moduleName:"ColumnAutoSize",version:E,beans:[r5],apiFunctions:{sizeColumnsToFit:ZT,autoSizeColumns:xC,autoSizeAllColumns:QT},dependsOn:[ef]};function p5(e,t){return!!e.colHover?.isHovered(t)}var f5=class extends y{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=i=>{const{beans:o,gos:s,element:r,columns:n}=this,l=o.colHover;if(i??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:l.setMouseOver.bind(l,n),mouseout:l.clearMouseOver.bind(l)});else{for(const d of this.destroyManagedListeners)d();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},m5="ag-column-hover",C5=class extends y{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e.filter(t=>!fe(t)))}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,i){const o=()=>{const s=this.isHovered(i);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const i=this.isHovered(e);t.toggleCss(m5,i)}addHeaderFilterColumnHoverListener(e,t,i,o){this.createHoverFeature(e,[i],o);const s=()=>{const r=this.isHovered(i);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,i){e.createManagedBean(new f5(t,i))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},DC={moduleName:"ColumnHover",version:E,beans:[C5],apiFunctions:{isColumnHovered:p5}};function v5(e,t,i,o,s){const r=[];MC(e,r);const n=E5(r,i),l=w5(n,o,t.length);return S5(l,r,t,n,o,s),o&&b5(l,t,n,s),R5(l,t.length),l.rows}function w5(e,t,i){const o=e+(t?1:0),s=[],r=[];for(let n=0;n<o;n++)s.push({cells:[],grouping:n<e}),r.push(new Array(i).fill(!1));return{rows:s,occupied:r}}function S5(e,t,i,o,s,r){const n=new Map;for(let l=0;l<i.length;l++)n.set(i[l],l);for(const l of t){const a=l.getProvidedColumnGroup(),d=a.getLevel();if(d>=o)continue;const c=[];for(const u of l.getLeafColumns()){const h=n.get(u);if(h==null)continue;a.isPadding()&&s&&r&&u.isSpanHeaderHeight()||c.push(h)}x5(e.rows[d].cells,e.occupied[d],l,c)}}function b5(e,t,i,o){const{rows:s,occupied:r}=e;for(let n=0;n<t.length;n++){const l=t[n],a=o?y5(l,i):i;s[a].cells.push({type:"column",column:l,columnIndex:n,columnSpan:1,rowSpan:i-a+1}),r[a][n]=!0;for(let d=a+1;d<=i;d++)r[d][n]||(s[d].cells.push({type:"covered",columnIndex:n,columnSpan:1,rowSpan:1}),r[d][n]=!0)}}function y5(e,t){if(!e.isSpanHeaderHeight())return t;let i=t,o=e.getOriginalParent();for(;o;){const s=o.getLevel();o.isPadding()&&s<i&&(i=s),o=o.getOriginalParent()}return i}function R5(e,t){const{rows:i,occupied:o}=e;for(let s=0;s<i.length;s++){const r=i[s];for(let n=0;n<t;n++)o[s][n]||r.cells.push({type:"padding",columnIndex:n,columnSpan:1,rowSpan:1});r.cells.sort((n,l)=>n.columnIndex-l.columnIndex)}}function MC(e,t){for(const i of e)Me(i)&&(t.push(i),MC(i.children??[],t))}function E5(e,t){let i=0;for(const o of e){const s=o.getProvidedColumnGroup();(!t||!s.isPadding())&&(i=Math.max(i,s.getLevel()+1))}return i}function x5(e,t,i,o){o.sort((r,n)=>r-n);let s=0;for(;s<o.length;){let r=s;for(;r+1<o.length&&o[r+1]===o[r]+1;)r+=1;const n=o[s],l=o[r]-n+1;e.push({type:i.isPadding()?"padding":"group",column:i,columnIndex:n,columnSpan:l,rowSpan:1});for(let a=n;a<n+l;a++)t[a]=!0;s=r+1}}var F5=class extends y{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:i,columnKeys:o,skipRowGroups:s,exportRowNumbers:r}=t,n=this.getColumnsToExport({allColumns:i,skipRowGroups:s,columnKeys:o,exportRowNumbers:r});return[this.prepareSession(n),this.prependContent(t),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t)].reduce((l,a)=>a(l),e).parse()}processRow(e,t,i,o){const r=t.rowPositions!=null||!!t.onlySelected,n=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.pivotMode?o.leafGroup:!o.group,a=!!o.footer,d=jc(this.gos,o);if(!l&&!a&&(t.skipRowGroups||d||n)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!l&&!a||t.shouldRowBeSkipped?.(G(this.gos,{node:o})))return;const u=e.onNewBodyRow(o);for(let h=0,g=i.length;h<g;++h)u.onColumn(i[h],h,o);if(t.getCustomContentBelowRow){const h=t.getCustomContentBelowRow(G(this.gos,{node:o}));h&&e.addCustomContent(h)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportHeaders(e,t){return i=>{if(e.skipColumnGroupHeaders&&e.skipColumnHeaders)return i;let o=[];e.skipColumnGroupHeaders||(o=this.beans.colGroupSvc.createGroups(t,new Df,null,void 0,!0));const s=v5(o,t,i.useGridHeaderLayout&&!!this.gos.get("hidePaddedHeaderRows"),!e.skipColumnHeaders,i.isSpanColumnHeader());for(const r of s){const n=r.grouping?i.onNewHeaderGroupingRow():i.onNewHeaderRow();for(const l of r.cells)n.onCell(this.withCollapsibleGroupRanges(l,t))}return i}}processPinnedTopRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="top").sort((s,r)=>s.rowIndex-r.rowIndex).map(s=>this.pinnedRowModel?.getPinnedTopRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.forEachPinnedRow("top",o),i}}processRows(e,t){return i=>{const o=this.rowModel,s=ie(this.gos,o),r=ht(this.gos,o),n=!s&&e.onlySelected,l=this.processRow.bind(this,i,e,t),a=this.pinnedRowModel,d=u=>{if(!e.skipPinnedRowDuplicates){l(u);return}const h=u.pinnedSibling,g=h?.rowPinned;a?.isManual()&&h?.id!=null&&g&&a.getPinnedRowById(h.id,g)===h||l(u)},{exportedRows:c="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(u=>u.rowPinned==null).sort((u,h)=>u.rowIndex-h.rowIndex).map(u=>o.getRow(u.rowIndex)).filter(u=>u!=null).forEach(d);else if(this.colModel.pivotMode)s?o.forEachPivotNode(d,!0,c==="filteredAndSorted"):r?o.forEachNodeAfterFilterAndSort(d,!0):o.forEachNode(d);else if(e.onlySelectedAllPages||n){const u=this.beans.selectionSvc?.getSelectedNodes()??[],h=[];for(let g=0,p=u.length;g<p;++g){const f=u[g],m=f.level===-1&&f.sibling?.footer?f.sibling:f;(!m.pinnedSibling||m.displayed||m.level!==-1)&&h.push(m)}this.replicateSortedOrder(h),h.forEach(d)}else c==="all"?o.forEachNode(d):s||r?o.forEachNodeAfterFilterAndSort(d,!0):o.forEachNode(d);return i}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:i}=this.beans;if(!t||!i)return;const o=t.getSortOptions(),s=(r,n)=>r.rowIndex!=null&&n.rowIndex!=null?r.rowIndex-n.rowIndex:r.level===n.level?r.parent?.id===n.parent?.id?i.compareRowNodes(o,r,n)||(r.rowIndex??-1)-(n.rowIndex??-1):s(r.parent,n.parent):r.level>n.level?s(r.parent,n):s(r,n.parent);e.sort(s)}processPinnedBottomRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="bottom").sort((s,r)=>s.rowIndex-r.rowIndex).map(s=>this.pinnedRowModel?.getPinnedBottomRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.forEachPinnedRow("bottom",o),i}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:i=!1,exportRowNumbers:o=!1,columnKeys:s}=e,{colModel:r,gos:n,visibleCols:l}=this,a=r.pivotMode,d=h=>Yi(h)?!1:!fe(h)||o;if(s?.length){const h=[];for(let g=0,p=s.length;g<p;++g){const f=r.getCol(s[g]);f&&d(f)&&h.push(f)}return h}const c=n.get("treeData");let u;return t&&!a?u=r.colsList:u=l.allCols,u=u.filter(h=>d(h)&&(i&&!c?!Hn(h):!0)),u}withCollapsibleGroupRanges(e,t){if(e.type!=="group"||!e.column?.isExpandable())return e;const i=[];let o=-1;for(let s=0;s<=e.columnSpan;s++){const n=(s<e.columnSpan?t[e.columnIndex+s]:void 0)?.getColumnGroupShow()==="open";n&&o<0?o=s:!n&&o>=0&&(i.push([o,s-1]),o=-1)}return{...e,collapsibleGroupRanges:i}}},TC={moduleName:"SharedExport",version:E,beans:[F5]};import{_downloadFile as P5}from"ag-stack";var AC=class extends y{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}resolveFileName(e){const{fileName:t}=e,i=typeof t=="function"?t(G(this.gos,{})):t;return this.getFileName(i)}runExport(e){const{overlays:t}=this.beans;t?t.showExportOverlay(e):e()}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},IC=class{constructor(e){this.useGridHeaderLayout=!1;const{colModel:t,rowGroupColsSvc:i,colNames:o,valueSvc:s,gos:r,log:n,processCellCallback:l,processHeaderCallback:a,processGroupHeaderCallback:d,processRowGroupCallback:c,valueFrom:u,transformValues:h}=e;this.colModel=t,this.rowGroupColsSvc=i,this.colNames=o,this.valueSvc=s,this.gos=r,this.log=n,this.processCellCallback=l,this.processHeaderCallback=a,this.processGroupHeaderCallback=d,this.processRowGroupCallback=c,this.valueFrom=u||"data",this.transformValues=h??!0}isSpanColumnHeader(){return this.useGridHeaderLayout}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractGroupHeaderValue(e){return(this.processGroupHeaderCallback?this.processGroupHeaderCallback(G(this.gos,{columnGroup:e})):this.colNames.getDisplayNameForColumnGroup(e,"header"))??""}extractRowCellValue(e){const{column:t,node:i,currentColumnIndex:o,accumulatedRowIndex:s,type:r,useRawFormula:n}=e,l=o===0&&rn(this.gos,i,this.colModel.pivotMode);if(this.processRowGroupCallback&&(this.gos.get("treeData")||i.group)&&(t.isRowGroupDisplayed(i.rowGroupColumn?.colId??"")||l))return{value:this.processRowGroupCallback(G(this.gos,{column:t,node:i}))??""};const a=this.valueSvc;if(this.processCellCallback){const p=this.valueFrom;return{value:this.processCellCallback(G(this.gos,{accumulatedRowIndex:s,column:t,node:i,value:a.getDisplayValue(t,i,p,this.transformValues),type:r,parseValue:f=>a.parseValue(t,i,f,a.getValue(t,i,p)),formatValue:f=>(this.transformValues?a.formatTransformedValue(t,i,f):void 0)??a.formatValue(t,i,f)??f}))??""}}const d=this.gos.get("treeData"),c=i.level===-1&&i.footer,u=t.showRowGroup===!0&&(i.group||d);if(!c&&(l||u)){let p="",f=i;for(;f&&f.level!==-1;){const{value:m,valueFormatted:w}=a.getValueForDisplay({column:l?void 0:t,node:f,includeValueFormatted:!0,exporting:!0,from:this.valueFrom,transformValues:this.transformValues});p=` -> ${w??m??""}${p}`,f=f.parent}return{value:p,valueFormatted:p}}const{value:h,valueFormatted:g}=a.getValueForDisplay({column:t,node:i,includeValueFormatted:!0,exporting:!0,useRawFormula:n,from:this.valueFrom,transformValues:this.transformValues});return{value:h??"",valueFormatted:g}}getHeaderName(e,t){return e?e(G(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},kC=`\r
`,D5=class extends IC{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,kC),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross)})}))}onNewHeaderRow(){return this.beginNewLine(),{onCell:this.onNewHeaderCell.bind(this)}}onNewHeaderGroupingRow(){return this.onNewHeaderRow()}onNewHeaderCell(e){e.columnIndex!=0&&(this.result+=this.columnSeparator);let t="";e.type==="column"?t=this.extractHeaderValue(e.column):e.type!=="covered"&&e.column&&(t=this.extractGroupHeaderValue(e.column)),this.result+=this.putInQuotes(t),this.appendEmptyCells(e.columnSpan-1)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue({column:e,node:i,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(this.log.warn(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=kC),this.isFirstLine=!1}},M5=class extends AC{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){return{...this.gos.get("defaultCsvExportParams"),...e}}export(e){if(this.isExportSuppressed()){this.warn(51);return}this.runExport(()=>{const t=this.getMergedParams(e),i=this.getData(t),o=new Blob(["\uFEFF",i],{type:"text/plain"});P5(this.resolveFileName(t),o)})}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?{...e}:this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:i,rowGroupColsSvc:o,valueSvc:s,gos:r,log:n}=this.beans,{processCellCallback:l,processHeaderCallback:a,processGroupHeaderCallback:d,processRowGroupCallback:c,suppressQuotes:u,columnSeparator:h,valueFrom:g,transformValues:p}=e;return new D5({colModel:t,colNames:i,valueSvc:s,gos:r,log:n,processCellCallback:l??void 0,processHeaderCallback:a??void 0,processGroupHeaderCallback:d??void 0,processRowGroupCallback:c??void 0,suppressQuotes:u||!1,columnSeparator:h||",",rowGroupColsSvc:o,valueFrom:g,transformValues:p})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function T5(e,t){return e.csvCreator?.getDataAsCsv(t)}function A5(e,t){e.csvCreator?.exportDataAsCsv(t)}var LC={moduleName:"CsvExport",version:E,beans:[M5],apiFunctions:{getDataAsCsv:T5,exportDataAsCsv:A5},dependsOn:[TC]};import{AgHighlightTooltipFeature as I5,AgTooltipComponent as k5,AgTooltipFeature as L5}from"ag-stack";import{BasePopupService as V5,_getDocument as H5}from"ag-stack";var B5=class extends U1{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl")?.getGui()??H5(this.beans).body}callPostProcessPopup(e,t,i,o,s){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:n,rowNode:l,tooltipLocation:a}=e??{};r({column:n,rowNode:l,tooltipLocation:a,ePopup:i,type:t,eventSource:o,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return Ae(e)}},Ao={moduleName:"Popup",version:E,beans:[B5]},O5=".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);overflow-wrap:break-word;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-calculated-column-expression-tooltip),&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-calculated-column-expression-tooltip{white-space:pre-line}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}";import{_exists as G5,_getLocaleTextFunc as VC,_isElementOverflowingCallback as sd}from"ag-stack";var rd=/\p{Sentence_Terminal}(?:["']|\p{Pe}|\p{Pf})*$/u,Ke=(e,t,i)=>{const o=t("tooltipValidationErrorSeparator",". ");if(i==="inline")return e.join(o);const s=[];for(let l=0,a=e.length;l<a;++l){const d=e[l].trim();d.length>0&&s.push(d)}const r=o.trimEnd();if(!rd.test(r)){const l=s.join(o);return l.length>0&&!rd.test(l)?`${l}.`:l}const n=o.slice(r.length);for(let l=0,a=s.length;l<a;++l)rd.test(s[l])||(s[l]+=r);return s.join(n)};import{_isElementOverflowingCallback as N5}from"ag-stack";function nd(e){return e?.tooltip===!1?void 0:e}function HC(e){return!e||e.headerTooltip===!1?void 0:e}function mr(e){return e.get("tooltipShowMode")==="whenTruncated"}function _5(e,t){return mr(e)?N5(t):void 0}import{_exists as ld,_getValueUsingDotField as z5}from"ag-stack";function Cr(e,t){if(e===!0)return t.valueFormatted??t.value;if(!(e===!1||e==null))return typeof e=="function"?e(t):e}function BC(e,t,i){if(e.tooltip!==void 0)return Cr(e.tooltip,t);if(ld(e.tooltipField)){const s=i();if(s.resolved)return s.value}const o=e.tooltipValueGetter;return o?.(t)}function OC(e,t,i){if(e.tooltip!==void 0)return Cr(e.tooltip,t);const o=e.tooltipValueGetter;if(o)return o(t);if(ld(e.tooltipField)){const s=i();if(s.resolved)return s.value}}function GC(e,t,i){if(i!=null)return i;const o=e?.headerTooltip,s=e?.headerTooltipValueGetter;return s&&(o===void 0||typeof o=="string")?s(t)??Cr(o,t):Cr(o,t)}function vr(e){return e.tooltip!==void 0?e.tooltip!==!1:ld(e.tooltipField)||e.tooltipValueGetter!=null}function ad(e,t,i){if(e!=null)return i?z5(e,t):e[t]}function W5(e){const{colDef:t}=e;e.setTooltipEnabled(t.tooltip!==!1&&(vr(t)||t.tooltipComponent!=null||t.tooltipComponentSelector!=null))}var U5=(e,t)=>e.getTranslatedMessage?.(t)??e.message,dd=(e,t,i)=>{const o=e.editModelSvc?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,s=e.editModelSvc?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=o?.length?o:s;return r?.length?Ke(r,i,"inline"):void 0},NC=e=>{const t=e.eGui;return t.children.length===0?t:t.querySelector(".ag-cell-value")},q5=(e,t)=>{if(!mr(e.gos))return;if(!t.isCellRenderer())return sd(()=>NC(t));const i=t.column.colDef;return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?sd(()=>{const s=t.eGui;return s.querySelector(".ag-group-value")??s.querySelector(".ag-cell-value")??s}):t.hasActiveCellRenderer()?void 0:sd(()=>NC(t))},_C=(e,t,i)=>{if(e.editSvc?.isEditing(t,{withOpenEditor:!0}))return!1;const o=q5(e,t);return o?(!i||t.column.isTooltipEnabled())&&o():!0},$5=(e,t,i)=>{const o=t.colDef.tooltipField;if(!o)return{resolved:!1};if(i.group&&(!i.data||!e.valueSvc.displayIgnoresAggData(i)&&i.aggData?.[t.colId]!==void 0))return{resolved:!0,value:e.valueSvc.getValueForDisplay({column:t,node:i,from:"edit",transformValues:!1}).value};const r=i.data;if(!G5(r))return{resolved:!1};const n=e.colModel.getCol(o);if(n){const l=e.editSvc?.getPendingEditValue(i,n,"batch");if(l!==void 0)return{resolved:!0,value:l}}return{resolved:!0,value:ad(r,o,t.isTooltipFieldContainsDots())}},K5=(e,t,i)=>{const{column:o,rowNode:s}=t,{editSvc:r,formula:n}=e;if(o.allowFormula&&n?.active||o.isCalculatedCol&&n){const d=n.getFormulaError(o,s);if(d)return{value:U5(d,i),location:"cellFormula",componentDefinition:o.colDef,shouldDisplay:()=>!!n.getFormulaError(o,s)}}if(!r?.isEditing(t)){const d=dd(e,t,i);if(d)return{value:d,location:"cellEditor",componentDefinition:o.colDef,shouldDisplay:()=>!r?.isEditing(t)&&!!dd(e,t,i)}}if(t.rendererTooltipValue!=null)return{value:t.rendererTooltipValue,location:"cell",componentDefinition:o.colDef,shouldDisplay:t.rendererTooltipShouldDisplay??(()=>_C(e,t,!1))};const l=o.colDef;if(!vr(l))return null;const a=G(e.gos,{location:"cell",colDef:l,column:o,rowIndex:t.cellPosition.rowIndex,node:s,data:s.data,value:t.value,valueFormatted:t.valueFormatted});return{value:BC(l,a,()=>$5(e,o,s)),location:"cell",componentDefinition:nd(l),shouldDisplay:()=>_C(e,t,!0)}};function j5(e,t){const i=VC(e.localeSvc);let o=null;const s=()=>o=K5(e,t,i);return{getGui:()=>t.eGui,getTooltipComponentDefinition:()=>(o??s())?.componentDefinition,getTooltipValue:()=>s()?.value,getLocation:()=>o?.location??"cell",shouldDisplayTooltip:()=>{const r=o??s();return!!r&&(r.shouldDisplay?.()??!0)},getAdditionalParams:()=>({column:t.column,colDef:t.column.colDef,rowIndex:t.cellPosition.rowIndex,node:t.rowNode,data:t.rowNode.data,valueFormatted:t.valueFormatted})}}function Z5(e,t,i){const o=i.getValidationElement?.(!0)??(!i.isPopup?.()&&t.eGui);if(!o)return;const s=VC(e.localeSvc);return{getGui:()=>o,getTooltipComponentDefinition:()=>t.column.colDef,getTooltipValue:()=>dd(e,t,s),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const r=e.editModelSvc?.getRowValidationModel()?.getRowValidationMap(),n=e.editModelSvc?.getCellValidationModel()?.getCellValidationMap();return!!r?.size||!!n?.size},getAdditionalParams:()=>({column:t.column,colDef:t.column.colDef,rowIndex:t.cellPosition.rowIndex,node:t.rowNode,data:t.rowNode.data})}}var Q5=class extends y{constructor(e){super(),this.rowCtrl=e,this.tooltipFeatures=new Map,this.rendererGuards=new Map}claimRenderer(e,t){const{rendererGuards:i}=this;let o=i.get(e);return o||(o=new ws,i.set(e,o)),t?o.claim():o.provisionalClaim()}pruneStaleElements(){const{tooltipFeatures:e,rendererGuards:t,rowCtrl:i}=this;if(e.size===0&&t.size===0)return;const o=i.getCurrentRowComp(),s=new Set([i.getCurrentRowElement()??void 0,o?.getPinnedLeftRowElement(),o?.getScrollingRowElement(),o?.getPinnedRightRowElement()]);for(const[r,n]of e)s.has(r)||(this.destroyBean(n.feature,this.beans.context),e.delete(r));for(const[r,n]of t)s.has(r)||(n.invalidate(),t.delete(r))}setRendererTooltip(e,t,i,o,s){if(!this.isAlive()||!s.isCurrent())return;const r=this.rowCtrl.getRowType()==="FullWidthGroup";if(i==null){this.clearTooltip(e),r&&this.setupGroupRowsTooltip(t,e);return}const n=r?t.rowGroupColumn:void 0,l=r?this.getGroupColDef(t):void 0;this.setupTooltip(e,()=>i,o,()=>({colDef:l,column:n,rowIndex:t.rowIndex??0,node:t,data:t.data}),()=>l,!0)}setupGroupRowsTooltip(e,t){if(this.tooltipFeatures.get(t)?.fromRenderer)return;const i=e.rowGroupColumn,{gos:o}=this,s=this.getGroupColDef(e);if(!s){this.clearTooltip(t);return}const r=vr(s),n=s.tooltip!==!1&&!r&&!!(s.tooltipComponent||s.tooltipComponentSelector);if(!r&&!n){this.clearTooltip(t);return}const{valueSvc:l}=this.beans;let a;const d=()=>{const c=l.getValueForDisplay({node:e,includeValueFormatted:!0,from:"edit"});return a=c.valueFormatted,c};this.setupTooltip(t,()=>{const{value:c,valueFormatted:u}=d(),h=G(o,{location:"fullWidthRow",colDef:s,column:i,rowIndex:e.rowIndex??0,node:e,data:e.data,value:c,valueFormatted:u??void 0});return r?OC(s,h,()=>{const g=s.tooltipField;if(!g)return{resolved:!1};const p=e.data;if(!p)return{resolved:!0,value:c};const f=i?i.isTooltipFieldContainsDots():!o.get("suppressFieldDotNotation")&&g.includes(".");return{resolved:!0,value:ad(p,g,f)}}):c},void 0,()=>({colDef:s,column:i,rowIndex:e.rowIndex??0,node:e,data:e.data,valueFormatted:a??void 0}),()=>nd(s),!1)}getGroupColDef(e){return e.rowGroupColumn?.colDef??this.gos.get("autoGroupColumnDef")}setupTooltip(e,t,i,o,s,r){const{tooltipFeatures:n,rowCtrl:l,beans:a}=this;if(!l.getCurrentRowElement())return;const d={getGui:()=>e,getTooltipComponentDefinition:s,getTooltipValue:t,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i,...o?{getAdditionalParams:o}:{}},c=a.tooltipSvc.registerTooltip(this,d,n.get(e)?.feature);c?n.set(e,{feature:c,fromRenderer:r}):n.delete(e)}clearTooltip(e){const{tooltipFeatures:t}=this,i=t.get(e)?.feature;i&&this.destroyBean(i,this.beans.context),t.delete(e)}destroy(){const{context:e}=this.beans,{tooltipFeatures:t,rendererGuards:i}=this;for(const o of t.values())this.destroyBean(o.feature,e);t.clear();for(const o of i.values())o.invalidate();i.clear(),super.destroy()}};import{_isElementOverflowingCallback as Y5}from"ag-stack";function zC(e){const{beans:t,eGui:i,location:o,column:s,getColDef:r,getComponentTooltip:n,getDisplayName:l}=e;let a;const d=Y5(()=>i.querySelector(e.overflowElementSelector)),c=()=>{const u=l(),h=r();return a=u,G(t.gos,{location:o,colDef:h,column:s,value:u,valueFormatted:u})};return{getGui:()=>i,getTooltipComponentDefinition:()=>{const u=r()??void 0;return n().value!=null?u:HC(u)},getLocation:()=>o,getTooltipValue:()=>{const{value:u}=n();return GC(r(),c(),u)},shouldDisplayTooltip:()=>{const u=n().shouldDisplay;return u?u():!mr(t.gos)||e.hasCustomHeader()||d()},getAdditionalParams:()=>{const u=r();return{column:s,...u?{colDef:u}:{},valueFormatted:a}}}}function J5(e,t,i,o){if(!t.isAlive())return i;const{column:s,eGui:r}=t,n=zC({beans:e,eGui:r,location:"header",column:s,getColDef:()=>s.colDef,getComponentTooltip:o,getDisplayName:()=>e.colNames.getDisplayNameForColumn(s,"header",!0),overflowElementSelector:".ag-header-cell-text",hasCustomHeader:()=>!!s.colDef.headerComponent});return e.tooltipSvc.registerTooltip(t,n,i)}function X5(e,t,i,o){if(!t.isAlive())return i;const{column:s,eGui:r}=t,n=zC({beans:e,eGui:r,location:"headerGroup",column:s,getColDef:()=>s.getColGroupDef(),getComponentTooltip:o,getDisplayName:()=>e.colNames.getDisplayNameForColumnGroup(s,"header"),overflowElementSelector:".ag-header-group-text",hasCustomHeader:()=>!!s.getColGroupDef()?.headerGroupComponent});return e.tooltipSvc.registerTooltip(t,n,i)}var eA=class extends y{constructor(){super(...arguments),this.beanName="tooltipSvc"}createTooltip(e){const{beans:t}=this;return t.registry.createDynamicBean("tooltipFeature",!1,e,t)}createHighlightTooltip(e,t){const{beans:i}=this;return i.registry.createDynamicBean("highlightTooltipFeature",!1,e,t,i)}registerTooltip(e,t,i){const{beans:o}=this;e.destroyBean(i,o.context);const s=this.createTooltip(t);return s?e.createBean(s,o.context):void 0}initCol(e){W5(e)}setupHeaderTooltip(e,t,i){return J5(this.beans,e,t,i)}setupHeaderGroupTooltip(e,t,i){return X5(this.beans,e,t,i)}enableCellTooltipFeature(e){return this.createTooltip(j5(this.beans,e))}setupCellEditorTooltip(e,t){const i=Z5(this.beans,e,t);return i?this.registerTooltip(e,i):void 0}createFullWidthRowTooltips(e){return this.createBean(new Q5(e))}};import{BaseTooltipStateManager as tA}from"ag-stack";var iA=class extends q1{postConstruct(){super.postConstruct();const e=this.beans.tooltipTouchSvc?.registerSource(this.tooltipCtrl.getGui(),()=>this.canShowTooltip(),t=>this.prepareToShowTooltip(t,0));e&&this.addDestroyFunc(e)}onMouseEnter(e){this.beans.tooltipTouchSvc?.isCompatibilityMouseEvent(this.tooltipCtrl.getGui())||super.onMouseEnter(e)}createTooltipComp(e,t){const i=this.tooltipCtrl;Sb(this.beans.userCompFactory,e,i.getTooltipComponentDefinition?.())?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}getPopupPositionParams(){const e=this.tooltipCtrl.getAdditionalParams?.(),t=e?.column;return{column:t&&wn(t)?t:void 0,rowNode:e?.node,tooltipLocation:this.tooltipCtrl.getLocation?.()??"UNKNOWN"}}},oA=800,sA=class extends y{constructor(){super(...arguments),this.beanName="tooltipTouchSvc",this.targets=new Map,this.lastTouchEventTime=0}postConstruct(){const e=this.beans.eRootDiv.ownerDocument,t=new wt(e,{capture:!0,yieldsLongTap:!0,shouldTrackTouch:s=>this.startTracking(s),getLongTapTarget:s=>this.resolveLongTapTarget(s)});t.addEventListener("longTap",({touchStart:s})=>{const r=this.selectedTarget;this.selectedTarget=void 0,r?.active&&r.show(s)});const i=s=>{!this.gos.get("suppressTouch")&&this.getCandidates(s).length&&this.recordTouchAt(s)},o={capture:!0,passive:!0};e.addEventListener("touchend",i,o),e.addEventListener("touchcancel",i,o),this.addDestroyFunc(()=>{t.destroy(),e.removeEventListener("touchend",i,!0),e.removeEventListener("touchcancel",i,!0)})}registerSource(e,t,i){const o={element:e,canShow:t,show:i,active:!0},s=this.targets.get(e);return s?s.push(o):this.targets.set(e,[o]),()=>this.unregisterSource(o)}isCompatibilityMouseEvent(e){const t=this.lastTouchTarget;return!t||Date.now()-this.lastTouchEventTime>=oA?!1:e.contains(t)||t.contains(e)}recordTouchAt(e){this.lastTouchEventTime=Date.now();const t=this.getEventPath(e)[0];this.lastTouchTarget=t instanceof Node?t:void 0}startTracking(e){if(this.selectedTarget=void 0,this.gos.get("suppressTouch"))return!1;const t=this.getCandidates(e).length>0;return t&&this.recordTouchAt(e),t}resolveLongTapTarget(e){for(const t of this.getCandidates(e))if(t.canShow())return this.selectedTarget=t,t.element;this.selectedTarget=void 0}getCandidates(e){const t=[];for(const i of this.getEventPath(e)){const o=this.targets.get(i);if(o)for(let s=o.length-1;s>=0;s--)o[s].active&&t.push(o[s])}return t}getEventPath(e){const t=e.composedPath?.();if(t?.length)return t;const i=[];let o=e.target;for(;o;)i.push(o),o=o.parentNode;return i}unregisterSource(e){e.active=!1;const t=this.targets.get(e.element);if(!t)return;const i=t.indexOf(e);i>=0&&t.splice(i,1),t.length===0&&this.targets.delete(e.element)}destroy(){this.targets.clear(),this.selectedTarget=void 0,this.lastTouchTarget=void 0,super.destroy()}},cd={moduleName:"Tooltip",version:E,beans:[eA,sA],dynamicBeans:{tooltipFeature:L5,highlightTooltipFeature:I5,tooltipStateManager:iA},userComponents:{agTooltipComponent:k5},dependsOn:[Ao],css:[O5]},Fi=class{constructor(e){this.cellValueChanges=e}},ud=class extends Fi{constructor(e,t,i,o){super(e),this.initialRange=t,this.finalRange=i,this.ranges=o}},rA=10,WC=class{constructor(e){this.actionStack=[],this.maxStackSize=e||rA,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){return e.cellValueChanges.length?(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e),!0):!1}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},nA=class extends y{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=this.activeCellEdit!==null&&fs(this.activeCellEdit,t),o=this.activeRowEdit!==null&&Mh(this.activeRowEdit,t);if(!(i||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:n,column:l,oldValue:a,value:d}=e,c={rowPinned:r,rowIndex:n,columnId:l.getColId(),newValue:d,oldValue:a};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const i=e.get("undoRedoCellEditingLimit");if(i<=0)return;this.undoStack=new WC(i),this.redoStack=new WC(i),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(i,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(o,i,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,i,o,s){if(!e)return!1;const r=e.pop();return r?.cellValueChanges?(this.processAction(r,n=>n[o],s),r instanceof ud?this.processRange(r.ranges??[r[i]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,i){const{changeDetectionSvc:o,editSvc:s}=this.beans;s?.beginBulkWrite();try{o?.beginDeferred();for(const r of e.cellValueChanges){const{rowIndex:n,rowPinned:l,columnId:a}=r,d={rowIndex:n,rowPinned:l},c=Re(this.beans,d);c?.displayed&&c.setDataValue(a,t(r),i)}}finally{o?.endDeferred(),s?.endBulkWrite()}}processRange(e){let t;const i=this.beans.rangeSvc;i.removeAllCellRanges(!0),e.forEach((o,s)=>{if(!o)return;const r=o.startRow,n=o.endRow;s===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t,!1));const l={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:o.startColumn,columns:o.columns};i.addCellRange(l)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:o}=t,s={rowIndex:i,rowPinned:o},r=Re(this.beans,s),n={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(n,!0)}setLastFocusedCell(e,t){const{rowIndex:i,columnId:o,rowPinned:s}=e,{colModel:r,focusSvc:n,rangeSvc:l}=this.beans,a=r.getCol(o);if(!a)return;const{scrollFeature:d}=this.gridBodyCtrl;d.ensureIndexVisible(i),d.ensureColumnVisible(a);const c={rowIndex:i,column:a,rowPinned:s};n.setFocusedCellOrSpan({...c,forceBrowserFocus:!0}),t&&l?.setRangeToCell(n.getFocusedCell()??c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Fi(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new Fi(this.cellValueChanges);this.pushActionsToUndoStack(i)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Fi(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new ud(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:i}=this.beans;t&&Ne(i)?e=new ud(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Fi(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const i=new Fi(t??[]);this.pushActionsToUndoStack(i)}pushActionsToUndoStack(e){this.cellValueChanges=[],(this.undoStack.push(e)||this.batchEditing)&&this.redoStack.clear()}},lA="@media (forced-colors:active){:where(.ag-cell-editing-error,.ag-cell-editor-input-invalid) .ag-input-field-input{outline-color:Mark}}.ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error,&.ag-cell-editor-input-invalid{border-color:var(--ag-invalid-color)!important;@media (forced-colors:active){--ag-invalid-color:Mark;--ag-internal-forced-colors-cell-focus-outline-color:Mark;--ag-input-invalid-border:1px solid Mark}}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}";import{RefPlaceholder as aA,_getAriaCheckboxStateName as dA}from"ag-stack";var cA={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},uA=class extends eo{constructor(){super(cA,[zs]),this.eEditor=aA,this.seededValue=this}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:i=>this.setAriaLabel(i.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.seededValue=this.eEditor.getValue(),this.setAriaLabel(t)}getValue(){const e=this.eEditor.getValue();return e===this.seededValue?this.params.value:e}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),i=dA(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${i})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,i=this.getValue();return t?t({value:i,internalErrors:null,cellEditorParams:e}):null}};import{_exists as UC,_parseDateTimeFromString as hd,_serialiseDate as hA}from"ag-stack";import{_addOrRemoveAttribute as gd,_getActiveDomElement as qC,_isBrowserFirefox as gA,_isBrowserSafari as pA,_parseDateTimeFromString as fA,_serialiseDate as pd}from"ag-stack";import{_createAgElement as $C,_exists as mA,_setAriaInvalid as CA,_setAriaLabel as vA,_setDisplayed as KC}from"ag-stack";var wA=new Set(["number","text"]),dt=class extends rt{constructor(e,t="ag-text-field",i="text"){super(e,t,i),this.clearButtonEnabled=!1}postConstruct(){super.postConstruct();const{clearButton:e,onValueClear:t,searchIcon:i}=this.config;e&&this.setClearButtonEnabled(!0),t&&this.onValueClear(t),i&&this.setSearchIcon(!0),this.addManagedPropertyListener("suppressInputClearButton",()=>this.refreshClearButton())}setInputType(e){super.setInputType(e),this.refreshClearButton()}setValue(e,t){const i=this.eInput;return i.value!==e&&(i.value=mA(e)?e:""),this.refreshClearButton(),super.setValue(e,t)}setClearButtonEnabled(e){return this.clearButtonEnabled=e,e&&!this.eClearButton&&this.createClearButton(),this.refreshClearButton(),this}onValueClear(e){return this.addManagedListeners(this,{fieldValueCleared:e}),this}setSearchIcon(e){this.toggleCss("ag-input-field-search",e),e&&!this.eSearchIcon&&this.createSearchIcon();const{eSearchIcon:t}=this;return t&&KC(t,e,{skipAriaHidden:!0}),this}setFrameless(e){return this.eInput.classList.toggle("ag-input-frameless",e),this}setDisabled(e){return super.setDisabled(e),this.refreshClearButton(),this}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,i=e.length>0;t.setCustomValidity(e),i&&t.reportValidity(),CA(t,i)}clearInput(){const{eInput:e}=this;e.focus(),e.value&&(this.setValue("",!0),this.dispatchLocalEvent({type:"fieldValueCleared"}))}createClearButton(){const e=$C({tag:"button",cls:"ag-input-field-clear-button",attrs:{type:"button"}}),t=this.beans.iconSvc.createIconNoSpan("cancel");t&&e.appendChild(t),vA(e,this.getLocaleTextFunc()("ariaLabelInputClear","Clear")),this.addManagedElementListeners(e,{mousedown:i=>i.preventDefault(),click:()=>this.clearInput()}),this.eWrapper.appendChild(e),this.eClearButton=e}createSearchIcon(){const e=this.beans.iconSvc.createIconNoSpan("search");if(!e)return;const t=$C({tag:"span",cls:"ag-input-field-search-icon",attrs:{"aria-hidden":"true"}});t.appendChild(e),this.eWrapper.insertBefore(t,this.eWrapper.firstChild),this.eSearchIcon=t}refreshClearButton(){const{eClearButton:e,eInput:t}=this;if(!e||!t)return;const o=this.clearButtonEnabled&&!this.gos.get("suppressInputClearButton")&&wA.has(t.type)&&!this.isDisabled();t.classList.toggle("ag-input-field-input-with-clear-button",o),KC(e,o&&!!t.value)}},Io={selector:"AG-INPUT-TEXT-FIELD",component:dt},jC=class extends dt{constructor(e){super(e,"ag-date-field","date"),this.includeTime=!1}postConstruct(){super.postConstruct();const e=pA();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}});const{includeTime:t,min:i,max:o,step:s}=this.config;t!=null&&this.setIncludeTime(t),typeof i=="string"&&this.setMin(i),typeof o=="string"&&this.setMax(o),typeof s=="number"?this.setStep(s):this.eInput.step="any"}onWheel(e){qC(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?pd(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,gd(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?pd(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,gd(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,gd(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}flushPendingSegment(){gA()&&qC(this.beans)===this.eInput&&SA(this.eInput)}getDate(){if(this.eInput.validity.valid)return fA(this.getValue())??void 0}setDate(e,t){this.setValue(pd(e??null,this.includeTime),t)}},wr=e=>e.stopImmediatePropagation(),SA=e=>{e.addEventListener("focusout",wr,!0),e.addEventListener("focusin",wr,!0);try{e.blur(),e.focus({preventScroll:!0})}finally{e.removeEventListener("focusout",wr,!0),e.removeEventListener("focusin",wr,!0)}},fd={selector:"AG-INPUT-DATE-FIELD",component:jC},md="ag-cell-editor-input-invalid";function ZC(e,t){const i=e.getInputElement(),o=()=>Sr(t,i);e.addManagedElementListeners(i,{input:o,change:o,keyup:o,focus:o,blur:o}),e.addDestroyFunc(()=>t.classList.remove(md)),o()}function Sr(e,t){e.classList.toggle(md,!t.validity.valid)}import{KeyCode as ko,RefPlaceholder as bA,_isBrowserSafari as yA}from"ag-stack";var br=class extends eo{constructor(e){super(),this.cellEditorInput=e,this.seededText=this,this.eEditor=bA}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:i}=this,{cellStartedEdit:o,eventKey:s,suppressPreventDefault:r}=e;i.getInputElement().setAttribute("title",""),t.init(i,e);let n,l=!0,a=!1;o?(this.focusAfterAttached=!0,s===ko.BACKSPACE||s===ko.DELETE?n="":s?.length===1?r?l=!1:n=s:(n=t.getStartValue(),a=!0,s!==ko.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,n=t.getStartValue(),a=!0),l&&n!=null&&i.setStartValue(n),this.seededText=a?i.getInputElement().value:this,this.addGuiEventListener("keydown",d=>{const{key:c}=d;(c===ko.PAGE_UP||c===ko.PAGE_DOWN)&&d.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;yA()||t.getFocusableElement().focus();const i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}agFlushInput(){this.cellEditorInput.flushInput?.()}isUntouched(){return this.eEditor.getInputElement().value===this.seededText}getValue(){return this.isUntouched()?this.params.value:this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null),this.seededText=this.eEditor.getInputElement().value}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors(this.isUntouched())}},RA={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},EA=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return RA}getAgComponents(){return[fd]}init(e,t){this.eEditor=e,this.params=t;const{browserAutoComplete:i,min:o,max:s,step:r,colDef:n}=t;e.setAutoComplete(i),o!=null&&e.setMin(o),s!=null&&e.setMax(s),r!=null&&e.setStep(r),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(e){const t=this.eEditor.getInputElement(),i=hd(t.value),{params:o}=this,{getValidationErrors:s}=o,r=this.getInternalValidationErrors(i);if(s){const n=e?o.value:i;return s({value:n,cellEditorParams:o,internalErrors:r})}return r}getInternalValidationErrors(e){if(!e)return null;const{min:t,max:i}=this.params,o=this.getLocaleTextFunc(),s=[];if(t){const r=t instanceof Date?t:hd(t);if(r&&e<r){const n=r.toLocaleDateString();s.push(o("minDateValidation",`Date must be after ${n}`,[n]))}}if(i){const r=i instanceof Date?i:hd(i);if(r&&e>r){const n=r.toLocaleDateString();s.push(o("maxDateValidation",`Date must be before ${n}`,[n]))}}return s.length?s:null}flushInput(){this.eEditor.flushPendingSegment()}getValue(){const{eEditor:e,params:t}=this,i=e.getDate();return!UC(i)&&!UC(t.value)?t.value:i??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return hA(e,this.includeTime??!1)}},xA=class extends br{constructor(){super(new EA(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}initialiseEditor(e){super.initialiseEditor(e),ZC(this.eEditor,e.eGridCell)}agSetEditValue(e){super.agSetEditValue(e),Sr(this.params.eGridCell,this.eEditor.getInputElement())}};import{_exists as QC,_parseDateTimeFromString as yr,_serialiseDate as YC}from"ag-stack";var FA={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},PA=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t,this.cachedRaw=this}getTemplate(){return FA}getAgComponents(){return[fd]}init(e,t){this.eEditor=e,this.params=t;const{browserAutoComplete:i,min:o,max:s,step:r,colDef:n}=t;e.setAutoComplete(i),o!=null&&e.setMin(o),s!=null&&e.setMax(s),r!=null&&e.setStep(r),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(e){const{eEditor:t,params:i}=this,o=yr(t.getInputElement().value)??void 0,s=this.formatDate(o),r=this.getInternalValidationErrors(o);return i.getValidationErrors?i.getValidationErrors({value:e?i.value:this.parseEditorValue(s),cellEditorParams:i,internalErrors:r}):r}flushInput(){this.eEditor.flushPendingSegment()}getValue(){const e=this.formatDate(this.eEditor.getDate());return this.parseEditorValue(e)}parseEditorValue(e){const{params:t}=this;if(Object.is(this.cachedRaw,e))return this.cachedParsed;let i;return!QC(e)&&!QC(t.value)?i=t.value:i=t.parseValue(e??""),this.cachedRaw=e,this.cachedParsed=i,i}getStartValue(){return YC(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}getInternalValidationErrors(e){if(!e)return null;const{min:t,max:i}=this.params,o=this.getLocaleTextFunc(),s=[];if(t){const r=t instanceof Date?t:yr(t);if(r&&e<r){const n=r.toLocaleDateString();s.push(o("minDateValidation",`Date must be after ${n}`,[n]))}}if(i){const r=i instanceof Date?i:yr(i);if(r&&e>r){const n=r.toLocaleDateString();s.push(o("maxDateValidation",`Date must be before ${n}`,[n]))}}return s.length?s:null}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):yr(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):YC(e??null,this.includeTime??!1)??void 0}},DA=class extends br{constructor(){super(new PA(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}initialiseEditor(e){super.initialiseEditor(e),ZC(this.eEditor,e.eGridCell)}agSetEditValue(e){super.agSetEditValue(e),Sr(this.params.eGridCell,this.eEditor.getInputElement())}};import{KeyCode as Dt,RefPlaceholder as MA,_exists as JC,_isStringLargerThan as TA}from"ag-stack";var XC=class extends rt{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},ev={selector:"AG-INPUT-TEXT-AREA",component:XC},AA={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},IA=class extends eo{constructor(){super(AA,[ev]),this.eEditor=MA,this.cachedRaw=this,this.seededText=this}initialiseEditor(e){const{eEditor:t}=this,{browserAutoComplete:i,cellStartedEdit:o,eventKey:s,maxLength:r,cols:n,rows:l}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setAutoComplete(i).setMaxLength(r||200).setCols(n||60).setRows(l||10);let a,d=!1;o?(this.focusAfterAttached=!0,s===Dt.BACKSPACE||s===Dt.DELETE?a="":s?.length===1?a=s:(a=this.getStartValue(e),d=!0,s!==Dt.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e),d=!0),a!=null&&t.setValue(a,!0),this.seededText=d?t.getValue():this,this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0),this.seededText=this.eEditor.getValue()}onKeyDown(e){const t=e.key;(t===Dt.LEFT||t===Dt.UP||t===Dt.RIGHT||t===Dt.DOWN||e.shiftKey&&t===Dt.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:i}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),i&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:i}=t,o=e.getValue();if(o===this.seededText||!JC(o)&&!JC(i))return i;if(Object.is(this.cachedRaw,o))return this.cachedParsed;const s=t.parseValue(o);return this.cachedRaw=o,this.cachedParsed=s,s}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getLocaleTextFunc(),s=this.getValue();let r=[];return t!=null&&TA(s,t)&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),i?i({value:s,internalErrors:r,cellEditorParams:e}):r}};import{KeyCode as tv,_exists as iv,_isBrowserSafari as kA}from"ag-stack";import{_addOrRemoveAttribute as Cd,_exists as LA,_getActiveDomElement as VA}from"ag-stack";var Rr=class extends dt{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),n=Number.isNaN(r)?"":this.normalizeBlurValue(r.toString());this.value!==n&&this.setValue(n)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:i,max:o,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof i=="number"&&this.setMin(i),typeof o=="number"&&this.setMax(o),typeof s=="number"&&this.setStep(s)}onWheel(e){VA(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}normalizeBlurValue(e){return this.isScientificNotation(e)?this.adjustPrecision(e,!0):this.normalizeValue(e)}adjustPrecision(e,t){const i=this.precision;if(i==null)return e;if(t){const s=Number.parseFloat(e).toFixed(i);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=i)return e;if(i>0)return`${o[0]}.${o[1].slice(0,i)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,Cd(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Cd(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Cd(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(LA(i)){let o=this.isScientificNotation(i);if(o&&this.eInput.validity.valid)return e(i);if(!o){i=this.adjustPrecision(i);const s=this.normalizeValue(i);o=i!=s}if(o)return t(i)}return e(i)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const i=t.value;return this.isScientificNotation(i)?this.adjustPrecision(i,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},vd={selector:"AG-INPUT-NUMBER-FIELD",component:Rr},HA={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},BA=class{constructor(e){this.getLocaleTextFunc=e,this.cachedRaw=this}getTemplate(){return HA}getAgComponents(){return[vd]}init(e,t){this.eEditor=e,this.params=t;const{browserAutoComplete:i,max:o,min:s,precision:r,step:n}=t;e.setAutoComplete(i),o!=null&&e.setMax(o),s!=null&&e.setMin(s),r!=null&&e.setPrecision(r),n!=null&&e.setStep(n);const l=e.getInputElement();t.preventStepping?e.addManagedElementListeners(l,{keydown:this.preventStepping}):t.showStepperButtons&&l.classList.add("ag-number-field-input-stepper")}getValidationErrors(e){const{params:t}=this,{min:i,max:o,getValidationErrors:s}=t,n=this.eEditor.getInputElement().valueAsNumber,l=this.getLocaleTextFunc();let a=[];return typeof n=="number"&&(i!=null&&n<i&&a.push(l("minValueValidation",`Must be greater than or equal to ${i}.`,[String(i)])),o!=null&&n>o&&a.push(l("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),a.length||(a=null),s?s({value:e?t.value:this.parseRaw(this.eEditor.getValue(!0)),cellEditorParams:t,internalErrors:a}):a}preventStepping(e){(e.key===tv.UP||e.key===tv.DOWN)&&e.preventDefault()}getValue(){return this.parseRaw(this.eEditor.getValue(!0))}parseRaw(e){const{params:t}=this;if(!iv(e)&&!iv(t.value))return t.value;if(Object.is(this.cachedRaw,e))return this.cachedParsed;const i=t.parseValue(e);let o;if(i==null)o=i;else if(typeof i=="string")if(i==="")o=null;else{const s=Number(i);o=Number.isNaN(s)?null:s}else o=Number.isNaN(i)?null:i;return this.cachedRaw=e,this.cachedParsed=o,o}getStartValue(){return this.params.value}setCaret(){kA()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},OA=class extends br{constructor(){super(new BA(()=>this.getLocaleTextFunc()))}};import{KeyCode as GA,RefPlaceholder as NA,_missing as _A}from"ag-stack";import{KeyCode as Fe,_isElementOverflowingCallback as zA,_setAriaLabelledBy as WA,_setAriaReadOnly as UA}from"ag-stack";import{AgComponentStub as qA,KeyCode as Pe,_clearElement as $A,_isVisible as KA,_last as jA,_setAriaRole as ZA}from"ag-stack";var QA=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color);@media (forced-colors:active){background-color:SelectedItem}}}";import{AgComponentStub as YA,RefPlaceholder as JA,_isHorizontalScrollShowing as XA,_setAriaPosInSet as eI,_setAriaSelected as tI,_setAriaSetSize as iI}from"ag-stack";var oI="ag-active-item",sI=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),rI=class extends $1{constructor(e,t,i){super(sI(e,t)),this.label=t,this.value=i,this.eText=JA}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(oI,e),tI(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const i=this.getGui();eI(i,e),iI(i,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getTooltipComponentDefinition:()=>{},getLocation:()=>"listItem",shouldDisplayTooltip:()=>XA(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},nI=class extends K1{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(QA)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case Pe.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const i=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(i)}break;case Pe.DOWN:case Pe.UP:e.preventDefault(),this.navigate(t);break;case Pe.PAGE_DOWN:case Pe.PAGE_UP:case Pe.PAGE_HOME:case Pe.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:i}=e,o=i??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();$A(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const i=this.options.findIndex(o=>o.value===e);if(i!==-1){const o=this.options[i];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!KA(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const i=this.getGui(),{scrollTop:o,clientHeight:s}=i,{offsetTop:r,offsetHeight:n}=t;(r+n>o+s||r<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const i=new rI(this.cssIdentifier,t,e);i.setParentComponent(this);const o=this.createManagedBean(i);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===Pe.DOWN;let i;const{listItems:o,highlightedItem:s}=this;if(!s)i=t?o[0]:jA(o);else{let n=o.indexOf(s)+(t?1:-1);n=Math.max(0,Math.min(n,o.length-1)),i=o[n]}this.highlightItem(i)}navigateToPage(e){const{listItems:t,highlightedItem:i}=this;if(!i||t.length===0)return;const o=t.indexOf(i),s=this.options.length-1,r=t[0].getHeight(),n=Math.floor(this.getGui().clientHeight/r);let l=-1;e===Pe.PAGE_HOME?l=0:e===Pe.PAGE_END?l=s:e===Pe.PAGE_DOWN?l=Math.min(o+n,s):e===Pe.PAGE_UP&&(l=Math.max(o-n,0)),l!==-1&&this.highlightItem(t[l])}refreshAriaRole(){ZA(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((i,o)=>{i.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}};import{KeyCode as Lo,RefPlaceholder as Er,_formatSize as lI,_getAbsoluteWidth as ov,_getInnerHeight as aI,_isNothingFocused as dI,_setAriaControls as cI,_setAriaExpanded as sv,_setAriaRole as uI,_setElementWidth as rv}from"ag-stack";var hI=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:var(--ag-picker-button-border-radius);min-height:var(--ag-picker-field-height);overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}@media (forced-colors:active){outline:2px solid Highlight}}.ag-picker-field-wrapper:disabled{opacity:.5}",gI={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},nv=class extends vf{constructor(e){if(super(e,e?.template??gI,e?.agComponents??[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=Er,this.eWrapper=Er,this.eDisplayField=Er,this.eIcon=Er,this.registerCSS(hI),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:o,minPickerWidth:s,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,i!=null&&this.setPickerMaxHeight(i),s!=null&&this.setPickerMinWidth(s),r!=null&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:i,inputWidth:o}=this.config;if(i){const s=this.beans.iconSvc.createIconNoSpan(i);s&&this.eIcon.appendChild(s)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),sv(e,!1),this.ariaRole&&uI(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case Lo.UP:case Lo.DOWN:case Lo.ENTER:case Lo.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Lo.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent??(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:i,pickerAriaLabelValue:o,modalPicker:s=!0},maxPickerHeight:r,minPickerWidth:n,maxPickerWidth:l,variableWidth:a,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=dI(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,o),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);a?(n&&(e.style.minWidth=n),e.style.width=lI(ov(c)),l&&(e.style.maxWidth=l)):rv(e,l??ov(c));const p=r??`${aI(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:i,gos:o},eWrapper:s,pickerComponent:r}=this,n=o.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:s,ePopup:r.getGui(),position:"under",alignSide:n,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();sv(t,e),this.ariaControlsId!=null&&cI(t,e?this.ariaControlsId:null);const i=this.eWrapper.classList;i.toggle("ag-picker-expanded",e),i.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return rv(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setAriaControlsId(e){this.ariaControlsId=e}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},pI=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select-readonly) .ag-picker-field-wrapper{--ag-picker-button-background-color:var(--ag-input-disabled-background-color);--ag-picker-button-focus-background-color:var(--ag-input-disabled-background-color);--ag-picker-button-border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}:where(.ag-select-readonly) .ag-picker-field-display{cursor:text;-webkit-user-select:text;-moz-user-select:text;user-select:text}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",xr=class extends nv{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.readOnly=!1,this.registerCSS(pI)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:zA(()=>this.eDisplayField),getGui:()=>this.getGui(),getTooltipComponentDefinition:()=>{},getLocation:()=>"select"})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i,readOnly:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),i&&t==null&&(this.eDisplayField.textContent=i),o!=null&&this.setReadOnly(o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new nI("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i),WA(t,this.getAriaElement().id),this.setAriaControlsId(i),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem",keyboardEvent:this.commitKeyboardEvent})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}setReadOnly(e){return this.readOnly=e,UA(this.getAriaElement(),e),this.toggleCss("ag-select-readonly",e),e&&this.hidePicker(),this}onLabelOrWrapperMouseDown(e){if(this.readOnly){this.eWrapper.focus();return}super.onLabelOrWrapperMouseDown(e)}onKeyDown(e){if(this.readOnly){(e.ctrlKey||e.metaKey)&&e.code===Fe.A&&(e.preventDefault(),this.eDisplayField.ownerDocument.getSelection()?.selectAllChildren(this.eDisplayField));return}const{key:t}=e;switch(t===Fe.TAB&&this.hidePicker(),t){case Fe.ENTER:case Fe.UP:case Fe.DOWN:case Fe.PAGE_UP:case Fe.PAGE_DOWN:case Fe.PAGE_HOME:case Fe.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(this.commitKeyboardEvent=t===Fe.ENTER?e:void 0,this.listComponent?.handleKeyDown(e),this.commitKeyboardEvent=void 0):super.onKeyDown(e);break;case Fe.ESCAPE:super.onKeyDown(e);break;case Fe.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;this.readOnly||!e||(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,i){const{listComponent:o,config:{placeholder:s},eDisplayField:r,tooltipFeature:n}=this;if(this.value===e||!o)return this;if(i||o.setValue(e,!0),o.getValue()===this.getValue())return this;let a=o.getDisplayValue();return a==null&&s&&(a=s),r.textContent=a,n?.setTooltipAndRefresh(a??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},lv={selector:"AG-SELECT",component:xr},fI={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},mI=class extends eo{constructor(){super(fI,[lv]),this.eEditor=NA,this.startedByEnter=!1,this.seededValue=this,this.picked=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:i,gos:o}=this,{values:s,value:r,eventKey:n}=e;if(_A(s)){this.beans.log.warn(58);return}this.startedByEnter=n!=null?n===GA.ENTER:!1;let l=!1;s.forEach(h=>{const g={value:h},p=i.formatValue(e.column,null,h),f=p!=null;g.text=f?p:h,t.addOption(g),l=l||r===h}),l?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0),this.seededValue=t.getValue();const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d);const u=o.get("editType")!=="fullRow";this.addManagedListeners(this.eEditor,{selectedItem:h=>{this.picked=!0,u&&e.stopEditing(h.keyboardEvent==null,h.keyboardEvent)}})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0),this.seededValue=this.eEditor.getValue(),this.picked=!1}getValue(){const e=this.eEditor.getValue();return!this.picked&&e===this.seededValue?this.params.value:e}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:i}=e,o=this.getValue();let s=[];if(t&&o!=null&&!t.includes(o)){const r=this.getLocaleTextFunc();s.push(r("invalidSelectionValidation","Invalid selection."))}else s=null;return i?i({value:o,internalErrors:s,cellEditorParams:e}):s}};import{_exists as wd,_isBrowserSafari as CI,_isStringLargerThan as vI}from"ag-stack";var wI={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},SI=class{constructor(e){this.getLocaleTextFunc=e,this.cachedRaw=this}getTemplate(){return wI}getAgComponents(){return[Io]}init(e,t){this.eEditor=e,this.params=t;const{maxLength:i,browserAutoComplete:o}=t;e.setAutoComplete(o),i!=null&&e.setMaxLength(i)}getValidationErrors(e){const{params:t}=this,{maxLength:i,getValidationErrors:o}=t,s=e?t.value:this.getValue(),r=this.getLocaleTextFunc();let n=[];return i!=null&&vI(s,i)&&n.push(r("maxLengthValidation",`Must be ${i} characters or fewer.`,[String(i)])),n.length||(n=null),o?o({value:s,cellEditorParams:t,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,i=e.getValue();if(!wd(i)&&!wd(t.value))return t.value;if(Object.is(this.cachedRaw,i))return this.cachedParsed;const o=t.parseValue(i);return this.cachedRaw=i,this.cachedParsed=o,o}getStartValue(){const e=this.params;return e.useFormatter?e.formatValue(e.value):e.value}setCaret(){CI()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),i=wd(t)&&t.length||0;i&&e.getInputElement().setSelectionRange(i,i)}},av=class extends br{constructor(){super(new SI(()=>this.getLocaleTextFunc()))}};import{KeyCode as bI,_getLocaleTextFunc as yI,_setAriaInvalid as RI}from"ag-stack";function je(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var EI=class extends y{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.editingCount=0,this.cellValidations=new dv,this.rowValidations=new cv,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}hasOpenEditors(){return this.editingCount>0}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const i=this.getEditRow(e);t?(i.get(t)?.state==="editing"&&this.editingCount--,i.delete(t)):(i.forEach(o=>{o.state==="editing"&&this.editingCount--}),i.clear()),i.size===0&&this.edits.delete(e)}getEditRow(e,t){if(this.suspendEdits||this.edits.size===0)return;const i=e&&this.edits.get(e);if(i)return i;if(t){const o=e.pinnedSibling;if(o)return this.getEditRow(o)}}getEditRowDataValue(e){if(!e||this.edits.size===0)return;const t=this.getEditRow(e),i=e.pinnedSibling,o=i?this.getEditRow(i):void 0;if(!t&&!o)return;const s={...e.data};return t&&uv(t,s),o&&uv(o,s),s}getEdit(e={}){return this.getCellEdit(e.rowNode,e.column)}getCellEdit(e,t){const i=this.edits;if(!(i.size===0||this.suspendEdits||!e||!t))return i.get(e)?.get(t)}getCellEditWithSibling(e,t){return this.getCellEdit(e,t)??this.getCellEdit(e?.pinnedSibling,t)}getEditMap(){return this.suspendEdits?null:this.edits}getEditMapCopy(){const e=new Map;return this.suspendEdits||this.edits.forEach((t,i)=>{const o=new Map;t.forEach(({editorState:s,...r},n)=>o.set(n,{...r})),e.set(i,o)}),e}setEditMap(e){const t=new Map;let i=0;e.forEach((s,r)=>{const n=new Map;s.forEach((l,a)=>{l.state==="editing"&&i++,n.set(a,{...l})}),t.set(r,n)});const o=this.edits;o.clear(),t.forEach((s,r)=>o.set(r,s)),this.editingCount=i}setEdit(e,t){const{rowNode:i,column:o}=e,s=this.edits;let r=s.get(i);r||(r=new Map,s.set(i,r));const n=r.get(o),l=this.suspendEdits?void 0:n,a={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...l,...t},d=n?.state==="editing",c=a.state==="editing";return d!==c&&(this.editingCount+=c?1:-1),r.set(o,a),a}clearEditValue(e){const{rowNode:t,column:i}=e;if(!t)return;const o=r=>{r.state==="editing"&&this.editingCount--,r.editorValue=void 0,r.pendingValue=r.sourceValue,r.state="changed"};if(!i){this.getEditRow(t)?.forEach(o);return}const s=this.getEdit(e);s&&o(s)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((i,o)=>{for(const s of i.keys()){const{editorState:r,...n}=i.get(s);t.push({rowNode:o,column:s,...n})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:i,column:o}=e,{withOpenEditor:s}=t;if(i){const r=this.getEditRow(i,t.checkSiblings);return r?o?s?this.getEdit(e)?.state==="editing":r.has(o):r.size!==0?s?Array.from(r.values()).some(({state:n})=>n==="editing"):!0:!1:!1}return s?this.hasOpenEditors():this.edits.size>0}start(e){const{rowNode:t,column:i}=e;let o=this.edits.get(t);o||(o=new Map,this.edits.set(t,o)),i&&!o.has(i)&&(o.set(i,{editorValue:void 0,pendingValue:ae,sourceValue:this.beans.valueSvc.getValueFromData(i,t),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.editingCount++)}stop(e,t,i){if(this.hasEdits(e))if(t){const o=this.getEditRow(e.rowNode)?.get(e.column);o&&(o.pendingValue===ae||o.pendingValue===o.sourceValue)?this.removeEdits(e):o&&i&&(o.editorValue=void 0)}else this.removeEdits(e)}clear(){for(const e of this.edits.values())e.clear();this.edits.clear(),this.editingCount=0}hasValidationErrors(e){return this.rowValidations.hasRowValidation(e)||this.cellValidations.hasCellValidation(e)}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},dv=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:i}=e??{};return this.cellValidations?.get(t)?.get(i)}hasCellValidation(e){const t=e?.rowNode;return t?e.column?!!this.getCellValidation(e):this.cellValidations.has(t):this.cellValidations.size>0}setCellValidation(e,t){const{rowNode:i,column:o}=e;this.cellValidations.has(i)||this.cellValidations.set(i,new Map),this.cellValidations.get(i).set(o,{errorMessages:[...t.errorMessages]})}clearCellValidation(e){const{rowNode:t,column:i}=e,o=this.cellValidations,s=o.get(t);s&&(s.delete(i),s.size===0&&o.delete(t))}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},cv=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e??{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,{errorMessages:[...t.errorMessages]})}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}},uv=(e,t)=>{e.forEach(({editorValue:i,pendingValue:o},s)=>{const r=i===void 0?o:i;r!==ae&&(t[s.getColId()]=r)})};import{_getTabIndex as xI}from"ag-stack";function ii(e,t={}){const{rowIndex:i,rowId:o,rowCtrl:s,rowPinned:r}=t;if(s)return s;const{rowModel:n,rowRenderer:l}=e;let{rowNode:a}=t;return a||(o?a=h3(e,o,r):i!=null&&(a=n.getRow(i))),a?l.getRowCtrlByNode(a):void 0}function q(e,t={}){const{cellCtrl:i,colId:o,columnId:s,column:r}=t;if(i)return i;const n=e.colModel.getCol(o??s??Sd(r));if(!n)return;const l=t.rowCtrl??ii(e,t),a=l?.getCellCtrl(n);if(a)return a;const d=t.rowNode??l?.rowNode;if(d)return e.rowRenderer.getCellCtrls([d],[n])?.[0]}function hv(e){const{editSvc:t}=e;t?.isBatchEditing()?t.stopBatchEditors(!1):t?.stopEditing(void 0,{source:"api"})}function FI(e,t,i){const{gos:o,popupSvc:s}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;const r=n=>{const l=n.relatedTarget;if(xI(l)===null){hv(t);return}let a=i.some(d=>d.contains(l))&&o.isElementInThisInstance(l);a||(a=!!s&&(s.getActivePopups().some(d=>d.contains(l))||s.isElementWithinCustomPopup(l))),a||hv(t)};for(const n of i)e.addManagedElementListeners(n,{focusout:r})}function Sd(e){if(e)return typeof e=="string"?e:e.getColId()}import{_getLocaleTextFunc as gv}from"ag-stack";var bd=(e,t,{previous:i}={})=>{const o=[];for(const[r,n]of t.cell.getCellValidationMap())for(const[l,{errorMessages:a}]of n){const d=Ke(a,e,"announcement"),c=i?.cell.getCellValidation({rowNode:r,column:l})?.errorMessages;d.length>0&&(!c||d!==Ke(c,e,"announcement"))&&o.push({rowNode:r,column:l,message:d})}const s=[];for(const[r,{errorMessages:n}]of t.row.getRowValidationMap()){const l=Ke(n,e,"announcement"),a=i?.row.getRowValidation({rowNode:r})?.errorMessages;l.length>0&&(!a||l!==Ke(a,e,"announcement"))&&s.push({rowNode:r,message:l})}return{cells:o,rows:s}},PI=(e,t,i)=>{for(const[o,s]of t.cell.getCellValidationMap())for(const[r,{errorMessages:n}]of s){const l=Ke(n,e,"announcement"),a=i.cell.getCellValidation({rowNode:o,column:r})?.errorMessages??[];if(l.length>0&&Ke(a,e,"announcement").length===0)return!0}for(const[o,{errorMessages:s}]of t.row.getRowValidationMap()){const r=Ke(s,e,"announcement"),n=i.row.getRowValidation({rowNode:o})?.errorMessages??[];if(r.length>0&&Ke(n,e,"announcement").length===0)return!0}return!1},DI=(e,t)=>e.colNames.getDisplayNameForColumn(t,"header",!0)||t.getColId(),MI=(e,t)=>{const{rowIndex:i,rowPinned:o}=t;if(i==null)return;const s={rowIndex:i,rowPinned:o??null};return Jn(e)+Qn(e,s)+1},pv=(e,t)=>e("ariaRowIndex",`Row ${t}`,[String(t)]),fv=(e,t,{cells:i,rows:o},s,r)=>{const n=new Map,l=e.visibleCols.allCols;for(let d=0,c=l.length;d<c;++d)n.set(l[d],d);const a=[];for(let d=0,c=i.length;d<c;++d){const{rowNode:u,column:h,message:g}=i[d],p=s?.get(u),f=p==null?"":`${pv(t,p)}, `;a.push({rowNode:u,columnOrder:n.get(h)??Number.MAX_SAFE_INTEGER,rowError:!1,message:`${f}${DI(e,h)}: ${g}`})}for(let d=0,c=o.length;d<c;++d)a.push({rowNode:o[d].rowNode,columnOrder:Number.MAX_SAFE_INTEGER,rowError:!0,message:TI(t,o[d],s)});if(a.sort((d,c)=>{const u=(s?.get(d.rowNode)??Number.MAX_SAFE_INTEGER)-(s?.get(c.rowNode)??Number.MAX_SAFE_INTEGER);return u!==0?u:d.rowError!==c.rowError?d.rowError?1:-1:d.columnOrder-c.columnOrder}),r){const d=a.find(({rowError:c})=>!c);d&&(d.message=`${r} ${d.message}`)}return a.map(({message:d})=>d).join(" ")},TI=(e,{rowNode:t,message:i},o)=>{const s=e("ariaFullRowValidationError",`Full Row Validation: ${i}`,[i]),r=o?.get(t);return r==null?s:`${pv(e,r)}, ${s}`},mv=(e,{cells:t,rows:i},o,s=!1)=>{const r=new Set;for(let l=0,a=t.length;l<a;++l)r.add(t[l].rowNode);for(let l=0,a=i.length;l<a;++l)r.add(i[l].rowNode);if(r.size===0||!s&&r.size===1&&(!o||r.has(o)))return;const n=new Map;for(const l of r){const a=MI(e,l);a!=null&&n.set(l,a)}return n},Cv=(e,t,{cells:i,rows:o})=>{const s=mv(e,{cells:i,rows:o}),r=i.length>0?t("ariaValidationErrorPrefix","Cell Editor Validation"):void 0;return fv(e,t,{cells:i,rows:o},s,r)},vv=(e,t,i)=>{const o=gv(e.localeSvc),s=bd(o,i,{previous:t}),r=Cv(e,o,s);if(r.length>0)e.ariaAnnounce.announceValue(r,"editorValidation");else if(PI(o,t,i)){const n=bd(o,i);e.ariaAnnounce.announceValue(Cv(e,o,n),"editorValidation")}},wv=(e,t)=>{const{editModelSvc:i,ariaAnnounce:o,localeSvc:s}=e;if(!i)return;const r=gv(s),{cells:n,rows:l}=bd(r,{cell:i.getCellValidationModel(),row:i.getRowValidationModel()}),a=mv(e,{cells:n,rows:l},t,!t&&(e.editSvc?.isBatchEditing()??!1)),d=fv(e,r,{cells:n,rows:l},a);if(d.length===0)return;const c=r("ariaFullRowEditValidationFailed",`Cannot complete row edit. ${d}`,[d]);o.announceValue(c,"editorValidation")},ae=Symbol("unedited"),AI=(e,t={})=>{const i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),o=new Array(i.length);let s=0;for(let r=0,n=i.length;r<n;++r){const a=i[r].comp?.getCellEditor();a&&(o[s++]=je(a))}return o.length=s,o};function II(e,t,i,o,s,r){t.length===0&&i?.rowNode&&i?.column&&oi(e,i,{key:o,event:s,cellStartedEdit:r});const{valueSvc:n,editSvc:l,editModelSvc:a}=e,{rowNode:d,column:c}=i??{},u=new Map;for(const h of t){const{rowNode:g,column:p}=h,f=q(e,h);if(!f){if(g&&p){const w=n.getValueFromData(p,g),C=(i?.rowNode===g&&i?.column===p&&o||void 0)??l?.getCellDataValue(h)??n.getDisplayValue(p,g,"edit",!1)??w??ae;a?.setEdit(h,{pendingValue:Pi(e,C,!1,p),sourceValue:w,state:"editing"})}continue}const m=r&&d===f.rowNode&&f.column===c;l.withEditorAttachValidationCache(u,f,()=>oi(e,{rowNode:d,column:f.column},{key:m?o:null,event:m?s:null,cellStartedEdit:m&&r}))}}function Be({pendingValue:e,sourceValue:t}){return e===ae&&(e=t),e!==t}function kI(e){const t=new Map;for(const[i,o]of e){const s=new Map;for(const[r,n]of o)Be(n)&&s.set(r,n);s.size>0&&t.set(i,s)}return t}function oi(e,t,i){const{key:o,event:s,cellStartedEdit:r,silent:n}=i??{},{editModelSvc:l,gos:a,userCompFactory:d}=e,c=q(e,t),u=c?.comp?.getCellEditor(),h=bv(e,t,o,r&&!n),g=l?.getEdit(t),p=h.value??g?.sourceValue;if(u){l?.setEdit(t,{editorValue:Pi(e,p,!0,t.column),state:"editing"}),u.refresh?.(h);return}const f=t.column.getColDef(),m=qu(d,f,h);if(!m)return;const{popupFromSelector:w,popupPositionFromSelector:v}=m,S=w??!!f.cellEditorPopup,C=v??f.cellEditorPopupPosition;if(Ev(m.params,s),!c)return;const{rowCtrl:b,comp:R}=c,{cellStartedEditing:x,cellStoppedEditing:D}=(n?g?.editorState:void 0)??{};l?.setEdit(t,{editorValue:Pi(e,p,!0,t.column),state:"editing",editorState:{cellStartedEditing:x,cellStoppedEditing:D}}),c.editCompDetails=m,e.editSvc?.invalidateEditorsValidation(),R?.setEditDetails(m,S,C,a.get("reactiveCustomComponents")),b?.refreshRow({suppressFlash:!0}),c.refreshNoteState(),LI(e,t,s,p,n)}function LI(e,t,i,o,s){const{editSvc:r,editModelSvc:n}=e,l=n?.getEdit(t);!s&&l?.state==="editing"&&!l?.editorState?.cellStartedEditing&&(r?.dispatchCellEvent(t,i,"cellEditingStarted",{value:o}),n?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function Sv(e,t,i,o){const s={editorValueExists:!1};if(i?.isCancelling||(o===void 0&&e.editSvc.hasValidationRules()&&(o=(t.getValidationErrors?.()?.length??0)>0),o))return s;if(i?.isStopping){const n=t.isCancelAfterEnd?.();if(n)return{...s,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function bv(e,t,i,o){const{valueSvc:s,gos:r,editSvc:n}=e,l=e.gos.get("enableGroupEdit"),a=q(e,t),d=t.rowNode?.rowIndex??void 0,c=n?.isBatchEditing(),u=e.colModel.getCol(t.column),{rowNode:h,column:g}=t,p=a.comp?.getCellEditor(),f=n?.getCellDataValue(t),m=f===void 0&&p?Sv(e,p)?.editorValue:f,w=m===ae?s.getDisplayValue(u,h,"edit",!1):m;let v=l?m:w;return u.allowFormula&&e.formula?.isFormula(v)&&(v=e.formula?.normaliseFormula(v,!0)??v),G(r,{value:v,eventKey:i??null,column:g,colDef:g.getColDef(),rowIndex:d,node:h,data:h.data,cellStartedEdit:!!o,onKeyDown:a?.onKeyDown.bind(a),stopEditing:(S,C)=>{n.stopEditing(t,{source:c?"ui":"api",suppressNavigateAfterEdit:S,event:C}),n.cellEditingInvalidCommitBlocks()&&e.editModelSvc?.hasValidationErrors({rowNode:h})||Ze(e,t,{})},eGridCell:a?.eGui,parseValue:S=>s.parseValue(u,h,S,a?.value),formatValue:a?.formatValue.bind(a),validate:()=>{Tv(e)}})}function yv(e,t,i,o,s){!s&&(o.state==="editing"||o.pendingValue===ae)||Be(o)||e.removeEdits({rowNode:t,column:i})}function yd(e,t){const{editModelSvc:i}=e;i?.getEditMap()?.forEach((o,s)=>{o.forEach((r,n)=>yv(i,s,n,r,t))})}function Rv(e,t,i){const{editModelSvc:o}=e;if(!o)return;const s=o.getEdit(t);s&&yv(o,t.rowNode,t.column,s,i)}function VI(e,t){const i=t.comp?.getCellEditor();if(!i?.refresh)return;const{eventKey:o,cellStartedEdit:s}=t.editCompDetails.params,{column:r}=t,n=bv(e,t,o,s),l=r.getColDef(),a=qu(e.userCompFactory,l,n);i.refresh(Ev(a.params,o))}function Ev(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Fr(e){const t=e.editModelSvc;if(!t?.hasOpenEditors())return;const i={};t.getEditMap()?.forEach((o,s)=>{i.rowNode=s;for(const r of o.keys()){i.column=r;const n=q(e,i)?.comp?.getCellEditor();n&&je(n).agFlushInput?.()}})}var HI=(e,t)=>{if(Fr(e),!e.editSvc.cellEditingInvalidCommitBlocks()){const o=t.comp?.getCellEditor();let s;return o&&e.editSvc.hasValidationRules()&&(s=new Map,xv(s,o,je(o))),{revertBlockedInvalid:!1,validationCache:s}}const i=Mt(e);return{revertBlockedInvalid:!!e.editModelSvc?.getCellValidationModel().hasCellValidation(t),validationCache:i}},BI=(e,t,i)=>{const o=e.editSvc;if(!o?.isEditing(t,{withOpenEditor:!0}))return;const s=i instanceof KeyboardEvent,r=i instanceof MouseEvent,n=s&&i.key===bI.ESCAPE,l=e.gos.get("editType")==="fullRow",a=n?void 0:HI(e,t),d=a?.revertBlockedInvalid??!1,c=a?.validationCache,u=o.isBatchEditing(),{rowNode:h,column:g}=t;if(!n&&l&&o.isRowEditing(h,{checkSiblings:!0})){d?o.revertCellEdit({rowNode:h,column:g},c):o.closeCellEditor({rowNode:h,column:g},c);return}if(d&&u){o.revertCellEdit({rowNode:h,column:g},c);return}o.stopEditing(t,{source:u?"ui":"api",cancel:n||d,event:s||r?i:void 0},c),n&&t.focusCell({forceBrowserFocus:!0,sourceEvent:i})},xv=(e,t,i)=>{let o=e.get(t);return o===void 0&&(o=[...i.getValidationErrors?.()??[]],e.set(t,o)),o},Fv=(e,t,i=new Map)=>{for(const o of e.rowRenderer.getCellCtrls()){const s=o.comp?.getCellEditor();if(!s)continue;const r=je(s),n=xv(i,s,r);t?.(o,r,n)}return i},OI=e=>Fv(e),si=(e,t,i)=>{const o={};e.editModelSvc?.getEditMap()?.forEach((s,r)=>{o.rowNode=r;for(const n of s.keys())o.column=n,Pv(e,o,t,i)})},Pv=(e,t,i,o)=>{const s=q(e,t)?.comp?.getCellEditor();if(!s)return;const r=o?.get(s),n=r===void 0?void 0:r.length>0,{editorValue:l,editorValueExists:a,isCancelAfterEnd:d}=Sv(e,s,i,n);if(d){const{cellStartedEditing:c,cellStoppedEditing:u}=e.editModelSvc?.getEdit(t)?.editorState??{};e.editModelSvc?.setEdit(t,{editorState:{isCancelAfterEnd:d,cellStartedEditing:c,cellStoppedEditing:u}})}Dv(e,t,l,!a,i)};function Vo(e,t,i,o){Dv(e,t,i,!1,o)}function Dv(e,t,i,o,s){const{editModelSvc:r,valueSvc:n}=e;if(!r)return;const{rowNode:l,column:a}=t;let d=r.getEdit(t);if(d?.sourceValue===void 0){const c=d?Pi(e,d.editorValue,!1,a):ae,u={sourceValue:n.getValueFromData(a,l),pendingValue:c};s?.persist&&(u.state="changed"),d=r.setEdit(t,u)}r.setEdit(t,{editorValue:o?Pi(e,d.sourceValue,!0,a):i}),s?.persist&&GI(e,t)}function Pi(e,t,i,o){const{formula:s}=e;return o.allowFormula&&s?.isFormula(t)?s?.normaliseFormula(t,i)??t:t}function GI(e,t){const{editModelSvc:i}=e,o=i?.getEdit(t),r={pendingValue:Pi(e,o?.editorValue,!1,t.column)};!o?.editorState?.cellStoppedEditing&&o?.state!=="editing"&&(r.state="changed"),i?.setEdit(t,r)}function Pr(e,t,i={},o){for(let s=0,r=t.length;s<r;++s)Ze(e,t[s],i,void 0,o)}function Ze(e,t,i,o=q(e,t),s){const r=e.editModelSvc;o&&e.editSvc?.clearPendingEditorAttachValidation(o);const n=r?.getEdit(t);let l;if(n&&n.state!=="editing"&&n.editorState?.cellStoppedEditing?l=n.state:l="changed",!o){if(n){r?.getCellValidationModel().clearCellValidation(t),r?.setEdit(t,{state:l}),Rd(e,t,n,i);const c=ii(e,{rowNode:t.rowNode});c&&e.editSvc?.applyRowEditStyles(c)}return}const a=o.comp,d=a?.getCellEditor();if(a&&!d){o?.refreshCell(),n&&(r?.setEdit(t,{state:l}),Rd(e,t,n,i));return}if(!i.cancel&&e.editSvc.hasValidationRules()){const c=d?s?.get(d):void 0,u=n&&(c??d?.getValidationErrors?.()),h=r?.getCellValidationModel();u?.length?h?.setCellValidation(t,{errorMessages:u}):h?.clearCellValidation(t)}n&&r?.setEdit(t,{state:l}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),o?.refreshCell({force:!0,suppressFlash:!0}),Rd(e,t,n,i)}function NI(e,t){const{sourceValue:i,pendingValue:o}=e;let s;return!t&&o!==ae&&(s=o),{valueChanged:!t&&Be(e),newValue:s,oldValue:i,value:i}}function _I(e,t,i){if(i||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let o=e.editorValue;return(o==null||o===ae)&&(o=t?.pendingValue),o===ae&&(o=void 0),{valueChanged:Be(e),newValue:o,oldValue:e.sourceValue}}var Rd=(e,t,i,o)=>{const s=e.editModelSvc?.getEdit(t);if(!s||s.state==="editing")return;const r=o?.cancel,n=e.gos.get("enableGroupEdit")?NI(s,r):_I(s,i,r);zI(e,t,n,o)};function zI(e,t,i,{silent:o,event:s}={}){const{editSvc:r,editModelSvc:n}=e,l=n?.getEdit(t),{editorState:a}=l??{},{isCancelBeforeStart:d,cellStartedEditing:c,cellStoppedEditing:u}=a??{};!o&&!d&&c&&!u&&(r?.dispatchCellEvent(t,s,"cellEditingStopped",i),n?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function WI(e){const t=e.rowRenderer.getCellCtrls();for(let i=0,o=t.length;i<o;++i){const r=t[i].comp?.getCellEditor();if(r){const n=je(r);if(n.getValidationElement||n.getValidationErrors)return!0}}return!1}function Mt(e,t,i){const o=e.editSvc;if(!(t||o?.hasValidationRules()||e.editModelSvc?.hasValidationErrors()))return new Map;const s=new dv,{editModelSvc:r}=e,n=r?.getCellValidationModel(),l=r?.getRowValidationModel(),a=yI(e.localeSvc),d=new Set;i=Fv(e,(c,u,h)=>{const{rowNode:g,column:p}=c,f=h.length>0,m=u.getValidationElement?.(!1)??(!u.isPopup?.()&&c.eGui);if(m){const w=f?Ke(h,a,"inline"):"";if(RI(m,f),m instanceof HTMLInputElement){m.setCustomValidity(w);const v=c.eGui;v.classList.contains(md)&&Sr(v,m)}else m.classList.toggle("invalid",f)}f&&s.setCellValidation({rowNode:g,column:p},{errorMessages:h}),d.add(c.rowCtrl)},i),si(e,{persist:!1},i),r?.setCellValidationModel(s),Mv(e),r&&n&&l&&vv(e,{cell:n,row:l},{cell:s,row:r.getRowValidationModel()});for(const c of d.values()){o?.applyRowEditStyles(c);for(const u of c.getAllCellCtrls())u.tooltipFeature?.refreshTooltip(!0),u.editorTooltipFeature?.refreshTooltip(!0),o?.applyCellEditStyles(u)}return i}var Mv=e=>{e.gos.get("editType")==="fullRow"&&e.editModelSvc?.setRowValidationModel(UI(e))},UI=e=>{const t=new cv,i=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!i||!o)return t;for(const[s,r]of o){const n=[],{rowIndex:l,rowPinned:a}=s;for(const[c,u]of r){const{editorValue:h,pendingValue:g,sourceValue:p}=u,f=h??(g===ae?void 0:g)??p;n.push({column:c,colId:c.getColId(),rowIndex:l,rowPinned:a,oldValue:p,newValue:f})}const d=i({editorsState:n})??[];d.length>0&&t.setRowValidation({rowNode:s},{errorMessages:d})}return t};function Tv(e){return Mt(e,!0),Av(e)}function Av(e){const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const i=[];return t.forEach((o,s)=>{o.forEach(({errorMessages:r},n)=>{i.push({column:n,rowIndex:s.rowIndex,rowPinned:s.rowPinned,messages:r??null})})}),i}function qI(e){e.undoRedo?.undo("api")}function $I(e){e.undoRedo?.redo("api")}function KI(e,t){return e.editModelSvc?.getEditRowDataValue(t)}function jI(e){const t=e.editModelSvc?.getEditMap(),i=[];return t?.forEach((o,s)=>{o.forEach((r,n)=>{const l=r.state==="editing",a=!l&&Be(r);if(l||a){const d=n.colId;let c=r.editorValue??r.pendingValue;c===ae&&(c=void 0),i.push({newValue:c,oldValue:r.sourceValue,state:r.state,column:n,colId:d,colKey:d,rowIndex:s.rowIndex,rowPinned:s.rowPinned})}})}),i}function ZI(e,t=!1){const{editSvc:i}=e;i?.isBatchEditing()?i.stopBatchEditors(t):i?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function QI(e,t){const i=Re(e,t);return!!i&&!!e.editSvc?.isEditing({rowNode:i,column:t.column})}function YI(e,t){const{key:i,colKey:o,rowIndex:s,rowPinned:r}=t,{editSvc:n,colModel:l}=e,a=l.getCol(o);if(!a){e.log.warn(12,{colKey:o});return}const c=Re(e,{rowIndex:s,rowPinned:r||null,column:a});if(!c){e.log.warn(290,{rowIndex:s,rowPinned:r});return}if(!n?.isCellEditable({rowNode:c,column:a},"api"))return;r==null&&CC(e,s),mC(e,o),n?.startEditing({rowNode:c,column:a},{event:i?new KeyboardEvent("keydown",{key:i}):void 0,source:"api",editable:!0})}function JI(e){return Fr(e),Tv(e)}var XI=Av;function e8(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function t8(e){return e.undoRedo?.getCurrentRedoStackSize()??0}import{KeyCode as Di}from"ag-stack";import{AgPopupComponent as i8}from"ag-stack";var o8={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},s8=class extends j1{constructor(e){super(o8),this.params=e}postConstruct(){Vt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,i=o=>{vl(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:i})}};import{KeyCode as Dr}from"ag-stack";function r8(e,{column:t},i,o,s="ui"){if(i instanceof KeyboardEvent&&(i.key===Dr.TAB||i.key===Dr.ENTER||i.key===Dr.F2||i.key===Dr.BACKSPACE&&o))return!0;if(i?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const n=t?.getColDef(),l=n8(e.gos,n),a=i?.type;return a==="click"&&i?.detail===1&&l===1||a==="dblclick"&&i?.detail===2&&l===2?!0:s==="api"?!!o:!1}function n8(e,t){return e.get("suppressClickEdit")?0:e.get("singleClickEdit")||t?.singleClickEdit?1:2}function Ed(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function xd(e,t){const i=t.column,o=t.rowNode,s=i.getColDef();if(i.isCalculatedCol)return!1;if(!o)return Ed(e,t);if(Ye(e.gos,o))return!1;const r=s.editable;return o.group&&s.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(o,i)?!0:Ed(e,t):i.isColumnFunc(o,r)?!0:Ed(e,t)}function l8(e,t,i="ui"){const o=xd(e,t);if(o||i==="ui")return o;const{rowNode:s,column:r}=t;for(const n of e.colModel.colsList)if(n!==r&&xd(e,{rowNode:s,column:n}))return!0;return!1}var Mr=(e,t=!1)=>{if(e!==void 0)return Be(e)||t&&e.state==="editing"};function Iv(e,t,i=!1){return Mr(e.editModelSvc?.getEdit(t),i)}var kv=(e,t,i)=>{if(e)for(let o=0,s=e.length;o<s;++o){const r=e[o];if(r.data&&(Mr(t?.getCellEdit(r,i))||Mr(t?.getCellEdit(r.pinnedSibling,i)))||kv(r.childrenAfterGroup,t,i))return!0}};function Lv(e,t){const{column:i,rowNode:o}=t;return e.gos.get("groupTotalRow")&&!o?.footer?!1:kv(o?.childrenAfterGroup,e.editModelSvc,i)}function Vv(e,{rowNode:t,column:i}){if(t=t.pinnedSibling,!!t)return Mr(e.editModelSvc?.getCellEdit(t,i))}function Fd(e,t){if(!t.comp)return;const{editSvc:i,editModelSvc:o}=e;if(i?.isBatchEditing()&&i.isEditing()){const r=Iv(e,t)||Lv(e,t)||Vv(e,t);Hv(e,t,r)}else Hv(e,t,!1);const s=!!o?.getCellValidationModel().hasCellValidation(t);t.comp.toggleCss("ag-cell-editing-error",s)}function Hv(e,t,i){t.comp.toggleCss("ag-cell-editing",i??!1),t.comp.toggleCss("ag-cell-batch-edit",(i&&e.editSvc?.isBatchEditing())??!1)}function a8(e,t){const i=e.editModelSvc;let o=t.rowNode,s=i?.getEditRow(o);const r=i?.getRowValidationModel().hasRowValidation({rowNode:o});if(!s&&o.pinnedSibling&&(o=o.pinnedSibling,s=i?.getEditRow(o)),s){const n=Array.from(s.keys()).some(l=>{const a={rowNode:o,column:l};return Iv(e,a,!0)||Lv(e,a)||Vv(e,a)});Bv(e,t,r,n);return}Bv(e,t,r)}function Bv(e,t,i=!1,o=!1){const s=!!e.editSvc?.isBatchEditing(),r=e.gos.get("editType")==="fullRow",n=t.getGui()?.rowComp;n&&(n.toggleCss("ag-row-editing",r&&o),n.toggleCss("ag-row-batch-edit",r&&o&&s),n.toggleCss("ag-row-inline-editing",o),n.toggleCss("ag-row-not-inline-editing",!o),n.toggleCss("ag-row-editing-invalid",r&&o&&i))}var d8=e=>()=>{const t=e.editModelSvc?.getEditMap();if(!t?.size)return;const i=e.pinnedRowModel;let o;t.forEach((s,r)=>{const n=r.rowPinned,l=r.id;if(!r.pinnedSibling&&!(n==null||l==null||i?.getPinnedRowById(l,n)===r))for(const a of s.keys())o??(o=[]),o.push({rowNode:r,column:a})}),o&&Pd(e,o)},Pd=(e,t)=>{const i=e.editModelSvc,o=e.editSvc,s={cancel:!0},r=i.getCellValidationModel(),n=new Set;for(let c=0,u=t.length;c<u;++c){const h=t[c];Ze(e,h,s),r.clearCellValidation(h),i.removeEdits(h),n.add(h.rowNode)}const l=new Set,a=i.getRowValidationModel();let d=!1;for(const c of n)i.getEditRow(c)?.size?d=!0:(l.add(c),a.clearRowValidation({rowNode:c}));d&&Mt(e);for(const c of n){const u=ii(e,{rowNode:c});u&&o.applyRowEditStyles(u)}l.size&&o.releasePurgedRows(l)},c8=new Set(["undo","redo","paste","bulk","rangeSvc"]),u8=new Set(["ui","api"]),Ov={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},h8=new Set(Object.keys(Ov)),g8=new Set(["paste","rangeSvc","cellClear","redo","undo"]),Dd={cancel:!0,source:"api"},p8={cancel:!1,source:"api"},Md={checkSiblings:!0},Tt={force:!0,suppressFlash:!0},f8={force:!0};function m8(e,t){const i=e.formulaRowIndex,o=t.formulaRowIndex;return i==null||o==null?1:o-i}var C8=class extends y{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.csrm=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0,this.stopBlockRejected=!1,this.validationConfigVersion=-1,this.validationConfigResult=!1,this.pendingEditorAttachValidation=new WeakMap,this.pendingEditorFocus=null,this.pendingEditorFocusCell=!1,this.bulkWriteDepth=0,this.bulkWriteTouched=[]}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.csrm=ie(this.gos,e.rowModel),this.addManagedPropertyListener("getFullRowEditValidationErrors",()=>{this.validationConfigVersion=-1}),this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,Dd),this.createStrategy(o)});const t=d8(e),i=()=>{if(!this.isEditing())return;const o=this.revalidate();this.checkValidated()?this.stopEditing(void 0,Dd,o):this.batch?Pr(e,this.model.getEditPositions(),{},o):this.stopEditing(void 0,p8,o)};this.addManagedEventListeners({pinnedRowsChanged:t,pinnedRowDataChanged:t,sortChanged:i,filterChanged:i,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,Dd))}stopBatchEditing(e){this.batch&&(e&&(this.stopEditing(void 0,e),e.commit&&this.stopBlockRejected)||(this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1))}stopBatchEditors(e){const{beans:t,model:i}=this;let o;if(e){const s=i.getEditPositions();this.strategy?.stopCancelled(!1);for(let r=0,n=s.length;r<n;++r)this.bulkRefreshCell(s[r],{force:!0,suppressFlash:!0});this.clearValidationIfNoOpenEditors();return}else{if(this.cellEditingInvalidCommitBlocks()){if(o=this.revalidate(),this.checkValidated())return}else this.hasValidationRules()&&(o=OI(t));si(t,{persist:!0},o)}Pr(t,i.getEditPositions(),{cancel:e},o),this.clearValidationIfNoOpenEditors()}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:i,strategy:o}=this,s=Gv(i,e);if(o){if(o.beanName===s)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,i,o="ui"){const s=r8(this.beans,e,t,i,o);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,i="ui"){return this.strategy?.shouldStop(e,t,i)??null}shouldCancelEditing(e,t,i="ui"){return this.strategy?.shouldCancel(e,t,i)??null}isEditing(e,t){return this.model.hasEdits(e??void 0,t??Md)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t?.checkSiblings)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:i=!0,event:o=null,source:s="ui",ignoreEventKey:r=!1,silent:n}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const a=q(this.beans,e);if(a&&!a.rowCtrl.isAlive())return;if(a&&!a.comp){t.editable=void 0,a.pendingEditStart=t;return}const d=this.shouldStartEditing(e,o,i,s);if(!d&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),d&&this.ensureBatchStarted(),this.strategy.start({position:e,event:o,source:s,ignoreEventKey:r,startedEdit:i,silent:n})}stopEditing(e,t,i){this.stopping||(this.stopBlockRejected=!1);const o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let s=!1;try{const r=this.processStopRequest(o,i);return s||(s=r.res),this.finishStopEditing({...o,edits:r.edits,params:t,position:e,res:s}),s}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:i=null,cancel:o=!1,source:s="ui",forceCancel:r=!1,forceStop:n=!1,commit:l=!1}=t??{};if(h8.has(s)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const a=this.committing?Ov[s]:s;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Md))||!this.strategy||this.stopping)return null;this.pendingEditorFocus=null;const c=q(this.beans,e),u=!o&&(!!this.shouldStopEditing(e,i,a)||(this.committing||s==="paste")&&!this.batch)||n,h=o&&!!this.shouldCancelEditing(e,i,a)||r;return{cancel:o,cellCtrl:c,edits:this.model.getEditMapCopy(),event:i??null,forceCancel:r,forceStop:n,commit:l,position:e,source:s,treatAsSource:a,willCancel:h,willStop:u}}processStopRequest(e,t){const{event:i,position:o,willCancel:s,willStop:r}=e;return r||s?this.handleStopOrCancel(e,t):this.shouldHandleMidBatchKey(i,o)?{res:!1,edits:this.handleMidBatchKey(i,o,e,t)}:(si(this.beans,{persist:!0},t),this.batch&&this.strategy?.cleanupEditors(o,void 0,t),{res:!1,edits:this.model.getEditMapCopy()})}handleStopOrCancel(e,t){const{model:i}=this,{cancel:o,commit:s,edits:r,event:n,forceCancel:l,source:a,willCancel:d,willStop:c}=e,{blockRejected:u,skipAllCommits:h,validationCache:g}=this.resolveStopValidation(e,t),p=(!this.batch||!d)&&!u;si(this.beans,{persist:p,isCancelling:d||o,isStopping:c},g);const f=i.getEditMapCopy(),w=!d&&(!this.batch||s)?this.processEdits(f,a,h):[];return o?this.strategy?.stopCancelled(l,g):u||this.strategy?.stopCommitted(n,s,g),this.cleanupAfterStop(r,f,w),{res:c&&!u,edits:f}}resolveStopValidation(e,t){const{beans:i,model:o}=this,{cancel:s,willCancel:r}=e,n=!r&&!s;let l=t;return n&&(Fr(i),l??(l=Mt(i))),{...this.applyInvalidEditPolicy(e,n,o.hasValidationErrors()),validationCache:l}}applyInvalidEditPolicy(e,t,i){const{beans:o}=this,{commit:s,position:r,willStop:n}=e,l=this.cellEditingInvalidCommitBlocks(),a=i&&!l&&this.batch&&s;a&&this.revertInvalidEdits();const d=i&&l&&n&&t;return this.stopBlockRejected=d,d&&this.gos.get("editType")==="fullRow"&&wv(o,r?.rowNode??this.getOpenEditorRowNode()),{blockRejected:d,skipAllCommits:i&&!a}}cleanupAfterStop(e,t,i){const{beans:o,model:s}=this;this.clearValidationIfNoOpenEditors();for(const r of i)s.clearEditValue(r);this.bulkRefreshMap(e);for(const r of s.getEditPositions(t)){const n=q(o,r),l=Be(r);n?.refreshCell({force:!0,suppressFlash:!l})}}getOpenEditorRowNode(){const e=this.beans.rowRenderer.getCellCtrls();for(let t=0,i=e.length;t<i;++t){const o=e[t];if(o.comp?.getCellEditor())return o.rowNode}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,i,o){const{beans:s,model:r}=this,{edits:n}=i,{key:l}=e,a=l===Di.ENTER,d=l===Di.ESCAPE,c=l===Di.TAB;return a||c||d?(a||c?si(s,{persist:!0},o):this.strategy?.stopCancelled(!1),!d&&this.batch?this.strategy?.cleanupEditors(void 0,void 0,o):this.batch||Pr(s,r.getEditPositions(),{event:e,cancel:d},o),e.preventDefault(),this.bulkRefreshMap(n,{suppressFlash:!0}),r.getEditMapCopy()):n}finishStopEditing({cellCtrl:e,edits:t,params:i,position:o,res:s,commit:r,forceCancel:n,willCancel:l}){const a=this.beans;s&&o&&(!this.batch||r)&&this.model.removeEdits(o),this.stopBlockRejected||this.navigateAfterEdit(i,e?.cellPosition),yd(a),this.clearValidationIfNoOpenEditors();const{rowRenderer:d,formula:c}=a;if(l&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){c?c.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});const u=s&&r;(u||l&&n)&&this.dispatchBatchStopped(t,u)}}dispatchBatchStopped(e,t){let i;t&&(i=kI(e),i.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",i??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:i,suppressNavigateAfterEdit:o}=e;if(!(i instanceof KeyboardEvent)||o)return;const{key:r,shiftKey:n}=i,l=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==Di.ENTER||!l)return;const a=n?Di.UP:Di.DOWN;this.beans.navigation?.navigateToNextCell(null,a,t,!1)}revertInvalidEdits(){const e=this.model,t=e.getEditPositions(),i=[];for(let o=0,s=t.length;o<s;++o){const r=t[o];e.hasValidationErrors(r)&&i.push(r)}for(let o=0,s=i.length;o<s;++o)this.revertCellEdit(i[o])}closeCellEditor(e,t){const i=this.beans;Pv(i,e,{persist:!0,isStopping:!0},t),Ze(i,e,{},void 0,t)}revertCellEdit(e,t){const i=this.beans;Ze(i,e,{cancel:!0},void 0,t);const o=this.model,s=o.getRowValidationModel();o.stop(e,!0,!0),o.getCellValidationModel().clearCellValidation(e),Mv(i);const r=o.getCellValidationModel();vv(i,{cell:r,row:s},{cell:r,row:o.getRowValidationModel()});const n=ii(i,e);n&&this.applyRowEditStyles(n),q(i,e)?.refreshCell(Tt)}processEdits(e,t,i){const o=Array.from(e.keys()),s=[],{changeDetectionSvc:r}=this.beans;r?.beginDeferred();try{for(const n of o){const l=e.get(n);for(const a of l.keys()){const d=l.get(a),c={rowNode:n,column:a};if(Be(d)&&!i){const u=q(this.beans,c);this.setNodeDataValue(n,a,d.pendingValue,u,t)||s.push(c)}}}}finally{r?.endDeferred()}return s}setNodeDataValue(e,t,i,o,s="edit"){const r=u8.has(s)?"edit":s;o&&(o.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,i,r)}finally{this.committing=!1,o&&(o.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const i=this.model.getEdit(e);i&&i.state!=="editing"&&(t?this.model.setEdit(e,{sourceValue:i.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let i=Tt;if(t?.forceRefreshOfEditCellsOnly){const o=[],s=new Set;e.forEach((r,n)=>{o.push(n);for(const l of r.keys())s.add(l)}),i={rowNodes:o,columns:Array.from(s),...Tt}}this.beans.rowRenderer.refreshCells(i)}dispatchEditValuesChanged(e,t,i={}){const{pendingValue:o,sourceValue:s}=i,{rowIndex:r,rowPinned:n,data:l}=e;this.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:n,column:t,source:"api",data:l,newValue:o,oldValue:s,value:o,colDef:t.getColDef()})}beginBulkWrite(){this.bulkWriteDepth++}endBulkWrite(){--this.bulkWriteDepth===0&&this.flushBulkWrite()}flushBulkWrite(){const e=this.bulkWriteTouched;if(this.bulkWriteTouched=[],!this.batch||e.length===0||(this.model.hasOpenEditors()&&this.cleanupEditors(),!this.csrm))return;const t=new Map,i=new Map;for(let o=0,s=e.length;o<s;++o){const r=e[o],{rowNode:n,column:l}=r;Nv(t,n,l)&&this.refCell(n,l,this.model.getCellEdit(n,l),void 0,i)}}bulkRefreshCell(e,t){if(this.csrm){const{rowNode:i,column:o}=e;this.refCell(i,o,this.model.getCellEdit(i,o),t)}}bulkRefreshMap(e,t){this.csrm&&e.forEach((i,o)=>{for(const s of i.keys())this.refCell(o,s,i.get(s),t)})}refCell(e,t,i,o={},s){const{beans:r,gos:n}=this,l=e.pinnedSibling;this.dispatchEditValuesChanged(e,t,i),l&&this.dispatchEditValuesChanged(l,t,i),q(r,{rowNode:e,column:t})?.refreshCell(o),l&&q(r,{rowNode:l,column:t})?.refreshCell(o);const a=this.batch,d=e.sibling;d&&_v(r,d,t,o,a,s);let c=e.parent;if(!c)return;const u=n.get("groupTotalRow"),h=n.get("grandTotalRow");for(;c;){const g=c.sibling,p=g&&(g.footer&&u||!c.parent&&h)?g:c;_v(r,p,t,o,a,s),c=c.parent}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:i,beans:o}=this,s=e.rowNode;if(s.group&&e.column.getColDef().groupRowEditable==null){if(i.get("treeData")){if(!s.data&&!i.get("enableGroupEdit"))return!1}else if(!i.get("enableGroupEdit"))return!1}const r=Gv(i)==="fullRow"?l8(o,e,t):xd(o,e);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}hasValidationRules(){return this.hasConfiguredValidation()||this.editorsRequireValidation()}hasConfiguredValidation(){const e=this.beans.colModel,t=e.colDefsVersion;if(this.validationConfigVersion===t)return this.validationConfigResult;this.validationConfigVersion=t;let i=!!this.gos.get("getFullRowEditValidationErrors");const o=e.colDefList;for(let s=0,r=o.length;!i&&s<r;++s){const n=o[s].colDef,l=n.cellEditorParams;!l||!n.editable&&!n.groupRowEditable||(i=typeof l=="function"||l.minLength!==void 0||l.maxLength!==void 0||l.getValidationErrors!==void 0||l.min!==void 0||l.max!==void 0)}return this.validationConfigResult=i,i}editorsRequireValidation(){return this.model.hasOpenEditors()?(this.editorsValidation??(this.editorsValidation=WI(this.beans)),this.editorsValidation):!1}invalidateEditorsValidation(){this.editorsValidation=void 0}releasePurgedRows(e){this.strategy?.releaseRows(e)}releaseRowEdits(e){const t=this.model.getEditRow(e);if(!t?.size||this.beans.gridDestroySvc.destroyCalled)return;const i=[];for(const o of t.keys())i.push({rowNode:e,column:o});Pd(this.beans,i)}releaseColumnsLeaving(e){const t=this.model?.getEditMap();if(!t?.size)return;const i=new Set;for(const s of t.values())for(const r of s.keys())i.add(r);for(let s=0,r=e.length;i.size>0&&s<r;++s)i.delete(e[s]);if(!i.size)return;const o=[];t.forEach((s,r)=>{for(const n of s.keys())i.has(n)&&o.push({rowNode:r,column:n})}),Pd(this.beans,o)}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,i=!0){return this.checkNavWithValidationAndCache(e,t,i).result}checkNavWithValidationAndCache(e,t,i=!0){const o=this.revalidate();if(this.checkValidated(e)){const s=q(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),i&&(s&&!s.hasBrowserFocus()&&s.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()),{result:"block-stop",validationCache:o}):(s&&this.revertSingleCellEdit(s),{result:"revert-continue",validationCache:o})}return{result:"continue",validationCache:o}}withEditorAttachValidationCache(e,t,i){if(this.pendingEditorAttachValidation.delete(t),!e){i();return}const o=t.editCompDetails,s=this.editorAttachValidationCache,r=e;this.editorAttachValidationCache=r;try{i()}finally{this.editorAttachValidationCache=s}const n=t.editCompDetails;return n&&n!==o&&!t.comp?.getCellEditor()&&this.pendingEditorAttachValidation.set(t,{compDetails:n,validationCache:r}),r}populateModelValidationErrors(e){let t=this.editorAttachValidationCache;if(!t&&e){const i=this.pendingEditorAttachValidation.get(e);this.pendingEditorAttachValidation.delete(e),i&&i.compDetails===e.editCompDetails&&(t=i.validationCache)}Mt(this.beans,!1,t)}clearPendingEditorAttachValidation(e){this.pendingEditorAttachValidation.delete(e)}hasPendingEditorAttachValidation(e){const t=this.pendingEditorAttachValidation.get(e);return t&&t.compDetails===e.editCompDetails?!0:(this.pendingEditorAttachValidation.delete(e),!1)}announceFullRowEditValidationErrors(e){wv(this.beans,e)}onCompAttached(e,t){const i=t?e.isCellEditable():void 0,o=!!i||this.isEditing(e,{withOpenEditor:!0});return o&&this.startEditing(e,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:i}),o}replayPendingStart(e){const t=e.pendingEditStart;e.pendingEditStart=null,this.startEditing(e,t)}onCellDestroyed(e){this.pendingEditorAttachValidation.delete(e),this.pendingEditorFocus===e&&(this.pendingEditorFocus=null),e.comp?.getCellEditor()&&this.invalidateEditorsValidation()}focusEditorOnAttach(e,t){this.pendingEditorFocus=e,this.pendingEditorFocusCell=t}onEditorAttached(e){if(this.invalidateEditorsValidation(),e.rangeFeature?.unsetComp(),this.pendingEditorFocus!==e)return;const t=this.pendingEditorFocusCell;this.pendingEditorFocus=null,t&&e.focusCell({forceBrowserFocus:!0}),e.comp?.getCellEditor()?.focusIn?.()}onPopupEditorClosed(e,t){BI(this.beans,e,t)}revertSingleCellEdit(e,t=!1){const i=q(this.beans,e);i?.comp?.getCellEditor()&&(Ze(this.beans,e,{silent:!0}),this.model.clearEditValue(e),oi(this.beans,e,{silent:!0}),Mt(this.beans),i?.refreshCell(Tt),t&&(i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()))}revalidateAndCheck(e){return this.revalidate(),this.checkValidated(e)}revalidate(){return Fr(this.beans),Mt(this.beans)}checkValidated(e){const t=q(this.beans,e);return t&&(t.refreshCell(Tt),this.applyRowEditStyles(t.rowCtrl)),this.model.hasValidationErrors(e)}moveToNextCell(e,t,i,o="ui"){let s;const r=this.isEditing(),n=r?this.checkNavWithValidationAndCache(void 0,i):void 0,l=n?.result==="block-stop";return e instanceof Ri&&r&&(s=this.strategy?.moveToNextEditingCell(e,t,i,o,l,n?.validationCache)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,!s&&!l&&this.stopEditing(void 0,void 0,n?.validationCache)),s}getPendingEditValue(e,t,i){const o=this.batch;if(i==="batch"&&!o)return;const s=this.model.getCellEditWithSibling(e,t);if(!s||this.stopping&&!o&&!s.editorState?.cellStartedEditing)return;if(i==="edit"){const n=s.editorValue;if(n!=null&&n!==ae)return n}const r=s.pendingValue;if(r!==ae)return r}getCellDataValue(e){const t=this.model.getCellEditWithSibling(e.rowNode,e.column);if(t){const i=t.pendingValue;if(i!==ae)return i;const o=t.sourceValue;if(o!=null)return o}return this.valueSvc.getValueFromData(e.column,e.rowNode)}addStopEditingWhenGridLosesFocus(e){FI(this,this.beans,e)}createPopupEditorWrapper(e){return new s8(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:i,sourceValue:o,state:s}=t;return i===o||s==="editing"?!1:(this.dispatchEditValuesChanged(e.rowNode,e.column,{...t,pendingValue:o}),this.model.removeEdits(e),q(this.beans,e)?.refreshCell(Tt),!0)}setDataValue(e,t,i){try{const o=this.batch,s=this.isEditing(o?void 0:e);if((!s||this.committing)&&!o&&!g8.has(i)||!s&&!o&&i==="paste"||i==="batch"&&!o)return;if(i==="edit"){if(s&&this.applyEditorValue(e,t))return!0;if(!o)return}if(this.strategy??(this.strategy=this.createStrategy()),i==="batch"||i==="edit")return this.applyDirectValue(e,t,i);const r=this.beans;let n;if(o?n="ui":this.committing?n=i??"api":n="api",!i||c8.has(i))return this.applyDirectValue(e,t,i);const l=this.applyExistingEdit(e,t,i,n);return l!==void 0?l:(Vo(r,e,t,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:n,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,i,o){const s=this.model.getEdit(e);if(s)return s.pendingValue===t?!1:s.sourceValue!==t?(Vo(this.beans,e,t,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0):(this.model.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e.rowNode,e.column,{...s,pendingValue:t}),!0)}applyEditorValue(e,t){const i=this.beans,o=q(i,e),s=o?.comp?.getCellEditor();return!o||!s?!1:(Vo(i,e,t,{persist:!0}),Fd(i,o),"agSetEditValue"in s?(s.agSetEditValue(t),!0):s.refresh&&o.editCompDetails?(s.refresh({...o.editCompDetails.params,value:t}),!0):(o.hasBrowserFocus()&&this.focusEditorOnAttach(o,!0),Ze(i,e,{silent:!0,cancel:!0}),oi(i,e,{silent:!0}),Mt(i),q(i,e)?.refreshCell(Tt),!0))}applyDirectValue(e,t,i){const o=this.beans;if(this.batch){const n=this.bulkWriteDepth>0;if(i==="batch"&&q(o,e)?.comp?.getCellEditor()){const{editModelSvc:l,valueSvc:a}=o,{rowNode:d,column:c}=e;l?.getEdit(e)?.sourceValue===void 0&&l?.setEdit(e,{sourceValue:a.getValueFromData(c,d)}),l?.setEdit(e,{pendingValue:t})}else Vo(o,e,t,{persist:!0}),i!=="batch"&&!n&&this.cleanupEditors();return Rv(o,e),this.ensureBatchStarted(),n?this.bulkWriteTouched.push(e):this.bulkRefreshCell(e),!0}Vo(o,e,t,{persist:!0});const s=q(o,e),r=this.setNodeDataValue(e.rowNode,e.column,t,s,i);return this.syncEditAfterCommit(e,r),Rv(o,e),q(o,e)?.refreshCell(r?f8:Tt),r}handleColDefChanged(e){VI(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:i}=this;if(!this.batch||!i.hasRowEdits(e.rowNode,!0))return;const{rowNode:s}=e,{compDetails:r,valueToDisplay:n}=t;if(r){const{params:l}=r;return l.data=i.getEditRowDataValue(s),{compDetails:r}}return{valueToDisplay:n}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,i,o){this.strategy?.dispatchCellEvent(e,t,i,o)}dispatchBatchEvent(e,t){const i=G(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}});this.eventSvc.dispatchEvent(i)}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},i){if(!i||i.length===0)return;const{beans:o}=this,{formula:s}=o;si(o,{persist:!0});const r=this.model.getEditMapCopy(),n=r.get(e)?.get(t)?.pendingValue;let l=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),l=!0);const a=s?.isFormula(n)??!1;let d={value:n};for(let u=0,h=i.length;u<h;++u)d=this.applyBulkEditToRange(i[u],r,a,d);if(this.setEditMap(r),this.batch)this.cleanupEditors(),yd(o),this.ensureBatchStarted();else{this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,l&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}}const c=q(o,{rowNode:e,column:t});c&&c.focusCell({forceBrowserFocus:!0})}applyBulkEditToRange(e,t,i,o){const{beans:s,rangeSvc:r}=this,{formula:n}=s,l=e.columns,a=i&&l.some(h=>h?.allowFormula);let{value:d,lastRowNode:c}=o,u=!0;return r?.forEachRowInRange(e,h=>{const g=Re(s,h);if(g===void 0)return;const p=c?.rowIndex;let f=c?1:0;a&&c&&(!u||p!=null&&g.rowPinned===c.rowPinned&&g.rowIndex===p+1)&&(f=m8(c,g));const m=f===0?d:n?.updateFormulaByOffset({value:d,rowDelta:f});this.applyBulkEditToRow(g,l,t,m,i),u=!1,a&&(d=m,c=g)}),{value:d,lastRowNode:c}}applyBulkEditToRow(e,t,i,o,s){const{beans:r,valueSvc:n}=this,{formula:l}=r,a=i.get(e)??new Map;let d=o;for(const c of t)if(c){if(this.isCellEditable({rowNode:e,column:c},"api")){const u=n.getValueFromData(c,e,!0);let h=n.parseValue(c,e,d,u);Number.isNaN(h)&&(h=null),a.set(c,{editorValue:void 0,pendingValue:h,sourceValue:u,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}s&&c.allowFormula&&(d=l?.updateFormulaByOffset({value:d,columnDelta:1}))}a.size>0&&i.set(e,a)}applyCellEditStyles(e){Fd(this.beans,e)}applyRowEditStyles(e){a8(this.beans,e)}setEditingCells(e,t){const{beans:i}=this,{colModel:o,valueSvc:s}=i,r=new Map;for(let{colId:n,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h}of e){const g=n?o.colsById[n]:a?o.getCol(a):l;if(!g)continue;const p=Re(i,{rowIndex:d,rowPinned:c});if(!p)continue;const f=s.getValueFromData(g,p,!0);if(!t?.forceRefreshOfEditCellsOnly&&!Be({pendingValue:u,sourceValue:f})&&h!=="editing")continue;let m=r.get(p);m||(m=new Map,r.set(p,m)),u===void 0&&(u=ae),m.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){const t=q(this.beans,e);if(!t||!this.isEditing(t,Md))return;const i=this.model.getEdit(t);if(!i||!Be(i))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return q(this.beans,e)}};function Gv(e,t){return t??e.get("editType")??"singleCell"}var Nv=(e,t,i)=>{let o=e.get(t);return o||(o=new Set,e.set(t,o)),o.has(i)?!1:(o.add(i),!0)},_v=(e,t,i,o,s,r)=>{if(r&&!Nv(r,t,i))return;const n=q(e,{rowNode:t,column:i});n&&(n.refreshCell(o),!o.force&&s&&Fd(e,n))};import{KeyCode as zv}from"ag-stack";var Wv=class extends y{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const i=e.previousParams,{editSvc:o,beans:s}=this,r=e.type==="cellFocused"?e.sourceEvent:null;i&&(t=q(s,i));const{gos:n,editModelSvc:l}=s,a=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:Re(s,{rowIndex:c,rowPinned:u})},g=n.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!l?.getCellValidationModel().hasCellValidation(h),m=p&&f;!(i||a)||o.stopEditing(void 0,{cancel:m,source:a&&p?"api":void 0,event:r})||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e,t){const i=this.editSvc.isBatchEditing()&&!e;for(const o of this.model.getEditPositions())Ze(this.beans,o,{cancel:!0},q(this.beans,o),t),this.model.stop(o,i,!0);return!0}stopCommitted(e,t,i){const o=this.model.getEditPositions(),s={all:[],pass:[],fail:[]};for(const l of o)s.all.push(l),(this.model.getCellValidationModel().getCellValidation(l)?.errorMessages?.length??0)>0?s.fail.push(l):s.pass.push(l);const r=this.processValidationResults(s),n=this.editSvc.isBatchEditing()&&!t;for(const l of r.destroy)Ze(this.beans,l,{event:e},q(this.beans,l),i),this.model.stop(l,n,!1);for(const l of r.keep){const a=q(this.beans,l);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t,i){si(this.beans,{persist:!1},i);const o=this.model.getEditPositions(),s=[];if(e)for(const r of o)r.rowNode!==e&&s.push(r);else for(const r of o)s.push(r);Pr(this.beans,s,{},i),yd(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}focusFirstInvalidCell(e,t){const i=v8(this.beans,this.model,e.rowNode)??e;i.focusCell({forceBrowserFocus:!0,sourceEvent:t}),i.isCellEditable()&&this.setFocusInOnEditor(i)}setFocusInOnEditor(e){const i=e.comp?.getCellEditor();if(i?.focusIn)i.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell({forceBrowserFocus:o}),this.editSvc.focusEditorOnAttach(e,!1)}}setupEditors(e){const{event:t,ignoreEventKey:i=!1,startedEdit:o,position:s,cells:r=this.model.getEditPositions()}=e,n=t instanceof KeyboardEvent&&!i&&t.key||void 0;II(this.beans,r,s,n,t,o)}dispatchCellEvent(e,t,i,o){const{beans:s}=this,r=q(s,e),n=r?r.value:s.valueSvc.getDisplayValue(e.column,e.rowNode,"edit",!1);this.eventSvc.dispatchEvent({..._m(s,t??null,i,e,n),...o})}dispatchRowEvent(e,t,i){if(i)return;const o=ii(this.beans,e);this.eventSvc.dispatchEvent(o?o.createRowEvent(t):Un(e.rowNode,this.gos,t))}shouldStop(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return o&&i==="api"?!0:o&&(i==="ui"||i==="edit")?!1:i==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===zv.ENTER:null}shouldCancel(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===zv.ESCAPE||o&&i==="api"||i==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const i=[];e.forEach((s,r)=>{s.forEach((n,l)=>{n.state==="editing"&&i.push({...n,rowNode:r,column:l})})});let o=e;if(t?.update){const s=new Map(e);this.model.getEditMap()?.forEach((r,n)=>{s.has(n)||s.set(n,r)}),o=s}if(this.model?.setEditMap(o),i.length>0){const s=i.at(-1),r=s.pendingValue===ae?void 0:s.pendingValue;this.start({position:s,event:new KeyboardEvent("keydown",{key:r}),source:"api"});const n=q(this.beans,s);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},v8=(e,t,i)=>{const o=t.getCellValidationModel().getCellValidationMap().get(i);if(!o)return;const s=e.visibleCols.allCols;let r;for(let l=0,a=s.length;l<a;++l){const d=s[l];if(o.has(d)){r=d;break}}if(!r)return;const n=q(e,{rowNode:i,column:r});return n||(e.navigation?.ensureColumnVisible(r),q(e,{rowNode:i,column:r}))},w8=class extends Wv{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,i="ui"){const{rowNode:o,beans:s}=this,{rowNode:r}=e??{};if(!ii(s,{rowNode:o}))return!0;const l=super.shouldStop({rowNode:o},t,i);return l!==null?l:o?r!==o:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:i,startedEdit:o,event:s,ignoreEventKey:r}=e,{rowNode:n}=t,{beans:l,model:a,startedRows:d}=this;this.rowNode!==n&&super.cleanupEditors(t);const c=l.visibleCols.allCols,u=[],h=[];for(const g of c)g.isCellEditable(n)&&h.push(g);if(h.length!=0){d.has(n)||(this.dispatchRowEvent({rowNode:n},"rowEditingStarted",i),d.add(n));for(const g of h){const p={rowNode:n,column:g};u.push(p),a.start(p)}this.rowNode=n,this.setupEditors({cells:u,position:t,startedEdit:o,event:s,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e,t){const{rowNode:i,model:o}=this;return i&&!o.hasEdits()?!1:(super.stopCancelled(e,t),this.cleanupEditors({rowNode:i},!0,t),this.rowNode=void 0,!0)}stopCommitted(e,t,i){const{rowNode:o,model:s,editSvc:r}=this;if(o&&!s.hasEdits())return!1;const n=[];if(s.getEditMap()?.forEach((l,a)=>{if(!(!l||l.size===0)){for(const d of l.values())if(Be(d)){n.push(a);break}}}),super.stopCommitted(e,t,i),t||!r.isBatchEditing())for(const l of n)this.dispatchRowEvent({rowNode:l},"rowValueChanged");return this.cleanupEditors({rowNode:o},!0,i),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,i=e.previousParams;if(i?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:o,gos:s,model:r}=this;if(o.editSvc?.isRangeSelectionEnabledWhileEditing())return;const n=q(o,i);s.get("invalidEditValueMode")==="block"&&n&&(r.getCellValidationModel().getCellValidation(n)||r.getRowValidationModel().getRowValidation(n))||super.onCellFocusChanged(e)}releaseRows(e){const{startedRows:t}=this;for(const i of e)t.delete(i)&&this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.rowNode===i&&(this.rowNode=void 0)}cleanupEditors(e={},t,i){super.cleanupEditors(e,t,i);const{startedRows:o}=this;for(const s of o)this.dispatchRowEvent({rowNode:s},"rowEditingStopped"),this.destroyEditorsForRow(s,i);o.clear()}destroyEditorsForRow(e,t){const i=ii(this.beans,{rowNode:e});if(!i)return;const o={};for(const s of i.getAllCellCtrls())s.comp?.getCellEditor()&&Ze(this.beans,s,o,s,t)}moveToNextEditingCell(e,t,i,o="ui",s=!1,r){const{beans:n,model:l,gos:a,editSvc:d}=this,c=e.cellPosition;let u;l.suspend(!0);try{u=n.navigation?.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{l.suspend(!1)}if(u===!1)return null;if(u==null)return s?(d.announceFullRowEditValidationErrors(e.rowNode),this.focusFirstInvalidCell(e,i),!0):!1;const h=u.cellPosition,g=e.isCellEditable(),p=u.isCellEditable(),f=c.rowIndex===h?.rowIndex&&c.rowPinned===h.rowPinned;g&&this.setFocusOutOnEditor(e),r=this.restoreEditors(r);const m=a.get("suppressStartEditOnTab");return p&&!s?m?u.focusCell({forceBrowserFocus:!0,sourceEvent:i}):(!u.comp?.getCellEditor()&&!(f&&d.hasPendingEditorAttachValidation(u))&&(r=d.withEditorAttachValidationCache(r,u,()=>oi(n,u,{event:i,cellStartedEdit:!0}))),this.setFocusInOnEditor(u),u.focusCell({sourceEvent:i})):s&&!f?(d.announceFullRowEditValidationErrors(e.rowNode),this.focusFirstInvalidCell(e,i)):(u.focusCell({forceBrowserFocus:!0,sourceEvent:i}),p&&this.setFocusInOnEditor(u)),!f&&!s&&(d.stopEditing({rowNode:e.rowNode},{event:i,forceStop:!0},r),d.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(u,!0,r),m?u.focusCell({forceBrowserFocus:!0,sourceEvent:i}):d.startEditing(u,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:p||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(e){const{beans:t,editSvc:i,model:o}=this;return o.getEditMap()?.forEach((s,r)=>s.forEach(({state:n},l)=>{if(n!=="editing")return;const a=q(t,{rowNode:r,column:l});a&&!a.comp?.getCellEditor()&&(e=i.withEditorAttachValidationCache(e,a,()=>oi(t,a,{silent:!0})))})),e}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},S8=class extends Wv{constructor(){super(...arguments),this.beanName="singleCell"}releaseRows(e){this.rowNode&&e.has(this.rowNode)&&(this.rowNode=void 0,this.column=void 0)}shouldStop(e,t,i="ui"){const o=super.shouldStop(e,t,i);if(o!==null)return o;const s=e?.rowNode,r=e?.column,n=this.rowNode,l=this.column;return(!n||!l)&&s&&r?null:n!==s||l!==r?!0:!n&&!l?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:i,event:o,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:i,event:o,ignoreEventKey:s})}dispatchRowEvent(e,t,i){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e,t){return super.stopCancelled(e,t),this.clearPosition()}stopCommitted(e,t,i){return super.stopCommitted(e,t,i),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:i}=this.beans,{rowIndex:o,column:s,rowPinned:r}=e,n=Re(this.beans,{rowIndex:o,rowPinned:r}),l=Sd(s),a=t.getCol(l),d=e.previousParams;if(d){const c=Sd(d.column);if(d?.rowIndex===o&&c===l&&d?.rowPinned===r)return}e.type=="cellFocused"&&(i?.isRangeSelectionEnabledWhileEditing()||i?.isEditing({rowNode:n,column:a},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,i,o="ui",s=!1,r){const n=this.beans.focusSvc.getFocusedCell();n&&(e=Ut(this.beans,n)??e);const l=e.cellPosition;let a;const d=this.beans.gos.get("editType")==="fullRow";d&&this.model.suspend(!0),s||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:i},r));try{a=this.beans.navigation?.findNextCellToFocusOn(l,{backwards:t,startEditing:!0})}finally{d&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,u=e.isCellEditable(),h=a.isCellEditable(),g=l.rowIndex===c?.rowIndex&&l.rowPinned===c.rowPinned;u&&!s&&this.setFocusOutOnEditor(e);const p=this.gos.get("suppressStartEditOnTab");let f=!1;if(!g&&!s&&(super.cleanupEditors(a,!0,r),p?a.focusCell({forceBrowserFocus:!0,sourceEvent:i}):(f=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:h}))),h&&!s){if(a.focusCell({sourceEvent:i}),p)a.focusCell({forceBrowserFocus:!0,sourceEvent:i});else if(!a.comp?.getCellEditor()){if(!f){const m=this.editSvc?.isEditing(a,{withOpenEditor:!0});oi(this.beans,a,{event:i,cellStartedEdit:!0,silent:m})}this.setFocusInOnEditor(a),this.cleanupEditors(a,void 0,r)}}else s?this.focusFirstInvalidCell(e,i):a.focusCell({forceBrowserFocus:!0,sourceEvent:i});return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},ct={moduleName:"EditCore",version:E,beans:[EI,C8],apiFunctions:{getEditingCells:jI,getEditRowValues:KI,getCellEditorInstances:AI,startEditingCell:YI,stopEditing:ZI,isEditing:QI,validateEdit:JI,getEditValidationErrors:XI},dynamicBeans:{singleCell:S8,fullRow:w8},dependsOn:[Ao,cd],css:[lA]},Uv={moduleName:"UndoRedoEdit",version:E,beans:[nA],apiFunctions:{undoCellEditing:qI,redoCellEditing:$I,getCurrentUndoSize:e8,getCurrentRedoSize:t8},dependsOn:[ct]},qv={moduleName:"TextEditor",version:E,userComponents:{agCellEditor:av,agTextCellEditor:av},dependsOn:[ct]},$v={moduleName:"NumberEditor",version:E,userComponents:{agNumberCellEditor:{classImp:OA}},dependsOn:[ct]},Kv={moduleName:"DateEditor",version:E,userComponents:{agDateCellEditor:xA,agDateStringCellEditor:DA},dependsOn:[ct]},jv={moduleName:"CheckboxEditor",version:E,userComponents:{agCheckboxCellEditor:uA},dependsOn:[ct]},Zv={moduleName:"SelectEditor",version:E,userComponents:{agSelectCellEditor:mI},dependsOn:[ct]},Qv={moduleName:"LargeTextEditor",version:E,userComponents:{agLargeTextCellEditor:IA},dependsOn:[ct]},Yv={moduleName:"CustomEditor",version:E,dependsOn:[ct]};import{KeyCode as ri,_findNextFocusableElement as b8,_focusInto as Jv,_getActiveDomElement as y8,_isElementChildOfClass as R8,_setAriaLabel as E8}from"ag-stack";var Xv={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},x8=new Set(Object.values(Xv));function At(e,t){const i=e.filterUi;if(!i)return null;if(i.created)return i.promise;if(t)return null;const o=i.create(i.refreshed),s=i;return s.created=!0,s.promise=o,o}function Ho(e,t){return t?t.isFilterActive?t.isFilterActive():(e.log.warn(67),!1):!1}function ew(e,t,i,o,s,r,n){return t.refresh?.({...i,model:o,source:r,additionalEventAttributes:n}),e().then(l=>{if(l){const{filter:a,filterParams:d}=l;Td(a,d,o,s,r,n)}})}function Td(e,t,i,o,s,r){e?.refresh?.({...t,model:i,state:o,source:s,additionalEventAttributes:r})}function tw(e,t,i,o){const s=e();s?.created&&s.promise.then(r=>{const n=t();Td(r,s.filterParams,n,i()??{model:n},"ui",o)})}function Ad(e){let t,i=!1,o;const{action:s,filterParams:r,getFilterUi:n,getModel:l,getState:a,updateState:d,updateModel:c,processModelToApply:u}=e;switch(s){case"apply":{const h=a();o=h?.model??null,u&&(o=u(o)),t={state:h?.state,model:o},i=!0;break}case"clear":{t={model:null},r?.buttons?.includes("apply")||(i=!0,o=null);break}case"reset":{t={model:null},i=!0,o=null;break}case"cancel":{t={model:l()};break}}d(t),i?c(o):tw(n,l,a,{fromAction:s})}function se(e,t){return e[t]??null}var F8=new Set(["checkbox","button","submit","reset","image","color","file"]);function P8(e){switch(e.tagName){case"INPUT":return!F8.has(e.type);case"TEXTAREA":case"SELECT":return!0;default:return e.isContentEditable}}var D8=class extends al{wireComp(e,t,i,o,s){this.comp=e;const r=fi(this,s);this.eButtonShowMainFilter=i,this.eFloatingFilterBody=o,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupCalculatedColumnCssClasses(),e.toggleCss("ag-row-number-floating-filter",fe(this.column)),this.setupPosition(),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),_a(r,this.eButtonShowMainFilter,()=>this.toggleParentFilter()),this.setupFilterChangedListener(r);const n=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:n}),r.addManagedEventListeners({columnPinned:({columns:l})=>{l?.includes(this.column)&&this.refreshHeaderStyles()},filterSwitched:({column:l})=>{l===this.column&&n()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.userHeaderClasses?.clear(),this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return G(t.gos,{colDef:i,column:e,floatingFilter:!0})}setupActive(){const e=this.column.colDef,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.eButtonShowMainFilter.firstElementChild)return;const e=X("filter",this.beans,this.column);e&&this.eButtonShowMainFilter.appendChild(e)}setupFocus(e){e.createManagedBean(new so(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();E8(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(y8(t)===this.eGui)return;const s=b8({beans:t,rootNode:this.eGui,backwards:e.shiftKey});if(s){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let i=this.column;do if(i=e?t.getColBefore(i):t.getColAfter(i),!i)break;while(!i.colDef.filter||!i.colDef.floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case ri.UP:case ri.DOWN:case ri.LEFT:case ri.RIGHT:if(t)return;bt(e),P8(e.target)||e.preventDefault();case ri.ENTER:t&&Jv(this.eGui)&&e.preventDefault();break;case ri.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&R8(e.relatedTarget,"ag-floating-filter");if(i&&o&&e.target===this.eGui){const s=this.lastFocusEvent,r=s?.key===ri.TAB;if(s&&r){const n=s.shiftKey;Jv(this.eGui,n)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!ge(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setupCalculatedColumnCssClasses(){this.refreshCalculatedColumnCssClasses()}refreshCalculatedColumnCssClasses(){const e=Jh(this.column,this.beans.calculatedColsSvc);this.userHeaderClasses=eg(this.comp,this.userHeaderClasses,e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}getAnchorElementForMenu(){return this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter}showParentFilter(){const{beans:e,column:t}=this;e.menuSvc?.showFilterMenu({column:t,buttonElement:this.getAnchorElementForMenu(),getButtonElement:()=>Oh(e,t),containerType:"floatingFilter",positionBy:"button"})}toggleParentFilter(){const{beans:e,column:t}=this;return e.menuSvc?.toggleFilterMenu({column:t,buttonElement:this.eButtonShowMainFilter,getButtonElement:()=>Oh(e,t),containerType:"floatingFilter",positionBy:"button"})??"declined"}setupSyncWithFilter(e){if(!this.active)return;const t=this.column;[this.destroySyncListener]=e.addManagedListeners(t,{filterChanged:i=>this.syncWithFilter(i)}),this.beans.colFilter?.isFilterActive(t)&&this.syncWithFilter(null)}syncWithFilter(e){const{beans:{colFilter:t},column:i,gos:o}=this;if(e?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const s=this.comp.getFloatingFilterComp();s&&s.then(r=>{if(r){if(o.get("enableFilterHandlers")){const a=e;let d="filter";a?.afterFloatingFilter?d="ui":a?.afterDataChange?d="dataChanged":e?.source==="api"&&(d="api"),this.updateFloatingFilterParams(this.userCompDetails,d);return}const n=t?.getCurrentFloatingFilterParentModel(i),l=e?{...e,columns:e.columns??[],source:e.source==="api"?"api":"columnFilter"}:null;r.onParentModelChanged(n,l)}})}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive(),this.refreshCalculatedColumnCssClasses();const i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,s=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!s?this.updateCompDetails(e,s,i):r.then(n=>{!n||o?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,i):this.updateFloatingFilterParams(s,"colDef")})}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i?(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)):t&&this.beans.colFilter?.isFilterActive(this.column)&&this.syncWithFilter(null))}updateFloatingFilterParams(e,t){if(!e)return;let i=e.params;this.comp.getFloatingFilterComp()?.then(o=>{typeof o?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(i={...i,model:se(this.beans.colFilter?.model??{},this.column.colId),source:t}),o.refresh(i))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function M8(e,t){const i=e.colModel.getCol(t);if(!i){e.log.error(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:i,positionBy:"auto"})}function T8(e){e.menuSvc?.hidePopupMenu()}import{_isIOSUserAgent as A8,_requestAnimationFrame as I8}from"ag-stack";var Id="ag-has-menu-open",k8=class extends y{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}destroy(){this.setActiveButtonMenu(),super.destroy()}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Ld(this.beans),e,e.containerType,!0)}toggleColumnMenu(e){return this.toggleMenu(this.activeMenuFactory,e,"columnMenu")}toggleFilterMenu(e){return this.toggleMenu(Ld(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,i,o){this.setActiveButtonMenu(),this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i,o)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){Ld(this.beans)?.hideActiveMenu()}toggleMenu(e,t,i,o){if(!e)return"declined";const{activeButtonMenu:s}=this,{buttonElement:r}=t;return s?.menuFactory===e&&s.getButtonElement()===r?(this.setActiveButtonMenu(),e.hideActiveMenu(),"closed"):(this.setActiveButtonMenu(),this.hidePopupMenu(),this.hideFilterMenu(),this.showButtonMenu(e,t,i,{filtersOnly:o,suppressCloseOnEventSource:!0})?"opened":"declined")}showButtonMenu(e,t,i,o){if(!e)return!1;const{getButtonElement:s}=t,r={};let n=t.buttonElement;const l=()=>{if(!n.isConnected){const u=s?.();u?.isConnected&&(n=u,this.activeButtonMenu?.token===r&&n.classList.add(Id))}return n};let a=!1;const d=u=>{a=!0;const h=l();this.activeButtonMenu?.token===r&&this.setActiveButtonMenu(),u instanceof KeyboardEvent&&h.isConnected&&h.focus({preventScroll:!0}),t.onClosedCallback?.()};return!e.showMenuAfterButtonClick(t.column,n,i,d,{...o,getEventSource:l})||a?!1:(this.setActiveButtonMenu({getButtonElement:l,menuFactory:e,token:r}),!0)}setActiveButtonMenu(e){this.activeButtonMenu?.getButtonElement().classList.remove(Id),this.activeButtonMenu=e,e?.getButtonElement().classList.add(Id)}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.colDef;return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(ge(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.colDef.suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){const t=e?.isColumn?e.colDef:e?.getColGroupDef();return!!this.beans.enterpriseMenuFactory&&!t?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(A8()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!ge(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!ge(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return ge(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,i,o){const{positionBy:s,onClosedCallback:r}=t,n=t.column;if(s==="button")this.setActiveButtonMenu(),this.showButtonMenu(e,t,i,{filtersOnly:o,suppressCloseOnEventSource:!0});else if(s==="mouse"){this.setActiveButtonMenu();const{mouseEvent:l,getEventSource:a}=t;e?.showMenuAfterMouseEvent(n,l,i,r,o,a)}else if(n){this.setActiveButtonMenu();const l=this.beans;l.ctrlsSvc.getScrollFeature().ensureColumnVisible(n,"auto"),I8(l,()=>{const d=pi(l,n,o);d&&this.showButtonMenu(e,{column:n,buttonElement:d,getButtonElement:()=>pi(l,n,o),onClosedCallback:r},i,{filtersOnly:o,suppressCloseOnEventSource:!0})})}}};function kd(e,t,i){e.isMenuVisible()!==t&&(e.setMenuVisible(t),e.dispatchColEvent("menuVisibleChanged",i))}function Ld(e){const{enterpriseMenuFactory:t,filterMenuFactory:i,gos:o}=e;return t&&ge(o)?t:i}var iw={moduleName:"SharedMenu",version:E,beans:[k8],apiFunctions:{showColumnMenu:M8,hidePopupMenu:T8}},L8=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-missing-content{-moz-column-gap:var(--ag-spacing);column-gap:var(--ag-spacing);display:flex}.ag-set-filter-item-missing-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.ag-set-filter-item-missing-label{flex:none}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;margin:0 calc(var(--ag-spacing)*-.5);overflow:hidden;padding:0 calc(var(--ag-spacing)*.5);width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:max(200px,100%)}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}",V8=new Set(["agSetColumnFilterHandler","agMultiColumnFilterHandler","agGroupColumnFilterHandler"]);function H8(e,t,i,o){const s={displayHandlerName:e,displayHandler:t,rowHandler:i,init:l=>{t.init?.(l),i.init?.(l)},refresh:l=>{const a=t.refresh?.(l);return i.refresh?.(l)===!1||a===!1?!1:void 0},doesFilterPass:l=>i.doesFilterPass(l),getModelAsString:(l,a)=>t.getModelAsString?.(l,a)??i.getModelAsString?.(l,a)??"",onAnyFilterChanged:()=>{t.onAnyFilterChanged?.(),i.onAnyFilterChanged?.()},onNewRowsLoaded:()=>{t.onNewRowsLoaded?.(),i.onNewRowsLoaded?.()},destroy:()=>{o(t),o(i)}},r=t.processModelToApply?.bind(t),n=i.processModelToApply?.bind(i);return(r||n)&&(s.processModelToApply=l=>{const a=r?r(l):l;return n?n(a):a}),s}var Vd=e=>e&&"displayHandler"in e?e:void 0;function Hd(e){return Vd(e)?.displayHandler??e}function ow(e){return Vd(e)?.rowHandler??e}var B8=e=>Vd(e)?.displayHandlerName;function O8(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function G8(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function N8(e,t){const i=e.colModel.getCol(t);if(i)return e.colFilter?.destroyFilter(i,"api")}function _8(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function z8(e){return e.filterManager?.getFilterModel()??{}}function W8(e,t,i){const{gos:o,colModel:s,colFilter:r}=e;i&&!o.get("enableFilterHandlers")&&(e.log.warn(288),i=!1);const n=s.getCol(t);return n?r?.getLatestModelForColumn(n,i)??null:null}function U8(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()}function q8(e,t){const i=e.colModel.getCol(t);if(!i){e.log.error(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"})}function $8(e){e.menuSvc?.hideFilterMenu()}function K8(e,t){const i=e.colModel.getCol(t);if(!i){e.log.error(12,{colKey:t});return}return ow(e.colFilter?.getHandler(i,!0))}function j8(e,t){const{colId:i,action:o}=t;if(o==="clearPreservedValues"||o==="clearUnselectedPreservedValues"){e.gos.assertModuleRegistered("SetFilter","api.doFilterAction")&&e.setFilterSvc?.clearPreservedValues(i,o==="clearUnselectedPreservedValues");return}if(!e.gos.get("enableFilterHandlers")){e.log.warn(287);return}if(!i)e.colFilter?.updateAllModels(o);else if(typeof i=="string")sw(e,i,o);else for(let s=0,r=i.length;s<r;++s)sw(e,i[s],o)}function sw(e,t,i){const o=e.colModel.colsById[t];o&&e.colFilter?.updateModel(o,i)}import{AgPromise as we,_exists as Tr,_isPromise as Z8,_jsonEquals as Q8,_removeAllFromArray as Y8}from"ag-stack";import{_getLocaleTextFunc as J8}from"ag-stack";import{_getDateParts as Bd,_parseBigIntOrNull as rw}from"ag-stack";import{_getOwn as X8}from"ag-stack";var e7=1,Ar=null,t7=()=>{if(Ar!=null)return Ar;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return Ar=e==null?e7:e%7,Ar},De=e=>(e.setHours(0,0,0,0),e),Od=e=>{const t=e.getDay(),i=t7(),o=(t-i+7)%7;return e.setDate(e.getDate()-o),De(e)},Ir=(e,t=1)=>(e.setDate(e.getDate()-t),e),Oe=e=>(e.setDate(e.getDate()+1),De(e)),i7=e=>(Od(e),e.setDate(e.getDate()+6),Oe(e)),Gd=e=>(e.setDate(1),De(e)),nw=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),De(e)),lw=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Gd(e)},o7=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),nw(e)},aw=e=>(e.setMonth(0,1),De(e)),s7=e=>(e.setMonth(12,0),Oe(e)),Bo=e=>Ir(e),dw=e=>Bo(Od(e)),cw=e=>Bo(Gd(e)),uw=e=>Bo(lw(e)),Nd=(e,t)=>[De(e),Oe(t)],r7=(e,t)=>Nd(Bo(e),Bo(t)),_d=(e,t)=>[Od(e),i7(t)],n7=(e,t)=>_d(dw(e),dw(t)),zd=(e,t)=>[Gd(e),nw(t)],l7=(e,t)=>zd(cw(e),cw(t)),Wd=(e,t)=>[lw(e),o7(t)],a7=(e,t)=>Wd(uw(e),uw(t)),Ud=(e,t)=>[aw(e),s7(t)],d7=(e,t)=>[aw(e),Oe(t)],c7=(e,t)=>[De(Ir(e,7)),Oe(t)],u7=(e,t)=>[De(Ir(e,30)),Oe(t)],h7=(e,t)=>[De(Ir(e,90)),Oe(t)],g7=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[De(e),Oe(t)]),p7=(e,t)=>(e.setFullYear(e.getFullYear()-1),[De(e),Oe(t)]),f7=(e,t)=>(e.setFullYear(e.getFullYear()-2),[De(e),Oe(t)]),m7=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Ud(e,t)),C7=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Ud(e,t)),v7=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),Wd(e,t)),w7=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),zd(e,t)),S7=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),_d(e,t)),b7=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),Nd(e,t)),qd={today:Nd,yesterday:r7,tomorrow:b7,thisWeek:_d,lastWeek:n7,nextWeek:S7,thisMonth:zd,lastMonth:l7,nextMonth:w7,thisQuarter:Wd,lastQuarter:a7,nextQuarter:v7,thisYear:Ud,lastYear:m7,nextYear:C7,yearToDate:d7,last7Days:c7,last30Days:u7,last90Days:h7,last6Months:g7,last12Months:p7,last24Months:f7},hw=Object.keys(qd),gw=class{constructor(){this.ranges=new Map}getRange(e,t){const i=this.ranges,o=Date.now();let s=i.get(e);if(s&&s.expires<=o&&(s=void 0),!s){const[r,n]=t(new Date(o),new Date(o)),l=Oe(new Date(o)).getTime();s={fromTime:r.getTime(),toTime:n.getTime(),expires:l},i.set(e,s)}return s}};function Mi(e,t,i){return G(e,{column:t,colDef:t.getColDef(),source:i})}function Oo(e,t,i,o){return e&&i?s=>e(s,Mi(t,i,o)):void 0}function $d(e){return e<1||Number.isNaN(e)}function y7(e){return typeof e!="number"?null:$d(e)?1:Math.floor(e)}function Go(e,t,i){return i==null?e.splice(t):e.splice(t,i)}function No(e){if(typeof e=="string"){const t=e.codePointAt(0)??0;return t>32&&t<160?!1:!e.trim()}return e==null}function pw(e){return!No(e)}function R7(e){return e==="AND"||e==="OR"?e:"AND"}function E7(e,t,i,o,s){const r=e?.predicate;if(r!=null&&!t.some(n=>n==null))return r(t,i,Mi(o,s,"columnFilter"))}function x7(e,t,i){let o=t.length;return o>i&&(t.splice(i),e.warn(78),o=i),o}var F7=new Set(["empty","notBlank","blank",...hw]),P7=["displayKey","displayName","predicate"],fw={isAnyOf:!0,isNoneOf:!0,true:!0,false:!0};function mw(e,t,i){const o=new Map,s=new Map;for(let r=0,n=e.length;r<n;++r){const l=e[r];if(l!=null)if(typeof l=="string"){if(i&&X8(i,l))continue;o.set(l,o.get(l)??l)}else{const a=P7.filter(c=>l[c]==null);if(a.length){t(a);continue}const d=l.displayKey;o.set(d,l),s.set(d,l)}}return{offered:o,customOptions:s}}function Cw(e,t){const i=String(e.displayKey);return t(i,e.displayName).trim()||i.trim()}function Kd(e){const t=Math.trunc(e.numberOfInputs??1);return t>0?Math.min(t,2):0}function It(e,t){const i=t.getCustomOption(e);return i?Kd(i):e&&F7.has(e)?0:e==="inRange"?2:1}function vw(e,t,i){return e==null||t==null?!1:i?e>t:e>=t}function jd(e,t,i,o){return vw(e,t,o)?e instanceof Date?o?i?"maxDateInclusiveValidation":"minDateInclusiveValidation":i?"maxDateValidation":"minDateValidation":o?i?"maxValueValidation":"minValueValidation":i?"strictMaxValueValidation":"strictMinValueValidation":null}var ww={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Sw=["january","february","march","april","may","june","july","august","september","october","november","december"];function D7(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function M7(e,t){if(e==null)return-1;if(t==null)return 1;const i=rw(e),o=rw(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:String(e).localeCompare(String(t))}function bw(e){return e instanceof Date&&!Number.isNaN(e.getTime())}var yw=new WeakSet;function Zd(e){return yw.add(e),e}var T7=Zd(bw);function A7(e){return typeof e=="function"&&yw.has(e)}var kr=["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}];function I7(e){if(!Array.isArray(e)||e.length!==kr.length)return!1;for(let t=0,i=kr.length;t<i;++t)if(e[t]!==kr[t])return!1;return!0}var Qd={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:[...kr]}),date:()=>({isValidDate:T7}),dateString:({dataTypeDefinition:e})=>({comparator:Zd((t,i)=>{const o=e.dateParser(i);return i==null||o<t?-1:o>t?1:0}),isValidDate:Zd(t=>typeof t=="string"&&bw(e.dateParser(t)))}),dateTime:e=>Qd.date(e),dateTimeString:e=>Qd.dateString(e),object:()=>{},text:()=>{}};function Rw(e,t){return e instanceof Date?Bd(e,t):null}var Yd={number:()=>({comparator:D7}),bigint:()=>({comparator:M7}),boolean:({t:e})=>({valueFormatter:t=>{const i=t.value;return No(i)?e("blanks","(Blanks)"):e(String(i),i?"True":"False")}}),date:({formatValue:e,t})=>({valueFormatter:i=>e(i)||t("blanks","(Blanks)"),treeList:!0,treeListFormatter:(i,o)=>{if(i==="NaN")return t("invalidDate","Invalid Date");if(o===1&&i!=null){const s=Sw[Number(i)-1];return t(s,ww[s])}return i??t("blanks","(Blanks)")},treeListPathGetter:i=>Rw(i,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:i})=>({valueFormatter:o=>e(o)||i("blanks","(Blanks)"),treeList:!0,treeListPathGetter:o=>Bd(t.dateParser(o??void 0),!1),treeListFormatter:(o,s)=>{if(s===1&&o!=null){const r=Sw[Number(o)-1];return i(r,ww[r])}return o??i("blanks","(Blanks)")}}),dateTime:e=>{const t=Yd.date(e);return t.treeListPathGetter=i=>Rw(i),t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,i=Yd.dateString(e);return i.treeListPathGetter=o=>Bd(t(o??void 0)),i},object:({formatValue:e,t})=>({valueFormatter:i=>e(i)||t("blanks","(Blanks)")}),text:()=>{}};function Ew(e,t,i,o,s,r,n){let l=i;const a=e==="agSetColumnFilter",d=o.baseDataType;if(!l&&d==="object"&&!a&&(l=r.dataTypeSvc?.objectFilterValueGetter),typeof t=="function")return{filterParams:t,filterValueGetter:l};const u=(a?Yd:Qd)[d],h=u({dataTypeDefinition:o,formatValue:s,t:n});return{filterParams:typeof t=="object"?{...h,...t}:h,filterValueGetter:l}}var k7={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"};function xw(e){return k7[e??"text"]}function Lr(e,t,i=t.colDef,o=Fw(e,t),s){const r=e.selectableFilter?.getFilterDef(t,i),n=V7(e,L7(e,t,r??i)),l=n.filter,a=typeof l=="object"&&l!=null?l.component:l;let d;a===!0?d=o:typeof a=="string"&&(d=a);const c=n.filterValueGetter||(s?s.filterValueGetter:t.colDef.filterValueGetter),u=d==="agSetColumnFilter"&&c===e.dataTypeSvc?.objectFilterValueGetter?void 0:c;return{def:H7(e,t,n,d,u,!!r),defaultFilter:o,key:d,filterValueGetter:u}}function L7(e,t,i){const o=i.filter;return!ui(o)||e.gos.get("enableFilterHandlers")?i:o.handler||o.doesFilterPass?(e.log.warn(335,{colId:t.getColId()}),{...i,filter:!0}):{...i,filter:o.component}}function V7(e,t){const i=t.filter;return Jd(e,i)?{...t,filter:!0}:typeof i=="object"&&i!=null&&Jd(e,i.component)?{...t,filter:{...i,component:!0}}:t}function Jd(e,t){return typeof t!="string"||e.gos.get("filterHandlers")?.[t]||t==="agSelectableColumnFilter"&&e.selectableFilter?!1:!e.registry.hasUserComponent("filter",t)}function H7(e,t,i,o,s,r){const n=i.filterParams,l=typeof n=="function";if(typeof o!="string"||!(r||l))return i;const a=e.dataTypeSvc,d=a?.getDataTypeDefinition(t),c=t.colDef.cellDataType,u=typeof c=="string"?a?.getFormatValue(c):void 0;if(!d||!u)return i;const h=g=>Dw(e,o,g,s,d,u);return l?{...i,filterParams:g=>h(n(g)).filterParams}:{...i,...h(n)}}function Fw(e,t){return Pw(e,e.dataTypeSvc?.getBaseDataType(t))}function Pw(e,t){return iu(e.gos)?"agSetColumnFilter":xw(t)}function Dw(e,t,i,o,s,r){return t!=="agMultiColumnFilter"?Ew(t,i,o,s,r,e,J8(e.localeSvc)):typeof i=="function"?{filterParams:i}:e.multiFilter?.getParamsForDataType(i,o,s,r)??{}}function B7(e,t){return ui(t)&&!!(t.handler||t.doesFilterPass)&&!e.gos.get("enableFilterHandlers")}function Mw(e,t,i){const o=ui(t)?t.component:t;return o===!0||Jd(e,o)||B7(e,t)?i:typeof o=="string"?o:void 0}function O7(e,t,i,o){const s=Pw(e,i.baseDataType),r=Mw(e,t.filter,s);if(r===void 0)return;const{filterParams:n,filterValueGetter:l}=Dw(e,r,t.filterParams,t.filterValueGetter,i,o);t.filterParams=n,l&&(t.filterValueGetter=l)}import{_getOwn as G7}from"ag-stack";var N7={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},Tw=e=>e===void 0?void 0:G7(N7,e),Aw=()=>({doesFilterPass:()=>!0}),_7={filterHandler:Aw,handlerGenerator:Aw,displayHandlerName:void 0};function Iw(e,t,i,o){if(!e.isPrimary())return!0;const r=!i;return!e.isValueActive()||!r?!1:t?!0:o}function kw(e,t,i){if(!t)return!1;for(let o=0,s=t.length;o<s;++o){const r=t[o];if((i||r.data)&&e(r)||kw(e,r.childrenAfterGroup,i))return!0}return!1}var z7=e=>ui(e)&&!e.handler?e.doesFilterPass:void 0,W7=(e,t)=>ui(e)?e.handler||(t?()=>({doesFilterPass:t}):void 0):typeof e=="string"?e:void 0,Lw=(e,t,i,o)=>{if(!i?.isFilterAllowed())return;const s=i.colId;t.has(s)||(t.add(s),o!=null&&(e[s]=o))},U7=class extends y{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.paramsColDefsVersion=0,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.state=new Map,this.handlerMap={...Xv},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:()=>{this.beans.setFilterSvc?.createPreservingFilters(),this.processFilterModelUpdateQueue()}}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",i){const{colModel:o,dataTypeSvc:s,filterManager:r}=this.beans;if(s?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const n=[],l=this.getModel(!0);if(e){const a=new Set(Object.keys(e));this.allColumnFilters.forEach((d,c)=>{const u=e[c];n.push(this.setModelOnFilterWrapper(d,u)),a.delete(c)}),a.forEach(d=>{const c=o.colsById[d];if(!c){this.warn(62,{colId:d});return}if(!c.isFilterAllowed()){this.warn(63,{colId:d});return}const u=this.getOrCreateFilterWrapper(c,!0);if(!u){this.warn(64,{colId:d});return}n.push(this.setModelOnFilterWrapper(u,e[d],!0))})}else this.model={},this.allColumnFilters.forEach(a=>{n.push(this.setModelOnFilterWrapper(a,null))});we.all(n).then(()=>{const a=this.getModel(!0),d=[];this.allColumnFilters.forEach((c,u)=>{const h=l?l[u]:null,g=a?a[u]:null;Q8(h,g)||d.push(c.column)}),d.length>0?r?.onFilterChanged({columns:d,source:t}):i&&this.updateActive("filterChanged")})}getLatestModel(){return this.modelUpdates.length?this.getQueuedModel():this.getModel()}getModel(e){const t={},{allColumnFilters:i,initialModel:o,beans:{colModel:s}}=this;if(i.forEach((r,n)=>{const l=this.getModelFromFilterWrapper(r);Tr(l)&&(t[n]=l)}),!e)for(const r of Object.keys(o)){const n=o[r];Tr(n)&&!i.has(r)&&s.colsById[r]?.colDef.filter&&(t[r]=n)}return t}getQueuedModel(){const e=this.beans.colModel,t=this.modelUpdates,i={},o=new Set;for(let n=t.length-1;n>=0;--n){const l=t[n];if(l.resolve){Lw(i,o,e.getNonPivotCol(l.key),l.model);continue}const a=l.model;if(!a)return i;const d=e.colsById,c=Object.keys(a);for(let u=0,h=c.length;u<h;++u){const g=c[u];Lw(i,o,d[g],a[g])}return i}const s=this.getModel(),r=Object.keys(s);for(let n=0,l=r.length;n<l;++n){const a=r[n];o.has(a)||(i[a]=s[a])}return i}setState(e,t,i="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const s=t[o];this.state.set(o,{model:se(this.model,o),state:s})}this.setModel(e,i,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let i=!1;return e.forEach((o,s)=>{const r=o.state;r!=null&&(i=!0,t[s]=r)}),i?t:void 0}getModelFromFilterWrapper(e){const i=e.column.getColId();if(e.isHandler)return se(this.model,i);const o=e.filter;return o?typeof o.getModel!="function"?(this.warn(66),null):o.getModel():se(this.initialModel,i)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const e=this.modelUpdates;this.modelUpdates=[];for(let i=0,o=e.length;i<o;++i)e[i].resolve?.();const{allColumnFilters:t}=this;return t.size?(t.forEach(i=>this.disposeFilterWrapper(i,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=this.beans,{colModel:t,gos:i}=e,o=!!Vi(i),s=[],r=[],n=(a,d,c)=>{d&&(Iw(a,t.pivotMode,t.isPivotActive(),o)?s.push(c):r.push(c))},l=[];return this.allColumnFilters.forEach(a=>{const d=a.column,c=d.getColId();if(a.isHandler)l.push(we.resolve().then(()=>{n(d,this.isHandlerActive(d),{colId:c,isHandler:!0,handler:a.handler,handlerParams:a.handlerParams})}));else{const u=At(a);u&&l.push(u.then(h=>{n(d,Ho(e,h),{colId:c,isHandler:!1,comp:h})}))}}),we.all(l).then(()=>{this.activeAggregateFilters=s,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const i=[];return this.allColumnFilters.forEach(o=>{const s=o.column;if(o.isHandler)i.push(we.resolve().then(()=>{this.setColFilterActive(s,this.isHandlerActive(s),e,t)}));else{const r=At(o);r&&i.push(r.then(n=>{this.setColFilterActive(s,Ho(this.beans,n),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),we.all(i)}doFiltersPass(e,t,i){const{data:o,aggData:s}=e,r=i?this.activeAggregateFilters:this.activeColumnFilters,n=i?s:o,l=this.model;for(let a=0;a<r.length;a++){const d=r[a],{colId:c,isHandler:u}=d;if(c!==t)if(u){const{handler:h,handlerParams:g}=d;if(!h.doesFilterPass({node:e,data:n,model:se(l,c),handlerParams:g}))return!1}else{const h=d.comp;if(typeof h.doesFilterPass!="function"){this.error(91);continue}if(!h.doesFilterPass({node:e,data:n}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:i}=this.beans,o=()=>{this.isAlive()&&i?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:i}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(s=>{const{column:r,isHandler:n}=s;o!==r.getColId()&&(n&&s.handler.onAnyFilterChanged?.(),At(s,n)?.then(l=>{typeof l?.onAnyFilterChanged=="function"&&l.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(i=>{const o=i.isHandler;o&&i.handler.onNewRowsLoaded?.();const s=At(i,o);s&&t.push(s.then(r=>{r.onNewRowsLoaded?.()}))}),we.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e){const{filterValueSvc:t,colModel:i}=this.beans;return(o,s)=>{const r=s?i.getCol(s):e;return r?t.getValue(r,o):void 0}}createHandlerGetValue(e,t){const{filterValueSvc:i,colModel:o}=this.beans;return(s,r)=>{const n=r?o.getCol(r):e;return n===e?i.getValueWithGetter(e,s,t):n?i.getValue(n,s):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const i=t?.filter;return i?Ho(this.beans,i):se(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=Tr(se(this.model,e.getColId()));if(t)return t;const i=this.beans.groupFilter;return i?.isGroupFilter(e)?i.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?At(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const i=At(t);return i?i.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const i=this.getOrCreateFilterWrapper(e,t);return i?.isHandler?i.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let i=this.cachedFilter(e);return!i&&t&&(i=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}createFilterComp(e,t,i,o,s){const r=()=>{const a=this.createFilterCompParams(e,o,s),d=i(a,o);return $u(this.beans.userCompFactory,t.def,d,t.defaultFilter)},n=r();return n?{compDetails:n,createFilterUi:a=>(a?r():n).newAgStackInstance()}:null}createFilterInstance(e,t,i){const{handler:o,handlerParams:s,handlerGenerator:r}=this.createHandler(e,t)??{},n=this.createFilterComp(e,t,i,!!o,"init");if(!n)return{compDetails:null,createFilterUi:null,handler:o,handlerGenerator:r,handlerParams:s};const{compDetails:l,createFilterUi:a}=n;return this.isGlobalButtons&&(l.params?.buttons?.length||this.warn(281,{colId:e.getColId()})),{compDetails:l,handler:o,handlerGenerator:r,handlerParams:s,createFilterUi:a}}createDoesRowPassOtherFilter(e,t){const i=this.beans,o=i.filterManager,s=e.getColId(),r=n=>(!o||o.doesRowPassFilter(n,s))&&(!t||t(n));return n=>{const l=n;if(r(l))return!0;if(!i.groupStage?.treeData)return!1;const a=!this.gos.get("excludeChildrenWhenTreeDataFiltering");if(a){for(let d=l.parent;d&&d.level>=0;d=d.parent)if(r(d))return!0}return kw(r,l.childrenAfterGroup,a)}}createBaseFilterParams(e,t){return G(this.gos,{column:e,colDef:e.colDef,getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:this.createDoesRowPassOtherFilter(e,void 0),rowModel:this.beans.rowModel})}createFilterCompParams(e,t,i,o){const s=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,o);if(r.filterChangedCallback=s,r.filterModifiedCallback=o?()=>{}:n=>this.filterModified(e,n),t){const n=r,l=e.getColId(),a=se(this.model,l);n.model=a,n.state=this.state.get(l)??{model:a},n.onModelChange=this.createOnModelChange(e,"ui"),n.onStateChange=d=>{this.updateState(e,d),this.updateOrRefreshFilterUi(e)},n.onAction=(d,c,u)=>{this.updateModel(e,d,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:d,event:u})},n.getHandler=()=>Hd(this.getHandler(e,!0)),n.onUiChange=d=>this.filterUiChanged(e,d),n.source=i}return r}createFilterUiForHandler(e,t,i){return t?{created:!1,refreshed:i,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,i){const o=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(i),s}createFilterWrapper(e){const{compDetails:t,handler:i,handlerGenerator:o,handlerParams:s,createFilterUi:r}=this.createFilterInstance(e,Lr(this.beans,e),l=>l),n=e.getColId();if(i)return delete this.initialModel[n],i.init?.({...s,source:"init",model:se(this.model,n)}),{column:e,isHandler:!0,handler:i,handlerGenerator:o,handlerParams:s,filterUi:this.createFilterUiForHandler(t,r)};if(r){const l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,r,a=>{l.filter=a??void 0,delete this.initialModel[n]}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t){const i=this.gos,o=i.get("enableFilterHandlers"),s=t.def.filter,r=o?z7(s):void 0,n=o?W7(s,r):void 0,a=this.handlerMap[t.key];let d,c;if(typeof n!="string"?d=n:(d=i.get("filterHandlers")?.[n],d==null&&x8.has(n)&&(c=n)),d||(c??(c=a),c&&(d=this.createProvidedHandlerFunc(c))),!d)return this.getMissingHandlerFunc(e,o);const u=r??c??d;return n&&a&&a!==c&&V8.has(a)?{filterHandler:this.pairWithDisplayHandler(a,d),handlerGenerator:u,displayHandlerName:a}:{filterHandler:d,handlerGenerator:u,displayHandlerName:void 0}}createProvidedHandlerFunc(e){return()=>this.createBean(this.beans.registry.createDynamicBean(e,!0))}getMissingHandlerFunc(e,t){if(t)return ie(this.gos)&&this.warn(277,{colId:e.getColId()}),_7}pairWithDisplayHandler(e,t){const i=this.createProvidedHandlerFunc(e);return o=>H8(e,i(o),t(o),s=>this.destroyBean(s))}createHandler(e,t){const i=this.createHandlerFunc(e,t);if(!i)return;const o=this.createHandlerFilterParams(e,t.def,"init");return{...this.createHandlerFromFunc(e,t,i.filterHandler,o),handlerGenerator:i.handlerGenerator}}createHandlerParamsForDef(e,t){const i=this.createHandlerFilterParams(e,t.def,"colDef");return this.createHandlerParams(e,t,i)}resolveFilterParams(e,t){const i=t.filterParams;return typeof i=="function"?i(this.createFilterCompParams(e,!!this.gos.get("enableFilterHandlers"),"init")):i}createHandlerFilterParams(e,t,i){return as(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,i))}createHandlerFromFunc(e,t,i,o){const s=e.getColDef(),r=i(G(this.gos,{column:e,colDef:s})),n=this.createHandlerParams(e,t,o);return{handler:r,handlerParams:n}}createHandlerParams(e,t,i){const o=e.getColDef(),s=t.filterValueGetter;return G(this.gos,{colDef:o,column:e,filterValueGetter:s,getValue:this.createHandlerGetValue(e,s),doesRowPassOtherFilter:this.createDoesRowPassOtherFilter(e,void 0),onModelChange:this.createOnModelChange(e,"handler"),onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:i})}onColumnsChanged(){const e=[],t=[],{filterManager:i,groupFilter:o}=this.beans;this.allColumnFilters.forEach(n=>{this.isCurrentColumn(n.column)||(e.push(n.column),t.push(this.disposeFilterWrapper(n,"columnChanged")))});const s=o&&e.every(n=>o.isGroupFilter(n));e.length>0&&!s&&i?.onFilterChanged({columns:e,source:"api"});const r=this.beans.setFilterSvc;r&&we.all(t).then(()=>{this.isAlive()&&r.createPreservingFilters()})}hasFilter(e){return this.allColumnFilters.has(e.getColId())}isCurrentColumn(e){const t=this.beans.colModel,i=e.getColId();return(e.primary?t.getNonPivotColById(i):t.colsById[i])===e}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const i=this.beans.groupFilter;return i?.isGroupFilter(e)?i.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const i=this.beans,{userCompFactory:o,gos:s}=i,r=g=>{this.getOrCreateFilterUi(e)?.then(f=>{g(je(f))})},n=e.getColDef(),l=Lr(i,e),a=l.def,d=Tw(l.key)??"agReadOnlyFloatingFilter",c=s.get("enableFilterHandlers"),u=as(o,a,this.createFilterCompParams(e,c,"init",!0)),h=G(s,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(c){const g=h;g.onUiChange=p=>this.floatingFilterUiChanged(e,p),g.model=se(this.model,e.getColId()),g.onModelChange=this.createOnModelChange(e,"floating"),g.getHandler=()=>Hd(this.getHandler(e,!0)),g.source="init"}return Ku(o,n,h,d)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,i,o){const s="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const n=e.filterUi,l=this.createFilterUiForHandler(i,o,!0);e.filterUi=l;const a=this.eventSvc;n?.created?n.promise.then(d=>{this.destroyBean(d),a.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):a.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const i=e.getColId(),o=this.allColumnFilters.get(i);delete this.initialModel[i],o&&this.disposeFilterWrapper(o,t).then(s=>{this.isAlive()&&(s&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"}),this.beans.setFilterSvc?.createPreservingFilters(e))})}disposeFilterWrapper(e,t){let i=!1;const{column:o,isHandler:s,filterUi:r}=e,n=o.getColId();s&&(i=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[n],this.state.delete(n));const l=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(n),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(r){if(r.created)return r.promise.then(a=>(i=s?i:Ho(this.beans,a),this.destroyBean(a),l(),i));l()}return we.resolve(i)}createOnModelChange(e,t){const i=e.getColId(),o=this.filterChangedCallbackFactory(e);return(s,r)=>{this.updateStoredModel(i,s),this.refreshHandlerAndUi(e,s,t,t==="floating",r).then(()=>o({...r,source:"columnFilter"}))}}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}refreshOrRecreateHandler(e,t,i,o,s){const r=e.column,n=r.getColId(),l=i.handlerGenerator,a=se(this.model,n);let d=e.handlerGenerator!=l||B8(e.handler)!==i.displayHandlerName;if(!d){const g=this.createHandlerParams(r,t,o);e.handlerParams=g,d=e.handler.refresh?.({...g,source:"colDef",model:a})===!1}if(!d)return!1;const c=e.handler,{handler:u,handlerParams:h}=this.createHandlerFromFunc(r,t,i.filterHandler,o);return e.handler=u,e.handlerParams=h,e.handlerGenerator=l,delete this.model[n],this.state.delete(n),u.init?.({...h,source:"init",model:null}),this.destroyBean(c),a!=null&&this.beans.filterManager?.onFilterChanged({columns:[r],source:s}),!0}hasRedefinedFilters(){return this.paramsColDefsVersion!==this.beans.colModel.colDefsVersion}refreshRedefinedFilters(){const e=this.beans.colModel.colDefsVersion;e!==this.paramsColDefsVersion&&(this.allColumnFilters.forEach((t,i)=>{t.column.takeFilterRedefined()&&this.filterParamsChanged(i)}),this.paramsColDefsVersion=e)}filterParamsChanged(e,t="api"){const i=this.allColumnFilters.get(e);if(!i)return;const o=this.beans,s=i.column,r=s.isFilterAllowed(),n=Lr(o,s),l=r?this.createHandlerFunc(s,n):void 0,a=!!l,d=i.isHandler;if(d!=a){this.destroyFilter(s,"paramsUpdated");return}const{compDetails:c,createFilterUi:u}=(r?this.createFilterComp(s,n,f=>f,a,"colDef"):null)??{compDetails:null,createFilterUi:null},h=c?.params??as(o.userCompFactory,n.def,this.createFilterCompParams(s,a,"colDef"));let g=!1;d&&(g=this.refreshOrRecreateHandler(i,n,l,h,t));const p=i.filterUi;if(d&&p&&c&&!p.created){i.filterUi=this.createFilterUiForHandler(c,u,g);return}if(g||this.areFilterCompsDifferent(p?.compDetails??null,c)||!p||!c){this.destroyFilterUi(i,s,c,u);return}p.filterParams=h,At(i,d)?.then(f=>{(f?.refresh?f.refresh(h):!0)===!1?this.destroyFilterUi(i,s,c,u):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:h})})}refreshHandlerAndUi(e,t,i,o,s){const r=this.cachedFilter(e);if(!r)return o&&this.getOrCreateFilterWrapper(e,!0),we.resolve();if(!r.isHandler)return we.resolve();const{filterUi:n,handler:l,handlerParams:a}=r,d=e.getColId(),c=this.state.get(d);return ew(()=>{if(n&&this.state.get(d)===c){const{created:u,filterParams:h}=n;if(u)return n.promise.then(g=>g?{filter:g,filterParams:h}:void 0);n.refreshed=!0}return we.resolve(void 0)},l,a,t,c??{model:t},i,s)}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),e.takeFilterRedefined()}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:o}=t;return!(i===o||i?.render&&o?.render&&i.render===o.render)}hasFloatingFilters(){return this.beans.colModel.colsList.some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getCol(e);if(!t)return Promise.resolve(void 0);const i=this.getOrCreateFilterUi(t);return i?new Promise(o=>{i.then(s=>{o(je(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){const e=this.modelUpdates;this.modelUpdates=[];for(let t=0,i=e.length;t<i;++t){const o=e[t];o.resolve?this.setModelForColumn(o.key,o.model).then(o.resolve):this.setModel(o.model,o.source)}}getLatestModelForColumn(e,t){const i=this.modelUpdates;if(i.length&&e.isFilterAllowed()){const o=this.beans.colModel;for(let s=i.length-1;s>=0;--s){const r=i[s];if(!r.resolve)return r.model?.[e.colId]??null;if(o.getNonPivotCol(r.key)===e)return r.model??null}}return this.getModelForColumn(e,t)}getModelForColumn(e,t){if(t){const{state:o,model:s}=this,r=e.getColId(),n=o.get(r);return n?n.model??null:se(s,r)}const i=this.cachedFilter(e);return i?this.getModelFromFilterWrapper(i):null}setModelForColumn(e,t){return this.beans.dataTypeSvc?.isPendingInference?new Promise(i=>{this.modelUpdates.push({key:e,model:t,resolve:i})}):new Promise(i=>{this.setModelForColumnLegacy(e,t).then(o=>i(o))})}getStateForColumn(e){return this.state.get(e)??{model:se(this.model,e)}}setModelForColumnLegacy(e,t){const i=this.beans.colModel.getNonPivotCol(e),o=i?this.getOrCreateFilterWrapper(i,!0):null;return o?this.setModelOnFilterWrapper(o,t):we.resolve()}setColDefPropsForDataType(e,t,i){O7(this.beans,e,t,i)}setColFilterActive(e,t,i,o){e.isFilterActive()!==t&&(e.setFilterActive(t),e.dispatchColEvent("filterActiveChanged",i)),e.dispatchColEvent("filterChanged",i,o)}setModelOnFilterWrapper(e,t,i){return new we(o=>{if(e.isHandler){const r=e.column,n=r.getColId(),l=this.model[n];if(this.updateStoredModel(n,t),i&&t===l){o();return}this.refreshHandlerAndUi(r,t,"api").then(()=>o());return}const s=At(e);if(s){s.then(r=>this.setModelOnFilterComp(r,t,o));return}o()})}setModelOnFilterComp(e,t,i){if(typeof e?.setModel!="function"){this.warn(65),i();return}const o=e.setModel(t);o!=null&&Z8(o)?o.then(()=>i()):i()}updateStoredModel(e,t){Tr(t)?this.model[e]=t:delete this.model[e];const i=this.state.get(e),o={model:t,state:i?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,i){const o=e.getColId(),s=this.cachedFilter(e),r=()=>s?.filterUi;Ad({action:t,filterParams:s?.filterUi?.filterParams,getFilterUi:r,getModel:()=>se(this.model,o),getState:()=>this.state.get(o),updateState:n=>this.updateState(e,n),updateModel:n=>r()?.filterParams?.onModelChange(n,{...i,fromAction:t}),processModelToApply:s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0})}updateAllModels(e,t){const i=[];this.allColumnFilters.forEach((o,s)=>{const r=this.beans.colModel.getNonPivotColById(s);r&&Ad({action:e,filterParams:o.filterUi?.filterParams,getFilterUi:()=>o.filterUi,getModel:()=>se(this.model,s),getState:()=>this.state.get(s),updateState:n=>this.updateState(r,n),updateModel:n=>{this.updateStoredModel(s,n),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),i.push(this.refreshHandlerAndUi(r,n,"ui"))},processModelToApply:o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0})}),i.length&&we.all(i).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();tw(()=>this.cachedFilter(e)?.filterUi,()=>se(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:i}=this;for(const s of i)if(s.source==="COLUMN_MENU")return!1;let o=!1;for(const s of e.keys()){const r=e.get(s);if(r.valid===!1)return!1;(r.model??null)!==se(t,s)&&(o=!0)}return o}hasUnappliedModel(e){const{model:t,state:i}=this;return(i.get(e)?.model??null)!==se(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const i=this.beans.filterPanelSvc;return i?.isActive?!!i.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:i}=this.beans,o=!!Vi(this.gos),s=e.currentValue,r=s?this.activeColumnFilters:this.activeAggregateFilters,n=s?this.activeAggregateFilters:this.activeColumnFilters,l=[];for(const a of r){const d=t.colsById[a.colId],c=s&&!!i?.columns.length;d&&s===Iw(d,s,c,o)&&(n.push(a),l.push(a))}Y8(r,l)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.state.clear(),this.activeFilterComps.clear()}};function q7(e){return!!e.filterManager?.isAnyFilterPresent()}function $7(e,t="api"){e.filterManager?.onFilterChanged({source:t})}import{AgPromise as K7}from"ag-stack";var j7=class extends y{constructor(){super(...arguments),this.beanName="filterManager"}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:this.onPivotColumnsChanged.bind(this),columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:({source:o})=>this.onFilterChanged({source:o??"quickFilter"})});const{gos:i}=this;this.alwaysPassFilter=i.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=i.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,i="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,i)}setFilterModel(e,t="api",i){if(this.beans.stateSvc?.applyInitialFilterState(),this.isAdvFilterEnabled()){i||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getLatestModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Vi(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onPivotColumnsChanged(){this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:i,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):K7.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:o};i&&he(s,i),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Vi(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.pivotMode)&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e,t){return this.alwaysPassFilter?.(e)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(e)||this.externalFilterPresent&&!this.doesExternalFilterPass(e)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(e,t)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(e))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getLatestModel():null}setAdvFilterModel(e,t="api"){this.isAdvFilterEnabled()&&(this.beans.stateSvc?.applyInitialFilterState(),this.advancedFilter.setModelOrDefer(e??null,t))}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){this.warn(68)}mountAdvFilterTopSectionComp(e){this.advancedFilter?.getCtrl().mountTopSectionComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}setColumnFilterModel(e,t){return this.beans.stateSvc?.applyInitialFilterState(),this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}};import{AgTabGuardFeature as Z7,_findTabbableParent as Q7,_isVisible as Y7}from"ag-stack";import{AgPromise as J7,_clearElement as X7,_exists as ek}from"ag-stack";import{KeyCode as Xd,_jsonEquals as tk,_removeFromParent as ik}from"ag-stack";import{KeyCode as ok,_clearElement as sk,_setDisabled as rk}from"ag-stack";function nk(e){return{tag:"div",cls:e}}var ec=class extends K{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(nk(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const i=this.buttons;if(this.buttons=e,i===e)return;const o=this.getGui();sk(o);let s;this.destroyListeners();const r=document.createDocumentFragment(),n=this.className,l=({type:d,label:c})=>{const u=w=>{this.dispatchLocalEvent({type:d,event:w})};["apply","clear","reset","cancel"].includes(d)||this.beans.log.warn(75);const h=d==="apply",p=O({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${d}FilterButton`,cls:`ag-button ag-standard-button ${n}-button${h?" "+n+"-apply-button":""}`,children:c});this.activateTabIndex([p]),h&&(s=p);const f=w=>{w.key===ok.ENTER&&(w.preventDefault(),u(w))},m=this.listeners;p.addEventListener("click",u),m.push(()=>p.removeEventListener("click",u)),p.addEventListener("keydown",f),m.push(()=>p.removeEventListener("keydown",f)),r.append(p)};for(const d of e)l(d);this.eApply=s;const a=this.validationTooltipFeature;if(s&&!a){const d=s;this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.tooltipSvc?.createTooltip({getGui:()=>this.eApply??d,getTooltipComponentDefinition:()=>{},getLocation:()=>"filter",getTooltipShowDelayOverride:()=>1e3}))}else!s&&a&&(this.validationTooltipFeature=this.destroyBean(a));o.append(r)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const i=this.eApply;i&&(rk(i,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},lk={selector:"AG-FILTER-BUTTON",component:ec},Vw=class extends K{constructor(e,t,i,o,s,r){super(),this.column=e,this.wrapper=t,this.eventParent=i,this.updateModel=o,this.isGlobalButtons=s,this.enableGlobalButtonCheck=r,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,i=t,o=i.useForm,s=o?"form":"div";this.setTemplate({tag:s,cls:"ag-filter-wrapper"}),o&&this.addManagedElementListeners(this.getGui(),{submit:r=>{r?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=i,this.resetButtonsPanel(i),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:r,params:n})=>{r===this.column&&this.resetButtonsPanel(n,this.params)},filterStateChanged:({column:r,state:n})=>{r===this.column&&this.eButtons?.updateValidity(n.valid!==!1)},filterAction:({column:r,action:n,event:l})=>{r===this.column&&this.afterAction(n,l)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:r})=>{if(r!==this.isGlobalButtons){this.isGlobalButtons=r;const n=this.params;this.resetButtonsPanel(n,n,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,i){const{buttons:o,readOnly:s}=t??{},{buttons:r,readOnly:n,useForm:l}=e;if(!i&&s===n&&tk(o,r))return;const a=r&&r.length>0&&!e.readOnly&&!this.isGlobalButtons;let d=this.eButtons;if(a){const c=r.map(u=>{const h=`${u}Filter`;return{type:u,label:Te(this,h)}});if(this.applyActive=hi(this.params),!d){d=this.createBean(new ec),this.appendChild(d.getGui());const u=this.column,h=g=>({event:p})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,p)};d?.addManagedListeners(d,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=d}d.updateButtons(c,l)}else this.applyActive=!1,d&&(ik(d.getGui()),this.eButtons=this.destroyBean(d))}close(e){const t=this.hidePopup;if(!t)return;const i=e,o=i?.key;let s;(o===Xd.ENTER||o===Xd.SPACE)&&(s={keyboardEvent:i}),t(s),this.hidePopup=null}afterAction(e,t){const{params:i,applyActive:o}=this,s=i?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),s&&o&&this.close(t);break}case"reset":{s&&o&&this.close();break}case"cancel":{s&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===Xd.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},ak=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",dk={tag:"div",cls:"ag-filter"},Hw=class extends K{constructor(e,t,i){super(dk),this.column=e,this.source=t,this.enableGlobalButtonCheck=i,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??J7.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:i,beans:{colFilter:o}}=this,s=o.getFilterUiForDisplay(t)??null;this.wrapper=s,s?.then(r=>{if(!r)return;const{isHandler:n,comp:l}=r;let a;if(n){const d=!!this.enableGlobalButtonCheck,c=this.createBean(new Vw(t,r,o,o.updateModel.bind(o),d&&o.isGlobalButtons,d));this.comp=c,a=c.getGui()}else this.registerCSS(ak),a=l.getGui(),ek(a)||this.beans.log.warn(69,{guiFromFilter:a});this.appendChild(a),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()}):l.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:i}=e;(t==="api"||t==="paramsUpdated")&&i.getId()===this.column.getId()&&this.beans.colModel.getNonPivotCol(this.column)&&(X7(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},ck=class extends y{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,i,o,s,r){e&&!e.isColumn||this.showPopup({column:e,positionCallback:n=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:i,mouseEvent:t,ePopup:n})},containerType:i,eventSource:t.target,isLegacyMenuEnabled:ge(this.gos),onClosedCallback:o,getEventSource:r})}showMenuAfterButtonClick(e,t,i,o,s){if(e&&!e.isColumn)return!1;let r=-1,n="left";const l=ge(this.gos);!l&&this.gos.get("enableRtl")&&(r=1,n="right");const a=l?void 0:4*r,d=l?void 0:4;return this.showPopup({column:e,positionCallback:c=>{this.popupSvc?.positionPopupByComponent({type:i,eventSource:s?.getEventSource?.()??t,ePopup:c,nudgeX:a,nudgeY:d,alignSide:n,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},containerType:i,eventSource:t,isLegacyMenuEnabled:l,onClosedCallback:o,suppressCloseOnEventSource:s?.suppressCloseOnEventSource,getEventSource:s?.getEventSource})}showPopup({column:e,positionCallback:t,containerType:i,eventSource:o,isLegacyMenuEnabled:s,onClosedCallback:r,suppressCloseOnEventSource:n,getEventSource:l}){const a=e?this.createBean(new Hw(e,"COLUMN_MENU")):void 0;if(!a?.hasFilter()||!e)return this.destroyBean(a),this.error(57),!1;const d=a.createManagedBean(new K({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"})),c=d.getGui(),u=a.getGui();c.appendChild(u),d.createManagedBean(new Z7(d,gi)).initialiseTabGuard({focusTrapActive:"native"});let g;const p=()=>a?.afterGuiDetached(),f=l??(o?()=>o:void 0),m=ou(this.gos)?f??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,w=b=>{kd(e,!1,"contextMenu");const x=b instanceof KeyboardEvent?f?.():void 0;x&&Y7(x)&&Q7(x)?.focus({preventScroll:!0}),p(),this.destroyBean(a),this.activeMenu===a&&(this.activeMenu=void 0,this.hidePopup=void 0),this.dispatchVisibleChangedEvent(!1,i,e),r?.(b)},v=this.getLocaleTextFunc(),S=s&&i!=="columnFilter"?v("ariaLabelColumnMenu","Column Menu"):v("ariaLabelColumnFilter","Column Filter"),C=this.popupSvc?.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:w,positionCallback:()=>t(c),anchorToElement:m,eventSourceToIgnore:n?f:void 0,ariaLabel:S});return C?(this.activeMenu=a,this.hidePopup=g=C.hideFunc,a.afterInit().then(()=>{t(c),a.afterGuiAttached({container:i,hidePopup:g})}),kd(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e),!0):(this.destroyBean(a),!1)}dispatchVisibleChangedEvent(e,t,i){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.colDef.menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}};function uk(e,t){const i=[t||void 0,e.calculatedExpression,e.valueGetter||void 0,e.field||void 0],o=i.findIndex(s=>s!==void 0);return{kind:o,source:i[o],readsFormula:o!==0&&o!==1&&!!e.allowFormula}}var hk=class extends y{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t){return this.getValueWithGetter(e,t,this.beans.selectableFilter?.getFilterValueGetter(e.colId)??e.colDef.filterValueGetter)}getValueWithGetter(e,t,i){const o=e.colDef,s=this.beans,r=s.valueSvc;if(i){const l=typeof i=="function",a=s.expressionSvc;if(!l&&!a)return;const d=s.colModel,c={api:s.gridApi,context:s.gridOptions.context,data:t.data,node:t,column:e,colDef:o,getValue:u=>{const h=d.getCol(u);return h?r.getValueFromData(mt(h,t),t):null}};return l?i(c):a.evaluate(i,c)}const n=r.getValueFromData(e,t);if(e.allowFormula){const l=s.formula;if(l?.isFormula(n))return l.resolveValue(e,t)}return n}};import{RefPlaceholder as gk}from"ag-stack";function tc(e,t,i){return`${e.colNames.getDisplayNameForColumn(t,"header",!0)} ${i("ariaFilterInput","Filter Input")}`}var pk={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},fk=class extends K{constructor(){super(pk,[Io]),this.eFloatingFilterText=gk}init(e){if(this.params||this.addManagedListeners(e.column,{headerNameChanged:()=>this.refreshAriaLabel()}),this.params=e,this.eFloatingFilterText.setDisabled(!0),this.refreshAriaLabel(),this.gos.get("enableFilterHandlers")){const t=e,i=t.getHandler();if(i.getModelAsString){const o=i.getModelAsString(t.model);this.eFloatingFilterText.setValue(o)}}}refreshAriaLabel(){this.eFloatingFilterText.setInputAriaLabel(tc(this.beans,this.params.column,this.getLocaleTextFunc()))}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}refresh(e){this.init(e)}};import{_getActiveDomElement as mk}from"ag-stack";var ic=(e,t,i)=>{if(!t)return;const o=t.startsWith("[")&&t.endsWith("]");let s;try{s=new RegExp(o?t:`[${t}]`)}catch{i.log.warn(327,{pattern:t});return}e.addManagedElementListeners(e.getInputElement(),{beforeinput:r=>{const n=r.inputType;if(!n?.startsWith("insert")||n==="insertCompositionText")return;const l=r.data||r.dataTransfer?.getData("text/plain");if(!(!l||!r.cancelable)){for(const a of l)if(!s.test(a)){r.preventDefault();return}}}})};import{AgPromise as Bw,_addOrRemoveAttribute as Ck,_areEqual as vk,_isBrowserFirefox as wk,_isComponent as Ow,_removeFromParent as Gw,_setDisabled as Nw,_setDisplayed as _w}from"ag-stack";var oc=class extends vo{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},Sk={selector:"AG-RADIO-BUTTON",component:oc},sc=class{init(e,t,i){this.configuredOptions=t.filterOptions??i,this.buildOptions(e,i),this.defaultOption=this.getDefaultItem(e,t.defaultOption)}refresh(e,t,i){const o=t.filterOptions??i;this.configuredOptions!==o&&(this.configuredOptions=o,this.buildOptions(e,i)),this.defaultOption=this.getDefaultItem(e,t.defaultOption)}buildOptions(e,t){this.collectUsableOptions(e,this.configuredOptions),this.filterOptions.length||(e.warn(74),this.collectUsableOptions(e,t))}collectUsableOptions(e,t){const{offered:i,customOptions:o}=mw(t,s=>e.warn(72,{keys:s}),fw);this.offeredOptions=i,this.filterOptions=[...i.values()],this.customFilterOptions=o}getDefaultItem(e,t){const i=this.filterOptions[0];if(i!=null){if(t!=null){if(this.hasOption(t))return t;e.warn(326,{defaultOption:t})}return typeof i=="string"?i:i.displayKey}}hasOption(e){return e!=null&&this.offeredOptions.has(e)}getCustomOption(e){return e==null?void 0:this.customFilterOptions.get(e)}},rc=class extends th{constructor(e,t,i){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=i,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.typeListener=()=>{this.refreshInputValidation(),this.onUiChanged()},this.lastUiCompletePosition=null,this.joinOperatorId=0}refreshInputValidation(e){for(let t=0,i=this.getNumConditions();t<i;++t)this.refreshPositionValidation(t,!1,e)}refreshPositionValidation(e,t,i){}conditionNumberOfInputs(e){return It(this.getConditionType(e),this.optionsFactory)}setParams(e){super.setParams(e);const t=new sc;this.optionsFactory=t,t.init(this.beans.log,e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(this.beans.log,e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e),this.refreshInputValidation(),this.updateUiVisibility()}commonUpdateSimpleParams(e){this.setNumConditions(e),this.forEachInput(t=>{t instanceof rt&&t.setAutoComplete(e.browserAutoComplete)}),this.defaultJoinOperator=R7(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),Ck(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.refreshInputValidation(),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{const o=i===0?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionType(e){return this.eTypes[e]?.getValue()??null}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const i=!e.operator,o=!t.operator;if(!i&&o||i&&!o)return!1;let r;if(i){const n=e,l=t;r=this.areSimpleModelsEqual(n,l)}else{const n=e,l=t;r=n.operator===l.operator&&vk(n.conditions,l.conditions,(a,d)=>this.areSimpleModelsEqual(a,d))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Bw.resolve();if(e.operator){const o=e;let s=o.conditions;s==null&&(s=[],this.beans.log.warn(77));const r=x7(this.beans.log,s,this.maxNumConditions),n=this.getNumConditions();r<n?this.removeConditionsForModel(r):r>n&&this.createConditionsUpTo(r);const l=o.operator==="OR";this.eJoinAnds.forEach(a=>a.setValue(!l,!0)),this.eJoinOrs.forEach(a=>a.setValue(l,!0)),s.forEach((a,d)=>{this.eTypes[d].setValue(a.type,!0),this.setConditionIntoUi(a,d)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsForModel(1),this.createConditionsUpTo(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.refreshInputValidation(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Bw.resolve()}setNumConditions(e){let t=Math.floor(e.maxNumConditions??2);$d(t)&&(this.beans.log.warn(79),t=1),this.maxNumConditions=t;let i=Math.floor(e.numAlwaysVisibleConditions??1);$d(i)&&(this.beans.log.warn(80),i=1),i>t&&(this.beans.log.warn(81),i=t),this.numAlwaysVisibleConditions=i}createOption(){const e=this.getGui(),t=this.createManagedBean(new xr);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const i=this.createEValue();this.eConditionBodies.push(i),e.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,s=>this.resetInput(s)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=O({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),i=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,s),this.resetJoinOperatorOr(i,o,s),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const o=this.createManagedBean(new oc);e.push(o);const s="ag-filter-condition-operator";return o.addCss(s),o.addCss(`${s}-${i}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const i of t)e.addOption(i);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){const t=Yu(e)?this.translate(e):this.getLocaleTextFunc()(e,e);return{value:e,text:t}}createCustomListOption(e){const t=e.displayKey;return{value:t,text:Xu(this,this.optionsFactory,t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createConditionsUpTo(this.getNumConditions()+1);else{const i=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<i){const o=this.removeConditionsAndOperators(i+1),s=e+1,r=i-s;r>0&&this.removeConditionsAndOperators(s,r),this.createMissingConditionsAndOperators(),o||(e=i)}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,s)=>{const r=this.isConditionDisabled(s,e);o.setDisabled(r||this.filterListOptions.length<=1),s===1&&(Nw(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((o,s)=>{_w(o,this.isConditionBodyVisible(s))});const i=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!i,!0);for(const o of this.eJoinOrs)o.setValue(i,!0);this.forEachInput((o,s,r,n)=>{this.setElementDisplayed(o,s<n),this.setElementDisabled(o,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){return this.hasInvalidInputs()?!1:(this.removeConditionsForModel(e,t),!0)}removeConditionsForModel(e,t){if(e>=this.getNumConditions())return;const{eTypes:i,eConditionBodies:o,eJoinPanels:s,eJoinAnds:r,eJoinOrs:n}=this;this.removeComponents(i,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const l=Math.max(e-1,0);this.removeElements(s,l,t),this.removeComponents(r,l,t),this.removeComponents(n,l,t)}removeElements(e,t,i){const o=Go(e,t,i);for(const s of o)Gw(s)}removeComponents(e,t,i){const o=Go(e,t,i);for(const s of o)Gw(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const i=this.getInputs(0)[0];i instanceof rt&&this.isConditionBodyVisible(0)?t=i.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}this.onGuiAttached(e),this.refreshInputValidation(!0)}onGuiAttached(e){}shouldKeepInvalidInputState(){return!wk()&&this.hasInvalidInputs()}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,i=-1,o=!1;const s=this.getJoinOperator();for(let n=this.getNumConditions()-1;n>=0;n--)if(this.isConditionUiComplete(n))t===-1&&(t=n,i=n);else{const l=n>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(n-1),a=n<t;if(l||a){const d=this.removeConditionsAndOperators(n,1);o||(o=d),d&&a&&i--}}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(i,s),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:i}=this;this.forEachInput((o,s,r,n)=>{if(!(o instanceof rt))return;const l=s===0&&n>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",a=s===0&&n>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),d=i[r].getValue(),c=eh(this,t,l,d,this.optionsFactory);o.setInputPlaceholder(c),o.setInputAriaLabel(a)})}setElementValue(e,t,i){e instanceof rt&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Ow(e)&&_w(e.getGui(),t)}setElementDisabled(e,t){Ow(e)&&Nw(e.getGui(),t)}attachElementOnChange(e,t){e instanceof rt&&e.onValueChange(t),e instanceof dt&&e.onValueClear(()=>this.onUiCleared())}forEachInput(e){for(let t=0,i=this.getNumConditions();t<i;++t)this.forEachPositionTypeInput(t,this.getConditionType(t),e)}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const o=It(t,this.optionsFactory),s=this.getInputs(e);for(let r=0;r<s.length;r++){const n=s[r];n!=null&&i(n,r,e,o)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){return this.conditionNumberOfInputs(e)>0}isConditionUiComplete(e){if(e>=this.getNumConditions())return!1;const t=this.getConditionType(e);return!(!t||t==="empty"||this.getValues(e).some(i=>i==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){this.isReadOnly()||this.createConditionsUpTo(this.numAlwaysVisibleConditions)}createConditionsUpTo(e){for(let t=this.getNumConditions();t<e;t++)t>0&&this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsForModel(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,i)=>this.resetJoinOperatorAnd(t,i,this.joinOperatorId+i)),this.eJoinOrs.forEach((t,i)=>this.resetJoinOperatorOr(t,i,this.joinOperatorId+i)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.refreshInputValidation(),this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const i=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),i)}resetJoinOperator(e,t,i,o,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,i)=>this.updateJoinOperatorDisabled(t,i);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,s,r)=>{r===t&&this.setElementValue(o,i[s]??null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,o)=>{this.setElementValue(t,i===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.typeListener),this.attachInputsOnChange(t))}attachInputsOnChange(e){this.isReadOnly()||this.forEachPositionInput(e,t=>{this.attachElementOnChange(t,this.listener)})}isInputInvalid(e){return!1}isInputValueSettled(e){return!0}hasInvalidInputs(){for(let e=0,t=this.getNumConditions();e<t;++e)if(this.positionHasInvalidInputs(e,!0))return!0;return!1}positionHasInvalidInputs(e,t){let i=!1;return this.forEachPositionInput(e,(o,s,r,n)=>{i||(i=s<n&&(!t||this.isInputValueSettled(o))&&this.isInputInvalid(o))}),i}canApply(e){return!this.hasInvalidInputs()}isReadOnly(){return!!this.params.readOnly}},zw=class extends rc{constructor(){super(...arguments),this.eValuesFrom=[],this.eValuesTo=[],this.renderedValues=new WeakMap,this.defaultDebounceMs=500}isInputInvalid(e){return!e.getInputElement().validity.valid}refreshPositionValidation(e,t=!1){const[i,o]=this.getInputs(e);i&&o&&this.refreshInputPairValidation(i,o,t,this.conditionNumberOfInputs(e))}createTextInput(){return this.createBean(new dt({clearButton:!0,searchIcon:!0,autoComplete:this.params.browserAutoComplete}))}buildInput(e){const t=this.createInputWidget();return ic(t,this.params.allowedCharPattern,this.beans),t.addCss(`ag-filter-${e}`),t.addCss("ag-filter-filter"),t}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=this.renderedWith;this.renderedWith=e;const i=this.getRenderChange(e,t);i&&this.refreshInputElements(i==="rebuild",t)}destroy(){this.destroyBeans(this.eValuesFrom),this.destroyBeans(this.eValuesTo),super.destroy()}createEValue(){const e=O({tag:"div",cls:"ag-filter-body",role:"presentation"}),t=this.buildInput("from"),i=this.buildInput("to");return this.eValuesFrom.push(t),this.eValuesTo.push(i),e.appendChild(t.getGui()),e.appendChild(i.getGui()),this.attachInputPairListeners(t,i),e}removeEValues(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getInputs(e){const t=this.eValuesFrom;return e>=0&&e<t.length?[t[e],this.eValuesTo[e]]:[null,null]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,r)=>{o<r&&t.push(this.readValue(i))}),t}readValue(e,t){const i=this.getRenderedValue(e);return i?i.value:this.parseText(e.getValue(t),this.params)}setElementValue(e,t,i){const o=t,s=this.getValueFormatter(),r=!i&&s?s(o):t;super.setElementValue(e,r,i);const n=e.getInputElement().value;i||n===""&&o!==null?this.renderedValues.delete(e):this.renderedValues.set(e,{text:n,value:o}),(o===null||r===null)&&e.setCustomValidity("")}getRenderedValue(e){const t=this.renderedValues.get(e);return t?.text===e.getInputElement().value?t:void 0}attachInputPairListeners(e,t){this.attachInputListeners(e,!0),this.attachInputListeners(t,!1)}attachInputListeners(e,t){const i=t?this.eValuesFrom:this.eValuesTo,o=()=>this.refreshPositionValidation(i.indexOf(e),t);e.onValueChange(()=>{this.renderedValues.delete(e),o()}),e.addGuiEventListener("focusin",o)}refreshInputElements(e,t){const i=this.eValuesFrom,o=i.length;if(!o)return;const s=this.eValuesTo;for(let r=0;r<o;++r)this.refreshInputElement(r,"from",e,t),this.refreshInputElement(r,"to",e,t),e&&(this.attachInputPairListeners(i[r],s[r]),this.attachInputsOnChange(r))}refreshInputElement(e,t,i,o){const s=t==="from"?this.eValuesFrom:this.eValuesTo,r=s[e],n=r.getValue(!0),l=this.getRenderedValue(r),a=l?l.value:this.parseText(n,o),d=!l&&n!=null&&n!=="";let c=r,u;if(i&&(u=this.takeCaret(r),c=this.buildInput(t),r.getGui().replaceWith(c.getGui()),this.destroyBean(r),s[e]=c),d&&(c.setValue(n,!0),c.getInputElement().value===n)){this.restoreCaret(c,u);return}this.setElementValue(c,a),this.restoreCaret(c,u)}takeCaret(e){const t=e.getInputElement();if(mk(this.beans)===t)return{start:t.selectionStart,end:t.selectionEnd}}restoreCaret(e,t){if(!t)return;const i=e.getInputElement();i.focus(),t.start!=null&&i.selectionStart!=null&&i.setSelectionRange(t.start,t.end)}},nc=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];import{_parseBigIntOrNull as lc}from"ag-stack";function Vr(e){return e?.allowedCharPattern??null}function Ww(e,t,i,o){return t==null||t.trim()===""?null:e?e(t,Mi(i,o,"columnFilter")):lc(t)}function Uw(e,t){const{filter:i,filterTo:o,type:s}=e??{};return[lc(i),lc(o)].slice(0,It(s,t))}var bk=class extends zw{constructor(){super("bigintFilter",Uw,nc),this.filterType="bigint"}getRenderChange(e,t){if(Vr(e)!==Vr(t))return"rebuild";if(e.bigintParser!==t?.bigintParser||e.bigintFormatter!==t?.bigintFormatter)return"rerender"}parseText(e,t){return Ww(t?.bigintParser,e,this.gos,this.params.column)}getValueFormatter(){return Oo(this.params.bigintFormatter,this.gos,this.params.column,"columnFilter")}createInputWidget(){return this.createTextInput()}refreshInputPairValidation(e,t,i,o){const s=o>=2,r=o>0?this.readValue(e,!0):null,n=s?this.readValue(t,!0):null,l=o>0&&this.isInvalidValue(e,r),a=s&&this.isInvalidValue(t,n),d=i||!s,c=d?e:t,u=d?t:e,h=d?l:a,g=d?a:l;let p="";if(h)p=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(s&&!g){const f=jd(r,n,i,this.params.inRangeInclusive);f&&(p=this.translate(f,[String(u.getValue())]))}c.setCustomValidity(p),g||u.setCustomValidity(""),p.length>0&&this.beans.ariaAnnounce.announceValue(p,"filterValidation")}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=String(o[0])),o.length>1&&(i.filterTo=String(o[1])),i}isInvalidValue(e,t){const i=e.getValue();return i!=null&&String(i).trim()!==""&&t===null}};import{_parseBigIntOrNull as ac}from"ag-stack";var qw=class extends y{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t,this.warnedKeys=new Set}isNullValue(e){return e==null}warnUnexpectedFilterType(e){this.optionsFactory.getCustomOption(e)||this.warnedKeys.has(e)||(this.warnedKeys.add(e),this.warn(76,{filterModelType:e}))}init(e){const t=e.filterParams,i=new sc;this.optionsFactory=i,i.init(this.beans.log,t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(this.createModelFormatter(i,t,e.column)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,i=this.optionsFactory;i.refresh(this.beans.log,t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:i,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:i}=t,o=[];if(i){const n=t;o.push(...n.conditions??[])}else o.push(t);if(!o.length)return!0;const s=i&&i==="OR"?"some":"every",r=this.params.getValue(e.node);return o[s](n=>this.individualConditionPasses(e,n,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{maxNumConditions:i}}=e;if(t==null)return;const o=_n(t);let s=(o?t.conditions:[t])??[];const r=this.filterType;let n=t.filterType!==r;const l=y7(i);l!==null&&s.length>l&&(s=s.slice(0,l),n=!0);const a=[];for(let d=0,c=s.length;d<c;++d){const u=s[d],h=this.toOwnCondition(u,t.filterType);if(h===null){this.params={...e,model:null},e.onModelChange(null);return}h!==u&&(n=!0),a.push(h)}if(s=a,n){let d;s.length===1?d={...s[0],filterType:r}:(d={...t,filterType:r},o&&t.conditions&&(d.conditions=s)),this.params={...e,model:d},e.onModelChange(d)}}toOwnCondition(e,t){const i=this.optionsFactory,o=e.type;if(!i.hasOption(o))return null;const s=this.filterType,r=e.filterType??t;if(r==null||r===s)return e.filterType===s?e:{...e,filterType:s};const n=e,l=It(o,i);if(l===0)return{...e,filterType:s};const a=this.toOwnModelValue(n.filter);if(a===null)return null;if(l===1)return{...e,filterType:s,filter:a};const d=this.toOwnModelValue(n.filterTo);return d===null?null:{...e,filterType:s,filter:a,filterTo:d}}individualConditionPasses(e,t,i){const o=this.optionsFactory,s=this.mapValuesFromModel(t,o),r=o.getCustomOption(t.type),n=E7(r,s,i,this.beans.gos,this.params.column);return n??(this.isNullValue(i)?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e))}},dc=class extends qw{isNullValue(e){return No(e)}evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:i,includeBlanksInGreaterThan:o,includeBlanksInLessThan:s,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(i)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,i){const o=i.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";if(o==="blank")return!1;if(o==="notBlank")return!0;const s=this.comparator(),r=e[0]!=null?s(e[0],t):0;switch(o){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const n=s(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&n<=0:r>0&&n<0}default:return this.warnUnexpectedFilterType(o),!0}}};import{_parseBigIntOrNull as $w}from"ag-stack";var cc={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},yk={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Hr=class extends y{constructor(e,t,i){super(),this.optionsFactory=e,this.filterParams=t,this.column=i}getValueFormatter(){}getModelAsString(e,t){const i=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?Te(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,l=(r.conditions??[]).map(d=>this.getModelAsString(d,t)),a=r.operator==="AND"?"andCondition":"orCondition";return l.join(` ${Te(this,a)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?Te(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):i(e.type,e.type);{const r=e,n=this.optionsFactory.getCustomOption(r.type),l=n?Kd(n):void 0;return n&&l===0?Cw(n,i):this.conditionToString(r,o,r.type==="inRange"||l===2,n?.displayKey,n?.displayName)}}}updateParams(e){const{optionsFactory:t,filterParams:i}=e;this.optionsFactory=t,this.filterParams=i}conditionForToolPanel(e,t,i,o,s,r){let n;const l=this.getTypeKey(e);return l&&(n=Te(this,l)),s&&r&&(n=this.getLocaleTextFunc()(s,r)),n!=null?t?`${n} ${Te(this,"filterSummaryInRangeValues",[i(),o()])}`:`${n} ${i()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.getValueFormatter();return t?t(e??null)??"":String(e)}},Kw=class extends Hr{constructor(){super(...arguments),this.filterTypeKeys=cc}getValueFormatter(){return Oo(this.filterParams.bigintFormatter,this.gos,this.column,"columnFilter")}conditionToString(e,t,i,o,s){const{filter:r,filterTo:n,type:l}=e,a=this.formatValue.bind(this),d=$w(r),c=$w(n);if(t){const u=this.conditionForToolPanel(l,i,()=>a(d),()=>a(c),o,s);if(u!=null)return u}return i?`${a(d)}-${a(c)}`:r!=null?a(d):`${l}`}},Rk=class extends dc{constructor(){super(Uw,nc),this.filterType="bigint"}createModelFormatter(e,t,i){return new Kw(e,t,i)}comparator(){return(e,t)=>{const i=ac(t);return e===i?0:e<i?1:-1}}isValid(e){return ac(e)!==null}toOwnModelValue(e){const t=typeof e!="number"||Number.isSafeInteger(e)?ac(e):null;return t===null?null:String(t)}};import{RefPlaceholder as Ek,_getActiveDomElement as xk}from"ag-stack";var uc=class extends y{constructor(e){super(),this.onInputCreated=e,this.eInput=Ek,this.onValueChanged=()=>{},this.onValueCleared=()=>{}}setupGui(e){const t=this.createManagedBean(new dt({clearButton:!0,onValueClear:()=>this.onValueCleared()}));this.eInput=t,this.onInputCreated?.(t);const i=t.getGui();e.appendChild(i);const o=s=>this.onValueChanged(s);this.addManagedListeners(i,{input:o,keydown:o})}setEditable(e){this.eInput.setDisabled(!e)}isFocused(){return xk(this.beans)===this.eInput.getInputElement()}getValue(){return this.eInput.getValue()}getInputText(){return this.eInput.getInputElement().value}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setValueClearedListener(e){this.onValueCleared=e}setParams({ariaLabel:e,autoComplete:t,placeholder:i}){const{eInput:o}=this;this.setAriaLabel(e),o.setAutoComplete(t),o.setSearchIcon(!!i),o.setInputPlaceholder(i)}setAriaLabel(e){this.eInput.setInputAriaLabel(e)}};import{KeyCode as Fk,RefPlaceholder as Pk,_clearElement as Dk,_debounce as Mk}from"ag-stack";var jw=e=>e==null?null:e.toString().toLowerCase(),hc={contains:(e,t)=>e.includes(t),notContains:(e,t)=>!e.includes(t),equals:(e,t)=>e===t,notEqual:(e,t)=>e!=t,startsWith:(e,t)=>e.startsWith(t),endsWith:(e,t)=>e.endsWith(t)};function Br(e){const t=e?.trim();return t===""?e:t}function Zw(e,t){const{filter:i,filterTo:o,type:s}=e??{};return[i||null,o||null].slice(0,It(s,t))}var Qw=class extends K{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let i;t?i=e.conditions?.[0]:i=e,this.lastType=i?i.type:this.optionsFactory.defaultOption}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const i=e;return this.isTypeEditable(i.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),this.addManagedListeners(e.column,{headerNameChanged:()=>this.refreshAriaLabel()}),t){const i=e;this.onModelUpdated(i.model)}}setParams(e){const t=new sc;this.optionsFactory=t,t.init(this.beans.log,e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(this.createModelFormatter(t,e.filterParams,e.column)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const i=this.optionsFactory.defaultOption;t||(this.lastType=i),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(i);this.setEditable(o)}refresh(e){this.params=e;const t=e,i=this.reactive;if((!i||t.source==="colDef")&&this.updateParams(e),i){const{source:o,model:s}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(this.beans.log,e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&It(e,this.optionsFactory)===1}getAriaLabel(e){return tc(this.beans,e,this.getLocaleTextFunc())}},Tk={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},gc=class extends Qw{constructor(){super(...arguments),this.eFloatingFilterInputContainer=Pk,this.pendingEdit=!1,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Tk)}onModelUpdated(e){const{inputSvc:t}=this;this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),!(t.isFocused()&&this.pendingEdit)&&(t.setValue(this.filterModelFormatter.getModelAsString(e)),this.pendingEdit=!1)}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:i,readOnly:o}=this,{filterPlaceholder:s,column:r,browserAutoComplete:n,filterParams:l}=e,a=this.lastType??this.optionsFactory.defaultOption,d=e.filterParams.filterPlaceholder,c=s===!0?eh(this,d,"filterOoo",a,this.optionsFactory):s||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(r),autoComplete:n??l.browserAutoComplete,placeholder:c}),this.applyActive=hi(l),!o){const u=zn(this.beans.log,l,i),h=Mk(this,this.syncUpWithParentFilter.bind(this),u);let g;t.setValueChangedListener(p=>{this.pendingEdit=!0,g=h(p)}),t.setValueClearedListener(()=>{clearTimeout(g),this.syncUpWithParentFilter()})}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.inputSvc,i=t.getInputText();Dk(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),this.inputSvc.setValue(i,!0)}syncUpWithParentFilter(e){const t=e?.key===Fk.ENTER,i=this.reactive;if(i&&this.params.onUiChange(),this.applyActive&&!t)return;this.pendingEdit=!1;const{inputSvc:o,params:s,lastType:r}=this;let n=o.getValue();if(s.filterParams.trimInput&&(n=Br(n),o.setValue(n,!0)),i){const l=s,a=l.model,d=this.convertValue(n),c=d==null?null:{...a??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:d};l.onModelChange(c,{afterFloatingFilter:!0})}else s.parentFilterInstance(l=>{l?.onFloatingFilterChanged(r||null,n||null)})}convertValue(e){return e||null}refreshAriaLabel(){this.inputSvc.setAriaLabel(this.getAriaLabel(this.params.column))}setEditable(e){this.inputSvc.setEditable(e)}},Ak=class extends gc{constructor(){super(...arguments),this.filterType="bigint",this.defaultOptions=nc}createModelFormatter(e,t,i){return new Kw(e,t,i)}updateParams(e){const t=e.filterParams;Vr(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams,i=Vr(t);return this.allowedCharPattern=i,this.bigintParser=t?.bigintParser,this.createManagedBean(new uc(o=>ic(o,i,this.beans)))}convertValue(e){const{gos:t,params:i}=this;return Ww(this.bigintParser,e,t,i.column)}};import{_isBrowserFirefox as Ik,_parseDateTimeFromString as Yw,_serialiseDate as Jw}from"ag-stack";import{FAST_TEST_TIMINGS as kk,_debounce as Lk,_setAriaInvalid as Vk,_setDisplayed as Hk}from"ag-stack";var Xw=".ag-input-field-input",Bk=kk?0:500,e0=class{constructor(e,t,i,o,s,r){this.context=e,this.eParent=s,this.alive=!0,this.debouncedReport=Lk({isAlive:()=>this.alive},t0,Bk),this.timeoutHandle=null,this.lastValidityMessage=null,wb(t,i,o)?.newAgStackInstance().then(l=>{if(!this.alive){e.destroyBean(l);return}if(this.dateComp=l,!l)return;s.appendChild(l.getGui()),l?.afterGuiAttached?.();const{tempValue:a,disabled:d}=this;a&&l.setDate(a),d!=null&&l.setDisabled?.(d),r?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){Hk(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t="immediate"){const i=this.dateComp?.getGui().querySelector(Xw);if(i&&"setCustomValidity"in i){const o=e.length>0,s=e!==this.lastValidityMessage;this.lastValidityMessage=e,i.setCustomValidity(e),o?t==="immediate"?t0(i):(t==="debounce"||s)&&(this.timeoutHandle=this.debouncedReport(i)):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),Vk(i,o)}}getValidity(){return this.dateComp?.getGui().querySelector(Xw)?.validity}};function t0(e){e.reportValidity()}var pc=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];import{_parseDateTimeFromString as i0}from"ag-stack";function o0(e,t){const{dateFrom:i,dateTo:o,type:s}=e??{};return[i&&i0(i,void 0,!0)||null,o&&i0(o,void 0,!0)||null].slice(0,It(s,t))}var s0=1e3,r0=1/0,Ok=class extends rc{constructor(){super("dateFilter",o0,pc),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=s0,this.maxValidYear=r0,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}onGuiAttached(e){this.dateConditionFromComps[0]?.afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(a,d)=>{const c=e[a];if(c!=null)if(Number.isNaN(Number(c)))this.beans.log.warn(82,{param:a});else return c==null?d:Number(c);return d},i=t("minValidYear",s0),o=t("maxValidYear",r0);this.minValidYear=i,this.maxValidYear=o,i>o&&this.beans.log.warn(83);const{minValidDate:s,maxValidDate:r}=e,n=s instanceof Date?s:Yw(s);this.minValidDate=n;const l=r instanceof Date?r:Yw(r);this.maxValidDate=l,n&&l&&n>l&&this.beans.log.warn(84)}refreshPositionValidation(e,t=!1,i){this.refreshInputPairValidation(e,t,i?"immediate":"debounceIfChanged")}refreshInputPairValidation(e,t,i){const[o,s]=this.getInputs(e);if(!o||!s)return;const r=o.getDate(),n=s.getDate(),a=this.conditionNumberOfInputs(e)>=2?jd(r,n,t,this.params.inRangeInclusive):null,d=a?this.translate(a,[String(t?n:r)]):"",c=Ik()?"immediate":i;(t?o:s).setCustomValidity(d,c),(t?s:o).setCustomValidity("",c),d.length>0&&this.beans.ariaAnnounce.announceValue(d,"filterValidation")}createDateCompWrapper(e,t){const{beans:{userCompFactory:i,context:o,gos:s},params:r}=this,n=t==="from",l=n?this.eConditionPanelsFrom:this.eConditionPanelsTo,a=d=>this.refreshInputPairValidation(l.indexOf(e),n,d);return new e0(o,i,r.colDef,G(s,{onDateChanged:()=>{a("debounce"),this.onUiChanged()},onDateCleared:()=>{a("immediate"),this.onUiCleared()},onFocusIn:()=>a("debounceIfChanged"),filterParams:r,location:"filter"}),e)}destroy(){this.removeDateComps(this.dateConditionFromComps,0),this.removeDateComps(this.dateConditionToComps,0),super.destroy()}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=O({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,o){const s=O({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(s),e.appendChild(s),i.push(this.createDateCompWrapper(s,o))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Go(this.eConditionPanelsFrom,e,t),Go(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){const o=Go(e,t,i);for(const s of o)s.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:i,minValidYear:o,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(i){if(e>i)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}isInputInvalid(e){return!(e.getValidity()?.valid??!0)}isInputValueSettled(e){return e.getDate()!=null}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(i,o,s,r)=>{!t||o>=r||t&&(t=this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={},{params:o,filterType:s,beans:r}=this,n=r.dataTypeSvc,l=this.getValues(e),a=o.includeTime??n?.getDateIncludesTimeFlag(o.colDef.cellDataType)??!0,d=o.useIsoSeparator?"T":" ";return l.length>0&&(i.dateFrom=Jw(l[0],a,d)),l.length>1&&(i.dateTo=Jw(l[1],a,d)),{dateFrom:null,dateTo:null,filterType:s,type:t,...i}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(i)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:i}=this;return e<0||e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,r)=>{o<r&&t.push(i.getDate())}),t}translate(e,t){let i=e;return e==="lessThan"?i="before":e==="greaterThan"&&(i="after"),super.translate(i,t)}};import{_getOwn as Gk}from"ag-stack";import{_dateToFormattedString as Nk,_parseDateTimeFromString as n0}from"ag-stack";var l0=class extends Hr{constructor(){super(...arguments),this.filterTypeKeys=cc}formatValue(e=null){const{dataTypeSvc:t,valueSvc:i}=this.beans,o=this.filterParams.column,s=t?.getDateFormatterFunction(o),r=s?s(e??void 0):e;return i.formatValue(o,null,r)??""}conditionToString(e,t,i,o,s){const{type:r}=e,n=n0(e.dateFrom),l=n0(e.dateTo),a=this.filterParams.inRangeFloatingFilterDateFormat,d=t?this.formatValue.bind(this):h=>Nk(h,a),c=()=>n!==null?d(n):"null",u=()=>l!==null?d(l):"null";if(n==null&&l==null)return Ju(this,r);if(t){const h=this.conditionForToolPanel(r,i,c,u,o,s);if(h!=null)return h}return i?`${c()}-${u()}`:n!=null?d(n):`${r}`}};function _k(e,t){const i=t;return i<e?-1:i>e?1:0}var zk=class extends dc{constructor(){super(o0,pc),this.filterType="date",this.rangeCache=new gw}createModelFormatter(e,t,i){return new l0(e,t,i)}comparator(){return this.params.filterParams.comparator??_k}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}toOwnModelValue(){return null}evaluateNonNullValue(e,t,i){const o=i.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const s=o==null?void 0:Gk(qd,o);if(s){const{fromTime:r,toTime:n}=this.rangeCache.getRange(o,s),l=this.params.filterParams.comparator;if(l)return l(new Date(r),t)>=0&&l(new Date(n),t)<0;const a=+t;return a>=r&&a<n}return super.evaluateNonNullValue(e,t,i)}};import{RefPlaceholder as a0,_debounce as Wk,_parseDateTimeFromString as Uk,_serialiseDate as qk,_setDisplayed as d0}from"ag-stack";var $k={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},Kk=class extends Qw{constructor(){super($k,[Io]),this.eReadOnlyText=a0,this.eDateWrapper=a0,this.filterType="date",this.defaultOptions=pc}createModelFormatter(e,t,i){return new l0(e,t,i)}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const i=e?Uk(e.dateFrom):null;this.dateComp.setDate(i),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}refreshAriaLabel(){this.dateComp.setInputAriaLabel(this.getAriaLabel(this.params.column))}setEditable(e){d0(this.eDateWrapper,e),d0(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const i=t.model,o=qk(e),s=o==null?null:{...i??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=zn(this.beans.log,e,this.defaultDebounceMs),i=Wk(this,this.onDateChanged.bind(this),t);let o;return G(this.gos,{onDateChanged:()=>{o=i()},onDateCleared:hi(e)?void 0:()=>{clearTimeout(o),this.onDateChanged()},filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:i,params:{column:o}}=this;this.dateComp=new e0(e,t,o.getColDef(),this.getDateComponentParams(),i,s=>{s.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}};import{RefPlaceholder as jk,_isBrowserSafari as Zk,_parseDateTimeFromString as fc,_serialiseDate as mc}from"ag-stack";var Qk={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Yk=class extends K{constructor(){super(Qk,[Io]),this.eDateInput=jk,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.eDateInput.setClearButtonEnabled(!0).setSearchIcon(!0).onValueClear(()=>this.params.onDateCleared?.()),this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mousedown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){this.eDateInput.setAutoComplete(e.filterParams?.browserAutoComplete);const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&Zk();const{minValidYear:o,maxValidYear:s,minValidDate:r,maxValidDate:n,buttons:l}=e.filterParams||{},a=this.includesTime(e);i?a?(this.eDateInput.setInputType("datetime-local"),t.step="1"):this.eDateInput.setInputType("date"):this.eDateInput.setInputType("text");const d=c0(this.beans.log,r,o,!0),c=c0(this.beans.log,n,s,!1);d&&c&&d.getTime()>c.getTime()&&this.beans.log.warn(87),d&&(t.min=mc(d,a)),c&&(t.max=mc(c,a)),this.isApply=e.location==="floatingFilter"&&!!l?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return fc(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(mc(e,this.includesTime(this.params)))}includesTime(e){const{includeTime:t,colDef:i}=e.filterParams||{};return t??this.beans.dataTypeSvc?.getDateIncludesTimeFlag?.(i?.cellDataType)??!1}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function c0(e,t,i,o){return t&&i&&e.warn(o?85:86),t instanceof Date?t:t?fc(t):i?fc(`${i}-${o?"01-01":"12-31"}`):null}var Cc=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function Or(e){return e?.allowedCharPattern??null}function _o(e){const t=e?.filterInputType;return t?t==="text":e?.allowedCharPattern!=null||e?.numberFormatter!=null}function u0(e,t,i,o){if(typeof t=="number")return t;const s=t?.trim()??"",r=s===""?null:t??null;return e?e(r,Mi(i,o,"columnFilter")):r==null||s==="-"?null:Number.parseFloat(r)}function Gr(e){return e==null||Number.isNaN(Number(e))?null:e}function h0(e,t){const{filter:i,filterTo:o,type:s}=e??{};return[Gr(i),Gr(o)].slice(0,It(s,t))}var Jk=class extends zw{constructor(){super("numberFilter",h0,Cc),this.filterType="number"}getRenderChange(e,t){if(_o(e)!==_o(t)||Or(e)!==Or(t))return"rebuild";if(e.numberParser!==t?.numberParser||e.numberFormatter!==t?.numberFormatter)return"rerender"}parseText(e,t){return Gr(u0(t?.numberParser,e,this.gos,this.params.column))}getValueFormatter(){return Oo(this.params.numberFormatter,this.gos,this.params.column,"columnFilter")}createInputWidget(){const e=this.params;return _o(e)?this.createTextInput():this.createBean(new Rr({clearButton:!0,searchIcon:!0,autoComplete:e.browserAutoComplete}))}refreshInputPairValidation(e,t,i,o){let s="";if(o>=2){const r=this.readValue(e,!0),n=this.readValue(t,!0),l=jd(r,n,i,this.params.inRangeInclusive);s=l?this.translate(l,[String(i?n:r)]):""}(i?e:t).setCustomValidity(s),(i?t:e).setCustomValidity(""),s.length>0&&this.beans.ariaAnnounce.announceValue(s,"filterValidation")}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}},g0=class extends Hr{constructor(){super(...arguments),this.filterTypeKeys=cc}getValueFormatter(){return Oo(this.filterParams.numberFormatter,this.gos,this.column,"columnFilter")}conditionToString(e,t,i,o,s){const{filter:r,filterTo:n,type:l}=e,a=this.formatValue.bind(this);if(t){const d=this.conditionForToolPanel(l,i,()=>a(r),()=>a(n),o,s);if(d!=null)return d}return i?`${a(r)}-${a(n)}`:r!=null?a(r):`${l}`}},Xk=class extends dc{constructor(){super(h0,Cc),this.filterType="number"}createModelFormatter(e,t,i){return new g0(e,t,i)}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!Number.isNaN(Number(e))}toOwnModelValue(e){if(typeof e!="string")return typeof e=="number"&&Number.isFinite(e)?e:null;const t=e.trim(),i=eL.test(t)?Number(t):Number.NaN;if(!Number.isFinite(i))return null;const o=p0(t);return o===""||o.length<=100&&p0(i.toPrecision(o.length),!1)===o?i:null}},eL=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,p0=(e,t=!0)=>{const i=e.replace(/e.*/i,"");let o=i.length;if(t&&i.includes("."))for(;i[o-1]==="0";)o--;return i.slice(0,o).replace(/\D/g,"").replace(/^0+/,"")};import{_getActiveDomElement as tL}from"ag-stack";var iL=class extends y{constructor(e){super(),this.onInputCreated=e,this.onValueChanged=()=>{},this.onValueCleared=()=>{},this.numberInputActive=!0}setupGui(e){const t=this.createManagedBean(new Rr({clearButton:!0,onValueClear:()=>this.onValueCleared()}));this.eNumberInput=t,this.onInputCreated?.(t);const i=this.createManagedBean(new dt({clearButton:!0,onValueClear:()=>this.onValueCleared()}));this.eTextInput=i,i.setDisabled(!0);const o=t.getGui(),s=i.getGui();e.appendChild(o),e.appendChild(s),this.setupListeners(o,r=>this.onValueChanged(r)),this.setupListeners(s,r=>this.onValueChanged(r))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}isFocused(){return tL(this.beans)===this.getActiveInputElement().getInputElement()}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}getInputText(){return this.getActiveInputElement().getInputElement().value}setValueChangedListener(e){this.onValueChanged=e}setValueClearedListener(e){this.onValueCleared=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:i}){this.setAriaLabel(e),this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,i),this.setPlaceholder(this.eTextInput,i)}setPlaceholder(e,t){e.setSearchIcon(!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},oL=class extends gc{constructor(){super(...arguments),this.filterType="number",this.defaultOptions=Cc}createModelFormatter(e,t,i){return new g0(e,t,i)}updateParams(e){const t=e.filterParams;(Or(t)!==this.allowedCharPattern||_o(t)!==this.isTextInput)&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams,i=Or(t);this.allowedCharPattern=i;const o=_o(t);this.isTextInput=o;const s=r=>ic(r,i,this.beans);return this.createManagedBean(o?new uc(s):new iL(s))}convertValue(e){const{gos:t,params:i}=this,o=i.filterParams?.numberParser;return Gr(u0(o,e,t,i.column))}};import{_makeNull as sL}from"ag-stack";var vc=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],rL=class extends rc{constructor(){super("textFilter",Zw,vc),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,r)=>{o<r&&t.push(sL(i.getValue()))}),t}createEValue(){const e=O({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:i}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,i,"to"),e}createFromToElement(e,t,i){const o=this.createManagedBean(new dt({clearButton:!0,searchIcon:!0,autoComplete:this.params.browserAutoComplete}));o.addCss(`ag-filter-${i}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const i=r=>this.removeComponents(r,e,t),{eValuesFrom:o,eValuesTo:s}=this;i(o),i(s)}};import{_getOwn as f0}from"ag-stack";var m0=class extends Hr{constructor(){super(...arguments),this.filterTypeKeys=yk}conditionToString(e,t,i,o,s){const{filter:r,filterTo:n,type:l}=e;if(t){const a=c=>()=>Te(this,"filterSummaryTextQuote",[c]),d=this.conditionForToolPanel(l,i,a(r),a(n),o,s);if(d!=null)return d}return i?`${r}-${n}`:r!=null?`${r}`:`${l}`}},C0=({filterOption:e,value:t,filterText:i})=>{if(i==null||t==null)return!1;const o=e==null?void 0:f0(hc,e);return o?o(t,i):!1},nL=e=>e,lL=class extends qw{constructor(){super(Zw,vc),this.filterType="text"}createModelFormatter(e,t,i){return new m0(e,t,i)}updateParams(e){super.updateParams(e);const t=e.filterParams,i=t.textFormatter;this.matcher=t.textMatcher??C0,this.textFormatter=i&&(o=>o==null?null:i(o,Mi(this.beans.gos,e.column,"columnFilter"))),this.formatter=this.textFormatter??(t.caseSensitive?nL:jw)}isUnmatchable(e){return this.matcher===C0&&(e==null||!f0(hc,e))}evaluateNullValue(e){return e!=="blank"&&e!=="notBlank"&&this.isUnmatchable(e)?(this.warnUnexpectedFilterType(e),!1):e==="notEqual"||e==="notContains"||e==="blank"}evaluateNonNullValue(e,t,i,o){const s=e.map(g=>this.formatter(g))||[],r=this.formatter(t),{api:n,colDef:l,column:a,context:d}=this.params,c=i.type;if(c==="blank")return No(t);if(c==="notBlank")return pw(t);if(this.isUnmatchable(c))return this.warnUnexpectedFilterType(c),!1;const u=this.matcher,h={api:n,colDef:l,column:a,context:d,node:o.node,data:o.data,filterOption:c,value:r,textFormatter:this.textFormatter,source:"columnFilter"};return s.some(g=>u({...h,filterText:g}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=i=>{const o={...i},{filter:s,filterTo:r}=i;return s&&(o.filter=Br(s)??null),r&&(o.filterTo=Br(r)??null),o};return _n(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}toOwnModelValue(e){return typeof e=="string"?e===""?null:e:typeof e=="number"&&Number.isFinite(e)||typeof e=="bigint"?String(e):null}},aL=class extends gc{constructor(){super(...arguments),this.filterType="text",this.defaultOptions=vc}createModelFormatter(e,t,i){return new m0(e,t,i)}createFloatingFilterInputService(){return this.createManagedBean(new uc)}};function dL(e){return!!e.quickFilter?.isFilterPresent()}function cL(e){return e.quickFilter?.getText()}function uL(e){e.quickFilter?.resetCache()}import{_exists as Nr}from"ag-stack";var hL=class extends y{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",i=>this.setFilter(i.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:i,pivotResultCols:o}=this.beans,s=t.pivotMode,r=e?.columns,n=t.colDefList;let l=(s&&!i.get("applyQuickFilterBeforePivotOrAgg")?o?.pivotCols:n)??[];r?.length&&(l=l.concat(r)),this.colsToUse=i.get("includeHiddenColumnsInQuickFilter")?l:l.filter(a=>a.visible||a.rowGroupActive)}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassCache(e,i):this.doesRowPassNoCache(e,i))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}getState(){const e=this.getText()||void 0;return e?{text:e}:void 0}setState({text:e},t){if(e!==void 0){this.stateSource=t;try{this.gos.updateGridOptions({options:{quickFilterText:e}})}finally{this.stateSource=void 0}}}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return Nr(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){this.warn(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged",source:this.stateSource}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(i=>{const o=this.getTextForColumn(i,e);return Nr(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let i;e?(this.checkGenerateAggText(t),i=t.quickFilterAggregateText):i=this.getAggText(t);const{quickFilterParts:o,matcher:s}=this;return s(o,i)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let i=this.beans.filterValueSvc.getValue(e,t);const o=e.colDef;if(o.getQuickFilterText){const s=G(this.gos,{value:i,node:t,data:t.data,column:e,colDef:o});i=o.getQuickFilterText(s)}return Nr(i)?i.toString().toUpperCase():null}getAggText(e){const t=[];for(const i of this.colsToUse){const o=this.getTextForColumn(i,e);Nr(o)&&t.push(o)}return t.join(`
`)}},_r={moduleName:"FilterCore",version:E,beans:[j7],apiFunctions:{isAnyFilterPresent:q7,onFilterChanged:$7},css:[L8]},wc={moduleName:"FilterValue",version:E,beans:[hk]},Ti={moduleName:"ColumnFilter",version:E,beans:[U7,ck],dynamicBeans:{headerFilterCellCtrl:D8},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:O8,getColumnFilterInstance:G8,destroyFilter:N8,setFilterModel:_8,getFilterModel:z8,getColumnFilterModel:W8,setColumnFilterModel:U8,showColumnFilter:q8,hideColumnFilter:$8,getColumnFilterHandler:K8,doFilterAction:j8},dependsOn:[_r,Ao,wc,iw]},v0={moduleName:"CustomFilter",version:E,userComponents:{agReadOnlyFloatingFilter:fk},dependsOn:[Ti]},w0={moduleName:"TextFilter",version:E,dependsOn:[Ti],userComponents:{agTextColumnFilter:{classImp:rL,params:{useForm:!0}},agTextColumnFloatingFilter:aL},dynamicBeans:{agTextColumnFilterHandler:lL}},S0={moduleName:"NumberFilter",version:E,dependsOn:[Ti],userComponents:{agNumberColumnFilter:{classImp:Jk,params:{useForm:!0}},agNumberColumnFloatingFilter:oL},dynamicBeans:{agNumberColumnFilterHandler:Xk}},b0={moduleName:"BigIntFilter",version:E,dependsOn:[Ti],userComponents:{agBigIntColumnFilter:{classImp:bk,params:{useForm:!0}},agBigIntColumnFloatingFilter:Ak},dynamicBeans:{agBigIntColumnFilterHandler:Rk}},y0={moduleName:"DateFilter",version:E,dependsOn:[Ti],userComponents:{agDateColumnFilter:{classImp:Ok,params:{useForm:!0}},agDateInput:Yk,agDateColumnFloatingFilter:Kk},dynamicBeans:{agDateColumnFilterHandler:zk}},gL={moduleName:"QuickFilterCore",version:E,rowModels:["clientSide"],beans:[hL],dependsOn:[_r,wc]},R0={moduleName:"QuickFilter",version:E,apiFunctions:{isQuickFilterPresent:dL,getQuickFilter:cL,resetQuickFilter:uL},dependsOn:[gL]},E0={moduleName:"ExternalFilter",version:E,dependsOn:[_r]};import{_jsonEquals as pL}from"ag-stack";import{_exists as fL}from"ag-stack";import{_exists as mL,_missing as CL}from"ag-stack";var vL=class extends y{constructor(e,t,i){super(),this.id=e,this.parentCache=t,this.params=i,this.state="needsLoading",this.version=0,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:i,beans:o,rowNodes:s}=this;for(let r=0;r<e;r++){const n=i+r,l=new ze(o);l.setRowHeight(t),l.uiLevel=0,l.setRowIndex(n),l.setRowTop(t*n),s.push(l)}}getBlockStateJson(){const{id:e,startRow:t,endRow:i,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:i,pageStatus:o}}}setDataAndId(e,t,i){mL(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0),this.beans.selectionSvc?.updateRowSelectable(e)}loadFromDatasource(){const e=this.createLoadParams();if(CL(this.params.datasource.getRows)){this.warn(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:i,params:{sortModel:o,filterModel:s},gos:r}=this;return G(r,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,i),failCallback:this.pageLoadFailed.bind(this,i),sortModel:o,filterModel:s})}forEachNode(e,t,i){this.rowNodes.forEach((o,s)=>{this.startRow+s<i&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const i=e-this.startRow;return this.rowNodes[i]}processServerResult(e){const{rowNodes:t,beans:i}=this;t.forEach((s,r)=>{const n=e.rowData?e.rowData[r]:void 0;!s.id&&s.alreadyRendered&&n&&(t[r]=new ze(i),t[r].setRowIndex(s.rowIndex),t[r].setRowTop(s.rowTop),t[r].setRowHeight(s.rowHeight),s._destroy(!0)),this.setDataAndId(t[r],n,this.startRow+r)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){const e=this.rowNodes;for(let t=0,i=e.length;t<i;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},wL=2,SL=class extends y{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const i=Math.floor(e/this.params.blockSize);let o=this.blocks[i];if(!o){if(t)return;o=this.createBlock(i)}return o.getRow(e)}createBlock(e){const t=this.params,i=this.createBean(new vL(e,this,t));return this.blocks[i.id]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),t.rowNodeBlockLoader.addBlock(i),i}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Rt(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(n=>n!=e),i=(n,l)=>l.lastAccessed-n.lastAccessed;t.sort(i);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,r=wL-1;t.forEach((n,l)=>{const a=n.state==="needsLoading"&&l>=r,d=o?l>=s:!1;if(a||d){if(this.isBlockCurrentlyDisplayed(n)||this.isBlockFocused(n))return;this.removeBlockFromCache(n)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:i,endRow:o}=e;return t.rowIndex>=i&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:i}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,i-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:i,overflowSize:o}=this.params,r=(e.id+1)*i+o;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,fL(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const i of this.getBlocksInOrder())i.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(i,o)=>i.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const i=[];let o=-1,s=!1;const r={value:0};let n=!1;for(const a of this.getBlocksInOrder())if(!n){if(s&&o+1!==a.id){n=!0;continue}o=a.id,a.forEachNode(d=>{const c=d===e||d===t;(s||c)&&i.push(d),c&&(s=!s)},r,this.rowCount)}return n||s?[]:i}},bL=class extends y{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1,this.rowCountReady=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new ze(e);this.rootNode=t,t.level=-1,this.rowHeight=Ge(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),Li(this,()=>this.refreshRowHeight()),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache())}refreshRowHeight(){const e=Ge(this.beans);e!==this.rowHeight&&(this.rowHeight=e,this.cacheParams&&(this.cacheParams.rowHeight=e),this.updateRowHeights())}onColumnEverything(){let e;this.cacheParams?e=!pL(this.cacheParams.sortModel,Jl(this.beans.sortSvc)):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;Bt(this.beans)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:i,rowNodeBlockLoader:o,eventSvc:s,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:Jl(i),rowNodeBlockLoader:o,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:Ge(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new SL(this.cacheParams)),this.rowCountReady||(this.rowCountReady=!0,s.dispatchEvent({type:"rowCountReady"})),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){this.beans.pinnedRowModel?.ensureRowHeightsValid()}};function yL(e){Os(e)?.refreshCache()}function RL(e){Os(e)?.purgeCache()}function EL(e){return Os(e)?.getRowCount()}import{_debounce as xL,_removeFromArray as FL}from"ag-stack";var PL=class extends y{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Zc(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=xL(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){FL(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Rt(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(i=>i.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const i of t)i.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:i,state:o}=t.getBlockStateJson();e[i]=o}),e}printCacheStatus(){Rt(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},DL={moduleName:"InfiniteRowModelCore",version:E,rowModels:["infinite"],beans:[bL,PL]},x0={moduleName:"InfiniteRowModel",version:E,apiFunctions:{refreshInfiniteCache:yL,purgeInfiniteCache:RL,getInfiniteRowCount:EL},dependsOn:[DL,Rp]},ML=class extends y{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.globalListeners=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){if(typeof t!="function")return;const i=this.wrapSvc?.wrap(e,t)??t,o=!wi.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(i),this.eventSvc.addListener(e,i,o)}removeListener(e,t){const i=this.wrapSvc?.unwrap(e,t)??t,s=!!this.asyncListeners.get(e)?.delete(i);s||this.syncListeners.get(e)?.delete(i),this.eventSvc.removeListener(e,i,s)}addGlobalListener(e){if(typeof e!="function")return;const t=this.globalListeners;if(t.has(e))return;const i=this.wrapSvc?.wrapGlobal(e)??e;t.set(e,i);const o=this.eventSvc;o.addGlobalListener(i,!1,wi),o.addGlobalListener(i,!0,void 0,wi)}removeGlobalListener(e){const t=this.globalListeners,i=t.get(e);if(i){const o=this.eventSvc;o.removeGlobalListener(i,!1),o.removeGlobalListener(i,!0),t.delete(e)}}destroyEventListeners(e,t){e.forEach((i,o)=>{i.forEach(s=>this.eventSvc.removeListener(o,s,t)),i.clear()}),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0);const{globalListeners:e,eventSvc:t}=this;e.forEach(i=>{t.removeGlobalListener(i,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function TL(e,t,i){e.apiEventSvc?.addListener(t,i)}function AL(e,t,i){e.apiEventSvc?.removeListener(t,i)}function IL(e,t){e.apiEventSvc?.addGlobalListener(t)}function kL(e,t){e.apiEventSvc?.removeGlobalListener(t)}var F0={moduleName:"EventApi",version:E,apiFunctions:{addEventListener:TL,addGlobalListener:IL,removeEventListener:AL,removeGlobalListener:kL},beans:[ML]};import{_getLocaleTextFromFunc as LL,_getLocaleTextFromMap as VL}from"ag-stack";var P0=class extends y{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?LL(t):VL(e.get("localeText"))}},D0={moduleName:"Locale",version:E,beans:[P0]},M0=class extends y{constructor(){super(...arguments),this.beanName="userColumnSvc",this.entries=new Map,this.owners=[],this.ownedProperties=null,this.declaredDefs=new Map}registerOwner(e,t){this.owners.push(e);const i=this.ownedProperties??new Set;for(let o=0,s=t.length;o<s;++o)i.add(t[o]);this.ownedProperties=i}isActive(){const e=this.owners;for(let t=0,i=e.length;t<i;++t)if(e[t]())return!0;return!1}getDeclaredDef(e){const t=this.beans.colModel.colDefs??null;if(this.declaredDefsSource!==t){const i=new Map;BL(t,i),this.declaredDefs=i,this.declaredDefsSource=t}return this.declaredDefs.get(e)}isDeclared(e){return this.getDeclaredDef(e)!==void 0}getEntry(e){return this.entries.get(e)}forEachEntry(e){this.entries.forEach(e)}hasEntries(){return this.entries.size>0}setCreatedColumn(e,t,i,o){this.entries.set(e,{properties:t,parentGroupId:i,created:!0,calculatedExpressionError:o})}setOverride(e,t,i){this.entries.set(e,{properties:t,calculatedExpressionError:i})}removeColumn(e,t){t?this.entries.set(e,{removed:!0}):this.entries.delete(e)}clearColumn(e){this.entries.delete(e)}clear(){const{entries:e}=this;return this.declaredDefsSource=void 0,e.size?(e.clear(),!0):!1}overrideFor(e){const t=e.colId??e.field;if(t==null)return;const i=this.entries.get(t);if(i!==void 0&&this.isActive()){if(i.removed)return null;if(!i.created)return i.properties?{...e,...i.properties}:void 0}}getState(){const e=this.entries;if(!e.size)return;const t=[];return e.forEach((i,o)=>{if(i.removed){t.push({colId:o,type:"calculated",removed:!0});return}const{parentGroupId:s,created:r,calculatedExpressionError:n}=i,l=r?{colId:o,type:"calculated",created:r,parentGroupId:s??null,properties:T0(i.properties)}:{colId:o,type:"calculated",properties:T0(i.properties)};n&&(l.calculatedExpressionError=n),t.push(l)}),t}setState(e){const t=this.entries,i=new Map;for(let o=0,s=e?.length??0;o<s;++o){const r=e[o],{colId:n}=r;n!=null&&(r.removed?i.set(n,{removed:!0}):r.created?i.set(n,{properties:this.acceptProperties(r.properties),parentGroupId:r.parentGroupId??null,created:!0,calculatedExpressionError:r.calculatedExpressionError}):this.isDeclared(n)&&i.set(n,{properties:this.acceptProperties(r.properties),calculatedExpressionError:r.calculatedExpressionError}))}return HL(t,i)?!1:(t.clear(),i.forEach((o,s)=>t.set(s,o)),!0)}acceptProperties(e){const t=this.ownedProperties,i={};for(let o=0,s=e?.length??0;o<s;++o){const{property:r,value:n}=e[o];(t?t.has(r)&&typeof n!="function":r!=null)&&(i[r]=n)}return i}},T0=e=>{if(!e)return[];const t=Object.keys(e),i=[];for(let o=0,s=t.length;o<s;++o){const r=t[o],n=e[r];typeof n!="function"&&i.push({property:r,value:n})}return i},HL=(e,t)=>{if(e.size!==t.size)return!1;for(const[i,o]of e){const s=t.get(i);if(s===void 0||!!o.removed!=!!s.removed||!!o.created!=!!s.created||o.parentGroupId!==s.parentGroupId||!kt(o.calculatedExpressionError,s.calculatedExpressionError)||!kt(o.properties??{},s.properties??{}))return!1}return!0},BL=(e,t)=>{e&&On(e,i=>{const o=i.colId??i.field;o!=null&&!t.has(o)&&t.set(o,i)})};function OL(e){return e.stateSvc?.getState()??{}}function GL(e,t,i){return e.stateSvc?.setState(t,i)}import{_debounce as Sc,_hasOwn as NL,_jsonEquals as A0}from"ag-stack";function I0(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=_L(e)),e.version=E,e}function _L(e){return e.cellSelection=zL(e,"rangeSelection"),e}function zL(e,t){if(e&&typeof e=="object")return e[t]}var WL=class extends y{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Sc(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Sc(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=Sc(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:i}=this.beans;this.isClientSideRowModel=ie(e);const o=I0(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o,this.initialFilterState=o.filter;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&i?.hideColumns("columnState");const[n,l,a]=this.addManagedEventListeners({newColumnsLoaded:({source:d})=>{d==="gridInitializing"&&(n(),r(()=>{this.setupStateOnColumnsInitialised(o,!!s),i?.revealColumns("columnState")}))},rowCountReady:()=>{l?.(),r(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{a?.(),r(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const i=I0(e);delete i.partialColumnState,this.cachedState=i,this.startSuppressEvents(),this.applyInitialFilterState();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(i,o,s),this.setColumnsInitialisedState(i,o,!!s,s),this.setRowCountState(i,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(i,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,i){t==="api"&&!i?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","columnHeaderName","pivot","rowGroup","showValuesAs","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.updateCachedState("userColumns",this.beans.userColumnSvc.getState())}setColumnsInitialisedState(e,t,i,o){this.setUserColumnsState(e,t,o),this.applyColumnGridState(e,t,i,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setUserColumnsState(e,t,i){if(i?.has("userColumns")||!e.userColumns&&t!=="api")return;const{userColumnSvc:o,calculatedColsSvc:s,colModel:r}=this.beans,n=o.setState(e.userColumns),l=s?.adoptUserColumns()??!1;!n&&!l||(s?s.refreshDynamicColumns(t):r.rebuildCols(t))}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const i=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:i("aggregation"),columnMoved:i("columnOrder"),columnPinned:i("columnPinning"),columnResized:i("columnSizing"),columnVisible:i("columnVisibility"),columnPivotChanged:i("pivot"),columnPivotModeChanged:i("pivot"),columnRowGroupChanged:i("rowGroup"),columnShowValuesAsChanged:i("showValuesAs"),sortChanged:i("sort"),newColumnsLoaded:({source:o})=>{this.updateColumnAndGroupState(),o!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState()),columnHeaderNameChanged:()=>{this.updateColumnState(["columnHeaderName"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}})}setRowCountState(e,t,i){const{filter:o,quickFilter:s,rowGroupExpansion:r,ssrmRowGroupExpansion:n,rowSelection:l,pagination:a,rowPinning:d}=e,c=(h,g)=>!i?.has(h)&&(g||t==="api");c("filter",o)&&this.setFilterStateDeferringPivot(o,t),c("quickFilter",s)&&this.setQuickFilterState(s,t),(c("rowGroupExpansion",r)||c("ssrmRowGroupExpansion",n))&&this.setRowGroupExpansionState(n,r,t),c("rowSelection",l)&&this.setRowSelectionState(l,t),c("pagination",a)&&this.setPaginationState(a,t),c("rowPinning",d)&&this.setRowPinningState(d);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),u("quickFilter",this.getQuickFilterState()),this.updateGroupExpansionState(),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.applyInitialFilterState(),this.setRowCountState({...e,filter:void 0},"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},o=()=>t("filter",this.getFilterState());this.addManagedPropertyListener("quickFilterText",()=>t("quickFilter",this.getQuickFilterState()));const{gos:s,colFilter:r,selectableFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:i,columnRowGroupChanged:i,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(i)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:l=>{(l.newPage||l.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),r&&this.addManagedListeners(r,{filterStateChanged:o}),n&&this.addManagedListeners(n,{selectedFilterChanged:o})}setFirstDataRenderedState(e,t,i){const{scroll:o,cellSelection:s,find:r,focusedCell:n,columnOrder:l}=e,a=(h,g)=>!i?.has(h)&&(g||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),this.setColumnPivotState(!!l?.orderedColIds,t);const d=this.deferredFilterState;d&&(this.deferredFilterState=void 0,this.setFilterState(d,t)),a("find",r)&&this.setFindState(r,t),a("scroll",o)&&this.setScrollState(o);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const u=this.getRangeSelectionState();c("rangeSelection",u),c("cellSelection",u),c("scroll",this.getScrollState()),c("find",this.getFindState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:i,cellFocusCleared:i,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),findChanged:()=>t("find",this.getFindState())})}getColumnGridState(){const e=this.beans;return hC(Ru(e),e.colModel.pivotMode)}applyColumnGridState(e,t,i,o){const{sort:s,rowGroup:r,aggregation:n,showValuesAs:l,pivot:a,columnPinning:d,columnVisibility:c,columnSizing:u,columnOrder:h,columnHeaderName:g}=e;let p=!1;const f=(_,z)=>{const Y=!o?.has(_)&&!!(z||t==="api");return p||(p=Y),Y},m=Object.create(null),w=_=>{let z=m[_];return z||(z={colId:_},m[_]=z,z)},v=f("sort",s),S=f("rowGroup",r),C=f("aggregation",n),b=f("showValuesAs",l),R=f("pivot",a),x=f("columnPinning",d),D=f("columnVisibility",c),A=f("columnSizing",u),L=f("columnHeaderName",g),H=_=>_||!i?null:void 0,re={sort:H(v),sortIndex:H(v),rowGroup:H(S),rowGroupIndex:H(S),aggFunc:H(C),valueIndex:H(C),showValuesAs:H(b),pivot:H(R),pivotIndex:H(R),pinned:H(x),hide:H(D),flex:H(A),headerName:H(L),sortType:void 0,width:void 0,pivotSort:void 0};if(v&&s){const _=s.sortModel;for(let z=0,Y=_.length;z<Y;++z){const{colId:ee,sort:P,type:M}=_[z],k=w(ee);k.sort=P,k.sortIndex=z,k.sortType=M}}if(S&&r){const _=r.groupColIds;for(let z=0,Y=_.length;z<Y;++z){const ee=w(_[z]);ee.rowGroup=!0,ee.rowGroupIndex=z}}if(C&&n){const _=n.aggregationModel;for(let z=0,Y=_.length;z<Y;++z){const{colId:ee,aggFunc:P}=_[z],M=w(ee);M.aggFunc=P,M.valueIndex=z}}if(b&&l){const _=l.showValuesAsModel;for(let z=0,Y=_.length;z<Y;++z){const{colId:ee,showValuesAs:P}=_[z];w(ee).showValuesAs=Qo(P)}}if(R&&a){const _=a.pivotColIds;for(let z=0,Y=_.length;z<Y;++z){const ee=w(_[z]);ee.pivot=!0,ee.pivotIndex=z}for(const{colId:z,sort:Y}of a.pivotSortModel??[])w(z).pivotSort=Y;this.gos.updateGridOptions({options:{pivotMode:!!a.pivotMode},source:t})}if(x){for(const _ of d?.leftColIds??[])w(_).pinned="left";for(const _ of d?.rightColIds??[])w(_).pinned="right"}if(D)for(const _ of c?.hiddenColIds??[])w(_).hide=!0;if(A)for(const{colId:_,flex:z,width:Y}of u?.columnSizingModel??[]){const ee=w(_);ee.flex=z??null,ee.width=Y}if(L)for(const{colId:_,headerName:z}of g?.columnHeaderNames??[])w(_).headerName=z;const $=h?.orderedColIds,ne=!!$?.length&&!o?.has("columnOrder"),j=ne?$.map(_=>w(_)):Object.values(m);(j.length||p)&&(this.columnStates=j,tt(this.beans,{state:j,applyOrder:ne,defaultState:re},t))}setColumnPivotState(e,t){const i=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:r,colModel:n}=s;if(r?.pivotCols){if(i){const l=[];for(const a of i)n.colsById[a.colId]?.colDef.pivotKeys!=null&&l.push(a);tt(s,{state:l,applyOrder:e},t)}o&&Wi(s,o,t)}}getColumnGroupState(){const e=gn(this.beans);return gC(e)}setColumnGroupState(e,t,i){if(i?.has("columnGroup")||t!=="api"&&!NL(e,"columnGroup"))return;const o=new Set(e.columnGroup?.openColumnGroupIds),s=new Map((e.columnGroup?.headerNames??[]).map(({groupId:l,headerName:a})=>[l,a])),n=gn(this.beans).map(({groupId:l})=>{const a=o.has(l);return a&&o.delete(l),{groupId:l,open:a,headerName:s.get(l)??null}});for(const l of o)n.push({groupId:l,open:!0,headerName:s.get(l)??null});n.length&&(this.columnGroupStates=n),Wi(this.beans,n,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let i=e?.getFilterModel();i&&Object.keys(i).length===0&&(i=void 0);const o=e?.getFilterState(),s=e?.getAdvFilterModel()??void 0,r=t?.getState();return i||s||o||r?{filterModel:i,columnFilterState:o,advancedFilterModel:s,selectableFilters:r}:void 0}setFilterState(e,t="api"){const{filterManager:i,selectableFilter:o}=this.beans,{filterModel:s,columnFilterState:r,advancedFilterModel:n,selectableFilters:l}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null,selectableFilters:null};l!==void 0&&o?.setState(l??void 0);const a=t==="api";if(s!==void 0||r!==void 0){const d=a?"api":"columnFilter";i?.setFilterState(s??null,r??null,d)}if(n!==void 0){const d=a?"api":"advancedFilter";i?.setAdvFilterModel(n??null,d)}}isToolbarStateManaged(e){return!!this.beans.toolbar?.hasItem(e)}getQuickFilterState(){return this.isToolbarStateManaged("agQuickFilterToolbarItem")?this.beans.quickFilter?.getState():void 0}setQuickFilterState(e,t="api"){if(!this.isToolbarStateManaged("agQuickFilterToolbarItem"))return;const{text:i}=e??{};this.beans.quickFilter?.setState({text:t==="api"?i??"":i},t==="api"?"api":void 0)}applyInitialFilterState(){const e=this.initialFilterState;e&&(this.initialFilterState=void 0,this.setFilterStateDeferringPivot(e,"gridInitializing"))}setFilterStateDeferringPivot(e,t){const{colModel:i,pivotResultCols:o}=this.beans,s=e?.filterModel;if(s&&t==="gridInitializing"&&i.pivotMode&&!o?.pivotCols){const r=i.colsById,n=Object.keys(s);for(let l=0,a=n.length;l<a;++l)if(r[n[l]]==null){this.deferredFilterState=e;return}}this.setFilterState(e,t)}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:i,type:o,startRow:s,endRow:r,columns:n,startColumn:l}=t;return{id:i,type:o,startRow:s,endRow:r,colIds:n.map(a=>a.getColId()),startColId:l.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:i,colModel:o,visibleCols:s}=this.beans;if(!Ne(t)||!i)return;const r=[];for(const n of e?.cellRanges??[]){const l=[];for(const d of n.colIds){const c=o.colsById[d];c&&l.push(c)}if(!l.length)continue;let a=o.colsById[n.startColId];if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}r.push({...n,columns:l,startColumn:a})}i.setCellRanges(r)}getFindState(){return this.isToolbarStateManaged("agFindToolbarItem")?this.beans.findSvc?.getState():void 0}setFindState(e,t="api"){if(!this.isToolbarStateManaged("agFindToolbarItem"))return;const{searchValue:i,activeMatch:o}=e??{};this.beans.findSvc?.setState({searchValue:t==="api"?i??"":i,activeMatch:o})}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:i}=e?.getVScrollPosition()??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:i}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:n}=this.beans;o.wrapIncoming(()=>{n.whenReady(this,()=>{const l=n.getScrollFeature();l?.setHorizontalScrollPosition(i),l?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),r?.flushAllFrames()})})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:i}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:r}=e;t.setFocusedCellOrSpan({column:i.colsById[o]??null,rowIndex:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const i=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!i&&!o))return{page:i,pageSize:o}}setPaginationState(e,t){const{pagination:i,gos:o}=this.beans;if(!i)return;const{pageSize:s,page:r}=e??{page:0,pageSize:o.get("paginationPageSize")},n=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&i.setPageSize(s,n?"initialState":"pageSizeSelector"),typeof r=="number"&&(n?i.setPage(r):i.goToPage(r))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&("selectAll"in t?!t.selectAll:t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,i=e?.getExpansionState(),o=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",o?i:void 0),this.updateCachedState("rowGroupExpansion",o?void 0:i)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){this.beans.pinnedRowModel?.setPinnedState(e??{top:[],bottom:[]})}setRowGroupExpansionState(e,t,i){const o=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(o,i)}updateColumnState(e){const t=this.getColumnGridState();let i=!1;const o=this.cachedState;for(const s of Object.keys(t)){const r=t[s];A0(r,o[s])||(i=!0)}this.cachedState={...o,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),A0(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},k0={moduleName:"GridState",version:E,beans:[WL,M0],apiFunctions:{getState:OL,setState:GL}};function UL(e){return e.rowModel.isLastRowIndexKnown()}function qL(e){return e.pagination?.getPageSize()??100}function $L(e){return e.pagination?.getCurrentPage()??0}function KL(e){return e.pagination?.getTotalPages()??1}function jL(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function ZL(e){e.pagination?.goToNextPage()}function QL(e){e.pagination?.goToPreviousPage()}function YL(e){e.pagination?.goToFirstPage()}function JL(e){e.pagination?.goToLastPage()}function XL(e,t){e.pagination?.goToPage(t)}import{_debounce as eV}from"ag-stack";var tV=class extends y{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.scrollingRowsCtrl=e.scrolling;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.scrollingRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.scrollingRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,i=()=>{const o=Math.max(Ge(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?eV(this,i,50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};import{RefPlaceholder as iV,_removeFromParent as oV,_scrollHorizontallyToShow as sV}from"ag-stack";import{_areEqual as rV,_clearElement as nV}from"ag-stack";var bc="paginationPageSizeSelector",lV={tag:"span",cls:"ag-paging-page-size"},aV=class extends K{constructor(e){super(lV),this.panelParams=e,this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const t=this.selectPageSizeComp.getValue();if(!t)return;const i=zc(t);i==null||i<1||i===this.pagination.getPageSize()||(this.pagination.setPageSize(i,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}getPageSizeSelectorOption(){return this.panelParams?.paginationPageSizeSelector??this.gos.get(bc)}postConstruct(){this.addManagedPropertyListener(bc,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){nV(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return!this.gos.get("paginationAutoPageSize")&&this.getPageSizeSelectorOption()!==!1}updateVisibility(){const e=this.shouldShowPageSizeSelector();this.toggleSelectDisplay(e),this.setDisplayed(e)}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),i=!t||!e.includes(t);if(i){const s=this.panelParams?.paginationPageSize!=null||this.gos.exists("paginationPageSize"),r=this.getPageSizeSelectorOption()!==!0;this.beans.log.warn(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||this.beans.log.warn(95,{paginationPageSizeOption:t,paginationPageSizeSelector:bc}),e.unshift("")}const o=String(i?"":t);this.selectPageSizeComp?(rV(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const i=this.getLocaleTextFunc(),o=i("pageSizeSelectorLabel","Page Size:"),s=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new xr).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.getPageSizeSelectorOption();return!Array.isArray(t)||!t?.length?e:[...t].sort((i,o)=>i-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}};import{KeyCode as Qe,RefPlaceholder as ni,_setAriaDisabled as dV,_setAriaLabel as cV,_setAriaRole as uV}from"ag-stack";function yc(e,t,i){const o=t.getCallback("paginationNumberFormatter");return o?o({value:e}):Wc(e,i)}var hV=class extends K{constructor(e,t){super(),this.btFirst=ni,this.btPrevious=ni,this.btNext=ni,this.btLast=ni,this.lbCurrentInput=ni,this.lbCurrentStatic=ni,this.lbTotal=ni,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.ariaStatus="",this.idPrefix=e,this.suppressPageInput=t??!1}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination}postConstruct(){const e=this.getLocaleTextFunc();this.setTemplate(gV(this.idPrefix,this.suppressPageInput,e),this.suppressPageInput?[]:[vd]),pV(this.gos.get("enableRtl"),this.beans,this.btFirst,this.btPrevious,this.btNext,this.btLast),this.initNavButtons(),this.suppressPageInput||this.initPageInput(),this.refresh()}initNavButtons(){const{btFirst:e,btPrevious:t,btNext:i,btLast:o}=this;this.activateTabIndex([e,t,i,o]);for(const{el:s,fn:r}of[{el:e,fn:this.onBtFirst.bind(this)},{el:t,fn:this.onBtPrevious.bind(this)},{el:i,fn:this.onBtNext.bind(this)},{el:o,fn:this.onBtLast.bind(this)}])this.addManagedListeners(s,{click:r,keydown:n=>{(n.key===Qe.ENTER||n.key===Qe.SPACE)&&(n.preventDefault(),r())}})}initPageInput(){const{lbCurrentInput:e,pagination:t}=this,i=e.getInputElement();uV(i,"spinbutton"),this.addManagedListeners(i,{keydown:o=>{const{key:s}=o;if(s!==Qe.ENTER&&s!==Qe.ESCAPE&&s!==Qe.UP&&s!==Qe.DOWN)return;o.preventDefault();let r=null;const n=t.getCurrentPage(),l=t.getTotalPages();switch(s){case Qe.ENTER:this.commitPageInput();break;case Qe.ESCAPE:e.setValue(String(this.getDisplayPageNumber()),!0),i.blur();break;case Qe.UP:n+2<=l&&(r=n+2);break;case Qe.DOWN:n!==0&&(r=n);break}r!==null&&(e.setValue(String(r),!0),this.commitPageInput())},blur:()=>this.commitPageInput()})}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}commitPageInput(){const{pagination:e,lbCurrentInput:t}=this,i=t.getValue(!0);if(!i?.trim()){t.setValue(String(this.getDisplayPageNumber()),!0);return}const o=Number(i),s=e.getTotalPages();if(!(Number.isFinite(o)&&Number.isInteger(o)&&o>=1&&o<=s)){t.setValue(String(this.getDisplayPageNumber()),!0);return}e.goToPage(o-1)}getDisplayPageNumber(){const{rowModel:e,pagination:t}=this;return t.getTotalPages()>0?t.getCurrentPage()+1:e.isLastRowIndexKnown()?0:1}refresh(){this.enableOrDisableButtons(),this.updateLabels()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=t&&i===0,s=e===i-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||s,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){dV(e,t),e.classList.toggle("ag-disabled",t)}updateLabels(){const{rowModel:e,pagination:t,lbCurrentInput:i,lbCurrentStatic:o,lbTotal:s}=this,r=e.isLastRowIndexKnown(),n=t.getTotalPages(),l=this.getLocaleTextFunc();let a;r?a=this.formatNumber(n):a=l("more","more"),s.textContent=a;const d=this.getDisplayPageNumber(),c=this.formatNumber(d);if(this.suppressPageInput)o.textContent=c;else{const g=Math.max(d,n);i.setMin(Math.min(1,d)),i.setMax(g),i.getInputElement().style.width=`${Math.floor(Math.log10(Math.max(1,g)))+3.5}ch`,i.setValue(d.toString());const p=i.getInputElement();cV(p,`${l("page","Page")} ${l("number","number")}, ${d} ${l("of","of")} ${a}`),p.setAttribute("aria-valuenow",String(d)),p.setAttribute("aria-valuemin",String(Math.min(1,d))),p.setAttribute("aria-valuemax",String(g))}const u=l("page","Page"),h=l("of","of");this.ariaStatus=`${u} ${c} ${h} ${a}`}formatNumber(e){return yc(e,this.gos,this.getLocaleTextFunc.bind(this))}};function gV(e,t,i){const o={cls:"ag-paging-number",attrs:{id:`${e}-start-page-number`},tag:t?"span":"ag-input-number-field",ref:t?"lbCurrentStatic":"lbCurrentInput"};return{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":i("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":i("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${e}-start-page`},children:i("page","Page")},o,{tag:"span",attrs:{id:`${e}-of-page`},children:i("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${e}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":i("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":i("lastPage","Last Page")}}]}}function pV(e,t,i,o,s,r){i.insertAdjacentElement("afterbegin",X(e?"last":"first",t)),o.insertAdjacentElement("afterbegin",X(e?"next":"previous",t)),s.insertAdjacentElement("afterbegin",X(e?"previous":"next",t)),r.insertAdjacentElement("afterbegin",X(e?"first":"last",t))}var fV=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;height:var(--ag-pagination-panel-height);overflow:auto hidden;scrollbar-width:var(--ag-scrollbar-width,thin)}.ag-paging-panel-content{align-items:center;display:flex;flex:0 0 auto;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-width:100%;padding:0 var(--ag-cell-horizontal-padding)}:where(.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;&.ag-disabled{cursor:default;opacity:.5}}:where(.ag-number-field).ag-paging-number{display:inline-block}:where(.ag-number-field.ag-paging-number) .ag-input-field-input{text-align:end}.ag-paging-number,.ag-paging-row-summary-panel-number{font-variant-numeric:tabular-nums;font-weight:500}.ag-paging-description{line-height:0}.ag-paging-row-summary-panel{display:inline-grid}.ag-paging-row-summary-panel:before{content:var(--ag-internal-pagination-width-string);font-variant-numeric:tabular-nums;font-weight:500;grid-area:1/1;visibility:hidden}.ag-paging-row-summary-content{grid-area:1/1;justify-self:center}";import{RefPlaceholder as Rc}from"ag-stack";var mV=class extends K{constructor(e){super(),this.lbFirstRowOnPage=Rc,this.lbLastRowOnPage=Rc,this.lbRecordCount=Rc,this.ariaStatus="",this.idPrefix=e}wireBeans(e){this.pagination=e.pagination}postConstruct(){const e=this.idPrefix,t=this.getLocaleTextFunc();this.setTemplate({tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",cls:"ag-paging-row-summary-content",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-first-row`}},{tag:"span",attrs:{id:`${e}-to`},children:t("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-last-row`}},{tag:"span",attrs:{id:`${e}-of`},children:t("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-row-count`}}]}]}),this.refresh()}isZeroPages(){return this.beans.rowModel.isLastRowIndexKnown()&&this.pagination.getTotalPages()===0}refresh(){const{pagination:e,beans:{rowModel:t},gos:i}=this,o=t.isLastRowIndexKnown(),s=e.getMasterRowCount(),r=o?s:null,n=e.getCurrentPage(),l=e.getPageSize(),a=this.getLocaleTextFunc();let d,c;this.isZeroPages()?d=c=0:(d=l*n+1,c=d+l-1,o&&c>r&&(c=r));const u=d+l-1,h=!o&&s<u,g=C=>yc(C,i,this.getLocaleTextFunc.bind(this)),p=g(d);this.lbFirstRowOnPage.textContent=p;let f;h?f=a("pageLastRowUnknown","?"):f=g(c),this.lbLastRowOnPage.textContent=f;let m;o?m=g(r):m=a("more","more"),this.lbRecordCount.textContent=m;const w=a("to","to"),v=a("of","of");this.ariaStatus=`${p} ${w} ${f} ${v} ${m}`;const S=C=>C.replace(/\\/g,"\\\\").replace(/'/g,String.raw`\'`).replace(/\s+/g," ");this.getGui().style.setProperty("--ag-internal-pagination-width-string",`'${m} ${S(w)} ${m} ${S(v)} ${m}'`.replaceAll(/\d/g,"0"))}},CV=["pageSize","rowSummary","pageSummary"],vV=class extends kl{constructor(){super(),this.eContent=iV,this.hasVisiblePanel=!1,this.allowFocusInnerElement=!1,this.lastAriaAnnounced={paginationRow:"",paginationPage:"",paginationPageNumbers:""},this.registerCSS(fV)}postConstruct(){const e=`ag-${this.getCompId()}`;this.setTemplate({tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:e},children:[{tag:"div",cls:"ag-paging-panel-content",ref:"eContent"}]}),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:t=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(t):Ih(this.beans,t),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.buildComponents(e),this.addManagedPropertyListeners(["pagination","suppressPaginationPanel"],()=>this.onPaginationChanged()),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.addManagedPropertyListener("paginationPanels",()=>this.rebuildComponents(e)),this.addManagedEventListeners({paginationChanged:()=>this.onPaginationEvent()}),Ah(this.beans,this,this.getGui()),this.addManagedElementListeners(this.getGui(),{focusin:t=>{const i=t.target;i&&sV(i)}}),this.onPaginationChanged(),this.announceAriaStatus()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}buildComponents(e){const t=this.gos.get("paginationPanels")??CV,i=new Set;for(const o of t){const s=typeof o=="string"?o:o.type;if(!i.has(s)){if(i.add(s),s==="pageSize"){const r=typeof o=="object"&&o.type==="pageSize"?o:void 0;this.pageSizeComp=this.createManagedBean(new aV(r)),this.pageSizeComp.updateVisibility(),this.eContent.appendChild(this.pageSizeComp.getGui())}else if(s==="rowSummary")this.rowSummaryComp=this.createManagedBean(new mV(e)),this.eContent.appendChild(this.rowSummaryComp.getGui());else if(s==="pageSummary"){const r=typeof o=="object"&&o.type==="pageSummary"?o.suppressPageInput:void 0;this.pageSummaryComp=this.createManagedBean(new hV(e,r)),this.eContent.appendChild(this.pageSummaryComp.getGui())}else if(s==="pageNumbers"){const r=this.beans.registry.createDynamicBean("pageNumbers",!0,e);r&&(this.pageNumbersComp=this.createManagedBean(r),this.eContent.appendChild(this.pageNumbersComp.getGui()))}}}this.updateHasVisiblePanel()}updateHasVisiblePanel(){this.hasVisiblePanel=this.rowSummaryComp!=null||this.pageSummaryComp!=null||this.pageNumbersComp!=null||this.pageSizeComp?.shouldShowPageSizeSelector()===!0}rebuildComponents(e){for(const t of[this.pageSizeComp,this.rowSummaryComp,this.pageSummaryComp,this.pageNumbersComp])t&&oV(t.getGui());this.pageSizeComp=this.destroyBean(this.pageSizeComp),this.rowSummaryComp=this.destroyBean(this.rowSummaryComp),this.pageSummaryComp=this.destroyBean(this.pageSummaryComp),this.pageNumbersComp=this.destroyBean(this.pageNumbersComp),this.buildComponents(e),this.onPaginationChanged(),this.announceAriaStatus()}onPaginationChanged(){const e=this.hasVisiblePanel&&this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e)}onPageSizeRelatedOptionsChange(){this.pageSizeComp?.updateVisibility(),this.updateHasVisiblePanel(),this.onPaginationChanged()}onPaginationEvent(){this.rowSummaryComp?.refresh(),this.pageSummaryComp?.refresh(),this.pageNumbersComp?.refresh(),this.announceAriaStatus()}announceAriaStatus(){!this.gos.get("pagination")||this.gos.get("suppressPaginationPanel")||(this.announceIfChanged(this.rowSummaryComp,"paginationRow"),this.announceIfChanged(this.pageSummaryComp,"paginationPage"),this.announceIfChanged(this.pageNumbersComp,"paginationPageNumbers"))}announceIfChanged(e,t){if(!e)return;const i=e.ariaStatus;i!==this.lastAriaAnnounced[t]&&(this.lastAriaAnnounced[t]=i,this.beans.ariaAnnounce?.announceValue(i,t))}},wV={selector:"AG-PAGINATION",component:vV},SV=100,bV=class extends y{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.pageSizeFromPanel=this.getPanelPageSize(),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPanels",this.onPanelsChanged.bind(this))}getPaginationSelector(){return wV}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}getPanelPageSize(){const e=this.gos.get("paginationPanels");if(e)for(let t=0,i=e.length;t<i;++t){const o=e[t];if(typeof o=="object"&&o.type==="pageSize")return o.paginationPageSize}}onPanelsChanged(){const e=this.getPanelPageSize();e!==this.pageSizeFromPanel&&this.setPageSize(e,"panel")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:i}=this.beans;i?.isEditing()&&(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){this.goToPage(Math.max(0,this.totalPages-1))}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){const{pageSizeAutoCalculated:e,pageSizeFromInitialState:t,pageSizeFromPanel:i,pageSizeFromGridOptions:o,pageSizeFromPageSizeSelector:s,gos:r}=this;return(r.get("paginationAutoPageSize")?e:void 0)??s??t??i??o??SV}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"panel":this.pageSizeFromPanel=e,this.applyExplicitPageSize(e);break;case"gridOptions":this.pageSizeFromGridOptions=e,this.applyExplicitPageSize(e);break}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}applyExplicitPageSize(e){e!==void 0&&(this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage())}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!Number.isFinite(Number(t))||Number.isNaN(Number(t))||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const i=this.pageSize,o=t-1;this.totalPages=Math.floor(o/i)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=i*s;let n=i*(s+1)-1;if(n>o&&(n=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),n===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const l=e.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=l-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const t=this.pageSize,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage;this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:o,keepRenderedRows:t})}},Ec={moduleName:"Pagination",version:E,beans:[bV,tV],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:UL,paginationGetPageSize:qL,paginationGetCurrentPage:$L,paginationGetTotalPages:KL,paginationGetRowCount:jL,paginationGoToNextPage:ZL,paginationGoToPreviousPage:QL,paginationGoToFirstPage:YL,paginationGoToLastPage:JL,paginationGoToPage:XL},dependsOn:[Ao]};import{KeyCode as zr,RefPlaceholder as zo,_getActiveDomElement as yV,_setAriaDisabled as RV}from"ag-stack";var EV=5,Wr=3,Wo=5;function L0(e){const t=[];for(let i=0,o=e.length;i<o;++i){const s=e[i];if(i>0){const r=s-e[i-1];r===2?t.push(s-1):r>2&&t.push("ellipsis")}t.push(s)}return t}function xV(e,t,i){const o=Math.max(t,1),s=Math.min(Math.max(e+1,1),o);if(!i){const c=new Set([1]),u=Math.max(s-Math.floor(Wr/2),1);for(let g=0;g<Wr;++g){const p=u+g;p<=o&&c.add(p)}const h=L0([...c].sort((g,p)=>g-p));return h.push("ellipsis"),h}if(t<=1)return[1];if(t<=EV){const c=[];for(let u=1;u<=t;++u)c.push(u);return c}const r=s<=Wo-1,n=s>=t-(Wo-2);let l,a;r?(l=1,a=Wo):n?(l=t-Wo+1,a=Wo):(l=s-Math.floor(Wr/2),a=Wr);const d=new Set([1,t]);for(let c=0;c<a;++c)d.add(l+c);return L0([...d].sort((c,u)=>c-u))}var FV=".ag-paging-page-numbers-panel{align-items:center;display:flex;gap:calc(var(--ag-spacing)*1.5)}.ag-paging-page-numbers{align-items:center;display:flex;gap:calc(var(--ag-spacing)*.5)}.ag-paging-page-number{align-items:center;border-radius:var(--ag-border-radius);cursor:pointer;display:flex;font-variant-numeric:tabular-nums;justify-content:center;min-width:var(--ag-icon-size);padding:var(--ag-spacing)}.ag-paging-page-number:hover{background-color:var(--ag-row-hover-color)}.ag-paging-page-number:focus-visible{box-shadow:var(--ag-focus-shadow)}.ag-paging-page-number-current{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 5%);cursor:default;font-weight:600}.ag-paging-page-number-ellipsis{align-items:center;display:flex;font-variant-numeric:tabular-nums;justify-content:center;min-width:var(--ag-icon-size);padding:var(--ag-spacing);pointer-events:none}",xc="data-page",PV=class extends K{constructor(e){super(),this.eNumbers=zo,this.btFirst=zo,this.btPrevious=zo,this.btNext=zo,this.btLast=zo,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.ariaStatus="",this.idPrefix=e,this.registerCSS(FV)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination}postConstruct(){const e=this.getLocaleTextFunc(),t=(o,s,r)=>({tag:"div",ref:o,cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e(s,r)}});this.setTemplate({tag:"div",cls:"ag-paging-page-numbers-panel",children:[t("btFirst","firstPage","First Page"),t("btPrevious","previousPage","Previous Page"),{tag:"div",ref:"eNumbers",cls:"ag-paging-page-numbers"},t("btNext","nextPage","Next Page"),t("btLast","lastPage","Last Page")]});const i=this.gos.get("enableRtl");this.btFirst.insertAdjacentElement("afterbegin",X(i?"last":"first",this.beans)),this.btPrevious.insertAdjacentElement("afterbegin",X(i?"next":"previous",this.beans)),this.btNext.insertAdjacentElement("afterbegin",X(i?"previous":"next",this.beans)),this.btLast.insertAdjacentElement("afterbegin",X(i?"first":"last",this.beans)),this.initNavButton(this.btFirst,()=>this.onBtFirst()),this.initNavButton(this.btPrevious,()=>this.onBtPrevious()),this.initNavButton(this.btNext,()=>this.onBtNext()),this.initNavButton(this.btLast,()=>this.onBtLast()),this.addManagedListeners(this.eNumbers,{click:o=>this.onPageActivated(o.target),keydown:o=>{(o.key===zr.ENTER||o.key===zr.SPACE)&&(o.preventDefault(),this.onPageActivated(o.target))}}),this.refresh()}initNavButton(e,t){this.activateTabIndex([e]),this.addManagedListeners(e,{click:t,keydown:i=>{(i.key===zr.ENTER||i.key===zr.SPACE)&&(i.preventDefault(),t())}})}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}onPageActivated(e){const t=e?.closest(`[${xc}]`);if(!t)return;const i=Number(t.getAttribute(xc));Number.isInteger(i)&&this.pagination.goToPage(i)}refresh(){const e=this.pagination,t=e.getCurrentPage(),i=e.getTotalPages(),o=this.getLocaleTextFunc(),s=xV(t,i,this.rowModel.isLastRowIndexKnown()),{eNumbers:r}=this,n=r.contains(yV(this.beans));r.replaceChildren();const l=o("page","Page");let a;for(let h=0,g=s.length;h<g;++h){const p=s[h];p==="ellipsis"?r.appendChild(this.createEllipsis(h)):p===t+1?(a=this.createCurrentPage(p,l),r.appendChild(a)):r.appendChild(this.createPageButton(p,l))}n&&a?.focus(),this.updateArrows(t,i);const d=o("of","of"),c=this.formatNumber(i>0?t+1:1),u=this.formatNumber(Math.max(i,1));this.ariaStatus=`${l} ${c} ${d} ${u}`}updateArrows(e,t){const i=this.rowModel.isLastRowIndexKnown(),o=i&&t===0,s=e===t-1;this.previousAndFirstButtonsDisabled=e===0||o,this.nextButtonDisabled=s||o,this.lastButtonDisabled=!i||o||s,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){RV(e,t),e.classList.toggle("ag-disabled",t)}createPageButton(e,t){const i=O({tag:"div",cls:"ag-paging-page-number",role:"button",attrs:{[xc]:String(e-1),"aria-label":`${t} ${e}`}});return i.textContent=this.formatNumber(e),this.activateTabIndex([i]),i}createCurrentPage(e,t){const i=O({tag:"div",cls:"ag-paging-page-number ag-paging-page-number-current",role:"button",attrs:{"aria-current":"page","aria-disabled":"true","aria-label":`${t} ${e}`}});return i.textContent=this.formatNumber(e),this.activateTabIndex([i]),i}createEllipsis(e){const t=O({tag:"span",cls:"ag-paging-page-number-ellipsis",attrs:{id:`${this.idPrefix}-page-ellipsis-${e}`,"aria-hidden":"true"}});return t.textContent="\u2026",t}formatNumber(e){return yc(e,this.gos,this.getLocaleTextFunc.bind(this))}},V0={moduleName:"PaginationPageNumbers",version:E,dynamicBeans:{pageNumbers:PV},dependsOn:[Ec]},DV=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function MV(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function TV(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function AV(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function IV(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function kV(e,t,i){return e.pinnedRowModel?.forEachPinnedRow(t,i)}var H0={moduleName:"PinnedRow",version:E,beans:[Sh],css:[DV],apiFunctions:{getPinnedTopRowCount:MV,getPinnedBottomRowCount:TV,getPinnedTopRow:AV,getPinnedBottomRow:IV,forEachPinnedRow:kV},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}};import{RefPlaceholder as B0,_clearElement as O0,_exists as Fc}from"ag-stack";var LV="\u2191",VV="\u2193",HV={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},BV=class extends K{constructor(){super(HV),this.eValue=B0,this.eDelta=B0,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),o=e.formatValue(i),s=Fc(o)?o:i,r=t>=0,n=this.eDelta;r?n.textContent=LV+s:n.textContent=VV+s,n.classList.toggle("ag-value-change-delta-up",r),n.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),O0(this.eDelta)}refresh(e,t=!1){const{value:i,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:n}=this;if(i===r||(Fc(o)?s.textContent=o:Fc(i)?s.textContent=i:O0(s),n.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=i&&typeof i=="object"&&"toNumber"in i?i.toNumber():i,a=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const d=l-a;this.showDelta(e,d)}return r&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}};import{RefPlaceholder as OV,_clearElement as GV,_exists as G0,_missing as NV}from"ag-stack";var _V=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",zV={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},WV=class extends K{constructor(){super(zV),this.eCurrent=OV,this.refreshCount=0,this.registerCSS(_V)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:i}=this,o=O({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=i.textContent,this.getGui().insertBefore(o,i),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;if(NV(i)&&(i=""),i===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=i;const o=this.eCurrent;return G0(e.valueFormatted)?o.textContent=e.valueFormatted:G0(e.value)?o.textContent=i:GV(o),!0}},UV=class extends y{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,i=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];if(s.delete(e),!e.comp)return;const r=Date.now(),n=r+i,l=r+i+o,a={phase:"flash",flashEndTime:n,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&n+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),i)}),this.nextAnimationTime=n)}advanceAnimations(){const e=Date.now();let t=null;for(const i of Object.keys(this.animations)){const o=this.animations[i],s=`ag-cell-${i}`,r=`${s}-animation`;for(const[n,l]of o){if(!n.isAlive()||!n.comp){o.delete(n);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=n;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(r,!0),p.transition=`background-color ${c-d}ms var(--ag-internal-accessible-color-transition-mode)`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(n);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const i=Ph(e.cellPosition);t.cells[i]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function qV(e,t={}){const{cellFlashSvc:i}=e;i&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))i.flashCell(o,t)})}var N0={moduleName:"HighlightChanges",version:E,beans:[UV],userComponents:{agAnimateShowChangeCellRenderer:BV,agAnimateSlideCellRenderer:WV},apiFunctions:{flashCells:qV}};function $V(e,t,i){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridViewport,s=`aria-${t}`;i===null?o.removeAttribute(s):o.setAttribute(s,i)}function KV(e,t={}){e.frameworkOverrides.wrapIncoming(()=>{const{visibleCols:i,rowRenderer:o}=e;if(i.colSpanColCount!==0||i.rowSpanCols.length!==0){const s=o.getRowCtrls(t.rowNodes);for(let r=0,n=s.length;r<n;++r)s[r].refreshSpans()}o.refreshCells(t)})}function jV(e){e.frameworkOverrides.wrapIncoming(()=>{e.ctrlsSvc.getHeaderRowContainerCtrl()?.refresh()})}function ZV(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function QV(e){e.animationFrameSvc?.flushAllFrames()}function YV(e){return{rowHeight:Ge(e),headerHeight:ro(e)}}function JV(e,t={}){const i=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const n=r.getCellRenderer();n!=null&&i.push(je(n))}if(t.columns?.length)return i;const o=[],s=Za(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(s&&!Qa(r.rowNode,s))continue;const n=r.getModeCellRenderers();if(n!==void 0)for(let l=0,a=n.length;l<a;++l){const d=n[l];d!=null&&o.push(je(d))}}return o.length===0?i:o.concat(i)}var _0={moduleName:"RenderApi",version:E,apiFunctions:{setGridAriaProperty:$V,refreshCells:KV,refreshHeader:jV,isAnimationFrameQueueEmpty:ZV,flushAllAnimationFrames:QV,getSizesForCurrentTheme:YV,getCellRendererInstances:JV}};import{_debounce as XV,_getVerticalPaddingAndBorder as eH,_observeResize as tH}from"ag-stack";var iH=class extends y{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.measured=!1,this._debouncedCalculateRowHeights=XV(this,this.calculateRowHeights.bind(this),1)}wireBeans(e){this.visibleCols=e.visibleCols}get active(){return this.visibleCols.autoHeightCols.length!==0}requestCheckAutoHeight(){this.measured&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const e=this.visibleCols.autoHeightCols;if(e.length===0){this.releaseRowHeights();return}const{rowModel:t,pinnedRowModel:i}=this.beans;let o=!1;const s=r=>{if(Ye(this.gos,r))return;const n=this.getRowContentHeight(r,e);if(n===void 0)return;r.__autoContentHeight=n;const l=Math.max(n,Xo(this.beans,r).height);l!==r.rowHeight&&(r.setRowHeight(l),o=!0)};i?.forEachPinnedRow?.("top",s),i?.forEachPinnedRow?.("bottom",s),t.forEachDisplayedNode?.(s),o&&t.onRowHeightChanged?.()}releaseRowHeights(){this.measured=!1;const{rowModel:e,pinnedRowModel:t}=this.beans;let i=!1;const o=r=>{if(r?.__autoContentHeight===void 0)return;r.__autoContentHeight=void 0;const n=gt(this.beans,r).height;n!==r.rowHeight&&(r.setRowHeight(n),i=!0)},s=r=>{o(r),o(r.sibling),o(r.pinnedSibling)};t?.forEachPinnedRow?.("top",o),t?.forEachPinnedRow?.("bottom",o),e.forEachDisplayedNode?.(o),e.forEachNode(s),i&&e.onRowHeightChanged?.()}getMeasuredRowHeight(e){const t=this.visibleCols.autoHeightCols;if(t.length===0)return;let i=this.getRowContentHeight(e,t);if(!(i===void 0&&(i=e.__autoContentHeight,i===void 0||nr(this.beans,e)!=="Normal")))return Math.max(i,Xo(this.beans,e).height)}getRowContentHeight(e,t){const i=this.beans;let o=0;for(let s=0,r=t.length;s<r;++s){const n=t[s],l=W0(i,n,e);if(l!==null){if(l===void 0){if(this.visibleCols.colSpanColCount!==0&&z0(i.rowRenderer.getRowCtrlByNode(e),n))continue;return}o=Math.max(l,o)}}return o}setRowAutoHeight(e,t,i){e.__autoHeights??(e.__autoHeights={});const o=e.__autoHeights,s=i.colId,r=o[s];if(t==null){delete o[s],r!==void 0&&this.visibleCols.colSpanColCount!==0&&this.requestCheckAutoHeight();return}o[s]=t,this.measured=!0,r!==t&&this.requestCheckAutoHeight()}setupCellAutoHeight(e,t,i){if(Ye(this.gos,e.rowNode)||!e.column.isAutoHeight()||!t)return!1;const o=t.parentElement,{rowNode:s,column:r}=e,n=this.beans,l=c=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!i.isAlive())return;const u=eH(o),g=t.offsetHeight+u;if(c<5){const p=!t.isConnected,f=g==0;if(p||f){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,g,r)},a=()=>l(0);a();const d=tH(n,t,a);return i.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,r)}),!0}areRowsMeasured(){if(!this.active)return!0;const e=this.beans,t=e.rowRenderer.getAllRowCtrls();for(let i=0,o=t.length;i<o;++i){const s=t[i];if(!s.spannedRow&&!oH(e,s))return!1}return!0}},oH=(e,t)=>{const{autoHeightCols:i,colSpanColCount:o}=e.visibleCols,s=t.rowNode,r=s.rowHeight;for(let n=0,l=i.length;n<l;++n){const a=i[n];if(a.pinnedLane!==1)continue;const d=W0(e,a,s);if(d===void 0){if(o===0||!z0(t,a))return!1}else if(d!==null&&r<d)return!1}return!0},z0=(e,t)=>{const i=e?.getCellCtrl(t);return i!=null&&i.column!==t},W0=(e,t,i)=>{const o=e.rowSpanSvc?.getCellSpan(t,i);return o?o.getRowAutoHeight(i):i.__autoHeights?.[t.colId]},U0={moduleName:"RowAutoHeight",version:E,beans:[iH]};import{_debounce as q0}from"ag-stack";var sH=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getRowAutoHeight(e){if(e!==this.lastNode)return null;const t=this.firstNode.__autoHeights?.[this.col.colId];if(t==null)return;let i=0;for(const o of this.spannedNodes)o!==this.lastNode&&(i+=o.rowHeight);return t-i}},rH=class{constructor(e,t){this.beans=e,this.column=t,this.centerValueNodeMap=null,this.topValueNodeMap=null,this.bottomValueNodeMap=null}buildCache(e){const{gos:t,pinnedRowModel:i,rowModel:o,valueSvc:s,pagination:r}=this.beans,n=this.column,l=n.colDef,a=this.getNodeMap(e),d=new Map,c=t.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,m;const w=(S,C)=>{p=S,f=null,m=C},v=S=>{if(Ye(t,S)){w(null,null);return}const C=!S.isExpandable()&&!S.group&&!S.detail&&(c?!c({rowNode:S}):!0);if(S.rowIndex==null||!C){w(null,null);return}if(S.level!==p?.level||S.footer||f&&S.rowIndex-1!==f?.getLastNode().rowIndex){w(S,s.getValueFromData(n,S));return}const b=s.getValueFromData(n,S);if(g){const R=G(t,{valueA:m,nodeA:p,valueB:b,nodeB:S,column:n,colDef:l});if(!h(R)){w(S,b);return}}else if(u?!u(m,b):m!==b){w(S,b);return}if(!f){const R=a?.get(p);R?.firstNode===p?(R.reset(),f=R):f=new sH(n,p),d.set(p,f)}f.addSpannedNode(S),d.set(S,f)};switch(e){case"center":o.forEachDisplayedNode?.(S=>{(!r||r.isRowInPage(S.rowIndex))&&v(S)}),this.centerValueNodeMap=d;break;case"top":i?.forEachPinnedRow("top",v),this.topValueNodeMap=d;break;case"bottom":i?.forEachPinnedRow("bottom",v),this.bottomValueNodeMap=d;break}}getCellSpan(e){return this.getNodeMap(e.rowPinned)?.get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},nH=class extends y{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.active=!1,this.spanningColumns=null,this.debouncePinnedEvent=q0(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=q0(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){if(!this.gos.get("enableCellSpan"))return;this.active=!0;const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){let t=this.spanningColumns;if(!t)t=new Map,this.spanningColumns=t;else if(t.has(e))return;const i=new rH(this.beans,e);t.set(e,i),this.buildCache(i)}columnRowSpanChanged(e){if(!this.active)return;const t=this.spanningColumns?.get(e);if(e.colDef.spanRows){if(!t){this.register(e);return}this.buildCache(t)}else t&&this.deregister(e)}refreshCols(){if(this.active){const e=this.beans.colModel.colsList;for(let t=0,i=e.length;t<i;++t){const o=e[t];o.colDef.spanRows&&this.register(o)}}}buildCache(e){e.buildCache("top"),e.buildCache("bottom"),e.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.isAlive()&&this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns?.delete(e)}onRowDataUpdated({node:e}){const t=this.beans.spannedRowRenderer;if(e.rowPinned){this.pinnedTimeout??(this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0));return}this.modelTimeout??(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.clearModelTimeout();const e=this.spanningColumns;if(e)for(const t of e.values())t.buildCache("center");this.debounceModelEvent()}buildPinnedCaches(){this.clearPinnedTimeout();const e=this.spanningColumns;if(e)for(const t of e.values())t.buildCache("top"),t.buildCache("bottom");this.debouncePinnedEvent()}isCellSpanning(e,t){return!!this.spanningColumns?.get(e)?.getCellSpan(t)}getCellSpanByPosition(e){const{column:t,rowIndex:i}=e,o=this.spanningColumns?.get(t);if(!o)return;const{pinnedRowModel:s,rowModel:r}=this.beans;let n;switch(e.rowPinned){case"top":n=s?.getPinnedTopRow(i);break;case"bottom":n=s?.getPinnedBottomRow(i);break;default:n=r.getRow(i)}return n&&o.getCellSpan(n)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){return this.spanningColumns?.get(e)?.getCellSpan(t)}forEachSpannedColumn(e,t){const i=this.spanningColumns;if(i)for(const o of i.values()){const s=o.getCellSpan(e);s&&t(o.column,s)}}clearModelTimeout(){const e=this.modelTimeout;e!=null&&(this.modelTimeout=null,clearTimeout(e))}clearPinnedTimeout(){const e=this.pinnedTimeout;e!=null&&(this.pinnedTimeout=null,clearTimeout(e))}destroy(){super.destroy(),this.active=!1,this.spanningColumns=null,this.clearPinnedTimeout(),this.clearModelTimeout()}};import{_setAriaRowIndex as lH,_setAriaRowSpan as aH}from"ag-stack";var dH=class extends Ri{constructor(e,t,i){super(e.col,e.firstNode,i,t,e),this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell";const o=this.refreshSpan.bind(this);this.addManagedListeners(i.eventSvc,{paginationChanged:o,recalculateRowBounds:o,pinnedHeightChanged:o})}setComp(e,t,i,o,s,r,n){this.eWrapper=i,super.setComp(e,t,i,o,s,r,n),this.refreshSpan()}refreshAriaRowIndex(){const{eGui:e,rowCtrl:t}=this,i=t.getAriaRowIndex();!e||i==null||lH(e,i)}refreshSpan(){const e=this.eGui;if(!e)return;const t=this.cellSpan;e.style.height=`${t.getCellHeight()}px`,aH(e,t.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(oo(t)){this.focusedCellPosition=void 0;return}const i=this.isCellFocused();i||(this.focusedCellPosition=void 0),e&&i&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},cH=class extends rr{constructor(){super(...arguments),this.spannedRow=!0}getInitialRowClasses(){const{rowNode:e,beans:t}=this,i=["ag-spanned-row",this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"];return e.isRowPinned()?(i.push("ag-row-pinned"),t.pinnedRowModel?.isManual()&&i.push("ag-row-pinned-manual")):e.pinnedSibling&&i.push("ag-row-pinned-source"),i}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new dH(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.cellSpan===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},uH=class extends y{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,i=this.getCtrlsMap(e),o=this.getAllRelevantRowControls(e),s=new Map;let r=!1;try{for(const l of o)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(a,d)=>{if(s.has(d.firstNode))return;const c=i.get(d.firstNode);if(c){s.set(d.firstNode,c);return}r=!0;const u=new cH(d.firstNode,this.beans,!1,!1,!1);s.set(d.firstNode,u)})}catch(l){throw $0(s,i),l}this.setCtrlsMap(e,s);const n=s.size===i.size;!r&&n||($0(i,s),this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e}))}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,i=t?.getCellSpanByPosition(e);if(!i)return;const o=this.getCtrlsMap(e.rowPinned).get(i.firstNode);if(o)return o.getOwnCellCtrl(i.col)}refreshRowsOf(e){this.topCtrls.get(e)?.refreshRow(),this.bottomCtrls.get(e)?.refreshRow(),this.centerCtrls.get(e)?.refreshRow()}getCtrls(e){return[...this.getCtrlsMap(e).values()]}pushAllCtrls(e){for(const t of this.topCtrls.values())e.push(t);for(const t of this.bottomCtrls.values())e.push(t);for(const t of this.centerCtrls.values())e.push(t)}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}};function $0(e,t){for(const i of e.values())t.get(i.rowNode)!==i&&(i.destroyFirstPass(!0),i.destroySecondPass())}var K0={moduleName:"CellSpan",version:E,beans:[nH,uH]},j0=class extends y{constructor(){super(...arguments),this.column=null}destroy(){this.destroyColumn(),super.destroy()}refreshCols(){const e=this.isEnabled(),t=this.column;if(e&&!t){const i=this.createColDef(),o=i.colId;this.gos.validateColDef(i,o,!0);const s=new Gt(i,null,o,!1,this.colKind);return this.beans.context.createBean(s),this.column=s,s}return!e&&t?(this.destroyColumn(),null):t}refreshColDef(e){const t=this.column;if(!t)return;const i=this.beans,o=i.colModel;o.beginColUpdate();try{const s=t.colDef.width,r=this.createColDef();if(!t.setColDef(r,null,e))return;const n=Hu(i,r,t.colId),l=n.flex;l!=null&&l<=0&&(n.flex=null);const a=n.width;((l===void 0?t.flex:l)??0)>0?n.width=void 0:a==null||this.keepsColDefWidth(t,a,s)?n.width=Math.max(t.actualWidth,t.minWidth):(n.width=Math.max(a,t.minWidth),t.resetWidthOwnership()),tt(i,{state:[n]},e,!0)}finally{o.endColUpdate()}}keepsColDefWidth(e,t,i){return!1}destroyColumn(){const e=this.column;e&&(this.column=null,e.isAlive()&&e.destroy())}},hH=class extends j0{constructor(){super(...arguments),this.beanName="selectionColSvc",this.colKind="selection"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,zt(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}updateColumns(e){this.refreshColDef(zt(e.source))}isEnabled(){const{gos:e,beans:t}=this,i=e.get("rowSelection");if(typeof i!="object"||!Je(e)||i.checkboxLocation==="autoGroupColumn"&&t.autoColSvc?.columns.length)return!1;const o=!!Ot(i),s=Hi(i);return o||s}createColDef(){const{gos:e}=this,t=e.get("selectionColumnDef"),i=e.get("enableRtl"),{rowSpan:o,spanRows:s,...r}=t??{};return{initialWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator:gH,editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,...r,colId:rs,chartDataType:"excluded"}}onSelectionOptionsChanged(e,t,i){const o=t&&typeof t!="string"?Ot(t):void 0,s=e&&typeof e!="string"?Ot(e):void 0,r=o!==s,n=t&&typeof t!="string"?Hi(t):void 0,l=e&&typeof e!="string"?Hi(e):void 0,a=n!==l,d=Bi(e),c=Bi(t);(r||a||d!==c)&&this.beans.colModel.refreshAll(i)}},gH=(e,t,i,o)=>{const s=i.isSelected(),r=o.isSelected();return s===r?0:s?1:-1},pH=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:where(:not(.ag-disabled)){cursor:pointer}:where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";inset:-8px;position:absolute}';function fH(e,t){const i=t.nodes.filter(n=>!!n);if(!i.length||!i.every(n=>n.rowPinned&&!ir(n)?(e.log.warn(59),!1):n.id===void 0?(e.log.warn(60),!1):!0))return;const{source:s,newValue:r}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:s??"api",newValue:r})}function mH(e,t,i="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:i,selectAll:t})}function CH(e,t,i="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:i,selectAll:t})}function vH(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function wH(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function SH(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function bH(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function yH(e){return e.selectionSvc?.getSelectedNodes()??[]}function RH(e){return e.selectionSvc?.getSelectedRows()??[]}var Z0=(e,t)=>{for(let i=0,o=e.length;i<o;++i){const s=e[i],r=s.childrenAfterGroup;r!==null&&(Z0(r,t),t(s))}},Ur=(e,t,i,o)=>{if(i!=null){const r=i.getSortedRows();for(let n=0,l=r.length;n<l;++n){const a=r[n];a.childrenAfterGroup!==null&&!a.destroyed&&o(a)}return}if(e==null)return;const s=e.childrenAfterGroup;s!==null&&(t&&Z0(s,o),o(e))};import{_getActiveDomElement as EH,_setAriaSelected as xH}from"ag-stack";var FH={clickToggleSelection:!0,spaceKeyFollowsClickSelection:!0,grandTotalRowUnselectable:!0};function qr(e,t){const i=e.internalFeatureFlags?.flags[t];return i!==void 0?i:!!e.studio&&FH[t]}import{RefPlaceholder as PH,_getAriaCheckboxStateName as DH}from"ag-stack";var MH={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},TH=class extends K{constructor(){super(MH,[zs]),this.eCheckbox=PH}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,o=t.isSelected(),s=DH(e,o),[r,n]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],l=e(r,n);i.setValue(o,!0),i.setInputAriaLabel(`${l} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:bt,click:r=>{bt(r),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(r,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:r,previousValue:n})=>{const l=typeof r=="object"?ln(r):void 0,a=typeof n=="object"?ln(n):void 0;l!==a&&this.onSelectableChanged()}),es(this.gos)??typeof this.getIsVisible()=="function"){const r=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:r}),this.addManagedListeners(this.rowNode,{dataChanged:r,cellChanged:r}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1");const{rowNode:o,beans:s}=this;s.selectionSvc?.registerCheckbox(o,this),this.addDestroyFunc(()=>s.selectionSvc?.unregisterCheckbox(o,this))}isEnabledIn(e){return this.column===e&&this.isDisplayed()&&!this.eCheckbox.isDisabled()}showOrHideSelect(){const{column:e,rowNode:t,overrides:i,gos:o}=this,s=t.selectable,r=this.getIsVisible();let n;if(typeof r=="function"){const u=i?.callbackParams;if(!e)n=r({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);n=r({...u,...h})}}else n=r??!1;const l=s&&!n||!s&&n,a=s||n,d=o.get("rowSelection"),c=d&&typeof d!="string"?!ln(d):!!e?.colDef.showDisabledCheckboxes;this.setVisible(a&&(l?c:!0)),this.setDisplayed(a&&(l?c:!0)),a&&this.eCheckbox.setDisabled(l),i?.removeHidden&&this.setDisplayed(a)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?Ot(t):this.column?.colDef?.checkboxSelection}},AH=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null}reset(){this.rootId=null,this.endId=null}setRoot(e){this.rootId=e.id,this.endId=null}setEndRange(e){this.endId=e.id}getRange(){const e=this.getRoot(),t=this.getEnd();return e==null||t==null?[]:this.getNodesInRange(e,t)??[]}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:i,pinnedRowModel:o}=this;return t??(t=i.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}isRangeStartTheRoot(e){const{rootId:t}=this;return t===null?!1:e.id===t?!0:qn(this.getRowNode(t))?.id===e.id}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const i=this.isRangeStartTheRoot(t[0]),o=t.findIndex(s=>s.id===e.id);if(o>-1){const s=t.slice(0,o),r=t.slice(o+1);return this.setEndRange(e),i?{keep:s,discard:r}:{keep:r,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const i=this.getRoot();if(i==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(r=>!r.group&&s.push(r)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const o=this.getNodesInRange(i,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.some(s=>s.id===this.endId))return this.setEndRange(e),{keep:o,discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:o,discard:s}}}getNodesInRange(e,t){const{pinnedRowModel:i,rowModel:o}=this;if(!i?.isManual())return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned){const s=xe(i,"top",e,void 0),r=o.getNodesInRangeForSelection(o.getRow(0),t);return r===null?null:s.concat(r)}if(e.rowPinned==="bottom"&&!t.rowPinned){const s=xe(i,"bottom",void 0,e),r=o.getRowCount(),n=o.getRow(r-1),l=o.getNodesInRangeForSelection(t,n);return l===null?null:l.concat(s)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return xe(i,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const s=xe(i,"top",t,void 0),r=xe(i,"bottom",void 0,e),n=o.getRow(0),l=o.getRow(o.getRowCount()-1),a=o.getNodesInRangeForSelection(n,l);return a===null?null:s.concat(a).concat(r)}if(!e.rowPinned&&t.rowPinned==="top"){const s=xe(i,"top",t,void 0),r=o.getNodesInRangeForSelection(o.getRow(0),e);return r===null?null:s.concat(r)}if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const s=xe(i,"top",e,void 0),r=xe(i,"bottom",void 0,t),n=o.getRow(0),l=o.getRow(o.getRowCount()-1),a=o.getNodesInRangeForSelection(n,l);return a===null?null:s.concat(a).concat(r)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return xe(i,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const s=xe(i,"bottom",void 0,t),r=o.getRow(o.getRowCount()-1),n=o.getNodesInRangeForSelection(e,r);return n===null?null:n.concat(s)}return null}};import{_getActiveDomElement as IH,_getAriaCheckboxStateName as kH,_setAriaRole as LH}from"ag-stack";var VH=class extends y{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(IH(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new vo);this.cbSelectAll=t,t.addCss("ag-header-select-all"),LH(t.getGui(),"presentation"),this.showOrHideSelectAll();const i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:s})=>{const r=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;r(o)!==r(s)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,i=this.cbSelectAll,o=t.getSelectAllState(e);i.setValue(o);const s=t.hasNodesToSelect(e);i.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:o,cbSelectAllVisible:s}=this,r=o.getValue(),n=kH(t,r),l=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",s?`${l} (${n})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return ai(this.gos)?!0:(this.warn(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:i}=this.beans;return ie(t)||ht(t)?!0:(this.warn(129,{feature:e,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let i="uiSelectAll";t==="currentPage"?i="uiSelectAllCurrentPage":t==="filtered"&&(i="uiSelectAllFiltered");const o={source:i,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(o):s.deselectAllRowNodes(o)}isCheckboxSelection(){const{column:e,gos:t,beans:i}=this,r=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return Q0(i,e)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){const e=eu(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.colDef;return t?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function Q0({gos:e,selectionColSvc:t},i){const o=e.get("rowSelection"),s=i.colDef,{headerCheckboxSelection:r}=s;let n=!1;if(typeof o=="object"){const a=Yi(i),d=Hn(i);(Bi(o)==="autoGroupColumn"&&d||a&&t?.isEnabled())&&(n=Hi(o))}else typeof r=="function"?n=r(G(e,{column:i,colDef:s})):n=!!r;return n}var Y0=class extends y{constructor(){super(...arguments),this.checkboxes=new Map}postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new AH(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const o=es(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=es(e);const i=t.rowModel;this.addManagedEventListeners({cellValueChanged:o=>this.updateRowSelectable(o.node),rowNodeDataChanged:o=>{i.refreshingData||this.updateRowSelectable(o.node)}})}destroy(){super.destroy(),this.selectionCtx.reset(),this.checkboxes.clear()}createCheckboxSelectionComponent(){return new TH}registerCheckbox(e,t){if(!qr(this.beans,"spaceKeyFollowsClickSelection"))return;const i=this.checkboxes;let o=i.get(e);o||(o=new Set,i.set(e,o)),o.add(t)}unregisterCheckbox(e,t){const i=this.checkboxes.get(e);i?.delete(t)&&i.size===0&&this.checkboxes.delete(e)}createSelectAllFeature(e){if(Q0(this.beans,e))return new VH(e)}isMultiSelect(){return ai(this.gos)}onRowCtrlSelected(e,t){const i=e.getGui();if(!i)return;const o=!!e.rowNode.isSelected();i.rowComp.toggleCss("ag-row-selected",o);const s=i.element;xH(s,o),s.contains(EH(this.beans))&&t()}announceAriaRowSelection(e,t){if(this.isRowSelectionBlocked(e))return;const{beans:i}=this,o=e.isSelected(),s=i.editSvc?.isEditing({rowNode:e});if(!e.selectable||s||this.isSpaceKeyBlocked(e,t,!o))return;const n=this.getLocaleTextFunc()(o?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${o?"deselect":"select"} this row`);i.ariaAnnounce?.announceValue(n,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!ir(e)||!Je(this.gos)||!!e.footer&&e.level===-1&&qr(this.beans,"grandTotalRowUnselectable")}updateRowSelectable(e,t){const i=e.pinnedSibling,o=e.rowPinned&&i?i.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,o,t),o}setRowSelectable(e,t,i){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),i)return;if(di(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,i=!1;const o=e.childrenAfterGroup;if(!o?.length)return e.selectable?e.__selected:null;for(let s=0,r=o.length;s<r;s++){const n=o[s];let l=n.isSelected();if(!n.selectable){const a=this.calculateSelectedFromChildren(n);if(a===null)continue;l=a}switch(l){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!(t&&i))return t?!0:i?!1:e.selectable?e.__selected:null}selectRowNode(e,t,i,o="api"){if(t&&e.destroyed)return!1;const s=!e.selectable&&t,r=e.__selected===t;if(s||r)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const n=e.sibling;n&&n.footer&&n.__localEventService&&n.dispatchRowEvent("rowSelected");const l=e.pinnedSibling;return l?.rowPinned&&l.__localEventService&&l.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Un(e,this.gos,"rowSelected"),event:i??null,source:o}),!0}isCellCheckboxSelection(e,t){const i=this.gos.get("rowSelection");if(i&&typeof i!="string"){const o=Yi(e)&&Ot(i);return e.isColumnFunc(t,o)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,i,o,s){const{gos:r,selectionCtx:n}=this,l=e.isSelected(),a=di(r),d=Jc(r),c=Xc(r),u=qr(this.beans,"clickToggleSelection"),h=this.isMultiSelect(),g=o==="rowClicked",p=g||this.isSpaceKeyClickGated(o,e,s);if(p&&!(d||c))return null;const f=m=>p&&(m?!d:!c);if(t&&i&&h){const m=n.getRoot();if(m)if(m.isSelected()){const w=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:w.discard,select:w.keep,reset:!1}}else{const w=n.extend(e,a);return{select:[],deselect:w.keep,reset:!1}}else return null}else if(t&&h){const m=n.selectAll?this.beans.rowModel.getRow(0):void 0,w=n.getRoot(m),v=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:v.keep,deselect:v.discard,reset:n.selectAll||!!(w&&!w.isSelected())}}else if(i){const m=!l;return f(m)?null:(n.setRoot(e),{node:e,newValue:m,clearSelection:!g&&!h})}else{n.setRoot(e);const m=dS(r),w=Gi(r)==="filteredDescendants",v=g&&(!m||!d);if(w&&l===void 0&&ie(r))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!h||v};if(g){const C=l?!(m||u&&this.isSoleSelection(e.primaryRow)):d;return C===l&&!v||f(C)?null:{node:e,newValue:C,clearSelection:!h||v,keepDescendants:e.group&&a}}const S=!l;return f(S)?null:{node:e,newValue:S,clearSelection:!h||v}}}isSpaceKeyBlocked(e,t,i){const{gos:o}=this;return this.isSpaceKeyClickGated("spaceKey",e,t)&&(i?!Jc(o):!Xc(o))}isSpaceKeyClickGated(e,t,i){return e==="spaceKey"&&qr(this.beans,"spaceKeyFollowsClickSelection")&&!this.isSelectionCheckboxShown(t,i)}isSelectionCheckboxShown(e,t){for(const i of this.checkboxes.get(e)??[])if(i.isEnabledIn(t))return!0;return!1}},HH=class extends Y0{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1,this.selectionBatchDepth=0,this.pendingSelectionChanged=!1,this.pendingSelectionSource=null}postConstruct(){super.postConstruct();const{gos:e}=this;this.csrm=Ve(this.beans),this.mode=Oi(e),this.groupSelectsDescendants=di(e),this.groupSelectsFiltered=Gi(e)==="filteredDescendants",this.masterSelectsDetail=tu(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=di(e),i=Oi(e),o=Gi(e)==="filteredDescendants";this.masterSelectsDetail=tu(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=i)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,i,o){if(this.isRowSelectionBlocked(t))return 0;const s=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,i,o);if(s==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in s)return s.reset?this.resetNodes(e):this.selectRange(s.deselect,!1,i,e),this.selectRange(s.select,!0,i,e);{const r=s.checkFilteredNodes?e1(s.node):s.newValue;return this.setNodesSelected({nodes:[s.node],newValue:r,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:e,source:i})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:i,nodes:o,event:s,source:r,keepDescendants:n=!1}){const l=o.length;if(l===0)return 0;const{gos:a}=this;if(!Je(a)&&e)return this.warn(132),0;const d=this.isMultiSelect();if(l>1&&!d)return this.warn(130),0;let c=0;for(let u=0;u<l;u++){const g=o[u].primaryRow;if(g.rowPinned&&!ir(g)){this.warn(59);continue}if(g.id===void 0){this.warn(60);continue}if(e&&g.destroyed)continue;this.groupSelectsFiltered&&g.group&&!a.get("treeData")||this.selectRowNode(g,e,s,r)&&(this.detailSelection.delete(g.id),c++),this.groupSelectsDescendants&&g.childrenAfterGroup?.length&&(c+=this.selectChildren(g,e,r,s))}return i||(l===1&&r==="api"&&this.selectionCtx.setRoot(o[0].primaryRow),e&&(t||!d)&&(c+=this.clearOtherNodes(o[0].primaryRow,n,r)),c>0&&(this.updateGroupsFromChildrenSelections(r,void 0,s),this.dispatchSelectionChanged(r))),c}selectRange(e,t,i,o){let s=0;for(let r=0,n=e.length;r<n;++r){const l=e[r].primaryRow;l.group&&this.groupSelectsDescendants||this.selectRowNode(l,t,o,i)&&s++}return s>0&&(this.updateGroupsFromChildrenSelections(i,void 0,o),this.dispatchSelectionChanged(i)),s}selectChildren(e,t,i,o){const s=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return s?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:i,event:o,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];for(const t of this.selectedNodes.values()){const i=t.data;i!=null&&e.push(i)}return e}getSelectionCount(){return this.selectedNodes.size}isSoleSelection(e){const{selectedNodes:t}=this;if(e.isSelected()!==!0)return!1;if(!this.groupSelectsDescendants)return t.size===1&&t.get(e.id)===e;for(const i of t.values())if(i!==e&&!X0(e,i))return!1;return!0}removeFromSelection(e,t){const i=e.id,o=this.selectedNodes;e.__selected&&o.get(i)===e&&(o.delete(i),this.detailSelection.delete(i),e.__selected=!1,this.pendingSelectionChanged=!0,this.pendingSelectionSource??(this.pendingSelectionSource=t))}updateGroupsFromChildrenSelections(e,t,i){return this.rollUpGroupSelection(e,t,i,!1)}rollUpGroupSelection(e,t,i,o){if(!this.groupSelectsDescendants)return!1;const s=this.csrm;if(!s)return!1;const r=s.rootNode;if(!r)return!1;let n=!1;const l=this.selectedNodes,a=o&&this.gos.get("treeData"),d=this.detailSelection,c=u=>{if(a){const h=u.childrenAfterGroup;for(let g=0,p=h.length;g<p;++g){const f=h[g],m=f.__selected;m!==!1&&!f.group&&!(m===void 0&&d.has(f.id))&&l.get(f.id)!==f&&(n=this.selectRowNode(f,!1,i,e)||n)}}if(u!==r){const h=u.id;o&&l.get(h)===u&&(l.delete(h),n=!0);const g=this.calculateSelectedFromChildren(u);n=this.selectRowNode(u,g===null?!1:g,i,e)||n}};return Ur(r,s.hierarchical,t,c),n}clearOtherNodes(e,t,i){const o=new Map;let s=0;for(const r of this.selectedNodes.values()){const n=r.id==e.id;(!t||!X0(e,r))&&!n&&(s+=this.setNodesSelected({nodes:[r],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&r.parent&&o.set(r.parent.id,r.parent))}for(const r of o.values()){const n=this.calculateSelectedFromChildren(r);this.selectRowNode(r,n===null?!1:n,void 0,i)}return s}selectRowNode(e,t,i,o="api"){const s=super.selectRowNode(e,t,i,o);if(s&&!(this.groupSelectsDescendants&&e.group)){const r=this.selectedNodes;e.isSelected()?r.set(e.id,e):r.delete(e.id)}return s}syncInRowNode(e,t){const i=this.selectedNodes,o=t?.id;o!=null&&o!==e.id&&i.get(o)===e&&i.set(o,t);const s=e.id,r=i.has(s);e.__selected=r,r&&i.set(s,e)}createDaemonNode(e){if(!e.id)return;const t=new ze(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}reset(e){this.selectedNodes.size&&(this.resetNodes(),this.dispatchSelectionChanged(e))}resetNodes(e){const t=this.selectedNodes;for(const i of t.values())this.selectRowNode(i,!1,e);t.clear()}getBestCostNodeSelection(){const e=this.csrm;if(!e)return;const t=e.getTopLevelNodes();if(t===null)return;const i=[];function o(s){for(let r=0,n=s.length;r<n;r++){const l=s[r];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(t),i}isEmpty(){return this.selectedNodes.size===0}deselectAllRowNodes({source:e,selectAll:t}){const i=this.csrm;let o=!1;const s=r=>{this.selectRowNode(r.primaryRow,!1,void 0,e)&&(o=!0)};if(t==="currentPage"||t==="filtered"){if(!i){this.error(102);return}const r=this.getNodesToSelect(t);for(let n=0,l=r.length;n<l;++n)s(r[n])}else this.selectedNodes.forEach(s),this.selectedNodes.clear();if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);o||(o=r)}o&&this.dispatchSelectionChanged(e)}getSelectAllState(e){let t=0,i=0;const o=this.getNodesToSelect(e);for(let s=0,r=o.length;s<r;++s){const n=o[s];this.groupSelectsDescendants&&n.group||(n.isSelected()?t++:n.selectable&&i++)}return J0(t,i)??null}hasNodesToSelect(e){const t=this.getNodesToSelect(e);for(let i=0,o=t.length;i<o;++i)if(t[i].selectable)return!0;return!1}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],i=s=>t.push(s);if(e==="currentPage")return this.forEachNodeOnPage(s=>{if(!s.group){i(s);return}if(!s.footer&&!s.expanded){const r=n=>{i(n);const l=n.childrenAfterFilter;if(l)for(let a=0,d=l.length;a<d;++a)r(l[a])};r(s);return}this.groupSelectsDescendants||i(s)}),t;const o=this.beans.rowModel;return e==="filtered"?(o.forEachNodeAfterFilter(i),t):(o.forEachNode(i),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:i}=this.beans,o=t.getFirstRow(),s=t.getLastRow();for(let r=o;r<=s;r++){const n=i.getRow(r);n&&e(n)}}selectAllRowNodes(e){const{gos:t,selectionCtx:i}=this;if(!Je(t)){this.warn(132);return}if(Qc(t)&&!ai(t)){this.warn(130);return}if(!this.canSelectAll())return;const{source:o,selectAll:s}=e;let r=!1;const n=this.getNodesToSelect(s);for(let l=0,a=n.length;l<a;++l)r=this.selectRowNode(n[l].primaryRow,!0,void 0,o)||r;if(i.selectAll=!0,this.csrm&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(o);r||(r=l)}r&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,i){if(e??(e=[]),!Array.isArray(e)){this.error(103);return}const o=[],s=this.csrm,r=new Set(e);if(s)for(const n of r){const l=s.getRowNode(n);l&&o.push(l)}else this.beans.rowModel.forEachNode(n=>{r.has(n.id)&&o.push(n)});i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return!!this.csrm}recomputeSelectable(e){const t=this.updateRowSelectable(e,!0);return!t&&e.isSelected()&&this.selectRowNode(e,!1,void 0,"selectableChanged")&&(this.detailSelection.delete(e.id),this.dispatchSelectionChanged("selectableChanged")),t}updateSelectable(e,t){const{gos:i,rowModel:o}=this.beans;if(!Je(i))return;const s=this.csrm,r=!!s&&this.groupSelectsDescendants,n=s?s.rootNode:null,l=t?.adds,a=t?.updates;++this.selectionBatchDepth;try{if(!s)o.forEachNode(d=>this.recomputeSelectable(d));else if(r)Ur(n,o.hierarchical,e,d=>{let c=!1;const u=d.childrenAfterGroup;for(let h=0,g=u.length;h<g;++h){const p=u[h],f=!p.group&&(!l||l.has(p)||a.has(p))?this.recomputeSelectable(p):p.selectable;c||(c=f)}this.setRowSelectable(d,c,!0)});else if(e||!l)Ur(n,o.hierarchical,e,d=>{d!==n&&this.recomputeSelectable(d);const c=d.childrenAfterGroup;for(let u=0,h=c.length;u<h;++u){const g=c[u];!g.group&&(!l||l.has(g)||a.has(g))&&this.recomputeSelectable(g)}});else{for(const d of l)this.recomputeSelectable(d);for(const d of a)this.recomputeSelectable(d)}!e&&r&&this.updateGroupsFromChildrenSelections?.("selectableChanged")}finally{this.endSelectionBatch()}}updateSelectableAfterGrouping(e,t){++this.selectionBatchDepth;try{this.isRowSelectable&&this.updateSelectable(e,t),this.groupSelectsDescendants&&this.rollUpGroupSelection("rowGroupChanged",e,void 0,!0)&&this.dispatchSelectionChanged("rowGroupChanged")}finally{this.endSelectionBatch()}}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail||!e.expanded)return;const i=e.detailNode?.detailGridInfo?.api;if(!i)return;const o=i.getDisplayedRowCount();if(o===0&&e.isSelected()===void 0)return;const s=BH(i);e.isSelected()!==s&&this.selectRowNode(e,s,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!s&&o>0&&this.detailSelection.set(e.id,new Set(i.getSelectedNodes().map(n=>n.id)))}setDetailSelectionState(e,t,i){if(!this.masterSelectsDetail)return;if(!ai(t)){this.warn(269);return}const o=this.detailSelection.get(e.id),s=()=>{if(!o?.size)return!1;const r=[];for(const n of o){const l=i.getRowNode(n);l&&r.push(l)}return r.length?(i.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"}),!0):!1};switch(e.isSelected()){case!0:{i.selectAll();break}case!1:{i.deselectAll();break}case void 0:{s();break}default:break}}dispatchSelectionChanged(e){if(this.selectionBatchDepth>0){this.pendingSelectionChanged=!0,this.pendingSelectionSource??(this.pendingSelectionSource=e);return}this.pendingSelectionChanged=!1,this.pendingSelectionSource=null,this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}flushPendingSelectionChanged(){this.selectionBatchDepth===0&&this.pendingSelectionChanged&&this.dispatchSelectionChanged(this.pendingSelectionSource)}endSelectionBatch(){--this.selectionBatchDepth===0&&this.flushPendingSelectionChanged()}};function BH(e){let t=0,i=0;return e.forEachNode(o=>{o.isSelected()?++t:o.selectable&&++i}),J0(t,i)}function J0(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function X0(e,t){let i=t.parent;for(;i;){if(i===e)return!0;i=i.parent}return!1}function e1(e){if(e.isSelected()===!1)return!0;const t=e.childrenAfterFilter;if(t){for(let i=0,o=t.length;i<o;++i)if(e1(t[i]))return!0}return!1}var t1={moduleName:"SharedRowSelection",version:E,beans:[hH],css:[pH],apiFunctions:{setNodesSelected:fH,selectAll:mH,deselectAll:CH,selectAllFiltered:vH,deselectAllFiltered:wH,selectAllOnCurrentPage:SH,deselectAllOnCurrentPage:bH,getSelectedNodes:yH,getSelectedRows:RH}},i1={moduleName:"RowSelection",version:E,rowModels:["clientSide","infinite","viewport"],beans:[HH],dependsOn:[t1]};function OH(e,t){s1(e,t),o1(e,t),r1(e,t)}function o1(e,t){const{column:i,comp:o}=t,s=i.colDef,r=s.cellClassRules,n=Pc(e,t,s);qa(e.expressionSvc,r===t.customStyleClassRules?void 0:t.customStyleClassRules,r,n,l=>o.toggleCss(l,!0),l=>o.toggleCss(l,!1)),t.customStyleClassRules=r}function s1(e,t){const i=t.column.colDef,o=i.cellStyle;if(!o)return;let s;typeof o=="function"?s=o(Pc(e,t,i)):s=o,s&&t.comp.setUserStyles(s)}function r1(e,t){const{column:i,comp:o}=t,s=i.colDef,r=Pc(e,t,s),n=t.customStyleStaticClasses;if(n)for(const a of n)o.toggleCss(a,!1);const l=e.cellStyles.getStaticCellClasses(s,r);t.customStyleStaticClasses=l;for(const a of l)o.toggleCss(a,!0)}function Pc(e,t,i){const{value:o,rowNode:s,column:r}=t;return G(e.gos,{value:o,data:s.data,node:s,colDef:i,column:r,rowIndex:s.rowIndex})}var GH=class extends y{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,i,o){qa(this.beans.expressionSvc,void 0,e.cellClassRules,t,i,o),this.processStaticCellClasses(e,t,i)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let o;return typeof i=="function"?o=i(t):o=i,typeof o=="string"&&(o=[o]),Array.isArray(o)?o:[]}setupCellCustomStyle(e){OH(this.beans,e)}applyCellUserStyles(e){s1(this.beans,e)}applyCellClassesFromColDef(e){r1(this.beans,e)}applyCellClassRules(e){o1(this.beans,e)}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(s=>{i(s)})}},n1={moduleName:"CellStyle",version:E,beans:[GH]},l1={moduleName:"RowStyle",version:E,beans:[XD]},NH={moduleName:"AllCommunity",version:E,dependsOn:[ea,LC,x0,qv,$v,Kv,jv,Zv,Qv,Yv,Uv,w0,S0,b0,y0,v0,R0,E0,k0,pC,Ec,V0,ma,vC,wC,_0,PC,zp,H0,i1,tC,n1,DC,l1,F0,iC,N0,cd,D0,U0,_p,Vp,K0,EC]},_H=["deprecation","warning","error"],Uo={throwOn:[],showOverlayOn:[..._H],suppress:[],debug:!1},a1=Uo.showOverlayOn;function d1(){return a1}function zH(e){ap({capture:!0,throwOn:e?.throwOn??Uo.throwOn,suppress:e?.suppress??Uo.suppress,debug:e?.debug??Uo.debug}),a1=e?.showOverlayOn??Uo.showOverlayOn}function WH(){ap({capture:!0})}import{_fuzzySuggestions as UH}from"ag-stack";var c1={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CalculatedColumns:1,CellSelection:1,Clipboard:1,ColumnHeaderEdit:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,PdfExport:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingEdit:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,ShowValuesAs:1,SideBar:1,Sparklines:1,StatusBar:1,Toolbar:1,TreeData:1,ViewportRowModel:1,Formula:1,Notes:1},Dc=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],qH={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],CsrmHierarchy:["RowGrouping","Pivot","TreeData"],CsrmGroupStages:["RowGrouping","Pivot","TreeData"],ColumnFilter:Dc,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Dc,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...Dc,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},$H={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function KH(e,t){const i=[];for(const o of Array.isArray(e)?e:[e]){const s=qH[o];if(s)for(const r of s){const n=$H[r];(!n||n===t)&&i.push(r)}else i.push(o)}return i}var jH=(e,t,i)=>{const o=Object.entries(e.reduce((s,{name:r,source:n})=>({...s,[n]:(s[n]||[]).concat(r)}),{})).map(([s,r])=>`import { ${r.join(", ")} } from '${s}';`);return i?`${["import { AgGridProvider, AgGridReact } from 'ag-grid-react';",...o].join(` 
`)}

const modules = [ ${t} ];

function App() {
    return (
        <AgGridProvider modules={modules}>
            <AgGridReact /* ... props */ />
        </AgGridProvider>
    );
}`:`${o.join(` 
`)}

ModuleRegistry.registerModules([ ${t} ]);`},ZH=(e,t)=>{const i=e.map(r=>({name:qo(r),source:c1[r]?"ag-grid-enterprise":"ag-grid-community"}));e.some(r=>r==="IntegratedCharts"||r==="Sparklines")&&i.push({name:"AgChartsEnterpriseModule",source:"ag-charts-enterprise"});const s=e.map(r=>qo(r,!0)).join(", ");return t||i.unshift({name:"ModuleRegistry",source:"ag-grid-community"}),`${jH(i,s,t)}

For more info see: ${uo()}/modules/`};function qo(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function QH(e,t){const i=t.filter(r=>r==="IntegratedCharts"||r==="Sparklines");let o="";return!globalThis?.agCharts&&i.length>0?o=`Unable to use ${e} as either the \`ag-charts-community\` or \`ag-charts-enterprise\` script needs to be included alongside \`ag-grid-enterprise\`.
`:t.some(r=>c1[r])&&(o=o+`Unable to use ${e} as that requires the \`ag-grid-enterprise\` script to be included.
`),o}function YH(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return}}var JH=(e,t,i,o)=>{const s=t.filter(a=>a==="IntegratedCharts"||a==="Sparklines"),r=s.map(a=>qo(a)).join(),n=s.length>0?`${r} must be initialised with an AG Charts module. One of \`AgChartsCommunityModule\` / \`AgChartsEnterpriseModule\`.`:"",l=t.length>1?"one of "+t.map(a=>`\`${qo(a)}\``).join(", "):`\`${qo(t[0])}\``;return`Unable to use ${e} as ${l} is not registered${i?" for gridId: "+o:""}. ${n}`.trim()},Mc=({reasonOrId:e,moduleName:t,reports:i,gridScoped:o,gridId:s,rowModelType:r,additionalText:n,isUmd:l,usesAgGridProvider:a})=>{const c=(Array.isArray(i)&&i.length?i.map(YH).filter(m=>m!=null):[{reasonOrId:e,moduleName:t,additionalText:n}]).map(m=>({reason:typeof m.reasonOrId=="string"?m.reasonOrId:t9[m.reasonOrId],resolvedModuleNames:KH(m.moduleName,r),additionalText:m.additionalText}));if(l)return c.map(m=>QH(m.reason,m.resolvedModuleNames)).join("");const u=[...new Set(c.flatMap(m=>m.resolvedModuleNames))],g=`${c.map(m=>JH(m.reason,m.resolvedModuleNames,o,s)).join(`
`)}${c.length==1?" ":`
`}Check if you have registered the module${u.length==1?"":"s"}:
`,p=[...new Set(c.map(m=>m.additionalText).filter(Boolean))],f=p.length>0?` 

${p.join(`
`)}`:"";return`${g}
${ZH(u,a)}`+f},Tc=e=>`${e} must be initialised with an AG Charts module. One of \`AgChartsCommunityModule\` / \`AgChartsEnterpriseModule\`.

import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
import { ModuleRegistry } from 'ag-grid-community';
import { ${e} } from 'ag-grid-enterprise';
    
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
    `,XH=e=>`Unable to use the Clipboard API (\`navigator.clipboard.${e}()\`). The reason why it could not be used has been logged on the web development console. 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.`,e9={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id \`${e}\` detected from \`getRowId\` callback, this could cause issues in your grid.`,4:({id:e})=>`Could not find row \`id=${e}\`, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using `getRowId` to help the Grid find matching row data"],6:()=>"`groupHideOpenParents` only works when specifying specific columns for `colDef.showRowGroup`",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation \`${e}\``,9:({variable:e})=>`No value for \`${e?.cssName}\`. This usually means that the grid has been initialised before styles have been loaded. The default value of \`${e?.defaultValue}\` will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the \`${e}\` event is deprecated. Use the global \`modelUpdated\` event to determine when row children have changed.`,11:()=>"No gridOptions provided to `createGrid`",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find `rowIndex`, this means tasks are being executed on a `rowNode` that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with \`${e}\`, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:i})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",i],17:()=>"you need either `field` or `valueSetter` set on `colDef` for editing to work",18:()=>"`alignedGrids` contains an `undefined` option.",19:()=>"`alignedGrids` - No api found on the linked grid.",20:()=>"You may want to configure via a callback to avoid setup race conditions:\n                     `alignedGrids: () => [linkedGrid]`",21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The `getRowId` callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function \`${e}()\` cannot be called as the grid has been destroyed.
 Either clear local references to the grid api, when it is destroyed, or check \`gridApi.isDestroyed()\` to avoid calling methods against a destroyed grid.
 To run logic when the grid is about to be destroyed use the \`gridPreDestroyed\` event. See: ${t}`,27:({fnName:e,module:t})=>`API function \`${e}\` not registered to module \`${t}\``,28:()=>"`setRowCount` cannot be used while using row grouping.",29:()=>"tried to call `sizeColumnsToFit()` but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],32:()=>"`applyColumnState()` - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"`stateItem.aggFunc` must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type \`${e}\` is a default column type and cannot be overridden.`,35:()=>"Column type definitions `columnTypes` with a `type` attribute are not supported because a column type cannot refer to another column type. Only column definitions `columnDefs` can use the `type` attribute to refer to a column type.",36:({type:e})=>`\`colDef.type\` \`${e}\` does not correspond to defined \`gridOptions.columnTypes\``,37:()=>"Changing the column pinning status is not allowed with `domLayout='print'`",38:({iconName:e})=>`provided icon \`${e}\` needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({error:e,method:t})=>`${e}
${XH(t)}`,41:()=>"Browser did not allow `document.execCommand('copy')`. Ensure `api.copySelectedRowsToClipboard()` is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support `document.execCommand('copy')` for clipboard operations",43:({iconName:e})=>`As of v33, icon \`${e}\` is deprecated. Use the icon CSS name instead.`,44:()=>"Data type definition hierarchies (via the `extendsDataType` property) cannot contain circular references.",45:({parentCellDataType:e})=>`The data type definition \`${e}\` does not exist.`,46:()=>"The `baseDataType` property of a data type definition must match that of its parent.",47:({cellDataType:e})=>`Missing data type definition - \`${e}\``,48:({property:e,inferred:t,colId:i})=>{const o=t?" (inferred)":"",s=i?` for column "${i}"`:"";return`Cell data type is \`object\`${o} but no Value \`${e}\` has been provided${s}. Please either provide an object data type definition with a Value \`${e}\`, or set:
  - \`colDef.value${e}\`${t&&e==="Parser"?"\n  - `colDef.cellDataType = 'object'`":""}`},49:({methodName:e})=>`Framework component is missing the method \`${e}()\``,50:({compName:e})=>`Could not find component \`${e}\`, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"`addRowDropZone` - A container target needs to be provided",56:()=>"`addRowDropZone` - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, `rowNode.isFullWidthCell()` has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`\`setFilterModel()\` - no column found for colId: ${e}`,63:({colId:e})=>`\`setFilterModel()\` - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`\`setFilterModel()\` - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for `setFilterModel`",66:()=>"filter API missing getModel method, which is needed for `getFilterModel`",67:()=>"Filter is missing `isFilterActive()` method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`\`getGui\` method from filter returned \`${e}\`; it should be a DOM element.`,70:({newFilter:e})=>`Grid option \`quickFilterText\` only supports string inputs, received: ${typeof e}`,71:()=>"`debounceMs` is ignored when apply button is present",72:({keys:e})=>["ignoring `FilterOptionDef` as it is missing ",e],74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing `conditions`",78:()=>"Filter Model contains more conditions than `filterParams.maxNumConditions`. Additional conditions have been ignored.",79:()=>"`filterParams.maxNumConditions` must be greater than or equal to one.",80:()=>"`filterParams.numAlwaysVisibleConditions` must be greater than or equal to one.",81:()=>"`filterParams.numAlwaysVisibleConditions` cannot be greater than `filterParams.maxNumConditions`.",82:({param:e})=>`\`DateFilter\` \`${e}\` is not a number`,83:()=>"`DateFilter` `minValidYear` should be <= `maxValidYear`",84:()=>"`DateFilter` `minValidDate` should be <= `maxValidDate`",85:()=>"`DateFilter` should not have both `minValidDate` and `minValidYear` parameters set at the same time! `minValidYear` will be ignored.",86:()=>"`DateFilter` should not have both `maxValidDate` and `maxValidYear` parameters set at the same time! `maxValidYear` will be ignored.",87:()=>"`DateFilter` parameter `minValidDate` should always be lower than or equal to parameter `maxValidDate`.",88:({index:e})=>`Invalid row index for \`ensureIndexVisible\`: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing `getRows` method",91:()=>"Filter is missing method `doesFilterPass`",92:()=>"`AnimationFrameService` called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:i,pageSizeOptions:o})=>`\`paginationPageSize=${e}\`${t?"":" (default value)"}, but ${e} is not included in${i?"":" the default"} \`paginationPageSizeSelector=[${o?.join(", ")}]\`.`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set \`${t}\` to an array that includes ${e} or to \`false\` to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading UI when the `loading` grid option is set. Set `loading=false` instead.",101:({propertyName:e,componentName:t,suggestions:i})=>[`Could not find \`${t}\` component. It was configured as "${e}: \`${t}\`" but it wasn't found in the list of registered components.`,i?.length?`
         Did you mean: \`[${i.slice(0,3)}]\`?
`:"","If using a custom component check it has been registered correctly."].join(`
`),102:()=>"`selectAll`: `filtered` only works when `gridOptions.rowModelType='clientSide'`",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use \`${e}s\` to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the \`theme\` grid option, but the file (\`ag-grid.css\`) is also included and will cause styling issues. Remove \`ag-grid.css\` from the page. See the migration guide: ${uo()}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const i=UH({inputValue:e,allSuggestions:t,hideIrrelevant:!0,maxSuggestions:4}).values;return[`Could not find \`${e}\` aggregate function. It was configured as "aggFunc: \`${e}\`" but it wasn't found in the list of registered aggregations.`,i.length>0?`
         Did you mean: \`[${i.slice(0,3)}]\`?
`:"","If using a custom aggregation function check it has been registered correctly."].join(`
`)},110:()=>"`groupHideOpenParents` only works when specifying specific columns for `colDef.showRowGroup`",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of \`${e}\`. Is it in \`Vue.components\`?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"`selectAll` must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"`MultiFloatingFilterComp` expects `MultiFilter` as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a `colDef.keyCreator` (see AG Grid docs) or b) to `toString()` on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using \`multiRow\` selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using \`clientSide\` or \`serverSide\` \`rowModelType\`, you are using \`${t}\`.`,130:()=>"cannot multi select unless selection mode is `multiRow`",132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon \`${e}\` function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon \`${e}\``,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the `type` is missing. It must be either `rangeChartUpdate`, `pivotChartUpdate`, or `crossFilterChartUpdate`.",137:({type:e,currentChartType:t})=>`Unable to update chart as a \`${e}\` update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name \`${e}\` has been supplied but not added to the \`chartThemes\` list`,140:({name:e})=>`no stock theme exists with the name \`${e}\` and no custom chart theme with that name was supplied to \`customChartThemes\``,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`\`${e}\` is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: \`${e}\``,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. \`${e}\` will not be expanded.`,146:({comp:e})=>`Unable to instantiate component \`${e}\` as its module hasn't been loaded. Add \`ValidationModule\` to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: \`${e}\``,148:({group:e})=>`invalid \`chartGroupsDef\` config \`${e}\``,149:({group:e,chartType:t})=>`invalid \`chartGroupsDef\` config \`${e}.${t}\``,150:()=>"`seriesChartTypes` are required when the `customCombo` chart type is specified.",151:({chartType:e})=>`invalid chartType \`${e}\` supplied in \`seriesChartTypes\`, converting to \`line\` instead.`,152:({colId:e})=>`no \`seriesChartType\` found for colId = \`${e}\`, defaulting to \`line\`.`,153:({chartDataType:e})=>`unexpected \`chartDataType\` value \`${e}\` supplied, instead use \`category\`, \`series\` or \`excluded\``,154:({colId:e})=>`cross filtering requires a \`agSetColumnFilter\` or \`agMultiColumnFilter\` to be defined on the column with id: ${e}`,155:({option:e})=>`\`${e}\` is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in \`chartToolPanelsDef.panels\`: \`${e}\``,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"`detailCellRendererParams.template` should be function or string",169:()=>'Reference to `eDetailGrid` was missing from the details template. Please add `data-ref="eDetailGrid"` to the template.',170:({providedStrategy:e})=>`invalid \`cellRendererParams.refreshStrategy = ${e}\` supplied, defaulting to \`refreshStrategy = 'rows'\`.`,171:()=>"could not find detail grid options for master detail, please set `gridOptions.detailCellRendererParams.detailGridOptions`",172:()=>"could not find `getDetailRowData` for master / detail, please set `gridOptions.detailCellRendererParams.getDetailRowData`",173:({group:e})=>`invalid \`chartGroupsDef\` config \`${e}\``,174:({group:e,chartType:t})=>`invalid \`chartGroupsDef\` config \`${e}.${t}\``,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item \`${e}\`. Check that your \`menuTabs\` contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for `cellSelection.handle.direction` are `x`, `y` and `xy`. Default to `xy`.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"`totalValueGetter` should be either a function or a string (expression)",180:()=>"`agRichSelectCellEditor` requires `cellEditorParams.values` to be set",181:()=>"`agRichSelectCellEditor` cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix `groupDisplayType = "multipleColumns"` with `treeData`, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["`getDataPath()` should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:i})=>["duplicate group keys for row data, keys should be unique",e,t,...i??[]],187:({rowId:e,firstData:t,secondData:i})=>[`Duplicate node id ${e}. Row IDs are provided via the \`getRowId()\` callback. Please modify the \`getRowId()\` callback code to provide unique row id values.`,"first instance",t,"second instance",i],188:e=>`\`getRowId\` callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling \`gridApi.${e}()\` is only possible when using \`rowModelType='clientSide'\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when \`gridOptions.rowModelType='clientSide'\``,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Mc,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove `getRowHeight()` callback or b) remove `maxBlocksInCache` property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove `colDef.autoHeight` or b) remove `maxBlocksInCache` property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>"The Set Filter Parameter `defaultToNothingSelected` value was ignored because it does not work when `excelMode` is used.",208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${uo()}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property `treeList=true` for Set Filter params, but you did not provide a `treeListPathGetter` or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,validKeys:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${(t??[]).join(",")}`,216:({name:e})=>`Missing component for \`${e}\``,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`\`${e}\` is not a valid \`lineDash\` option.`,221:()=>"`agAggregationComponent` should only be used with the client and server side row model.",222:()=>"`agFilteredRowCountComponent` should only be used with the client side row model.",223:()=>"`agSelectedRowCountComponent` should only be used with the client and server side row model.",224:()=>"`agTotalAndFilteredRowCountComponent` should only be used with the client side row model.",225:()=>"`agTotalRowCountComponent` should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"`detailCellRendererParams.template` is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",233:({methodName:e})=>`Framework component is missing the method \`${e}()\``,234:()=>"Group Column Filter does not work with the `colDef` property `field`. This property will be ignored.",235:()=>"Group Column Filter does not work with the `colDef` property `filterValueGetter`. This property will be ignored.",236:()=>"Group Column Filter does not work with the `colDef` property `filterParams`. This property will be ignored.",237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"`setRowCount` can only accept a positive row count.",239:()=>"Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (`ag-grid.css`) is also included and will cause styling issues. Either pass the string `legacy` to the theme grid option to use v32 style themes, or remove `ag-grid.css` from the page to use Theming API.",240:({theme:e})=>`theme grid option must be a Theming API theme object or the string \`legacy\`, received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>"Row selection state could not be parsed due to invalid data. Ensure all child state has `toggledNodes` or does not conform with the parent rule. \nPlease rebuild the selection state and reapply it.",248:()=>"`SetFloatingFilter` expects `SetFilter` as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`Unable to create chart as an invalid chartType = \`${e}\` was supplied.`,252:()=>"cannot get grid to draw rows when it is in the middle of drawing rows. \nYour code probably called a grid API method while the grid was in the render stage. \nTo overcome this, put the API call into a timeout, e.g. instead of `api.redrawRows()`, call `setTimeout(function() { api.redrawRows(); }, 0)`. \nTo see what part of your code that caused the refresh check this stacktrace.",253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load `ValidationModule` if missing.",257:()=>Tc("IntegratedChartsModule"),258:()=>Tc("SparklinesModule"),259:({part:e})=>`the argument to \`theme.withPart\` must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:i,gridId:o,rowModelType:s,usesAgGridProvider:r})=>Mc({reasonOrId:`AG Grid \`${e}\` component: \`${t}\``,moduleName:Si[t],gridId:o,gridScoped:i,rowModelType:s,usesAgGridProvider:r}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>"As of v33, icon key `smallDown` is deprecated. Use `advancedFilterBuilderSelect` for Advanced Filter Builder dropdown, `selectOpen` for Select cell editor and dropdowns (e.g. Integrated Charts menu), `richSelectOpen` for Rich Select cell editor.",263:()=>"As of v33, icon key `smallLeft` is deprecated. Use `panelDelimiterRtl` for Row Group Panel / Pivot Panel, `subMenuOpenRtl` for sub-menus.",264:()=>"As of v33, icon key `smallRight` is deprecated. Use `panelDelimiter` for Row Group Panel / Pivot Panel, `subMenuOpen` for sub-menus.",265:({colId:e})=>`Unable to infer chart data type for column \`${e}\` if first data entry is null. Please specify \`chartDataType\`, or a \`cellDataType\` in the column definition. For more information, see ${uo()}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>"As of v33.1, using `keyCreator` with the Rich Select Editor has been deprecated. It now requires the `formatValue` callback to convert complex data to strings.",267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using `treeDataChildrenField`",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id=\`${e}\` and parent id=\`${t}\`. Resetting the parent for row with id=\`${e}\` and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id=\`${e}\` and parent id=\`${t}\`. Showing row with id=\`${e}\` as a root-level node.`,273:({providedId:e,usedId:t})=>`Provided column id \`${e}\` was already in use, ensure all column and group ids are unique. Using \`${t}\` instead.`,274:({prop:e})=>{let t=`Since v33, \`${e}\` has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`\`enableFilterHandlers\` is set to true, but column \`${e}\` does not have \`filter.doesFilterPass\` or \`filter.handler\` set.`,278:({colId:e})=>`Unable to create filter handler for column \`${e}\``,279:e=>{},280:({colId:e})=>`\`name\` must be provided for custom filter components for column \`${e}\``,281:({colId:e})=>`Filter for column \`${e}\` does not have \`filterParams.buttons\`, but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model \`${e}\` is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index \`${e}\` and pinned state \`${t}\` not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column \`${e}\` has buttons configured against the child filters. When \`enableFilterHandlers=true\`, buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the `themeStyleContainer` grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`\`colDef.allowFormula\` is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel `cancel` button has no effect without the `apply` button.",301:({key:e})=>`Toolbar item \`${e}\` is missing the \`toolbarItem\` property and will not be rendered.`,302:({itemName:e,moduleName:t,gridScoped:i,gridId:o,rowModelType:s})=>Mc({reasonOrId:`Toolbar item \`${e}\``,moduleName:t,gridId:o,gridScoped:i,rowModelType:s,additionalText:"The item will not be rendered."}),303:({key:e})=>`Multiple toolbar items share the explicit key \`${e}\`. Only the first item is rendered.`,304:({dataType:e})=>`Invalid \`calculatedColumns.dataTypes\` entry \`${e}\` - it must be a built-in data type or registered via \`dataTypeDefinitions\`. It has been ignored.`,305:()=>"The file input overlay is shown but no `processFileInput` is configured. The overlay will not work without a `processFileInput`.",306:({version:e,name:t,message:i})=>`As of v${e}, \`${t}\` is deprecated. ${i??""}`,307:({objectName:e,name:t,suggestions:i,hasContext:o})=>{let s=`Invalid \`${e}\` property \`${t}\` did you mean any of these: ${(i??[]).slice(0,8).map(r=>`\`${r}\``).join(", ")}.`;return o&&(s+=`
If you are trying to annotate \`${e}\` with application data, use the \`${e}.context\` property instead.`),s},308:({version:e,apiMethod:t,replacement:i,message:o})=>{const s=i?`Please use \`${i}\` instead. `:"";return`Since ${e} \`api.${t}\` is deprecated. ${s}${o??""}`},309:({name:e,rowModel:t,supportedRowModels:i})=>`\`${e}\` is not supported with the \`${t}\` row model. It is only valid with: ${(i??[]).join(", ")}.`,310:({objectName:e,url:t})=>`One or more \`${e}\` properties are not recognised. For more info see: ${t}`,311:({functionName:e,rowModels:t})=>`\`api.${e}\` can only be called when \`gridOptions.rowModelType\` is ${(t??[]).join(" or ")}.`,312:({chartType:e,renamedChartType:t})=>`The chart type \`${e}\` has been deprecated. Please use \`${t}\` instead.`,313:({paramsType:e,property:t})=>`Unexpected property supplied. \`${e}\` does not contain: \`${t}\`.`,314:({key:e,expectedType:t,actualType:i,value:o})=>`\`${e}\` should be of type \`${t}\` but received \`${i}\` (${String(o)}).`,315:({key:e,failedKey:t,required:i,reason:o})=>`\`${e}\` requires \`${t}\` to be one of \`[${(i??[]).join(", ")}]\`. ${o??""}`,316:({property:e,value:t,expectedType:i})=>`Unable to update chart as invalid params supplied: \`${e}: ${String(t)}\`, expected \`${i}\`.`,317:({property:e,min:t})=>`\`${e}\` should not be lower than ${t}.`,318:({feature:e,conflictsWith:t,advice:i})=>{const o=i?` ${i}`:"";return`${e} is not supported with ${t}.${o}`},319:({feature:e,requirement:t})=>`${e} requires ${t}.`,320:({property:e,allowed:t,value:i})=>{const o=i!==void 0?`, currently it's ${String(i)}`:"";return`\`${e}\` must be one of \`[${(t??[]).join(", ")}]\`${o}.`},321:({property:e,expected:t})=>`\`${e}\` should be ${t}.`,322:({message:e})=>e??"",323:({validNames:e})=>`\`paginationPanels\` expects an array of panel names or config objects: \`[${(e??[]).join(", ")}]\``,324:({property:e,invalidItems:t})=>{const i=(t??[]).map(o=>typeof o=="string"||o==null?_l(o):JSON.stringify(o)).join(", ");return`\`${e}\` must be an array of type \`(SortDirection | SortDef)[]\`, incorrect items are: \`[${i}]\``},325:({property:e,value:t})=>`\`${e}\` must be an array with at least one element, currently it is \`[${String(t)}]\``,326:({defaultOption:e})=>`ignoring \`defaultOption\` \`${e}\` as it is not one of the filter's \`filterOptions\``,327:({pattern:e})=>`ignoring \`filterParams.allowedCharPattern\` \`${e}\` as it does not compile to a character pattern`,328:({rowModel:e})=>`continuous \`fitCellContents\` auto-sizing is not supported by the '${e}' row model, so it has been ignored`,329:({error:e})=>["`shouldAutoSizeColumns` threw, so the auto-size was skipped:",e],330:({fontFamily:e,registeredFamilies:t})=>`PDF font family "${e}" is not registered. Registered families: ${(t??[]).join(", ")}.`,331:({rowId:e})=>`Row ID \`${e}\` is reserved by AG Grid and should not be returned from \`getRowId\`.`,332:({replacements:e})=>`Legacy theme CSS variables are set on the grid, but the Theming API is in use and ignores them, so they have no effect: ${(e??[]).join(", ")}. Either set the equivalent Theming API variable, or pass the string \`legacy\` to the \`theme\` grid option to keep using v32 style themes. See the migration guide: ${uo()}/theming-migration/`,333:({error:e})=>["`onIssueRaised` threw:",e],334:()=>`\`GridChartsModule\` was deprecated in v33 \u2014 use \`IntegratedChartsModule\` instead.

${Tc("IntegratedChartsModule")}`,335:({colId:e})=>`Column \`${e}\` sets \`filter.handler\` or \`filter.doesFilterPass\`, which need \`enableFilterHandlers\`, so the default filter is used, as \`filter: true\` does.`,336:({colId:e,properties:t})=>`\`calculatedColumns.processColDef\` returned \`${(t??[]).join("`, `")}\` for calculated column \`${e}\`. These properties are always overridden for calculated columns and have been ignored.`,337:({colId:e})=>`\`setFilterCards\` on the New Filters Tool Panel was passed \`${e}\`, which is not a column in the grid, so no card is shown for it.`,338:()=>"`success()` or `fail()` was called more than once for the same Server-Side Row Model request, so the later call was ignored.",339:({field:e,key:t})=>`The value for field \`${e}\` was not set, as \`${t}\` on that path is not an object. Use a \`valueSetter\` to set this value.`,340:({field:e})=>`Field \`${e}\` contains \`__proto__\`, which field paths do not support, so the column shows no value and its edits are refused. Use a \`valueGetter\` and \`valueSetter\` instead.`};function u1(e,t){const i=e9[e];if(!i)return[`Missing error text for error id ${e}!`];const o=i(t),r=`
See ${Vs(e,t)}`;return Array.isArray(o)?[...o,r]:[o,r]}var t9={1:"Charting Aggregation",2:"`pivotResultFields`",3:"`setTooltip`",4:"the `isAnyOf` / `isNoneOf` filter options in the Advanced Filter"},i9=/(?<!\s)\s*(See|Visit) https?:\/\/\S+/g,h1=/(?<!\s)\s*For more info see:\s*(https?:\/\/\S+)/,o9=/^\s*import\s/,s9=/^(import |const |let |function |class |ModuleRegistry|<|>|\}|\))/,Ac=/https?:\/\/\S+/g,r9=/(?<![.,;:)\]])[.,;:)\]]+$/,n9="`";function l9(e){return`This ${e} may not have originated from this grid`}function a9(e){if(typeof e=="string")return e;if(e==null)return"";let t;try{t=JSON.stringify(e)}catch{t=String(e)}return`\`${t}\``}function d9(e){const{id:t,params:i,defaultMessage:o}=e;return u1(t,i).map(a9).join(" ").trim()||o||""}function c9(e){const t=h1.exec(e)?.[1],i=e.replace(i9,"").replace(h1,"").trim();return{...h9(i),docLink:t}}function g1(e){return c9(d9(e))}function u9(e){const t=e.trim();return t===""?!1:s9.test(t)||/[;{(]$/.test(t)||t.includes("=>")}function h9(e){const t=e.split(`
`);let i=-1;for(let l=0,a=t.length;l<a;++l)if(o9.test(t[l])){i=l;break}if(i===-1)return{message:e};let o=i;for(let l=i,a=t.length;l<a&&(t[l].trim()===""||u9(t[l]));++l)o=l;const s=t.slice(0,i).join(`
`).trim(),r=t.slice(i,o+1).join(`
`).trim(),n=t.slice(o+1).join(`
`).trim();return{message:s,code:r,note:n||void 0}}function g9(e,t){const i=t.split(n9);for(let o=0,s=i.length;o<s;++o){const r=i[o];if(r!=="")if(o%2===1){const n=O({tag:"code",cls:"ag-overlay-error-inline-code"});n.textContent=r,e.appendChild(n)}else p9(e,r)}}function p9(e,t){let i=0;Ac.lastIndex=0;let o;for(;(o=Ac.exec(t))!==null;){o.index>i&&e.appendChild(document.createTextNode(t.slice(i,o.index)));let s=o[0];const r=r9.exec(s)?.[0]??"";r&&(s=s.slice(0,s.length-r.length)),e.appendChild(Ic(s,s)),r&&e.appendChild(document.createTextNode(r)),i=Ac.lastIndex}i<t.length&&e.appendChild(document.createTextNode(t.slice(i)))}function p1(e){return e.replace(/^[a-z]/,t=>t.toUpperCase())}function f1(e){const t=O({tag:"div",cls:"ag-overlay-error-message"});return g9(t,e),t}function Ic(e,t){const i=O({tag:"a",cls:"ag-overlay-error-link"});return i.href=e,i.target="_blank",i.rel="noopener noreferrer",i.textContent=t,i}function f9(e,t,i,o,s=!1){const r=O({tag:"div",cls:`ag-overlay-error-item ag-overlay-error-item-${e}`}),{message:n,code:l,note:a,docLink:d}=t;if(s){const u=O({tag:"div",cls:"ag-overlay-error-unattributed"});u.textContent=l9(e),r.appendChild(u)}if(n&&r.appendChild(f1(p1(n))),l){const u=O({tag:"pre",cls:"ag-overlay-error-code"});u.textContent=l,r.appendChild(u)}a&&r.appendChild(f1(a));const c=O({tag:"div",cls:"ag-overlay-error-links"});return c.appendChild(Ic(i,o)),d&&c.appendChild(Ic(d,"Documentation")),r.appendChild(c),r}function m9(e,t={}){return f9(e.severity,g1(e),Vs(e.id,e.params),`AG Grid #${e.id}`,!!t.showsUnattributedOrigin&&e.gridId===void 0)}var $r=["error","warning","deprecation"],C9={error:"Errors",warning:"Warnings",deprecation:"Deprecations"};function v9(e,t,i){const o=O({tag:"div",cls:`ag-overlay-error-section ag-overlay-error-section-${e}`}),s=O({tag:"div",cls:"ag-overlay-error-section-header"});s.textContent=`${C9[e]} (${t.length})`,o.appendChild(s);for(let r=0,n=t.length;r<n;++r)o.appendChild(m9(t[r],i));return o}function m1(e,t={}){const i=[];for(let o=0,s=$r.length;o<s;++o){const r=$r[o],n=e.filter(l=>l.severity===r);n.length!==0&&(i.length>0&&i.push(O({tag:"hr",cls:"ag-overlay-error-divider"})),i.push(v9(r,n,t)))}return i}function w9(e,t,i,o){const{message:s,code:r,note:n,docLink:l}=i,d=[`### [${e[0].toUpperCase()+e.slice(1)}] AG Grid #${t}`];return s&&d.push(p1(s)),r&&d.push("```",r,"```"),n&&d.push(n),l&&d.push(`Documentation: ${l}`),d.push(`More info: ${o}`),d.join(`
`)}function S9(e){return w9(e.severity,e.id,g1(e),Vs(e.id,e.params))}function C1(e,t){return[`Version: ${t}`,...e.map(S9)].join(`

`)}var kc="Copy",b9="Copied",y9=1500;function v1(e){return e.textContent=b9,window.setTimeout(()=>{e.textContent=kc},y9)}function w1(e){if(navigator.clipboard?.writeText){navigator.clipboard.writeText(e).catch(()=>S1(e));return}S1(e)}function S1(e){const t=O({tag:"textarea"});t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch{}t.remove()}var R9=["box-sizing: border-box","display: flex","flex-direction: column","width: 100%","height: 100%","min-height: 120px","overflow: auto","background: #fff","color: #181d1f","border: 2px solid color-mix(in srgb, #cc222f 60%, #babfc7)","font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif","font-size: 13px","line-height: 1.5"].join(";"),E9=["display: flex","align-items: center","justify-content: space-between","gap: 12px","padding: 12px 16px","border-bottom: 1px solid #babfc7"].join(";"),x9=["display: flex","flex-direction: column","gap: 16px","padding: 12px 16px"].join(";"),F9=["font-weight: 600","font-size: 14px","color: #cc222f"].join(";"),P9=["flex: none","padding: 8px 16px","border-top: 1px solid #babfc7","color: #68686e","font-size: 12px"].join(";"),D9=["flex: none","cursor: pointer","padding: 2px 10px","border: 1px solid #babfc7","border-radius: 4px","background: #f8f8f8","color: inherit","font: inherit","font-size: 12px"].join(";"),b1="ui-monospace, sfmono-regular, menlo, consolas, 'Liberation Mono', monospace",y1="ag-overlay-error-bootstrap-styles",M9=`
.ag-overlay-error-bootstrap-panel .ag-overlay-error-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-section-header {
    margin: 0;
    font-weight: 700;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-divider {
    margin: 0;
    border: none;
    border-top: 1px solid #babfc7;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-inline-start: solid 3px #babfc7;
    padding-inline-start: 8px;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-item-error { border-inline-start-color: #cc222f; }
.ag-overlay-error-bootstrap-panel .ag-overlay-error-item-warning { border-inline-start-color: #d98300; }
.ag-overlay-error-bootstrap-panel .ag-overlay-error-item-deprecation { border-inline-start-color: #81878b; }
.ag-overlay-error-bootstrap-panel .ag-overlay-error-message {
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-inline-code {
    font-family: ${b1};
    background: rgba(129, 135, 139, 0.18);
    border-radius: 4px;
    padding: 0 0.3em;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-code {
    margin: 0;
    font-family: ${b1};
    font-size: 0.85em;
    background: #f3f4f5;
    border: 1px solid #babfc7;
    border-radius: 4px;
    padding: 8px;
    max-height: 50vh;
    overflow: auto;
    white-space: pre-wrap;
}
.ag-overlay-error-bootstrap-panel .ag-overlay-error-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}`;function T9(){if(document.getElementById(y1))return;const e=O({tag:"style"});e.id=y1,e.textContent=M9,document.head.appendChild(e)}function A9(e){const t=new Set,i=[];for(let o=0,s=e.length;o<s;++o){const r=e[o],n=rp(r,o);t.has(n)||(t.add(n),i.push(r))}return i}function I9(e,t,i){const o=e.querySelectorAll(".ag-overlay-error-bootstrap-panel");for(let g=0,p=o.length;g<p;++g)o[g].remove();const s=d1();if(s.length===0)return;const n=A9(t).filter(g=>Hl(g.severity,s));if(n.length===0)return;T9();const l=O({tag:"div",cls:"ag-overlay-error-bootstrap-panel"});l.style.cssText=R9;const a=O({tag:"div"});a.style.cssText=E9;const d=O({tag:"span"});d.style.cssText=F9,d.textContent="AG Grid failed to initialise",a.appendChild(d);const c=O({tag:"button"});c.type="button",c.textContent=kc,c.title="Copy diagnostics to the clipboard",c.style.cssText=D9,c.addEventListener("click",()=>{w1(C1(n,i)),v1(c)}),a.appendChild(c),l.appendChild(a);const u=O({tag:"div"});u.style.cssText=x9,u.append(...m1(n)),l.appendChild(u);const h=O({tag:"div"});h.style.cssText=P9,h.textContent=i,l.appendChild(h),e.appendChild(l)}var k9='.ag-overlay-error-panel{--ag-internal-overlay-mono:ui-monospace,sfmono-regular,menlo,consolas,"Liberation Mono",monospace;background:var(--ag-background-color);border:solid calc(var(--ag-border-width)*2) color-mix(in srgb,var(--ag-invalid-color) 60%,var(--ag-border-color));border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);color:var(--ag-text-color);display:flex;flex-direction:column;margin:calc(var(--ag-spacing)*2);max-height:calc(100% - var(--ag-spacing)*4);max-width:640px;overflow:hidden;pointer-events:all;text-align:start}.ag-overlay-error-header{align-items:center;border-bottom:solid var(--ag-border-width) var(--ag-border-color);color:var(--ag-invalid-color);display:flex;flex:none;gap:calc(var(--ag-spacing)*.5);padding:var(--ag-spacing) calc(var(--ag-spacing)*1.5)}.ag-overlay-error-title{flex:1;font-weight:700}.ag-overlay-error-button{align-items:center;background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);color:var(--ag-text-color);cursor:pointer;display:flex;font:inherit;height:calc(var(--ag-spacing)*3.5);justify-content:center;padding:0 calc(var(--ag-spacing)*.75)}.ag-overlay-error-button:hover{background:var(--ag-row-hover-color)}.ag-overlay-error-dismiss{background:transparent;border:none;padding:0;width:calc(var(--ag-spacing)*3.5)}.ag-overlay-error-body{display:flex;flex:1 1 auto;flex-direction:column;gap:calc(var(--ag-spacing)*2);min-height:0;overflow:auto;padding:calc(var(--ag-spacing)*1.5)}.ag-overlay-error-section{display:flex;flex-direction:column;gap:calc(var(--ag-spacing)*2)}.ag-overlay-error-section-header{font-weight:700;margin:0}.ag-overlay-error-divider{border:none;border-top:solid var(--ag-border-width) var(--ag-border-color);margin:0}.ag-overlay-error-item{border-inline-start:solid calc(var(--ag-border-width)*3) var(--ag-border-color);display:flex;flex-direction:column;gap:var(--ag-spacing);padding-inline-start:var(--ag-spacing)}.ag-overlay-error-item-error{border-inline-start-color:var(--ag-invalid-color)}.ag-overlay-error-item-warning{border-inline-start-color:#d98300}.ag-overlay-error-item-deprecation{border-inline-start-color:var(--ag-subtle-text-color)}.ag-overlay-error-code,.ag-overlay-error-message{line-height:1.5;margin:0;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;white-space:pre-wrap}.ag-overlay-error-unattributed{align-self:start;background:color-mix(in srgb,var(--ag-border-color) 35%,transparent);border-radius:500px;color:var(--ag-subtle-text-color);font-size:.85em;font-weight:600;padding:calc(var(--ag-spacing)*.25) var(--ag-spacing)}.ag-overlay-error-inline-code{background:color-mix(in srgb,var(--ag-border-color) 35%,transparent);border-radius:var(--ag-border-radius);font-family:var(--ag-internal-overlay-mono);padding:0 .3em}.ag-overlay-error-code{background:var(--ag-header-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);font-family:var(--ag-internal-overlay-mono);font-size:.85em;max-height:50vh;overflow:auto;padding:var(--ag-spacing)}.ag-overlay-error-links{display:flex;flex-wrap:wrap;gap:calc(var(--ag-spacing)*1.5)}.ag-overlay-error-versions{border-top:solid var(--ag-border-width) var(--ag-border-color);flex:none;font-size:.85em;opacity:.7;padding:calc(var(--ag-spacing)*.75) calc(var(--ag-spacing)*1.5)}';import{RefPlaceholder as $o}from"ag-stack";var L9={tag:"div",cls:"ag-overlay-error-panel",children:[{tag:"div",cls:"ag-overlay-error-header",children:[{tag:"span",ref:"eTitle",cls:"ag-overlay-error-title"},{tag:"button",ref:"eCopy",cls:"ag-overlay-error-button ag-overlay-error-copy",attrs:{type:"button",title:"Copy diagnostics to the clipboard"},children:kc},{tag:"button",ref:"eDismiss",cls:"ag-overlay-error-button ag-overlay-error-dismiss",attrs:{type:"button",title:"Dismiss","aria-label":"Dismiss"}}]},{tag:"div",ref:"eBody",cls:"ag-overlay-error-body"},{tag:"div",ref:"eVersions",cls:"ag-overlay-error-versions"}]},V9=class extends Ei{constructor(){super(...arguments),this.eTitle=$o,this.eCopy=$o,this.eDismiss=$o,this.eBody=$o,this.eVersions=$o}init(){const{beans:e}=this;this.setTemplate(L9),this.addManagedElementListeners(this.eCopy,{click:()=>this.copyDiagnostics()});const t=X("cancel",e,null);t?this.eDismiss.appendChild(t):this.eDismiss.textContent="\u2715",this.addManagedElementListeners(this.eDismiss,{click:()=>e.errorOverlay?.dismiss()}),this.eVersions.textContent=e.agVersionsText,this.renderBody();const i=e.errorOverlay?.addUpdateListener(()=>this.renderBody());i&&this.addDestroyFunc(i)}destroy(){this.copyResetTimeout!==void 0&&window.clearTimeout(this.copyResetTimeout),super.destroy()}renderBody(){const e=this.beans.errorOverlay?.getDiagnostics()??[];this.eTitle.textContent=B9(e),this.eBody.replaceChildren(...m1(e,{showsUnattributedOrigin:!0})),this.beans.ariaAnnounce?.announceValue(this.eTitle.textContent??"","overlay")}copyDiagnostics(){const e=this.beans.errorOverlay?.getDiagnostics()??[];e.length&&(w1(C1(e,this.beans.agVersionsText)),this.copyResetTimeout!==void 0&&window.clearTimeout(this.copyResetTimeout),this.copyResetTimeout=v1(this.eCopy))}},H9={error:"error",warning:"warning",deprecation:"deprecation"};function B9(e){const t={error:0,warning:0,deprecation:0};for(let o=0,s=e.length;o<s;++o)t[e[o].severity]++;const i=[];for(let o=0,s=$r.length;o<s;++o){const r=$r[o],n=t[r];n>0&&i.push(`${n} ${H9[r]}${n>1?"s":""}`)}return i.length?`AG Grid found ${i.join(", ")}`:"AG Grid"}var O9=class extends y{constructor(){super(...arguments),this.beanName="errorOverlay",this.overlaySeverities=[],this.diagnostics=[],this.seenKeys=new Set,this.updateListeners=new Set,this.keySeed=0}wireBeans(e){this.overlays=e.overlays}postConstruct(){const e=d1();e.length!==0&&(this.overlaySeverities=e,this.addDestroyFunc(dp(this.beans.context.getId(),t=>this.onDiagnostic(t))))}getDiagnostics(){return this.diagnostics}addUpdateListener(e){return this.updateListeners.add(e),()=>{this.updateListeners.delete(e)}}dismiss(){this.overlays?.setDevErrorOverlay(!1)}onDiagnostic(e){if(!Hl(e.severity,this.overlaySeverities))return;const t=this.getKey(e);if(!this.seenKeys.has(t)){this.seenKeys.add(t),this.diagnostics.push(e),this.overlays?.setDevErrorOverlay(!0);for(const i of this.updateListeners)i()}}getKey(e){return rp(e,this.keySeed++)}},G9=class extends y{constructor(){super(...arguments),this.beanName="issueEvents",this.dispatching=!1}postConstruct(){this.addDestroyFunc(dp(this.beans.context.getId(),e=>this.onDiagnostic(e)))}onDiagnostic(e){if(!this.dispatching){this.dispatching=!0;try{this.eventSvc.dispatchEvent({type:"issueRaised",id:e.id,severity:e.severity,message:nR(e),attributedToThisGrid:e.gridId!==void 0})}catch(t){Et(Ft(333,{error:t}))}finally{this.dispatching=!1}}}};import{_fuzzySuggestions as R1}from"ag-stack";var N9={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,suppressContentVisibilityAuto:!0,enableContentVisibilityAuto:!0,contentVisibilityAutoDelay:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},Se="clientSide",ue="serverSide",Ai="infinite",_9={onGroupExpandedOrCollapsed:[Se],refreshClientSideRowModel:[Se],isRowDataEmpty:[Se],forEachLeafNode:[Se],forEachNodeAfterFilter:[Se],forEachNodeAfterFilterAndSort:[Se],resetRowHeights:[Se,ue],applyTransaction:[Se],applyTransactionAsync:[Se],flushAsyncTransactions:[Se],getBestCostNodeSelection:[Se],getServerSideSelectionState:[ue],setServerSideSelectionState:[ue],applyServerSideTransaction:[ue],applyServerSideTransactionAsync:[ue],applyServerSideRowData:[ue],retryServerSideLoads:[ue],flushServerSideAsyncTransactions:[ue],refreshServerSide:[ue],getServerSideGroupLevelState:[ue],refreshInfiniteCache:[Ai],purgeInfiniteCache:[Ai],getInfiniteRowCount:[Ai],isLastRowIndexKnown:[Ai,ue],expandAll:[Se,ue],collapseAll:[Se,ue],onRowHeightChanged:[Se,ue],setRowCount:[Ai,ue],getCacheBlockState:[Ai,ue]},z9={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function W9(e,t,i){const o=z9[e];if(o){const{version:r,new:n,old:l,message:a}=o,d=l??e;return(...c)=>(i.log.deprecated(308,{version:r,apiMethod:d,replacement:n,message:a}),t.apply(t,c))}const s=_9[e];return s?(...r)=>{const n=i.rowModel.getType();if(!s.includes(n)){i.log.error(311,{functionName:e,rowModels:s});return}return t.apply(t,r)}:t}var U9={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",pageNumbers:"PaginationPageNumbers",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},q9={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,pdf:1,document:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1,search:1,fx:1,"values-as":1},$9={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],calculatedColumnAdd:"CalculatedColumns",calculatedColumnEdit:"CalculatedColumns",calculatedColumnRemove:"CalculatedColumns",columnHeaderEdit:"ColumnHeaderEdit",maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",overlayLoading:"Overlay",overlayExporting:"Overlay",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuMoveLeft:"ColumnMenu",menuMoveRight:"ColumnMenu",menuMoveUp:["ColumnsToolPanel","ColumnMenu"],menuMoveDown:["ColumnsToolPanel","ColumnMenu"],menuValue:"MenuCore",showValuesAs:"ShowValuesAs",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",pdfExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow",search:"Find",document:"FileInputOverlay",calculatedColumnsHeader:"CalculatedColumns"},K9=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),E1={"--ag-grid-size":"--ag-spacing","--ag-active-color":"--ag-accent-color","--ag-alpine-active-color":"--ag-accent-color","--ag-balham-active-color":"--ag-accent-color","--ag-material-primary-color":"--ag-accent-color","--ag-header-foreground-color":"--ag-header-text-color","--ag-control-panel-background-color":"--ag-chrome-background-color","--ag-cell-horizontal-border":"--ag-column-border","--ag-header-column-separator-color":"--ag-header-column-border"};function j9(e){const t=getComputedStyle(e),i=[];for(const o of Object.keys(E1))t.getPropertyValue(o).trim()&&i.push(`${o} (use ${E1[o]})`);return i}var Z9=class extends y{constructor(){super(...arguments),this.beanName="validation",this.propertyNameCache=new Map}wireBeans(e){this.gridOptions=e.gridOptions,$2(u1)}warnOnInitialPropertyUpdate(e,t){e==="api"&&N9[t]&&this.warn(22,{key:t})}processGridOptions(e){this.processOptions(e,T4())}validateApiFunction(e,t){return W9(e,t,this.beans)}missingUserComponent(e,t,i,o){this.checkUserComponent(e,t,i,o)}checkUserComponent(e,t,i,o){const s=Si[t];if(s){this.gos.assertModuleRegistered(s,`AG Grid \`${e}\` component: \`${t}\``);return}const r=[...Object.keys(i??{}).filter(l=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(l)),...Object.keys(o??{}).filter(l=>!!o[l])],n=R1({inputValue:t,allSuggestions:r,hideIrrelevant:!0,maxSuggestions:4}).values;this.warn(101,{propertyName:e,componentName:t,suggestions:n})}missingDynamicBean(e){const t=U9[e];return t?this.beans.log.errorToThrow(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:`\`${e}\``}):void 0}checkLegacyThemeVariables(e){if(this.gos.get("theme")==="legacy")return;const t=j9(e);t.length>0&&this.warn(332,{replacements:t})}checkRowEvents(e){Q9.has(e)&&this.warn(10,{eventType:e})}validateIcon(e){this.checkIcon(e)}checkIcon(e){if(K9.has(e)&&this.warn(43,{iconName:e}),q9[e])return;const t=$9[e];if(t){hp({...this.gos.getModuleErrorParams(),reasonOrId:`icon \`${e}\``,moduleName:t,additionalText:"Alternatively, use the CSS icon name directly."});return}this.warn(134,{iconName:e})}isProvidedUserComp(e){return!!Si[e]}validateColDef(e){this.processOptions(e,w4())}processOptions(e,t){const{validations:i,deprecations:o,allProperties:s,allValidNames:r,objectName:n,docsUrl:l}=t,a=this.beans.log,d=Object.keys(e);let c=this.propertyNameCache.get(n);c||(c=new Map,this.propertyNameCache.set(n,c));const u=this.gridOptions.suppressPropertyNamesCheck!==!0;let h=!1;for(const f of d){if(c.has(f))continue;const m=o[f];if(m){const{message:S,version:C}=m;a.deprecated(306,{version:C,name:f,message:S})}const w=i[f],v=this.gridOptions.rowModelType??"clientSide";if(w?.supportedRowModels&&!w.supportedRowModels.includes(v)){const S=e[f];if(S==null||S===!1)continue;a.warn(309,{name:f,rowModel:v,supportedRowModels:w.supportedRowModels}),c.set(f,!1);continue}if(!r.has(f)){if(u){const S=R1({inputValue:f,allSuggestions:s}).values.slice(0,8);a.warn(307,{objectName:n,name:f,suggestions:S,hasContext:r.has("context")})}h=!0,c.set(f,!1);continue}c.set(f,!0)}if(h&&l&&u){const f=this.beans.frameworkOverrides.getDocLink(l);a.warn(310,{objectName:n,url:f})}const g=new Set,p=[];if(d.forEach(f=>{if(c.get(f)===!1)return;const m=e[f];if(m==null||m===!1)return;const w=i[f];if(!w)return;const{dependencies:v,validate:S,expectedType:C}=w;if(C){const b=typeof m;if(b!==C){p.push(N(314,{key:String(f),expectedType:C,actualType:b,value:m}));return}}if(v){const b=this.checkForRequiredDependencies(f,v,e);if(b.length>0){p.push(...b);return}}if(S){const b=S(e,this.gridOptions,this.beans);if(b){typeof b=="string"?g.add(b):p.push(b);return}}}),g.size>0)for(const f of g)wm(f,a);for(let f=0,m=p.length;f<m;++f)p[f].emit(a)}checkForRequiredDependencies(e,t,i){return Object.entries(t).filter(([r,n])=>{const l=i[r];return!n.required.includes(l)}).map(([r,n])=>{const l=n.required.map(a=>a===null?"null":a===void 0?"undefined":String(a));return N(315,{key:String(e),failedKey:r,required:l,reason:n.reason})})}},Q9=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]);function Y9(){WH(),Y2(I9)}var Lc={moduleName:"Validation",version:E,beans:[Z9,O9,G9],userComponents:{agErrorOverlay:V9},css:[k9],onRegister:Y9,with:e=>(zH(e),Lc)};function J9(e){Kt(Lc.with(e),void 0)}import{createPart as X9}from"ag-stack";function T(e,t={}){const i=Object.keys(t).map(o=>{const s=t[o];return s!=null?`${o}=${s}`:null}).filter(Boolean).join(";");return[e,i].filter(o=>o.length>0).join(":")}var F={grid(e){return T("ag-grid-root",{gridId:e})},headerGroupCell(e){return T("ag-header-group-cell",{colId:e})},headerCell(e){return T("ag-header-cell",{colId:e})},headerCheckbox(e){return T("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return T("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return T("ag-floating-filter",{colId:e})},floatingFilterButton(e){return T("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return T("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return T("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return T(`ag-${e.source}-picker-display`,Kr(e))},numberFilterInstanceInput(e){return T(`ag-${e.source}-number-input`,Kr(e))},textFilterInstanceInput(e){return T(`ag-${e.source}-text-input`,Kr(e))},dateFilterInstanceInput(e){return T(`ag-${e.source}-date-input`,Kr(e))},setFilterInstanceMiniFilterInput(e){return T(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return T(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return T(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return T(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return T("ag-advanced-filter-input")},advancedFilterButton(e){return T("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return T("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return T("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return T("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return T("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return T("ag-advanced-filter-builder-add-item-button")},rowNode(e){return T("ag-row",{"row-id":e})},cell(e,t){return T("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return F.cell(e,_t)},checkbox(e,t){return T("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return F.checkbox(e,rs)},autoGroupColumnCheckbox(e){return F.checkbox(e,_t)},dragHandle(e,t){return T("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return T("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return T("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return F.groupContracted(e,_t)},autoGroupExpanded(e){return F.groupExpanded(e,_t)},rowNumber(e){return F.cell(e,Vu)},menu(){return T("ag-menu")},menuOption(e){return T("ag-menu-option",{option:e})},sideBar(){return T("ag-side-bar")},sideBarButton(e){return T("ag-side-button",{label:e})},columnToolPanel(){return T("ag-column-panel")},pivotModeSelect(){return T("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return T("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return T("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return T("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return T("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return T("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,i){return T("ag-column-drop-cell-drag-handle",{source:e,area:t,label:i})},columnDropCellCancelButton(e,t,i){return T("ag-column-drop-cell-cancel",{source:e,area:t,label:i})},columnDropArea(e,t){return T("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return T("ag-filter-panel")},filterToolPanelAddFilterButton(){return T("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return T("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return T("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return T("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return T("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return T("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return T("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return T("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return T("ag-status-bar-selected-row-count")},statusBarAggregations(){return T("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return T("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return T("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return T("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return T("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return T("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return T("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return T("ag-paging-page-summary-panel-total-page",{value:e})},paginationPageNumber(e){return T("ag-paging-page-number",{value:e})},fillHandle(){return T("ag-fill-handle")},columnChooserCloseButton(){return T("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return T("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return T("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return T("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return T("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return T("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return T("ag-overlay")}},eB=e=>{const t={},i=Object.keys(F);for(const o of i)t[o]=(...s)=>e(F[o](...s));return t};function tB(e,t){const i={};for(const o of Object.keys(e))t[o]!==null&&(i[t[o]??o]=e[o]);return i}function iB(e){return e.source!=="floating-filter"?{index:0,...e}:e}function Kr(e){return tB(iB(e),{colLabel:"label"})}import{_debounce as Vc,_getRootNode as x1}from"ag-stack";var F1="data-testid";function I(e,t){e?.setAttribute(F1,t)}function oB(e){F1=e}var P1={"ag-column-drop-rowgroup":"Row Groups","ag-column-drop-aggregation":"Values","ag-column-drop-pivot":"Column Labels"};function sB(e){const t=Object.keys(P1);for(let i=0,o=t.length;i<o;++i)if(e.classList.contains(t[i]))return P1[t[i]]}var rB=class extends y{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=Vc(this,()=>this.setupAllTestIds(),500),t=Vc(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,paginationChanged:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,filterModified:t,filterUiChanged:t,cellSelectionChanged:t});const i=x1(this.beans),o=Vc(this,()=>this.setupAllTestIds(),100),s=r=>{const n=r.target;n instanceof HTMLElement&&n.classList.contains("ag-virtual-list-viewport")&&(n.closest(".ag-column-panel")||n.closest(".ag-panel"))&&o()};i.addEventListener("scroll",s,{capture:!0}),this.addDestroyFunc(()=>i.removeEventListener("scroll",s,{capture:!0})),this.headerObserver=new MutationObserver(t),this.addDestroyFunc(()=>this.headerObserver?.disconnect()),this.popupObserver=new MutationObserver(t),this.addDestroyFunc(()=>this.popupObserver?.disconnect())}observePopupParent(){const e=this.beans.popupSvc?.getPopupParent();!e||e===this.observedPopupParent||(this.popupObserver?.disconnect(),this.popupObserver?.observe(e,{childList:!0}),this.observedPopupParent=e)}observeHeader(e){const t=e?.querySelector(".ag-header");!t||t===this.observedHeader||(this.headerObserver?.disconnect(),this.headerObserver?.observe(t,{childList:!0,subtree:!0}),this.observedHeader=t)}setupAllTestIds(){const e=x1(this.beans),t=vp(this.beans),i=e.querySelector(`[grid-id="${t}"]`);I(i,F.grid(t)),this.observeHeader(i),this.observePopupParent(),e.querySelectorAll(".ag-header-group-cell").forEach(r=>{I(r,F.headerGroupCell(r.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(r=>{const n=r.getAttribute("col-id"),a=r.classList.contains("ag-floating-filter")?F.floatingFilter(n):F.headerCell(n);I(r,a),I(r.querySelector(".ag-header-cell-filter-button"),F.headerFilterButton(n)),I(r.querySelector(".ag-header-cell-menu-button"),F.headerCellMenuButton(n)),I(r.querySelector(".ag-header-cell-resize"),F.headerResizeHandle(n)),I(r.querySelector(".ag-checkbox input[type=checkbox]"),F.headerCheckbox(n)),I(r.querySelector(".ag-floating-filter-button button"),F.floatingFilterButton(n)),this.setupFilterInstance(r.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:n})});const o=e.querySelector(".ag-filter-menu");this.setupFilterInstance(o,{source:"column-filter"}),I(e.querySelector(".ag-advanced-filter input[type=text]"),F.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(r=>{I(r,F.advancedFilterButton(r.textContent))}),I(e.querySelector("button.ag-advanced-filter-builder-button"),F.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((r,n)=>{I(r,n===0?F.advancedFilterPanelMaximiseButton():F.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(r=>{I(r,F.advancedFilterPill(r.querySelector(".ag-picker-field-display")?.textContent))}),I(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),F.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row[row-id]").forEach(r=>{const n=r.getAttribute("row-id");I(r,F.rowNode(n)),r.querySelectorAll(".ag-cell").forEach(l=>{const a=l.getAttribute("col-id");I(l,F.cell(n,a)),I(l.querySelector(".ag-selection-checkbox input[type=checkbox]"),F.checkbox(n,a)),I(l.querySelector(".ag-drag-handle"),F.dragHandle(n,a)),I(l.querySelector(".ag-group-contracted"),F.groupContracted(n,a)),I(l.querySelector(".ag-group-expanded"),F.groupExpanded(n,a))})}),e.querySelectorAll(".ag-menu-list").forEach(r=>{I(r,F.menu()),r.querySelectorAll(".ag-menu-option").forEach(n=>{I(n,F.menuOption(n.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(r=>{I(r,F.sideBar()),r.querySelectorAll(".ag-side-button button").forEach(n=>{I(n,F.sideBarButton(n.querySelector(".ag-side-button-label")?.textContent))}),r.querySelectorAll(".ag-column-panel").forEach(n=>{I(n,F.columnToolPanel()),I(n.querySelector(".ag-pivot-mode-select input[type=checkbox]"),F.pivotModeSelect()),I(n.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),F.columnPanelSelectHeaderCheckbox()),I(n.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),F.columnPanelSelectHeaderFilter()),n.querySelectorAll(".ag-column-select-list").forEach(l=>{l.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const d=a.getAttribute("aria-label");I(a.querySelector(".ag-column-group-closed-icon"),F.columnSelectListItemGroupClosedIcon(d)),I(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),F.columnSelectListItemCheckbox(d)),I(a.querySelector(".ag-drag-handle"),F.columnSelectListItemDragHandle(d))})}),this.setupColumnDropArea(n,"toolbar")}),r.querySelectorAll(".ag-filter-panel").forEach(n=>{I(n,F.filterToolPanel()),I(n.querySelector("button.ag-filter-add-button"),F.filterToolPanelAddFilterButton()),n.querySelectorAll(".ag-filter-card").forEach(l=>{const a=l.querySelector(".ag-filter-card-title")?.textContent,d=l.querySelector(".ag-filter-type-select");I(d,F.filterToolPanelFilterTypeSelector(a)),l.querySelectorAll(".ag-filter").forEach(c=>this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:a}))})}),r.querySelectorAll(".ag-filter-toolpanel").forEach(n=>{I(n.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),F.filterToolPanelSearchInput()),n.querySelectorAll(".ag-filter-toolpanel-group").forEach(l=>{const a=l.querySelector(".ag-filter-toolpanel-group-title")?.textContent;I(l,F.filterToolPanelGroup(a)),I(l.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),F.filterToolPanelGroupCollapsedIcon(a));const d=l.querySelector(".ag-filter-toolpanel-instance-filter");d&&this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:a})})})}),I(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),F.statusBarTotalAndFilteredRowCount()),I(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),F.statusBarTotalRowCount()),I(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),F.statusBarFilteredRowCount()),I(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),F.statusBarSelectedRowCount()),I(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),F.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(r=>{I(r.querySelector(".ag-paging-page-size .ag-picker-field-display"),F.paginationPanelSizePickerDisplay(r.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),r.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(n=>{switch(n.dataset.ref){case"lbFirstRowOnPage":I(n,F.paginationPanelFirstRowOnPage(n.textContent));break;case"lbLastRowOnPage":I(n,F.paginationPanelLastRowOnPage(n.textContent));break;case"lbRecordCount":I(n,F.paginationPanelRecordCount(n.textContent));break}}),r.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(n=>{I(n,F.paginationSummaryPanelButton(n.getAttribute("aria-label")?.toLowerCase()))}),r.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(n=>{switch(n.dataset.ref){case"lbCurrentStatic":I(n,F.paginationSummaryPanelCurrentPage(n.textContent));break;case"lbCurrentInput":{const a=n.querySelector("input")?.value??n.textContent;I(n,F.paginationSummaryPanelCurrentPage(a));break}case"lbTotal":I(n,F.paginationSummaryPanelTotalPage(n.textContent));break}}),r.querySelectorAll(".ag-paging-page-number").forEach(n=>{I(n,F.paginationPageNumber(n.textContent))})}),I(e.querySelector(".ag-fill-handle"),F.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(r=>{I(r.querySelector(".ag-panel-title-bar-button-icon"),F.columnChooserCloseButton()),I(r.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),F.columnChooserSearchBarCheckbox()),I(r.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),F.columnChooserSearchBarFilter()),r.querySelectorAll(".ag-column-select-list").forEach(n=>{n.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const a=l.getAttribute("aria-label");I(l.querySelector(".ag-column-group-closed-icon"),F.columnChooserListItemGroupClosedIcon(a)),I(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),F.columnChooserListItemCheckbox(a)),I(l.querySelector(".ag-drag-handle"),F.columnChooserListItemDragHandle(a))})})}),I(e.querySelector(".ag-overlay-wrapper"),F.overlay());const s=e.querySelector(".ag-column-drop-wrapper");s&&this.setupColumnDropArea(s,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(s=>{I(s,F.filterInstancePickerDisplay(t))});const i=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((s,r,n)=>{const a=n.length>1?{...t,index:r}:t;I(s,F.numberFilterInstanceInput(a))}),e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((s,r,n)=>{const a=n.length>1?{...t,index:r}:t;I(s,F.textFilterInstanceInput(a))}),e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="date"], ${i} .ag-input-field:not(.ag-hidden) input[type="datetime-local"]`).forEach((s,r,n)=>{const a=n.length>1?{...t,index:r}:t;I(s,F.dateFilterInstanceInput(a))});const o=e.querySelector('.ag-mini-filter input[type="text"]');I(o,F.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(s=>{const r=s.querySelector(".ag-checkbox-label")?.textContent?.trim(),n=s.querySelector('input[type="checkbox"]');I(n,F.setFilterInstanceItem(t,r))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(s=>{I(s,F.setFilterApplyPanelButton(t,s.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(s=>{const r=s.querySelector(".ag-radio-button-label")?.textContent;I(s.querySelector("input[type=radio]"),F.filterConditionRadioButton(t,r))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(i=>{const o=sB(i);I(i,F.columnDropArea(t,o)),i.querySelectorAll(".ag-column-drop-cell").forEach(s=>{const r=s.querySelector(".ag-column-drop-cell-text")?.textContent;I(s.querySelector(".ag-drag-handle"),F.columnDropCellDragHandle(t,o,r)),I(s.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),F.columnDropCellCancelButton(t,o,r))})})}},nB={moduleName:"Testing",version:E,beans:[rB]};function lB({testIdAttribute:e}={}){e&&oB(e),Xg.registerModules([nB])}var aB=class{setGridId(e){this.gridId=e}wrap(e,t,i,o){const s=this.createWrapper(e,o);for(const r of t??[])this.createMethod(s,r,!0);for(const r of i??[])this.createMethod(s,r,!1);return s}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){const o=this.gridId;return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&ql(o,49,{methodName:t}),null)}}};import{AgTabGuardCtrl as dB,AgTabGuardFeature as cB}from"ag-stack";var uB=class extends Z1{constructor(e){super(e,gi)}},hB=class extends Q1{constructor(e){super(e,gi)}};import{RefPlaceholder as D1,_isComponent as gB}from"ag-stack";var pB=".ag-field-set{align-items:center;display:flex}.ag-field-set-wrapper{display:flex}.ag-field-set-wrapper-horizontal{flex-direction:row}.ag-field-set-wrapper-vertical{flex-direction:column}",fB={tag:"div",cls:"ag-field-set",role:"group",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-field-set-wrapper ag-field-set-wrapper-horizontal"}]},M1=class extends ha{constructor(e){super(e,fB),this.eLabel=D1,this.eWrapper=D1,this.registerCSS(pB)}postConstruct(){super.postConstruct(),this.addCss("ag-field-set"),this.getGui().setAttribute("aria-labelledby",this.getLabelId())}addItems(e){for(const t of e)this.addItem(t)}addItem(e){const t=gB(e)?e.getGui():e;this.eWrapper.appendChild(t)}setDirection(e){const t=this.eWrapper;return t.classList.toggle("ag-field-set-wrapper-horizontal",e==="horizontal"),t.classList.toggle("ag-field-set-wrapper-vertical",e==="vertical"),this}},mB={selector:"AG-FIELD-SET",component:M1},CB='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;:where(.ag-toggle-button-input){cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width)}}@media not (forced-colors:active){.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color)}&.ag-disabled{opacity:.5}}.ag-toggle-button-input-wrapper:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}.ag-toggle-button-input-wrapper.ag-checked:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}.ag-toggle-button-input-wrapper:focus-within{box-shadow:var(--ag-focus-shadow)}}',T1=class extends vo{constructor(e){super(e,"ag-toggle-button"),this.registerCSS(CB)}setValue(e,t){return super.setValue(e,t),this.toggleCss("ag-selected",this.getValue()),this}},vB={selector:"AG-TOGGLE-BUTTON",component:T1};function wB(e){const t=Object.freeze({...e});class i extends y{constructor(){super(...arguments),this.beanName="internalFeatureFlags",this.flags=t}}return{moduleName:"InternalFeatureFlags",version:E,beans:[i]}}export{wi as ALWAYS_SYNC_GLOBAL_EVENTS,eo as AgAbstractCellEditor,rt as AgAbstractInputField,ha as AgAbstractLabel,vo as AgCheckbox,zs as AgCheckboxSelector,Gt as AgColumn,ci as AgColumnGroup,M1 as AgFieldSet,mB as AgFieldSetSelector,lk as AgFilterButtonSelector,jC as AgInputDateField,fd as AgInputDateFieldSelector,Rr as AgInputNumberField,vd as AgInputNumberFieldSelector,XC as AgInputTextArea,ev as AgInputTextAreaSelector,dt as AgInputTextField,Io as AgInputTextFieldSelector,nv as AgPickerField,zS as AgPromise,_i as AgProvidedColumnGroup,oc as AgRadioButton,Sk as AgRadioButtonSelector,xr as AgSelect,lv as AgSelectSelector,T1 as AgToggleButton,vB as AgToggleButtonSelector,pC as AlignedGridsModule,NH as AllCommunityModule,EC as AutoGenerateColumnsModule,aB as BaseComponentWrapper,AC as BaseCreator,IC as BaseGridSerializingSession,Y0 as BaseSelectionService,y as BeanStub,b0 as BigIntFilterModule,iC as CellApiModule,Eh as CellRangeType,K0 as CellSpanModule,n1 as CellStyleModule,jv as CheckboxEditorModule,Vp as ClientSideRowModelApiModule,ea as ClientSideRowModelModule,ma as ColumnApiModule,PC as ColumnAutoSizeModule,DC as ColumnHoverModule,K as Component,ws as ComponentInstanceGuard,LC as CsvExportModule,Yv as CustomEditorModule,v0 as CustomFilterModule,Gn as DETAIL_ROW_ID_PREFIX,Kv as DateEditorModule,y0 as DateFilterModule,_p as DragAndDropModule,ju as DragSourceType,F0 as EventApiModule,E0 as ExternalFilterModule,ug as FakeHScrollComp,hg as FakeVScrollComp,bC as FileInputOverlayModule,ec as FilterButtonComp,Hw as FilterComp,Vw as FilterWrapperComp,Xi as GRAND_TOTAL_ROW_ID,_t as GROUP_AUTO_COLUMN_ID,OS as GROUP_HIERARCHY_COLUMN_ID_PREFIX,ls as GROUP_TOTAL_ROW_ID_PREFIX,Pg as GridBodyCtrl,dC as GridCoreCreator,$g as GridCtrl,zh as GridHeaderCtrl,k0 as GridStateModule,ng as HeaderRowContainerCtrl,N0 as HighlightChangesModule,x0 as InfiniteRowModelModule,WS as KeyCode,Qv as LargeTextEditorModule,D0 as LocaleModule,P0 as LocaleService,so as ManagedFocusFeature,Xg as ModuleRegistry,$v as NumberEditorModule,S0 as NumberFilterModule,Ec as PaginationModule,V0 as PaginationPageNumbersModule,Sh as PinnedRowModel,H0 as PinnedRowModule,Zu as PositionableFeature,th as ProvidedFilter,R0 as QuickFilterModule,Ji as ROOT_NODE_ID,Vu as ROW_NUMBERS_COLUMN_ID,_0 as RenderApiModule,vC as RowApiModule,U0 as RowAutoHeightModule,Fg as RowContainerCtrl,zp as RowDragModule,ze as RowNode,i1 as RowSelectionModule,l1 as RowStyleModule,rs as SELECTION_COLUMN_ID,Pb as STRUCTURED_SCHEMA_FEATURES,wC as ScrollApiModule,Zv as SelectEditorModule,bh as ServerSideTransactionResultStatus,kl as TabGuardComp,uB as TabGuardCtrl,hB as TabGuardFeature,qv as TextEditorModule,w0 as TextFilterModule,cd as TooltipModule,wt as TouchListener,Uv as UndoRedoEditModule,Lc as ValidationModule,tC as ValueCacheModule,aC as VanillaFrameworkOverrides,fw as _ADVANCED_FILTER_ONLY_OPTIONS,Ga as _BOOLEAN_MIXED_GRID_OPTIONS,j0 as _BaseSingleColService,Co as _ChangedRowNodes,Ti as _ColumnFilterModule,df as _ColumnGroupModule,Xp as _ColumnMoveModule,bp as _CsrmSsrmSharedApiModule,UF as _DATA_TYPE_DERIVED_COL_DEF_PROPERTIES,ia as _DragModule,ct as _EditCoreModule,H3 as _EmptyBean,_r as _FilterCoreModule,wc as _FilterValueModule,c4 as _GET_ALL_EVENTS,xm as _GET_ALL_GRID_OPTIONS,R4 as _GET_SHALLOW_GRID_OPTIONS,Mm as _HeaderComp,Wp as _HorizontalResizeModule,qm as _KeyboardNavigationModule,qd as _PRESET_DATE_FILTER_RANGES,hw as _PRESET_DATE_FILTER_TYPES,tr as _PUBLIC_EVENTS,Ha as _PUBLIC_EVENT_HANDLERS_MAP,Ao as _PopupModule,cs as _ROW_ID_PREFIX_BOTTOM_PINNED,Wn as _ROW_ID_PREFIX_ROW_GROUP,ds as _ROW_ID_PREFIX_TOP_PINNED,gw as _RelativeDateRangeCache,yp as _RowModelSharedApiModule,gi as _STOP_PROPAGATION_CALLBACKS,oa as _SharedDragAndDropModule,TC as _SharedExportModule,iw as _SharedMenuModule,t1 as _SharedRowSelectionModule,Xl as _SortModule,Rp as _SsrmInfiniteSharedApiModule,hc as _TEXT_COMPARISONS,M0 as _UserColumnService,gm as _addAdditionalCss,ts as _addColumnDefaultAndTypes,Ah as _addFocusableContainerListener,G as _addGridCommonParams,Li as _addRowHeightChangedListener,tt as _applyColumnState,ig as _applyHeaderWrapperHidden,og as _applyHeaderWrapperMaxHeight,fs as _areCellsEqual,kh as _attemptToRestoreCellFocus,Oo as _bindFilterCallback,uf as _buildColumnTree,Jo as _canScrollVertically,nn as _canSkipShowingRowGroup,Lt as _clamp,mw as _classifyFilterOptions,uS as _combineAttributesAndGridOptions,Ng as _consoleError,zt as _convertColumnEventSourceType,kf as _coreThemeDefaults,Ph as _createCellId,O as _createElement,Un as _createGlobalRowEvent,Pp as _createIcon,X as _createIconNoSpan,wB as _createInternalFeatureFlagsModule,oh as _createRowNodeSibling,an as _createUserColumn,N as _createValidationWarning,mo as _csrmFirstLeaf,xp as _csrmReorderAllLeafs,jw as _defaultLowercaseFormatter,kn as _defaultPivotSort,Bu as _destroyColumnTreeAll,Ou as _destroyColumnTreeUnused,is as _dispatchColumnChangedEvent,cn as _dispatchGroupHeaderNameChangedEvent,kp as _doDeltaSort,wm as _emitValidationWarning,Ft as _errMsg,fp as _errorForGrid,Hs as _errorToThrowForGrid,cR as _errorToThrowWithoutAttribution,Ul as _errorWithoutAttribution,Mi as _filterCallbackParams,ep as _findEnterpriseCoreModule,Ih as _focusGridInnerElement,qt as _focusNextGridCoreContainer,Ur as _forEachChangedGroupDepthFirst,Wc as _formatNumberCommas,Qn as _getAbsoluteRowIndex,su as _getCallbackForEvent,Ut as _getCellByPosition,Es as _getCellCtrlForEventTarget,Op as _getCellPositionForEvent,Nn as _getCellRendererDetails,nd as _getCellTooltipComponentDefinition,Bi as _getCheckboxLocation,Ot as _getCheckboxes,Ve as _getClientSideRowModel,Hu as _getColumnStateFromColDef,Cw as _getCustomOptionDisplayName,Kd as _getCustomOptionNumberOfInputs,Fw as _getDefaultFilter,Tw as _getDefaultFloatingFilterType,xw as _getDefaultSimpleFilter,Hd as _getDisplayHandler,Iu as _getDisplaySortForColumn,en as _getDomData,bl as _getDrawnColSpan,vb as _getEditorRendererDetails,pt as _getEnableColumnSelection,aS as _getFillHandle,$u as _getFilterDetails,Mw as _getFilterKey,se as _getFilterModel,Ew as _getFilterParamsForDataType,uk as _getFilterValueSource,jn as _getFirstRow,tc as _getFloatingFilterAriaLabel,Ku as _getFloatingFilterCompDetails,tl as _getFloatingFiltersHeight,Yr as _getGlobalGridOption,on as _getGrandTotalPinnedFloat,li as _getGrandTotalRow,gS as _getGridOption,U2 as _getGridRegisteredModules,Vi as _getGroupAggFiltering,Gi as _getGroupSelection,di as _getGroupSelectsDescendants,sS as _getGroupTotalRowCallback,Hi as _getHeaderCheckbox,nl as _getHeaderClassesFromColDef,Bh as _getHeaderRowCount,HC as _getHeaderTooltipComponentDefinition,db as _getInnerCellRendererDetails,es as _getIsRowSelectable,Zn as _getLastRow,lg as _getLayoutCssClass,ad as _getLegacyTooltipFieldValue,Zc as _getMaxConcurrentDatasourceRequests,ta as _getNormalisedMousePosition,il as _getPinnedSectionWidths,io as _getRowAbove,Yn as _getRowBelow,Eg as _getRowContainerClass,lo as _getRowContainerOptions,yg as _getRowCtrlForEventTarget,ow as _getRowHandler,Ge as _getRowHeightAsNumber,gt as _getRowHeightForNode,Bt as _getRowIdCallback,Re as _getRowNode,Oi as _getRowSelectionMode,xg as _getRowSpanContainerClass,Sp as _getServerSideRowModel,_5 as _getShouldDisplayTooltip,Jl as _getSortModel,lS as _getSuppressMultiRanges,Z3 as _getToolPanelClassesFromColDef,qi as _getValueUsingDotPath,RR as _getViewportRowModel,pw as _hasValue,ru as _interpretAsRightClick,Ht as _isAnimateRows,No as _isBlank,Cm as _isCalculatedColumnsEnabled,Ne as _isCellSelectionEnabled,vr as _isCellTooltipConfigured,ie as _isClientSideRowModel,ou as _isColumnMenuAnchoringEnabled,Xe as _isColumnsSortingCoupledToGroup,de as _isDomLayout,Ho as _isFilterCompActive,Yo as _isFiniteNumber,rn as _isFullWidthGroupRow,Xr as _isGetRowHeightFunction,I7 as _isGridSuppliedFilterOptions,A7 as _isGridSuppliedFilterParam,Kc as _isGroupHideColumnsUntilExpanded,$c as _isGroupMultiAutoColumn,tn as _isGroupRowsSticky,sn as _isGroupUseEntireRow,ve as _isHeaderFocusSuppressed,GS as _isHeaderNameChangeForGroup,jc as _isHiddenSingleChildGroup,ge as _isLegacyMenuEnabled,ai as _isMultiRowSelection,jo as _isProtoPollutionKey,vw as _isRangeOutOfOrder,Dh as _isRowBefore,qc as _isRowNumbers,Je as _isRowSelection,Mh as _isSameRow,ht as _isServerSideRowModel,iu as _isSetFilterByDefault,mr as _isShowTooltipWhenTruncated,HS as _isSortTypeAvailable,Ae as _isStopPropagationForAgGrid,hi as _isUseApplyButton,nS as _isUsingNewCellSelectionAPI,Qc as _isUsingNewRowSelectionAPI,uR as _logPreInitWarn,he as _mergeDeep,as as _mergeFilterParamsWithApplicationProvidedParams,kt as _mergedEqual,h4 as _normaliseCalculatedExpression,_e as _normalizeSortType,us as _prevOrNextDisplayedRow,hS as _processOnChange,Td as _refreshFilterUi,ew as _refreshHandlerAndUi,Kt as _registerModule,wu as _resetColumnState,oR as _resetMissingModuleReports,BC as _resolveCellTooltipValue,Lr as _resolveFilter,OC as _resolveGroupTooltipValue,GC as _resolveHeaderTooltipValue,mt as _resolvePivotColumnForRow,BS as _resolvePivotSort,Mp as _resolveSortOptions,Rg as _selectAllCells,xT as _setAgPackageInfo,pn as _setColGroupHeaderNameOverride,kd as _setColMenuVisible,Ui as _setColsVisible,q2 as _setUmd,rS as _shouldUpdateColVisibilityAfterGroup,f3 as _skipFocusableContainerListenerForAgGrid,bt as _stopPropagationForAgGrid,no as _suppressCellMouseEvent,nm as _themeAlpineParams,lm as _themeBalhamParams,dm as _themeMaterialParams,sm as _themeQuartzParams,zc as _toFiniteNumber,Te as _translateForFilter,Br as _trimInputForFilter,je as _unwrapUserComp,Ad as _updateFilterModel,Nh as _updatePinnedSectionWidths,Lp as _updateRowNodeAfterSort,ql as _warnForGrid,co as _warnOnce,Wl as _warnWithoutAttribution,F as agTestIdFor,Bf as buttonStyleAlpine,Of as buttonStyleBalham,Vf as buttonStyleBase,Hf as buttonStyleQuartz,Ro as checkboxStyleDefault,_6 as colorSchemeDark,q6 as colorSchemeDarkBlue,W6 as colorSchemeDarkWarm,V6 as colorSchemeLight,G6 as colorSchemeLightCold,B6 as colorSchemeLightWarm,xo as colorSchemeVariable,Ea as columnDropStyleBordered,xa as columnDropStylePlain,TT as convertColumnGroupState,hC as convertColumnState,FT as createGrid,X9 as createPart,yo as createTheme,dn as dispatchColumnVisibleEvent,J9 as enableDevValidations,On as forEachColDef,DT as getGridApi,uC as getGridElement,aP as iconOverrides,$f as iconSetAlpine,qf as iconSetBalham,Kf as iconSetMaterial,Ys as iconSetQuartz,gP as iconSetQuartzBold,hP as iconSetQuartzLight,Yf as iconSetQuartzRegular,bP as inputStyleBase,Js as inputStyleBordered,Jf as inputStyleUnderlined,wn as isColumn,Me as isColumnGroup,Hn as isColumnGroupAutoCol,Yi as isColumnSelectionCol,_n as isCombinedFilterModel,Ni as isProvidedColumnGroup,fe as isRowNumberCol,Bn as isSpecialCol,jl as onRowHeightChanged,eS as provideGlobalGridOptions,Zl as resetRowHeights,lB as setupAgTestIds,am as styleMaterial,im as tabStyleAlpine,PP as tabStyleBase,tm as tabStyleMaterial,em as tabStyleQuartz,om as tabStyleRolodex,OP as themeAlpine,NP as themeBalham,WP as themeMaterial,rm as themeQuartz,eB as wrapAgTestIdFor};