@marimo-team/frontend 0.14.11-dev6 → 0.14.11-dev8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ConnectedDataExplorerComponent-C0P31a5y.js → ConnectedDataExplorerComponent-BZCmp5aR.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-DXDeGx2f.js → ImageComparisonComponent-COH6lRBM.js} +1 -1
- package/dist/assets/{VegaLite-CUqFyetE.js → VegaLite-BRccRtf1.js} +1 -1
- package/dist/assets/{_baseEach-BHb51vC7.js → _baseEach-lpPh9W5d.js} +1 -1
- package/dist/assets/_baseMap-SEd-6IK0.js +1 -0
- package/dist/assets/{_baseUniq-CABXtSlj.js → _baseUniq-DuEzVkFZ.js} +1 -1
- package/dist/assets/{_createAggregator-SoA2y5HH.js → _createAggregator-8M5K7ZTQ.js} +1 -1
- package/dist/assets/{any-language-editor-Bw2cdBsS.js → any-language-editor-Dx_DmQpj.js} +1 -1
- package/dist/assets/{architectureDiagram-IEHRJDOE-rGoAHYH8.js → architectureDiagram-IEHRJDOE-Cjnv8Vq_.js} +1 -1
- package/dist/assets/{blockDiagram-JOT3LUYC-ZBJWq8Z_.js → blockDiagram-JOT3LUYC-BEIjTgHI.js} +1 -1
- package/dist/assets/{c4Diagram-VJAJSXHY-BHtN7uMz.js → c4Diagram-VJAJSXHY-yQmPFHka.js} +1 -1
- package/dist/assets/channel-BRxA1AAC.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-BO5DiwLV.js → chunk-4BMEZGHF-PHya-g-m.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-B07L-F60.js → chunk-A2AXSNBT-tIg30O59.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-DN2-tsCz.js → chunk-AEK57VVT-BfGK6Ank.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-CbYGlbyQ.js → chunk-D6G4REZN-Cp5gAhaU.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-DVex9AD8.js → chunk-RZ5BOZE2-DhqVBY2t.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-COKmet6t.js → chunk-XZIHB7SX-CJx8F-BK.js} +1 -1
- package/dist/assets/{circle-play-DSXPiHO0.js → circle-play-Bj5lce2y.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-BO83RfZB.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-BO83RfZB.js +1 -0
- package/dist/assets/clone-BlzJWayF.js +1 -0
- package/dist/assets/{compile-DEz1Y6_F.js → compile-C3U-vg-j.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-CymbL2JX.js → dagre-OKDRZEBW-NdY44hpH.js} +1 -1
- package/dist/assets/{data-editor-CTGVBJdC.js → data-editor-DKntw_rI.js} +1 -1
- package/dist/assets/{diagram-SSKATNLV-DY5vs_Bj.js → diagram-SSKATNLV-DF4qzt72.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-ZuQiOKh8.js → diagram-VNBRO52H-Dbdog9oU.js} +1 -1
- package/dist/assets/{edit-page-DcQ6ZhfW.js → edit-page-BrfZeOgm.js} +3 -3
- package/dist/assets/{erDiagram-Q7BY3M3F-l-V_9Yws.js → erDiagram-Q7BY3M3F-Bdu1RFft.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-BsHIJJTe.js → flowDiagram-4HSFHLVR-i5Ql-QiJ.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-2gy5YbWU.js → ganttDiagram-APWFNJXF-Dmuf1Tpo.js} +1 -1
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-B_ELHLbw.js → gitGraphDiagram-7IBYFJ6S-DPM6GuRf.js} +1 -1
- package/dist/assets/{graph-DpLAfWzk.js → graph-CobhnVVx.js} +1 -1
- package/dist/assets/{home-page-6auHzaGk.js → home-page-HL6VA5dw.js} +1 -1
- package/dist/assets/{index-CmVTfWOx.js → index-4adJyO1X.js} +1 -1
- package/dist/assets/{index-DP4HiwTU.js → index-8quJWwGd.js} +1 -1
- package/dist/assets/{index-kmp97oxc.js → index-BJcBz6ZX.js} +1 -1
- package/dist/assets/{index-DAMc4rP9.js → index-Bfo4GfNg.js} +1 -1
- package/dist/assets/{index-DQwFB8dN.js → index-BphBwy1v.js} +1 -1
- package/dist/assets/{index-N67HDT2u.js → index-BtQD1xRv.js} +1 -1
- package/dist/assets/{index-C9EPiaCd.js → index-C-WOu_u0.js} +1 -1
- package/dist/assets/{index-DDVWq6NK.js → index-CJaEBn8N.js} +13 -13
- package/dist/assets/{index-C9EbJL5c.js → index-CaI_HNZm.js} +1 -1
- package/dist/assets/{index-Bz3Lb65G.js → index-CoGECqH1.js} +1 -1
- package/dist/assets/{index-FYYNNs_X.js → index-DBaMrMdr.js} +1 -1
- package/dist/assets/{index-Cig6xGYH.js → index-DPNo-jY5.js} +1 -1
- package/dist/assets/{index-DZWCSqpf.js → index-DVJeqlnb.js} +1 -1
- package/dist/assets/{index-Cs9jrmWP.js → index-Dfhr_H2_.js} +1 -1
- package/dist/assets/{index-DbunLlvf.js → index-DisN4g0K.js} +1 -1
- package/dist/assets/{index-B-mClP__.js → index-DvEXKxQ8.js} +1 -1
- package/dist/assets/{index-BuqjbKw0.js → index-O2ELw6Hz.js} +1 -1
- package/dist/assets/{index-CxQo8Qlm.js → index-RyqulB0I.js} +1 -1
- package/dist/assets/{index-Czo055fo.js → index-kFBaVNpO.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-LArKQ0VO.js +2 -0
- package/dist/assets/{journeyDiagram-U35MCT3I-NKSvtlZA.js → journeyDiagram-U35MCT3I-B3lHGKMN.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-Cw4Vh4wD.js → kanban-definition-NDS4AKOZ-Q5EE_ssH.js} +1 -1
- package/dist/assets/{layout-DodQLUx6.js → layout-CDn8-Krb.js} +1 -1
- package/dist/assets/{linear-B_OPGLLI.js → linear-D6T4b48H.js} +1 -1
- package/dist/assets/{mermaid-CVRC4Ruz.js → mermaid-CMc1ns6_.js} +4 -4
- package/dist/assets/{min-VmgWsmJ_.js → min-rO9M7_m2.js} +1 -1
- package/dist/assets/{mindmap-definition-ALO5MXBD-C0KGo_i_.js → mindmap-definition-ALO5MXBD-BIL8Yk33.js} +1 -1
- package/dist/assets/{pieDiagram-IB7DONF6-DCnELF9y.js → pieDiagram-IB7DONF6-CXSjueVW.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-D0cP5ixt.js → quadrantDiagram-7GDLP6J5-BpFvASma.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-D8LhkSau.js → radar-MK3ICKWK-_zCJRWdg.js} +1 -1
- package/dist/assets/{react-plotly-BmDAcz3M.js → react-plotly-0nDvD8D3.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-BTksN04O.js → requirementDiagram-KVF5MWMF-unRzxNJE.js} +1 -1
- package/dist/assets/{run-page-17VQxU3e.js → run-page-DtL_9ryc.js} +1 -1
- package/dist/assets/{sankeyDiagram-QLVOVGJD-DECOJIMC.js → sankeyDiagram-QLVOVGJD-Cn-XfYiE.js} +1 -1
- package/dist/assets/{sequenceDiagram-X6HHIX6F-C5eDWwoH.js → sequenceDiagram-X6HHIX6F-CeDzabVO.js} +1 -1
- package/dist/assets/{shutdown-button-QvkERkPd.js → shutdown-button-CiYHSs8n.js} +1 -1
- package/dist/assets/{slides-component-DchvPU9C.js → slides-component-DloQyWa5.js} +1 -1
- package/dist/assets/{sortBy-7ke7bFD2.js → sortBy-HenacHs2.js} +1 -1
- package/dist/assets/{stateDiagram-DGXRK772-D6Kwy963.js → stateDiagram-DGXRK772-PGZIv6yW.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-tCMN3u5q.js +1 -0
- package/dist/assets/{storage-BeNhlsrY.js → storage-h-OfQolp.js} +3 -3
- package/dist/assets/{terminal-MtCDBvKs.js → terminal-BgXO_ixx.js} +1 -1
- package/dist/assets/{time-BoP93jle.js → time-CRNs3SAd.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-T1la59d1.js → timeline-definition-BDJGKUSR-fax3GFbF.js} +1 -1
- package/dist/assets/{tracing-CCltm96L.js → tracing-DJ3yaJpl.js} +2 -2
- package/dist/assets/{vega-component-j1BDb2QJ.js → vega-component-Di8oSnQq.js} +1 -1
- package/dist/assets/{xychartDiagram-VJFVF3MP-CoJqer7_.js → xychartDiagram-VJFVF3MP-CK-bnFkL.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_baseMap--rH4lBFQ.js +0 -1
- package/dist/assets/channel-C96bdTqW.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-CehC5H1T.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-CehC5H1T.js +0 -1
- package/dist/assets/clone-H0gxlZXI.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-BwbaSo89.js +0 -2
- package/dist/assets/stateDiagram-v2-YXO3MK2T-Bk10XR94.js +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
var al;import{Q as p,a as x,S as ko,T as vl,U as wl,j as ti,V as Sl,W as yl,X as bl}from"./index-DDVWq6NK.js";var Ot=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0)&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e)}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const r=e.event;r instanceof Event&&(e.eventPath=r.composedPath())}const s=(r,l)=>r.forEach(a=>{if(!l.has(a))return;const h=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(e)):()=>a(e);t?this.dispatchAsync(h):h()}),o=this.getListeners(i,t,!1)??new Set,n=new Set(o);n.size>0&&s(n,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(r=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>r(i,e)):()=>r(i,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},Oo=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(Oo||{}),Go={};function as(e,t){Go[t]||(e(),Go[t]=!0)}function He(e,...t){console.log("AG Grid: "+e,...t)}function R(e,...t){as(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Q(e,...t){as(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function hs(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Rl(e){(function(t,i=0){t.length>0&&window.setTimeout(()=>t.forEach(s=>s()),i)})(e,400)}var ds=[],cs=!1;function No(e){ds.push(e),cs||(cs=!0,window.setTimeout(()=>{const t=ds.slice();ds.length=0,cs=!1,t.forEach(i=>i())},0))}function Se(e,t){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(o,s)},t)}}function Ho(e,t){let i=0;return function(...s){const o=new Date().getTime();o-i<t||(i=o,e.apply(this,s))}}function Je(e){return e==null||e===""?null:e}function M(e,t=!1){return e!=null&&(e!==""||t)}function K(e){return!M(e)}function Me(e){return e==null||e.length===0}function us(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function ft(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function gs(e){if(e!==void 0)return e!==null&&e!==""&&ps(e)}function ps(e){return typeof e=="boolean"?e:typeof e=="string"&&(e.toUpperCase()==="TRUE"||e=="")}function ii(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function Fl(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,l){return r>l?1:r<l?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}function Mi(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}function Bo(e,t){return e.get("rowModelType")===t}function ie(e){return Bo(e,"clientSide")}function Ke(e){return Bo(e,"serverSide")}function Ce(e,t){return e.get("domLayout")===t}function xi(e){return ki(e)!==void 0}function Ai(e){return!e.get("suppressAsyncEvents")}function Vo(e){return typeof e.get("getRowHeight")=="function"}function lt(e,t,i=!1,s){if(s==null&&(s=e.environment.getDefaultRowHeight()),Vo(e)){if(i)return{height:s,estimated:!0};const n={node:t,data:t.data},r=e.getCallback("getRowHeight")(n);if(ms(r))return r===0&&R("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,r),estimated:!1}}if(t.detail&&e.get("masterDetail"))return function(n){if(n.get("detailRowAutoHeight"))return{height:1,estimated:!1};const r=n.get("detailRowHeight");return ms(r)?{height:r,estimated:!1}:{height:300,estimated:!1}}(e);const o=e.get("rowHeight");return{height:o&&ms(o)?o:s,estimated:!1}}function vt(e){const{environment:t}=e,i=e.get("rowHeight");if(!i||K(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(R("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function ms(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function si(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function wt(e,t,i,s){const o=e.getDomDataKey();let n=t[o];K(n)&&(n={},t[o]=n),n[i]=s}function ae(e){let t=null;const i=e.get("getDocument");return i&&M(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&M(t)?t:document}function Wo(e){return ae(e).defaultView||window}function oi(e){return e.eGridDiv.getRootNode()}function re(e){return oi(e).activeElement}function zo(e){const t=ae(e),i=re(e);return i===null||i===t.body}function Gt(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function Ti(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Ce(e,"print"))}function $e(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Cs(e){const t=e.get("groupAggFiltering");return typeof t=="function"?e.getCallback("groupAggFiltering"):t===!0?()=>!0:void 0}function Uo(e){const t=e.get("grandTotalRow");return t||(e.get("groupIncludeTotalFooter")?"bottom":void 0)}function Ko(e){const t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;const i=e.get("groupIncludeFooter");if(typeof i=="function"){const s=e.getCallback("groupIncludeFooter");return o=>s(o)?"bottom":void 0}return()=>i?"bottom":void 0}function $o(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function Ii(e,t){return!t&&e.get("groupDisplayType")==="groupRows"}function Nt(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(R("The getRowId callback must return a string. The ID ",s," is being cast to a string."),s=String(s)),s}}function Ht(e){return(e==null?void 0:e.checkboxes)??!0}function Li(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Ze(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function _o(e){var i;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&((i=t.handle)==null?void 0:i.mode)==="fill":e.get("enableFillHandle")}function jo(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return(!i||!s)&&(i?"enableDeselection":!s||"enableSelection")}return(t.mode==="singleRow"||t.mode==="multiRow")&&(t.enableClickSelection??!1)}function qo(e){const t=jo(e);return t===!0||t==="enableDeselection"}function fs(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function ki(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t==null?void 0:t.mode}function Qo(e){return ki(e)==="multiRow"}function vs(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function St(e){const t=vs(e);return t==="descendants"||t==="filteredDescendants"}function ws(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function $(e){if(e&&e.length)return e[e.length-1]}function at(e,t,i){return e==null&&t==null||e!=null&&t!=null&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s)}function Yo(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function ye(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Oi(e,t,i){e.splice(i,0,t)}function Xo(e,t,i){(function(s,o){for(let n=0;n<o.length;n++)ye(s,o[n])})(e,t),t.slice().reverse().forEach(s=>Oi(e,s,i))}function yt(e,t){return e.indexOf(t)>-1}function Pl(e){return(e==null?void 0:e.flatMap(t=>t))??[]}function Jo(e,t){t!=null&&e!=null&&t.forEach(i=>e.push(i))}var Zo="__ag_Grid_Stop_Propagation",Dl=["touchstart","touchend","touchmove","touchcancel","scroll"],Ss={};function Bt(e){e[Zo]=!0}function et(e){return e[Zo]===!0}var en=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if(typeof Ss[t]=="boolean")return Ss[t];const i=document.createElement(e[t]||"div");return Ss[t="on"+t]=t in i}})();function ys(e,t,i){let s=t;for(;s;){const o=si(e,s,i);if(o)return o;s=s.parentElement}return null}function El(e,t){return!(!t||!e)&&function(i){const s=i;return s.path?s.path:s.composedPath?s.composedPath():function(o){const n=[];let r=o.target;for(;r;)n.push(r),r=r.parentElement;return n}(s)}(t).indexOf(e)>=0}var b=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new Ot),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s in t){const o=t[s];o&&i.push(this._setupListener(e,s,o))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?function(o,n,r,l){const a=yt(Dl,r)?{passive:!0}:void 0;o&&o.addEventListener&&o.addEventListener(n,r,l,a)}(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=o.changeSet.id}const n={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(n)};e.forEach(o=>this.setupGridOptionListener(o,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function be(e){return e instanceof Gi}var Gi=class extends b{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=on(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(e=>e.isVisible())}isPadding(){return this.padding}setExpanded(e){this.expanded=e!==void 0&&e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{dt(t)?e.push(t):be(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let n=0,r=s.length;n<r;n++){const l=s[n];if(!l.isVisible())continue;const a=l.getColumnGroupShow();a==="open"?(e=!0,i=!0):a==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const o=e&&t&&i;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{be(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},tn="ag-Grid-ControlsColumn",Ml=class extends b{constructor(){super(...arguments),this.beanName="controlsColService"}createControlsCols(){const{gos:e}=this,t=e.get("rowSelection");if(!t||typeof t!="object")return[];const i=Ht(t),s=Li(t);if(i||s){const o=e.get("selectionColumnDef"),n={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(l,a,h,d){const c=h.isSelected(),u=d.isSelected();return c&&u?0:c?1:-1},editable:!1,suppressFillHandle:!0,...o,colId:`${tn}`},r=new xs(n,null,n.colId,!1);return this.createBean(r),[r]}return[]}},Ni="ag-Grid-AutoColumn";function bs(e){const t=[],i=s=>{for(let o=0;o<s.length;o++){const n=s[o];dt(n)?t.push(n):be(n)&&i(n.getChildren())}};return i(e),t}function tt(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function ht(e,t,i){const s={};if(!t)return;it(null,t,n=>{s[n.getInstanceId()]=n}),i&&it(null,i,n=>{s[n.getInstanceId()]=null});const o=Object.values(s).filter(n=>n!=null);e.destroyBeans(o)}function Rs(e){return e.getId().startsWith(Ni)}function ni(e){return e.getColId().startsWith(tn)}function Hi(e){let t=[];return e instanceof Array?e.some(i=>typeof i!="string")?R("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):R("colDef.type should be of type 'string' | 'string[]'"),t}var Fs=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e,t){const{frameworkOverrides:i,wrappedListeners:s}=this;let o=t;if(i.shouldWrapOutgoing){o=r=>{i.wrapOutgoing(()=>t(r))};let n=s.get(e);n||(n=new Map,s.set(e,n)),n.set(t,o)}return o}wrapGlobal(e){const{frameworkOverrides:t,wrappedGlobalListeners:i}=this;let s=e;return t.shouldWrapOutgoing&&(s=(o,n)=>{t.wrapOutgoing(()=>e(o,n))},i.set(e,s)),s}unwrap(e,t){const{wrappedListeners:i}=this,s=i.get(e);if(s){const o=s.get(t);if(o)return s.delete(t),s.size===0&&i.delete(e),o}return t}unwrapGlobal(e){const{wrappedGlobalListeners:t}=this,i=t.get(e);return i?(t.delete(e),i):e}},Ps=new Set(["__proto__","constructor","prototype"]);function Be(e,t){if(e!=null)if(Array.isArray(e))for(let i=0;i<e.length;i++)t(i.toString(),e[i]);else for(const[i,s]of Object.entries(e))t(i,s)}function sn(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(Ps.has(i[s]))continue;const o=i[s],n=e[o];t[o]=n}return t}function Ds(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(o=>{if(t&&t.indexOf(o)>=0||Ps.has(o))return;const n=i[o],r=Ms(n)&&n.constructor===Object;s[o]=r?Ds(n):n}),s}function Es(e){if(!e)return[];const t=Object;if(typeof t.values=="function")return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function Re(e,t,i=!0,s=!1){M(t)&&Be(t,(o,n)=>{if(Ps.has(o))return;let r=e[o];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),Ms(n)&&Ms(r)&&!Array.isArray(r)?Re(r,n,i,s):(i||n!==void 0)&&(e[o]=n))})}function ri(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let n=0;n<s.length;n++){if(o==null)return;o=o[s[n]]}return o}function Ms(e){return typeof e=="object"&&e!==null}var xl={resizable:!0,sortable:!0},Al=0;function on(){return Al++}function dt(e){return e instanceof xs}var xs=class extends b{constructor(e,t,i,s){super(),this.isColumn=!0,this.instanceId=on(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new Ot,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){e.sort!==void 0?e.sort!=="asc"&&e.sort!=="desc"||(this.sort=e.sort):e.initialSort!=="asc"&&e.initialSort!=="desc"||(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;t!==void 0?t!==null&&(this.sortIndex=t):i!==null&&(this.sortIndex=i);const s=e.hide,o=e.initialHide;this.visible=s!==void 0?!s:!o,e.pinned!==void 0?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const n=e.flex,r=e.initialFlex;n!==void 0?this.flex=n:r!==void 0&&(this.flex=r)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=M(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=M(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=M(this.colDef.tooltipField)||M(this.colDef.tooltipValueGetter)||M(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=ft(e.width),s=ft(e.initialWidth);return t=i??s??200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(K(this.colDef)||K(this.colDef.showRowGroup))return!1;const t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Fs(this.frameworkOverrides));const i=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(e,t))??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){var s;const i=((s=this.frameworkEventListenerService)==null?void 0:s.unwrap(e,t))??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){const t=this.gos.get("rowSelection");if(t&&typeof t!="string"){const i=ni(this)&&Ht(t);return this.isColumnFunc(e,i)}return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??xl[e]}isColumnFunc(e,t){return typeof t=="boolean"?t:typeof t=="function"?t(this.createColumnFunctionCallbackParams(e)):!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return K(this.sort)}isSorting(){return M(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);i&&Re(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){this.pinned=e===!0||e==="left"?"left":e==="right"?"right":null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(K(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},Tl={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},Il=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=us(e);let i=0;for(;;){let s;if(e?(s=e,i!==0&&(s+="_"+i)):t?(s=t,i!==0&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},Ll=class extends b{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,s){const o=new Il,{existingCols:n,existingGroups:r,existingColKeys:l}=this.extractExistingTreeData(i);o.addExistingKeys(l);const a=this.recursivelyCreateColumns(e,0,t,n,o,r,s),h=this.findMaxDept(a,0),d=this.balanceColumnTree(a,0,h,o);return it(null,d,(c,u)=>{be(c)&&c.setupExpandable(),c.setOriginalParent(u)}),{columnTree:d,treeDept:h}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&it(null,e,o=>{if(be(o)){const n=o;i.push(n)}else{const n=o;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){const i=[],s=this.findDepth(t);return e.forEach(o=>{let n=o;for(let r=s-1;r>=0;r--){const l=new Gi(null,`FAKE_PATH_${o.getId()}}_${r}`,!0,r);this.createBean(l),l.setChildren([n]),n.setOriginalParent(l),n=l}s===0&&o.setOriginalParent(null),i.push(n)}),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&be(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const o=[];for(let n=0;n<e.length;n++){const r=e[n];if(be(r)){const l=r,a=this.balanceColumnTree(l.getChildren(),t+1,i,s);l.setChildren(a),o.push(l)}else{let l,a;for(let h=i-1;h>=t;h--){const d=s.getUniqueKey(null,null),c=this.createMergedColGroupDef(null),u=new Gi(c,d,!0,t);this.createBean(u),a&&a.setChildren([u]),a=u,l||(l=a)}if(l&&a){if(o.push(l),e.some(h=>be(h))){a.setChildren([r]);continue}a.setChildren(e);break}o.push(r)}}return o}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const o=e[s];if(be(o)){const n=o,r=this.findMaxDept(n.getChildren(),t+1);i<r&&(i=r)}}return i}recursivelyCreateColumns(e,t,i,s,o,n,r){if(!e)return[];const l=new Array(e.length);for(let a=0;a<l.length;a++){const h=e[a];this.isColumnGroup(h)?l[a]=this.createColumnGroup(i,h,t,s,o,n,r):l[a]=this.createColumn(i,h,s,o,r)}return l}createColumnGroup(e,t,i,s,o,n,r){const l=this.createMergedColGroupDef(t),a=o.getUniqueKey(l.groupId||null,null),h=new Gi(l,a,!1,i);this.createBean(h);const d=this.findExistingGroup(t,n);d&&n.splice(d.idx,1);const c=d==null?void 0:d.group;c&&h.setExpanded(c.isExpanded());const u=this.recursivelyCreateColumns(l.children,i+1,e,s,o,n,r);return h.setChildren(u),h}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,o){var l;const n=this.findExistingColumn(t,i);n&&(i==null||i.splice(n.idx,1));let r=n==null?void 0:n.column;if(r){const a=this.addColumnDefaultAndTypes(t,r.getColId());r.setColDef(a,t,o),this.applyColumnState(r,a,o)}else{const a=s.getUniqueKey(t.colId,t.field),h=this.addColumnDefaultAndTypes(t,a);r=new xs(h,t,a,e),this.createBean(r)}return(l=this.dataTypeService)==null||l.addColumnListeners(r),r}applyColumnState(e,t,i){const s=ft(t.flex);if(s!==void 0&&e.setFlex(s),e.getFlex()<=0){const r=ft(t.width);if(r!=null)e.setActualWidth(r,i);else{const l=e.getActualWidth();e.setActualWidth(l,i)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort,i):e.setSort(void 0,i));const o=ft(t.sortIndex);o!==void 0&&e.setSortIndex(o);const n=gs(t.hide);n!==void 0&&e.setVisible(!n,i),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(s){if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]}}else if(s===e)return{idx:i,column:t[i]}}}}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}addColumnDefaultAndTypes(e,t){var r;const i={};Re(i,this.gos.get("defaultColDef"),!1,!0);const s=this.updateColDefAndGetColumnType(i,e,t);s&&this.assignColumnTypes(s,i),Re(i,e,!1,!0);const o=this.gos.get("autoGroupColumnDef"),n=$e(this.gos);return e.rowGroup&&o&&n&&Re(i,{sort:o.sort,initialSort:o.initialSort},!1,!0),(r=this.dataTypeService)==null||r.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){var n;const s=(n=this.dataTypeService)==null?void 0:n.updateColDefAndGetColumnType(e,t,i),o=t.type??s??e.type;return e.type=o,o?Hi(o):void 0}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},Tl);Be(this.gos.get("columnTypes")||{},(s,o)=>{s in i?R(`the column type '${s}' is a default column type and cannot be overridden.`):(o.type&&R("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[s]=o)}),e.forEach(s=>{const o=i[s.trim()];o?Re(t,o,!1,!0):R("colDef.type '"+s+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function it(e,t,i){if(t)for(let s=0;s<t.length;s++){const o=t[s];be(o)&&it(o,o.getChildren(),i),i(o,e)}}var kl=class extends b{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.refreshAll(bt(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,bt(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(bt(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(bt(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),bt(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){var h,d,c;const t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();const i=(h=this.colDefCols)==null?void 0:h.list,s=(d=this.colDefCols)==null?void 0:d.tree,o=this.columnFactory.createColumnTree(this.colDefs,!0,s,e);ht(this.context,(c=this.colDefCols)==null?void 0:c.tree,o.columnTree);const n=o.columnTree,r=o.treeDept,l=bs(n),a={};l.forEach(u=>a[u.getId()]=u),this.colDefCols={tree:n,treeDepth:r,list:l,map:a},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var o,n,r;if(!this.colDefCols)return;const t=(o=this.cols)==null?void 0:o.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();const i=(s=this.gos,this.showingPivotResult?!s.get("enableStrictPivotColumnOrder"):s.get("maintainColumnOrder"));var s;e&&!i||this.restoreColOrder(),this.positionLockedCols(),(n=this.showRowGroupColsService)==null||n.refresh(),(r=this.quickFilterService)==null||r.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!at(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){const e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){const{map:t,list:i,tree:s,treeDepth:o}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:o},e.list.some(n=>{var r;return((r=this.cols)==null?void 0:r.map[n.getColId()])!==void 0})||(this.lastPivotOrder=null)}else{const{map:t,list:i,tree:s,treeDepth:o}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:o}}}getColsToShow(){const e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns();return this.cols.list.filter(i=>{const s=Rs(i);if(e){const o=t&&yt(t,i);return s||o}return s||i.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),nn(this.cols))}createAutoCols(){var c;const e=Ii(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),s=()=>{this.autoCols&&(ht(this.context,this.autoCols.tree),this.autoCols=null)};if(!(i.length>0||this.gos.get("treeData"))||t||e||!this.autoColService)return void s();const o=this.autoColService.createAutoCols(i)??[],n=ln(o,((c=this.autoCols)==null?void 0:c.list)||null),r=this.cols.treeDepth,l=this.autoCols?this.autoCols.treeDepth:-1;if(n&&l==r)return;s();const[a,h]=this.columnFactory.balanceTreeForAutoCols(o,this.cols.tree);this.autoCols={list:o,tree:a,treeDepth:h,map:{}};const d=u=>{if(!u)return null;const g=u.filter(m=>!Rs(m));return[...o,...g]};this.lastOrder=d(this.lastOrder),this.lastPivotOrder=d(this.lastPivotOrder)}createControlsCols(){var l,a,h;const e=()=>{var d;ht(this.context,(d=this.controlsCols)==null?void 0:d.tree),this.controlsCols=null};this.controlsColService||e();const t=this.cols.treeDepth,i=(((l=this.controlsCols)==null?void 0:l.treeDepth)??-1)==t,s=((a=this.controlsColService)==null?void 0:a.createControlsCols())??[];if(ln(s,((h=this.controlsCols)==null?void 0:h.list)??[])&&i)return;e();const[o,n]=this.columnFactory.balanceTreeForAutoCols(s,this.cols.tree);this.controlsCols={list:s,tree:o,treeDepth:n,map:{}};const r=d=>{if(!d)return null;const c=d.filter(u=>!ni(u));return[...s,...c]};this.lastOrder=r(this.lastOrder),this.lastPivotOrder=r(this.lastPivotOrder)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),nn(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||Me(e))return;if(Ce(this.gos,"print"))return void R("Changing the column pinning status is not allowed with domLayout='print'");let s;this.columnAnimationService.start(),s=t===!0||t==="left"?"left":t==="right"?"right":null;const o=[];e.forEach(n=>{if(!n)return;const r=this.getCol(n);r&&r.getPinned()!==s&&(r.setPinned(s),o.push(r))}),o.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(o,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;s=be(e)?e.getId():e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){var i;let t=null;return it(null,(i=this.cols)==null?void 0:i.tree,s=>{be(s)&&s.getId()===e&&(t=s)}),t}isColGroupLocked(e){const t=this.gos.get("groupLockGroupColumns");return!e.isRowGroupActive()||t===0?!1:t===-1?!0:t>this.funcColsService.getRowGroupColumns().findIndex(i=>i.getColId()===e.getColId())}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,ie(this.gos)||Ke(this.gos)||R("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const t=new Map(e.map((l,a)=>[l,a]));if(!this.cols.list.some(l=>t.has(l)))return;const i=new Map(this.cols.list.map(l=>[l,!0])),s=e.filter(l=>i.has(l)),o=new Map(s.map(l=>[l,!0])),n=this.cols.list.filter(l=>!o.has(l)),r=s.slice();n.forEach(l=>{let a=l.getOriginalParent();if(!a)return void r.push(l);const h=[];for(;!h.length&&a;)a.getLeafColumns().forEach(u=>{const g=r.indexOf(u)>=0,m=h.indexOf(u)<0;g&&m&&h.push(u)}),a=a.getOriginalParent();if(!h.length)return void r.push(l);const d=h.map(u=>r.indexOf(u)),c=Math.max(...d);Oi(r,l,c+1)}),this.cols.list=r}sortColsLikeKeys(e){if(this.cols==null)return;let t=[];const i={};e.forEach(o=>{if(i[o])return;const n=this.cols.map[o];n&&(t.push(n),i[o]=!0)});let s=0;this.cols.list.forEach(o=>{const n=o.getColId();i[n]==null&&(n.startsWith(Ni)?Oi(t,o,s++):t.push(o))}),t=this.columnMoveService.placeLockedColumns(t),this.columnMoveService.doesMovePassMarryChildren(t)?this.cols.list=t:R("Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}sortColsLikeCols(e){!e||e.length<=1||e.filter(t=>this.cols.list.indexOf(t)<0).length>0||e.sort((t,i)=>this.cols.list.indexOf(t)-this.cols.list.indexOf(i))}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){var s;Xo((s=this.cols)==null?void 0:s.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=(e=this.cols)==null?void 0:e.list:this.lastOrder=(t=this.cols)==null?void 0:t.list}getColumnDefs(){if(!this.colDefCols)return;const e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((s,o)=>this.lastOrder.indexOf(s)-this.lastOrder.indexOf(o)):this.lastOrder&&e.sort((s,o)=>this.cols.list.indexOf(s)-this.cols.list.indexOf(o));const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){var e;return((e=this.colDefCols)==null?void 0:e.treeDepth)>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return!e||!this.gos.get("treeData")||(R("Pivot mode not available with treeData."),!1)}isPivotActive(){const e=this.funcColsService.getPivotColumns();return this.pivotMode&&!Me(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e,t,i;ht(this.context,(e=this.colDefCols)==null?void 0:e.tree),ht(this.context,(t=this.autoCols)==null?void 0:t.tree),ht(this.context,(i=this.controlsCols)==null?void 0:i.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){var e;return(e=this.colDefCols)!=null&&e.list?this.colDefCols.list:null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var i,s,o;const e=this.pivotResultColsService.getPivotResultCols(),t=e==null?void 0:e.list;return[((i=this.colDefCols)==null?void 0:i.list)??[],((s=this.autoCols)==null?void 0:s.list)??[],((o=this.controlsCols)==null?void 0:o.list)??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let o=0;o<s.length;o++)if(rn(s[o],e))return s[o];return this.getAutoCol(e)}getAutoCol(e){var t;return((t=this.autoCols)==null?void 0:t.list.find(i=>rn(i,e)))??null}getAutoCols(){var e;return((e=this.autoCols)==null?void 0:e.list)??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){const e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(const i of t){if(!i)continue;const s=i.getGroupRowCount()||0;for(let o=0;o<s;o++){const n=i.getGroupRowCtrlAtIndex(o),r=e[o];if(n){const l=this.getColumnGroupHeaderRowHeight(n);(r==null||l>r)&&(e[o]=l)}}}return e}getColumnGroupHeaderRowHeight(e){const t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();let i=0;const s=e.getHeaderCtrls();for(const o of s){const n=o.getColumn();if(n.isAutoHeaderHeight()){const r=n.getAutoHeaderHeight();r!=null&&r>i&&(i=r)}}return Math.max(t,i)}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.visibleColsService.getAllCols().filter(i=>i.isAutoHeaderHeight()).map(i=>i.getAutoHeaderHeight()||0);return Math.max(e,...t)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){const s=(t&&typeof t!="string"?Ht(t):void 0)!==(e&&typeof e!="string"?Ht(e):void 0),o=t&&typeof t!="string"?Li(t):void 0,n=e&&typeof e!="string"?Li(e):void 0;(s||o!==n)&&this.refreshAll(i)}};function bt(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function nn(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function rn(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}function ln(e,t){return at(e,t,(i,s)=>i.getColId()===s.getColId())}var Ol=class extends b{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));const{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:o,source:n="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered())return this.timesDelayed++,void setTimeout(()=>this.autoSizeCols(e));this.timesDelayed=0;const r=[];let l=-1;const a=i??this.gos.get("skipHeaderOnAutoSize"),h=s??a;for(;l!==0;){l=0;const d=[];t.forEach(c=>{if(!c)return;const u=this.columnModel.getCol(c);if(!u||r.indexOf(u)>=0)return;const g=this.autoWidthCalculator.getPreferredWidthForColumn(u,a);if(g>0){const m=this.normaliseColumnWidth(u,g);u.setActualWidth(m,n),r.push(u),l++}d.push(u)}),d.length&&this.visibleColsService.refresh(n)}h||this.autoSizeColumnGroupsByColumns(t,n,o),this.eventDispatcher.columnResized(r,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;let o;this.columnModel.getColsForKeys(e).forEach(n=>{let r=n.getParent();for(;r&&r!=i;)r.isPadding()||s.add(r),r=r.getParent()});for(const n of s){for(const r of this.ctrlsService.getHeaderRowContainerCtrls())if(o=r.getHeaderCtrlForColumn(n),o)break;o&&o.resizeLeafColumnsToFit(t)}return[]}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));const i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){const i=e.getMinWidth();t<i&&(t=i);const s=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=s),t}},Gl=class extends b{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>ye(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>ye(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>ye(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);const i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Me(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,s)=>this.setRowGroupActive(i,s,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),e||this.gos.get("suppressMakeColumnVisibleAfterUnGroup")||this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,s)=>this.setValueActive(i,s,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupCols[e],o=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(o,i)}setColList(e,t,i,s,o,n,r){if(!this.columnModel.getCols())return;const l=new Map;t.forEach((a,h)=>l.set(a,h)),t.length=0,M(e)&&e.forEach(a=>{const h=this.columnModel.getColDefCol(a);h&&t.push(h)}),t.forEach((a,h)=>{const d=l.get(a);d!==void 0?s&&d!==h||l.delete(a):l.set(a,0)}),(this.columnModel.getColDefCols()||[]).forEach(a=>{const h=t.indexOf(a)>=0;n(h,a)}),o&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(r),this.eventDispatcher.columnChanged(i,[...l.keys()],r)}updateColList(e,t,i,s,o,n,r){if(!e||Me(e))return;let l=!1;const a=new Set;e.forEach(h=>{if(!h)return;const d=this.columnModel.getColDefCol(h);if(d){if(a.add(d),i){if(t.indexOf(d)>=0)return;t.push(d)}else{const c=t.indexOf(d);if(c<0)return;for(let u=c+1;u<t.length;u++)a.add(t[u]);ye(t,d)}o(d),l=!0}}),l&&(s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(r),this.eventDispatcher.genericColumnEvent(n,Array.from(a),r))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(i,s)=>i.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;return s===null||s===""?null:s!==void 0?!!s:void 0},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,s,o,n,r){const l=[],a=[];(this.columnModel.getColDefCols()||[]).forEach(c=>{const u=e.indexOf(c)<0,g=c.getColDef(),m=gs(n(g)),f=gs(r(g)),C=ft(s(g)),v=ft(o(g));let w;w=m!==void 0?m:C!==void 0?C!==null&&C>=0:u?f!==void 0?f:v!==void 0&&v!=null&&v>=0:t.indexOf(c)>=0,w&&((u?C!=null||v!=null:C!=null)?l.push(c):a.push(c))});const h=c=>{const u=s(c.getColDef()),g=o(c.getColDef());return u??g};l.sort((c,u)=>{const g=h(c),m=h(u);return g===m?0:g<m?-1:1});const d=[].concat(l);return t.forEach(c=>{a.indexOf(c)>=0&&d.push(c)}),a.forEach(c=>{d.indexOf(c)<0&&d.push(c)}),t.forEach(c=>{d.indexOf(c)<0&&i(c,!1)}),d.forEach(c=>{t.indexOf(c)<0&&i(c,!0)}),d}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},s=(o,n,r,l,a,h)=>{const d=this.columnModel.getColDefCols();if(!n.length||!d)return[];const c=Object.keys(o),u=new Set(c),g=new Set(c),m=new Set(n.map(E=>{const D=E.getColId();return g.delete(D),D}).concat(c)),f=[],C={};let v=0;for(let E=0;E<d.length;E++){const D=d[E].getColId();m.has(D)&&(f.push(D),C[D]=v++)}let w=1e3,P=!1,S=0;const F=E=>{const D=C[E];for(let A=S;A<D;A++){const L=f[A];g.has(L)&&(o[L][a]=w++,g.delete(L))}S=D};n.forEach(E=>{const D=E.getColId();if(u.has(D))F(D),o[D][a]=w++;else{const A=E.getColDef();(A[a]===null||A[a]===void 0&&A[h]==null)&&(P||(A[r]||A[r]===void 0&&A[l]?F(D):(g.forEach(L=>{o[L][a]=w+C[L]}),w+=f.length,P=!0)),i[D]||(i[D]={colId:D}),i[D][a]=w++)}})};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},Nl=class extends b{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){const i=this.columnModel.getColDefCols()||[];if(Me(i))return!1;if(e&&e.state&&!e.state.forEach)return R("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),o=(l,a,h)=>{const d=this.compareColumnStatesAndDispatchEvents(t),c=a.slice(),u={},g={},m=[],f=[];let C=0;const v=this.funcColsService.getRowGroupColumns().slice(),w=this.funcColsService.getPivotColumns().slice();l.forEach(F=>{const E=F.colId||"";if(E.startsWith(Ni))return m.push(F),void f.push(F);const D=h(E);D?(this.syncColumnWithStateItem(D,F,e.defaultState,u,g,!1,t,s),ye(c,D)):(f.push(F),C+=1)});const P=F=>this.syncColumnWithStateItem(F,null,e.defaultState,u,g,!1,t,s);c.forEach(P),this.funcColsService.sortRowGroupColumns(an.bind(this,u,v)),this.funcColsService.sortPivotColumns(an.bind(this,g,w)),this.columnModel.refreshCols(!1);const S=(this.columnModel.getAutoCols()||[]).slice();return m.forEach(F=>{const E=this.columnModel.getAutoCol(F.colId);ye(S,E),this.syncColumnWithStateItem(E,F,e.defaultState,null,null,!0,t,s)}),S.forEach(P),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),d(),{unmatchedAndAutoStates:f,unmatchedCount:C}};this.columnAnimationService.start();let{unmatchedAndAutoStates:n,unmatchedCount:r}=o(e.state||[],i,l=>this.columnModel.getColDefCol(l));if(n.length>0||M(e.defaultState)){const l=this.pivotResultColsService.getPivotResultCols(),a=l==null?void 0:l.list;r=o(n,a||[],h=>this.pivotResultColsService.getPivotResultCol(h)).unmatchedCount}return this.columnAnimationService.finish(),r===0}resetColumnState(e){if(Me(this.columnModel.getColDefCols()))return;const t=bs(this.columnModel.getColDefColTree()),i=[];let s=1e3,o=1e3,n=[];const r=this.columnModel.getAutoCols();r&&(n=n.concat(r)),t&&(n=n.concat(t)),n.forEach(l=>{const a=this.getColumnStateFromColDef(l);K(a.rowGroupIndex)&&a.rowGroup&&(a.rowGroupIndex=s++),K(a.pivotIndex)&&a.pivot&&(a.pivotIndex=o++),i.push(a)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(m,f)=>m??f??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),n=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex);let h=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);h!=null||d!=null&&d!=0||(h=null,d=null);let c=t(i.pivotIndex,i.initialPivotIndex),u=t(i.pivot,i.initialPivot);c!=null||u!=null&&u!=0||(c=null,u=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:n,pinned:r,width:l,flex:a,rowGroup:d,rowGroupIndex:h,pivot:u,pivotIndex:c,aggFunc:g}}syncColumnWithStateItem(e,t,i,s,o,n,r,l){if(!e)return;const a=(S,F)=>{const E={value1:void 0,value2:void 0};let D=!1;return t&&(t[S]!==void 0&&(E.value1=t[S],D=!0),M(F)&&t[F]!==void 0&&(E.value2=t[F],D=!0)),!D&&i&&(i[S]!==void 0&&(E.value1=i[S]),M(F)&&i[F]!==void 0&&(E.value2=i[F])),E},h=a("hide").value1;h!==void 0&&e.setVisible(!h,r);const d=a("pinned").value1;d!==void 0&&e.setPinned(d);const c=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),u=a("flex").value1;if(u!==void 0&&e.setFlex(u),u==null){const S=a("width").value1;S!=null&&c!=null&&S>=c&&e.setActualWidth(S,r)}const g=a("sort").value1;g!==void 0&&(g==="desc"||g==="asc"?e.setSort(g,r):e.setSort(void 0,r));const m=a("sortIndex").value1;if(m!==void 0&&e.setSortIndex(m),n||!e.isPrimary())return;const f=a("aggFunc").value1;f!==void 0&&(typeof f=="string"?(e.setAggFunc(f),e.isValueActive()||(e.setValueActive(!0,r),l.addValueCol(e))):(M(f)&&R("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,r),l.removeValueCol(e))));const{value1:C,value2:v}=a("rowGroup","rowGroupIndex");C===void 0&&v===void 0||(typeof v=="number"||C?(e.isRowGroupActive()||(e.setRowGroupActive(!0,r),l.addGroupCol(e)),s&&typeof v=="number"&&(s[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,r),l.removeGroupCol(e)));const{value1:w,value2:P}=a("pivot","pivotIndex");w===void 0&&P===void 0||(typeof P=="number"||w?(e.isPivotActive()||(e.setPivotActive(!0,r),l.addPivotCol(e)),o&&typeof P=="number"&&(o[e.getId()]=P)):e.isPivotActive()&&(e.setPivotActive(!1,r),l.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;const t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach(o=>{s[o.colId]=o}),()=>{const o=this.columnModel.getAllCols(),n=(d,c,u,g)=>{if(at(c.map(g),u.map(g)))return;const m=new Set(c);u.forEach(C=>{m.delete(C)||m.add(C)});const f=[...m];this.eventService.dispatchEvent({type:d,columns:f,column:f.length===1?f[0]:null,source:e})},r=d=>{const c=[];return o.forEach(u=>{const g=s[u.getColId()];g&&d(g,u)&&c.push(u)}),c},l=d=>d.getColId();n("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),l),n("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),l);const a=r((d,c)=>{const u=d.aggFunc!=null,g=u!=c.isValueActive(),m=u&&d.aggFunc!=c.getAggFunc();return g||m});a.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",a,e),this.eventDispatcher.columnResized(r((d,c)=>d.width!=c.getActualWidth()),!0,e),this.eventDispatcher.columnPinned(r((d,c)=>d.pinned!=c.getPinned()),e),this.eventDispatcher.columnVisible(r((d,c)=>d.hide==c.isVisible()),e);const h=r((d,c)=>d.sort!=c.getSort()||d.sortIndex!=c.getSortIndex());h.length>0&&this.sortController.dispatchSortChangedEvents(e,h),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){const i=this.columnGetStateService.getColumnState(),s={};i.forEach(a=>s[a.colId]=a);const o={};e.forEach(a=>{s[a.colId]&&(o[a.colId]=!0)});const n=e.filter(a=>o[a.colId]),r=i.filter(a=>o[a.colId]),l=[];r.forEach((a,h)=>{const d=n&&n[h];if(d&&d.colId!==a.colId){const c=this.columnModel.getCol(d.colId);c&&l.push(c)}}),l.length&&this.eventDispatcher.columnMoved({movedColumns:l,source:t,finished:!0})}},an=(e,t,i,s)=>{const o=e[i.getId()],n=e[s.getId()],r=o!=null,l=n!=null;if(r&&l)return o-n;if(r)return-1;if(l)return 1;const a=t.indexOf(i),h=t.indexOf(s),d=a>=0;return d&&h>=0?a-h:d?-1:1},Hl=class extends b{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){const s=this.columnModel.getCols();if(!s)return;const o=s[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,s=!0){const o=this.columnModel.getCols();if(!o)return;if(t>o.length-e.length)return R("tried to insert columns in invalid location, toIndex = ",t),void R("remember that you should not count the moving columns when calculating the new index");this.columnAnimationService.start();const n=this.columnModel.getColsForKeys(e);this.doesMovePassRules(n,t)&&(this.columnModel.moveInCols(n,t,i),this.eventDispatcher.columnMoved({movedColumns:n,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)}getProposedColumnOrder(e,t){const i=this.columnModel.getCols().slice();return Xo(i,e,t),i}doesMovePassLockedPositions(e){const t=this.gos.get("enableRtl");let i=t?1:-1,s=!0;return e.forEach(o=>{const n=(r=o.getColDef().lockPosition)?r==="left"||r===!0?-1:1:0;var r;t?n>i&&(s=!1):n<i&&(s=!1),i=n}),s}doesMovePassMarryChildren(e){let t=!0;return it(null,this.columnModel.getColTree(),i=>{if(!be(i))return;const s=i,o=s.getColGroupDef();if(!(o&&o.marryChildren))return;const n=[];s.getLeafColumns().forEach(r=>{const l=e.indexOf(r);n.push(l)}),Math.max.apply(Math,n)-Math.min.apply(Math,n)>s.getLeafColumns().length-1&&(t=!1)}),t}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(o=>{const n=o.getColDef().lockPosition;n==="right"?s.push(o):n==="left"||n===!0?t.push(o):i.push(o)}),this.gos.get("enableRtl")?[...s,...i,...t]:[...t,...i,...s]}},Bl=/[&<>"']/g,Vl={"&":"&","<":"<",">":">",'"':""","'":"'"};function _e(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(Bl,s=>Vl[s])}var Wl=class extends b{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,o){const n=e.headerValueGetter;if(n){const l=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});return typeof n=="function"?n(l):typeof n=="string"?this.expressionService.evaluate(n,l):(R("headerValueGetter must be a function or a string"),"")}return e.headerName!=null?e.headerName:e.field?(r=e.field)&&r!=null?r.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(l=>l.substring(0,1).toUpperCase()+(l.length>1?l.substring(1,l.length):"")).join(" "):null:"";var r}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn;let s,o=null;if(M(i)){const n=this.funcColsService.getValueColumns(),r=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&n.length===1,l=e.getColDef().pivotTotalColumnIds!==void 0;if(r&&!l)return t;o=i?i.getAggFunc():null,s=!0}else{const n=e.isValueActive(),r=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();n&&r?(o=e.getAggFunc(),s=!0):s=!1}if(s){const n=typeof o=="string"?o:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${t})`}return t}},zl=class extends b{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){var e;ht(this.context,(e=this.pivotResultCols)==null?void 0:e.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const i=this.columnModel.getColDefCol(t);let s=null;return this.pivotResultCols.list.forEach(o=>{const n=o.getColDef().pivotKeys,r=o.getColDef().pivotValueColumn;at(n,e)&&r===i&&(s=o)}),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){var i,s;if(this.columnModel.isReady()&&(e!=null||this.pivotResultCols!=null)){if(e){this.processPivotResultColDef(e);const o=this.columnFactory.createColumnTree(e,!1,((i=this.pivotResultCols)==null?void 0:i.tree)||this.previousPivotResultCols||void 0,t);ht(this.context,(s=this.pivotResultCols)==null?void 0:s.tree,o.columnTree);const n=o.columnTree,r=o.treeDept,l=bs(n),a={};this.pivotResultCols={tree:n,treeDepth:r,list:l,map:a},this.pivotResultCols.list.forEach(d=>this.pivotResultCols.map[d.getId()]=d);const h=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!h)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=o=>{o.forEach(n=>{if(M(n.children)){const r=n;i&&i(r),s(r.children)}else t&&t(n)})};e&&s(e)}},Ul=class extends b{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){const o=[];e.forEach(n=>{const r=this.columnModel.getColDefCol(n.key)||this.columnModel.getCol(n.key);if(r&&(o.push({width:n.newWidth,ratios:[1],columns:[r]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t)){const l=this.visibleColsService.getColAfter(r);if(!l)return;const a=r.getActualWidth()-n.newWidth,h=l.getActualWidth()+a;o.push({width:h,ratios:[1],columns:[l]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(h=>this.checkMinAndMaxWidthsForSet(h)))){if(i){const h=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(h,i,s)}return}const o=[],n=[];t.forEach(h=>{const{width:d,columns:c,ratios:u}=h,g={},m={};c.forEach(v=>n.push(v));let f=!0,C=0;for(;f;){if(C++,C>1e3){Q("infinite loop in resizeColumnSets");break}f=!1;const v=[];let w=0,P=d;c.forEach((F,E)=>{if(m[F.getId()])P-=g[F.getId()];else{v.push(F);const D=u[E];w+=D}});const S=1/w;v.forEach((F,E)=>{let D;E===v.length-1?D=P:(D=Math.round(u[E]*d*S),P-=D);const A=F.getMinWidth(),L=F.getMaxWidth();D<A?(D=A,m[F.getId()]=!0,f=!0):L>0&&D>L&&(D=L,m[F.getId()]=!0,f=!0),g[F.getId()]=D})}c.forEach(v=>{const w=g[v.getId()];v.getActualWidth()!==w&&(v.setActualWidth(w,s),o.push(v))})});const r=o.length>0;let l=[];r&&(l=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());const a=n.concat(l);(r||i)&&this.eventDispatcher.columnResized(a,i,s,l)}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,o=0,n=!0;return t.forEach(r=>{const l=r.getMinWidth();s+=l||0;const a=r.getMaxWidth();a>0?o+=a:n=!1}),i>=s&&(!n||i<=o)}refreshFlexedColumns(e={}){const t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];const i=this.visibleColsService.getCenterCols();let s=-1;if(e.resizingCols){const u=new Set(e.resizingCols);for(let g=i.length-1;g>=0;g--)if(u.has(i[g])){s=g;break}}let o=0,n=[],r=0,l=0;for(let u=0;u<i.length;u++)i[u].getFlex()&&u>s?(n.push(i[u]),l+=i[u].getFlex(),r+=i[u].getMinWidth()):o+=i[u].getActualWidth();if(!n.length)return[];let a=[];o+r>this.flexViewportWidth&&(n.forEach(u=>u.setActualWidth(u.getMinWidth(),t)),a=n,n=[]);const h=[];let d;e:for(;;){d=this.flexViewportWidth-o;const u=d/l;for(let g=0;g<n.length;g++){const m=n[g],f=u*m.getFlex();let C=0;const v=m.getMinWidth(),w=m.getMaxWidth();if(f<v?C=v:f>w&&(C=w),C){m.setActualWidth(C,t),Yo(n,m),l-=m.getFlex(),a.push(m),o+=m.getActualWidth();continue e}h[g]=Math.floor(f)}break}let c=d;return n.forEach((u,g)=>{const m=g<n.length-1?Math.min(h[g],c):Math.max(h[g],c);u.setActualWidth(m,t),a.push(u),c-=h[g]}),e.skipSetLeft||this.visibleColsService.setLeftValues(t),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(a,!0,t,n),n}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var u;if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,s));const o={};s&&((u=s==null?void 0:s.columnLimits)==null||u.forEach(({key:g,...m})=>{o[typeof g=="string"?g:g.getColId()]=m}));const n=this.visibleColsService.getAllCols(),r=e===tt(n);if(e<=0||!n.length||r)return;const l=[],a=[];n.forEach(g=>{g.getColDef().suppressSizeToFit===!0?a.push(g):l.push(g)});const h=l.slice(0);let d=!1;const c=g=>{ye(l,g),a.push(g)};for(l.forEach(g=>{g.resetActualWidth(t);const m=o==null?void 0:o[g.getId()],f=(m==null?void 0:m.minWidth)??(s==null?void 0:s.defaultMinWidth),C=(m==null?void 0:m.maxWidth)??(s==null?void 0:s.defaultMaxWidth),v=g.getActualWidth();typeof f=="number"&&v<f?g.setActualWidth(f,t,!0):typeof C=="number"&&v>C&&g.setActualWidth(C,t,!0)});!d;){d=!0;const g=e-tt(a);if(g<=0)l.forEach(m=>{var C;const f=((C=o==null?void 0:o[m.getId()])==null?void 0:C.minWidth)??(s==null?void 0:s.defaultMinWidth);typeof f!="number"?m.setMinimum(t):m.setActualWidth(f,t,!0)});else{const m=g/tt(l);let f=g;for(let C=l.length-1;C>=0;C--){const v=l[C],w=o==null?void 0:o[v.getId()],P=(w==null?void 0:w.minWidth)??(s==null?void 0:s.defaultMinWidth),S=(w==null?void 0:w.maxWidth)??(s==null?void 0:s.defaultMaxWidth),F=v.getMinWidth(),E=v.getMaxWidth(),D=typeof P=="number"&&P>F?P:F,A=typeof S=="number"&&S<E?S:E;let L=Math.round(v.getActualWidth()*m);L<D?(L=D,c(v),d=!1):L>A?(L=A,c(v),d=!1):C===0&&(L=f),v.setActualWidth(L,t,!0),f-=L}}}h.forEach(g=>{g.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),i||this.eventDispatcher.columnResized(h,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:o}=e,n=i==null?void 0:i.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:o,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function hn(e,t){return e+"_"+t}function de(e){return e instanceof dn}var dn=class extends b{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return hn(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||e.length===0)&&e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{de(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const e=$(this.displayedChildren).getLeft();this.setLeft(e)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{dt(t)?e.push(t):de(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{dt(t)?e.push(t):de(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e&&e.getProvidedColumnGroup().isExpandable()))return this.displayedChildren=this.children,void this.dispatchLocalEvent({type:"displayedChildrenChanged"});this.children.forEach(t=>{if(!(de(t)&&(!t.displayedChildren||!t.displayedChildren.length)))switch(t.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(t);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(t);break;default:this.displayedChildren.push(t)}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},cn=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return i=typeof t!="number"?0:t+1,this.existingIds[e]=i,i}},Kl=class extends b{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=As(this.treeLeft),this.columnsCenter=As(this.treeCenter),this.columnsRight=As(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){const e=tt(this.columnsCenter),t=tt(this.columnsLeft),i=tt(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?$(this.columnsRight):null):(t=this.columnsLeft?$(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}buildTrees(){const e=this.columnModel.getColsToShow(),t=e.filter(n=>n.getPinned()=="left"),i=e.filter(n=>n.getPinned()=="right"),s=e.filter(n=>n.getPinned()!="left"&&n.getPinned()!="right"),o=new cn;this.treeLeft=this.createGroups({columns:t,idCreator:o,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:o,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:o,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){const e=this.columnModel.getCols(),t=[],i=[],s=[];for(const o of e){const n=o.getPinned();n?n===!0||n==="left"?t.push(o):s.push(o):i.push(o)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return t=de(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{de(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;const t=this.columnModel.getCols().slice(0),i=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(s=>{if(i){let o=tt(s);s.forEach(n=>{o-=n.getActualWidth(),n.setLeft(o,e)})}else{let o=0;s.forEach(n=>{n.setLeft(o,e),o+=n.getActualWidth()})}(function(o,n){for(let r=0;r<n.length;r++)Yo(o,n[r])})(t,s)}),t.forEach(s=>{s.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){const o=[];let n=null;for(let r=0;r<t.length;r++){const l=t[r],a=t.length-r,h=Math.min(l.getColSpan(e),a),d=[l];if(h>1){const u=h-1;for(let g=1;g<=u;g++)d.push(t[r+g]);r+=u}let c;i?(c=!1,d.forEach(u=>{i(u)&&(c=!0)})):c=!0,c&&(o.length===0&&n&&s&&s(l)&&o.push(n),o.push(l)),n=l}return o}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){const t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o=t==="After"?$(s):s[0],n=`getCol${t}`;for(;;){const r=this[n](o);if(!r)return null;const l=this.getColGroupAtLevel(r,i);if(l!==e)return l}}getColGroupAtLevel(e,t){let i,s,o=e.getParent();for(;i=o.getProvidedColumnGroup().getLevel(),s=o.getPaddingLevel(),!(i+s<=t);)o=o.getParent();return o}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Rt(this.treeCenter,!1,e),Rt(this.treeLeft,!1,e),Rt(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){Rt(this.getAllTrees(),!1,e=>{de(e)&&e.calculateDisplayedColumns()})}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?$(s):s[0]}return null}getColumnGroup(e,t){if(!e)return null;if(de(e))return e;const i=this.getAllTrees(),s=typeof t=="number";let o=null;return Rt(i,!1,n=>{if(de(n)){const r=n;let l;l=s?e===r.getGroupId()&&t===r.getPartId():e===r.getGroupId(),l&&(o=r)}}),o}getColAfter(e){const t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return tt(this.columnsLeft)}getDisplayedColumnsRightWidth(){return tt(this.columnsRight)}isColAtEdge(e,t){const i=this.getAllCols();if(!i.length)return!1;const s=t==="first";let o;if(de(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;o=s?n[0]:$(n)}else o=e;return(s?i[0]:$(i))===o}createGroups(e){const{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:o,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(o),l=[];let a=t;for(;a.length;){const h=a;a=[];let d=0;const c=u=>{const g=d;d=u;const m=h[g],f=(de(m)?m.getProvidedColumnGroup():m).getOriginalParent();if(f==null){for(let v=g;v<u;v++)l.push(h[v]);return}const C=this.createColGroup(f,i,r,s,n);for(let v=g;v<u;v++)C.addChild(h[v]);a.push(C)};for(let u=1;u<h.length;u++){const g=h[u],m=(de(g)?g.getProvidedColumnGroup():g).getOriginalParent(),f=h[d];m!==(de(f)?f.getProvidedColumnGroup():f).getOriginalParent()&&c(u)}d<h.length&&c(h.length)}return n||this.setupParentsIntoCols(l,null),l}createColGroup(e,t,i,s,o){const n=e.getGroupId(),r=t.getInstanceIdForKey(n);let l=i[hn(n,r)];return l&&l.getProvidedColumnGroup()!==e&&(l=null),M(l)?l.reset():(l=new dn(e,n,r,s),o||this.createBean(l)),l}mapOldGroupsById(e){const t={},i=s=>{s.forEach(o=>{if(de(o)){const n=o;t[o.getUniqueId()]=n,i(n.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),de(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}};function Rt(e,t,i){if(e)for(let s=0;s<e.length;s++){const o=e[s];de(o)&&Rt(t?o.getDisplayedChildren():o.getChildren(),t,i),i(o)}}function As(e){const t=[];return Rt(e,!0,i=>{dt(i)&&t.push(i)}),t}var un=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],$l=[...un,"scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],_l={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},ve=class{};ve.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],ve.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"],ve.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],ve.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],ve.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],ve.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"],ve.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],ve.ALL_PROPERTIES=[...ve.ARRAY_PROPERTIES,...ve.OBJECT_PROPERTIES,...ve.STRING_PROPERTIES,...ve.NUMBER_PROPERTIES,...ve.FUNCTION_PROPERTIES,...ve.BOOLEAN_PROPERTIES,...ve.OTHER_PROPERTIES];var li=ve,Ie=class{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}};Ie.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",Ie.PUBLIC_EVENTS=un,Ie.EVENT_CALLBACKS=$l.map(e=>Ie.getCallbackForEvent(e)),Ie.BOOLEAN_PROPERTIES=li.BOOLEAN_PROPERTIES,Ie.ALL_PROPERTIES=li.ALL_PROPERTIES,Ie.ALL_PROPERTIES_AND_CALLBACKS=[...Ie.ALL_PROPERTIES,...Ie.EVENT_CALLBACKS],Ie.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Ie.ALL_PROPERTIES_AND_CALLBACKS);var ai=Ie,Vt=class extends b{};function hi(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var di=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1)return void t.forEach(i=>this.addCssClass(i));if(this.cssClassStates[e]!==!0&&e.length){const i=this.getGui();i&&i.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1)return void t.forEach(i=>this.removeCssClass(i));if(this.cssClassStates[e]!==!1&&e.length){const i=this.getGui();i&&i.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return!!t&&t.classList.contains(e)}addOrRemoveCssClass(e,t){if(e){if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1)return void i.forEach(s=>this.addOrRemoveCssClass(s,t))}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}}};function st(e,t,i){i==null||typeof i=="string"&&i==""?gn(e,t):je(e,t,i)}function je(e,t,i){e.setAttribute(pn(t),i.toString())}function gn(e,t){e.removeAttribute(pn(t))}function pn(e){return`aria-${e}`}function Ve(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Wt(e,t){st(e,"label",t)}function ci(e,t){st(e,"labelledby",t)}function mn(e,t){st(e,"live",t)}function Cn(e,t){st(e,"hidden",t)}function Bi(e,t){je(e,"expanded",t)}function fn(e,t){je(e,"colindex",t)}function Vi(e,t){st(e,"selected",t)}function Ts(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var vn="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Is(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,vn),o=qe(e);return i&&!s&&o}function le(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||Cn(e,!t)}function ui(e,t){const i="disabled",s=t?o=>o.setAttribute(i,""):o=>o.removeAttribute(i);s(e),bn(e.querySelectorAll("input"),o=>s(o))}function zt(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function Ft(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:h,paddingLeft:d,marginTop:c,marginRight:u,marginBottom:g,marginLeft:m,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(h||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(c||"0"),marginRight:parseFloat(u||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(m||"0"),boxSizing:f}}function Ls(e){const t=Ft(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function gi(e){const t=Ft(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function wn(e){const{height:t,marginBottom:i,marginTop:s}=Ft(e);return Math.floor(t+i+s)}function Wi(e){const{width:t,marginLeft:i,marginRight:s}=Ft(e);return Math.floor(t+i+s)}function Sn(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=Ft(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function zi(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function Ui(e,t,i){i&&(t*=-1),e.scrollLeft=t}function xe(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Pt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function yn(e){return!!e.offsetParent}function qe(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!yn(e)||window.getComputedStyle(e).visibility!=="visible")}function pi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Ki(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):We(e,t)}function We(e,t){t=ks(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function mi(e,t){t=ks(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function ks(e){return typeof e=="number"?`${e}px`:e}function Os(e){return e instanceof Node||e instanceof HTMLElement}function Le(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function bn(e,t){if(e!=null)for(let i=0;i<e.length;i++)t(e[i])}var Gs,$i,Ns,Hs,Bs,Vs,Ws,zs,Us,Ut=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}};function ot(){return Gs===void 0&&(Gs=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Gs}function Rn(){if($i===void 0)if(ot()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&($i=e[1]!=null?parseFloat(e[1]):0)}else $i=0;return $i}function Ks(){return Hs===void 0&&(Hs=/(firefox)/i.test(navigator.userAgent)),Hs}function Fn(){return Bs===void 0&&(Bs=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Bs}function ct(){return Vs===void 0&&(Vs=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Vs}function Pn(){return!ot()||Rn()>=15}function $s(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t!==-1||i!==null&&(i!==""||Ks())?t.toString():null}function Dn(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(zs=i,Ws=i===0)}function En(){return Ws==null&&Dn(),Ws}var Mn=class Lt extends b{constructor(t,i,s,o){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=s,this.shouldDisplayTooltip=o,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(t){this.popupService=t.popupService,this.userComponentFactory=t.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const t=this.parentComp.getGui();this.tooltipTrigger===0&&this.addManagedListeners(t,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(t,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(t,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(t,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(t){const i=this.gos.get(t);return i<0&&R(`${t} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(t){return t==="show"?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return t&&t!=="hover"?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),ct()||(Lt.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},100):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){var n;const i=t.relatedTarget,s=this.parentComp.getGui(),o=(n=this.tooltipComp)==null?void 0:n.getGui();this.isInteractingWithTooltip||s.contains(i)||this.interactionEnabled&&(o!=null&&o.contains(i))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||Lt.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){return new Date().getTime()-Lt.lastTooltipHideTime<1e3}setToDoNothing(t){t||this.state!==2||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const t={...this.parentComp.getTooltipParams()};if(!M(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())return void this.setToDoNothing();this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(i)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Lt.lastTooltipHideTime=new Date().getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(t,i){if(this.state!==2||this.tooltipInstanceCount!==t)return void this.destroyBean(i);const s=i.getGui();this.tooltipComp=i,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&s.classList.add("ag-tooltip-animate"),this.interactionEnabled&&s.classList.add("ag-tooltip-interactive");const o=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({eChild:s,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:r,columnMoved:r})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(ae(this.gos),{keydown:r=>{s.contains(r==null?void 0:r.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var s;const t=(s=this.tooltipComp)==null?void 0:s.getGui(),i=re(this.gos);return!!t&&t.contains(i)}onTooltipFocusOut(t){const i=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,i.contains(t.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...t,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,s=this.tooltipTrigger===0?1e3:0;window.setTimeout(()=>{t(),this.destroyBean(i)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Lt.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},100)}unlockService(){Lt.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};Mn.isLocked=!1;var jl=Mn,Kt=class extends b{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var t,i,s,o;if(this.tooltipManager!=null)return;const e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new jl(e,(i=(t=this.ctrl).getTooltipShowDelayOverride)==null?void 0:i.call(t),(o=(s=this.ctrl).getTooltipHideDelayOverride)==null?void 0:o.call(s),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){var o,n,r,l,a;const e=this.ctrl,t=(o=e.getColumn)==null?void 0:o.call(e),i=(n=e.getColDef)==null?void 0:n.call(e),s=(r=e.getRowNode)==null?void 0:r.call(e);return{location:e.getLocation(),colDef:i,column:t,rowIndex:(l=e.getRowIndex)==null?void 0:l.call(e),node:s,data:s==null?void 0:s.data,value:this.getTooltipText(),valueFormatted:(a=e.getValueFormatted)==null?void 0:a.call(e),hideTooltipCallback:()=>{var h;return(h=this.tooltipManager)==null?void 0:h.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},ql=new Ut,O=null,ee=class hl extends b{constructor(t,i){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=ql.next(),this.cssClassManager=new di(()=>this.eGui),this.componentSelectors=new Map((i??[]).map(s=>[s.selector,s])),t&&this.setTemplate(t)}preWireBeans(t){super.preWireBeans(t)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(t,i){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,i))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){const{newTooltipText:i,showDelayOverride:s,hideDelayOverride:o,location:n,shouldDisplayTooltip:r}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);const l=()=>this.tooltipText;i!=null&&(this.tooltipFeature=this.createBean(new Kt({getTooltipValue:l,getGui:()=>this.getGui(),getLocation:()=>n??"UNKNOWN",getColDef:t==null?void 0:t.getColDef,getColumn:t==null?void 0:t.getColumn,getTooltipShowDelayOverride:s!=null?()=>s:void 0,getTooltipHideDelayOverride:o!=null?()=>o:void 0,shouldDisplayTooltip:r})))}getDataRefAttribute(t){return t.getAttribute?t.getAttribute("data-ref"):null}applyElementsToComponent(t,i,s,o=null){if(i===void 0&&(i=this.getDataRefAttribute(t)),i){const n=this[i];if(n===O)this[i]=o??t;else{const r=s&&s[i];this.suppressDataRefValidation||r||R(`Issue with data-ref: ${i} on ${this.constructor.name} with ${n}`)}}}createChildComponentsFromTags(t,i){(function(s){if(s==null)return[];const o=[];return bn(s,n=>o.push(n)),o})(t.childNodes).forEach(s=>{if(!(s instanceof HTMLElement))return;const o=this.createComponentFromElement(s,n=>{n.getGui()&&this.copyAttributesFromNode(s,n.getGui())},i);if(o){if(o.addItems&&s.children.length){this.createChildComponentsFromTags(s,i);const n=Array.prototype.slice.call(s.children);o.addItems(n)}this.swapComponentForNode(o,t,s)}else s.childNodes&&this.createChildComponentsFromTags(s,i)})}createComponentFromElement(t,i,s){const o=t.nodeName,n=this.getDataRefAttribute(t),r=o.indexOf("AG-")===0,l=r?this.componentSelectors.get(o):null;let a=null;if(l){hl.elementGettingCreated=t;const h=s&&n?s[n]:void 0;a=new l.component(h),a.setParentComponent(this),this.createBean(a,null,i)}else r&&R(`Missing selector: ${o}`);return this.applyElementsToComponent(t,n,s,a),a}copyAttributesFromNode(t,i){(function(s,o){if(s)for(let n=0;n<s.length;n++){const r=s[n];o(r.name,r.value)}})(t.attributes,(s,o)=>i.setAttribute(s,o))}swapComponentForNode(t,i,s){const o=t.getGui();i.replaceChild(o,s),i.insertBefore(document.createComment(s.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t){const i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(s=>s.setAttribute("tabindex",i.toString()))}setTemplate(t,i,s){const o=pi(t);this.setTemplateFromElement(o,i,s)}setTemplateFromElement(t,i,s,o=!1){if(this.eGui=t,this.suppressDataRefValidation=o,i)for(let n=0;n<i.length;n++){const r=i[n];this.componentSelectors.set(r.selector,r)}this.wireTemplate(t,s)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}getContainerAndElement(t,i){let s=i;return t==null?null:(s||(s=this.eGui),Os(t)?{element:t,parent:s}:{element:t.getGui(),parent:s})}prependChild(t,i){const{element:s,parent:o}=this.getContainerAndElement(t,i)||{};s&&o&&o.insertAdjacentElement("afterbegin",s)}appendChild(t,i){const{element:s,parent:o}=this.getContainerAndElement(t,i)||{};s&&o&&o.appendChild(s)}isDisplayed(){return this.displayed}setVisible(t,i={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:s}=i;(function(o,n,r={}){const{skipAriaHidden:l}=r;o.classList.toggle("ag-invisible",!n),l||Cn(o,!n)})(this.eGui,t,{skipAriaHidden:s})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:s}=i;le(this.eGui,t,{skipAriaHidden:s});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}addGuiEventListener(t,i,s){this.eGui.addEventListener(t,i,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,i))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)}},xn={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},Ql=(()=>{const e=new Set(Object.values(xn));return e.add("eye"),e})();function Ae(e,t,i,s){let o=null;const n=i&&i.getColDef().icons;if(n&&(o=n[e]),t&&!o){const r=t.get("icons");r&&(o=r[e])}if(!o){const r=document.createElement("span");let l=xn[e]??(Ql.has(e)?e:void 0);return l||(R(`Did not find icon ${e}`),l=""),r.setAttribute("class",`ag-icon ag-icon-${l}`),r.setAttribute("unselectable","on"),Ve(r,"presentation"),r}{let r;if(typeof o=="function")r=o();else{if(typeof o!="string")throw new Error("icon from grid options needs to be a string or a function");r=o}if(typeof r=="string")return pi(r);if(Os(r))return r;R("iconRenderer should return back a string or a dom object")}}var Yl=class extends ee{constructor(){super(...arguments),this.dragSource=null,this.eIcon=O,this.eLabel=O}postConstruct(){const e=t=>function(i,s,o){const n=Ae(i,s,o);if(n){const{className:l}=n;if(typeof l=="string"&&l.indexOf("ag-icon")>-1||typeof l=="object"&&l["ag-icon"])return n}const r=document.createElement("span");return r.appendChild(n),r}(t,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`<div class="ag-dnd-ghost ag-unselectable">
|
1
|
+
var al;import{Q as p,a as x,S as ko,T as vl,U as wl,j as ti,V as Sl,W as yl,X as bl}from"./index-CJaEBn8N.js";var Ot=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0)&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e)}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const r=e.event;r instanceof Event&&(e.eventPath=r.composedPath())}const s=(r,l)=>r.forEach(a=>{if(!l.has(a))return;const h=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(e)):()=>a(e);t?this.dispatchAsync(h):h()}),o=this.getListeners(i,t,!1)??new Set,n=new Set(o);n.size>0&&s(n,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(r=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>r(i,e)):()=>r(i,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},Oo=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(Oo||{}),Go={};function as(e,t){Go[t]||(e(),Go[t]=!0)}function He(e,...t){console.log("AG Grid: "+e,...t)}function R(e,...t){as(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Q(e,...t){as(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function hs(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Rl(e){(function(t,i=0){t.length>0&&window.setTimeout(()=>t.forEach(s=>s()),i)})(e,400)}var ds=[],cs=!1;function No(e){ds.push(e),cs||(cs=!0,window.setTimeout(()=>{const t=ds.slice();ds.length=0,cs=!1,t.forEach(i=>i())},0))}function Se(e,t){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(o,s)},t)}}function Ho(e,t){let i=0;return function(...s){const o=new Date().getTime();o-i<t||(i=o,e.apply(this,s))}}function Je(e){return e==null||e===""?null:e}function M(e,t=!1){return e!=null&&(e!==""||t)}function K(e){return!M(e)}function Me(e){return e==null||e.length===0}function us(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function ft(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function gs(e){if(e!==void 0)return e!==null&&e!==""&&ps(e)}function ps(e){return typeof e=="boolean"?e:typeof e=="string"&&(e.toUpperCase()==="TRUE"||e=="")}function ii(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function Fl(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,l){return r>l?1:r<l?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}function Mi(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}function Bo(e,t){return e.get("rowModelType")===t}function ie(e){return Bo(e,"clientSide")}function Ke(e){return Bo(e,"serverSide")}function Ce(e,t){return e.get("domLayout")===t}function xi(e){return ki(e)!==void 0}function Ai(e){return!e.get("suppressAsyncEvents")}function Vo(e){return typeof e.get("getRowHeight")=="function"}function lt(e,t,i=!1,s){if(s==null&&(s=e.environment.getDefaultRowHeight()),Vo(e)){if(i)return{height:s,estimated:!0};const n={node:t,data:t.data},r=e.getCallback("getRowHeight")(n);if(ms(r))return r===0&&R("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,r),estimated:!1}}if(t.detail&&e.get("masterDetail"))return function(n){if(n.get("detailRowAutoHeight"))return{height:1,estimated:!1};const r=n.get("detailRowHeight");return ms(r)?{height:r,estimated:!1}:{height:300,estimated:!1}}(e);const o=e.get("rowHeight");return{height:o&&ms(o)?o:s,estimated:!1}}function vt(e){const{environment:t}=e,i=e.get("rowHeight");if(!i||K(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(R("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function ms(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function si(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function wt(e,t,i,s){const o=e.getDomDataKey();let n=t[o];K(n)&&(n={},t[o]=n),n[i]=s}function ae(e){let t=null;const i=e.get("getDocument");return i&&M(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&M(t)?t:document}function Wo(e){return ae(e).defaultView||window}function oi(e){return e.eGridDiv.getRootNode()}function re(e){return oi(e).activeElement}function zo(e){const t=ae(e),i=re(e);return i===null||i===t.body}function Gt(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function Ti(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Ce(e,"print"))}function $e(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Cs(e){const t=e.get("groupAggFiltering");return typeof t=="function"?e.getCallback("groupAggFiltering"):t===!0?()=>!0:void 0}function Uo(e){const t=e.get("grandTotalRow");return t||(e.get("groupIncludeTotalFooter")?"bottom":void 0)}function Ko(e){const t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;const i=e.get("groupIncludeFooter");if(typeof i=="function"){const s=e.getCallback("groupIncludeFooter");return o=>s(o)?"bottom":void 0}return()=>i?"bottom":void 0}function $o(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function Ii(e,t){return!t&&e.get("groupDisplayType")==="groupRows"}function Nt(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(R("The getRowId callback must return a string. The ID ",s," is being cast to a string."),s=String(s)),s}}function Ht(e){return(e==null?void 0:e.checkboxes)??!0}function Li(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Ze(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function _o(e){var i;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&((i=t.handle)==null?void 0:i.mode)==="fill":e.get("enableFillHandle")}function jo(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return(!i||!s)&&(i?"enableDeselection":!s||"enableSelection")}return(t.mode==="singleRow"||t.mode==="multiRow")&&(t.enableClickSelection??!1)}function qo(e){const t=jo(e);return t===!0||t==="enableDeselection"}function fs(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function ki(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t==null?void 0:t.mode}function Qo(e){return ki(e)==="multiRow"}function vs(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function St(e){const t=vs(e);return t==="descendants"||t==="filteredDescendants"}function ws(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function $(e){if(e&&e.length)return e[e.length-1]}function at(e,t,i){return e==null&&t==null||e!=null&&t!=null&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s)}function Yo(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function ye(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Oi(e,t,i){e.splice(i,0,t)}function Xo(e,t,i){(function(s,o){for(let n=0;n<o.length;n++)ye(s,o[n])})(e,t),t.slice().reverse().forEach(s=>Oi(e,s,i))}function yt(e,t){return e.indexOf(t)>-1}function Pl(e){return(e==null?void 0:e.flatMap(t=>t))??[]}function Jo(e,t){t!=null&&e!=null&&t.forEach(i=>e.push(i))}var Zo="__ag_Grid_Stop_Propagation",Dl=["touchstart","touchend","touchmove","touchcancel","scroll"],Ss={};function Bt(e){e[Zo]=!0}function et(e){return e[Zo]===!0}var en=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if(typeof Ss[t]=="boolean")return Ss[t];const i=document.createElement(e[t]||"div");return Ss[t="on"+t]=t in i}})();function ys(e,t,i){let s=t;for(;s;){const o=si(e,s,i);if(o)return o;s=s.parentElement}return null}function El(e,t){return!(!t||!e)&&function(i){const s=i;return s.path?s.path:s.composedPath?s.composedPath():function(o){const n=[];let r=o.target;for(;r;)n.push(r),r=r.parentElement;return n}(s)}(t).indexOf(e)>=0}var b=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new Ot),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s in t){const o=t[s];o&&i.push(this._setupListener(e,s,o))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?function(o,n,r,l){const a=yt(Dl,r)?{passive:!0}:void 0;o&&o.addEventListener&&o.addEventListener(n,r,l,a)}(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=o.changeSet.id}const n={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(n)};e.forEach(o=>this.setupGridOptionListener(o,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function be(e){return e instanceof Gi}var Gi=class extends b{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=on(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(e=>e.isVisible())}isPadding(){return this.padding}setExpanded(e){this.expanded=e!==void 0&&e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{dt(t)?e.push(t):be(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let n=0,r=s.length;n<r;n++){const l=s[n];if(!l.isVisible())continue;const a=l.getColumnGroupShow();a==="open"?(e=!0,i=!0):a==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const o=e&&t&&i;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{be(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},tn="ag-Grid-ControlsColumn",Ml=class extends b{constructor(){super(...arguments),this.beanName="controlsColService"}createControlsCols(){const{gos:e}=this,t=e.get("rowSelection");if(!t||typeof t!="object")return[];const i=Ht(t),s=Li(t);if(i||s){const o=e.get("selectionColumnDef"),n={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(l,a,h,d){const c=h.isSelected(),u=d.isSelected();return c&&u?0:c?1:-1},editable:!1,suppressFillHandle:!0,...o,colId:`${tn}`},r=new xs(n,null,n.colId,!1);return this.createBean(r),[r]}return[]}},Ni="ag-Grid-AutoColumn";function bs(e){const t=[],i=s=>{for(let o=0;o<s.length;o++){const n=s[o];dt(n)?t.push(n):be(n)&&i(n.getChildren())}};return i(e),t}function tt(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function ht(e,t,i){const s={};if(!t)return;it(null,t,n=>{s[n.getInstanceId()]=n}),i&&it(null,i,n=>{s[n.getInstanceId()]=null});const o=Object.values(s).filter(n=>n!=null);e.destroyBeans(o)}function Rs(e){return e.getId().startsWith(Ni)}function ni(e){return e.getColId().startsWith(tn)}function Hi(e){let t=[];return e instanceof Array?e.some(i=>typeof i!="string")?R("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):R("colDef.type should be of type 'string' | 'string[]'"),t}var Fs=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e,t){const{frameworkOverrides:i,wrappedListeners:s}=this;let o=t;if(i.shouldWrapOutgoing){o=r=>{i.wrapOutgoing(()=>t(r))};let n=s.get(e);n||(n=new Map,s.set(e,n)),n.set(t,o)}return o}wrapGlobal(e){const{frameworkOverrides:t,wrappedGlobalListeners:i}=this;let s=e;return t.shouldWrapOutgoing&&(s=(o,n)=>{t.wrapOutgoing(()=>e(o,n))},i.set(e,s)),s}unwrap(e,t){const{wrappedListeners:i}=this,s=i.get(e);if(s){const o=s.get(t);if(o)return s.delete(t),s.size===0&&i.delete(e),o}return t}unwrapGlobal(e){const{wrappedGlobalListeners:t}=this,i=t.get(e);return i?(t.delete(e),i):e}},Ps=new Set(["__proto__","constructor","prototype"]);function Be(e,t){if(e!=null)if(Array.isArray(e))for(let i=0;i<e.length;i++)t(i.toString(),e[i]);else for(const[i,s]of Object.entries(e))t(i,s)}function sn(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(Ps.has(i[s]))continue;const o=i[s],n=e[o];t[o]=n}return t}function Ds(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(o=>{if(t&&t.indexOf(o)>=0||Ps.has(o))return;const n=i[o],r=Ms(n)&&n.constructor===Object;s[o]=r?Ds(n):n}),s}function Es(e){if(!e)return[];const t=Object;if(typeof t.values=="function")return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function Re(e,t,i=!0,s=!1){M(t)&&Be(t,(o,n)=>{if(Ps.has(o))return;let r=e[o];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),Ms(n)&&Ms(r)&&!Array.isArray(r)?Re(r,n,i,s):(i||n!==void 0)&&(e[o]=n))})}function ri(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let n=0;n<s.length;n++){if(o==null)return;o=o[s[n]]}return o}function Ms(e){return typeof e=="object"&&e!==null}var xl={resizable:!0,sortable:!0},Al=0;function on(){return Al++}function dt(e){return e instanceof xs}var xs=class extends b{constructor(e,t,i,s){super(),this.isColumn=!0,this.instanceId=on(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new Ot,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){e.sort!==void 0?e.sort!=="asc"&&e.sort!=="desc"||(this.sort=e.sort):e.initialSort!=="asc"&&e.initialSort!=="desc"||(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;t!==void 0?t!==null&&(this.sortIndex=t):i!==null&&(this.sortIndex=i);const s=e.hide,o=e.initialHide;this.visible=s!==void 0?!s:!o,e.pinned!==void 0?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const n=e.flex,r=e.initialFlex;n!==void 0?this.flex=n:r!==void 0&&(this.flex=r)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=M(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=M(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=M(this.colDef.tooltipField)||M(this.colDef.tooltipValueGetter)||M(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=ft(e.width),s=ft(e.initialWidth);return t=i??s??200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(K(this.colDef)||K(this.colDef.showRowGroup))return!1;const t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Fs(this.frameworkOverrides));const i=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(e,t))??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){var s;const i=((s=this.frameworkEventListenerService)==null?void 0:s.unwrap(e,t))??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){const t=this.gos.get("rowSelection");if(t&&typeof t!="string"){const i=ni(this)&&Ht(t);return this.isColumnFunc(e,i)}return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??xl[e]}isColumnFunc(e,t){return typeof t=="boolean"?t:typeof t=="function"?t(this.createColumnFunctionCallbackParams(e)):!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return K(this.sort)}isSorting(){return M(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);i&&Re(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){this.pinned=e===!0||e==="left"?"left":e==="right"?"right":null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(K(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},Tl={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},Il=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=us(e);let i=0;for(;;){let s;if(e?(s=e,i!==0&&(s+="_"+i)):t?(s=t,i!==0&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},Ll=class extends b{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,s){const o=new Il,{existingCols:n,existingGroups:r,existingColKeys:l}=this.extractExistingTreeData(i);o.addExistingKeys(l);const a=this.recursivelyCreateColumns(e,0,t,n,o,r,s),h=this.findMaxDept(a,0),d=this.balanceColumnTree(a,0,h,o);return it(null,d,(c,u)=>{be(c)&&c.setupExpandable(),c.setOriginalParent(u)}),{columnTree:d,treeDept:h}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&it(null,e,o=>{if(be(o)){const n=o;i.push(n)}else{const n=o;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){const i=[],s=this.findDepth(t);return e.forEach(o=>{let n=o;for(let r=s-1;r>=0;r--){const l=new Gi(null,`FAKE_PATH_${o.getId()}}_${r}`,!0,r);this.createBean(l),l.setChildren([n]),n.setOriginalParent(l),n=l}s===0&&o.setOriginalParent(null),i.push(n)}),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&be(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const o=[];for(let n=0;n<e.length;n++){const r=e[n];if(be(r)){const l=r,a=this.balanceColumnTree(l.getChildren(),t+1,i,s);l.setChildren(a),o.push(l)}else{let l,a;for(let h=i-1;h>=t;h--){const d=s.getUniqueKey(null,null),c=this.createMergedColGroupDef(null),u=new Gi(c,d,!0,t);this.createBean(u),a&&a.setChildren([u]),a=u,l||(l=a)}if(l&&a){if(o.push(l),e.some(h=>be(h))){a.setChildren([r]);continue}a.setChildren(e);break}o.push(r)}}return o}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const o=e[s];if(be(o)){const n=o,r=this.findMaxDept(n.getChildren(),t+1);i<r&&(i=r)}}return i}recursivelyCreateColumns(e,t,i,s,o,n,r){if(!e)return[];const l=new Array(e.length);for(let a=0;a<l.length;a++){const h=e[a];this.isColumnGroup(h)?l[a]=this.createColumnGroup(i,h,t,s,o,n,r):l[a]=this.createColumn(i,h,s,o,r)}return l}createColumnGroup(e,t,i,s,o,n,r){const l=this.createMergedColGroupDef(t),a=o.getUniqueKey(l.groupId||null,null),h=new Gi(l,a,!1,i);this.createBean(h);const d=this.findExistingGroup(t,n);d&&n.splice(d.idx,1);const c=d==null?void 0:d.group;c&&h.setExpanded(c.isExpanded());const u=this.recursivelyCreateColumns(l.children,i+1,e,s,o,n,r);return h.setChildren(u),h}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,o){var l;const n=this.findExistingColumn(t,i);n&&(i==null||i.splice(n.idx,1));let r=n==null?void 0:n.column;if(r){const a=this.addColumnDefaultAndTypes(t,r.getColId());r.setColDef(a,t,o),this.applyColumnState(r,a,o)}else{const a=s.getUniqueKey(t.colId,t.field),h=this.addColumnDefaultAndTypes(t,a);r=new xs(h,t,a,e),this.createBean(r)}return(l=this.dataTypeService)==null||l.addColumnListeners(r),r}applyColumnState(e,t,i){const s=ft(t.flex);if(s!==void 0&&e.setFlex(s),e.getFlex()<=0){const r=ft(t.width);if(r!=null)e.setActualWidth(r,i);else{const l=e.getActualWidth();e.setActualWidth(l,i)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort,i):e.setSort(void 0,i));const o=ft(t.sortIndex);o!==void 0&&e.setSortIndex(o);const n=gs(t.hide);n!==void 0&&e.setVisible(!n,i),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(s){if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]}}else if(s===e)return{idx:i,column:t[i]}}}}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}addColumnDefaultAndTypes(e,t){var r;const i={};Re(i,this.gos.get("defaultColDef"),!1,!0);const s=this.updateColDefAndGetColumnType(i,e,t);s&&this.assignColumnTypes(s,i),Re(i,e,!1,!0);const o=this.gos.get("autoGroupColumnDef"),n=$e(this.gos);return e.rowGroup&&o&&n&&Re(i,{sort:o.sort,initialSort:o.initialSort},!1,!0),(r=this.dataTypeService)==null||r.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){var n;const s=(n=this.dataTypeService)==null?void 0:n.updateColDefAndGetColumnType(e,t,i),o=t.type??s??e.type;return e.type=o,o?Hi(o):void 0}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},Tl);Be(this.gos.get("columnTypes")||{},(s,o)=>{s in i?R(`the column type '${s}' is a default column type and cannot be overridden.`):(o.type&&R("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[s]=o)}),e.forEach(s=>{const o=i[s.trim()];o?Re(t,o,!1,!0):R("colDef.type '"+s+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function it(e,t,i){if(t)for(let s=0;s<t.length;s++){const o=t[s];be(o)&&it(o,o.getChildren(),i),i(o,e)}}var kl=class extends b{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.refreshAll(bt(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,bt(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(bt(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(bt(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),bt(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){var h,d,c;const t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();const i=(h=this.colDefCols)==null?void 0:h.list,s=(d=this.colDefCols)==null?void 0:d.tree,o=this.columnFactory.createColumnTree(this.colDefs,!0,s,e);ht(this.context,(c=this.colDefCols)==null?void 0:c.tree,o.columnTree);const n=o.columnTree,r=o.treeDept,l=bs(n),a={};l.forEach(u=>a[u.getId()]=u),this.colDefCols={tree:n,treeDepth:r,list:l,map:a},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var o,n,r;if(!this.colDefCols)return;const t=(o=this.cols)==null?void 0:o.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();const i=(s=this.gos,this.showingPivotResult?!s.get("enableStrictPivotColumnOrder"):s.get("maintainColumnOrder"));var s;e&&!i||this.restoreColOrder(),this.positionLockedCols(),(n=this.showRowGroupColsService)==null||n.refresh(),(r=this.quickFilterService)==null||r.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!at(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){const e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){const{map:t,list:i,tree:s,treeDepth:o}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:o},e.list.some(n=>{var r;return((r=this.cols)==null?void 0:r.map[n.getColId()])!==void 0})||(this.lastPivotOrder=null)}else{const{map:t,list:i,tree:s,treeDepth:o}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:o}}}getColsToShow(){const e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns();return this.cols.list.filter(i=>{const s=Rs(i);if(e){const o=t&&yt(t,i);return s||o}return s||i.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),nn(this.cols))}createAutoCols(){var c;const e=Ii(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),s=()=>{this.autoCols&&(ht(this.context,this.autoCols.tree),this.autoCols=null)};if(!(i.length>0||this.gos.get("treeData"))||t||e||!this.autoColService)return void s();const o=this.autoColService.createAutoCols(i)??[],n=ln(o,((c=this.autoCols)==null?void 0:c.list)||null),r=this.cols.treeDepth,l=this.autoCols?this.autoCols.treeDepth:-1;if(n&&l==r)return;s();const[a,h]=this.columnFactory.balanceTreeForAutoCols(o,this.cols.tree);this.autoCols={list:o,tree:a,treeDepth:h,map:{}};const d=u=>{if(!u)return null;const g=u.filter(m=>!Rs(m));return[...o,...g]};this.lastOrder=d(this.lastOrder),this.lastPivotOrder=d(this.lastPivotOrder)}createControlsCols(){var l,a,h;const e=()=>{var d;ht(this.context,(d=this.controlsCols)==null?void 0:d.tree),this.controlsCols=null};this.controlsColService||e();const t=this.cols.treeDepth,i=(((l=this.controlsCols)==null?void 0:l.treeDepth)??-1)==t,s=((a=this.controlsColService)==null?void 0:a.createControlsCols())??[];if(ln(s,((h=this.controlsCols)==null?void 0:h.list)??[])&&i)return;e();const[o,n]=this.columnFactory.balanceTreeForAutoCols(s,this.cols.tree);this.controlsCols={list:s,tree:o,treeDepth:n,map:{}};const r=d=>{if(!d)return null;const c=d.filter(u=>!ni(u));return[...s,...c]};this.lastOrder=r(this.lastOrder),this.lastPivotOrder=r(this.lastPivotOrder)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),nn(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||Me(e))return;if(Ce(this.gos,"print"))return void R("Changing the column pinning status is not allowed with domLayout='print'");let s;this.columnAnimationService.start(),s=t===!0||t==="left"?"left":t==="right"?"right":null;const o=[];e.forEach(n=>{if(!n)return;const r=this.getCol(n);r&&r.getPinned()!==s&&(r.setPinned(s),o.push(r))}),o.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(o,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;s=be(e)?e.getId():e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){var i;let t=null;return it(null,(i=this.cols)==null?void 0:i.tree,s=>{be(s)&&s.getId()===e&&(t=s)}),t}isColGroupLocked(e){const t=this.gos.get("groupLockGroupColumns");return!e.isRowGroupActive()||t===0?!1:t===-1?!0:t>this.funcColsService.getRowGroupColumns().findIndex(i=>i.getColId()===e.getColId())}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,ie(this.gos)||Ke(this.gos)||R("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const t=new Map(e.map((l,a)=>[l,a]));if(!this.cols.list.some(l=>t.has(l)))return;const i=new Map(this.cols.list.map(l=>[l,!0])),s=e.filter(l=>i.has(l)),o=new Map(s.map(l=>[l,!0])),n=this.cols.list.filter(l=>!o.has(l)),r=s.slice();n.forEach(l=>{let a=l.getOriginalParent();if(!a)return void r.push(l);const h=[];for(;!h.length&&a;)a.getLeafColumns().forEach(u=>{const g=r.indexOf(u)>=0,m=h.indexOf(u)<0;g&&m&&h.push(u)}),a=a.getOriginalParent();if(!h.length)return void r.push(l);const d=h.map(u=>r.indexOf(u)),c=Math.max(...d);Oi(r,l,c+1)}),this.cols.list=r}sortColsLikeKeys(e){if(this.cols==null)return;let t=[];const i={};e.forEach(o=>{if(i[o])return;const n=this.cols.map[o];n&&(t.push(n),i[o]=!0)});let s=0;this.cols.list.forEach(o=>{const n=o.getColId();i[n]==null&&(n.startsWith(Ni)?Oi(t,o,s++):t.push(o))}),t=this.columnMoveService.placeLockedColumns(t),this.columnMoveService.doesMovePassMarryChildren(t)?this.cols.list=t:R("Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}sortColsLikeCols(e){!e||e.length<=1||e.filter(t=>this.cols.list.indexOf(t)<0).length>0||e.sort((t,i)=>this.cols.list.indexOf(t)-this.cols.list.indexOf(i))}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){var s;Xo((s=this.cols)==null?void 0:s.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=(e=this.cols)==null?void 0:e.list:this.lastOrder=(t=this.cols)==null?void 0:t.list}getColumnDefs(){if(!this.colDefCols)return;const e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((s,o)=>this.lastOrder.indexOf(s)-this.lastOrder.indexOf(o)):this.lastOrder&&e.sort((s,o)=>this.cols.list.indexOf(s)-this.cols.list.indexOf(o));const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){var e;return((e=this.colDefCols)==null?void 0:e.treeDepth)>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return!e||!this.gos.get("treeData")||(R("Pivot mode not available with treeData."),!1)}isPivotActive(){const e=this.funcColsService.getPivotColumns();return this.pivotMode&&!Me(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e,t,i;ht(this.context,(e=this.colDefCols)==null?void 0:e.tree),ht(this.context,(t=this.autoCols)==null?void 0:t.tree),ht(this.context,(i=this.controlsCols)==null?void 0:i.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){var e;return(e=this.colDefCols)!=null&&e.list?this.colDefCols.list:null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var i,s,o;const e=this.pivotResultColsService.getPivotResultCols(),t=e==null?void 0:e.list;return[((i=this.colDefCols)==null?void 0:i.list)??[],((s=this.autoCols)==null?void 0:s.list)??[],((o=this.controlsCols)==null?void 0:o.list)??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let o=0;o<s.length;o++)if(rn(s[o],e))return s[o];return this.getAutoCol(e)}getAutoCol(e){var t;return((t=this.autoCols)==null?void 0:t.list.find(i=>rn(i,e)))??null}getAutoCols(){var e;return((e=this.autoCols)==null?void 0:e.list)??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){const e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(const i of t){if(!i)continue;const s=i.getGroupRowCount()||0;for(let o=0;o<s;o++){const n=i.getGroupRowCtrlAtIndex(o),r=e[o];if(n){const l=this.getColumnGroupHeaderRowHeight(n);(r==null||l>r)&&(e[o]=l)}}}return e}getColumnGroupHeaderRowHeight(e){const t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();let i=0;const s=e.getHeaderCtrls();for(const o of s){const n=o.getColumn();if(n.isAutoHeaderHeight()){const r=n.getAutoHeaderHeight();r!=null&&r>i&&(i=r)}}return Math.max(t,i)}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.visibleColsService.getAllCols().filter(i=>i.isAutoHeaderHeight()).map(i=>i.getAutoHeaderHeight()||0);return Math.max(e,...t)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){const s=(t&&typeof t!="string"?Ht(t):void 0)!==(e&&typeof e!="string"?Ht(e):void 0),o=t&&typeof t!="string"?Li(t):void 0,n=e&&typeof e!="string"?Li(e):void 0;(s||o!==n)&&this.refreshAll(i)}};function bt(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function nn(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function rn(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}function ln(e,t){return at(e,t,(i,s)=>i.getColId()===s.getColId())}var Ol=class extends b{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));const{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:o,source:n="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered())return this.timesDelayed++,void setTimeout(()=>this.autoSizeCols(e));this.timesDelayed=0;const r=[];let l=-1;const a=i??this.gos.get("skipHeaderOnAutoSize"),h=s??a;for(;l!==0;){l=0;const d=[];t.forEach(c=>{if(!c)return;const u=this.columnModel.getCol(c);if(!u||r.indexOf(u)>=0)return;const g=this.autoWidthCalculator.getPreferredWidthForColumn(u,a);if(g>0){const m=this.normaliseColumnWidth(u,g);u.setActualWidth(m,n),r.push(u),l++}d.push(u)}),d.length&&this.visibleColsService.refresh(n)}h||this.autoSizeColumnGroupsByColumns(t,n,o),this.eventDispatcher.columnResized(r,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;let o;this.columnModel.getColsForKeys(e).forEach(n=>{let r=n.getParent();for(;r&&r!=i;)r.isPadding()||s.add(r),r=r.getParent()});for(const n of s){for(const r of this.ctrlsService.getHeaderRowContainerCtrls())if(o=r.getHeaderCtrlForColumn(n),o)break;o&&o.resizeLeafColumnsToFit(t)}return[]}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));const i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){const i=e.getMinWidth();t<i&&(t=i);const s=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=s),t}},Gl=class extends b{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>ye(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>ye(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>ye(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);const i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Me(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,s)=>this.setRowGroupActive(i,s,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),e||this.gos.get("suppressMakeColumnVisibleAfterUnGroup")||this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,s)=>this.setValueActive(i,s,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupCols[e],o=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(o,i)}setColList(e,t,i,s,o,n,r){if(!this.columnModel.getCols())return;const l=new Map;t.forEach((a,h)=>l.set(a,h)),t.length=0,M(e)&&e.forEach(a=>{const h=this.columnModel.getColDefCol(a);h&&t.push(h)}),t.forEach((a,h)=>{const d=l.get(a);d!==void 0?s&&d!==h||l.delete(a):l.set(a,0)}),(this.columnModel.getColDefCols()||[]).forEach(a=>{const h=t.indexOf(a)>=0;n(h,a)}),o&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(r),this.eventDispatcher.columnChanged(i,[...l.keys()],r)}updateColList(e,t,i,s,o,n,r){if(!e||Me(e))return;let l=!1;const a=new Set;e.forEach(h=>{if(!h)return;const d=this.columnModel.getColDefCol(h);if(d){if(a.add(d),i){if(t.indexOf(d)>=0)return;t.push(d)}else{const c=t.indexOf(d);if(c<0)return;for(let u=c+1;u<t.length;u++)a.add(t[u]);ye(t,d)}o(d),l=!0}}),l&&(s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(r),this.eventDispatcher.genericColumnEvent(n,Array.from(a),r))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(i,s)=>i.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;return s===null||s===""?null:s!==void 0?!!s:void 0},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,s,o,n,r){const l=[],a=[];(this.columnModel.getColDefCols()||[]).forEach(c=>{const u=e.indexOf(c)<0,g=c.getColDef(),m=gs(n(g)),f=gs(r(g)),C=ft(s(g)),v=ft(o(g));let w;w=m!==void 0?m:C!==void 0?C!==null&&C>=0:u?f!==void 0?f:v!==void 0&&v!=null&&v>=0:t.indexOf(c)>=0,w&&((u?C!=null||v!=null:C!=null)?l.push(c):a.push(c))});const h=c=>{const u=s(c.getColDef()),g=o(c.getColDef());return u??g};l.sort((c,u)=>{const g=h(c),m=h(u);return g===m?0:g<m?-1:1});const d=[].concat(l);return t.forEach(c=>{a.indexOf(c)>=0&&d.push(c)}),a.forEach(c=>{d.indexOf(c)<0&&d.push(c)}),t.forEach(c=>{d.indexOf(c)<0&&i(c,!1)}),d.forEach(c=>{t.indexOf(c)<0&&i(c,!0)}),d}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},s=(o,n,r,l,a,h)=>{const d=this.columnModel.getColDefCols();if(!n.length||!d)return[];const c=Object.keys(o),u=new Set(c),g=new Set(c),m=new Set(n.map(E=>{const D=E.getColId();return g.delete(D),D}).concat(c)),f=[],C={};let v=0;for(let E=0;E<d.length;E++){const D=d[E].getColId();m.has(D)&&(f.push(D),C[D]=v++)}let w=1e3,P=!1,S=0;const F=E=>{const D=C[E];for(let A=S;A<D;A++){const L=f[A];g.has(L)&&(o[L][a]=w++,g.delete(L))}S=D};n.forEach(E=>{const D=E.getColId();if(u.has(D))F(D),o[D][a]=w++;else{const A=E.getColDef();(A[a]===null||A[a]===void 0&&A[h]==null)&&(P||(A[r]||A[r]===void 0&&A[l]?F(D):(g.forEach(L=>{o[L][a]=w+C[L]}),w+=f.length,P=!0)),i[D]||(i[D]={colId:D}),i[D][a]=w++)}})};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},Nl=class extends b{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){const i=this.columnModel.getColDefCols()||[];if(Me(i))return!1;if(e&&e.state&&!e.state.forEach)return R("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),o=(l,a,h)=>{const d=this.compareColumnStatesAndDispatchEvents(t),c=a.slice(),u={},g={},m=[],f=[];let C=0;const v=this.funcColsService.getRowGroupColumns().slice(),w=this.funcColsService.getPivotColumns().slice();l.forEach(F=>{const E=F.colId||"";if(E.startsWith(Ni))return m.push(F),void f.push(F);const D=h(E);D?(this.syncColumnWithStateItem(D,F,e.defaultState,u,g,!1,t,s),ye(c,D)):(f.push(F),C+=1)});const P=F=>this.syncColumnWithStateItem(F,null,e.defaultState,u,g,!1,t,s);c.forEach(P),this.funcColsService.sortRowGroupColumns(an.bind(this,u,v)),this.funcColsService.sortPivotColumns(an.bind(this,g,w)),this.columnModel.refreshCols(!1);const S=(this.columnModel.getAutoCols()||[]).slice();return m.forEach(F=>{const E=this.columnModel.getAutoCol(F.colId);ye(S,E),this.syncColumnWithStateItem(E,F,e.defaultState,null,null,!0,t,s)}),S.forEach(P),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),d(),{unmatchedAndAutoStates:f,unmatchedCount:C}};this.columnAnimationService.start();let{unmatchedAndAutoStates:n,unmatchedCount:r}=o(e.state||[],i,l=>this.columnModel.getColDefCol(l));if(n.length>0||M(e.defaultState)){const l=this.pivotResultColsService.getPivotResultCols(),a=l==null?void 0:l.list;r=o(n,a||[],h=>this.pivotResultColsService.getPivotResultCol(h)).unmatchedCount}return this.columnAnimationService.finish(),r===0}resetColumnState(e){if(Me(this.columnModel.getColDefCols()))return;const t=bs(this.columnModel.getColDefColTree()),i=[];let s=1e3,o=1e3,n=[];const r=this.columnModel.getAutoCols();r&&(n=n.concat(r)),t&&(n=n.concat(t)),n.forEach(l=>{const a=this.getColumnStateFromColDef(l);K(a.rowGroupIndex)&&a.rowGroup&&(a.rowGroupIndex=s++),K(a.pivotIndex)&&a.pivot&&(a.pivotIndex=o++),i.push(a)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(m,f)=>m??f??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),n=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex);let h=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);h!=null||d!=null&&d!=0||(h=null,d=null);let c=t(i.pivotIndex,i.initialPivotIndex),u=t(i.pivot,i.initialPivot);c!=null||u!=null&&u!=0||(c=null,u=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:n,pinned:r,width:l,flex:a,rowGroup:d,rowGroupIndex:h,pivot:u,pivotIndex:c,aggFunc:g}}syncColumnWithStateItem(e,t,i,s,o,n,r,l){if(!e)return;const a=(S,F)=>{const E={value1:void 0,value2:void 0};let D=!1;return t&&(t[S]!==void 0&&(E.value1=t[S],D=!0),M(F)&&t[F]!==void 0&&(E.value2=t[F],D=!0)),!D&&i&&(i[S]!==void 0&&(E.value1=i[S]),M(F)&&i[F]!==void 0&&(E.value2=i[F])),E},h=a("hide").value1;h!==void 0&&e.setVisible(!h,r);const d=a("pinned").value1;d!==void 0&&e.setPinned(d);const c=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),u=a("flex").value1;if(u!==void 0&&e.setFlex(u),u==null){const S=a("width").value1;S!=null&&c!=null&&S>=c&&e.setActualWidth(S,r)}const g=a("sort").value1;g!==void 0&&(g==="desc"||g==="asc"?e.setSort(g,r):e.setSort(void 0,r));const m=a("sortIndex").value1;if(m!==void 0&&e.setSortIndex(m),n||!e.isPrimary())return;const f=a("aggFunc").value1;f!==void 0&&(typeof f=="string"?(e.setAggFunc(f),e.isValueActive()||(e.setValueActive(!0,r),l.addValueCol(e))):(M(f)&&R("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,r),l.removeValueCol(e))));const{value1:C,value2:v}=a("rowGroup","rowGroupIndex");C===void 0&&v===void 0||(typeof v=="number"||C?(e.isRowGroupActive()||(e.setRowGroupActive(!0,r),l.addGroupCol(e)),s&&typeof v=="number"&&(s[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,r),l.removeGroupCol(e)));const{value1:w,value2:P}=a("pivot","pivotIndex");w===void 0&&P===void 0||(typeof P=="number"||w?(e.isPivotActive()||(e.setPivotActive(!0,r),l.addPivotCol(e)),o&&typeof P=="number"&&(o[e.getId()]=P)):e.isPivotActive()&&(e.setPivotActive(!1,r),l.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;const t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach(o=>{s[o.colId]=o}),()=>{const o=this.columnModel.getAllCols(),n=(d,c,u,g)=>{if(at(c.map(g),u.map(g)))return;const m=new Set(c);u.forEach(C=>{m.delete(C)||m.add(C)});const f=[...m];this.eventService.dispatchEvent({type:d,columns:f,column:f.length===1?f[0]:null,source:e})},r=d=>{const c=[];return o.forEach(u=>{const g=s[u.getColId()];g&&d(g,u)&&c.push(u)}),c},l=d=>d.getColId();n("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),l),n("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),l);const a=r((d,c)=>{const u=d.aggFunc!=null,g=u!=c.isValueActive(),m=u&&d.aggFunc!=c.getAggFunc();return g||m});a.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",a,e),this.eventDispatcher.columnResized(r((d,c)=>d.width!=c.getActualWidth()),!0,e),this.eventDispatcher.columnPinned(r((d,c)=>d.pinned!=c.getPinned()),e),this.eventDispatcher.columnVisible(r((d,c)=>d.hide==c.isVisible()),e);const h=r((d,c)=>d.sort!=c.getSort()||d.sortIndex!=c.getSortIndex());h.length>0&&this.sortController.dispatchSortChangedEvents(e,h),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){const i=this.columnGetStateService.getColumnState(),s={};i.forEach(a=>s[a.colId]=a);const o={};e.forEach(a=>{s[a.colId]&&(o[a.colId]=!0)});const n=e.filter(a=>o[a.colId]),r=i.filter(a=>o[a.colId]),l=[];r.forEach((a,h)=>{const d=n&&n[h];if(d&&d.colId!==a.colId){const c=this.columnModel.getCol(d.colId);c&&l.push(c)}}),l.length&&this.eventDispatcher.columnMoved({movedColumns:l,source:t,finished:!0})}},an=(e,t,i,s)=>{const o=e[i.getId()],n=e[s.getId()],r=o!=null,l=n!=null;if(r&&l)return o-n;if(r)return-1;if(l)return 1;const a=t.indexOf(i),h=t.indexOf(s),d=a>=0;return d&&h>=0?a-h:d?-1:1},Hl=class extends b{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){const s=this.columnModel.getCols();if(!s)return;const o=s[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,s=!0){const o=this.columnModel.getCols();if(!o)return;if(t>o.length-e.length)return R("tried to insert columns in invalid location, toIndex = ",t),void R("remember that you should not count the moving columns when calculating the new index");this.columnAnimationService.start();const n=this.columnModel.getColsForKeys(e);this.doesMovePassRules(n,t)&&(this.columnModel.moveInCols(n,t,i),this.eventDispatcher.columnMoved({movedColumns:n,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)}getProposedColumnOrder(e,t){const i=this.columnModel.getCols().slice();return Xo(i,e,t),i}doesMovePassLockedPositions(e){const t=this.gos.get("enableRtl");let i=t?1:-1,s=!0;return e.forEach(o=>{const n=(r=o.getColDef().lockPosition)?r==="left"||r===!0?-1:1:0;var r;t?n>i&&(s=!1):n<i&&(s=!1),i=n}),s}doesMovePassMarryChildren(e){let t=!0;return it(null,this.columnModel.getColTree(),i=>{if(!be(i))return;const s=i,o=s.getColGroupDef();if(!(o&&o.marryChildren))return;const n=[];s.getLeafColumns().forEach(r=>{const l=e.indexOf(r);n.push(l)}),Math.max.apply(Math,n)-Math.min.apply(Math,n)>s.getLeafColumns().length-1&&(t=!1)}),t}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(o=>{const n=o.getColDef().lockPosition;n==="right"?s.push(o):n==="left"||n===!0?t.push(o):i.push(o)}),this.gos.get("enableRtl")?[...s,...i,...t]:[...t,...i,...s]}},Bl=/[&<>"']/g,Vl={"&":"&","<":"<",">":">",'"':""","'":"'"};function _e(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(Bl,s=>Vl[s])}var Wl=class extends b{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,o){const n=e.headerValueGetter;if(n){const l=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});return typeof n=="function"?n(l):typeof n=="string"?this.expressionService.evaluate(n,l):(R("headerValueGetter must be a function or a string"),"")}return e.headerName!=null?e.headerName:e.field?(r=e.field)&&r!=null?r.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(l=>l.substring(0,1).toUpperCase()+(l.length>1?l.substring(1,l.length):"")).join(" "):null:"";var r}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn;let s,o=null;if(M(i)){const n=this.funcColsService.getValueColumns(),r=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&n.length===1,l=e.getColDef().pivotTotalColumnIds!==void 0;if(r&&!l)return t;o=i?i.getAggFunc():null,s=!0}else{const n=e.isValueActive(),r=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();n&&r?(o=e.getAggFunc(),s=!0):s=!1}if(s){const n=typeof o=="string"?o:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${t})`}return t}},zl=class extends b{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){var e;ht(this.context,(e=this.pivotResultCols)==null?void 0:e.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const i=this.columnModel.getColDefCol(t);let s=null;return this.pivotResultCols.list.forEach(o=>{const n=o.getColDef().pivotKeys,r=o.getColDef().pivotValueColumn;at(n,e)&&r===i&&(s=o)}),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){var i,s;if(this.columnModel.isReady()&&(e!=null||this.pivotResultCols!=null)){if(e){this.processPivotResultColDef(e);const o=this.columnFactory.createColumnTree(e,!1,((i=this.pivotResultCols)==null?void 0:i.tree)||this.previousPivotResultCols||void 0,t);ht(this.context,(s=this.pivotResultCols)==null?void 0:s.tree,o.columnTree);const n=o.columnTree,r=o.treeDept,l=bs(n),a={};this.pivotResultCols={tree:n,treeDepth:r,list:l,map:a},this.pivotResultCols.list.forEach(d=>this.pivotResultCols.map[d.getId()]=d);const h=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!h)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=o=>{o.forEach(n=>{if(M(n.children)){const r=n;i&&i(r),s(r.children)}else t&&t(n)})};e&&s(e)}},Ul=class extends b{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){const o=[];e.forEach(n=>{const r=this.columnModel.getColDefCol(n.key)||this.columnModel.getCol(n.key);if(r&&(o.push({width:n.newWidth,ratios:[1],columns:[r]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t)){const l=this.visibleColsService.getColAfter(r);if(!l)return;const a=r.getActualWidth()-n.newWidth,h=l.getActualWidth()+a;o.push({width:h,ratios:[1],columns:[l]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(h=>this.checkMinAndMaxWidthsForSet(h)))){if(i){const h=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(h,i,s)}return}const o=[],n=[];t.forEach(h=>{const{width:d,columns:c,ratios:u}=h,g={},m={};c.forEach(v=>n.push(v));let f=!0,C=0;for(;f;){if(C++,C>1e3){Q("infinite loop in resizeColumnSets");break}f=!1;const v=[];let w=0,P=d;c.forEach((F,E)=>{if(m[F.getId()])P-=g[F.getId()];else{v.push(F);const D=u[E];w+=D}});const S=1/w;v.forEach((F,E)=>{let D;E===v.length-1?D=P:(D=Math.round(u[E]*d*S),P-=D);const A=F.getMinWidth(),L=F.getMaxWidth();D<A?(D=A,m[F.getId()]=!0,f=!0):L>0&&D>L&&(D=L,m[F.getId()]=!0,f=!0),g[F.getId()]=D})}c.forEach(v=>{const w=g[v.getId()];v.getActualWidth()!==w&&(v.setActualWidth(w,s),o.push(v))})});const r=o.length>0;let l=[];r&&(l=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());const a=n.concat(l);(r||i)&&this.eventDispatcher.columnResized(a,i,s,l)}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,o=0,n=!0;return t.forEach(r=>{const l=r.getMinWidth();s+=l||0;const a=r.getMaxWidth();a>0?o+=a:n=!1}),i>=s&&(!n||i<=o)}refreshFlexedColumns(e={}){const t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];const i=this.visibleColsService.getCenterCols();let s=-1;if(e.resizingCols){const u=new Set(e.resizingCols);for(let g=i.length-1;g>=0;g--)if(u.has(i[g])){s=g;break}}let o=0,n=[],r=0,l=0;for(let u=0;u<i.length;u++)i[u].getFlex()&&u>s?(n.push(i[u]),l+=i[u].getFlex(),r+=i[u].getMinWidth()):o+=i[u].getActualWidth();if(!n.length)return[];let a=[];o+r>this.flexViewportWidth&&(n.forEach(u=>u.setActualWidth(u.getMinWidth(),t)),a=n,n=[]);const h=[];let d;e:for(;;){d=this.flexViewportWidth-o;const u=d/l;for(let g=0;g<n.length;g++){const m=n[g],f=u*m.getFlex();let C=0;const v=m.getMinWidth(),w=m.getMaxWidth();if(f<v?C=v:f>w&&(C=w),C){m.setActualWidth(C,t),Yo(n,m),l-=m.getFlex(),a.push(m),o+=m.getActualWidth();continue e}h[g]=Math.floor(f)}break}let c=d;return n.forEach((u,g)=>{const m=g<n.length-1?Math.min(h[g],c):Math.max(h[g],c);u.setActualWidth(m,t),a.push(u),c-=h[g]}),e.skipSetLeft||this.visibleColsService.setLeftValues(t),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(a,!0,t,n),n}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var u;if(this.columnModel.isShouldQueueResizeOperations())return void this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,s));const o={};s&&((u=s==null?void 0:s.columnLimits)==null||u.forEach(({key:g,...m})=>{o[typeof g=="string"?g:g.getColId()]=m}));const n=this.visibleColsService.getAllCols(),r=e===tt(n);if(e<=0||!n.length||r)return;const l=[],a=[];n.forEach(g=>{g.getColDef().suppressSizeToFit===!0?a.push(g):l.push(g)});const h=l.slice(0);let d=!1;const c=g=>{ye(l,g),a.push(g)};for(l.forEach(g=>{g.resetActualWidth(t);const m=o==null?void 0:o[g.getId()],f=(m==null?void 0:m.minWidth)??(s==null?void 0:s.defaultMinWidth),C=(m==null?void 0:m.maxWidth)??(s==null?void 0:s.defaultMaxWidth),v=g.getActualWidth();typeof f=="number"&&v<f?g.setActualWidth(f,t,!0):typeof C=="number"&&v>C&&g.setActualWidth(C,t,!0)});!d;){d=!0;const g=e-tt(a);if(g<=0)l.forEach(m=>{var C;const f=((C=o==null?void 0:o[m.getId()])==null?void 0:C.minWidth)??(s==null?void 0:s.defaultMinWidth);typeof f!="number"?m.setMinimum(t):m.setActualWidth(f,t,!0)});else{const m=g/tt(l);let f=g;for(let C=l.length-1;C>=0;C--){const v=l[C],w=o==null?void 0:o[v.getId()],P=(w==null?void 0:w.minWidth)??(s==null?void 0:s.defaultMinWidth),S=(w==null?void 0:w.maxWidth)??(s==null?void 0:s.defaultMaxWidth),F=v.getMinWidth(),E=v.getMaxWidth(),D=typeof P=="number"&&P>F?P:F,A=typeof S=="number"&&S<E?S:E;let L=Math.round(v.getActualWidth()*m);L<D?(L=D,c(v),d=!1):L>A?(L=A,c(v),d=!1):C===0&&(L=f),v.setActualWidth(L,t,!0),f-=L}}}h.forEach(g=>{g.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),i||this.eventDispatcher.columnResized(h,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:o}=e,n=i==null?void 0:i.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:o,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function hn(e,t){return e+"_"+t}function de(e){return e instanceof dn}var dn=class extends b{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return hn(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||e.length===0)&&e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{de(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const e=$(this.displayedChildren).getLeft();this.setLeft(e)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{dt(t)?e.push(t):de(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{dt(t)?e.push(t):de(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e&&e.getProvidedColumnGroup().isExpandable()))return this.displayedChildren=this.children,void this.dispatchLocalEvent({type:"displayedChildrenChanged"});this.children.forEach(t=>{if(!(de(t)&&(!t.displayedChildren||!t.displayedChildren.length)))switch(t.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(t);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(t);break;default:this.displayedChildren.push(t)}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},cn=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return i=typeof t!="number"?0:t+1,this.existingIds[e]=i,i}},Kl=class extends b{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=As(this.treeLeft),this.columnsCenter=As(this.treeCenter),this.columnsRight=As(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){const e=tt(this.columnsCenter),t=tt(this.columnsLeft),i=tt(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?$(this.columnsRight):null):(t=this.columnsLeft?$(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}buildTrees(){const e=this.columnModel.getColsToShow(),t=e.filter(n=>n.getPinned()=="left"),i=e.filter(n=>n.getPinned()=="right"),s=e.filter(n=>n.getPinned()!="left"&&n.getPinned()!="right"),o=new cn;this.treeLeft=this.createGroups({columns:t,idCreator:o,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:o,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:o,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){const e=this.columnModel.getCols(),t=[],i=[],s=[];for(const o of e){const n=o.getPinned();n?n===!0||n==="left"?t.push(o):s.push(o):i.push(o)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return t=de(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{de(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;const t=this.columnModel.getCols().slice(0),i=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(s=>{if(i){let o=tt(s);s.forEach(n=>{o-=n.getActualWidth(),n.setLeft(o,e)})}else{let o=0;s.forEach(n=>{n.setLeft(o,e),o+=n.getActualWidth()})}(function(o,n){for(let r=0;r<n.length;r++)Yo(o,n[r])})(t,s)}),t.forEach(s=>{s.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){const o=[];let n=null;for(let r=0;r<t.length;r++){const l=t[r],a=t.length-r,h=Math.min(l.getColSpan(e),a),d=[l];if(h>1){const u=h-1;for(let g=1;g<=u;g++)d.push(t[r+g]);r+=u}let c;i?(c=!1,d.forEach(u=>{i(u)&&(c=!0)})):c=!0,c&&(o.length===0&&n&&s&&s(l)&&o.push(n),o.push(l)),n=l}return o}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){const t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o=t==="After"?$(s):s[0],n=`getCol${t}`;for(;;){const r=this[n](o);if(!r)return null;const l=this.getColGroupAtLevel(r,i);if(l!==e)return l}}getColGroupAtLevel(e,t){let i,s,o=e.getParent();for(;i=o.getProvidedColumnGroup().getLevel(),s=o.getPaddingLevel(),!(i+s<=t);)o=o.getParent();return o}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Rt(this.treeCenter,!1,e),Rt(this.treeLeft,!1,e),Rt(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){Rt(this.getAllTrees(),!1,e=>{de(e)&&e.calculateDisplayedColumns()})}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?$(s):s[0]}return null}getColumnGroup(e,t){if(!e)return null;if(de(e))return e;const i=this.getAllTrees(),s=typeof t=="number";let o=null;return Rt(i,!1,n=>{if(de(n)){const r=n;let l;l=s?e===r.getGroupId()&&t===r.getPartId():e===r.getGroupId(),l&&(o=r)}}),o}getColAfter(e){const t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return tt(this.columnsLeft)}getDisplayedColumnsRightWidth(){return tt(this.columnsRight)}isColAtEdge(e,t){const i=this.getAllCols();if(!i.length)return!1;const s=t==="first";let o;if(de(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;o=s?n[0]:$(n)}else o=e;return(s?i[0]:$(i))===o}createGroups(e){const{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:o,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(o),l=[];let a=t;for(;a.length;){const h=a;a=[];let d=0;const c=u=>{const g=d;d=u;const m=h[g],f=(de(m)?m.getProvidedColumnGroup():m).getOriginalParent();if(f==null){for(let v=g;v<u;v++)l.push(h[v]);return}const C=this.createColGroup(f,i,r,s,n);for(let v=g;v<u;v++)C.addChild(h[v]);a.push(C)};for(let u=1;u<h.length;u++){const g=h[u],m=(de(g)?g.getProvidedColumnGroup():g).getOriginalParent(),f=h[d];m!==(de(f)?f.getProvidedColumnGroup():f).getOriginalParent()&&c(u)}d<h.length&&c(h.length)}return n||this.setupParentsIntoCols(l,null),l}createColGroup(e,t,i,s,o){const n=e.getGroupId(),r=t.getInstanceIdForKey(n);let l=i[hn(n,r)];return l&&l.getProvidedColumnGroup()!==e&&(l=null),M(l)?l.reset():(l=new dn(e,n,r,s),o||this.createBean(l)),l}mapOldGroupsById(e){const t={},i=s=>{s.forEach(o=>{if(de(o)){const n=o;t[o.getUniqueId()]=n,i(n.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),de(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}};function Rt(e,t,i){if(e)for(let s=0;s<e.length;s++){const o=e[s];de(o)&&Rt(t?o.getDisplayedChildren():o.getChildren(),t,i),i(o)}}function As(e){const t=[];return Rt(e,!0,i=>{dt(i)&&t.push(i)}),t}var un=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],$l=[...un,"scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],_l={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},ve=class{};ve.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],ve.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"],ve.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],ve.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],ve.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],ve.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"],ve.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],ve.ALL_PROPERTIES=[...ve.ARRAY_PROPERTIES,...ve.OBJECT_PROPERTIES,...ve.STRING_PROPERTIES,...ve.NUMBER_PROPERTIES,...ve.FUNCTION_PROPERTIES,...ve.BOOLEAN_PROPERTIES,...ve.OTHER_PROPERTIES];var li=ve,Ie=class{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}};Ie.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",Ie.PUBLIC_EVENTS=un,Ie.EVENT_CALLBACKS=$l.map(e=>Ie.getCallbackForEvent(e)),Ie.BOOLEAN_PROPERTIES=li.BOOLEAN_PROPERTIES,Ie.ALL_PROPERTIES=li.ALL_PROPERTIES,Ie.ALL_PROPERTIES_AND_CALLBACKS=[...Ie.ALL_PROPERTIES,...Ie.EVENT_CALLBACKS],Ie.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Ie.ALL_PROPERTIES_AND_CALLBACKS);var ai=Ie,Vt=class extends b{};function hi(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var di=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1)return void t.forEach(i=>this.addCssClass(i));if(this.cssClassStates[e]!==!0&&e.length){const i=this.getGui();i&&i.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1)return void t.forEach(i=>this.removeCssClass(i));if(this.cssClassStates[e]!==!1&&e.length){const i=this.getGui();i&&i.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return!!t&&t.classList.contains(e)}addOrRemoveCssClass(e,t){if(e){if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1)return void i.forEach(s=>this.addOrRemoveCssClass(s,t))}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}}};function st(e,t,i){i==null||typeof i=="string"&&i==""?gn(e,t):je(e,t,i)}function je(e,t,i){e.setAttribute(pn(t),i.toString())}function gn(e,t){e.removeAttribute(pn(t))}function pn(e){return`aria-${e}`}function Ve(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Wt(e,t){st(e,"label",t)}function ci(e,t){st(e,"labelledby",t)}function mn(e,t){st(e,"live",t)}function Cn(e,t){st(e,"hidden",t)}function Bi(e,t){je(e,"expanded",t)}function fn(e,t){je(e,"colindex",t)}function Vi(e,t){st(e,"selected",t)}function Ts(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var vn="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Is(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,vn),o=qe(e);return i&&!s&&o}function le(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||Cn(e,!t)}function ui(e,t){const i="disabled",s=t?o=>o.setAttribute(i,""):o=>o.removeAttribute(i);s(e),bn(e.querySelectorAll("input"),o=>s(o))}function zt(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function Ft(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:h,paddingLeft:d,marginTop:c,marginRight:u,marginBottom:g,marginLeft:m,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(h||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(c||"0"),marginRight:parseFloat(u||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(m||"0"),boxSizing:f}}function Ls(e){const t=Ft(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function gi(e){const t=Ft(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function wn(e){const{height:t,marginBottom:i,marginTop:s}=Ft(e);return Math.floor(t+i+s)}function Wi(e){const{width:t,marginLeft:i,marginRight:s}=Ft(e);return Math.floor(t+i+s)}function Sn(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=Ft(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function zi(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function Ui(e,t,i){i&&(t*=-1),e.scrollLeft=t}function xe(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Pt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function yn(e){return!!e.offsetParent}function qe(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!yn(e)||window.getComputedStyle(e).visibility!=="visible")}function pi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Ki(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):We(e,t)}function We(e,t){t=ks(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function mi(e,t){t=ks(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function ks(e){return typeof e=="number"?`${e}px`:e}function Os(e){return e instanceof Node||e instanceof HTMLElement}function Le(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function bn(e,t){if(e!=null)for(let i=0;i<e.length;i++)t(e[i])}var Gs,$i,Ns,Hs,Bs,Vs,Ws,zs,Us,Ut=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}};function ot(){return Gs===void 0&&(Gs=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Gs}function Rn(){if($i===void 0)if(ot()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&($i=e[1]!=null?parseFloat(e[1]):0)}else $i=0;return $i}function Ks(){return Hs===void 0&&(Hs=/(firefox)/i.test(navigator.userAgent)),Hs}function Fn(){return Bs===void 0&&(Bs=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Bs}function ct(){return Vs===void 0&&(Vs=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Vs}function Pn(){return!ot()||Rn()>=15}function $s(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t!==-1||i!==null&&(i!==""||Ks())?t.toString():null}function Dn(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(zs=i,Ws=i===0)}function En(){return Ws==null&&Dn(),Ws}var Mn=class Lt extends b{constructor(t,i,s,o){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=s,this.shouldDisplayTooltip=o,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(t){this.popupService=t.popupService,this.userComponentFactory=t.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const t=this.parentComp.getGui();this.tooltipTrigger===0&&this.addManagedListeners(t,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(t,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(t,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(t,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(t){const i=this.gos.get(t);return i<0&&R(`${t} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(t){return t==="show"?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return t&&t!=="hover"?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),ct()||(Lt.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},100):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){var n;const i=t.relatedTarget,s=this.parentComp.getGui(),o=(n=this.tooltipComp)==null?void 0:n.getGui();this.isInteractingWithTooltip||s.contains(i)||this.interactionEnabled&&(o!=null&&o.contains(i))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||Lt.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){return new Date().getTime()-Lt.lastTooltipHideTime<1e3}setToDoNothing(t){t||this.state!==2||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const t={...this.parentComp.getTooltipParams()};if(!M(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())return void this.setToDoNothing();this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(i)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Lt.lastTooltipHideTime=new Date().getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(t,i){if(this.state!==2||this.tooltipInstanceCount!==t)return void this.destroyBean(i);const s=i.getGui();this.tooltipComp=i,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&s.classList.add("ag-tooltip-animate"),this.interactionEnabled&&s.classList.add("ag-tooltip-interactive");const o=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({eChild:s,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:r,columnMoved:r})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(ae(this.gos),{keydown:r=>{s.contains(r==null?void 0:r.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var s;const t=(s=this.tooltipComp)==null?void 0:s.getGui(),i=re(this.gos);return!!t&&t.contains(i)}onTooltipFocusOut(t){const i=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,i.contains(t.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...t,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,s=this.tooltipTrigger===0?1e3:0;window.setTimeout(()=>{t(),this.destroyBean(i)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Lt.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},100)}unlockService(){Lt.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};Mn.isLocked=!1;var jl=Mn,Kt=class extends b{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var t,i,s,o;if(this.tooltipManager!=null)return;const e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new jl(e,(i=(t=this.ctrl).getTooltipShowDelayOverride)==null?void 0:i.call(t),(o=(s=this.ctrl).getTooltipHideDelayOverride)==null?void 0:o.call(s),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){var o,n,r,l,a;const e=this.ctrl,t=(o=e.getColumn)==null?void 0:o.call(e),i=(n=e.getColDef)==null?void 0:n.call(e),s=(r=e.getRowNode)==null?void 0:r.call(e);return{location:e.getLocation(),colDef:i,column:t,rowIndex:(l=e.getRowIndex)==null?void 0:l.call(e),node:s,data:s==null?void 0:s.data,value:this.getTooltipText(),valueFormatted:(a=e.getValueFormatted)==null?void 0:a.call(e),hideTooltipCallback:()=>{var h;return(h=this.tooltipManager)==null?void 0:h.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},ql=new Ut,O=null,ee=class hl extends b{constructor(t,i){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=ql.next(),this.cssClassManager=new di(()=>this.eGui),this.componentSelectors=new Map((i??[]).map(s=>[s.selector,s])),t&&this.setTemplate(t)}preWireBeans(t){super.preWireBeans(t)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(t,i){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,i))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){const{newTooltipText:i,showDelayOverride:s,hideDelayOverride:o,location:n,shouldDisplayTooltip:r}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);const l=()=>this.tooltipText;i!=null&&(this.tooltipFeature=this.createBean(new Kt({getTooltipValue:l,getGui:()=>this.getGui(),getLocation:()=>n??"UNKNOWN",getColDef:t==null?void 0:t.getColDef,getColumn:t==null?void 0:t.getColumn,getTooltipShowDelayOverride:s!=null?()=>s:void 0,getTooltipHideDelayOverride:o!=null?()=>o:void 0,shouldDisplayTooltip:r})))}getDataRefAttribute(t){return t.getAttribute?t.getAttribute("data-ref"):null}applyElementsToComponent(t,i,s,o=null){if(i===void 0&&(i=this.getDataRefAttribute(t)),i){const n=this[i];if(n===O)this[i]=o??t;else{const r=s&&s[i];this.suppressDataRefValidation||r||R(`Issue with data-ref: ${i} on ${this.constructor.name} with ${n}`)}}}createChildComponentsFromTags(t,i){(function(s){if(s==null)return[];const o=[];return bn(s,n=>o.push(n)),o})(t.childNodes).forEach(s=>{if(!(s instanceof HTMLElement))return;const o=this.createComponentFromElement(s,n=>{n.getGui()&&this.copyAttributesFromNode(s,n.getGui())},i);if(o){if(o.addItems&&s.children.length){this.createChildComponentsFromTags(s,i);const n=Array.prototype.slice.call(s.children);o.addItems(n)}this.swapComponentForNode(o,t,s)}else s.childNodes&&this.createChildComponentsFromTags(s,i)})}createComponentFromElement(t,i,s){const o=t.nodeName,n=this.getDataRefAttribute(t),r=o.indexOf("AG-")===0,l=r?this.componentSelectors.get(o):null;let a=null;if(l){hl.elementGettingCreated=t;const h=s&&n?s[n]:void 0;a=new l.component(h),a.setParentComponent(this),this.createBean(a,null,i)}else r&&R(`Missing selector: ${o}`);return this.applyElementsToComponent(t,n,s,a),a}copyAttributesFromNode(t,i){(function(s,o){if(s)for(let n=0;n<s.length;n++){const r=s[n];o(r.name,r.value)}})(t.attributes,(s,o)=>i.setAttribute(s,o))}swapComponentForNode(t,i,s){const o=t.getGui();i.replaceChild(o,s),i.insertBefore(document.createComment(s.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t){const i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(s=>s.setAttribute("tabindex",i.toString()))}setTemplate(t,i,s){const o=pi(t);this.setTemplateFromElement(o,i,s)}setTemplateFromElement(t,i,s,o=!1){if(this.eGui=t,this.suppressDataRefValidation=o,i)for(let n=0;n<i.length;n++){const r=i[n];this.componentSelectors.set(r.selector,r)}this.wireTemplate(t,s)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}getContainerAndElement(t,i){let s=i;return t==null?null:(s||(s=this.eGui),Os(t)?{element:t,parent:s}:{element:t.getGui(),parent:s})}prependChild(t,i){const{element:s,parent:o}=this.getContainerAndElement(t,i)||{};s&&o&&o.insertAdjacentElement("afterbegin",s)}appendChild(t,i){const{element:s,parent:o}=this.getContainerAndElement(t,i)||{};s&&o&&o.appendChild(s)}isDisplayed(){return this.displayed}setVisible(t,i={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:s}=i;(function(o,n,r={}){const{skipAriaHidden:l}=r;o.classList.toggle("ag-invisible",!n),l||Cn(o,!n)})(this.eGui,t,{skipAriaHidden:s})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:s}=i;le(this.eGui,t,{skipAriaHidden:s});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}addGuiEventListener(t,i,s){this.eGui.addEventListener(t,i,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,i))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)}},xn={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},Ql=(()=>{const e=new Set(Object.values(xn));return e.add("eye"),e})();function Ae(e,t,i,s){let o=null;const n=i&&i.getColDef().icons;if(n&&(o=n[e]),t&&!o){const r=t.get("icons");r&&(o=r[e])}if(!o){const r=document.createElement("span");let l=xn[e]??(Ql.has(e)?e:void 0);return l||(R(`Did not find icon ${e}`),l=""),r.setAttribute("class",`ag-icon ag-icon-${l}`),r.setAttribute("unselectable","on"),Ve(r,"presentation"),r}{let r;if(typeof o=="function")r=o();else{if(typeof o!="string")throw new Error("icon from grid options needs to be a string or a function");r=o}if(typeof r=="string")return pi(r);if(Os(r))return r;R("iconRenderer should return back a string or a dom object")}}var Yl=class extends ee{constructor(){super(...arguments),this.dragSource=null,this.eIcon=O,this.eLabel=O}postConstruct(){const e=t=>function(i,s,o){const n=Ae(i,s,o);if(n){const{className:l}=n;if(typeof l=="string"&&l.indexOf("ag-icon")>-1||typeof l=="object"&&l["ag-icon"])return n}const r=document.createElement("span");return r.appendChild(n),r}(t,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`<div class="ag-dnd-ghost ag-unselectable">
|
2
2
|
<span data-ref="eIcon" class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
|
3
3
|
<div data-ref="eLabel" class="ag-dnd-ghost-label"></div>
|
4
4
|
</div>`)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t=!1){var s,o;xe(this.eIcon);let i=null;e||(e=(s=this.dragSource)!=null&&s.getDefaultIconName?(o=this.dragSource)==null?void 0:o.getDefaultIconName():"notAllowed"),i=this.dropIconMap[e],this.eIcon.classList.toggle("ag-shake-left-to-right",t),i===this.dropIconMap.hide&&this.gos.get("suppressDragLeaveHidesColumns")||i&&this.eIcon.appendChild(i)}setLabel(e){this.eLabel.textContent=_e(e)}};function An(e,t,i){if(i===0)return!1;const s=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(s,o)<=i}var ut=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new Ot,this.eElement=e,this.preventMouseClick=t;const i=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",s,{passive:!0}),this.eElement.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",s,{passive:!0}),this.eElement.removeEventListener("touchend",o,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;const s={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(s)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);t&&!An(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const t={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}};function Ci(e,t){return`<span data-ref="eSort${e}" class="ag-sort-indicator-icon ag-sort-${t} ag-hidden" aria-hidden="true"></span>`}var Xl=`<span class="ag-sort-indicator-container">
|