@epam/ai-dial-ui-kit 0.15.0-dev.41 → 0.15.0-dev.42
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/README.md +1 -0
- package/dist/CHANGELOG.md +2 -0
- package/dist/{DateCellRenderer-DFknFcs1.cjs → DateCellRenderer-ChqbDlQ2.cjs} +1 -1
- package/dist/{DateCellRenderer-J9A5gyDz.cjs → DateCellRenderer-Cl_mNbi1.cjs} +2 -2
- package/dist/JsonEditor-CpSpVa0v.cjs +1 -0
- package/dist/{MarkdownEditor-FVzYMdkC.cjs → MarkdownEditor-CPzMv3lE.cjs} +1 -1
- package/dist/{MarkdownEditor-C7BONfsl.cjs → MarkdownEditor-NYMcKLJy.cjs} +1 -1
- package/dist/MarkdownEditorContainer-DVPRplYf.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +18 -16
- package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +206 -0
- package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
- package/dist/components-manifest.json +166 -3
- package/dist/constants/public-class-names.js +2 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +87 -85
- package/dist/editor-Bc9xzKuR.cjs +1 -0
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/lazy-Cy9WobJf.cjs +1 -0
- package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +97 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
- package/dist/src/constants/public-class-names.d.ts +2 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/{use-file-manager-tabs-Bj_ENNKt.cjs → use-file-manager-tabs-C-dMqEFy.cjs} +1 -1
- package/package.json +1 -1
- package/dist/JsonEditor-BDe6elKO.cjs +0 -1
- package/dist/MarkdownEditorContainer-GvlxX6kx.cjs +0 -1
- package/dist/lazy-BEsZqouS.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const H=require("react/jsx-runtime"),p=require("react"),ga=require("react-dom"),fe=require("classnames"),pe=require("@floating-ui/react"),vn=require("@tabler/icons-react"),Mt=require("./merge-classes-BEJXjzkx.cjs"),De=require("./IconButton-DHOFapLo.cjs"),zs=({icon:e,className:t})=>e?H.jsx("span",{className:fe("flex-shrink-0",t),children:e}):null,gp="text-primary",Jo=new Map,qi=new Set;let Xo=null,ni=null;const pp=()=>{ni=null;const e=Array.from(qi);qi.clear(),e.forEach(t=>t())},wn=e=>{qi.add(e),ni===null&&(ni=requestAnimationFrame(pp))},Sd=()=>{Jo.forEach(wn)},fp=e=>{e.forEach(t=>{const o=Jo.get(t.target);o&&wn(o)})},mp=()=>{window.removeEventListener("resize",Sd),Xo?.disconnect(),Xo=null,qi.clear(),ni!==null&&(cancelAnimationFrame(ni),ni=null)},yd=(e,t)=>(Jo.size===0&&window.addEventListener("resize",Sd),Jo.set(e,t),!Xo&&typeof ResizeObserver<"u"&&(Xo=new ResizeObserver(fp)),Xo?.observe(e),()=>{Jo.delete(e),Xo?.unobserve(e),qi.delete(t),Jo.size===0&&mp()}),pa=({text:e,className:t,contentClassName:o,hideTooltip:i,id:s,customTooltipContent:n,...r})=>{const a=p.useRef(null),[l,c]=p.useState(!1),[d,u]=p.useState(""),h=p.useCallback(()=>{const C=a.current;C&&(u(C.textContent??""),c(C.scrollWidth>C.clientWidth))},[]),g=p.useCallback(()=>wn(h),[h]);p.useEffect(()=>{const C=a.current;if(C)return yd(C,h)},[h]),p.useEffect(()=>{g()},[e,g]);const f=p.useMemo(()=>typeof e=="string"?e:d,[d,e]),m=p.useMemo(()=>i?"":n||(l?f:""),[n,f,i,l]);return H.jsxs(De.DialTooltipContainer,{...r,children:[H.jsx(De.DialTooltipTrigger,{asChild:!0,onMouseEnter:g,onFocusCapture:g,children:H.jsx("span",{id:s,className:Mt.mergeClasses("block truncate flex-1 min-w-0 max-w-full text-start",t),"aria-label":l?f:void 0,onMouseEnter:g,onFocus:g,ref:a,children:e})}),H.jsx(De.DialTooltipContent,{className:Mt.mergeClasses(gp,o,!m&&"hidden"),children:m})]})},Fi=(e,t)=>({appearance:i,...s})=>H.jsx(De.DialIconButton,{...s,variant:e,appearance:i||t}),Cp=(e,t)=>({variant:i,...s})=>H.jsx(De.DialIconButton,{...s,variant:i||t,appearance:e}),vp=Fi(De.ButtonVariant.Primary,De.ButtonAppearance.Solid),wp=Fi(De.ButtonVariant.Neutral,De.ButtonAppearance.Outlined),bp=Fi(De.ButtonVariant.Danger,De.ButtonAppearance.Outlined),Sp=Fi(De.ButtonVariant.Secondary,De.ButtonAppearance.Ghost),yp=Fi(De.ButtonVariant.Tertiary,De.ButtonAppearance.Ghost),Rp=Fi(De.ButtonVariant.Success,De.ButtonAppearance.Ghost),Rd=Cp(De.ButtonAppearance.Ghost,De.ButtonVariant.Primary),bn={spinner:"dial-kit-spinner",progressBar:"dial-kit-progress-bar",skeleton:"dial-kit-skeleton",notification:"dial-kit-notification",noDataContent:"dial-kit-no-data-content",transferQueue:"dial-kit-transfer-queue",highlight:"dial-kit-highlight",captionText:"dial-kit-caption-text",errorText:"dial-kit-error-text",label:"dial-kit-label",cardShell:"dial-kit-card-shell",collapsibleSidebar:"dial-kit-collapsible-sidebar",resizableContainer:"dial-kit-resizable-container",popup:"dial-kit-popup",bottomSheet:"dial-kit-bottom-sheet",sideDrawer:"dial-kit-side-drawer",confirmationPopup:"dial-kit-confirmation-popup",accordion:"dial-kit-accordion",folderPath:"dial-kit-folder-path",breadcrumbs:"dial-kit-breadcrumbs",breadcrumbsItem:"dial-kit-breadcrumbs-item",dropdown:"dial-kit-dropdown",dropdownList:"dial-kit-dropdown-list",menuItem:"dial-kit-menuitem",menuItemCheck:"dial-kit-menuitem-check",dropdownIcon:"dial-kit-dropdown-icon",dropdownIconCaret:"dial-kit-dropdown-icon-caret",tooltip:"dial-kit-tooltip",interactiveTooltip:"dial-kit-interactive-tooltip",ellipsisTooltip:"dial-kit-ellipsis-tooltip",search:"dial-kit-search",passwordInput:"dial-kit-password-input",numberInput:"dial-kit-number-input",tagInput:"dial-kit-tag-input",select:"dial-kit-select",inlineSelect:"dial-kit-inline-select",calendar:"dial-kit-calendar",fileDropzone:"dial-kit-file-dropzone",fileIcon:"dial-kit-file-icon",fileName:"dial-kit-file-name",folderName:"dial-kit-folder-name",sharedEntityIndicator:"dial-kit-shared-entity-indicator",badge:"dial-kit-badge",avatar:"dial-kit-avatar",entityIdentity:"dial-kit-entity-identity",switch:"dial-kit-switch",checkbox:"dial-kit-checkbox",checkboxBox:"dial-kit-checkbox-box",radio:"dial-kit-radio",radioGroup:"dial-kit-radio-group",radioGroupPopupField:"dial-kit-radio-group-popup-field",segmentedControl:"dial-kit-segmented-control",segmentedControlItem:"dial-kit-segmented-control-item",tabs:"dial-kit-tabs",tabList:"dial-kit-tab-list",tab:"dial-kit-tab",tabSelected:"dial-kit-tab-selected",tabsSectionLabel:"dial-kit-tabs-section-label",filterChips:"dial-kit-filter-chips",tag:"dial-kit-tag",toggleIconButton:"dial-kit-toggle-icon-button",closeButton:"dial-kit-close-button",infoButton:"dial-kit-info-button",buttonDropdown:"dial-kit-button-dropdown"},yr=p.createContext(""),Fp=({className:e,children:t})=>{const o=p.useContext(yr),i=p.useMemo(()=>[o,e].filter(Boolean).join(" "),[o,e]);return H.jsx(yr.Provider,{value:i,children:H.jsx("div",{className:Mt.mergeClasses("contents",e),children:t})})},Fd=()=>p.useContext(yr),Rr="checkbox-container",Ed=({name:e,value:t,label:o,description:i,checked:s=!1,inputId:n,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d,containerClassName:u,caption:h,oneLineCaption:g=!1})=>{const f=`${n}-desc`,m=fe("dial-small-text cursor-pointer py-[1px]",l?"text-secondary":"text-primary",a,l&&"cursor-not-allowed"),C=fe("cursor-pointer dial-input-radio",!!o&&"mr-2",r,l&&"!cursor-not-allowed"),v=fe("flex flex-col",!!i&&"mb-2",l&&"cursor-not-allowed",u),w=fe("dial-tiny-text mt-2 ml-[26px] text-secondary",d,l&&"cursor-not-allowed"),b=y=>{l||y.target.checked&&c?.(t)};return H.jsxs("div",{className:v,children:[H.jsxs("div",{className:fe("flex flex-row",(!h||g)&&"items-center"),children:[H.jsx("input",{type:"radio",id:n,name:e,value:t,checked:s,disabled:l,"aria-describedby":s&&i?f:void 0,className:C,onChange:b}),(o||h)&&H.jsxs("div",{className:fe("flex",g?"flex-1 flex-row items-center gap-2":"flex-col gap-1"),children:[o&&H.jsx("label",{className:m,htmlFor:n,"aria-describedby":h?"caption":"",children:o}),h&&H.jsx("span",{id:"caption",className:fe("dial-tiny-text text-secondary",g&&"ml-auto"),children:h})]})]}),s&&i&&H.jsx("div",{id:f,className:w,children:i})]})},xd=({icon:e,title:t,description:o,containerClassName:i,titleClassName:s,descriptionClassName:n})=>H.jsxs("div",{className:Mt.mergeClasses("h-full w-full flex flex-col items-center justify-center text-secondary",i),"aria-label":"no-data-container",children:[e||H.jsx(vn.IconClipboardX,{width:60,height:60,stroke:.5}),H.jsx("span",{className:Mt.mergeClasses("dial-small-text mt-2 text-primary",s),"aria-label":"no-results-title",children:t}),o&&H.jsx("span",{className:Mt.mergeClasses("mt-1 text-primary",n),"aria-label":"no-results-description",children:o})]});function he(e){if(e?.length)return e[e.length-1]}function ho(e,t,o){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s]&&!o?.(e[s],t[s]))return!1;return!0}function Ti(e,t){if(e){for(const o of e)if(t(o))return!0}}function At(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function Ep(e,t){let o=0,i=0;for(;o<e.length;o++)t.includes(e[o])||(e[i]=e[o],i++);for(;i<e.length;)e.pop()}function Dl(e,t,o){for(let i=0;i<t.length;i++)At(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var Nt=e=>e==null||e===""?null:e;function O(e){return e!=null&&e!==""}function we(e){return!O(e)}var Fr=e=>e!=null&&typeof e.toString=="function"?e.toString():null,ji=(e,t)=>{const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i},xp=(e,t,o=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!o||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),Ao=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,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&o&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),i.size===0&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,s=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(o,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)s(()=>l(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},o=this.frameworkOverrides;o?o.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},Pp=/[&<>"']/g,Dp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ei(e){return e?.toString().toString()??null}function Hi(e){return Ei(e)?.replace(Pp,t=>Dp[t])??null}function Ml(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function Mp(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}function gt(e){return e.eRootDiv.getRootNode()}function ve(e){return gt(e).activeElement}function Pe(e){const{gos:t,eRootDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&O(s)?i=s():o&&(i=o.ownerDocument),i&&O(i)?i:document}function fa(e){const t=ve(e);return t===null||t===Pe(e).body}function ma(e){return Pe(e).defaultView||window}function Ca(e){let t=null,o=null;try{t=Pe(e).fullscreenElement}catch{}finally{t||(t=gt(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t?.documentElement:o=t}return o}function Tp(e){return Ca(e)?.clientWidth??(window.innerWidth||-1)}function Ip(e){return Ca(e)?.clientHeight??(window.innerHeight||-1)}function wt(e,t,o){o==null||typeof o=="string"&&o==""?Pd(e,t):bt(e,t,o)}function bt(e,t,o){e.setAttribute(Dd(t),o.toString())}function Pd(e,t){e.removeAttribute(Dd(t))}function Dd(e){return`aria-${e}`}function ko(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Ap(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function kp(e){return e.getAttribute("aria-label")}function Ci(e,t){wt(e,"label",t)}function Yi(e,t){wt(e,"labelledby",t)}function Md(e,t){wt(e,"live",t)}function Lp(e,t){wt(e,"atomic",t)}function Op(e,t){wt(e,"relevant",t)}function va(e,t){wt(e,"invalid",t)}function Gp(e,t){wt(e,"disabled",t)}function Td(e,t){wt(e,"hidden",t)}function Er(e,t){bt(e,"expanded",t)}function Hp(e,t){bt(e,"setsize",t)}function Bp(e,t){bt(e,"posinset",t)}function Vp(e,t){bt(e,"rowcount",t)}function wa(e,t){bt(e,"rowindex",t)}function Np(e,t){bt(e,"rowspan",t)}function Wp(e,t){bt(e,"colcount",t)}function Id(e,t){bt(e,"colindex",t)}function zp(e,t){bt(e,"colspan",t)}function _p(e,t){bt(e,"sort",t)}function Up(e){Pd(e,"sort")}function Ad(e,t){wt(e,"selected",t)}function $p(e,t){wt(e,"controls",t)}function Kp(e,t){$p(e,t.id),Yi(t,e.id)}function Tl(e,t){wt(e,"owns",t)}function Sn(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var qp="[tabindex], input, select, button, textarea, [href]",kd="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Bi(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(kd)?!1:vt(e)}function me(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||Td(e,!t)}function jp(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||Td(e,!t)}function Qi(e,t){const o="disabled",i=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);i(e);const s=e.querySelectorAll("input")??[];for(const n of s)i(n)}function Eo(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function _o(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(o||"0"),borderTopWidth:C(i||"0"),borderRightWidth:C(s||"0"),borderBottomWidth:C(n||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(c||"0"),paddingLeft:C(d||"0"),marginTop:C(u||"0"),marginRight:C(h||"0"),marginBottom:C(g||"0"),marginLeft:C(f||"0"),boxSizing:m}}function ba(e){const t=_o(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Zi(e){const t=_o(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Ld(e){const{height:t,marginBottom:o,marginTop:i}=_o(e);return Math.floor(t+o+i)}function _s(e){const{width:t,marginLeft:o,marginRight:i}=_o(e);return Math.floor(t+o+i)}function Od(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=_o(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function Us(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function $s(e,t,o){o&&(t*=-1),e.scrollLeft=t}function Xe(e){for(;e?.firstChild;)e.firstChild.remove()}function _t(e){e?.parentNode&&e.remove()}function Gd(e){return!!e.offsetParent}function vt(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Gd(e)||window.getComputedStyle(e).visibility!=="visible")}function Sa(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Ji(e){return()=>{const t=e();return t?Hd(t)||Yp(t):!0}}function Hd(e){return e.clientWidth<e.scrollWidth}function Yp(e){return e.clientHeight<e.scrollHeight}function Ks(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Tt(e,t)}function Tt(e,t){t=ya(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Vi(e,t){t=ya(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function ya(e){return typeof e=="number"?`${e}px`:e}function Ra(e){return e instanceof Node||e instanceof HTMLElement}function Qe(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function Qp(e,t){if(!t.isContentEditable)return;const o=ma(e).getSelection();if(!o)return;const i=Pe(e).createRange();i.selectNodeContents(t),i.collapse(!1),o.removeAllRanges(),o.addRange(i)}function Kt(e,t,o){const s=ma(e).ResizeObserver,n=s?new s(o):null;return n?.observe(t),()=>n?.disconnect()}function qt(e,t){const o=ma(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var Bd="data-ref",Vn;function Il(){return Vn??(Vn=document.createTextNode(" ")),Vn.cloneNode()}function Lo(e){const{attrs:t,children:o,cls:i,ref:s,role:n,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(Bd,s),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(o)if(typeof o=="string")a.textContent=o;else{let l=!0;for(const c of o)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(Il()),l=!1),a.append(Lo(c)),a.appendChild(Il())))}return a}var Zp=["touchstart","touchend","touchmove","touchcancel","scroll"],Jp=["wheel"],Nn={},qs=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof Nn[o]=="boolean")return Nn[o];const i=document.createElement(e[o]||"div");return o="on"+o,Nn[o]=o in i}})();function Xp(e,t){return!t||!e?!1:tf(t).indexOf(e)>=0}function ef(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function tf(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():ef(t)}function of(e,t,o){const i=sf(t);let s;i!=null&&(s={passive:i}),e.addEventListener(t,o,s)}var sf=e=>{const t=Zp.includes(e),o=Jp.includes(e);if(t)return!0;if(o)return!1};function Vd(e,t,o){if(o===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=o}var ri=(e,t)=>{const o=e.identifier;for(let i=0,s=t.length;i<s;++i){const n=t[i];if(n.identifier===o)return n}return null};function Xi(e,t){return e.gos.isElementInThisInstance(t.target)}function nf(e,t,o){const s=e.getBoundingClientRect().height,n=Tp(o)-2,r=Ip(o)-2;if(!e.offsetParent)return;const l=Od(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-s/2,h=d-l.left-10;const g=Pe(o),f=g.defaultView||window,m=f.pageYOffset||g.documentElement.scrollTop,C=f.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+m&&(u=r+m-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var Ds=(e,...t)=>{for(const o of t){const[i,s,n,r]=o;i.addEventListener(s,n,r),e.push(o)}},Fa=e=>{if(e){for(const[t,o,i,s]of e)t.removeEventListener(o,i,s);e.length=0}},to=e=>{e.cancelable&&e.preventDefault()};function rf(e,t){return t}function Nd(e){return e?.getLocaleTextFunc()??rf}function af(e,t,o,i){const s=t[o];return e.getLocaleTextFunc()(o,typeof s=="function"?s(i):s,i)}function lf(e){return(t,o,i)=>e({key:t,defaultValue:o,variableValues:i})}function cf(e){return(t,o,i)=>{let s=e?.[t];if(s&&i?.length){let n=0;for(;!(n>=i.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",i[n++])}return s??o}}var qe=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new Ao),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService?.removeEventListener(e,t,o)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const i of Object.keys(t)){const s=t[i];s&&o.push(this._setupListener(e,i,s))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let i;if(df(e))e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null);else{const s=uf(e);e instanceof HTMLElement?of(e,t,o):s?e.addListener(t,o):e.addEventListener(t,o),i=s?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupPropertyListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const i=()=>(o.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.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=s.changeSet.id}const n={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(n)};for(const s of e)this.setupPropertyListener(s,i)}getLocaleTextFunc(){return Nd(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function df(e){return e.__addEventListener!==void 0}function uf(e){return e.eventServiceType==="global"}var x=class extends qe{},xr=new Set,yn=(e,t)=>{xr.has(t)||(xr.add(t),e())};yn._set=xr;var hf={pending:!1,funcs:[]},gf={pending:!1,funcs:[]};function Pr(e,t="setTimeout",o){const i=t==="raf"?gf:hf;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const n=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of n)r()};t==="raf"?qt(o,s):window.setTimeout(s,0)}function xe(e,t,o){let i;return function(...s){const n=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},o),i}}function Al(e,t){let o=0;return function(...i){const s=this,n=Date.now();n-o<t||(o=n,e.apply(s,i))}}function pf(e,t,o,i=100){const s=Date.now();let n=null,r=!1;const a=()=>{n!=null&&(window.clearInterval(n),n=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-s>i;(t()||c)&&(o(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var Wd=new Set(["__proto__","constructor","prototype"]);function ff(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o<e.length;o++)t(o.toString(),e[o]);return}for(const o of Object.keys(e).filter(i=>!Wd.has(i)))t(o,e[o])}}function _e(e,t,o=!0,i=!1){O(t)&&ff(t,(s,n)=>{let r=e[s];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),kl(n)&&kl(r)&&!Array.isArray(r)?_e(r,n,o,i):(o||n!==void 0)&&(e[s]=n))})}function kl(e){return typeof e=="object"&&e!==null}var Ea=class Gt{static applyGlobalGridOptions(t){if(!Gt.gridOptions)return{...t};let o={};return _e(o,Gt.gridOptions,!0,!0),Gt.mergeStrategy==="deep"?_e(o,t,!0,!0):o={...o,...t},Gt.gridOptions.context&&(o.context=Gt.gridOptions.context),t.context&&(Gt.mergeStrategy==="deep"&&o.context&&_e(t.context,o.context,!0,!0),o.context=t.context),o}static applyGlobalGridOption(t,o){if(Gt.mergeStrategy==="deep"){const i=zd(t);if(i&&typeof i=="object"&&typeof o=="object")return Gt.applyGlobalGridOptions({[t]:o})[t]}return o}};Ea.gridOptions=void 0;Ea.mergeStrategy="shallow";var xa=Ea;function zd(e){return xa.gridOptions?.[e]}var _d={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupHideColumnsUntilExpanded:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},Ud="https://www.ag-grid.com";function Oo(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Ni(e,...t){yn(()=>$d(e,...t),e+t?.join(""))}function ai(e,...t){yn(()=>mf(e,...t),e+t?.join(""))}function mf(e,...t){console.error("AG Grid: "+e,...t)}function $d(e,...t){console.warn("AG Grid: "+e,...t)}var Kd=new Set,js={},xo={},Ms,qd=!1,jd=!1,Cf=!1;function vf(e){const[t,o]=e.version.split(".")||[],[i,s]=Ms.split(".")||[];return t===i&&o===s}function wf(e){Ms||(Ms=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;e.version?vf(e)||ai(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Ms}.`)):ai(t(`'${e.moduleName}' is incompatible.`));const o=e.validate?.();o&&!o.isValid&&ai(`${o.message}`)}function es(e,t,o=!1){o||(qd=!0),wf(e);const i=e.rowModels??["all"];Kd.add(e);let s;t!==void 0?(jd=!0,xo[t]===void 0&&(xo[t]={}),s=xo[t]):s=js;for(const n of i)s[n]===void 0&&(s[n]={}),s[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)es(n,t,o)}function bf(e){delete xo[e]}function Dr(e,t,o){const i=s=>!!js[s]?.[e]||!!xo[t]?.[s]?.[e];return i(o)||i("all")}function Pa(){return jd}function Sf(e,t){const o=xo[e]??{};return[...Object.values(js.all??{}),...Object.values(o.all??{}),...Object.values(js[t]??{}),...Object.values(o[t]??{})]}function yf(){return new Set(Kd)}function Rf(e,t){const o=xo[e]??{};return[...Object.values(o.all??{}),...Object.values(o[t]??{})]}function Ff(){return qd}function Yd(){return Cf}var Qd=class{static register(e){es(e,void 0)}static registerModules(e){for(const t of e)es(t,void 0)}};function Zd(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const o=Zd(t.dependsOn);if(o)return o}}}var L="35.2.1",Ll=2e3,Ol=100,Jd="_version_",Xd=null,li=`${Ud}/javascript-data-grid`;function Ef(e){Xd=e}function xf(e){li=e}function eu(e,t,o){return Xd?.(e,t)??[Tf(e,t,o)]}function Da(e,t,o,i,s){e(`${i?"warning":"error"} #${t}`,...eu(t,o,s))}function Pf(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function Df(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Pf(e)),t}function Ts(e){return e===void 0?"undefined":e===null?"null":e}function Mr(e,t){return`${e}?${t.toString()}`}function Mf(e,t,o){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=Mr(e,t);for(const[n,r]of i){if(n===Jd)continue;const a=s.length-o;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>Ol?r.slice(0,r.length-c)+l:r.slice(0,Ol)+l;t.set(n,d),s=Mr(e,t)}return s}function tu(e,t){const o=new URLSearchParams;if(o.append(Jd,L),t)for(const n of Object.keys(t))o.append(n,Df(t[n]));const i=`${li}/errors/${e}`,s=Mr(i,o);return s.length<=Ll?s:Mf(i,o,Ll)}var Tf=(e,t,o)=>{const i=tu(e,t);return`${`${o?o+`
|
|
1
|
+
"use strict";const H=require("react/jsx-runtime"),p=require("react"),ga=require("react-dom"),fe=require("classnames"),pe=require("@floating-ui/react"),vn=require("@tabler/icons-react"),Mt=require("./merge-classes-BEJXjzkx.cjs"),De=require("./IconButton-DHOFapLo.cjs"),zs=({icon:e,className:t})=>e?H.jsx("span",{className:fe("flex-shrink-0",t),children:e}):null,gp="text-primary",Jo=new Map,qi=new Set;let Xo=null,ni=null;const pp=()=>{ni=null;const e=Array.from(qi);qi.clear(),e.forEach(t=>t())},wn=e=>{qi.add(e),ni===null&&(ni=requestAnimationFrame(pp))},Sd=()=>{Jo.forEach(wn)},fp=e=>{e.forEach(t=>{const o=Jo.get(t.target);o&&wn(o)})},mp=()=>{window.removeEventListener("resize",Sd),Xo?.disconnect(),Xo=null,qi.clear(),ni!==null&&(cancelAnimationFrame(ni),ni=null)},yd=(e,t)=>(Jo.size===0&&window.addEventListener("resize",Sd),Jo.set(e,t),!Xo&&typeof ResizeObserver<"u"&&(Xo=new ResizeObserver(fp)),Xo?.observe(e),()=>{Jo.delete(e),Xo?.unobserve(e),qi.delete(t),Jo.size===0&&mp()}),pa=({text:e,className:t,contentClassName:o,hideTooltip:i,id:s,customTooltipContent:n,...r})=>{const a=p.useRef(null),[l,c]=p.useState(!1),[d,u]=p.useState(""),h=p.useCallback(()=>{const C=a.current;C&&(u(C.textContent??""),c(C.scrollWidth>C.clientWidth))},[]),g=p.useCallback(()=>wn(h),[h]);p.useEffect(()=>{const C=a.current;if(C)return yd(C,h)},[h]),p.useEffect(()=>{g()},[e,g]);const f=p.useMemo(()=>typeof e=="string"?e:d,[d,e]),m=p.useMemo(()=>i?"":n||(l?f:""),[n,f,i,l]);return H.jsxs(De.DialTooltipContainer,{...r,children:[H.jsx(De.DialTooltipTrigger,{asChild:!0,onMouseEnter:g,onFocusCapture:g,children:H.jsx("span",{id:s,className:Mt.mergeClasses("block truncate flex-1 min-w-0 max-w-full text-start",t),"aria-label":l?f:void 0,onMouseEnter:g,onFocus:g,ref:a,children:e})}),H.jsx(De.DialTooltipContent,{className:Mt.mergeClasses(gp,o,!m&&"hidden"),children:m})]})},Fi=(e,t)=>({appearance:i,...s})=>H.jsx(De.DialIconButton,{...s,variant:e,appearance:i||t}),Cp=(e,t)=>({variant:i,...s})=>H.jsx(De.DialIconButton,{...s,variant:i||t,appearance:e}),vp=Fi(De.ButtonVariant.Primary,De.ButtonAppearance.Solid),wp=Fi(De.ButtonVariant.Neutral,De.ButtonAppearance.Outlined),bp=Fi(De.ButtonVariant.Danger,De.ButtonAppearance.Outlined),Sp=Fi(De.ButtonVariant.Secondary,De.ButtonAppearance.Ghost),yp=Fi(De.ButtonVariant.Tertiary,De.ButtonAppearance.Ghost),Rp=Fi(De.ButtonVariant.Success,De.ButtonAppearance.Ghost),Rd=Cp(De.ButtonAppearance.Ghost,De.ButtonVariant.Primary),bn={spinner:"dial-kit-spinner",progressBar:"dial-kit-progress-bar",skeleton:"dial-kit-skeleton",notification:"dial-kit-notification",noDataContent:"dial-kit-no-data-content",transferQueue:"dial-kit-transfer-queue",highlight:"dial-kit-highlight",captionText:"dial-kit-caption-text",errorText:"dial-kit-error-text",label:"dial-kit-label",cardShell:"dial-kit-card-shell",collapsibleSidebar:"dial-kit-collapsible-sidebar",resizableContainer:"dial-kit-resizable-container",popup:"dial-kit-popup",bottomSheet:"dial-kit-bottom-sheet",sideDrawer:"dial-kit-side-drawer",confirmationPopup:"dial-kit-confirmation-popup",accordion:"dial-kit-accordion",folderPath:"dial-kit-folder-path",breadcrumbs:"dial-kit-breadcrumbs",breadcrumbsItem:"dial-kit-breadcrumbs-item",dropdown:"dial-kit-dropdown",dropdownList:"dial-kit-dropdown-list",menuItem:"dial-kit-menuitem",menuItemCheck:"dial-kit-menuitem-check",dropdownIcon:"dial-kit-dropdown-icon",dropdownIconCaret:"dial-kit-dropdown-icon-caret",tooltip:"dial-kit-tooltip",interactiveTooltip:"dial-kit-interactive-tooltip",ellipsisTooltip:"dial-kit-ellipsis-tooltip",search:"dial-kit-search",passwordInput:"dial-kit-password-input",numberInput:"dial-kit-number-input",tagInput:"dial-kit-tag-input",autocompleteTagInput:"dial-kit-autocomplete-tag-input",select:"dial-kit-select",inlineSelect:"dial-kit-inline-select",calendar:"dial-kit-calendar",fileDropzone:"dial-kit-file-dropzone",fileIcon:"dial-kit-file-icon",fileName:"dial-kit-file-name",folderName:"dial-kit-folder-name",sharedEntityIndicator:"dial-kit-shared-entity-indicator",badge:"dial-kit-badge",avatar:"dial-kit-avatar",entityIdentity:"dial-kit-entity-identity",switch:"dial-kit-switch",checkbox:"dial-kit-checkbox",checkboxBox:"dial-kit-checkbox-box",radio:"dial-kit-radio",radioGroup:"dial-kit-radio-group",radioGroupPopupField:"dial-kit-radio-group-popup-field",segmentedControl:"dial-kit-segmented-control",segmentedControlItem:"dial-kit-segmented-control-item",tabs:"dial-kit-tabs",tabList:"dial-kit-tab-list",tab:"dial-kit-tab",tabSelected:"dial-kit-tab-selected",tabsSectionLabel:"dial-kit-tabs-section-label",filterChips:"dial-kit-filter-chips",tag:"dial-kit-tag",toggleIconButton:"dial-kit-toggle-icon-button",closeButton:"dial-kit-close-button",infoButton:"dial-kit-info-button",buttonDropdown:"dial-kit-button-dropdown"},yr=p.createContext(""),Fp=({className:e,children:t})=>{const o=p.useContext(yr),i=p.useMemo(()=>[o,e].filter(Boolean).join(" "),[o,e]);return H.jsx(yr.Provider,{value:i,children:H.jsx("div",{className:Mt.mergeClasses("contents",e),children:t})})},Fd=()=>p.useContext(yr),Rr="checkbox-container",Ed=({name:e,value:t,label:o,description:i,checked:s=!1,inputId:n,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d,containerClassName:u,caption:h,oneLineCaption:g=!1})=>{const f=`${n}-desc`,m=fe("dial-small-text cursor-pointer py-[1px]",l?"text-secondary":"text-primary",a,l&&"cursor-not-allowed"),C=fe("cursor-pointer dial-input-radio",!!o&&"mr-2",r,l&&"!cursor-not-allowed"),v=fe("flex flex-col",!!i&&"mb-2",l&&"cursor-not-allowed",u),w=fe("dial-tiny-text mt-2 ml-[26px] text-secondary",d,l&&"cursor-not-allowed"),b=y=>{l||y.target.checked&&c?.(t)};return H.jsxs("div",{className:v,children:[H.jsxs("div",{className:fe("flex flex-row",(!h||g)&&"items-center"),children:[H.jsx("input",{type:"radio",id:n,name:e,value:t,checked:s,disabled:l,"aria-describedby":s&&i?f:void 0,className:C,onChange:b}),(o||h)&&H.jsxs("div",{className:fe("flex",g?"flex-1 flex-row items-center gap-2":"flex-col gap-1"),children:[o&&H.jsx("label",{className:m,htmlFor:n,"aria-describedby":h?"caption":"",children:o}),h&&H.jsx("span",{id:"caption",className:fe("dial-tiny-text text-secondary",g&&"ml-auto"),children:h})]})]}),s&&i&&H.jsx("div",{id:f,className:w,children:i})]})},xd=({icon:e,title:t,description:o,containerClassName:i,titleClassName:s,descriptionClassName:n})=>H.jsxs("div",{className:Mt.mergeClasses("h-full w-full flex flex-col items-center justify-center text-secondary",i),"aria-label":"no-data-container",children:[e||H.jsx(vn.IconClipboardX,{width:60,height:60,stroke:.5}),H.jsx("span",{className:Mt.mergeClasses("dial-small-text mt-2 text-primary",s),"aria-label":"no-results-title",children:t}),o&&H.jsx("span",{className:Mt.mergeClasses("mt-1 text-primary",n),"aria-label":"no-results-description",children:o})]});function he(e){if(e?.length)return e[e.length-1]}function ho(e,t,o){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s]&&!o?.(e[s],t[s]))return!1;return!0}function Ti(e,t){if(e){for(const o of e)if(t(o))return!0}}function At(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function Ep(e,t){let o=0,i=0;for(;o<e.length;o++)t.includes(e[o])||(e[i]=e[o],i++);for(;i<e.length;)e.pop()}function Dl(e,t,o){for(let i=0;i<t.length;i++)At(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var Nt=e=>e==null||e===""?null:e;function O(e){return e!=null&&e!==""}function we(e){return!O(e)}var Fr=e=>e!=null&&typeof e.toString=="function"?e.toString():null,ji=(e,t)=>{const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i},xp=(e,t,o=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!o||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),Ao=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,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&o&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),i.size===0&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,s=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(o,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)s(()=>l(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},o=this.frameworkOverrides;o?o.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},Pp=/[&<>"']/g,Dp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ei(e){return e?.toString().toString()??null}function Hi(e){return Ei(e)?.replace(Pp,t=>Dp[t])??null}function Ml(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function Mp(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}function gt(e){return e.eRootDiv.getRootNode()}function ve(e){return gt(e).activeElement}function Pe(e){const{gos:t,eRootDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&O(s)?i=s():o&&(i=o.ownerDocument),i&&O(i)?i:document}function fa(e){const t=ve(e);return t===null||t===Pe(e).body}function ma(e){return Pe(e).defaultView||window}function Ca(e){let t=null,o=null;try{t=Pe(e).fullscreenElement}catch{}finally{t||(t=gt(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t?.documentElement:o=t}return o}function Tp(e){return Ca(e)?.clientWidth??(window.innerWidth||-1)}function Ip(e){return Ca(e)?.clientHeight??(window.innerHeight||-1)}function wt(e,t,o){o==null||typeof o=="string"&&o==""?Pd(e,t):bt(e,t,o)}function bt(e,t,o){e.setAttribute(Dd(t),o.toString())}function Pd(e,t){e.removeAttribute(Dd(t))}function Dd(e){return`aria-${e}`}function ko(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Ap(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function kp(e){return e.getAttribute("aria-label")}function Ci(e,t){wt(e,"label",t)}function Yi(e,t){wt(e,"labelledby",t)}function Md(e,t){wt(e,"live",t)}function Lp(e,t){wt(e,"atomic",t)}function Op(e,t){wt(e,"relevant",t)}function va(e,t){wt(e,"invalid",t)}function Gp(e,t){wt(e,"disabled",t)}function Td(e,t){wt(e,"hidden",t)}function Er(e,t){bt(e,"expanded",t)}function Hp(e,t){bt(e,"setsize",t)}function Bp(e,t){bt(e,"posinset",t)}function Vp(e,t){bt(e,"rowcount",t)}function wa(e,t){bt(e,"rowindex",t)}function Np(e,t){bt(e,"rowspan",t)}function Wp(e,t){bt(e,"colcount",t)}function Id(e,t){bt(e,"colindex",t)}function zp(e,t){bt(e,"colspan",t)}function _p(e,t){bt(e,"sort",t)}function Up(e){Pd(e,"sort")}function Ad(e,t){wt(e,"selected",t)}function $p(e,t){wt(e,"controls",t)}function Kp(e,t){$p(e,t.id),Yi(t,e.id)}function Tl(e,t){wt(e,"owns",t)}function Sn(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var qp="[tabindex], input, select, button, textarea, [href]",kd="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Bi(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(kd)?!1:vt(e)}function me(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||Td(e,!t)}function jp(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||Td(e,!t)}function Qi(e,t){const o="disabled",i=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);i(e);const s=e.querySelectorAll("input")??[];for(const n of s)i(n)}function Eo(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function _o(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(o||"0"),borderTopWidth:C(i||"0"),borderRightWidth:C(s||"0"),borderBottomWidth:C(n||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(c||"0"),paddingLeft:C(d||"0"),marginTop:C(u||"0"),marginRight:C(h||"0"),marginBottom:C(g||"0"),marginLeft:C(f||"0"),boxSizing:m}}function ba(e){const t=_o(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Zi(e){const t=_o(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Ld(e){const{height:t,marginBottom:o,marginTop:i}=_o(e);return Math.floor(t+o+i)}function _s(e){const{width:t,marginLeft:o,marginRight:i}=_o(e);return Math.floor(t+o+i)}function Od(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=_o(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function Us(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function $s(e,t,o){o&&(t*=-1),e.scrollLeft=t}function Xe(e){for(;e?.firstChild;)e.firstChild.remove()}function _t(e){e?.parentNode&&e.remove()}function Gd(e){return!!e.offsetParent}function vt(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Gd(e)||window.getComputedStyle(e).visibility!=="visible")}function Sa(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Ji(e){return()=>{const t=e();return t?Hd(t)||Yp(t):!0}}function Hd(e){return e.clientWidth<e.scrollWidth}function Yp(e){return e.clientHeight<e.scrollHeight}function Ks(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Tt(e,t)}function Tt(e,t){t=ya(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Vi(e,t){t=ya(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function ya(e){return typeof e=="number"?`${e}px`:e}function Ra(e){return e instanceof Node||e instanceof HTMLElement}function Qe(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function Qp(e,t){if(!t.isContentEditable)return;const o=ma(e).getSelection();if(!o)return;const i=Pe(e).createRange();i.selectNodeContents(t),i.collapse(!1),o.removeAllRanges(),o.addRange(i)}function Kt(e,t,o){const s=ma(e).ResizeObserver,n=s?new s(o):null;return n?.observe(t),()=>n?.disconnect()}function qt(e,t){const o=ma(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var Bd="data-ref",Vn;function Il(){return Vn??(Vn=document.createTextNode(" ")),Vn.cloneNode()}function Lo(e){const{attrs:t,children:o,cls:i,ref:s,role:n,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(Bd,s),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(o)if(typeof o=="string")a.textContent=o;else{let l=!0;for(const c of o)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(Il()),l=!1),a.append(Lo(c)),a.appendChild(Il())))}return a}var Zp=["touchstart","touchend","touchmove","touchcancel","scroll"],Jp=["wheel"],Nn={},qs=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof Nn[o]=="boolean")return Nn[o];const i=document.createElement(e[o]||"div");return o="on"+o,Nn[o]=o in i}})();function Xp(e,t){return!t||!e?!1:tf(t).indexOf(e)>=0}function ef(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function tf(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():ef(t)}function of(e,t,o){const i=sf(t);let s;i!=null&&(s={passive:i}),e.addEventListener(t,o,s)}var sf=e=>{const t=Zp.includes(e),o=Jp.includes(e);if(t)return!0;if(o)return!1};function Vd(e,t,o){if(o===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=o}var ri=(e,t)=>{const o=e.identifier;for(let i=0,s=t.length;i<s;++i){const n=t[i];if(n.identifier===o)return n}return null};function Xi(e,t){return e.gos.isElementInThisInstance(t.target)}function nf(e,t,o){const s=e.getBoundingClientRect().height,n=Tp(o)-2,r=Ip(o)-2;if(!e.offsetParent)return;const l=Od(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-s/2,h=d-l.left-10;const g=Pe(o),f=g.defaultView||window,m=f.pageYOffset||g.documentElement.scrollTop,C=f.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+m&&(u=r+m-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var Ds=(e,...t)=>{for(const o of t){const[i,s,n,r]=o;i.addEventListener(s,n,r),e.push(o)}},Fa=e=>{if(e){for(const[t,o,i,s]of e)t.removeEventListener(o,i,s);e.length=0}},to=e=>{e.cancelable&&e.preventDefault()};function rf(e,t){return t}function Nd(e){return e?.getLocaleTextFunc()??rf}function af(e,t,o,i){const s=t[o];return e.getLocaleTextFunc()(o,typeof s=="function"?s(i):s,i)}function lf(e){return(t,o,i)=>e({key:t,defaultValue:o,variableValues:i})}function cf(e){return(t,o,i)=>{let s=e?.[t];if(s&&i?.length){let n=0;for(;!(n>=i.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",i[n++])}return s??o}}var qe=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new Ao),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService?.removeEventListener(e,t,o)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const i of Object.keys(t)){const s=t[i];s&&o.push(this._setupListener(e,i,s))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let i;if(df(e))e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null);else{const s=uf(e);e instanceof HTMLElement?of(e,t,o):s?e.addListener(t,o):e.addEventListener(t,o),i=s?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupPropertyListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const i=()=>(o.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.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=s.changeSet.id}const n={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(n)};for(const s of e)this.setupPropertyListener(s,i)}getLocaleTextFunc(){return Nd(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function df(e){return e.__addEventListener!==void 0}function uf(e){return e.eventServiceType==="global"}var x=class extends qe{},xr=new Set,yn=(e,t)=>{xr.has(t)||(xr.add(t),e())};yn._set=xr;var hf={pending:!1,funcs:[]},gf={pending:!1,funcs:[]};function Pr(e,t="setTimeout",o){const i=t==="raf"?gf:hf;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const n=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of n)r()};t==="raf"?qt(o,s):window.setTimeout(s,0)}function xe(e,t,o){let i;return function(...s){const n=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},o),i}}function Al(e,t){let o=0;return function(...i){const s=this,n=Date.now();n-o<t||(o=n,e.apply(s,i))}}function pf(e,t,o,i=100){const s=Date.now();let n=null,r=!1;const a=()=>{n!=null&&(window.clearInterval(n),n=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-s>i;(t()||c)&&(o(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var Wd=new Set(["__proto__","constructor","prototype"]);function ff(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o<e.length;o++)t(o.toString(),e[o]);return}for(const o of Object.keys(e).filter(i=>!Wd.has(i)))t(o,e[o])}}function _e(e,t,o=!0,i=!1){O(t)&&ff(t,(s,n)=>{let r=e[s];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),kl(n)&&kl(r)&&!Array.isArray(r)?_e(r,n,o,i):(o||n!==void 0)&&(e[s]=n))})}function kl(e){return typeof e=="object"&&e!==null}var Ea=class Gt{static applyGlobalGridOptions(t){if(!Gt.gridOptions)return{...t};let o={};return _e(o,Gt.gridOptions,!0,!0),Gt.mergeStrategy==="deep"?_e(o,t,!0,!0):o={...o,...t},Gt.gridOptions.context&&(o.context=Gt.gridOptions.context),t.context&&(Gt.mergeStrategy==="deep"&&o.context&&_e(t.context,o.context,!0,!0),o.context=t.context),o}static applyGlobalGridOption(t,o){if(Gt.mergeStrategy==="deep"){const i=zd(t);if(i&&typeof i=="object"&&typeof o=="object")return Gt.applyGlobalGridOptions({[t]:o})[t]}return o}};Ea.gridOptions=void 0;Ea.mergeStrategy="shallow";var xa=Ea;function zd(e){return xa.gridOptions?.[e]}var _d={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupHideColumnsUntilExpanded:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},Ud="https://www.ag-grid.com";function Oo(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Ni(e,...t){yn(()=>$d(e,...t),e+t?.join(""))}function ai(e,...t){yn(()=>mf(e,...t),e+t?.join(""))}function mf(e,...t){console.error("AG Grid: "+e,...t)}function $d(e,...t){console.warn("AG Grid: "+e,...t)}var Kd=new Set,js={},xo={},Ms,qd=!1,jd=!1,Cf=!1;function vf(e){const[t,o]=e.version.split(".")||[],[i,s]=Ms.split(".")||[];return t===i&&o===s}function wf(e){Ms||(Ms=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;e.version?vf(e)||ai(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Ms}.`)):ai(t(`'${e.moduleName}' is incompatible.`));const o=e.validate?.();o&&!o.isValid&&ai(`${o.message}`)}function es(e,t,o=!1){o||(qd=!0),wf(e);const i=e.rowModels??["all"];Kd.add(e);let s;t!==void 0?(jd=!0,xo[t]===void 0&&(xo[t]={}),s=xo[t]):s=js;for(const n of i)s[n]===void 0&&(s[n]={}),s[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)es(n,t,o)}function bf(e){delete xo[e]}function Dr(e,t,o){const i=s=>!!js[s]?.[e]||!!xo[t]?.[s]?.[e];return i(o)||i("all")}function Pa(){return jd}function Sf(e,t){const o=xo[e]??{};return[...Object.values(js.all??{}),...Object.values(o.all??{}),...Object.values(js[t]??{}),...Object.values(o[t]??{})]}function yf(){return new Set(Kd)}function Rf(e,t){const o=xo[e]??{};return[...Object.values(o.all??{}),...Object.values(o[t]??{})]}function Ff(){return qd}function Yd(){return Cf}var Qd=class{static register(e){es(e,void 0)}static registerModules(e){for(const t of e)es(t,void 0)}};function Zd(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const o=Zd(t.dependsOn);if(o)return o}}}var L="35.2.1",Ll=2e3,Ol=100,Jd="_version_",Xd=null,li=`${Ud}/javascript-data-grid`;function Ef(e){Xd=e}function xf(e){li=e}function eu(e,t,o){return Xd?.(e,t)??[Tf(e,t,o)]}function Da(e,t,o,i,s){e(`${i?"warning":"error"} #${t}`,...eu(t,o,s))}function Pf(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function Df(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Pf(e)),t}function Ts(e){return e===void 0?"undefined":e===null?"null":e}function Mr(e,t){return`${e}?${t.toString()}`}function Mf(e,t,o){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=Mr(e,t);for(const[n,r]of i){if(n===Jd)continue;const a=s.length-o;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>Ol?r.slice(0,r.length-c)+l:r.slice(0,Ol)+l;t.set(n,d),s=Mr(e,t)}return s}function tu(e,t){const o=new URLSearchParams;if(o.append(Jd,L),t)for(const n of Object.keys(t))o.append(n,Df(t[n]));const i=`${li}/errors/${e}`,s=Mr(i,o);return s.length<=Ll?s:Mf(i,o,Ll)}var Tf=(e,t,o)=>{const i=tu(e,t);return`${`${o?o+`
|
|
2
2
|
`:""}Visit ${i}`}${o?"":`
|
|
3
3
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function D(...e){Da(Ni,e[0],e[1],!0)}function ce(...e){Da(ai,e[0],e[1],!1)}function Li(e,t,o){Da(ai,e,t,!1,o)}function If(e,t){const o=t[0];return`error #${o} `+eu(o,t[1],e).join(" ")}function It(...e){return If(void 0,e)}function ou(e,t){return e.get("rowModelType")===t}function Se(e,t){return ou(e,"clientSide")}function xi(e,t){return ou(e,"serverSide")}function Le(e,t){return e.get("domLayout")===t}function Po(e){return Zs(e)!==void 0}function iu(e){return typeof e.get("getRowHeight")=="function"}function Af(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function kf({gos:e,formula:t}){const o=e.get("rowNumbers");return o||!!t?.active&&o!==!1}function ro(e,t,o=!1,i){const{gos:s,environment:n}=e;if(i==null&&(i=n.getDefaultRowHeight()),iu(s)){if(o)return{height:i,estimated:!0};const l={node:t,data:t.data},c=s.getCallback("getRowHeight")(l);if(Tr(c))return c===0&&D(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&s.get("masterDetail"))return Lf(s);const r=s.get("rowHeight");return{height:r&&Tr(r)?r:i,estimated:!1}}function Lf(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Tr(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Do(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||we(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(D(24),t.getDefaultRowHeight())}function Tr(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function su(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function Go(e,t,o,i){const s=e.getDomDataKey();let n=t[s];we(n)&&(n={},t[s]=n),n[o]=i}function ci(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function nu(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Le(e,"print"))}function Bt(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Ys(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function ru(e){return e.get("grandTotalRow")}function Of(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Gf(e){return Of(e)&&e.get("groupHideColumnsUntilExpanded")&&Se(e)}function au(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function lu(e,t,o){return!!t.group&&!t.footer&&au(e,o)}function vi(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(yn(()=>D(25,{id:i}),"getRowIdString"),i=String(i)),i}}function Hf(e,t){const o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Bf(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function di(e){return e?.checkboxes??!0}function Is(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Qs(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Wn(e){return e?.hideDisabledCheckboxes??!1}function Vf(e){return typeof e.get("rowSelection")!="string"}function ao(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function ui(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function cu(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return o&&i?!1:o?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Nf(e){const t=cu(e);return t===!0||t==="enableSelection"}function Wf(e){const t=cu(e);return t===!0||t==="enableDeselection"}function Ir(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Zs(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Js(e){return Zs(e)==="multiRow"}function zf(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Xs(e){const t=e.get("rowSelection");if(typeof t=="string"){const o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function du(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function _f(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function ts(e){const t=Xs(e);return t==="descendants"||t==="filteredDescendants"}function Gl(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Uf(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Ze(e){return e.get("columnMenu")==="legacy"}function $f(e){return!Ze(e)}function Kf(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function qf(e,t,o){typeof e!="object"&&(e={});const i={...e};for(const s of o){const n=t[s];typeof n<"u"&&(i[s]=n)}return i}function jf(e,t){if(!e)return;const o={};let i=!1;for(const r of Object.keys(e))o[r]=e[r],i=!0;if(!i)return;const s={type:"gridOptionsChanged",options:o};t.dispatchEvent(s);const n={type:"componentStateChanged",...o};t.dispatchEvent(n)}function K(e,t){return e.addCommon(t)}function As(e,t){return e[t]??e.gridOptions?.[t]??zd(t)??_d[t]}function Yf({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Qf={resizable:!0,sortable:!0},Zf=0;function uu(){return Zf++}function lo(e){return e instanceof Uo}var Jf=["asc","desc",null],Xf=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],Uo=class extends x{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=uu(),this.autoHeaderHeight=null,this.sortDef=ct(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Ao,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Hi(o)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t?.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,o?.initCol(this),i?.initCol(this)}setColDef(e,t,o){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",o)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=O(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=O(o)&&o.includes(".")&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,o.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const o=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return K(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Qf[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return K(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){const e=[],{sort:t,initialSort:o}=this.colDef,i=t===null?t:Ut(t?.type),s=o===null?o:Ut(o?.type);return i&&e.push(i),s&&e.push(s),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?Xf:Jf;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map(t=>ct(t))}getAvailableSortTypes(){const e=this.getSortingOrder().reduce((t,o)=>(o.direction&&t.push(o.type),t),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return we(this.getSort())}isSorting(){return O(this.getSort())}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return D(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const o=e===!0;this.visible!==o&&(this.visible=o,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let o=!0;for(;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return K(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(we(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(we(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)}setActualWidth(e,t,o=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,o){const i=this.createColumnEvent(e,t);o&&_e(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ct(e){return hi(e)?{direction:e.direction,type:e.type}:{direction:Rn(e),type:Ut(e)}}function so(e){return e==="asc"||e==="desc"||e===null}function Ma(e){return e==="default"||e==="absolute"}function hi(e){if(!e||typeof e!="object")return!1;const t=e;return Ma(t.type)&&so(t.direction)}function ks(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function Rn(e){return so(e)?e:null}function Ut(e){return Ma(e)?e:"default"}function em(e,t,o){const s=o?.()??t.sortSvc.getDisplaySortForColumn(e),n=Ut(s?.type),r=Rn(s?.direction),a=e.getAvailableSortTypes(),l=a.has("default"),c=a.has("absolute");return{isDefaultSortAllowed:l,isAbsoluteSortAllowed:c,isAbsoluteSort:n==="absolute",isDefaultSort:n==="default",isAscending:r==="asc",isDescending:r==="desc",direction:r}}function Ve(e){return e instanceof Ls}var Ls=class extends x{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=uu(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)lo(t)?e(t):Ve(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)lo(t)?e.push(t):Ve(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1;const i=this.findChildrenRemovingPadding();for(let n=0,r=i.length;n<r;n++){const a=i[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,o=!0):l==="closed"?(t=!0,o=!0):(e=!0,t=!0)}const s=e&&t&&o;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=o=>{for(const i of o)Ve(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},tm={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Hl(e,t,o){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,o),i}var om=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Fr(e);let o=0;for(;;){let i=e??t;if(i?o!==0&&(i+="_"+o):i=o,!this.existingKeys[i]){const s=String(i);return e&&o>0&&D(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}o++}}},im=(e,t)=>{Ve(e)&&e.setupExpandable(),e.originalParent=t};function sm(e,t=null,o,i,s){const n=new om,{existingCols:r,existingGroups:a,existingColKeys:l}=nm(i);n.addExistingKeys(l);const c=hu(e,t,0,o,r,n,a,s),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,n):c;return Wt(null,h,im),{columnTree:h,treeDepth:u}}function nm(e){const t=[],o=[],i=[];return e&&Wt(null,e,s=>{if(Ve(s)){const n=s;o.push(n)}else{const n=s;i.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function hu(e,t,o,i,s,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d<c.length;d++){const u=t[d];l&&um(u)?c[d]=l.createProvidedColumnGroup(i,u,o,s,n,r,a):c[d]=rm(e,i,u,s,n,a)}return c}function rm(e,t,o,i,s,n){const r=lm(o,i);r&&i?.splice(r.idx,1);let a=r?.column;if(a){const l=Ar(e,o,a.getColId());a.setColDef(l,o,n),am(e,a,l,n)}else{const l=s.getUniqueKey(o.colId,o.field),c=Ar(e,o,l);a=new Uo(c,o,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function gu(e,t,o,i,s,n,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;o!==void 0&&t.setVisible(!o,a),l&&(l.updateColSort(t,i,a),s!==void 0&&l.setColSortIndex(t,s)),n!==void 0&&c?.setColPinned(t,n),r!==void 0&&d?.setColFlex(t,r)}function am(e,t,o,i){gu(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,i);const s=t.getFlex();if(!(s!=null&&s>0))if(o.width!=null)t.setActualWidth(o.width,i);else{const n=t.getActualWidth();t.setActualWidth(n,i)}}function lm(e,t){if(t)for(let o=0;o<t.length;o++){const i=t[o].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(e.field!=null){if(i.field===e.field)return{idx:o,column:t[o]};continue}if(i===e)return{idx:o,column:t[o]}}}function Ar(e,t,o,i){const{gos:s,dataTypeSvc:n}=e,r={},a=s.get("defaultColDef");_e(r,a,!1,!0);const l=cm(e,r,t,o);l&&dm(e,l,r);const c=r.cellDataType;_e(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=s.get("autoGroupColumnDef"),u=Bt(s);return t.rowGroup&&d&&u&&_e(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n?.postProcess(r),n?.validateColDef(r,t,a,o),s.validateColDef(r,o,i),r}function cm(e,t,o,i){const s=e.dataTypeSvc?.updateColDefAndGetColumnType(t,o,i),n=o.type??s??t.type;return t.type=n,n?tn(n):void 0}function dm(e,t,o){if(!t.length)return;const i=Object.assign({},tm),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const r=s[n];n in i?D(34,{key:n}):(r.type&&D(35),i[n]=r)}for(const n of t){const r=i[n.trim()];r?_e(o,r,!1,!0):D(36,{t:n})}}function um(e){return e.children!==void 0}function Wt(e,t,o){if(t)for(let i=0;i<t.length;i++){const s=t[i];Ve(s)&&Wt(s,s.getChildren(),o),o(s,e)}}var oo="ag-Grid-AutoColumn",Ta="ag-Grid-SelectionColumn",Ia="ag-Grid-RowNumbersColumn";function pu(e){const t=[],o=i=>{for(let s=0;s<i.length;s++){const n=i[s];lo(n)?t.push(n):Ve(n)&&o(n.getChildren())}};return o(e),t}function Ht(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function en(e,t,o){const i={};if(!t)return;Wt(null,t,n=>{i[n.getInstanceId()]=n}),o&&Wt(null,o,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>n!=null);e.context.destroyBeans(s)}function Aa(e){return e.getId().startsWith(oo)}function go(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Ta)??!1}function Ue(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Ia)??!1}function hm(e){return go(e)||Ue(e)}function tn(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function gm(e,t){return ho(e,t,(o,i)=>o.getColId()===i.getColId())}function pm(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function gi(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Wi(e,t){return e===t||e.colId==t||e.getColDef()===t}var fm=(e,t)=>(o,i)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(e[o]!==void 0&&(s.value1=e[o],n=!0),O(i)&&e[i]!==void 0&&(s.value2=e[i],n=!0)),!n&&t&&(t[o]!==void 0&&(s.value1=t[o]),O(i)&&t[i]!==void 0&&(s.value2=t[i])),s};function mm(e,t){const o={...e,sort:void 0,colId:t},i=fu(e);return i&&(o.sort=i.direction,o.sortType=i.type),o}function fu(e){const{sort:t,initialSort:o}=e,i=hi(t)||so(t),s=hi(o)||so(o);return i?ct(t):s?ct(o):null}function mu(e,t){return e+"_"+t}function Fe(e){return e instanceof os}var os=class extends x{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Hi(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return mu(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)Fe(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=he(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])lo(t)?e.push(t):Fe(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])lo(t)?e.push(t):Fe(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e?.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(const o of this.children??[]){if(Fe(o)&&!o.displayedChildren?.length)continue;switch(o.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(o);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(o);break;default:this.displayedChildren.push(o);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},R={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},Cm=65,vm=67,wm=86,bm=68,Sm=90,ym=89;function Cu(e){const{keyCode:t}=e;let o;switch(t){case Cm:o=R.A;break;case vm:o=R.C;break;case wm:o=R.V;break;case bm:o=R.D;break;case Sm:o=R.Z;break;case ym:o=R.Y;break;default:o=e.code}return o}function Rm(e,t){return new se(o=>{o(window.setInterval(e,t))})}var se=class Oi{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(o=>this.onDone(o),o=>this.onReject(o))}static all(t){return t.length?new Oi(o=>{let i=t.length;const s=new Array(i);t.forEach((n,r)=>{n.then(a=>{s[r]=a,i--,i===0&&o(s)})})}):Oi.resolve()}static resolve(t=null){return new Oi(o=>o(t))}then(t){return new Oi(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const o of this.waiters)o(t)}onReject(t){}},Fm=class extends qe{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){const o={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:i=>this.onDragStart(e,i),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(o),this.beans.dragSvc.addDragSource(o)}setDragImageCompIcon(e,t=!1){const o=this.dragImageComp;o&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,o.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:o}=this;for(let i=0,s=t.length;i<s;i++)if(t[i].dragSource===e){const n=t[i];o.dragSvc?.removeDragSource(n),t.splice(i,1);break}}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:o}=this,i=o.dragSvc;for(const s of e)i?.removeDragSource(s);e.length=0,t.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const o=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-o.left,this.dragInitialSourcePointerOffsetY=t.clientY-o.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:o}=this;if(t?.onDragStopped?.(),o){const i=this.dropTargetEvent(o,e,!1);o.onDragStop?.(i)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:o}=this;if(e?.onDragCancelled?.(),t&&o){const i=this.dropTargetEvent(t,o,!1);t.onDragCancel?.(i)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const o=this.findCurrentDropTarget(e),{lastDropTarget:i,dragSource:s,dragItem:n}=this;let r=!1;if(o!==i){if(r=!0,i){const a=this.dropTargetEvent(i,e,t);i.onDragLeave?.(a)}if(i!==null&&!o?this.handleExit(s,n):i===null&&o&&this.handleEnter(s,n),o){const a=this.dropTargetEvent(o,e,t);o.onDragEnter?.(a)}this.lastDropTarget=o}else if(o){const a=this.dropTargetEvent(o,e,t);o.onDragging?.(a),a?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getContainer(),o=e.getSecondaryContainers?.(),i=o?.length;if(!i)return[[t]];const s=new Array(i+1);s[0]=[t];for(let n=0;n<i;++n)s[n+1]=o[n];return s}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let i=!1;const s=(a,l)=>{for(const c of l){const{width:d,height:u,left:h,right:g,top:f,bottom:m}=c.getBoundingClientRect();if(d===0||u===0)return!1;const C=a.clientX>=h&&a.clientX<g,v=a.clientY>=f&&a.clientY<m;if(!C||!v)return!1}return!0};for(const a of o)if(s(e,a)){i=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:i&&t.isInterestedIn(r,n)}findCurrentDropTarget(e){const t=[],o=this.dropTargets;for(let r=0,a=o.length;r<a;++r){const l=o[r];this.isMouseOnDropTarget(e,l)&&t.push(l)}const i=t.length;if(i===0)return null;if(i===1)return t[0];const n=gt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let r=0,a=n.length;r<a;++r){const l=n[r];for(let c=0,d=t.length;c<d;c++){const u=t[c],h=this.getAllContainersFromDropTarget(u);let g=!1;for(let f=0,m=h.length;f<m&&!g;f++){const C=h[f];for(let v=0,w=C.length;v<w;v++)if(C[v]===l){g=!0;break}}if(g)return u}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){const t=e.getContainer(),o=this.dropTargets;let i=0;for(let s=0,n=o.length;s<n;++s){const r=o[s];if(r.getContainer()===t){r.external&&--this.externalDropZoneCount;continue}i!==s&&(o[i]=r),++i}o.length=i}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){const t=this.dropTargets;for(let o=0,i=t.length;o<i;++o){const s=t[o];if(s.external&&s.getContainer()===e)return s}return null}dropTargetEvent(e,t,o){const{dragSource:i,dragItem:s,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:h}=t,g=u-(r?.clientX||0),f=h-(r?.clientY||0),m=this.createEvent({event:t,x:u-d.left,y:h-d.top,vDirection:f>0?"down":f<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:o,dragItem:s,dropZoneTarget:c,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=m,m}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&nf(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(o=>{const i=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!i||!this.isAlive()){this.destroyBean(o);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const s=this.dragImageComp;s!==o&&(this.dragImageComp=o,this.removeDragImageComp(s)),o&&(this.appendDragImageComp(o),this.updateDragImageComp(),this.positionDragImageComp(i))})}appendDragImageComp(e){const t=e.getGui(),o=t.style;o.position="absolute",o.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(o.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),o.top="20px",o.left="20px";const i=Ca(this.beans);i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:o,lastDraggingEvent:i,dragImageLastLabel:s}=this;if(!e)return;this.setDragImageCompIcon(o?.getIconName?.(i)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(i)),n||(n=""),s!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function vu(e){return typeof e=="object"&&!!e.component}function Em(e){return e?e.prototype&&"getGui"in e.prototype:!1}function wu(e,t,o,i){const{name:s}=o;let n,r,a,l,c,d;if(t){const u=t,h=u[s+"Selector"],g=h?h(i):null,f=m=>{typeof m=="string"?n=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};g?(f(g.component),l=g.params,c=g.popup,d=g.popupPosition):f(u[s])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var xm=class extends x{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,s=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=wu(this.beans.frameworkOverrides,e,t,i),g,f;const m=b=>{const y=this.registry.getUserComponent(n,b);y&&(l=y.componentFromFramework?void 0:y.component,c=y.componentFromFramework?y.component:void 0,g=y.params,f=y.processParams)};if(a!=null&&m(a),l==null&&c==null&&o!=null&&m(o),l&&r&&!Em(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:b}=this.beans;s&&(a!==o||!o)?a?b?.isProvidedUserComp(a)||ce(50,{compName:a}):o?b||ce(260,{...this.gos.getModuleErrorParams(),propName:n,compName:o}):ce(216,{name:n}):o&&!b&&ce(146,{comp:o});return}const C=this.mergeParams(e,t,i,d,g,f),v=l==null,w=l??c;return{componentFromFramework:v,componentClass:w,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(w,v,C,t)}}newAgStackInstance(e,t,o,i){const s=!t;let n;s?n=new e:n=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(n);const r=n.init?.(o);return r==null?se.resolve(n):r.then(()=>n)}mergeParams(e,t,o,i=null,s,n){const r={...o,...s},l=e?.[t.name+"Params"];if(typeof l=="function"){const c=l(o);_e(r,c)}else typeof l=="object"&&_e(r,l);return _e(r,i),n?n(r):r}},Pm={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Dm={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Mm={name:"headerComponent",optionalMethods:["refresh"]},Tm={name:"innerHeaderComponent"},Im={name:"innerHeaderGroupComponent"},Am={name:"headerGroupComponent"},km={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Lm={name:"loadingCellRenderer",cellRenderer:!0},Om={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Gm={name:"tooltipComponent"},ka={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Hm={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Bm={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Vm={name:"loadingCellRenderer",cellRenderer:!0},Nm={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Wm={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function zm(e,t){return e.getCompDetailsFromGridOptions(Dm,"agDragAndDropImage",t,!0)}function _m(e,t,o){return e.getCompDetails(t,Mm,"agColumnHeader",o)}function Um(e,t,o){return e.getCompDetails(t,Tm,void 0,o)}function $m(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,Am,"agColumnGroupHeader",t)}function Km(e,t,o){return e.getCompDetails(t,Im,void 0,o)}function qm(e,t){return e.getCompDetailsFromGridOptions(Bm,void 0,t,!0)}function jm(e,t){return e.getCompDetailsFromGridOptions(Vm,"agLoadingCellRenderer",t,!0)}function Ym(e,t){return e.getCompDetailsFromGridOptions(Nm,"agGroupRowRenderer",t,!0)}function Qm(e,t){return e.getCompDetailsFromGridOptions(Wm,"agDetailCellRenderer",t,!0)}function Bl(e,t,o){return e.getCompDetails(t,km,void 0,o)}function Vl(e,t,o){return e.getCompDetails(t,Lm,"agSkeletonCellRenderer",o,!0)}function bu(e,t,o){return e.getCompDetails(t,Om,"agCellEditor",o,!0)}function Zm(e,t,o,i){const s=t.filter;return vu(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,ka,i,o,!0)}function Jm(e,t,o){return e.getCompDetails(t,Pm,"agDateInput",o,!0)}function Xm(e,t){return e.getCompDetails(t.colDef,Gm,"agTooltipComponent",t,!0)}function eC(e,t,o,i){return e.getCompDetails(t,Hm,i,o)}function Su(e,t){return wu(e,t,ka)}function zn(e,t,o){return e.mergeParams(t,ka,o)}var tC=class extends Fm{createEvent(e){return K(this.gos,e)}createDragImageComp(e){const{gos:t,beans:o}=this;return zm(o.userCompFactory,K(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){D(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}};function yu(e){return!!e.operator}var Ru="ag-resizer-wrapper",jt=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),oC={tag:"div",cls:Ru,children:[jt("eTopLeft","topLeft"),jt("eTop","top"),jt("eTopRight","topRight"),jt("eRight","right"),jt("eBottomRight","bottomRight"),jt("eBottom","bottom"),jt("eBottomLeft","bottomLeft"),jt("eLeft","left")]},iC=class extends qe{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:o}=this.offsetParent,i=o/2-this.getWidth()/2,s=t/2-this.getHeight()/2;this.offsetElement(i,s,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:o,minWidth:i,width:s,minHeight:n,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=vt(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(g.minWidth!=null){const f=h.offsetWidth-this.element.offsetWidth;d=Number.parseInt(g.minWidth,10)-f}if(g.minHeight!=null){const f=h.offsetHeight-this.element.offsetHeight;c=Number.parseInt(g.minHeight,10)-f}}if(this.minHeight=n||c,this.minWidth=i||d,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&o){let h=this.boundaryEl,g=!0;if(h||(h=this.findBoundaryElement(),g=!1),h){const f=Number.parseFloat(h.style.top),m=Number.parseFloat(h.style.left);g?this.offsetElement(Number.isNaN(m)?0:m,Number.isNaN(f)?0:f,e):this.setPosition(m,f)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(o),this.moveElementDragListener=o):(this.dragSvc?.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(const t of Object.keys(e)){const o=!!e[t],i=this.getResizerElement(t),s={dragStartPixels:0,eElement:i,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(o||!this.isAlive()&&!o)&&(o?(this.dragSvc?.addDragSource(s),this.resizeListeners.push(s),i.style.pointerEvents="all"):i.style.pointerEvents="none",this.resizable[t]=o)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,o=this.element;let i=!1;if(typeof e=="string"&&e.includes("%"))Vi(o,e),e=Ld(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?Vi(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:o}=this.offsetParent;if(!o)return null;const i=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:i.top,r=e?0:s.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-i.bottom}}return o+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:o}=this.config;let i=!1;if(typeof e=="string"&&e.includes("%"))Tt(t,e),e=_s(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,n=o?this.position.x:this.element.getBoundingClientRect().left;s&&e+n>s&&(e=s-n)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Tt(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,o){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:o}),this.setPosition(Number.parseFloat(s.style.left),Number.parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const o=this.getAvailableHeight();this.element.style.setProperty("max-height",`${o}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=Kt(this.beans,this.popupSvc?.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:o,isTop:i,anywhereWithin:s,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!s,r)?0:r,c=this.shouldSkipY(t,!!i,n,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,o,i){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=i<0&&e.clientX>a+n.left||i>0&&e.clientX<a+n.left:o?l=i<0&&e.clientX>r.right||i>0&&e.clientX<a+n.left:l=i<0&&e.clientX>r.right||i>0&&e.clientX<r.right,l)}shouldSkipY(e,t,o=0,i){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=i<0&&e.clientY>a+n.top+o||i>0&&e.clientY<a+n.top:l=i<0&&e.clientY>r.bottom||i>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(Lo(oC)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${Ru}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:o,forcePopupParentAsOffsetParent:i}=this.config;!o&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(o=>!o.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,o=0;for(const i of e){const s=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let n=this.minHeight||0,r=this.minWidth||0;if(s){const a=window.getComputedStyle(i);a.minHeight&&(n=Number.parseInt(a.minHeight,10)),a.minWidth&&(r=Number.parseInt(a.minWidth,10))}else n=i.offsetHeight,r=i.offsetWidth;t+=n,o+=r}return{height:t,width:o}}applySizeToSiblings(e){let t=null;const o=this.getSiblings();if(o){for(let i=0;i<o.length;i++){const s=o[i];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=o[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:i,isRight:s,isBottom:n,isLeft:r}=this.currentResizer,a=s||r,l=n||i,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:i}),u=this.position.x,h=this.position.y;let g=0,f=0;if(a&&c){const m=r?-1:1,C=this.getWidth(),v=C+c*m;let w=!1;r&&(g=C-v,(u+g<=0||v<=this.minWidth)&&(w=!0,g=0)),w||this.setWidth(v)}if(l&&d){const m=i?-1:1,C=this.getHeight(),v=C+d*m;let w=!1;i?(f=C-v,(h+f<=0||v<=this.minHeight)&&(w=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&C<v&&this.getMinSizeOfSiblings().height+v>this.element.parentElement.offsetHeight&&(w=!0),w||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&g||f)&&this.offsetElement(u+g,h+f)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:o}=this.position;let i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:s,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+s,o+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},sC=class extends iC{},W=null;function Nl(e){return typeof e?.getGui=="function"}var as=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const i=(e||"").split(" ");if(i.length>1){for(const s of i)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},nC=0,Pi=class extends qe{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=nC++,this.cssManager=new as(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Bd):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===W)this[t]=i??e;else{const n=o?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const i of e.childNodes??[])o.push(i);for(const i of o){if(!(i instanceof HTMLElement))continue;const s=this.createComponentFromElement(i,n=>{const r=n.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const n=Array.prototype.slice.call(i.children);s.addItems(n)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,o){const i=e.nodeName,s=this.getDataRefAttribute(e),n=i.indexOf("AG-")===0,r=n?this.componentSelectors.get(i):null;let a=null;if(r){const l=o&&s?o[s]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,o,a),a}swapComponentForNode(e,t,o){const i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){const o=t??this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const i of e)i.setAttribute("tabindex",o.toString())}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=Sa(e):i=Lo(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let s=0;s<t.length;s++){const n=t[s];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let o=t;return e==null?null:(o||(o=this.eGui),Ra(e)?{element:e,parent:o}:{element:e.getGui(),parent:o})}prependChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.prepend(o)}appendChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;jp(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;me(this.eGui,e,{skipAriaHidden:o});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,o){this.eGui.addEventListener(e,t,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css===Wl?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=Wl}},Wl=Symbol(),ye=class extends Pi{},_n,Un,$n,Kn,kr,Lr,qn;function po(){return _n===void 0&&(_n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),_n}function wi(){return Un===void 0&&(Un=/(firefox)/i.test(navigator.userAgent)),Un}function Fu(){return $n===void 0&&($n=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),$n}function Mo(){return Kn===void 0&&(Kn=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Kn}function Or(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!wi())?null:t.toString()}function rC(){if(qn!==void 0)return qn;if(!document.body)return-1;let e=1e6;const t=wi()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return o.remove(),qn=e,e}function La(){return Lr==null&&Eu(),Lr}function Eu(){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 o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.remove(),o!=null&&(Lr=o,kr=o===0)}function xu(){return kr==null&&Eu(),kr}var Gr=!1,on=0;function aC(e){on>0||(e.addEventListener("keydown",sn),e.addEventListener("mousedown",sn))}function lC(e){on>0||(e.removeEventListener("keydown",sn),e.removeEventListener("mousedown",sn))}function sn(e){const t=Gr,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(Gr=o)}function cC(e){const t=Pe(e);return aC(t),on++,()=>{on--,lC(t)}}function Pu(){return Gr}function To(e,t,o=!1){const i=qp;let s=kd;t&&(s+=", "+t),o&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>vt(l)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(n,r):n}function Ho(e,t=!1,o=!1,i=!1){const s=To(e,i?".ag-tab-guard":null,o),n=t?he(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}function $o(e,t,o,i){const s=To(t,o?':not([tabindex="-1"])':null),n=ve(e);let r;o?r=s.findIndex(l=>l.contains(n)):r=s.indexOf(n);const a=r+(i?-1:1);return a<0||a>=s.length?null:s[a]}function Du(e,t=5){let o=0;for(;e&&Or(e)===null&&++o<=t;)e=e.parentElement;return Or(e)===null?null:e}var dC="ag-focus-managed",Mu=class extends qe{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},o={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=o,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;const s=$o(this.beans,this.eFocusable,!1,i.shiftKey);s&&(s.focus(),i.preventDefault())},...o}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(dC),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===R.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},Tu="__ag_Grid_Stop_Propagation";function Bo(e){e[Tu]=!0}function zt(e){return e[Tu]===!0}var Oa={isStopPropagation:zt,stopPropagation:Bo},ls=class extends Mu{constructor(e,t){super(e,Oa,t)}},uC={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function ft(e,t,o){return af(e,uC,t,o)}function Ga(e,t){const{debounceMs:o}=e;return Fn(e)?(o!=null&&D(71),0):o??t}function Fn(e){return(e.buttons?.indexOf("apply")??-1)>=0}function Iu(e,t,o,i){let s=ft(e,o);if(typeof t=="function"){const n=ft(e,i);s=t({filterOptionKey:i,filterOption:n,placeholder:s})}else typeof t=="string"&&(s=t);return s}var hC=class extends ye{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new ls(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new sC(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,o=this.params;this.params=t;const{source:i,state:s,additionalEventAttributes:n}=t;i==="colDef"&&this.updateParams(t,o);const r=this.state;this.state=s;const a=n?.fromAction;return(a&&a!=="apply"||s.model!==r.model||!this.areStatesEqual(s.state,r.state))&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=Fn(e),this.setupApplyDebounced()}doesFilterPass(e){D(283);const{getHandler:t,model:o,column:i}=this.params;return t().doesFilterPass({...e,model:o,handlerParams:this.beans.colFilter.getHandlerParams(i)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return D(284),this.params.model!=null}setupApplyDebounced(){const e=Ga(this.params,this.defaultDebounceMs),t=xe(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return D(285),this.params.model}setModel(e){D(286);const{beans:t,params:o}=this;return t.colFilter.setModelForColumnLegacy(o.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:{valid:o=!0,model:i}}=this;if(!o)return!1;const s=!this.areModelsEqual(t.model,i);return s&&t.onAction("apply",e),s}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const o=this.getModelFromUi(),i={model:o,state:this.getState(),valid:this.canApply(o)};this.state=i;const{params:s,gos:n,eventSvc:r,applyActive:a}=this;s.onStateChange(i),s.onUiChange(this.getUiChangeEventParams()),n.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),i.valid&&(e??(e=a?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:o}=this;if(!t)return;const i=e==="floatingFilter"||e==="columnFilter";i?(t.restoreLastSize(),t.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(i)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return ft(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},Ha=class extends Pi{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},En=class extends Ha{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function Ot(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function xn(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function gC(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var zl="row-group-",Ba="t-",Va="b-",pC=0,co=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=pC++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this;const{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){const e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:o,eventSvc:i}=this.beans,s=this.data;this.data=e,o?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,s,t);this.sibling.__localEventService?.dispatchEvent(a)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,s,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,o){return{type:"dataChanged",node:this,oldData:t,newData:e,update:o}}getRowIndexString(){return this.rowIndex==null?(ce(13),null):this.rowPinned==="top"?Ba+this.rowIndex:this.rowPinned==="bottom"?Va+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:o}=this.beans,i=o?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));const n=this.createDataChangedEvent(e,s,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=vi(this.beans.gos);if(t)if(this.data){const o=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:o.length>0?o:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(zl)&&ce(14,{groupPrefix:zl})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,o){this.beans.expansionSvc?.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:s,gos:n,editSvc:r}=this.beans;if(e==null)return!1;let a=i.getCol(e)??i.getColDefCol(e);if(!a)return!1;if(!this.group){const d=a.getColDef();d.pivotValueColumn&&(a=d.pivotValueColumn)}const l=s.getValueForDisplay({column:a,node:this,from:"data"}).value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:d},data:u,rowIndex:h,rowPinned:g}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}if(o!=="data"&&r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,o);if(d!=null)return d}const c=s.setValue(this,a,t,o);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}getDataValue(e,t="data"){const{colModel:o,valueSvc:i,formula:s}=this.beans;if(e==null)return;const n=o.getCol(e)??o.getColDefCol(e);if(!n)return;const r=t==="data-raw",a=r||t==="value"?"data":t;let l=i.getValue(n,this,a,r);if(!r&&(s&&n.isAllowFormula()&&s.isFormula(l)&&(l=s.resolveValue(n,this)),t!=="data"&&n.getAggFunc()&&typeof l=="object"&&l!=null)){if(typeof l.toNumber=="function")return l.toNumber();if("value"in l)return l.value}return l}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};this.__localEventService?.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let o=0,i=t.length;o<i;++o)t[o].depthFirstSearch(e);e(this)}getAggregatedChildren(e,t){const o=this.beans;return o.aggChildrenSvc?.getAggregatedChildren(this,o.colModel.getCol(e),t)??[]}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new Ao)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const o=this.__localEventService??(this.__localEventService=new Ao);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,o);const i=this.frameworkEventListenerService?.wrap(e,t)??t;o.addEventListener(e,i)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){const o=this.__localEventService;o&&(o.removeEventListener(e,t),o.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(D(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){const o=this.detailNode;o&&o._destroy(e);const i=this.sibling;i&&i._destroy(e)}return!0}};function fC(e,t,o){return K(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var mC=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),CC=(e,t)=>{const o=new co(t);for(const i of Object.keys(e))mC.has(i)||(o[i]=e[i]);return o.oldRowTop=null,o},Hr=(e,t,o)=>{if(!o)return;let i=o.rowIndex;if(i==null)return;i+=t;const s=e.getRowCount();for(;i>=0&&i<s;){const n=e.getRow(i);if(!n||!n.footer&&!n.detail)return n;i+=t}},_l=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:o,order:i}=this;t.has(e)||(t.add(e),o.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),At(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:o,queued:i}=this;e.clear(),i.clear(),t.clear(),o.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:o}=this.beans,i=e?.getSortOptions()??[],s=this.order,n=bC(s);if(s.sort((a,l)=>t?.compareRowNodes(i,a,l)||(a.pinnedSibling?.rowIndex??0)-(l.pinnedSibling?.rowIndex??0)),!n)return;const r=ru(o);r==="bottom"||r==="pinnedBottom"?this.order.push(n):this.order.unshift(n)}hide(e){const{all:t,visible:o}=this,i=o.size;return t.forEach(s=>e(s)?o.delete(s):o.add(s)),this.order=Array.from(o),this.sort(),i!=o.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Au(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(o=>o==e)?Au(t):!1}function jn(e,t){const{gos:o,rowModel:i,filterManager:s}=e;return xi(o)?!i.getRowNode(t.id):s?.isAnyFilterPresent()?!Au(t):o.get("pivotMode")?!t.group:!1}function vC(e){return!!e.footer&&e.level===-1}function wC(e){return!!e.pinnedSibling&&vC(e.pinnedSibling)}function bC(e){const t=e.findIndex(wC);if(t>-1)return e.splice(t,1)?.[0]}var Ul=class extends x{constructor(){super(...arguments),this.csrm=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new _l(t,"top"),this.bottom=new _l(t,"bottom"),this.csrm=Ot(t)??null;const o=s=>jn(t,s.pinnedSibling),i=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,s(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(a=>{n||(n=a.hide(o))});const r=this.refreshRowPositions();(!s||r||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(yC),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{(e.get("isRowPinnable")?.(s)??!0)||this.pinRow(s,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=s==="pinnedBottom"?"bottom":s==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const o=[];t.forEach(i=>o.push(i)),o.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){if(t!=null&&e.destroyed)return;if(e.footer){const r=e.level;if(r>-1)return;if(r===-1){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}const i=e.rowPinned??e.pinnedSibling?.rowPinned;if(i!=null&&t!=null&&t!=i){const r=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,o),this.pinRow(a,t,o);return}const n=o&&RC(this.beans,e,o);if(n){n.forEach(r=>this.pinRow(r,t));return}if(t==null){const r=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(r);if(!a)return;a.delete(r);const l=r.pinnedSibling;Yn(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=$l(this.beans,e,t),a=this.getContainer(t);a.add(r),jn(this.beans,e)&&a.hide(l=>jn(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const o=i=>{if(i.rowHeightEstimated){const s=ro(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Kl(this.top)}getPinnedBottomTotalHeight(){return Kl(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const o=[];return this.forEachPinnedRow(t,i=>{const s=i.pinnedSibling?.id;s!=null&&o.push(s)}),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(const i of e[o]){const s=this.beans.rowModel.getRowNode(i);s?this.pinRow(s,o):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const o=new Set;e.forEachQueued(i=>{const s=this.beans.rowModel.getRowNode(i);s&&o.add(s)});for(const i of o)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:o}=this;if(!e)return;const i=e.rootNode?.sibling;if(!i)return;const s=i.pinnedSibling,n=s&&this.findPinnedRowNode(s);if(o){if(n&&n.floating!==o&&(Yn(s),n.delete(s)),!n||n.floating!==o){const r=$l(t,i,o);this.getContainer(o).add(r)}}else{if(!n)return;Yn(s),n.delete(s)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(o=>o.setRowHeight(o.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=i=>SC(this.beans,i);if(e)return t(this.getContainer(e));let o=!1;return this.forContainers(i=>{const s=t(i);o||(o=s)}),o}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function SC(e,t){let o=0,i=!1;return t.forEach((s,n)=>{if(i||(i=s.rowTop!==o),s.setRowTop(o),s.rowHeightEstimated||s.rowHeight==null){const r=ro(e,s).height;i||(i=s.rowHeight!==r),s.setRowHeight(r)}s.setRowIndex(n),o+=s.rowHeight}),i}function $l(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;const i=CC(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;const s=o==="top"?Ba:Va;return i.id=`${s}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Yn(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function yC(e){const t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function RC(e,t,o){const{rowSpanSvc:i}=e,s=(o&&i?.isCellSpanning(o,t))??!1;if(o&&s)return i?.getCellSpan(o,t)?.spannedNodes}function Kl(e){const t=e.size();if(t===0)return 0;const o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}var ql=class extends x{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=o=>{o.setRowHeight(o.rowHeight,!0)};Ii(this.pinnedBottomRows,t),Ii(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const o=i=>{if(i.rowHeightEstimated){const s=ro(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return Ii(this.pinnedBottomRows,o),t=0,Ii(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}const i=vi(this.gos),s=t==="top"?Ba:Va,n=new Set(o.order),r=[],a=new Set;let l=0,c=-1;for(const d of e){const u=i?.({data:d,level:0,rowPinned:t})??s+this.nextId++;if(a.has(u)){D(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const h=zi(o,u);if(h!==void 0)h.data!==d&&h.updateData(d),l+=this.setRowTopAndRowIndex(h,l,c),n.delete(u);else{const g=new co(this.beans);g.id=u,g.data=d,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,c),o.cache[u]=g,o.order.push(u)}}for(const d of n)zi(o,d)?.clearRowTopAndRowIndex(),delete o.cache[d];o.order=r}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(ro(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return jl(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return jl(this.pinnedBottomRows)}getPinnedTopRowCount(){return Vr(this.pinnedTopRows)}getPinnedBottomRowCount(){return Vr(this.pinnedBottomRows)}getPinnedTopRow(e){return Br(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Br(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return zi(this.getCache(t),e)}forEachPinnedRow(e,t){return Ii(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function jl(e){const t=Vr(e);if(t===0)return 0;const o=Br(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function zi(e,t){return e.cache[t]}function Br(e,t){return zi(e,e.order[t])}function Ii(e,t){e.order.forEach((o,i)=>{const s=zi(e,o);s&&t(s,i)})}function Vr(e){return e.order.length}var FC=class extends x{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const o=e.get("enableRowPinning"),i=ru(e),n=!!o||(i==="pinnedBottom"||i==="pinnedTop"),r=n?this.inner instanceof ql:this.inner instanceof Ul;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Ul:new ql))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,o){return this.inner.pinRow(e,t,o)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},EC=500,xC=550,fs,PC=e=>{if(!fs)fs=new WeakSet;else if(fs.has(e))return!1;return fs.add(e),!0},bo=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let o=this.eventSvc;if(!o){if(o===null)return;this.eventSvc=o=new Ao;const i=this.onTouchStart.bind(this);this.startListener=i,this.eElement.addEventListener("touchstart",i,{passive:!0})}o.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!PC(e))return;const t=e.touches[0];this.touchStart=t;const o=this.handlers;if(!o.length){const i=this.eElement,s=i.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Ds(o,[i,"touchmove",n,l],[s,"touchcancel",a,l],[s,"touchend",r,c],[s,"contextmenu",to,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},xC)}onTouchMove(e){const{moved:t,touchStart:o}=this;if(!t&&o){const i=ri(o,e.touches);i&&!Vd(i,o,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!ri(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&to(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!ri(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const o=this.lastTapTime;o&&t-o>EC&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),Fa(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},DC=1,MC=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=DC++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const o=new t;o.beanName?this.beans[o.beanName]=o:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(o)}for(const t of e.derivedBeans??[]){const{beanName:o,bean:i}=t(this);this.beans[o]=i,this.createdBeans.push(i)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const o=this.beans;for(const i of e)i.preWireBeans?.(o),i.wireBeans?.(o);for(const i of e)i.preConstruct?.();t&&e.forEach(t);for(const i of e)i.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function TC(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var IC=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],Yl=Object.fromEntries(IC.map((e,t)=>[e,t]));function AC(e,t){const o=(e.beanName?Yl[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?Yl[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return o-i}function kC(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}function LC(e){const{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${o??"null"}.${i.getId()}`}function Na(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return o&&i&&s}function OC(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(O(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function GC(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function Ql(e){let t=0,o;const{pinnedRowModel:i,rowModel:s,pageBounds:n}=e;return i?.getPinnedTopRowCount()?o="top":s.getRowCount()?(o=null,t=n.getFirstRow()):i?.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function Zl(e){let t,o=null;const{pinnedRowModel:i,pageBounds:s}=e,n=i?.getPinnedBottomRowCount(),r=i?.getPinnedTopRowCount();return n?(o="bottom",t=n-1):e.rowModel.getRowCount()?t=s.getLastRow():r&&(o="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:o}}function kt(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function ei(e,t){const o=e.spannedRowRenderer?.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function HC(e,t,o){const{rowModel:i,pinnedRowModel:s}=e;let n;return n??(n=i?.getRowNode(t)),o?n??(n=s?.getPinnedRowById(t,o)):(n??(n=s?.getPinnedRowById(t,"top")),n??(n=s?.getPinnedRowById(t,"bottom"))),n}function nn(e,t,o=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(i===0)return s==="top"?null:s==="bottom"&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(o){const l=s?void 0:a.getRow(i);return ku(e,l,!0)??{rowIndex:i-1,rowPinned:s}}return{rowIndex:i-1,rowPinned:s}}function Jl(e,t,o=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(BC(e,t))return s==="bottom"?null:s==="top"&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(o){const l=s?void 0:a.getRow(i);return ku(e,l)??{rowIndex:i+1,rowPinned:s}}return{rowIndex:i+1,rowPinned:s}}function ku(e,t,o=!1){const{gos:i,rowRenderer:s}=e;if(!t?.sticky||!nu(i))return;const n=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?n:r,c=(o?-1:1)*(a?-1:1);let d;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){d=l[u+c];break}return d?{rowIndex:d.rowNode.rowIndex,rowPinned:null}:void 0}function BC(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:n}=e;return o==="top"?(s?.getPinnedTopRowCount()??0)-1<=i:o==="bottom"?(s?.getPinnedBottomRowCount()??0)-1<=i:n.getLastRow()<=i}function VC(e,t,o){t.addManagedElementListeners(o,{keydown:i=>{if(!i.defaultPrevented&&!UC(i)&&i.key===R.TAB){const s=i.shiftKey;$o(e,o,!1,s)||bi(e,s)&&i.preventDefault()}}})}function NC(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function pt(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function is(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function bi(e,t,o=!1){const i=e.ctrlsSvc.get("gridCtrl"),s=i.focusNextInnerContainer(t);return s===!0?!0:s===!1?s:((o||!t&&!i.isDetailGrid()&&i.isFocusInsideGridBody())&&i.forceFocusOutOfContainer(t),!1)}function WC(e,t){const o=e.focusSvc,i=o.getFocusedCell();if(i&&t&&Na(i,t)){const{rowIndex:s,rowPinned:n,column:r}=t;fa(e)&&o.setFocusedCell({rowIndex:s,column:r,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!Pu()})}}function zC(e,t){const o=e.getFocusableContainerName();return o==="gridBody"?t():Lu(e,()=>To(e.getGui(),".ag-tab-guard").length>0)?o:null}function Lu(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var _C="__ag_Grid_Skip_Focusable_Container";function UC(e){return e[_C]===!0}function lt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Wa(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of o){if(!i)continue;const s=i.getGroupRowCount()||0;for(let n=0;n<s;n++){const r=i.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=$C(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function $C(e,t){let i=e.colModel.isPivotMode()?qC(e):Gu(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>i&&r.isAutoHeaderHeight()&&(i=a)}return i}function za(e){let o=e.colModel.isPivotMode()?KC(e):cs(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>o&&i.isAutoHeaderHeight()&&(o=s)}),o}function cs(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Ou(e){return e.gos.get("floatingFiltersHeight")??cs(e)}function Gu(e){return e.gos.get("groupHeaderHeight")??cs(e)}function KC(e){return e.gos.get("pivotHeaderHeight")??cs(e)}function qC(e){return e.gos.get("pivotGroupHeaderHeight")??Gu(e)}function jC(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function YC(e){return e?.headerRowIndex!=null}var QC=class extends x{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:r}=i;s&&this.createManagedBean(new ls(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>qt(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const o=Wa(e).reduce((r,a)=>r+a,0),i=za(e);e.filterManager?.hasFloatingFilters()&&(t+=Ou(e)),t+=o,t+=i;const s=e.environment.getHeaderRowBorderWidth(),n=t+s;if(this.headerHeightWithBorder!==n){this.headerHeightWithBorder=n;const r=`${n}px`;this.comp.setHeightAndMinHeight(r)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",o)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:r}=s;(n.navigateHorizontally(i,!0,e)||!o&&r.focusOverlay(!1)||bi(s,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case R.LEFT:t="LEFT";case R.RIGHT:{O(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case R.UP:t="UP";case R.DOWN:{O(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(ve(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!o||!i?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===s.getHeaderRowContainerCtrl()?.eViewport)&&i.showHeaderContextMenu(void 0,e,o)}},_a=class extends x{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=Le(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=i+s+n:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?s:n)===0&&o.verticalScrollShowing&&(r+=o.getScrollbarWidth())),this.callback(r)}},Di=class extends x{};function ds(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var Ua=class extends x{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?he(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=O(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),o=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=o,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:o,visibleCols:i}=this.beans;if(!Le(o,"print")||e.getPinned()==="left")return t;const n=i.getColsLeftWidth();if(e.getPinned()==="right"){const r=i.bodyWidth;return n+r+t}return n+t}setLeft(e){if(O(e)&&(this.eCell.style.left=`${e}px`),Fe(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&zp(this.ariaEl,t.length)}}},ZC="ag-column-first",JC="ag-column-last";function Hu(e,t,o,i){return we(e)?[]:ev(e.headerClass,e,t,o,i)}function Bu(e,t,o){e.toggleCss(ZC,o.isColAtEdge(t,"first")),e.toggleCss(JC,o.isColAtEdge(t,"last"))}function XC(e,t,o,i){return K(t,{colDef:e,column:o,columnGroup:i})}function ev(e,t,o,i,s){if(we(e))return[];let n;if(typeof e=="function"){const r=XC(t,o,i,s);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var tv=0,Vu="headerCtrl",$a=class extends x{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+tv++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,o,i,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,o,i,s),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),s=i?.suppressHeaderKeyboardEvent;if(!O(s))return!1;const n=K(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!s(n)}getWrapperHasFocus(){return ve(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let o;if(typeof t=="function"){const i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:s}=this,n=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:f,borderTopWidth:m}=_o(this.eGui),C=h+g+f+m,w=t.offsetHeight+C;if(u<5){const y=!Pe(s)?.contains(t),S=w==0;if(y||S){Pr(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,w)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&c(),!u&&r&&d()},c=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),a=Kt(this.beans,t,()=>n(0))},d=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>d()),i.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),o&&o(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(Bu(e,t,o.visibleCols),Id(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=pt(this.beans);this.eGui&&Qe(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=ve(this.beans),o=e.key===R.LEFT||e.key===R.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&Cu(e)===R.C)return this.beans.clipboardSvc?.copyToClipboard();if(!o)return;const n=e.key===R.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(n)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:o}=this;let i=e.key===R.LEFT!==t.get("enableRtl");const s=o.getPinned(),n=t.get("enableRtl");return s&&n!==(s==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case R.PAGE_DOWN:case R.PAGE_UP:case R.PAGE_HOME:case R.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=Vu,{eGui:o,gos:i}=this;Go(i,o,t,this),e.addDestroyFunc(()=>Go(i,o,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){const i=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&i.preventDefault(),s?.isHeaderContextMenuEnabled(o)&&s.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",o)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:o}=this;e.isColumn?o.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):o.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},ov=class extends $a{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,o,i,s){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=ds(this,c,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:f=>this.setRefreshFunction("measuring",f),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,o,e,this)):me(o,!1),d?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new Ua(r,t,a)),h.createManagedBean(new ls(t,{shouldStopEventPropagation:f=>this.shouldStopEventPropagation(f),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return K(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return _m(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return K(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!o&&(!this.openFilterEnabled||Ze(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,ct(n),!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const o=t.createSelectAllFeature(this.column);o&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(o),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!o&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===R.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===R.ENTER?this.onEnterKeyDown(e):e.key===R.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:o,sortable:i,beans:s}=this;let n=!1;(e.ctrlKey||e.metaKey)&&(n=this.showMenuOnKeyPress(e,!0)),n||(!e.altKey&&ui(o)?s.rangeSvc?.handleColumnSelection(t,e):i&&s.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();return Xl(o)&&o.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),Pu()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),o=Hu(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o);for(const s of o)i.has(s)?i.delete(s):this.comp.toggleCss(s,!0);for(const s of i)this.comp.toggleCss(s,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const o=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",o),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,o=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:o,beans:i}=this,s=Wa(this.beans),n=s.reduce((h,g)=>h+g,0)===0;if(o.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.toggleCss("ag-header-span-height",!1),o.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",r>0);const l=za(i);if(r===0){o.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}o.toggleCss("ag-header-span-total",a);const c=(this.column.getFirstRealParent()?.getLevel()??-1)+1,d=s.length-c;let u=0;for(let h=0;h<d;h++)u+=s[s.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:o,comp:i,sortable:s}=this;if(s){const n=this.getLocaleTextFunc(),r=t.sortSvc?.getDisplaySortForColumn(o)??null;i.setAriaSort(Ap(r)),e=n("ariaSortableColumn","Press ENTER to sort")}else i.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:o}=this;t&&!Ze(o)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaCellSelection(){let e=null;const{gos:t,column:o}=this;ui(t)&&!Ue(o)&&(e=this.getLocaleTextFunc()("ariaColumnCellSelection","Press Enter to toggle selection for all visible cells in this column")),this.setAriaDescriptionProperty("cellSelection",e)}setAriaDescriptionProperty(e,t){const o=this.ariaDescriptionProperties;t!=null?o.set(e,t):o.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:o}=this;if(!t.contains(ve(e)))return;const i=Array.from(o.keys()).sort((s,n)=>s==="filter"?-1:n.charCodeAt(0)-s.charCodeAt(0)).map(s=>o.get(s)).join(". ");e.ariaAnnounce?.announceValue(i,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return Xl(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Xl(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var iv=0,Qn=class extends x{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=iv++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";o==="group"?i="ag-header-row-group":o==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=Le(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,o=!0){this.comp=e,t=ds(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=Le(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Wa(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[s]};e+=t[s]}const o=za(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:o};e+=o;const i=Ou(this.beans);return{topOffset:e,rowHeight:i}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),o=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,o,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const o=i=>{const{focusSvc:s,visibleCols:n}=this.beans;return s.isHeaderWrapperFocused(i)?n.isVisible(i.column):!1};if(e)for(const[i,s]of e)o(s)?this.ctrlsById.set(i,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(o&&(s=o.get(i),o.delete(i)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new ov(e,this));break}t.set(i,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const o=this.allCtrls.find(s=>s.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},sv=class extends x{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:o,ctrlsSvc:i,colModel:s,colMoves:n}=this.beans;this.setupCenterWidth(),o?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(a,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:o,visibleCols:i}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=i.headerGroupRowCount;s=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const f=this.createBean(new Qn(g,this.pinned,"group"));this.groupsRowCtrls.push(f)}}},a=()=>{const u=s++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Qn(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},l=()=>{this.includeFloatingFilter=!!o?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Qn(h,this.pinned,"filter"))},c=this.getAllCtrls();r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=o=>o?.getHeaderCellCtrls().find(i=>i.column===e);if(lo(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;o<this.groupsRowCtrls.length;o++){const i=t(this.groupsRowCtrls[o]);if(i)return i}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,o){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,o):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const o=e?.createBodyDropTarget(this.pinned,t);o&&this.createManagedBean(o)}restoreFocusOnHeader(e,t){if(!t)return;const{column:o}=t;o.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new _a(e=>this.comp.setCenterWidth(`${e}px`),!0))}},Os={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Ka=class extends x{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=t.autoHeight?Os.AUTO_HEIGHT:t.print?Os.PRINT:Os.NORMAL;this.view.updateLayoutClasses(o,t)}},Nu=class extends ye{constructor(e,t){super(),this.direction=t,this.eViewport=W,this.eContainer=W,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Fu()||Mo())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=xu(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),o=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),qt(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;pf(this,()=>vt(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},nv={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},rv=class extends Nu{constructor(){super(nv,"horizontal"),this.eLeftSpacer=W,this.eRightSpacer=W,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new _a(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),Tt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),Tt(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=o?0:i===0&&t?16:i,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Vi(this.getGui(),n),Vi(this.eViewport,n),Vi(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return Us(this.eViewport,this.enableRtl)}setScrollPosition(e){vt(this.eViewport)||this.attemptSettingScrollPosition(e),$s(this.eViewport,e,this.enableRtl)}},Wu=class extends x{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},av={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},lv=class extends Nu{constructor(){super(av,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Wu(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,s=i===0&&o?16:i;this.toggleCss("ag-scrollbar-invisible",o),Tt(this.getGui(),s),Tt(this.eViewport,s),Tt(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),s=o.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!vt(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Yt="Viewport",ec="fakeVScrollComp",Zn=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],tc=100,Jn=150,cv=class extends x{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=xe(this,()=>this.lastScrollSource[1]=null,Jn),this.resetLastVScrollDebounced=xe(this,()=>this.lastScrollSource[0]=null,Jn)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,o=>{this.centerRowsCtrl=o.center,this.fakeVScrollComp=o.fakeVScrollComp,this.fakeHScrollComp=o.fakeHScrollComp,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,Yt)});for(const e of Zn){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.gos.get("debounceVerticalScrollbar"),t=e?xe(this,this.onVScroll.bind(this,Yt),tc):this.onVScroll.bind(this,Yt),o=e?xe(this,this.onVScroll.bind(this,ec),tc):this.onVScroll.bind(this,ec);this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,o)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Zn,Yt]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);$s(o,e,this.enableRtl)}}getViewportForSource(e){return e===Yt?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;const i=Us(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;const t=e===Yt?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition();let o=t;if(this.shouldBlockScrollUpdate(0,o,!0))return;e===Yt?this.fakeVScrollComp.setScrollPosition(o):(this.eBodyViewport.scrollTop=t,o=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),o!==t&&this.fakeVScrollComp.setScrollPosition(o,!0));const{animationFrameSvc:i}=this;i?.setScrollTop(o),this.nextScrollTop=o,i?.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.fakeHScrollComp.getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Jn)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!Mo()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=ba(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:o}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>o}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const o of Zn)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Yt)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),$s(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){const{rowModel:o}=this.beans,i=o.getRowCount();let s=-1;for(let n=0;n<i;n++){const r=o.getRow(n);if(typeof e=="function"){if(r&&e(r)){s=n;break}}else if(e===r||e===r.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,o=0){if(Le(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){D(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{const c=this.ctrlsSvc.getGridBodyCtrl(),d=i.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:f,stickyBottomHeight:m}=c,C=d.rowTop,v=d.rowHeight,w=r.getPixelOffset(),b=d.rowTop-w,y=b+d.rowHeight,S=this.getVScrollPosition(),F=a.divStretchOffset,E=S.top+F,M=S.bottom+F,T=M-E,G=a.getScrollPositionForPixel(b),P=a.getScrollPositionForPixel(y-T),I=Math.min((G+P)/2,b),A=E+f>b,J=M-m<y;let k=null;t==="top"?k=G-f:t==="bottom"?k=P+m:t==="middle"?k=I:A?k=G-f:J&&(P-G>T?k=G-f:k=P+m),k!==null&&(this.setVerticalScrollPosition(k),l.redraw({afterScroll:!0})),u=C!==d.rowTop||v!==d.rowHeight,h=f!==c.stickyTopHeight||m!==c.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),o<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const f=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const m=this.getVScrollPosition().top;f!==m&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:o,frameworkOverrides:i}=this.beans,s=o.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);i.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?o:i)||s,l=r?i:o;t!=="auto"&&(a=t==="start",l=t==="end");const c=t==="middle";if(a||l||c){const{colLeft:d,colMiddle:u,colRight:h}=this.getColumnBounds(e);return c?u-n/2:a?r?h:d:r?d-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:o}=this.getViewportBounds(),{colLeft:i,colRight:s}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>s:o<s,a=n?o<i:t>i;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,r=t?o-s:s,a=r+i*n,l=r+i/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},oc={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function dv(e,t,o=La()||0,i,s){return zu(e,t,"horizontal",o,i,s)}function uv(e,t,o=La()||0,i,s){return zu(e,t,"vertical",o,i,s)}function zu(e,t,o,i,s,n){const r=oc[o],a=oc[r.opposite],l=s?vt(s):!0,c=n?vt(n):!0,d=r.overflow(e);if(d<=0)return!1;if(!t||i===0)return!0;const u=a.overflow(t);if(u<=0)return!0;if(d<=i){if(l&&c&&hv({candidateOverflow:u,candidateScrollSize:a.scrollSize(t),candidateClientSize:a.clientSize(t),scrollbarWidth:i}))return!1;const h=r.clientSize(e)+i;return r.scrollSize(e)<=h}return!0}function hv({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:o,scrollbarWidth:i}){if(e<=0||e>i)return!1;const s=o+i;return t>o&&t<=s}var gv=class extends x{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{qt(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=ba(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const{centerContainerCtrl:e,beans:t}=this,o=e.getCenterWidth(),i=e.getViewportScrollLeft();t.colViewport.setScrollPosition(o,i)}};function _u(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function Gs(e,t,o,i){const s=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return Uu(e,t,o,i,s)}function pv(e,t,o,i){const s=t?.suppressMouseEventHandling;return Uu(e,void 0,o,i,s)}function Uu(e,t,o,i,s){return s?s(K(e,{column:t,node:o,event:i})):!1}function $u(e,t,o){let i=t;for(;i;){const s=su(e,i,o);if(s)return s;i=i.parentElement}return null}var rn="cellCtrl";function qa(e,t){return $u(e,t,rn)}var an="renderedRow";function fv(e,t){return $u(e,t,an)}function Nr(e,t,o,i,s){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=K(e,{event:t,editing:s,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(n&&n(r))}function mv(e){const{pinnedRowModel:t,rowModel:o,rangeSvc:i,visibleCols:s}=e;if(!i||s.allCols.length===0)return;const n=t?.isEmpty("top")??!0,r=t?.isEmpty("bottom")??!0,a=n?null:"top";let l,c;r?(l=null,c=o.getRowCount()-1):(l="bottom",c=t?.getPinnedBottomRowCount()??-1),i.setCellRange({rowStartIndex:0,rowStartPinned:a,rowEndIndex:c,rowEndPinned:l})}var Cv=class extends x{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";qs("pointerdown")?e="pointerdown":qs("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const o of t){const i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})}}processMouseEvent(e,t){if(!Xi(this.beans,t)||zt(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o?.column&&o.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:qa(t,e),rowCtrl:fv(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){const i=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!Nr(this.gos,o,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&this.beans.navigation?.handlePageScrollingKey(o)||e.onKeyDown(o),this.doGridOperations(o,i),_u(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:i}=e,{focusSvc:s,navigation:n}=this.beans,a=s.getFocusedCell()?.column;if(!Nr(this.gos,o,i,a,!1)){const c=o.key;if(t==="keydown")switch(c){case R.PAGE_HOME:case R.PAGE_END:case R.PAGE_UP:case R.PAGE_DOWN:n?.handlePageScrollingKey(o,!0);break;case R.LEFT:case R.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case R.UP:case R.DOWN:e.onKeyboardNavigate(o);break;case R.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!Xi(this.beans,e))return;const o=Cu(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(o===R.A)return this.onCtrlAndA(e);if(o===R.C)return this.onCtrlAndC(i,e);if(o===R.D)return this.onCtrlAndD(i,e);if(o===R.V)return this.onCtrlAndV(i,e);if(o===R.X)return this.onCtrlAndX(i,e);if(o===R.Y)return this.onCtrlAndY(s);if(o===R.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:s}=this;o&&ao(s)&&!_f(s)&&t.isRowsToRender()?mv(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:du(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},ms=e=>e.topRowCtrls,Cs=e=>e.getStickyTopRowCtrls(),vs=e=>e.getStickyBottomRowCtrls(),ws=e=>e.bottomRowCtrls,bs=e=>e.allRowCtrls,Xn=e=>e.getCtrls("top"),er=e=>e.getCtrls("center"),tr=e=>e.getCtrls("bottom"),vv={center:{type:"center",name:"center-cols",getRowCtrls:bs,getSpannedRowCtrls:er},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:bs,getSpannedRowCtrls:er},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:bs,getSpannedRowCtrls:er},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:bs},topCenter:{type:"center",name:"floating-top",getRowCtrls:ms,getSpannedRowCtrls:Xn},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:ms,getSpannedRowCtrls:Xn},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:ms,getSpannedRowCtrls:Xn},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:ms},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Cs},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Cs},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Cs},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Cs},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:vs},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:vs},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:vs},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:vs},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:ws,getSpannedRowCtrls:tr},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:ws,getSpannedRowCtrls:tr},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:ws,getSpannedRowCtrls:tr},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:ws}};function Ku(e){return`ag-${us(e).name}-viewport`}function qu(e){const t=us(e);return t.container??`ag-${t.name}-container`}function wv(e){return`ag-${us(e).name}-spanned-cells-container`}function us(e){return vv[e]}var bv=["topCenter","topLeft","topRight"],Sv=["bottomCenter","bottomLeft","bottomRight"],yv=["center","left","right"],Rv=["center","left","right","fullWidth"],Fv=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Ev=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],xv=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],ju=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Yu=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Pv=[...ju,"stickyTopFullWidth",...Yu,"stickyBottomFullWidth"],Dv=[...bv,...Sv,...yv,...ju,...Yu],Mv=class extends x{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=us(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new gv(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new Cv(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(Ev,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(xv,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(Rv,()=>this.createManagedBean(new Wu(this.eContainer,this.name==="center"?i:void 0))),n&&this.forContainers(Dv,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(Fv,()=>this.createManagedBean(new _a(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(Pv.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),i=Le(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,o,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Zi(this.eViewport)}getCenterViewportScrollLeft(){return Us(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Kt(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Gd(this.eViewport)}getViewportScrollLeft(){return Us(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:o}=this,i=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:s}=e,n=s.getGridBodyCtrl()?.eBodyViewport,r=s.get("fakeHScrollComp")?.getGui(),a=s.get("fakeVScrollComp")?.getGui();return i||dv(o,n,void 0,r,a)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){$s(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const o=Le(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||o,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!s&&a:s||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},Tv="ag-force-vertical-scroll",Iv="ag-selectable",Av="ag-column-moving",kv=class extends x{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,i,s,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=o.querySelector(`.${Ku("center")}`),this.eFullWidthContainer=o.querySelector(`.${qu("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new Ka(this.comp)),this.scrollFeature=this.createManagedBean(new cv(o)),this.beans.rowDragSvc?.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,s,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),o=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:o,rowResizeEnded:o}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const o=t&&e.getScrollbarWidth()||0,i=xu()?16:0,s=`calc(100% + ${o+i}px)`;qt(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:o}=this;let i=o.get("treeData");if(!i){const s=t.isPivotMode();i=(e?e.columns.length:0)>=(s?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:o=>{const{target:i}=o,s=Eo(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:o=>{const{target:i,relatedTarget:s}=o,n=t.contains(s),r=Eo(s,"ag-root",t);Eo(i,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Av,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Iv,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const{gos:e,comp:t,ctrlsSvc:o}=this,i=e.get("alwaysShowVerticalScroll"),s=i?Tv:null,n=Le(e,"normal");t.setAlwaysVerticalScrollClass(s,i);const r=o.get("center")?.eViewport,a=o.get("fakeHScrollComp")?.getGui(),l=o.get("fakeVScrollComp")?.getGui();return i||n&&uv(this.eBodyViewport,r,void 0,l,a)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const i=()=>{const s=o&&ci(this.gos)&&!e.stretching,n=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,s)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({stylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const d of[t,o,i,s])this.addManagedElementListeners(d,{wheel:l});const c=this.onHorizontalWheel.bind(this);for(const d of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(d).eContainer,{wheel:c});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&Xi(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,o=e?.getPinnedTopTotalHeight(),i=e?.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=s-n,a=o?r+o:0,l=i?r+i:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),o=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+n;o.setStickyBottomBottom(`${r}px`)}};function st(e){return Lo(e)}var pi={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Qu=class extends qe{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:o,eTopGuard:i,eBottomGuard:s,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:a,focusInnerElement:l,onFocusIn:c,onFocusOut:d,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:g,isEmpty:f,eFocusableElement:m}=e;this.comp=o,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=l,this.eFocusableElement=m,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!a,this.providedFocusIn=c,this.providedFocusOut=d,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=g,this.providedIsEmpty=f}postConstruct(){this.createManagedBean(new Mu(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():To(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=Pe(this.beans),o=To(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let s,n;e?(s=0,n=i):(s=i+1,n=o.length);const r=o.slice(s,n),a=this.gos.get("tabIndex");r.sort((l,c)=>{const d=Number.parseInt(l.getAttribute("tabindex")||"0"),u=Number.parseInt(c.getAttribute("tabindex")||"0");return u===a?1:d===a?-1:d===0?1:u===0?-1:d-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=To(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return $o(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},Lv=class extends qe{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:o,eFocusableElement:i,stopPropagationCallbacks:s}=this,n=[t,o],r={setTabIndex:v=>{for(const w of n)v==null?w.removeAttribute("tabindex"):w.setAttribute("tabindex",v)}};this.addTabGuards(t,o);const{focusTrapActive:a=!1,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:C}=e;this.tabGuardCtrl=this.createManagedBean(new Qu({comp:r,focusTrapActive:a,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:C},s))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Pe(this.beans).createElement("div"),o=e==="top"?pi.TAB_GUARD_TOP:pi.TAB_GUARD_BOTTOM;return t.classList.add(pi.TAB_GUARD,o),ko(t,"presentation"),t}addTabGuards(e,t){const o=this.eFocusableElement;o.prepend(e),o.append(t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Xe(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){Ra(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.before(t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;_t(e),_t(t),super.destroy()}},Ov=class extends Pi{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new Lv(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Gv=class extends Ov{initialiseTabGuard(t){super.initialiseTabGuard(t,Oa)}},ic=(e,t)=>Lu(e,()=>Ho(e.getGui(),t,!1,!0)),sc=e=>e?.getFocusableContainerName()??"external",Hv=e=>e==null?"external":typeof e=="string"?e:"gridBody",Bv=class extends x{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,o){this.view=e,this.eGridHostDiv=t,this.eGui=o,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:i,ctrlsSvc:s}=this.beans;i?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Ka(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Kt(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){return Du(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;e===!1?t.setCursor(null):t.setCursor(e===1?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e),s=o===-1?e?t.length-1:0:i,{gos:n,beans:{focusSvc:r,navigation:a}}=this,l=n.getCallback("tabToNextGridContainer");if(l){const c=r.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:s}),d=sc(t[s]),u=c==null&&d==="gridBody"?"gridBody":Hv(c),h=l({backwards:e,previousContainer:sc(t[o]),nextContainer:u,defaultTarget:c});if(h!==void 0){if(typeof h=="boolean")return h;if(typeof h=="string"){if(h==="gridBody")return this.focusGridBodyDefault(e)||void 0;const g=t.find(f=>f.getFocusableContainerName()===h);if(!g){$d(`tabToNextGridContainer - ${h} container not found`);return}return ic(g,e)?!0:void 0}return YC(h)?r.focusHeaderPosition({headerPosition:h})||void 0:(a?.ensureCellVisible(h),r.setFocusedCell({...h,forceBrowserFocus:!0}),r.isCellFocused(h)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:o,nextIndex:s})||void 0}focusInnerElement(e){const{gos:t,beans:o,beans:{focusSvc:i,visibleCols:s}}=this;if(t.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const r=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:r,indexWithFocus:r.length,nextIndex:r.length-1})?!0:i.focusGridView({column:he(s.allCols),backwards:!0});const a=s.allCols;if(t.get("headerHeight")===0||pt(o)){if(i.focusGridView({column:a[0],backwards:e}))return!0;for(let l=1;l<r.length;l++)if(Ho(r[l].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}isFocusInsideGridBody(){const e=this.getFocusableContainers(),{indexWithFocus:t}=this.getNextFocusableIndex(e);return e[t]?.getFocusableContainerName()==="gridBody"}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:o,nextIndex:i})||this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!is(e)||!pt(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const o=ve(this.beans),i=e.findIndex(s=>s.getGui().contains(o));return{indexWithFocus:i,nextIndex:i+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:o,beans:{focusSvc:i,visibleCols:{allCols:s}}}=this;return e?i.focusGridView({column:he(s),backwards:!0}):t.get("headerHeight")===0||pt(o)?i.focusGridView({column:s[0]}):i.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:o,indexWithFocus:i}=e,s=t?-1:1;for(let n=e.nextIndex;n>=0&&n<o.length;n+=s){const r=o[n];if(r.getFocusableContainerName()==="gridBody"&&(i===-1||(t?i>n:i<n))){if(this.focusGridBodyDefault(t))return!0;continue}if(ic(r,t))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Y=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},nc={dispatchEvent:"CommunityCore",...Y("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...Y("GridState",{getState:0,setState:0}),...Y("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...Y("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...Y("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...Y("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...Y("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...Y("ValueCache",{expireValueCache:0}),...Y("CellApi",{getCellValue:0}),...Y("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...Y("Sort",{onSortChanged:0}),...Y("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...Y("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...Y("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...Y("HighlightChanges",{flashCells:0}),...Y("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...Y("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...Y("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...Y("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...Y("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...Y("ColumnResize",{setColumnWidths:0}),...Y("ColumnHover",{isColumnHovered:0}),...Y("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...Y("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...Y("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...Y("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...Y("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...Y("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...Y("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...Y("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...Y("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...Y("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...Y("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...Y("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...Y("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...Y("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...Y("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...Y("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...Y("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...Y("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...Y("ContextMenu",{showContextMenu:0}),...Y("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...Y("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...Y("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...Y("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...Y("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...Y("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...Y("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...Y("StatusBar",{getStatusPanel:0}),...Y("AiToolkit",{getStructuredSchema:0})},or={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Vv=(e,t)=>e.eventSvc.dispatchEvent(t),Zu=class{};Reflect.defineProperty(Zu,"name",{value:"GridApi"});var Nv=class extends x{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Zu,this.fns={...or,dispatchEvent:Vv},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(nc))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:o,beans:i}=this;o!==or&&(o[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:i}=this;if(!t)D(26,{fnName:e,preDestroyLink:i});else{const s=nc[e];o.assertModuleRegistered(s,`api.${e}`)&&D(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=or,this.beans=null}};function Ju(e){return e.context.getId()}function Wv(e){e.gridDestroySvc.destroy()}function zv(e){return e.gridDestroySvc.destroyCalled}function _v(e,t){return e.gos.get(t)}function Uv(e,t,o){Xu(e,{[t]:o})}function Xu(e,t){e.gos.updateGridOptions({options:t})}function $v(e,t){const o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}function Kv(e,t,o){const i=Je(e,t,o);if(i){const{className:n}=i;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return i}const s=st({tag:"span"});return s.appendChild(i),s}function Je(e,t,o){let i=null;e==="smallDown"?D(262):e==="smallLeft"?D(263):e==="smallRight"&&D(264);const s=o?.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const n=t.gos.get("icons");n&&(i=n[e])}if(i){let n;if(typeof i=="function")n=i();else if(typeof i=="string")n=i;else{D(38,{iconName:e});return}if(typeof n=="string")return Sa(n);if(Ra(n))return n;D(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),st({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var qv={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},jv=class extends ye{constructor(e,t,o){super(qv),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(Je("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:o,eCell:i,gos:s}=this,n=o.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),n){const a=K(s,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},Yv=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",Qv={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},Zv=class extends ye{constructor(){super(),this.dragSource=null,this.eIcon=W,this.eLabel=W,this.eGhost=W,this.registerCSS(Yv)}postConstruct(){const e=t=>Kv(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(Qv),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:o,eIcon:i,dragSource:s,dropIconMap:n,gos:r}=this;Xe(i);let a=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),a=n[e],o.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(a===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&i.appendChild(a)}setLabel(e){this.eLabel.textContent=e}};function Jv(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function Xv(e,t){const o=e.dragAndDrop?.findExternalZone(t.getContainer());o&&e.dragAndDrop?.removeDropTarget(o)}function ew(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function tw(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function ow(e,t){const o=e.rowDropHighlightSvc;if(!o)return;const i=t?.row;let s=t?.dropIndicatorPosition;s!=="above"&&s!=="below"&&s!=="inside"&&(s="none");const n=i?.rowIndex;n==null||s==="none"?o.clear():o.set(i,s)}var eh=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},iw=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const o=t.pointerId;if(!eh(e,o))return null;const i={eElement:e,pointerId:o,onLost(s){nw(i,s)}};return e.addEventListener("lostpointercapture",i.onLost),i},sw=e=>{if(!e)return;th(e);const{eElement:t,pointerId:o}=e;if(t){try{t.releasePointerCapture(o)}catch{}e.eElement=null}},th=e=>{const{eElement:t,onLost:o}=e;t&&o&&(t.removeEventListener("lostpointercapture",o),e.onLost=null)},nw=(e,t)=>{th(e);const{eElement:o,pointerId:i}=e;o&&t.pointerId===i&&eh(o,i)},qo,ti,ir={passive:!0},Qt={passive:!1},Rt=e=>{if(!ti)ti=new WeakSet;else if(ti.has(e))return!1;return ti.add(e),!0},rw=class extends qe{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!qo?.has(gt(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)rc(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let o=0,i=t.length;o<i;++o){const s=t[o];if(s.params===e){t.splice(o,1),rc(s);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:o}=e,i=[];let s;if(o){const c=t.style;c&&(s=c.touchAction,c.touchAction="none")}const n={handlers:i,params:e,oldTouchAction:s};this.dragSources.push(n),Ds(i,[t,"pointerdown",c=>this.onPointerDown(e,c),Qt],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");o&&!l&&Ds(i,[t,"touchstart",d=>this.onTouchStart(e,d),Qt])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&Xi(this.beans,e)&&!Bi(nr(e))}initDrag(e,...t){this.drag=e;const o=this.beans,i=a=>this.onScroll(a),s=a=>this.onKeyDown(a),n=gt(o),r=Pe(o);Ds(e.handlers,[n,"contextmenu",to],[n,"keydown",s],[r,"scroll",i,{capture:!0}],[r.defaultView||window,"scroll",i],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;qo?.get(t)===e&&qo.delete(t),this.drag=null,sw(e.pointerCapture),Fa(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const o=this.beans;if(ti?.has(t))return;const i=t.pointerType;if(i==="touch"&&(o.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Bi(nr(t))))||!t.isPrimary||i==="mouse"&&t.button!==0)return;this.destroyDrag();const s=gt(o),n=e.eElement,r=t.pointerId,a=new sr(s,e,t,r);qo??(qo=new WeakMap),qo.set(s,a);const l=h=>{h.pointerId===r&&this.onMouseOrPointerMove(h)},c=h=>{h.pointerId===r&&this.onMouseOrPointerUp(h)},d=h=>{h.pointerId===r&&Rt(h)&&this.cancelDrag()},u=h=>this.draggingPreventDefault(h);this.initDrag(a,[s,"pointerup",c],[s,"pointercancel",d],[s,"pointermove",l,Qt],[s,"touchmove",u,Qt],[n,"mousemove",u,Qt]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Rt(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Rt(t)||Bi(nr(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&to(t);return}this.destroyDrag();const i=this.beans,s=gt(i),n=new sr(s,e,t.touches[0]),r=h=>this.onTouchMove(h),a=h=>this.onTouchUp(h),l=h=>this.onTouchCancel(h),c=h=>this.draggingPreventDefault(h),d=gt(i),u=t.target??e.eElement;this.initDrag(n,[u,"touchmove",r,ir],[u,"touchend",a,ir],[u,"touchcancel",l,ir],[d,"touchmove",c,Qt],[d,"touchend",a,Qt],[d,"touchcancel",l,Qt]),e.dragStartPixels===0&&this.onMove(n.start)}draggingPreventDefault(e){this.dragging&&to(e)}onMouseDown(e,t){if(t.button!==0||ti?.has(t)||this.isPointer())return;const o=this.beans;this.destroyDrag();const i=new sr(gt(o),e,t),s=a=>this.onMouseOrPointerMove(a),n=a=>this.onMouseOrPointerUp(a),r=gt(o);this.initDrag(i,[r,"mousemove",s],[r,"mouseup",n]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Rt(t)}onScroll(e){if(!Rt(e))return;const t=this.drag,o=t?.lastDrag;o&&this.dragging&&t.params?.onDragging?.(o)}onMouseOrPointerMove(e){Rt(e)&&(po()&&Pe(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&to(e),this.onMove(e))}onTouchCancel(e){const t=this.drag;!t||!Rt(e)||ri(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!Rt(e))return;const o=ri(t.start,e.touches);o&&(this.onMove(o),this.draggingPreventDefault(e))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const o=t.params;if(!this.dragging){const i=t.start,n=o.dragStartPixels??4;if(Vd(e,i,n)||(this.dragging=!0,o.capturePointer&&(t.pointerCapture=iw(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:o.eElement}),o.onDragStart?.(i),this.drag!==t)||(o.onDragging?.(i),this.drag!==t))return}o.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&Rt(e)&&this.onUp(ri(t.start,e.changedTouches))}onMouseOrPointerUp(e){Rt(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop?.(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===R.ESCAPE&&this.cancelDrag()}},rc=e=>{Fa(e.handlers);const t=e.oldTouchAction;if(t!=null){const o=e.params.eElement.style;o&&(o.touchAction=t)}},sr=class{constructor(e,t,o,i=null){this.rootEl=e,this.params=t,this.start=o,this.pointerId=i,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},nr=e=>{const t=e.target;return t instanceof Element?t:null},aw=class extends rw{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},lw=class extends x{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},cw={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Ss={skipAriaHidden:!0},dw=class extends ye{constructor(e,t,o,i,s,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=o,this.customGui=i,this.dragStartPixels=s,this.alwaysVisible=n,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(cw),this.getGui().appendChild(Je("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,o=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:o}),this.addManagedListeners(t,{dataChanged:o,cellChanged:o}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:o}=this,{gos:i,dragAndDrop:s,rowDragSvc:n}=e,r=n?.visibility;let l=!(r==="suppress"||r==="hidden"&&!s?.hasExternalDropZones()),c=l;if(l&&!this.isCustomGui()&&t){const d=t.getColDef().rowDrag;if(d===!1)l=!1;else{const u=typeof d=="function";c=t.isRowDrag(o),l=u||c}}l&&c&&o.footer&&i.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Ss),c||this.setVisible(c,Ss),this.setDisabled(!c||r==="disabled"&&!s?.hasExternalDropZones()),l&&this.setDisplayed(l,Ss),c&&this.setVisible(c,Ss)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const o=this.beans.selectionSvc?.getSelectedNodes()??[];return o.indexOf(e)!==-1?o:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const i=qs("pointerdown")?{pointerdown:to}:{mousedown:to};this.mouseDownListener=this.addManagedElementListeners(t,i)[0]}const o=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:i=>this.getDragItemName(i,o),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const o=e?.dragItem||this.getDragItem(),i=(e?.dropTarget?.rows.length??o.rowNodes?.length)||1,s=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(s)return s(o,i);if(i!==1)return`${i} ${t("rowDragRows","rows")}`;const n=this.cellValueFn();return n||`1 ${t("rowDragRow","rows")}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},uw=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=e.scrollByTick??20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const o=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),i=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(o&&i)return;const s=this.scrollContainer.getBoundingClientRect(),n=this.scrollByTick;this.tickLeft=!i&&e.clientX<s.left+n,this.tickRight=!i&&e.clientX>s.right-n,this.tickUp=!o&&e.clientY<s.top+n,this.tickDown=!o&&e.clientY>s.bottom-n,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Hs=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},ln=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const o=t[0];if(o.sourceRowIndex>=0)return o;t=o.childrenAfterGroup}},hw=(e,t,o,i)=>{if(!t.size||!e)return!1;let s=!1;const n=e.length??0;let r=-1;o&&(r=o.sourceRowIndex,o=r<0?ln(o):null,o&&(r=o.sourceRowIndex)),r<0||r>=n?r=n:i||++r;let a=r,l=Math.min(r,n-1);for(const u of t){const h=u.sourceRowIndex;h<a&&(a=h),h>l&&(l=h)}let c=a;for(let u=a;u<r;++u){const h=e[u];t.has(h)||(h.sourceRowIndex!==c&&(h.sourceRowIndex=c,e[c]=h,s=!0),++c)}let d=l;for(let u=l;u>=r;--u){const h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,s=!0),--d)}for(const u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,s=!0),++c;return s};function gw(e,t){return qa(e,t.target)?.getFocusedCellPosition()??null}function ac(e,t){const o=Le(e.gos,"normal"),i=t;let s,n;i.clientX!=null||i.clientY!=null?(s=i.clientX,n=i.clientY):(s=i.x,n=i.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,o){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();s+=c.left,n+=l.top}return{x:s,y:n}}var pw=.25,fw=class extends x{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const o=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,i=new uw({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:o,setVerticalPosition:s=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(s),onScrollCallback:()=>{const s=o();if(this.autoScrollOldV!==s){this.autoScrollOldV=s,this.autoScrollChanging=!0;return}const n=this.autoScrollChanging;this.autoScrollChanged=n,this.autoScrollChanging=!1,n&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=i,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const o=this.beans.selectionSvc?.getSelectedNodes();if(o&&o.indexOf(t)>=0)return o.slice().sort(mw)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:o,beans:i}=this;if(t){const a=this.getRowNodes(e);e.dragItem.rowNodes=a,cc(a,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,n=this.makeRowsDrop(o,e,s,!1);i.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const r=this.autoScroll;n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!s&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(n),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,o,i){const{beans:s,gos:n}=this,r=this.newRowsDrop(t,i),a=s.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:c,source:d,target:u}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const h=this.beans.groupEditSvc,g=!!h?.canSetParent(r);let f=null;if(u?.footer){const C=Hr(a,-1,u)??Hr(a,1,u);g&&(f=u.sibling??c),u=C??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=d!==u);let m=.5;if(u&&(l&&r.moved&&(f||!g)?m=d.rowIndex>u.rowIndex?-.5:.5:m=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&l&&u&&r.moved&&Se(n)){const C=Cw(a,r);C&&(m=d.rowIndex>C.rowIndex?-.5:.5,u=C,r.moved&&(r.moved=d!==u))}return r.target=u,r.newParent=f,r.pointerPos=vw(u,r.y),r.yDelta=m,h?.fixRowsDrop(r,g,o,m),this.validateRowsDrop(r,g,i),t.changed||(t.changed=lc(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:o,gos:i}=this,s=o.rowModel.rootNode,n=Se(i)?i.get("rowDragManaged"):!1,r=i.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!s)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!c.length||o.rowDragSvc.visibility!=="visible"||(r||!a)&&!d)&&(u=!1);const h=ac(o,e).y,g=this.getOverNode(h);return{api:o.gridApi,context:o.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:d,treeData:!1,rootNode:s,moved:l!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:l,target:g??null,newParent:null,rows:c,allowed:u,highlight:!t&&n&&r&&(d||!a),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,o){const{source:i,target:s,yDelta:n,inside:r,moved:a,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=i!==s);const{position:d,fallbackPosition:u}=this.computeDropPosition(a,r,n);e.position=d,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,c,"initial");const h=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,o,l,h),l&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,c,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,o){const i=o<0?"above":"below";return e?{position:t?"inside":i,fallbackPosition:i}:{position:"none",fallbackPosition:i}}enforceSuppressMoveWhenRowDragging(e,t,o){if(t){if(o==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,o,i,s){this.beans.groupEditSvc?.clearNewSameParent(e,t);const n=s(e);if(!n){e.allowed=!1;return}if(typeof n!="object")return;n.rows!==void 0&&(e.rows=n.rows??[]),t&&n.newParent!==void 0&&(e.newParent=n.newParent),n.target!==void 0&&(e.target=n.target),n.position&&(e.position=n.position),n.allowed!==void 0?e.allowed=n.allowed:i||(e.allowed=!0);const r=e.draggingEvent;n.changed&&r&&(r.changed=!0),!o&&n.highlight!==void 0&&(e.highlight=n.highlight)}addRowDropZone(e){if(!e.getContainer()){D(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){D(56);return}const o=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(s=>e.onDragEnter(this.rowDragEvent("rowDragEnter",s))),onDragLeave:e.onDragLeave&&(s=>e.onDragLeave(this.rowDragEvent("rowDragLeave",s))),onDragging:e.onDragging&&(s=>e.onDragging(this.rowDragEvent("rowDragMove",s))),onDragStop:e.onDragStop&&(s=>e.onDragStop(this.rowDragEvent("rowDragEnd",s))),onDragCancel:e.onDragCancel&&(s=>e.onDragCancel(this.rowDragEvent("rowDragCancel",s)))},i={isInterestedIn:s=>s===2,getIconName:()=>"move",external:!0,...o};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:o=>{this.onDragEnter(o),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",o))},onDragLeave:o=>{this.onDragLeave(o),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",o))},onDragging:o=>{this.onDragging(o),e?.onDragging?.(this.rowDragEvent("rowDragMove",o))},onDragStop:o=>{this.onDragStop(o),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",o))},onDragCancel:o=>{this.onDragCancel(o),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",o))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:o}=this.beans,s=e>t.getCurrentPagePixelRange().pageLastPixel?-1:o.getRowIndexAtPixel(e);return s>=0?o.getRow(s):void 0}rowDragEvent(e,t){const o=this.beans,{dragItem:i,dropTarget:s,event:n,vDirection:r}=t,a=s?.rootNode===o.rowModel.rootNode,l=a?s.y:ac(o,t).y,c=a?s.overNode:this.getOverNode(l),d=a?s.overIndex:c?.rowIndex??-1;return{api:o.gridApi,context:o.gridOptions.context,type:e,event:n,node:i.rowNode,nodes:i.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:s}}dispatchGridEvent(e,t){const o=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(o)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,o=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),o?.allowed&&o.rowDragManaged&&(!t?.droppedManaged||lc(t,o))&&this.dropRows(o),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),cc(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:o}){const i=vi(this.gos),s=this.beans.rowModel,n=o.filter(({data:a,rowPinned:l})=>!s.getRowNode(i?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(n.length===0)return!1;let r;if(t){const a=t.sourceRowIndex>=0?t:ln(t);a&&(r=a.sourceRowIndex+(e==="above"?0:1))}return s.updateRowData({add:n,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:o,sameGrid:i}=e;let s;for(let n=0,r=o.length;n<r;++n){let a=!0;const l=o[n];(!l||l.footer||i&&l.destroyed&&!l.group||!this.csrmGetLeaf(l))&&(a=!1),a&&t&&!t.canDropRow(l,e)&&(a=!1),a?s?.push(l):s??(s=o.slice(0,n))}return s??o}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:o,newParent:i,rootNode:s}){let n=!1;const r=new Set;for(const h of o){i&&h.parent!==i&&(h.treeParent=i,n=!0);const g=this.csrmGetLeaf(h);g&&r.add(g)}if(!n&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&ei(this.beans,l);if(r.size&&hw(s._leafs,r,t,e==="above")&&(n=!0),!n)return!1;const d=this.beans.rowModel,u=new Hs;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):ln(e)}},lc=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!ho(e.rows,t.rows)),mw=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,cc=(e,t)=>{for(let o=0,i=e?.length||0;o<i;++o){const s=e[o];s.dragging!==t&&(s.dragging=t,s.dispatchRowEvent("draggingChanged"))}},Cw=(e,t)=>{let o=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;const s=t.source;if(!i||!s)return null;let n=i.rowIndex-s.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const l=Hr(e,r,i);if(!l)break;a.has(l)||(o=l,--n),i=l}while(n>0);return o},vw=(e,t)=>{const o=e?.rowTop,i=e?.rowHeight??0;if(o==null||!i||i<=0)return"none";const s=t-o,n=i*pw;return s<=n?"above":s>=i-n?"below":"inside"},ww=class extends x{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const o=t.createManagedBean(new fw(e)),i=this.beans.dragAndDrop;i.addDropTarget(o),t.addDestroyFunc(()=>i.removeDropTarget(o)),this.rowDragFeature=o;const s=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],s),this.addManagedEventListeners({newColumnsLoaded:s,columnRowGroupChanged:s,columnPivotModeChanged:s,sortChanged:s,filterChanged:s}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,o,i,s,n){return new dw(e,t,o,i,s,n)}createRowDragCompForRow(e,t){if(ao(this.gos))return;const o=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${o("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,o,i,s,n){const r=this.gos;return r.get("rowDragManaged")&&(!Se(r)||r.get("pagination"))?void 0:this.createRowDragComp(o,e,t,i,s,n)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const i=e.colModel.isPivotMode();return(i||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":i||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},bw=class extends x{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const o=e!==this.row,i=e.uiLevel,s=t!==this.position,n=i!==this.uiLevel;this.dragging=!1,(o||s||n)&&(o&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:o,target:i,position:s}=t;if(o&&i&&s!=="none"){this.set(i,s),this.dragging=!0;return}}this.dragging&&this.clear()}},oh={moduleName:"Drag",version:L,beans:[aw]},Sw={moduleName:"DragAndDrop",version:L,dynamicBeans:{dndSourceComp:jv},icons:{rowDrag:"grip"}},ih={moduleName:"SharedDragAndDrop",version:L,beans:[tC],dependsOn:[oh],userComponents:{agDragAndDropImage:Zv},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},yw={moduleName:"RowDrag",version:L,beans:[bw,ww],apiFunctions:{addRowDropZone:Jv,removeRowDropZone:Xv,getRowDropZoneParams:ew,getRowDropPositionIndicator:tw,setRowDropPositionIndicator:ow},dependsOn:[ih]},Rw={moduleName:"HorizontalResize",version:L,beans:[lw],dependsOn:[oh]},Fw=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",Ew=class extends x{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}const s=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(o)},0),window.setTimeout(()=>{t(),s(i)},200)})}};function xw(e,t,o){e.colMoves?.moveColumnByIndex(t,o,"api")}function Pw(e,t,o){e.colMoves?.moveColumns(t,o,"api")}var Dw=class extends x{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const o of t)o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?this.columnsToAggregate.push(o):o.isAllowRowGroup()?this.columnsToGroup.push(o):o.isAllowPivot()&&this.columnsToPivot.push(o)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function Mw(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,s)=>{const n=e.indexOf(i),r=e.indexOf(s);return n-r})}function Tw(e){const t=[...e];for(const o of e){let i=null,s=o.getParent();for(;s!=null&&s.getDisplayedLeafColumns().length===1;)i=s,s=s.getParent();if(i!=null){const r=!!i.getColGroupDef()?.marryChildren?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function Iw(e,t,o,i){const s=i.allCols;let n=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],c=o.getProposedColumnOrder(t,l);if(!o.doesOrderPassRules(c))continue;const d=c.filter(h=>s.includes(h));if(r===null)r=d;else if(!ho(d,r))break;const u=kw(c);(n===null||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}function sh(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:s,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=Tw(u));const h=u.slice();Mw(l.getCols(),h);const g=Ow({movingCols:h,draggingRight:o,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:d}),f=Aw(h,l);if(g.length===0)return;const m=g[0];if(f!==null&&(t||!s)&&!n&&(!o&&m>=f||o&&m<=f))return;const v=Iw(g,h,c,d);if(!v)return;const w=v.move;if(!(w>l.getCols().length-h.length))return{columns:h,toIndex:w}}function nh(e){const{columns:t,toIndex:o}=sh(e)||{},{finished:i,colMoves:s}=e;return!t||o==null?null:(s.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function Aw(e,t){const o=t.getCols(),i=e.map(l=>o.indexOf(l)).sort((l,c)=>l-c),s=i[0];return he(i)-s!==i.length-1?null:s}function kw(e){function t(i){const s=[];let n=i.getOriginalParent();for(;n!=null;)s.push(n),n=n.getOriginalParent();return s}let o=0;for(let i=0;i<e.length-1;i++){let s=t(e[i]),n=t(e[i+1]);[s,n]=s.length>n.length?[s,n]:[n,s];for(const r of s)n.indexOf(r)===-1&&o++}return o}function Lw(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Ow(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:s,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(b=>b.getColDef().suppressMovable))return[];const c=Lw(a,s),d=r.getCols(),u=c.filter(b=>t.includes(b)),h=c.filter(b=>!t.includes(b)),g=d.filter(b=>!t.includes(b));let f=0,m=i;if(o){let b=0;for(const y of u)b+=y.getActualWidth();m-=b}if(m>0){for(let b=0;b<h.length;b++){const y=h[b];if(m-=y.getActualWidth(),m<0)break;f++}o&&f++}let C;if(f>0){const b=h[f-1];C=g.indexOf(b)+1}else C=g.indexOf(h[0]),C===-1&&(C=0);const v=[C],w=(b,y)=>b-y;if(o){let b=C+1;const y=d.length-1;for(;b<=y;)v.push(b),b++;v.sort(w)}else{let b=C;const y=d.length-1;let S=d[b];for(;b<=y&&c.indexOf(S)<0;)b++,v.push(b),S=d[b];b=C-1;const F=0;for(;b>=F;)v.push(b),b--;v.sort(w).reverse()}return v}function Wr(e){const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let a=s.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(o&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function rr(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var dc=7,zr=100,ys=zr/2,Gw=5,Hw=100,Bw=class extends x{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!O(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=o?.columns??[];for(const s of i){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const r=o?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{const s=t.visibleState,n=(o||[]).filter(r=>s[r.getId()]&&!r.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){const{gos:s,ctrlsSvc:n}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(i&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&we(e.hDirection))return;const a=Wr({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,a,i):this.handleColumnDragWhileAllowingMovement(e,t,o,a,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,o){if(!e?.length)return;const i=e.filter(s=>!s.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,o,i,s){const n=this.getAllMovingColumns(e,!0);if(s){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,s){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:o}),c=nh({...l,finished:s});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;const s=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return i?i.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:s,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:o,colModel:i}=this.beans,s=o.get("enableRtl"),n=i.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let r=null,a=null,l=null;for(const d of n){if(a=d.getActualWidth(),r=this.getNormalisedColumnLeft(d,0,s),r!=null){const u=r+a;if(r<=t&&u>=t){l=d;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let d=n.length-1;d>=0;d--){const u=n[d],h=n[d].getParent();if(!h){l=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){l=he(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,s),a=l.getActualWidth()}if(l==null||r==null||a==null){this.lastHighlightedColumn?.column!==l&&this.clearHighlighted();return}let c;if(t-r<a/2){const d=n.indexOf(l);d===0?c=0:(c=1,l=n[d-1])}else c=1;(this.lastHighlightedColumn?.column!==l||this.lastHighlightedColumn?.position!==c)&&this.clearHighlighted(),uc(l,c),this.lastHighlightedColumn={column:l,position:c}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,s=o.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||a==null)return;const l=i.allCols,c=l.indexOf(n),d=l.indexOf(r),u=a===0,h=c<d||c===d&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),d+g===c)return;const f=l[d+g];if(!f)return;const m=this.getNormalisedColumnLeft(f,20,s);return{fromLeft:h,xPosition:m}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=Vw(e);if(!s||!n||i.column||!t)return{firstMovingCol:s,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:s,position:a?1:0,column:a!==o?s:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,o){const{gos:i,ctrlsSvc:s}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return Wr({x:o?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:o,skipScrollPadding:!0,gos:i,ctrlsSvc:s})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>dc;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:s,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:n,fromEnter:i,fakeEvent:s}),{columns:a,toIndex:l}=sh(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(uc(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=e<o+ys,n=e>i-ys):(n=e<o+ys,s=e>i-ys),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),Hw),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*Gw,e>zr&&(e=zr);let t=null;const o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:i,dragAndDrop:s,gos:n}=this.beans;if(this.failedMoveAttempts<=dc+1||!i)return;if(s.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,o=!1){const i=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s?.setColsPinned(i,t,"uiColumnDragged"),o&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function uc(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function Vw(e){const t=e.length;let o,i;for(let s=0;s<t;s++){if(!o){const n=e[s];n.getLeft()!=null&&(o=n)}if(!i){const n=e[t-1-s];n.getLeft()!=null&&(i=n)}if(o&&i)break}return{firstMovingCol:o,lastMovingCol:i}}var Nw=class extends x{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,o=this.pinned;e.whenReady(this,i=>{let s;const n=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":s=[[n,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":s=[[n,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:s=[[n,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new Bw(o)),this.bodyDropPivotTarget=this.createManagedBean(new Dw(o)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}};function rh(e,t){const o=[],i=[],s=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?s.push(r):a==="left"||a===!0?o.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...o]:[...o,...i,...s]}function ah(e,t){let o=!0;return Wt(null,t,i=>{if(!Ve(i))return;const s=i;if(!s.getColGroupDef()?.marryChildren)return;const a=[];for(const h of s.getLeafColumns()){const g=e.indexOf(h);a.push(g)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=s.getLeafColumns().length-1;d>u&&(o=!1)}),o}var Ww=class extends x{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const i=this.beans.colModel.getCols();if(!i)return;const s=i[e];this.moveColumns([s],t,o)}moveColumns(e,t,o,i=!0){const{colModel:s,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=s.getCols();if(!l)return;if(t>l.length-e.length){D(30,{toIndex:t});return}n?.start();const c=s.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Dl(s.getCols(),c,t),r.refresh(o),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:i,source:o})),n?.finish()}doesMovePassRules(e,t){const o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){const{colModel:t,gos:o}=this.beans;return!(!ah(e,t.getColTree())||!(s=>{const n=c=>c?c==="left"||c===!0?-1:1:0,r=o.get("enableRtl");let a=r?1:-1,l=!0;for(const c of s){const d=n(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return Dl(i,e,t),i}createBodyDropTarget(e,t){return new Nw(e,t)}moveHeader(e,t,o,i,s){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,h=Fe(o),g=h?d.width:o.getActualWidth(),f=e==="left"!==r.get("enableRtl"),m=Wr({x:f?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=c.focusedHeader;nh({allMovingColumns:h?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:m,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let v;if(h){const w=o.getDisplayedLeafColumns();v=f?w[0]:he(w)}else v=o;if(n.getScrollFeature().ensureColumnVisible(v,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&C){let w;if(h){const b=o.getGroupId(),y=o.getLeafColumns();if(!y.length)return;const S=y[0].getParent();if(!S)return;w=zw(S,b)}else w=o;w&&c.focusHeaderPosition({headerPosition:{...C,column:w}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=Fe(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>Uw(t,r.allCols):()=>_w(t),dragItemName:o,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),rr(c,!0)},onDragStopped:()=>rr(c,!1),onDragCancelled:()=>rr(c,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:f}=h??{},m=l?v=>!f||f[v.getColId()]:()=>!0,C=g.filter(v=>!v.getColDef().lockVisible&&m(v));s.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(f=>!f.getColDef().lockVisible)||[];s.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function zw(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function _w(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function Uw(e,t){const o=e.getProvidedColumnGroup().getLeafColumns(),i={};for(const a of o)i[a.getId()]=a.isVisible();const s=[];for(const a of t)o.indexOf(a)>=0&&(s.push(a),At(o,a));for(const a of o)s.push(a);const n=[],r=e.getLeafColumns();for(const a of s)r.indexOf(a)!==-1&&n.push(a);return{columns:s,columnsInSplit:n,visibleState:i,containerType:n[0]?.pinned}}var $w={moduleName:"ColumnMove",version:L,beans:[Ww,Ew],apiFunctions:{moveColumnByIndex:xw,moveColumns:Pw},dependsOn:[ih],css:[Fw]},Kw=class extends x{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const o=this.getHeaderCellForColumn(e);if(!o)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const o=document.createElement("form");o.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,o);i.appendChild(o);const s=Math.ceil(o.getBoundingClientRect().width);return o.remove(),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){let t=null;for(const o of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}return t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const i=document.createElement("div"),s=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>o.classList.contains(a))?(s.add("ag-header","ag-header-row"),i.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const c=r.classList[l];c!="ag-row-position-absolute"&&s.add(c)}break}r=r.parentElement}i.appendChild(o),t.appendChild(i)}},lh={moduleName:"AutoWidth",version:L,beans:[Kw]};function qw(e,t,o=!0,i="api"){e.colResize?.setColumnWidths(t,!1,o,i)}function ch(e,t){if(!e||e.length==0)return;const o=t(e[0]);for(let i=1;i<e.length;i++)if(o!==t(e[i]))return;return o}function dh(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=ch(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:o})}function jw(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=ch(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:o})}function Yw(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function Si(e,t,o,i,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:o,source:i})}var Qw=class extends x{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const i=this.normaliseDragChange(t),s=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(s,o,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),o=(l,c)=>l.map(d=>d.getActualWidth()/c),i=this.getColumnsToResize(),s=t(i),n=o(i,s),r={columnsToResize:i,resizeStartWidth:s,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),c=r.groupAfterColumns=l.filter(u=>u.isResizable()),d=r.groupAfterStartWidth=t(c);r.groupAfterRatios=o(c,d)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),o=this.getInitialValues();t>o.resizeStartWidth&&this.resizeColumns(o,t,e,!0)}resizeColumnsFromLocalValues(e,t,o=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:s,ratios:r,width:t}),a){const u=t-n;d.push({columns:a,ratios:c,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:d,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},Zw=class extends x{constructor(e,t,o,i,s){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=s}postConstruct(){const e=[];let t,o;const i=()=>{if(me(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),o&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},s=()=>{for(const r of e)r();e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==o)&&(t=r,o=a,s(),i())};n(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:o,lastResizeAmount:i,resizeStartWidth:s,beans:n}=this,r=this.normaliseResizeAmount(t),a=s+r,l=[{key:o,newWidth:a}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=n;if(this.column.getPinned()){const h=c?.leftWidth??0,g=c?.rightWidth??0,f=Zi(d.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-i)>f)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},Jw=class extends x{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const s=[],{colModel:n,gos:r,visibleCols:a}=this.beans;for(const l of e){const c=n.getColDefCol(l.key)||n.getCol(l.key);if(!c)continue;if(s.push({width:l.newWidth,ratios:[1],columns:[c]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(c);if(!u)continue;const h=c.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;s.push({width:g,ratios:[1],columns:[u]})}}s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:o,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(d=>Xw(d)))){if(o){const d=t&&t.length>0?t[0].columns:null;Si(this.eventSvc,d,o,i)}return}const n=[],r=[];for(const d of t){const{width:u,columns:h,ratios:g}=d,f={},m={};for(const w of h)r.push(w);let C=!0,v=0;for(;C;){if(v++,v>1e3){ce(31);break}C=!1;const w=[];let b=0,y=u;h.forEach((F,E)=>{if(m[F.getId()])y-=f[F.getId()];else{w.push(F);const T=g[E];b+=T}});const S=1/b;w.forEach((F,E)=>{const M=E===w.length-1;let T;M?T=y:(T=Math.round(g[E]*u*S),y-=T);const G=F.getMinWidth(),P=F.getMaxWidth();T<G?(T=G,m[F.getId()]=!0,C=!0):P>0&&T>P&&(T=P,m[F.getId()]=!0,C=!0),f[F.getId()]=T})}for(const w of h){const b=f[w.getId()];w.getActualWidth()!==b&&(w.setActualWidth(b,i),n.push(w))}}const a=n.length>0;let l=[];if(a){const{colFlex:d,visibleCols:u,colViewport:h}=this.beans;l=d?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}const c=r.concat(l);(a||o)&&Si(this.eventSvc,c,o,i,l)}resizeHeader(e,t,o){if(!e.isResizable())return;const i=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(i+t,s),n);this.setColumnWidths([{key:e,newWidth:r}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,s){return new Zw(e,t,o,i,s)}createGroupResizeFeature(e,t,o,i){return new Qw(e,t,o,i)}};function Xw(e){const{columns:t,width:o}=e;let i=0,s=0,n=!0;for(const l of t){const c=l.getMinWidth();i+=c||0;const d=l.getMaxWidth();d>0?s+=d:n=!1}const r=o>=i,a=!n||o<=s;return r&&a}var eb={moduleName:"ColumnResize",version:L,beans:[Jw],apiFunctions:{setColumnWidths:qw},dependsOn:[Rw,lh]},tb=class extends x{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},ob=class extends $a{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,o,i,s){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,s=ds(this,a,s),this.setGui(t,s),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:i,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s,i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(s,g,t),d?.createRangeHighlightFeature(s,n,e),s.createManagedBean(new Ua(n,t,r)),s.createManagedBean(new tb(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,o,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new ls(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.getDefinition();return K(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");o!=null?o===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=he(t)===e;if(!o&&!i)return;const s=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),c=s===1,d=s===0;o&&(l?a=c:r=d),i&&(l?r=d:a=c)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:o}=this;if(!o)return;const i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),r=K(o,{displayName:this.displayName,columnGroup:s,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,c)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>i?.showMenuAfterButtonClick(n,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>i?.showMenuAfterMouseEvent(n,l,"columnMenu",c),eGridHeader:this.eGui}),a=$m(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e,t){const{column:o,comp:i,beans:{rangeSvc:s},gos:n}=this,r=d=>this.handleMouseOverChange(d.type==="mouseenter"),a=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",o.getProvidedColumnGroup()),l=d=>this.handleContextMenuMouseEvent(d,void 0,o.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:r,mouseleave:r,click:a,contextmenu:l}),i.toggleCss("ag-header-group-cell-selectable",ui(n));const c=s?.createHeaderGroupCellMouseListenerFeature(this.column,t);c&&this.createManagedBean(c)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),o=Hu(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&o.push("ag-header-cell-wrap-text"));for(const i of o)this.comp.toggleCss(i,!0)}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of i)e.addManagedListeners(n,{movingChanged:s});s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:o,expandable:i,gos:s,beans:n}=this,r=ui(s);if(e.key==R.ENTER){if(r&&!e.altKey)n.rangeSvc?.handleColumnSelection(o,e);else if(i){const a=!o.isExpanded();n.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),a,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t}=this;ui(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:o}=this;!o||!t.contains(ve(e))||e.ariaAnnounce?.announceValue(o,"columnHeader")}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function ib(e,t,o){e.colGroupSvc?.setColumnGroupOpened(t,o,"api")}function sb(e,t,o){return e.colGroupSvc?.getColumnGroup(t,o)??null}function nb(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function rb(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function ab(e){return e.colGroupSvc?.getColumnGroupState()??[]}function lb(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function cb(e){e.colGroupSvc?.resetColumnGroupState("api")}function db(e){return e.visibleCols.treeLeft}function ub(e){return e.visibleCols.treeCenter}function hb(e){return e.visibleCols.treeRight}function gb(e){return e.visibleCols.getAllTrees()}var uh=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function pb(e,t){for(let o=0;o<t.length;o++){const i=e.indexOf(t[o]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var fb=class extends x{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:o,colModel:i,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(i,s),s?.updateOpenClosedVisibility(),this.leftCols=ar(this.treeLeft),this.centerCols=ar(this.treeCenter),this.rightCols=ar(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),o?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){const i=o.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}o=o.getParent()}}return e}updateBodyWidths(){const e=Ht(this.centerCols),t=Ht(this.leftCols),o=Ht(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=o?he(o):null):(s=t?he(t):null,n=o?o[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===s,i),r.setFirstRightPinned(r===n,i)}buildTrees(e,t){const o=e.getColsToShow(),i=o.filter(l=>l.getPinned()=="left"),s=o.filter(l=>l.getPinned()=="right"),n=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new uh,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),o=[],i=[],s=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?o.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=o.concat(i).concat(s)}getAriaColIndex(e){let t;return Fe(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)Fe(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),s=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(s){let r=Ht(n);for(const a of n)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of n)a.setLeft(r,e),r+=a.getActualWidth()}pb(i,n)}for(const n of i)n.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){const s=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){const h=c-1;for(let g=1;g<=h;g++)d.push(t[r+g]);r+=h}let u;if(o){u=!1;for(const h of d)o(h)&&(u=!0)}else u=!0;u&&(s.length===0&&n&&i&&i(a)&&s.push(n),s.push(a)),n=a}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,o=t.indexOf(e);return o>0?t[o-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Io(this.treeCenter,!1,e),Io(this.treeLeft,!1,e),Io(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o<t.length;o++){const i=this[t[o]];if(i.length)return e?he(i):i[0]}return null}getColAfter(e){const t=this.allCols,o=t.indexOf(e);return o<t.length-1?t[o+1]:null}getColsLeftWidth(){return Ht(this.leftCols)}getDisplayedColumnsRightWidth(){return Ht(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i=t==="first";let s;if(Fe(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=i?n[0]:he(n)}else s=e;return(i?o[0]:he(o))===s}};function Io(e,t,o){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(Fe(s)){const n=t?s.getDisplayedChildren():s.getChildren();Io(n,t,o)}o(s)}}function ar(e){const t=[];return Io(e,!0,o=>{lo(o)&&t.push(o)}),t}var mb=class extends x{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Wt(null,t,o=>{Ve(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];Wt(null,t,i=>{if(Ve(i)){const s=i.getColGroupDef(),n={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};o.push(n)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:i,visibleCols:s,eventSvc:n}=this.beans;if(!o.getColTree().length)return;i?.start();const a=[];for(const l of e){const c=l.groupId,d=l.open,u=this.getProvidedColGroup(c);u&&u.isExpanded()!==d&&(u.setExpanded(d),a.push(u))}s.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i?.finish()}setColumnGroupOpened(e,t,o){let i;Ve(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return Wt(null,this.beans.colModel.getColTree(),o=>{Ve(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?he(i):i[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const a=this.getColGroupAtLevel(r,o);if(a!==e)return a}}getColGroupAtLevel(e,t){let o=e.getParent(),i,s;for(;i=o.getProvidedColumnGroup().getLevel(),s=o.getPaddingLevel(),!(i+s<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();Io(e,!1,t=>{Fe(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Fe(e))return e;const o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return Io(o,!1,n=>{if(Fe(n)){const r=n;let a;i?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=h=>{const g=d;d=h;const f=c[g],C=(Fe(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(C==null){for(let w=g;w<h;w++)a.push(c[w]);return}const v=this.createColumnGroup(C,o,r,i,n);for(let w=g;w<h;w++)v.addChild(c[w]);l.push(v)};for(let h=1;h<c.length;h++){const g=c[h],m=(Fe(g)?g.getProvidedColumnGroup():g).getOriginalParent(),C=c[d],w=(Fe(C)?C.getProvidedColumnGroup():C).getOriginalParent();m!==w&&u(h)}d<c.length&&u(c.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,o,i,s,n,r){const a=s.getUniqueKey(t.groupId||null,null),l=Hl(this.beans,t,a),c=new Ls(l,a,!1,o);this.createBean(c);const d=this.findExistingGroup(t,n);d&&n.splice(d.idx,1);const u=d?.group;u&&c.setExpanded(u.isExpanded());const h=hu(this.beans,l.children,o+1,e,i,s,n,r);return c.setChildren(h),c}balanceColumnTree(e,t,o,i){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(Ve(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,o,i);a.setChildren(l),s.push(a)}else{let a,l;for(let c=t;c<o;c++){const d=i.getUniqueKey(null,null),u=Hl(this.beans,null,d),h=new Ls(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(s.push(a),e.some(d=>Ve(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,o=e;for(;o?.[0]&&Ve(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i<e.length;i++){const s=e[i];if(Ve(s)){const n=s,r=this.findMaxDepth(n.getChildren(),t+1);o<r&&(o=r)}}return o}balanceTreeForAutoCols(e,t){const o=[];for(const i of e){let s=i;for(let n=t-1;n>=0;n--){const r=new Ls(null,`FAKE_PATH_${i.getId()}_${n}`,!0,n);this.createBean(r),r.setChildren([s]),s.originalParent=r,s=r}t===0&&(i.originalParent=null),o.push(s)}return o}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}}}createColumnGroup(e,t,o,i,s){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=mu(n,r);let l=o[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),O(l)?l.reset():(l=new os(e,n,r,i),s||this.createBean(l)),l}mapOldGroupsById(e){const t={},o=i=>{for(const s of i)if(Fe(s)){const n=s;t[s.getUniqueId()]=n,o(n.getChildren())}};return e&&o(e),t}setupParentsIntoCols(e,t){for(const o of e??[])if(o.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,Fe(o)){const i=o;this.setupParentsIntoCols(i.getChildren(),i)}}},Cb={moduleName:"ColumnGroup",version:L,dynamicBeans:{headerGroupCellCtrl:ob},beans:[mb],apiFunctions:{getAllDisplayedColumnGroups:gb,getCenterDisplayedColumnGroups:ub,getColumnGroup:sb,getColumnGroupState:ab,getDisplayNameForColumnGroup:rb,getLeftDisplayedColumnGroups:db,getProvidedColumnGroup:nb,getRightDisplayedColumnGroups:hb,resetColumnGroupState:cb,setColumnGroupOpened:ib,setColumnGroupState:lb}};function Ct(e,t,o){const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:g,gos:f}=e,m=i.getColDefCols()??[],C=a?.getColumns();if(!m.length&&!C?.length)return!1;if(t?.state&&!t.state.forEach)return D(32),!1;const v=(S,F,E,M,T)=>{if(!S)return;const G=fm(F,t.defaultState),P=G("flex").value1,I=G("sort").value1,A=G("sortType").value1,J=so(I)||Ma(A),k=Ut(A),j=Rn(I),ie=J?{type:k,direction:j}:void 0;if(gu(e,S,G("hide").value1,ie,G("sortIndex").value1,G("pinned").value1,P,o),P==null){const $=G("width").value1;if($!=null){const Z=S.getColDef().minWidth??u.getDefaultColumnMinWidth();Z!=null&&$>=Z&&S.setActualWidth($,o)}}T||!S.isPrimary()||(h?.syncColumnWithState(S,o,G),s?.syncColumnWithState(S,o,G,E),n?.syncColumnWithState(S,o,G,M))},w=(S,F,E)=>{const M=hh(e,o),T=F.slice(),G={},P={},I=[],A=[],J=[];let k=0;const j=s?.columns.slice()??[],ie=n?.columns.slice()??[];for(const z of S){const te=z.colId;if(te.startsWith(oo)){I.push(z),J.push(z);continue}if(go(te)){A.push(z),J.push(z);continue}const oe=E(te);oe?(v(oe,z,G,P,!1),At(T,oe)):(J.push(z),k+=1)}const $=z=>v(z,null,G,P,!1);T.forEach($),s?.sortColumns(hc.bind(s,G,j)),n?.sortColumns(hc.bind(n,P,ie)),i.refreshCols(!1,o);const Z=(z,te,q=[])=>{for(const oe of te){const de=z(oe.colId);At(q,de),v(de,oe,null,null,!0)}q.forEach($)};return Z(z=>r?.getColumn(z)??null,I,r?.getColumns()?.slice()),Z(z=>a?.getColumn(z)??null,A,a?.getColumns()?.slice()),wb(t,i,f),c.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),M(),{unmatchedAndAutoStates:J,unmatchedCount:k}};l?.start();let{unmatchedAndAutoStates:b,unmatchedCount:y}=w(t.state||[],m,S=>i.getColDefCol(S));if(b.length>0||O(t.defaultState)){const S=d?.getPivotResultCols()?.list??[];y=w(b,S,F=>d?.getPivotResultCol(F)??null).unmatchedCount}return l?.finish(),y===0}function vb(e,t){const{colModel:o,autoColSvc:i,selectionColSvc:s,eventSvc:n,gos:r}=e,a=o.getColDefCols();if(!a?.length)return;const l=o.getColDefColTree(),c=pu(l),d=[];let u=1e3,h=1e3;const g=w=>{const b=gh(w);we(b.rowGroupIndex)&&b.rowGroup&&(b.rowGroupIndex=u++),we(b.pivotIndex)&&b.pivot&&(b.pivotIndex=h++),d.push(b)};i?.getColumns()?.forEach(g),s?.getColumns()?.forEach(g),c?.forEach(g),Ct(e,{state:d},t);const f=i?.getColumns()??[],v=[...s?.getColumns()??[],...f,...a].map(w=>({colId:w.colId}));Ct(e,{state:v,applyOrder:!0},t),n.dispatchEvent(K(r,{type:"columnsReset",source:t}))}function hh(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:o?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:s?.columns.slice()??[]},c=cn(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(F,E,M,T)=>{const G=E.map(T),P=M.map(T);if(ho(G,P))return;const A=new Set(E);for(const k of M)A.delete(k)||A.add(k);const J=[...A];a.dispatchEvent({type:F,columns:J,column:J.length===1?J[0]:null,source:t})},h=F=>{const E=[];return n.forAllCols(M=>{const T=d[M.getColId()];T&&F(T,M)&&E.push(M)}),E},g=F=>F.getColId();u("columnRowGroupChanged",l.rowGroupColumns,o?.columns??[],g),u("columnPivotChanged",l.pivotColumns,i?.columns??[],g);const m=h((F,E)=>{const M=F.aggFunc!=null,T=M!=E.isValueActive(),G=M&&F.aggFunc!=E.getAggFunc();return T||G});m.length>0&&Yw(a,"columnValueChanged",m,t),Si(a,h((F,E)=>F.width!=E.getActualWidth()),!0,t),dh(a,h((F,E)=>F.pinned!=E.getPinned()),t),jw(a,h((F,E)=>F.hide==E.isVisible()),t);const y=h((F,E)=>!ks(E.getSortDef(),{type:Ut(F.sortType),direction:Rn(F.sort)})||F.sortIndex!=E.getSortIndex());y.length>0&&r?.dispatchSortChangedEvents(t,y);const S=cn(e);Sb(c,S,t,n,a)}}function cn(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,s=t.getColDefCols();if(we(s)||!t.isAlive())return[];const n=o?.columns,r=i?.columns,a=[],l=d=>{const u=d.isRowGroupActive()&&n?n.indexOf(d):null,h=d.isPivotActive()&&r?r.indexOf(d):null,g=d.isValueActive()?d.getAggFunc():null,f=d.getSortIndex()!=null?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:d.getSort(),sortType:d.getSortDef()?.type,sortIndex:f,aggFunc:g,rowGroup:d.isRowGroupActive(),rowGroupIndex:u,pivot:d.isPivotActive(),pivotIndex:h,flex:d.getFlex()??null})};t.forAllCols(d=>l(d));const c=new Map(t.getCols().map((d,u)=>[d.getColId(),u]));return a.sort((d,u)=>{const h=c.has(d.colId)?c.get(d.colId):-1,g=c.has(u.colId)?c.get(u.colId):-1;return h-g}),a}function gh(e){const t=(C,v)=>C??v??null,o=e.getColDef(),i=ct(t(o.sort,o.initialSort)),s=i.direction,n=i.type,r=t(o.sortIndex,o.initialSortIndex),a=t(o.hide,o.initialHide),l=t(o.pinned,o.initialPinned),c=t(o.width,o.initialWidth),d=t(o.flex,o.initialFlex);let u=t(o.rowGroupIndex,o.initialRowGroupIndex),h=t(o.rowGroup,o.initialRowGroup);u==null&&!h&&(u=null,h=null);let g=t(o.pivotIndex,o.initialPivotIndex),f=t(o.pivot,o.initialPivot);g==null&&!f&&(g=null,f=null);const m=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:s,sortType:n,sortIndex:r,hide:a,pinned:l,width:c,flex:d,rowGroup:h,rowGroupIndex:u,pivot:f,pivotIndex:g,aggFunc:m}}function wb(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];for(const s of e.state)s.colId!=null&&i.push(s.colId);bb(t.cols,i,t,o)}function bb(e,t,o,i){if(e==null)return;let s=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(s.push(l),n[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(n[l]!=null)continue;l.startsWith(oo)?s.splice(r++,0,a):s.push(a)}if(s=rh(s,i),!ah(s,o.getColTree())){D(39);return}e.list=s}function Sb(e,t,o,i,s){const n={};for(const d of t)n[d.colId]=d;const r={};for(const d of e)n[d.colId]&&(r[d.colId]=!0);const a=e.filter(d=>r[d.colId]),l=t.filter(d=>r[d.colId]),c=[];l.forEach((d,u)=>{const h=a?.[u];if(h&&h.colId!==d.colId){const g=i.getCol(h.colId);g&&c.push(g)}}),c.length&&s.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:o})}var hc=(e,t,o,i)=>{const s=e[o.getId()],n=e[i.getId()],r=s!=null,a=n!=null;if(r&&a)return s-n;if(r)return-1;if(a)return 1;const l=t.indexOf(o),c=t.indexOf(i),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},yb=class extends x{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","groupHideColumnsUntilExpanded","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(gi(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),gi(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?hh(t,e):void 0;o?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=sm(t,this.colDefs,!0,h,e);en(t,this.colDefCols?.tree,g.columnTree);const f=g.columnTree,m=g.treeDepth,C=pu(f),v={};for(const w of C)v[w.getId()]=w;this.colDefCols={tree:f,treeDepth:m,list:C,map:v},this.createColumnsForService([c],this.colDefCols,e),s?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&i?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const o=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:n,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:h,formula:g}=this.beans,f=this.selectCols(a,this.colDefCols);g?.setFormulasActive(f),this.createColumnsForService([i,s,n],f,t);const m=Af(this.gos,this.showingPivotResult);(!e||m)&&this.restoreColOrder(f),this.positionLockedCols(f),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(f),d.clear(),u.clear(),ho(o,this.cols.tree)||h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,o){for(const i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},o),i.addColumns(t))}selectCols(e,t){const o=e?.getPivotResultCols()??null;this.showingPivotResult=o!=null;const{map:i,list:s,tree:n,treeDepth:r}=o??t;return this.cols={list:s.slice(),map:{...i},tree:n.slice(),treeDepth:r},o&&(o.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{beans:e,showingPivotResult:t,cols:o}=this,{valueColsSvc:i,selectionColSvc:s,gos:n}=e,r=this.isPivotMode()&&!t,a=s?.isSelectionColumnEnabled(),l=kf(e),c=i?.columns,d=Gf(n);return o.list.filter(h=>{const g=Aa(h);return r?c?.includes(h)||g&&(!d||h.isVisible())||a&&go(h)||l&&Ue(h):g&&!d||h.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){Ct(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const o=t.filter(u=>e.map[u.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}const i=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!o.some(u=>i(u))){const u=new Set(o);for(const h of e.list)u.has(h)||o.push(h);e.list=o;return}const s=new Map;for(let u=0;u<o.length;u++){const h=o[u];s.set(h,u)}const n=e.list.filter(u=>!s.has(u));if(n.length===0){e.list=o;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let f=null,m=null;for(const C of g.getChildren())if(!(C===h||C===u)){if(C instanceof Uo){const v=s.get(C);if(v==null)continue;(f==null||f<v)&&(f=v,m=C);continue}C.forEachLeafColumn(v=>{const w=s.get(v);w!=null&&(f==null||f<w)&&(f=w,m=v)})}return m??r(u,g)},a=[],l=new Map;for(const u of n){const h=r(u,null);if(h==null){a.push(u);continue}const g=l.get(h);g===void 0?l.set(h,u):Array.isArray(g)?g.push(u):l.set(h,[g,u])}const c=new Array(e.list.length);let d=c.length-1;for(let u=a.length-1;u>=0;u--)c[d--]=a[u];for(let u=o.length-1;u>=0;u--){const h=o[u],g=l.get(h);if(g)if(Array.isArray(g))for(let f=g.length-1;f>=0;f--){const m=g[f];c[d--]=m}else c[d--]=g;c[d--]=h}e.list=c}positionLockedCols(e){e.list=rh(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=gi(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){en(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i,groupHierarchyColSvc:s}=this.beans;Ti(this.colDefCols?.list,e)||Ti(o?.columns?.list,e)||Ti(i?.columns?.list,e)||Ti(s?.columns?.list,e)||Ti(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;const{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let a=0;a<i.length;a++)if(Wi(i[a],e))return i[a];const{autoColSvc:s,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return s?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},Rb=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Fb=class extends Pi{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Rb)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:i,disabled:s,labelEllipsis:n}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),o!=null&&this.setLabelWidth(o),n!=null&&this.setLabelEllipsis(n),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Xe(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(me(t,!1),ko(t,"presentation")):(me(t,!0),ko(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const o=this.getGui().classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Ks(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Qi(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},ph=class extends Fb{constructor(e,t,o,i){super(e,t,o),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o,ariaLabel:i}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),o!=null&&this.onValueChange(o),i!=null&&this.setAriaLabel(i),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),o=this.getLabel();o==null||o==""||kp(e)!==null?Yi(e,""):Yi(e,t??"")}setAriaLabel(e){return Ci(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Tt(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function Eb(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Fo=class extends ph{constructor(e,t,o="text",i="input"){super(e,e?.template??Eb(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=W,this.eWrapper=W,this.eInput=W}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCss("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n,inputPlaceholder:r,autoComplete:a,tabIndex:l}=this.config;s!=null&&this.setInputName(s),n!=null&&this.setInputWidth(n),r!=null&&this.setInputPlaceholder(r),a!=null&&this.setAutoComplete(a),this.addInputListeners(),this.activateTabIndex([o],l)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Qe(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return Ks(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Qe(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Ci(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Qi(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Qe(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Qe(this.eInput,"autocomplete",t)}return this}},ja=class extends Fo{constructor(e,t="ag-checkbox",o="checkbox"){super(e,t,o),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t,name:o}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),o!=null&&this.setName(o)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const o=this.eInput;o.checked=e,o.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Ya={selector:"AG-CHECKBOX",component:ja},xb=".ag-checkbox-cell{height:100%}",Pb={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Db=class extends ye{constructor(){super(Pb,[Ya]),this.eCheckbox=W,this.registerCSS(xb)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),Md(i,"polite"),this.addManagedListeners(i,{click:s=>{if(Bo(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{Bo(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===R.SPACE&&!t.isDisabled()){e.eGridCell===ve(o)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:i,column:s,node:n}=e;if(n.group&&s)if(typeof i=="boolean")t=i;else{const u=s.getColId();u.startsWith(oo)?t=i==null||i===""?void 0:i==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=0?t=i??void 0:o=!1}else t=i??void 0;const{eCheckbox:r}=this;if(!o){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!s?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),c=Sn(l,t),d=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;r.setInputAriaLabel(d)}onCheckboxChanged(e){const{params:t}=this,{column:o,node:i,value:s}=t,{editSvc:n}=this.beans;if(!o)return;const r={rowNode:i,column:o};n?.dispatchCellEvent(r,null,"cellEditingStarted",{value:s});const a=i.setDataValue(o,e,"ui");n?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:s,newValue:e,valueChanged:a}),a||this.updateCheckbox(t)}},Mb={tag:"div",cls:"ag-skeleton-container"},Tb=class extends ye{constructor(){super(Mb)}init(t){const o=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",o),this.addDestroyFunc(()=>Yi(t.eParentOfValue)),Yi(t.eParentOfValue,o),t.deferRender?this.setupLoading(t):t.node.failedLoad?this.setupFailed():this.setupLoading(t)}setupFailed(){const t=this.getLocaleTextFunc();this.getGui().textContent=t("loadingError","ERR");const o=t("ariaSkeletonCellLoadingFailed","Row failed to load");Ci(this.getGui(),o)}setupLoading(t){const o=st({tag:"div",cls:"ag-skeleton-effect"}),i=t.node.rowIndex;if(i!=null){const r=75+25*(i%2===0?Math.sin(i):Math.cos(i));o.style.width=`${r}%`}this.getGui().appendChild(o);const s=this.getLocaleTextFunc(),n=t.deferRender?s("ariaDeferSkeletonCellLoading","Cell is loading"):s("ariaSkeletonCellLoading","Row data is loading");Ci(this.getGui(),n)}refresh(t){return!1}},Ib={moduleName:"CheckboxCellRenderer",version:L,userComponents:{agCheckboxCellRenderer:Db}},Ab={moduleName:"SkeletonCellRenderer",version:L,userComponents:{agSkeletonCellRenderer:Tb}};function kb(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function Lb(e){return e.colModel.getColumnDefs(!0)}function Ob(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function Gb(e,t){return e.colModel.getColDefCol(t)}function Hb(e){return e.colModel.getColDefCols()}function Bb(e,t){return Ct(e,t,"api")}function Vb(e){return cn(e)}function Nb(e){vb(e,"api")}function Wb(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function zb(e){return e.visibleCols.isPinningLeft()}function _b(e){return e.visibleCols.isPinningRight()}function Ub(e,t){return e.visibleCols.getColAfter(t)}function $b(e,t){return e.visibleCols.getColBefore(t)}function Kb(e,t,o){e.colModel.setColsVisible(t,o,"api")}function qb(e,t,o){e.pinnedCols?.setColsPinned(t,o,"api")}function jb(e){return e.colModel.getCols()}function Yb(e){return e.visibleCols.leftCols}function Qb(e){return e.visibleCols.centerCols}function Zb(e){return e.visibleCols.rightCols}function Jb(e){return e.visibleCols.allCols}function Xb(e){return e.colViewport.getViewportColumns()}function _r(e,t){if(!e)return;const o=e,i={};for(const s of Object.keys(o)){if(t&&t.indexOf(s)>=0||Wd.has(s))continue;const n=o[s];typeof n=="object"&&n!==null&&n.constructor===Object?i[s]=_r(n):i[s]=n}return i}var eS=class extends x{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i,s=!1){const n=e.slice();t?n.sort((l,c)=>o.indexOf(l)-o.indexOf(c)):(o||s)&&n.sort((l,c)=>i.indexOf(l)-i.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],o=[]){const i=[],s={};for(const n of e){const r=this.createDefFromColumn(n,t,o);let a=!0,l=r,c=n.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}const h=s[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],s[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&i.push(l)}return i}createDefFromGroup(e){const t=_r(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=_r(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSortDef(),i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},tS=class extends x{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const o=this.flexViewportWidth,{visibleCols:i,colDelayRenderSvc:s}=this.beans,n=i.centerCols;let r=-1;if(e.resizingCols){const m=new Set(e.resizingCols);for(let C=n.length-1;C>=0;C--)if(m.has(n[C])){r=C;break}}let a=!1;const l=n.map((m,C)=>{const v=m.getFlex(),w=v!=null&&v>0&&C>r;return a||(a=w),{col:m,isFlex:w,flex:Math.max(0,v??0),initialSize:m.getActualWidth(),min:m.getMinWidth(),max:m.getMaxWidth(),targetSize:0}});if(a?(s?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(s),!o||!a)return[];let c=l.length,d=l.reduce((m,C)=>m+C.flex,0),u=o;const h=(m,C)=>{m.frozenSize=C,m.col.setActualWidth(C,t),u-=C,d-=m.flex,c-=1},g=m=>m.frozenSize!=null;for(const m of l)m.isFlex||h(m,m.initialSize);for(;c>0;){const m=Math.round(d<1?u*d:u);let C,v=0,w=0;for(const S of l){if(g(S))continue;C=S,w+=m*(S.flex/d);const F=w-v,E=Math.round(F);S.targetSize=E,v+=E}C&&(C.targetSize+=m-v);let b=0;for(const S of l){if(g(S))continue;const F=S.targetSize,E=Math.min(Math.max(F,S.min),S.max);b+=E-F,S.violationType=E===F?void 0:E<F?"max":"min",S.targetSize=E}const y=b===0?"all":b>0?"min":"max";for(const S of l)g(S)||(y==="all"||S.violationType===y)&&h(S,S.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const f=l.filter(m=>m.isFlex&&!m.violationType).map(m=>m.col);if(e.fireResizedEvent){const m=l.filter(v=>v.initialSize!==v.frozenSize).map(v=>v.col),C=l.filter(v=>v.flex).map(v=>v.col);Si(this.eventSvc,m,!0,t,C)}return this.revealColumns(s),f}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:o}=e.colDef;t!==void 0?e.flex=t:o!==void 0&&(e.flex=o)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},et=e=>{if(typeof e=="bigint")return e;let t;if(typeof e=="number")t=e;else if(typeof e=="string"&&(t=e.trim(),t===""||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},Qa="T",oS=new RegExp(`[${Qa} ]`),iS=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${Qa}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function xt(e,t){return e.toString().padStart(t,"0")}function $e(e,t=!0,o=Qa){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>xt(s,2)).join("-");return t&&(i+=o+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>xt(s,2)).join(":")),i}function Rs(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),xt(e.getDate(),2),xt(e.getHours(),2),`:${xt(e.getMinutes(),2)}`,`:${xt(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,xt(e.getDate(),2)].map(String):null}var lr=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},gc=["January","February","March","April","May","June","July","August","September","October","November","December"],cr=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function sS(e,t){if(t==null)return $e(e,!1);const o=xt(e.getFullYear(),4),i={YYYY:()=>o.slice(o.length-4,o.length),YY:()=>o.slice(o.length-2,o.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>gc[e.getMonth()],MMM:()=>gc[e.getMonth()].slice(0,3),MM:()=>xt(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${lr(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${lr(e.getDate())}`,DD:()=>xt(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>cr[e.getDay()],ddd:()=>cr[e.getDay()].slice(0,3),dd:()=>cr[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${lr(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,n=>n in i?i[n]():n)}function Bs(e,t=!1){return!!Ke(e,t)}function nS(e){return Bs(e,!0)}function Ke(e,t=!1,o){if(!e||!o&&!iS.test(e))return null;const[i,s]=e.split(oS);if(!i)return null;const n=i.split("-").map(g=>Number.parseInt(g,10));if(n.filter(g=>!isNaN(g)).length!==3)return null;const[r,a,l]=n,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!s&&t)return null;if(!s||s==="00:00:00")return c;const[d,u,h]=s.split(":").map(g=>Number.parseInt(g,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(u>=0&&u<60)c.setMinutes(u);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function _i(e,t,o){if(!t||!e)return;if(!o)return e[t];const i=t.split(".");let s=e;for(let n=0;n<i.length;n++){if(s==null)return;s=s[i[n]]}return s}var rS=["dateTimeString","dateString","text","number","bigint","boolean","date"],aS=class extends x{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:e}){return e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:uS,absolute:hS}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:o})=>t.key===R.SPACE&&o.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:o}){return{cellEditorParams:{useFormatter:!0},comparator:(i,s)=>{const n=t.getColDefCol(o),r=n?.getColDef();if(!n||!r)return 0;const a=i==null?"":e({column:n,node:null,value:i}),l=s==null?"":e({column:n,node:null,value:s});return a===l?0:a>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},o={},i=d=>u=>{const{column:h,node:g,value:f}=u;let m=h.getColDef().valueFormatter;return m===d.groupSafeValueFormatter&&(m=d.valueFormatter),this.beans.valueSvc.formatValue(h,g,f,m)};for(const d of Object.keys(e)){const u=e[d],h={...u,groupSafeValueFormatter:mc(u,this.gos)};t[d]=h,o[d]=i(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const d of Object.keys(s)){const u=s[d],h=this.processDataTypeDefinition(u,s,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(n[d]=u.dataTypeMatcher),o[d]=i(h))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=c!==a,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const o={...e};for(const i of rS)delete o[i],o[i]=e[i]??t[i].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,i){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=i[n];const a=t[n];if(r&&a&&(r=a),!fc(e,r,n))return;s=pc(r,e)}else{if(o.includes(n)){D(44);return}const r=t[n];if(!fc(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...o,n],i);if(!a)return;s=pc(a,e)}return{...s,groupSafeValueFormatter:mc(s,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;i===void 0&&(i=e.cellDataType);const{field:s}=t;if((i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(s,o):!1),this.addFormulaCellEditorToColDef(e,t),!i){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[i];if(!n){D(47,{cellDataType:i});return}return e.cellDataType=i,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,n,o),n.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){const{gos:o}=this;if(!Se(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(dr(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const n=o.get("columnTypes")??{};if(tn(s).some(a=>{const l=n[a.trim()];return l&&dr(l,i)}))return!1}return!dr(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");o=_i(i,e,n)}else this.initWaitForRowData(t);return o==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](o))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&o?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const i={},s={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)continue;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))continue;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=gS(a,r);d.rowGroup&&d.rowGroupIndex==null&&(i[n]=d),d.pivot&&d.pivotIndex==null&&(s[n]=d),o.push(d)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,s)),o.length&&Ct(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i?.restoreColumnOrder(o,e),s?.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=Ar(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const o=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!o||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t)?!0:o(t)}validateColDef(e,t,o,i){if(e.cellDataType==="object"){const s=l=>l?.cellDataType==null||l?.cellDataType===!0,n=s(t)&&s(o),r=l=>D(48,{property:l,inferred:n,colId:i}),{object:a}=this.dataTypeDefinitions;e.valueFormatter===a.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&r("Formatter"),e.editable&&e.valueParser===a.valueParser&&!this.hasObjectValueParser&&r("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:o,beans:i,formatValueFuncs:s}=this,n=o[t];n&&i.colFilter?.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const s=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:s,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&n.cellEditor!==e.cellEditor&&(n.cellEditor=e.cellEditor),Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>Ke(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):$e(i.value,o)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>Ke(o)??void 0,dateFormatter:o=>$e(o??null,t)??void 0,valueParser:o=>Bs(String(o.newValue))?o.newValue:null,valueFormatter:o=>Bs(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&Bs(o)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:o}=t;return o==null||typeof o=="string"&&o.trim()===""?null:et(o)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Fr(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&nS(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Fr(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function pc(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...tn(e.columnTypes),...tn(t.columnTypes)]),o}function fc(e,t,o){return t?t.baseDataType!==e.baseDataType?(D(46),!1):!0:(D(45,{parentCellDataType:o}),!1)}var lS=e=>typeof e=="bigint"||typeof e=="number",cS=e=>e==="number"||e==="bigint";function mc(e,t){if(e.valueFormatter)return o=>{const{node:i,colDef:s,column:n,value:r}=o;if(i?.group){const a=(s.pivotValueColumn??n).getAggFunc();if(a){if(a==="first"||a==="last")return e.valueFormatter(o);const{baseDataType:l}=e;if(cS(l)&&a!=="count"){if(lS(r))return e.valueFormatter(o);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...o,value:r.toNumber()});if("value"in r)return e.valueFormatter({...o,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!e.dataTypeMatcher?.(o.value))return;return e.valueFormatter(o)}}function dS(e,t,o,i){if(!t[o])return!1;const s=e[o];return s===null?(t[o]=!1,!1):i===void 0?!!s:s===i}function uS(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const o=et(e),i=et(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:0}function hS(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const o=Cc(e),i=Cc(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:0}function Cc(e){const t=et(e);return t==null?null:t<0n?-t:t}function dr(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,i])=>dS(e,t,o,i))}function gS(e,t){const o=gh(e);for(const i of t)delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex;return o}var pS={moduleName:"DataType",version:L,beans:[aS],dependsOn:[Ib]},fS={moduleName:"ColumnFlex",version:L,beans:[tS]},fh={moduleName:"ColumnApi",version:L,beans:[eS],apiFunctions:{getColumnDef:kb,getDisplayNameForColumn:Ob,getColumn:Gb,getColumns:Hb,applyColumnState:Bb,getColumnState:Vb,resetColumnState:Nb,isPinning:Wb,isPinningLeft:zb,isPinningRight:_b,getDisplayedColAfter:Ub,getDisplayedColBefore:$b,setColumnsVisible:Kb,setColumnsPinned:qb,getAllGridColumns:jb,getDisplayedLeftColumns:Yb,getDisplayedCenterColumns:Qb,getDisplayedRightColumns:Zb,getAllDisplayedColumns:Jb,getAllDisplayedVirtualColumns:Xb,getColumnDefs:Lb}},mS=class extends x{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return o&&s?s.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,s){const n=e.headerValueGetter;if(n){const r=K(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:s});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return Mp(e.field)}return""}},CS=class extends x{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,o=!1){const{visibleCols:i}=this,s=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=i.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(o)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let o;switch(e){case"left":o=this.rowsOfHeadersToRenderLeft[t];break;case"right":o=this.rowsOfHeadersToRenderRight[t];break;default:o=this.rowsOfHeadersToRenderCenter[t];break}return o??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||vS(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200,n=t<i&&o<i,r=t>s&&o>s;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return O(r)&&r>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,s=i.centerCols;return i.getColsForRow(e,s,o,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const o=i=>{const s=new Set,n={};for(const r of i){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!s.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();n[d]??(n[d]=[]),n[d].push(a),s.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function vS(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var wS=class extends x{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(s){const n=t(s),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Sa("<span>"+n+"</span>");return}if(n==null){this.eGui=st({tag:"span"});return}this.eGui=n}}return o}},bS={moduleName:"CellRendererFunction",version:L,beans:[wS]},SS=class extends qe{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...o){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new i(...o)}};function yS(e){return typeof e=="object"&&!!e.getComp}var RS=class extends SS{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:o,dynamicBeans:i,selectors:s}=e;if(o){const n=(r,a,l,c)=>{this.agGridDefaults[r]=a,(l||c)&&(this.agGridDefaultOverrides[r]={params:l,processParams:c})};for(const r of Object.keys(o)){let a=o[r];if(yS(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:c,processParams:d}=a;n(r,l,c,d)}else n(r,a)}}this.registerDynamicBeans(i);for(const n of s??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const o=(a,l,c,d)=>({componentFromFramework:l,component:a,params:c,processParams:d}),{frameworkOverrides:i}=this.beans,s=i.frameworkComponent(t,this.gos.get("components"));if(s!=null)return o(s,!0);const n=this.jsComps[t];if(n){const a=i.isFrameworkComponent(n);return o(n,a)}const r=this.agGridDefaults[t];if(r){const a=this.agGridDefaultOverrides[t];return o(r,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?It(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??It(256)}},FS=23,ES=class extends x{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===FS&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const o=this.readyCallbacks.indexOf(t);o>=0&&this.readyCallbacks.splice(o,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},xS=':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);font-weight:var(--ag-font-weight);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',Za=typeof window!="object"||!window?.document?.fonts?.forEach,mh=!1,Vo=(e,t,o,i,s,n,r=!1)=>{if(Za||mh)return;let a=e;i&&(a=`@layer ${CSS.escape(i).replaceAll("\\.",".")} { ${e} }`);let l=Pt.map.get(t);if(l||(l=[],Pt.map.set(t,l)),l.some(h=>h.injectedCss===a))return;const c=document.createElement("style");n&&c.setAttribute("nonce",n),c.dataset.agCss=o,c.dataset.agCssVersion=L,c.textContent=a;const d={rawCss:e,injectedCss:a,el:c,priority:s,isParams:r};let u;for(const h of l){if(h.priority>s)break;u=h}if(u){u.el.after(c);const h=l.indexOf(u);l.splice(h+1,0,d)}else t.nodeName==="STYLE"?t.after(c):t.insertBefore(c,t.querySelector(":not(title, meta)")),l.push(d)},Ch=(e,t,o,i)=>{Vo(xS,e,"shared",t,0,o),i?.forEach((s,n)=>s.forEach(r=>Vo(r,e,n,t,0,o)))},PS=(e,t,o,i,s,n)=>{if(Za||mh)return;const r=Pt.grids.get(e);r?r.paramsCss=t:Pt.grids.set(e,{styleContainer:i,paramsCss:t}),Ur(i),t&&o&&Vo(t,i,o,s,2,n,!0)},DS=e=>{const t=Pt.grids.get(e)?.styleContainer;if(!t)return;Pt.grids.delete(e),Array.from(Pt.grids.values()).some(i=>i.styleContainer===t)?Ur(t):(Ur(t,!0),Pt.map.delete(t))},Ur=(e,t=!1)=>{const o=new Set;for(const s of Pt.grids.values())s.styleContainer===e&&o.add(s.paramsCss);const i=Pt.map.get(e)??[];for(let s=i.length-1;s>=0;s--)(t||i[s].isParams&&!o.has(i[s].rawCss))&&(i[s].el.remove(),i.splice(s,1))},vh=()=>{const e=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map);let t=e.get(L);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(L,t)),t},Pt=vh(),Ne=e=>new wh(e),Xt="$default",MS=0,wh=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[Xt]:{...o[Xt]??{},...t??{}},...o}}use(e,t,o){let i=this._inject;if(i==null){let{css:s}=this;if(s){const n=`ag-theme-${this.feature??"part"}-${++MS}`;typeof s=="function"&&(s=s()),s=`:where(.${n}) {
|
|
4
4
|
${s}
|
|
@@ -60,4 +60,4 @@ See ${tu(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var T1={1:"Charting Ag
|
|
|
60
60
|
`,jF=class extends qF{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:o}=e;this.suppressQuotes=t,this.columnSeparator=o}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,_c),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((o,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(o.data.value||""),o.mergeAcross&&this.appendEmptyCells(o.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,i){o!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue({column:e,node:o,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(D(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=_c),this.isFirstLine=!1}},YF=class extends $F{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){D(51);return}const t=()=>{const i=this.getMergedParams(e),s=this.getData(i),n=new Blob(["\uFEFF",s],{type:"text/plain"}),r=i.fileName,a=typeof r=="function"?r(K(this.gos,{})):r;KF(this.getFileName(a),n)},{overlays:o}=this.beans;o?o.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:o,rowGroupColsSvc:i,valueSvc:s,gos:n}=this.beans,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u,valueFrom:h}=e;return new jF({colModel:t,colNames:o,valueSvc:s,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:i,valueFrom:h})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function QF(e,t){return e.csvCreator?.getDataAsCsv(t)}function ZF(e,t){e.csvCreator?.exportDataAsCsv(t)}var JF={moduleName:"CsvExport",version:L,beans:[YF],apiFunctions:{getDataAsCsv:QF,exportDataAsCsv:ZF},dependsOn:[UF]},lg=class extends qe{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const o="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(o,e):i.removeAttribute(o))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},XF=1e3,eE=1e3,Uc=100,$c,Fs=!1,tE=class extends qe{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Mo()&&(Fs?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Uc):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Fs)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-$c<XF}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!O(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(o,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),$c=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Pe(this.beans),{keydown:r=>{i.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=ve(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?eE:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Fs=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Uc)}unlockService(){Fs=!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()}},oE=class extends lg{constructor(e,t,o){super(e,o),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},iE=class extends Ha{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,o=this.getGui();o.textContent=Ei(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},sE=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",Es=0,nE=200,rE=class extends qe{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:a="over",type:l}=e,c=n.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(n,t);const u=()=>{let h=c.left-d.left;r==="right"&&(h-=t.offsetWidth-c.width);let g;return a==="over"?(g=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?g=c.top-d.top+c.height:g=c.top-t.offsetHeight-(i||0)*2-d.top),{x:h,y:g}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,n,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:o,event:i}=e,s=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,o);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(o,s.top-n.top,0),c=o.clientWidth>0?o.clientWidth:200;r||(o.style.minWidth=`${c}px`,r=!0);const u=n.right-n.left-c;let h;return this.gos.get("enableRtl")?(h=f(),h<0&&(h=g(),this.setAlignedStyles(o,"left")),h>u&&(h=0,this.setAlignedStyles(o,"right"))):(h=g(),h>u&&(h=f(),this.setAlignedStyles(o,"right")),h<0&&(h=0,this.setAlignedStyles(o,"left"))),{x:h,y:l};function g(){return s.right-n.left-2}function f(){return s.left-n.left-c}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",o,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;if(!s)return;const n=["right","left","over","above","under"];for(const r of n)s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(c=!1)=>{let{x:d,y:u}=r();c&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(d+=i),s&&(u+=s),o&&(d=this.keepXYWithinBounds(t,d,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${d}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const c=Kt(this.beans,t,()=>l(!0));setTimeout(()=>c(),nE)}}getParentRect(){const e=Pe(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Od(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=Pe(this.beans),c=l.documentElement,d=this.getPopupParent(),u=e.getBoundingClientRect(),h=d.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),f=d===l.body,m=Math.ceil(u[r]);let v=f?(i?Ld:_s)(c)+c[a]:d[s];f&&(v-=Math.abs(g[n]-h[n]));const w=v-m;return Math.min(Math.max(t,0),Math.max(w,0))}addPopup(e){const{eChild:t,ariaLabel:o,ariaOwns:i,alwaysOnTop:s,positionCallback:n,anchorToElement:r}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!s,o,i),c=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,c,r),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();O(e.style.top)||(e.style.top=`${o.top*-1}px`),O(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,a=Lo({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||ko(e,"dialog"),o?Ci(e,o):i&&(e.id||(e.id=`popup-component-${Es}`),Tl(i,e.id)),a.appendChild(e),s.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,o=Pe(t),{wrapperEl:i,eChild:s,closedCallback:n,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=m=>{if(!i.contains(ve(t)))return;m.key===R.ESCAPE&&!this.isStopPropagation(m)&&f({keyboardEvent:m})},h=m=>f({mouseEvent:m}),g=m=>f({touchEvent:m}),f=(m={})=>{const{mouseEvent:C,touchEvent:v,keyboardEvent:w,forceHide:b}=m;!b&&(this.isEventFromCurrentPopup({mouseEvent:C,touchEvent:v},s)||d)||(d=!0,i.remove(),o.removeEventListener("keydown",u),o.removeEventListener("mousedown",h),o.removeEventListener("touchstart",g),o.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(C||v||w),this.removePopupFromPopupList(s,c))};return r&&r({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",u),l&&(o.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),o.addEventListener("touchstart",g),o.addEventListener("contextmenu",h))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Es,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Es=Es+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(n=>n&&n()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Tl(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=o[u]-n[u],f=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:f,last:f,direction:h}},l=a("top",0),c=a("left",1),d=this.beans.frameworkOverrides;return new se(u=>{d.wrapIncoming(()=>{Rm(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const m=(C,v)=>{const w=r(s.style[v]);C.last!==w&&(C.initial=w,C.last=w);const b=h[v]-g[v];if(b!=C.lastDiff){const y=this.keepXYWithinBounds(s,C.initial+C.initialDiff-b,C.direction);s.style[v]=`${y}px`,C.last=y}C.lastDiff=b};m(l,"top"),m(c,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const a=this.popupList[r];if(Xp(a.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=Pe(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const a=[],l=r.length,u=s.classList.contains("ag-always-on-top")||!l?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;const f=g.querySelectorAll("div");for(const m of f)m.scrollTop!==0&&a.push([m,m.scrollTop]);h===0?t.prepend(g):u[h-1].after(g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}},aE=class extends rE{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,o,i,s){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e??{};n({column:r,rowNode:a,ePopup:o,type:t,eventSource:i,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return zt(e)}},Tn={moduleName:"Popup",version:L,beans:[aE]};function Jr(e){return e.get("tooltipShowMode")==="whenTruncated"}var lE=(e,t)=>{const o=e;return typeof o.getTranslatedMessage=="function"?o.getTranslatedMessage(t):e.message},Xr=(e,t,o)=>{const{editModelSvc:i}=e,s=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=s||n;return r?.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},cE=(e,t)=>{if(Jr(e.gos)){if(t.isCellRenderer()){const i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?Ji(()=>{const n=t.eGui;return n.querySelector(".ag-group-value")||n.querySelector(".ag-cell-value")||n}):void 0}return Ji(()=>{const i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},dE=(e,t,o)=>{const{editSvc:i}=e,{column:s}=t,n=cE(e,t),r=()=>i?.isEditing(t)?!1:n?s.isTooltipEnabled()?n():!1:!0;return{shouldDisplayDefault:r,shouldDisplayColumnTooltip:r,shouldDisplayCustomTooltip:o??r}},uE=({beans:e,ctrl:t,value:o,displayFunctions:i,translate:s})=>{const{editSvc:n,formula:r,gos:a}=e,{column:l,rowNode:c}=t;if(r?.active&&l.isAllowFormula()){const C=r.getFormulaError(l,c);if(C)return{value:lE(C,s),location:"cellFormula",shouldDisplay:()=>!!r?.getFormulaError(l,c)}}if(!!!n?.isEditing(t)){const C=Xr(e,t,s);if(C)return{value:C,location:"cellEditor",shouldDisplay:()=>!n?.isEditing(t)&&!!Xr(e,t,s)}}const{shouldDisplayCustomTooltip:u,shouldDisplayColumnTooltip:h}=i;if(o!=null)return{value:o,location:"cell",shouldDisplay:u};const g=l.getColDef(),f=c.data;if(g.tooltipField&&O(f))return{value:_i(f,g.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:h};const m=g.tooltipValueGetter;return m?{value:m(K(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:c,data:c.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:h}:null},hE=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=this.gos,n=Jr(s),{column:r,eGui:a}=t,l=r.getColDef();!i&&n&&!l.headerComponent&&(i=Ji(()=>a.querySelector(".ag-header-cell-text")));const c="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=o??u,g={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>o??l?.headerTooltipValueGetter?.(K(s,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let f=this.createTooltipFeature(g);return f&&(f=t.createBean(f),t.setRefreshFunction("tooltip",()=>f.refreshTooltip())),f}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=this.gos,n=Jr(s),{column:r,eGui:a}=t,l=r.getColGroupDef();!i&&n&&!l?.headerGroupComponent&&(i=Ji(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=o??u,g={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>o??l?.headerTooltipValueGetter?.(K(s,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const m={column:r};return l&&(m.colDef=l),m}},f=this.createTooltipFeature(g);return f&&t.createBean(f)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{column:s,rowNode:n}=e,r=dE(i,e,o),a=this.getLocaleTextFunc();let l=null;const c=()=>(l=uE({beans:i,ctrl:e,value:t,displayFunctions:r,translate:a}),l),u={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>c()?.value,shouldDisplayTooltip:()=>{const h=l??c();return h?h.shouldDisplay?h.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:s,colDef:s.getColDef(),rowIndex:e.cellPosition.rowIndex,node:n,data:n.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(s,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:o}=this,{context:i}=o,s=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>Xr(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=o,l=a?.getRowValidationModel()?.getRowValidationMap(),c=a?.getCellValidationModel()?.getCellValidationMap(),d=!!l&&l.size>0,u=!!c&&c.size>0;return d||u}},r=this.createTooltipFeature(n,o);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=O(t.tooltipField)||O(t.tooltipValueGetter)||O(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},gE=class extends tE{createTooltipComp(e,t){Xm(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},cg={moduleName:"Tooltip",version:L,beans:[hE],dynamicBeans:{tooltipFeature:lg,highlightTooltipFeature:oE,tooltipStateManager:gE},userComponents:{agTooltipComponent:iE},dependsOn:[Tn],css:[sE]},Qo=class{constructor(e){this.cellValueChanges=e}},mr=class extends Qo{constructor(e,t,o,i){super(e),this.initialRange=t,this.finalRange=o,this.ranges=i}},pE=10,Kc=class{constructor(e){this.actionStack=[],this.maxStackSize=e||pE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},fE=class extends x{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},o=this.activeCellEdit!==null&&Na(this.activeCellEdit,t),i=this.activeRowEdit!==null&&GC(this.activeRowEdit,t);if(!(o||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:c}=e,d={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const o=e.get("undoRedoCellEditingLimit");if(o<=0)return;this.undoStack=new Kc(o),this.redoStack=new Kc(o),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(o,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(i,o,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,o,i,s){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[i],s),n instanceof mr?this.processRange(n.ranges||[n[o]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,o){const{changeDetectionSvc:i}=this.beans;i?.beginDeferred();try{for(const s of e.cellValueChanges){const{rowIndex:n,rowPinned:r,columnId:a}=s,l={rowIndex:n,rowPinned:r},c=kt(this.beans,l);c?.displayed&&c.setDataValue(a,t(s),o)}}finally{i?.endDeferred()}}processRange(e){let t;const o=this.beans.rangeSvc;o.removeAllCellRanges(!0),e.forEach((i,s)=>{if(!i)return;const n=i.startRow,r=i.endRow;s===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:i.startColumn,columns:i.columns};o.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:o,rowPinned:i}=t,s={rowIndex:o,rowPinned:i},n=kt(this.beans,s),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:o,rowPinned:i}=e,{colModel:s,focusSvc:n,rangeSvc:r}=this.beans,a=s.getCol(o);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:i};n.setFocusedCell({...c,forceBrowserFocus:!0}),r?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Qo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const o=new Qo(this.cellValueChanges);this.pushActionsToUndoStack(o)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Qo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new mr(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:o}=this.beans;t&&ao(o)?e=new mr(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Qo(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const o=new Qo(t??[]);this.pushActionsToUndoStack(o),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},mE=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",CE={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},vE=class extends En{constructor(){super(CE,[Ya]),this.eEditor=W}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:o=>this.setAriaLabel(o.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=Sn(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},$t=class extends Fo{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const o=this.eInput;return o.value!==e&&(o.value=O(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,o=e.length>0;t.setCustomValidity(e),o&&t.reportValidity(),va(t,o)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{_u(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{o.clipboardData?.getData("text")?.split("").some(s=>!e.test(s))&&o.preventDefault()}})}},In={selector:"AG-INPUT-TEXT-FIELD",component:$t},wE=class extends $t{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=po();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){ve(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Qe(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Qe(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Qe(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Ke(this.getValue())??void 0}setDate(e,t){this.setValue($e(e??null,this.includeTime),t)}},dg={selector:"AG-INPUT-DATE-FIELD",component:wE},An=class extends En{constructor(e){super(),this.cellEditorInput=e,this.eEditor=W}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,a=!0;i?(this.focusAfterAttached=!0,s===R.BACKSPACE||s===R.DELETE?r="":s&&s.length===1?n?a=!1:r=s:(r=t.getStartValue(),s!==R.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:c}=l;(c===R.PAGE_UP||c===R.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;po()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},bE={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},SE=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return bE}getAgComponents(){return[dg]}init(e,t){this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const c=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!O(o)&&!O(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,this.includeTime??!1)}},yE=class extends An{constructor(){super(new SE(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},RE={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},FE=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return RE}getAgComponents(){return[dg]}init(e,t){this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let a=[];if(i){const l=new Date(i),c=this.getLocaleTextFunc();if(s){const d=new Date(s);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const d=new Date(n);if(l>d){const u=d.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!O(o)&&!O(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return $e(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):Ke(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):$e(e??null,this.includeTime??!1)??void 0}},EE=class extends An{constructor(){super(new FE(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},xE=class extends Fo{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const o=super.setValue(e,t);return this.eInput.value=e,o}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},PE={selector:"AG-INPUT-TEXT-AREA",component:xE},DE={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},ME=class extends En{constructor(){super(DE,[PE]),this.eEditor=W}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,maxLength:s,cols:n,rows:r}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(n||60).setRows(r||10);let a;o?(this.focusAfterAttached=!0,i===R.BACKSPACE||i===R.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==R.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===R.LEFT||t===R.UP||t===R.RIGHT||t===R.DOWN||e.shiftKey&&t===R.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!O(i)&&!O(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,internalErrors:n,cellEditorParams:e}):n}},nl=class extends $t{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:o,max:i,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){ve(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const o=this.precision;if(o==null)return e;if(t){const s=Number.parseFloat(e).toFixed(o);return Number.parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=o)return e;if(o>0)return`${i[0]}.${i[1].slice(0,o)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,Qe(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Qe(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Qe(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(o=>super.setValue(o,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,o){if(O(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);const s=this.normalizeValue(o);i=o!=s}if(i)return t(o)}return e(o)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const o=t.value;return this.isScientificNotation(o)?this.adjustPrecision(o,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},TE={selector:"AG-INPUT-NUMBER-FIELD",component:nl},IE={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},AE=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return IE}getAgComponents(){return[TE]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&a.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),a.length||(a=null),i?i({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===R.UP||e.key===R.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!O(o)&&!O(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){po()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},kE=class extends An{constructor(){super(new AE(()=>this.getLocaleTextFunc()))}},LE=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",OE="ag-active-item",GE=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),HE=class extends Pi{constructor(e,t,o){super(GE(e,t)),this.label=t,this.value=o,this.eText=W}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(OE,e),Ad(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const o=this.getGui();Bp(o,e),Hp(o,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Hd(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},BE=class extends Pi{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(LE)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case R.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const o=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(o)}break;case R.DOWN:case R.UP:e.preventDefault(),this.navigate(t);break;case R.PAGE_DOWN:case R.PAGE_UP:case R.PAGE_HOME:case R.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:o}=e,i=o??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();Xe(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const o=this.options.findIndex(i=>i.value===e);if(o!==-1){const i=this.options[o];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!vt(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const o=this.getGui(),{scrollTop:i,clientHeight:s}=o,{offsetTop:n,offsetHeight:r}=t;(n+r>i+s||n<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const o=new HE(this.cssIdentifier,t,e);o.setParentComponent(this);const i=this.createManagedBean(o);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===R.DOWN;let o;const{listItems:i,highlightedItem:s}=this;if(!s)o=t?i[0]:he(i);else{let r=i.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),o=i[r]}this.highlightItem(o)}navigateToPage(e){const{listItems:t,highlightedItem:o}=this;if(!o||t.length===0)return;const i=t.indexOf(o),s=this.options.length-1,n=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===R.PAGE_HOME?a=0:e===R.PAGE_END?a=s:e===R.PAGE_DOWN?a=Math.min(i+r,s):e===R.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){ko(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((o,i)=>{o.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},VE=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}",NE={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},WE=class extends ph{constructor(e){if(super(e,e?.template||NE,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=W,this.eWrapper=W,this.eDisplayField=W,this.eIcon=W,this.registerCSS(VE),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:s,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),s!=null&&this.setPickerMinWidth(s),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:o,inputWidth:i}=this.config;if(o){const s=this.beans.iconSvc.createIconNoSpan(o);s&&this.eIcon.appendChild(s)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Er(e,!1),this.ariaRole&&ko(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case R.UP:case R.DOWN:case R.ENTER:case R.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case R.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:i,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=fa(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:d};e.style.position="absolute";const h=c.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=ya(_s(d)),a&&(e.style.maxWidth=a)):Ks(e,a??_s(d));const f=n??`${ba(h.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:i},eWrapper:s,pickerComponent:n}=this,r=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:s,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Er(t,e);const o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Ks(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},zE=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",rl=class extends WE{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(zE)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Ji(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),o&&t==null&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new BE("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Kp(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===R.TAB&&this.hidePicker(),t){case R.ENTER:case R.UP:case R.DOWN:case R.PAGE_UP:case R.PAGE_DOWN:case R.PAGE_HOME:case R.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case R.ESCAPE:super.onKeyDown(e);break;case R.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,o){const{listComponent:i,config:{placeholder:s},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&s&&(l=s),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},_E={selector:"AG-SELECT",component:rl},UE={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},$E=class extends En{constructor(){super(UE,[_E]),this.eEditor=W,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if(we(s)){D(58);return}this.startedByEnter=r!=null?r===R.ENTER:!1;let a=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),f=g!=null;h.text=f?g:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&i!=null&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},KE={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},qE=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return KE}getAgComponents(){return[In]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof i=="string"&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!O(o)&&!O(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){po()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),o=O(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},qc=class extends An{constructor(){super(new qE(()=>this.getLocaleTextFunc()))}};function jE(e){e.undoRedo?.undo("api")}function YE(e){e.undoRedo?.redo("api")}function QE(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function ZE(e){const t=e.editModelSvc?.getEditMap(),o=[];return t?.forEach((i,s)=>{const{rowIndex:n,rowPinned:r}=s;i.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:h}=a,g=mt(a);let f=c??d;f===Ie&&(f=void 0);const m={newValue:f,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:n,rowPinned:r},C=h==="editing";(C||!C&&g)&&o.push(m)})}),o}function JE(e,t=!1){const{editSvc:o}=e;if(o?.isBatchEditing()){if(t)for(const i of e.editModelSvc?.getEditPositions()??[])i.state==="editing"&&o.revertSingleCellEdit(i);else io(e,{persist:!0});eo(e,void 0,{cancel:t})}else o?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function XE(e,t){const o=re(e,t);return!!e.editSvc?.isEditing(o)}function ex(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l){D(12,{colKey:i});return}const d=kt(e,{rowIndex:s,rowPinned:n||null});if(!d){D(290,{rowIndex:s,rowPinned:n});return}if(!r?.isCellEditable({rowNode:d,column:l},"api"))return;n==null&&tg(e,s),eg(e,i),r?.startEditing({rowNode:d,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api",editable:!0})}function tx(e){return e.editSvc?.validateEdit()||null}function ox(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function ix(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var sx={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},nx=class extends Ha{constructor(e){super(sx),this.params=e}postConstruct(){Go(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{Nr(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}};function rx(e,{column:t},o,i,s="ui"){if(o instanceof KeyboardEvent&&(o.key===R.TAB||o.key===R.ENTER||o.key===R.F2||o.key===R.BACKSPACE&&i))return!0;if(o?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=ax(e.gos,r),l=o?.type;return l==="click"&&o?.detail===1&&a===1||l==="dblclick"&&o?.detail===2&&a===2?!0:s==="api"?!!i:!1}function ax(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function Cr(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function ea(e,t){const o=t.column,i=t.rowNode,s=o.getColDef();if(!i)return Cr(e,t);const n=s.editable;return i.group&&s.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(i,o)?!0:Cr(e,t):o.isColumnFunc(i,n)?!0:Cr(e,t)}function lx(e,t,o="ui"){const i=ea(e,t);if(i||o==="ui")return i;const{rowNode:s,column:n}=t;for(const r of e.colModel.getCols())if(r!==n&&ea(e,{rowNode:s,column:r}))return!0;return!1}var gn=(e,t=!1)=>{if(e!==void 0)return mt(e)||t&&e.state==="editing"};function ug(e,t,o=!1){return gn(e.editModelSvc?.getEdit(t),o)}var hg=(e,t,o)=>{if(e)for(let i=0,s=e.length;i<s;++i){const n=e[i];if(n.data&&(gn(t?.getEdit({rowNode:n,column:o}))||gn(t?.getEdit({rowNode:n.pinnedSibling,column:o})))||hg(n.childrenAfterGroup,t,o))return!0}};function gg(e,t){const{column:o,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!i?.footer?!1:hg(i?.childrenAfterGroup,e.editModelSvc,o)}function pg(e,{rowNode:t,column:o}){if(t=t.pinnedSibling,!!t)return gn(e.editModelSvc?.getEdit({rowNode:t,column:o}))}var cx=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:o}=this;if(t?.isBatchEditing()&&t.isEditing()){const s=ug(o,e)||gg(o,e)||pg(o,e);this.applyBatchingStyle(s)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},dx=class extends x{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t?.getEditRow(i);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t?.getEditRow(i)),s){const r=Array.from(s.keys()).some(a=>{const l={rowNode:i,column:a};return ug(o,l,!0)||gg(o,l)||pg(o,l)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const o=!!this.editSvc?.isBatchEditing(),i=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:s})=>{s.toggleCss("ag-row-editing",i&&t),s.toggleCss("ag-row-batch-edit",i&&t&&o),s.toggleCss("ag-row-inline-editing",t),s.toggleCss("ag-row-not-inline-editing",!t),s.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},ux=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;e.forEachNode(n=>i.has(n)&&s.add(n)),t?.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t?.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n));for(const n of i)s.has(n)||o.removeEdits({rowNode:n});return s},hx=({editModelSvc:e},t,o)=>{for(const i of t)e?.getEditRow(i)?.forEach((s,n)=>!o.has(n)&&e.removeEdits({rowNode:i,column:n}))},gx=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());hx(e,ux(e,i),t)},px=new Set(["undo","redo","paste","bulk","rangeSvc"]),fx=new Set(["ui","api"]),fg={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},mx=new Set(Object.keys(fg)),Cx=new Set(["paste","rangeSvc","cellClear","redo","undo"]),vr={cancel:!0,source:"api"},vx={cancel:!1,source:"api"},wo={checkSiblings:!0},Zt={force:!0,suppressFlash:!0},wx={force:!0},bx=class extends x{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,vr),this.createStrategy(i)});const t=gx(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,vr):this.isEditing()&&(this.batch?eo(e,this.model.getEditPositions()):this.stopEditing(void 0,vx)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,vr))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:o,strategy:i}=this,s=jc(o,e);if(i){if(i.beanName===s)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){const s=rx(this.beans,e,t,o,i);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,o="ui"){return this.strategy?.shouldStop(e,t,o)??null}shouldCancelEditing(e,t,o="ui"){return this.strategy?.shouldCancel(e,t,o)??null}validateEdit(){return oR(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??wo)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=re(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const c=this.shouldStartEditing(e,i,o,s);if(c===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:s,ignoreEventKey:n,startedEdit:o,silent:r})}stopEditing(e,t){const o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let i=!1,{edits:s}=o;try{const n=this.processStopRequest(o);return i||(i=n.res),s=n.edits,this.finishStopEditing({...o,edits:s,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:o=null,cancel:i=!1,source:s="ui",forceCancel:n=!1,forceStop:r=!1,commit:a=!1}=t||{};if(mx.has(s)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?fg[s]:s;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,wo))||!this.strategy||this.stopping)return null;const d=re(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);const u=!i&&(!!this.shouldStopEditing(e,o,l)||(this.committing||s==="paste")&&!this.batch)||r,h=i&&!!this.shouldCancelEditing(e,o,l)||n;return{cancel:i,cellCtrl:d,edits:this.model.getEditMap(!0),event:o??null,forceCancel:n,forceStop:r,commit:a,position:e,source:s,treatAsSource:l,willCancel:h,willStop:u}}processStopRequest(e){const{event:t,position:o,willCancel:i,willStop:s}=e;return s||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,o)?{res:!1,edits:this.handleMidBatchKey(t,o,e)}:(io(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(o),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:o}=this,{cancel:i,commit:s,edits:n,event:r,source:a,willCancel:l,willStop:c}=e,d=!this.batch||!l;io(t,{persist:d,isCancelling:l||i,isStopping:c});const u=o.getEditMap(),g=!l&&(!this.batch||s)?this.processEdits(u,a):[];i?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(r,s),this.clearValidationIfNoOpenEditors();for(const f of g)o.clearEditValue(f);this.bulkRefreshMap(n);for(const f of o.getEditPositions(u)){const m=re(t,f),C=mt(f);m?.refreshCell({force:!0,suppressFlash:!C})}return{res:c,edits:u}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,o){const{beans:i,model:s}=this,{cellCtrl:n,edits:r}=o,{key:a}=e,l=a===R.ENTER,c=a===R.ESCAPE,d=a===R.TAB;if(l||d||c){if(l||d)io(i,{persist:!0});else if(c&&n){const{rowNode:u,column:h}=n;if(this.batch&&u&&h){const g={rowNode:u,column:h};eo(i,[g],{silent:!0}),this.model.stop(g,!0,!0),re(i,g)?.refreshCell(Zt)}else this.revertSingleCellEdit(n)}return this.batch?this.strategy?.cleanupEditors():eo(i,s.getEditPositions(),{event:e,cancel:c}),e.preventDefault(),this.bulkRefreshMap(r,{suppressFlash:!0}),s.getEditMap()}return r}finishStopEditing({cellCtrl:e,edits:t,params:o,position:i,res:s,commit:n,forceCancel:r,willCancel:a,willStop:l}){const c=this.beans;s&&i&&(!this.batch||n)&&this.model.removeEdits(i),this.navigateAfterEdit(o,e?.cellPosition),Gi(c),this.clearValidationIfNoOpenEditors();const{rowRenderer:d,formula:u}=c;if(a&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){u?u.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});const h=l&&n;(h||a&&r)&&this.dispatchBatchStopped(t,h)}}dispatchBatchStopped(e,t){let o;t&&(o=j0(e),o.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",o??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:o,suppressNavigateAfterEdit:i}=e;if(!(o instanceof KeyboardEvent)||i)return;const{key:n,shiftKey:r}=o,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(n!==R.ENTER||!a)return;const l=r?R.UP:R.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t){const o=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,s=[],{changeDetectionSvc:n}=this.beans;n?.beginDeferred();try{for(const r of o){const a=e.get(r);for(const l of a.keys()){const c=a.get(l),d={rowNode:r,column:l};if(mt(c)&&!i){const u=re(this.beans,d);this.setNodeDataValue(r,l,c.pendingValue,u,t)||s.push(d)}}}}finally{n?.endDeferred()}return s}setNodeDataValue(e,t,o,i,s="edit"){const n=fx.has(s)?"edit":s;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,o,n)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const o=this.model.getEdit(e);o&&o.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:o.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let o=Zt;t?.forceRefreshOfEditCellsOnly&&(o={...Sx(e),...Zt}),this.beans.rowRenderer.refreshCells(o)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){Se(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){Se(this.gos,this.beans.rowModel)&&e.forEach((o,i)=>{for(const s of o.keys())this.refCell({rowNode:i,column:s},o.get(s),t)})}refCell({rowNode:e,column:t},o,i={}){const{beans:s,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const c=e.sibling;c&&a.add(c);let d=e.parent;for(;d;)d.sibling?.footer&&n.get("groupTotalRow")||!d.parent&&d.sibling&&n.get("grandTotalRow")?a.add(d.sibling):a.add(d),d=d.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},o);for(const u of r)re(s,{rowNode:u,column:t})?.refreshCell(i);for(const u of a){const h=re(s,{rowNode:u,column:t});h&&(h.refreshCell(i),!i.force&&this.batch&&h.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:o,beans:i}=this,s=e.rowNode;if(s.group&&e.column.getColDef().groupRowEditable==null){if(o.get("treeData")){if(!s.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}const n=jc(o)==="fullRow"?lx(i,e,t):ea(i,e);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){if(this.hasValidationErrors(e)){const i=re(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),o&&(i&&!i.hasBrowserFocus()&&i.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const o=re(this.beans,e);o?.comp?.getCellEditor()&&(eo(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Wo(this.beans,e,{silent:!0}),no(this.beans),o?.refreshCell(Zt),t&&(o?.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){no(this.beans);const t=re(this.beans,e);t&&(t.refreshCell(Zt),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let o=!1;return e?.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof mi&&n&&(s=this.strategy?.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getPendingEditValue(e,t,o){if(o==="data"||o==="batch"&&!this.batch)return;const i=this.model.getEdit({rowNode:e,column:t},wo);if(!i||this.stopping&&!this.batch&&!i.editorState?.cellStartedEditing)return;if(o==="edit"){const n=i.editorValue;if(n!=null&&n!==Ie)return n}const s=i.pendingValue;if(s!==Ie)return s}getCellDataValue(e){const t=this.model.getEdit(e,wo);if(t){const o=t.pendingValue;if(o!==Ie)return o;const i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){$0(this,this.beans,e)}createPopupEditorWrapper(e){return new nx(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:o,sourceValue:i,state:s}=t;return o===i||s==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),this.beans.editModelSvc?.removeEdits(e),re(this.beans,e)?.refreshCell(Zt),!0)}setDataValue(e,t,o){try{const i=this.batch,s=this.isEditing(i?void 0:e);if((!s||this.committing)&&!i&&!Cx.has(o)||!s&&!i&&o==="paste"||o==="batch"&&!i)return;if(o==="edit"){if(s&&this.applyEditorValue(e,t))return!0;if(!i)return}if(this.strategy??(this.strategy=this.createStrategy()),o==="batch"||o==="edit")return this.applyDirectValue(e,t,o);const n=this.beans;let r;if(i?r="ui":this.committing?r=o??"api":r="api",!o||px.has(o))return this.applyDirectValue(e,t,o);const a=this.applyExistingEdit(e,t,o,r);return a!==void 0?a:(Yo(n,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,o,i){const s=this.model.getEdit(e);if(s)return s.pendingValue===t?!1:s.sourceValue!==t?(Yo(this.beans,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...s,pendingValue:t}),!0)}applyEditorValue(e,t){const o=this.beans,i=re(o,e),s=i?.comp?.getCellEditor();return!i||!s?!1:(Yo(o,e,t,"edit",void 0,{persist:!0}),i.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in s?(s.agSetEditValue(t),!0):s.refresh&&i.editCompDetails?(s.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{const r=re(this.beans,e);r?.focusCell(!0),r?.comp?.getCellEditor()?.focusIn?.()}),eo(o,[e],{silent:!0,cancel:!0}),Wo(o,e,{silent:!0}),no(o),re(o,e)?.refreshCell(Zt),!0))}applyDirectValue(e,t,o){const i=this.beans;if(this.batch){if(o==="batch"&&re(i,e)?.comp?.getCellEditor()){const{editModelSvc:r,valueSvc:a}=i,{rowNode:l,column:c}=e;r?.getEdit(e)?.sourceValue===void 0&&r?.setEdit(e,{sourceValue:a.getValue(c,l,"data")}),r?.setEdit(e,{pendingValue:t})}else Yo(i,e,t,o,void 0,{persist:!0}),o!=="batch"&&this.cleanupEditors();return Gi(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}Yo(i,e,t,o,void 0,{persist:!0});const s=re(i,e),n=this.setNodeDataValue(e.rowNode,e.column,t,s,o);return this.syncEditAfterCommit(e,n),Gi(i),re(i,e)?.refreshCell(n?wx:Zt),n}handleColDefChanged(e){Q0(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:o}=this;if(!this.batch||!o.hasRowEdits(e.rowNode,wo))return;const{rowNode:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=o.getEditRowDataValue(s,wo),{compDetails:n}}return{valueToDisplay:r}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,o,i){this.strategy?.dispatchCellEvent(e,t,o,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return K(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){if(!o||o.length===0)return;const{beans:i,rangeSvc:s,valueSvc:n}=this,{formula:r}=i;io(i,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,c=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),c=!0);const d=r?.isFormula(l)??!1;o.forEach(h=>{const g=h.columns.some(f=>f?.isAllowFormula());if(s?.forEachRowInRange(h,f=>{const m=kt(i,f);if(m===void 0)return;const C=a.get(m)??new Map;let v=l;for(const w of h.columns){if(!w)continue;const b=!!d&&w.isAllowFormula();if(this.isCellEditable({rowNode:m,column:w},"api")){const y=n.getValue(w,m,"data",!0);let S=n.parseValue(w,m??null,v,y);Number.isNaN(S)&&(S=null),C.set(w,{editorValue:void 0,pendingValue:S,sourceValue:y,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}b&&(v=r?.updateFormulaByOffset({value:v,columnDelta:1}))}C.size>0&&a.set(m,C),d&&g&&(l=r?.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(a),this.batch){this.cleanupEditors(),Gi(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,c&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}});const u=re(i,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new cx(e,this.beans)}createRowStyleFeature(e){return new dx(e,this.beans)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:h}of e){const g=r?i.getCol(r):l?i.getCol(l):a;if(!g)continue;const f=kt(o,{rowIndex:c,rowPinned:d});if(!f)continue;const m=s.getValue(g,f,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!mt({pendingValue:u,sourceValue:m})&&h!=="editing")continue;let C=n.get(f);C||(C=new Map,n.set(f,C)),u===void 0&&(u=Ie),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:m,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=re(this.beans,e);if(!t||!this.isEditing(t,wo))return;const o=this.model.getEdit(t);if(!o||!mt(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return re(this.beans,e)}};function Sx(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function jc(e,t){return t??e.get("editType")??"singleCell"}var mg=class extends x{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:i,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=re(s,o));const{gos:r,editModelSvc:a}=s,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:kt(s,{rowIndex:d,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const f=!g,m=!!a?.getCellValidationModel().hasCellValidation(h),C=f&&m;!(o||l)||i.stopEditing(void 0,{cancel:C,source:l&&f?"api":void 0,event:n})||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const o of this.model.getEditPositions())ns(this.beans,o,{cancel:!0},re(this.beans,o)),this.model.stop(o,t,!0);return!0}stopCommitted(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const r of o)i.all.push(r),(this.model.getCellValidationModel().getCellValidation(r)?.errorMessages?.length??0)>0?i.fail.push(r):i.pass.push(r);const s=this.processValidationResults(i),n=this.editSvc.isBatchEditing()&&!t;for(const r of s.destroy)ns(this.beans,r,{event:e},re(this.beans,r)),this.model.stop(r,n,!1);for(const r of s.keep){const a=re(this.beans,r);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){io(this.beans,{persist:!1});const o=this.model.getEditPositions(),i=[];if(e)for(const s of o)s.rowNode!==e&&i.push(s);else for(const s of o)i.push(s);eo(this.beans,i),Gi(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,o=t?.getCellEditor();if(o?.focusIn)o.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:o=!1,startedEdit:i,position:s,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!o&&t.key||void 0;q0(this.beans,n,s,r,t,i)}dispatchCellEvent(e,t,o,i){const s=re(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t,o){if(o)return;const i=dn(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&(o==="ui"||o==="edit")?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===R.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===R.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((i,s)=>{i.forEach((n,r)=>{n.state==="editing"&&o.push({...n,rowNode:s,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),o.length>0){const i=o.at(-1),s=i.pendingValue===Ie?void 0:i.pendingValue;this.start({position:i,event:new KeyboardEvent("keydown",{key:s}),source:"api"});const n=re(this.beans,i);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},yx=class extends mg{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,o="ui"){const{rowNode:i,beans:s}=this,{rowNode:n}=e||{};if(!dn(s,{rowNode:i}))return!0;const a=super.shouldStop({rowNode:i},t,o);return a!==null?a:i?n!==i:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:o,startedEdit:i,event:s,ignoreEventKey:n}=e,{rowNode:r}=t,{beans:a,model:l,startedRows:c}=this;this.rowNode!==r&&super.cleanupEditors(t);const d=a.visibleCols.allCols,u=[],h=[];for(const g of d)g.isCellEditable(r)&&h.push(g);if(h.length!=0){c.has(r)||(this.dispatchRowEvent({rowNode:r},"rowEditingStarted",o),c.add(r));for(const g of h){const f={rowNode:r,column:g};u.push(f),l.start(f)}this.rowNode=r,this.setupEditors({cells:u,position:t,startedEdit:i,event:s,ignoreEventKey:n})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:o}=this;return t&&!o.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:o,beans:i,model:s,editSvc:n}=this;if(o&&!s.hasRowEdits(o))return!1;const r=[];if(s.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const c of a.values())if(mt(c)){r.push(l);break}}}),no(i),n.checkNavWithValidation({rowNode:o})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!n.isBatchEditing())for(const a of r)this.dispatchRowEvent({rowNode:a},"rowValueChanged");return this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if(o?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:i,gos:s,model:n}=this;if(i.editSvc?.isRangeSelectionEnabledWhileEditing())return;const r=re(i,o);s.get("invalidEditValueMode")==="block"&&r&&(n.getCellValidationModel().getCellValidation(r)||n.getRowValidationModel().getRowValidation(r))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:o}=this;for(const i of o)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);o.clear()}destroyEditorsForRow(e){const t=dn(this.beans,{rowNode:e});if(!t)return;const o={};for(const i of t.getAllCellCtrls())i.comp?.getCellEditor()&&ns(this.beans,i,o,i)}moveToNextEditingCell(e,t,o,i="ui",s=!1){const{beans:n,model:r,gos:a,editSvc:l}=this,c=e.cellPosition;let d;r.suspend(!0);try{d=n.navigation?.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{r.suspend(!1)}if(d===!1)return null;if(d==null)return!1;const u=d.cellPosition,h=e.isCellEditable(),g=d.isCellEditable(),f=u&&c.rowIndex===u.rowIndex&&c.rowPinned===u.rowPinned;h&&this.setFocusOutOnEditor(e),this.restoreEditors();const m=a.get("suppressStartEditOnTab");return g&&!s?m?d.focusCell(!0,o):(d.comp?.getCellEditor()||Wo(n,d,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(d),d.focusCell(!1,o)):(g&&s&&this.setFocusInOnEditor(d),d.focusCell(!0,o)),!f&&!s&&(l?.stopEditing({rowNode:e.rowNode},{event:o,forceStop:!0}),l?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(d,!0),m?d.focusCell(!0,o):l.startEditing(d,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:g||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((o,i)=>o.forEach(({state:s},n)=>{if(s!=="editing")return;const r=re(e,{rowNode:i,column:n});r&&!r.comp?.getCellEditor()&&Wo(e,r,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},Rx=class extends mg{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const i=super.shouldStop(e,t,o);if(i!==null)return i;const s=e?.rowNode,n=e?.column,r=this.rowNode,a=this.column;return(!r||!a)&&s&&n?null:r!==s||a!==n?!0:!r&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:o,event:i,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:o,event:i,ignoreEventKey:s})}dispatchRowEvent(e,t,o){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,r=kt(this.beans,{rowIndex:i,rowPinned:n}),a=qr(s),l=t.getCol(a),c=e.previousParams;if(c){const d=qr(c.column);if(c?.rowIndex===i&&d===a&&c?.rowPinned===n)return}e.type=="cellFocused"&&(o?.isRangeSelectionEnabledWhileEditing()||o?.isEditing({rowNode:r,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=ei(this.beans,n)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:o}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,d=e.isCellEditable(),u=a.isCellEditable(),h=c&&r.rowIndex===c.rowIndex&&r.rowPinned===c.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");let f=!1;if(!h&&!s&&(super.cleanupEditors(a,!0),g?a.focusCell(!0,o):(f=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:u}))),u&&!s){if(a.focusCell(!1,o),g)a.focusCell(!0,o);else if(!a.comp?.getCellEditor()){if(!f){const m=this.editSvc?.isEditing(a,{withOpenEditor:!0});Wo(this.beans,a,{event:o,cellStartedEdit:!0,silent:m})}this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&s&&this.setFocusInOnEditor(a),a.focusCell(!0,o);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},mo={moduleName:"EditCore",version:L,beans:[U0,bx],apiFunctions:{getEditingCells:ZE,getEditRowValues:QE,getCellEditorInstances:K0,startEditingCell:ex,stopEditing:JE,isEditing:XE,validateEdit:tx},dynamicBeans:{singleCell:Rx,fullRow:yx},dependsOn:[Tn,cg],css:[mE]},Fx={moduleName:"UndoRedoEdit",version:L,beans:[fE],apiFunctions:{undoCellEditing:jE,redoCellEditing:YE,getCurrentUndoSize:ox,getCurrentRedoSize:ix},dependsOn:[mo]},Ex={moduleName:"TextEditor",version:L,userComponents:{agCellEditor:qc,agTextCellEditor:qc},dependsOn:[mo]},xx={moduleName:"NumberEditor",version:L,userComponents:{agNumberCellEditor:{classImp:kE}},dependsOn:[mo]},Px={moduleName:"DateEditor",version:L,userComponents:{agDateCellEditor:yE,agDateStringCellEditor:EE},dependsOn:[mo]},Dx={moduleName:"CheckboxEditor",version:L,userComponents:{agCheckboxCellEditor:vE},dependsOn:[mo]},Mx={moduleName:"SelectEditor",version:L,userComponents:{agSelectCellEditor:$E},dependsOn:[mo]},Tx={moduleName:"LargeTextEditor",version:L,userComponents:{agLargeTextCellEditor:ME},dependsOn:[mo]},Ix={moduleName:"CustomEditor",version:L,dependsOn:[mo]},Cg={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},Ax=new Set(Object.values(Cg));function Jt(e,t){const o=e.filterUi;if(!o)return null;if(o.created)return o.promise;if(t)return null;const i=o.create(o.refreshed),s=o;return s.created=!0,s.promise=i,i}function kx(e,t,o,i,s,n,r){return t.refresh?.({...o,model:i,source:n,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;vg(l,c,i,s,n,r)}})}function vg(e,t,o,i,s,n){e?.refresh?.({...t,model:o,state:i,source:s,additionalEventAttributes:n})}function wg(e,t,o,i){const s=e();s?.created&&s.promise.then(n=>{const r=t();vg(n,s.filterParams,r,o()??{model:r},"ui",i)})}function Yc(e){let t,o=!1,i;const{action:s,filterParams:n,getFilterUi:r,getModel:a,getState:l,updateState:c,updateModel:d,processModelToApply:u}=e;switch(s){case"apply":{const h=l();i=h?.model??null,u&&(i=u(i)),t={state:h?.state,model:i},o=!0;break}case"clear":{t={model:null},n?.buttons?.includes("apply")||(o=!0,i=null);break}case"reset":{t={model:null},o=!0,i=null;break}case"cancel":{t={model:a()};break}}c(t),o?d(i):wg(r,a,l,{fromAction:s})}function Te(e,t){return e[t]??null}var Lx=class extends $a{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,o,i,s){this.comp=e;const n=ds(this,this.beans.context,s);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return K(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,o=!!e.floatingFilter;this.active=t&&o}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Je("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new ls(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Ci(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(ve(t)===this.eGui)return;const s=$o(t,this.eGui,null,e.shiftKey);if(s){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let o=this.column;do if(o=e?t.getColBefore(o):t.getColAfter(o),!o)break;while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case R.UP:case R.DOWN:case R.LEFT:case R.RIGHT:if(t)return;Bo(e);case R.ENTER:t&&Ho(this.eGui)&&e.preventDefault();break;case R.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Eo(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){const s=this.lastFocusEvent,n=!!(s&&s.key===R.TAB);if(s&&n){const r=s.shiftKey;Ho(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new Ua(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Ze(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:o,gos:i}=this,s=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(i.get("enableFilterHandlers")){const d=n;let u="filter";d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":n?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(o),c=n?{...n,columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(o,{filterChanged:s}),t?.isFilterActive(o)&&s(null)}setupWidth(e){const t=()=>{const o=`${this.column.getActualWidth()}px`;this.comp.setWidth(o)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,s=this.active?i?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!s?this.updateCompDetails(e,s,o):n.then(r=>{!r||i?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,o):this.updateFloatingFilterParams(s,"colDef")})}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let o=e.params;this.comp.getFloatingFilterComp()?.then(i=>{typeof i?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(o={...o,model:Te(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),i.refresh(o))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function Ox(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:o,positionBy:"auto"})}function Gx(e){e.menuSvc?.hidePopupMenu()}var Hx=class extends x{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Zc(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,o){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){Zc(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(Ze(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&lo(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Mo()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Ze(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!Ze(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return Ze(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,o,i){const{positionBy:s,onClosedCallback:n}=t,r=t.column;if(s==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,o,n,i)}else if(s==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,o,n,i)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),qt(a,()=>{const c=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);c&&e?.showMenuAfterButtonClick(r,c.getAnchorElementForMenu(i),o,n,i)})}}};function Qc(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}function Zc(e){const{enterpriseMenuFactory:t,filterMenuFactory:o,gos:i}=e;return t&&Ze(i)?t:o}var Bx={moduleName:"SharedMenu",version:L,beans:[Hx],apiFunctions:{showColumnMenu:Ox,hidePopupMenu:Gx}},Vx=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function Nx(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function Wx(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function zx(e,t){const o=e.colModel.getColDefCol(t);if(o)return e.colFilter?.destroyFilter(o,"api")}function _x(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function Ux(e){return e.filterManager?.getFilterModel()??{}}function $x(e,t,o){const{gos:i,colModel:s,colFilter:n}=e;o&&!i.get("enableFilterHandlers")&&(D(288),o=!1);const r=s.getColDefCol(t);return r?n?.getModelForColumn(r,o)??null:null}function Kx(e,t,o){return e.filterManager?.setColumnFilterModel(t,o)??Promise.resolve()}function qx(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"})}function jx(e){e.menuSvc?.hideFilterMenu()}function Yx(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}return e.colFilter?.getHandler(o,!0)}function Qx(e,t){const{colModel:o,colFilter:i,gos:s}=e;if(!s.get("enableFilterHandlers")){D(287);return}const{colId:n,action:r}=t;if(n){const a=o.getColById(n);a&&i?.updateModel(a,r)}else i?.updateAllModels(r)}var Jc={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Xc=["january","february","march","april","may","june","july","august","september","october","november","december"];function Zx(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function Jx(e,t){if(e==null)return-1;if(t==null)return 1;const o=et(e),i=et(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:String(e).localeCompare(String(t))}function ed(e){return e instanceof Date&&!isNaN(e.getTime())}var ta={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:ed}),dateString:({dataTypeDefinition:e})=>({comparator:(t,o)=>{const i=e.dateParser(o);return o==null||i<t?-1:i>t?1:0},isValidDate:t=>typeof t=="string"&&ed(e.dateParser(t))}),dateTime:e=>ta.date(e),dateTimeString:e=>ta.dateString(e),object:()=>{},text:()=>{}},oa={number:()=>({comparator:Zx}),bigint:()=>({comparator:Jx}),boolean:({t:e})=>({valueFormatter:t=>O(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:o=>{const i=e(o);return O(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(o,i)=>{if(o==="NaN")return t("invalidDate","Invalid Date");if(i===1&&o!=null){const s=Xc[Number(o)-1];return t(s,Jc[s])}return o??t("blanks","(Blanks)")},treeListPathGetter:o=>Rs(o,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:o})=>({valueFormatter:i=>{const s=e(i);return O(s)?s:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>Rs(t.dateParser(i??void 0),!1),treeListFormatter:(i,s)=>{if(s===1&&i!=null){const n=Xc[Number(i)-1];return o(n,Jc[n])}return i??o("blanks","(Blanks)")}}),dateTime:e=>{const t=oa.date(e);return t.treeListPathGetter=Rs,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,o=oa.dateString(e);return o.treeListPathGetter=i=>Rs(t(i??void 0)),o},object:({formatValue:e,t})=>({valueFormatter:o=>{const i=e(o);return O(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function Xx(e,t,o,i,s,n,r){let a=t,l=o;const c=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!c&&(l=({column:g,node:f})=>s({column:g,node:f,value:n.valueSvc.getValue(g,f,"data")}));const u=(c?oa:ta)[i.baseDataType],h=u({dataTypeDefinition:i,formatValue:s,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var eP={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},tP={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function oP(e,t=!1){return(t?tP:eP)[e??"text"]}function iP(e,t,o){if(t==null)return null;let i=null;const{compName:s,jsComp:n,fwComp:r}=Su(e,t);return s?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:n==null&&r==null&&t.filter===!0&&(i=o()),i}var sP={filterHandler:()=>({doesFilterPass:()=>!0})};function td(e,t,o,i){if(!e.isPrimary())return!0;const n=!o;return!e.isValueActive()||!n?!1:t?!0:i}var nP=class extends x{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...Cg},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",o){const{colModel:i,dataTypeSvc:s,filterManager:n}=this.beans;if(s?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{const u=e[d];r.push(this.setModelOnFilterWrapper(c,u)),l.delete(d)}),l.forEach(c=>{const d=i.getColDefCol(c)||i.getCol(c);if(!d){D(62,{colId:c});return}if(!d.isFilterAllowed()){D(63,{colId:c});return}const u=this.getOrCreateFilterWrapper(d,!0);if(!u){D(64,{colId:c});return}r.push(this.setModelOnFilterWrapper(u,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});se.all(r).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,u)=>{const h=a?a[u]:null,g=l?l[u]:null;ji(h,g)||c.push(d.column)}),c.length>0?n?.onFilterChanged({columns:c,source:t}):o&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:o,initialModel:i,beans:{colModel:s}}=this;if(o.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);O(a)&&(t[r]=a)}),!e)for(const n of Object.keys(i)){const r=i[n];O(r)&&!o.has(n)&&s.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,o="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const s=t[i];this.state.set(i,{model:Te(this.model,i),state:s})}this.setModel(e,o,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let o=!1;return e.forEach((i,s)=>{const n=i.state;n!=null&&(o=!0,t[s]=n)}),o?t:void 0}getModelFromFilterWrapper(e){const o=e.column.getColId();if(e.isHandler)return Te(this.model,o);const i=e.filter;return i?typeof i.getModel!="function"?(D(66),null):i.getModel():Te(this.initialModel,o)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(D(67),!1):!1,{colModel:t,gos:o}=this.beans,i=!!Ys(o),s=[],n=[],r=(l,c,d)=>{c&&(td(l,t.isPivotMode(),t.isPivotActive(),i)?s.push(d):n.push(d))},a=[];return this.allColumnFilters.forEach(l=>{const c=l.column,d=c.getColId();if(l.isHandler)a.push(se.resolve().then(()=>{r(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const u=Jt(l);u&&a.push(u.then(h=>{r(c,e(h),{colId:d,isHandler:!1,comp:h})}))}}),se.all(a).then(()=>{this.activeAggregateFilters=s,this.activeColumnFilters=n})}updateFilterFlagInColumns(e,t){const o=[];return this.allColumnFilters.forEach(i=>{const s=i.column;if(i.isHandler)o.push(se.resolve().then(()=>{this.setColFilterActive(s,this.isHandlerActive(s),e,t)}));else{const n=Jt(i);n&&o.push(n.then(r=>{this.setColFilterActive(s,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),se.all(o)}doFiltersPass(e,t,o){const{data:i,aggData:s}=e,n=o?this.activeAggregateFilters:this.activeColumnFilters,r=o?s:i,a=this.model;for(let l=0;l<n.length;l++){const c=n[l],{colId:d,isHandler:u}=c;if(d!==t)if(u){const{handler:h,handlerParams:g}=c;if(!h.doesFilterPass({node:e,data:r,model:Te(a,d),handlerParams:g}))return!1}else{const h=c.comp;if(typeof h.doesFilterPass!="function"){ce(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:o}=this.beans,i=()=>{this.isAlive()&&o?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:o}=e,i=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(s=>{const{column:n,isHandler:r}=s;i!==n.getColId()&&(r&&s.handler.onAnyFilterChanged?.(),Jt(s,r)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(o=>{const i=o.isHandler;i&&o.handler.onNewRowsLoaded?.();const s=Jt(o,i);s&&t.push(s.then(n=>{n.onNewRowsLoaded?.()}))}),se.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:o,colModel:i}=this.beans;return(s,n)=>{const r=n?i.getCol(n):e;return r?o.getValue(r,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const o=t?.filter;return o?o.isFilterActive():Te(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=O(Te(this.model,e.getColId()));if(t)return t;const o=this.beans.groupFilter;return o?.isGroupFilter(e)?o.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Jt(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const o=Jt(t);return o?o.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const o=this.getOrCreateFilterWrapper(e,t);return o?.isHandler?o.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let o=this.cachedFilter(e);return!o&&t&&(o=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,o)),o}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return Uf(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":oP(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,o,i,s,n){const r=()=>{const c=this.createFilterCompParams(e,s,n),d=i(c,s);return Zm(this.beans.userCompFactory,t,d,o)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,o,i){const s=this.beans.selectableFilter;s?.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,o)??{},l=this.createFilterComp(e,t,o,i,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:r};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||D(281,{colId:e.getColId()})),{compDetails:c,handler:n,handlerGenerator:a,handlerParams:r,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:o,rowModel:i}=this.beans;return K(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>o?.doesRowPassOtherFilters(e.getColId(),s)??!0,rowModel:i})}createFilterCompParams(e,t,o,i){const s=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,i);if(n.filterChangedCallback=s,n.filterModifiedCallback=i?()=>{}:r=>this.filterModified(e,r),t){const r=n,a=e.getColId(),l=Te(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(c,d)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,d).then(()=>{s({...d,source:"columnFilter"})})},r.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},r.onAction=(c,d,u)=>{this.updateModel(e,c,d),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=c=>this.filterUiChanged(e,c),r.source=o}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,o){const i=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(o),s}createFilterWrapper(e){const{compDetails:t,handler:o,handlerGenerator:i,handlerParams:s,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(o)return delete this.initialModel[r],o.init?.({...s,source:"init",model:Te(this.model,r)}),{column:e,isHandler:!0,handler:o,handlerGenerator:i,handlerParams:s,filterUi:this.createFilterUiForHandler(t,n)};if(n){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,n,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,o){const{gos:i,frameworkOverrides:s,registry:n}=this.beans;let r;const a=g=>{const f=g.filter;if(vu(f)){const m=f.handler;return m||(r=f.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof f=="string"?f:void 0},l=i.get("enableFilterHandlers"),c=l?a(t):void 0,d=g=>()=>this.createBean(n.createDynamicBean(g,!0));let u,h;if(typeof c=="string"){const g=i.get("filterHandlers")?.[c];g!=null?u=g:Ax.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let g;const{compName:f,jsComp:m,fwComp:C}=Su(s,t);f?g=f:m==null&&C==null&&t.filter===!0&&(g=o),h=this.handlerMap[g],h&&(u=d(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:l?(Se(i)&&D(277,{colId:e.getColId()}),sP):void 0}createHandler(e,t,o){const i=this.createHandlerFunc(e,t,o);if(!i)return;const s=zn(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,s);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,o){const i=e.getColDef(),s=t(K(this.gos,{column:e,colDef:i})),n=this.createHandlerParams(e,o);return{handler:s,handlerParams:n}}createHandlerParams(e,t){const o=e.getColDef(),i=e.getColId(),s=this.filterChangedCallbackFactory(e);return K(this.gos,{colDef:o,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(i,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(i,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{s({...r,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:o,groupFilter:i}=this.beans;this.allColumnFilters.forEach((n,r)=>{let a;n.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const s=i&&e.every(n=>i.isGroupFilter(n));e.length>0&&!s&&o?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const o=this.beans.groupFilter;return o?.isGroupFilter(e)?o.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:o,frameworkOverrides:i,selectableFilter:s,gos:n}=this.beans,r=g=>{this.getOrCreateFilterUi(e)?.then(m=>{g(No(m))})},a=e.getColDef(),l=s?.isSelectable(a)?s.getFilterDef(e,a):a,c=iP(i,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",d=n.get("enableFilterHandlers"),u=zn(o,l,this.createFilterCompParams(e,d,"init",!0)),h=K(n,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(d){const g=h,f=e.getColId(),m=this.filterChangedCallbackFactory(e);g.onUiChange=C=>this.floatingFilterUiChanged(e,C),g.model=Te(this.model,f),g.onModelChange=(C,v)=>{this.updateStoredModel(f,C),this.refreshHandlerAndUi(e,C,"floating",!0,v).then(()=>{m({...v,source:"columnFilter"})})},g.getHandler=()=>this.getHandler(e,!0),g.source="init"}return eC(o,a,h,c)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,o,i){const s="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(o,i);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialModel[o],i&&this.disposeFilterWrapper(i,t).then(s=>{s&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let o=!1;const{column:i,isHandler:s,filterUi:n}=e,r=i.getColId();s&&(o=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(n){if(n.created)return n.promise.then(l=>(o=s?o:!!l?.isFilterActive(),this.destroyBean(l),a(),o));a()}return se.resolve(o)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const o=this.allColumnFilters.get(e);if(!o)return;const i=this.beans,s=o.column,n=s.getColDef(),r=s.isFilterAllowed(),a=this.getDefaultFilter(s),l=i.selectableFilter,c=l?.isSelectable(n)?l.getFilterDef(s,n):n,d=r?this.createHandlerFunc(s,c,this.getDefaultFilter(s)):void 0,u=!!d,h=o.isHandler;if(h!=u){this.destroyFilter(s,"paramsUpdated");return}const{compDetails:g,createFilterUi:f}=(r?this.createFilterComp(s,c,a,C=>C,u,"colDef"):null)??{compDetails:null,createFilterUi:null},m=g?.params??zn(i.userCompFactory,c,this.createFilterCompParams(s,u,"colDef"));if(h){const C=d?.handlerNameOrCallback??d?.filterHandler,v=Te(this.model,e);if(o.handlerGenerator!=C){const w=o.handler,{handler:b,handlerParams:y}=this.createHandlerFromFunc(s,d.filterHandler,m);o.handler=b,o.handlerParams=y,o.handlerGenerator=C,delete this.model[e],b.init?.({...y,source:"init",model:null}),this.destroyBean(w),v!=null&&this.beans.filterManager?.onFilterChanged({columns:[s],source:t})}else{const w=this.createHandlerParams(s,g?.params);o.handlerParams=w,o.handler.refresh?.({...w,source:"colDef",model:v})}}if(this.areFilterCompsDifferent(o.filterUi?.compDetails??null,g)||!o.filterUi||!g){this.destroyFilterUi(o,s,g,f);return}o.filterUi.filterParams=m,Jt(o,h)?.then(C=>{(C?.refresh?C.refresh(m):!0)===!1?this.destroyFilterUi(o,s,g,f):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:m})})}refreshHandlerAndUi(e,t,o,i,s){const n=this.cachedFilter(e);if(!n)return i&&this.getOrCreateFilterWrapper(e,!0),se.resolve();if(!n.isHandler)return se.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return kx(()=>{if(r){const{created:c,filterParams:d}=r;if(c)return r.promise.then(u=>u?{filter:u,filterParams:d}:void 0);r.refreshed=!0}return se.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},o,s)}setColumnFilterWrapper(e,t){const o=e.getColId();this.allColumnFilters.set(o,t),this.allColumnListeners.set(o,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(o)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:o}=e,{componentClass:i}=t;return!(o===i||o?.render&&i?.render&&o.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const o=this.getOrCreateFilterUi(t);return o?new Promise(i=>{o.then(s=>{i(No(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:o})=>{this.setModelForColumn(e,t).then(()=>o())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:i,model:s}=this,n=e.getColId(),r=i.get(n);return r?r.model??null:Te(s,n)}const o=this.cachedFilter(e);return o?this.getModelFromFilterWrapper(o):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let o=()=>{};const i=new Promise(s=>{o=s});return this.columnModelUpdates.push({key:e,model:t,resolve:o}),i}return new Promise(o=>{this.setModelForColumnLegacy(e,t).then(i=>o(i))})}getStateForColumn(e){return this.state.get(e)??{model:Te(this.model,e)}}setModelForColumnLegacy(e,t){const o=this.beans.colModel.getColDefCol(e),i=o?this.getOrCreateFilterWrapper(o,!0):null;return i?this.setModelOnFilterWrapper(i,t):se.resolve()}setColDefPropsForDataType(e,t,o){const i=e.filter,s=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof s!="string")return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;s==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,o)??{}:{filterParams:n,filterValueGetter:r}=Xx(s,l,c,t,o,a,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,o,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,i)}setModelOnFilterWrapper(e,t,o){return new se(i=>{if(e.isHandler){const n=e.column,r=n.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),o&&t===a){i();return}this.refreshHandlerAndUi(n,t,"api").then(()=>i());return}const s=Jt(e);if(s){s.then(n=>{if(typeof n?.setModel!="function"){D(65),i();return}(n.setModel(t)||se.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){O(t)?this.model[e]=t:delete this.model[e];const o=this.state.get(e),i={model:t,state:o?.state};this.state.set(e,i)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(o=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:o,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,o){const i=e.getColId(),s=this.cachedFilter(e),n=()=>s?.filterUi;Yc({action:t,filterParams:s?.filterUi?.filterParams,getFilterUi:n,getModel:()=>Te(this.model,i),getState:()=>this.state.get(i),updateState:r=>this.updateState(e,r),updateModel:r=>n()?.filterParams?.onModelChange(r,{...o,fromAction:t}),processModelToApply:s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0})}updateAllModels(e,t){const o=[];this.allColumnFilters.forEach((i,s)=>{const n=this.beans.colModel.getColDefCol(s);n&&Yc({action:e,filterParams:i.filterUi?.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>Te(this.model,s),getState:()=>this.state.get(s),updateState:r=>this.updateState(n,r),updateModel:r=>{this.updateStoredModel(s,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),o.push(this.refreshHandlerAndUi(n,r,"ui"))},processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}),o.length&&se.all(o).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();wg(()=>this.cachedFilter(e)?.filterUi,()=>Te(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:o}=this;for(const s of o)if(s.source==="COLUMN_MENU")return!1;let i=!1;for(const s of e.keys()){const n=e.get(s);if(n.valid===!1)return!1;(n.model??null)!==Te(t,s)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:o}=this;return(o.get(e)?.model??null)!==Te(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const o=this.beans.filterPanelSvc;return o?.isActive?!!o.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:o}=this.beans,i=!!Ys(this.gos),s=e.currentValue,n=s?this.activeColumnFilters:this.activeAggregateFilters,r=s?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of n){const c=t.getColById(l.colId),d=s&&!!o?.columns.length;c&&s===td(c,s,d,i)&&(r.push(l),a.push(l))}Ep(n,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function rP(e){return!!e.filterManager?.isAnyFilterPresent()}function aP(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var lP=class extends x{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,o="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,o)}setFilterModel(e,t="api",o){if(this.isAdvFilterEnabled()){o||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Ys(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:o,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):se.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:i};o&&_e(s,o),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Ys(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){D(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}};function cP(e){return{tag:"div",cls:e}}var dP=class extends ye{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(cP(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const o=this.buttons;if(this.buttons=e,o===e)return;const i=this.getGui();Xe(i);let s;this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,a=({type:c,label:d})=>{const u=v=>{this.dispatchLocalEvent({type:c,event:v})};["apply","clear","reset","cancel"].includes(c)||D(75);const h=c==="apply",f=st({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:d});this.activateTabIndex([f]),h&&(s=f);const m=v=>{v.key===R.ENTER&&(v.preventDefault(),u(v))},C=this.listeners;f.addEventListener("click",u),C.push(()=>f.removeEventListener("click",u)),f.addEventListener("keydown",m),C.push(()=>f.removeEventListener("keydown",m)),n.append(f)};for(const c of e)a(c);this.eApply=s;const l=this.validationTooltipFeature;s&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!s&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const o=this.eApply;o&&(Qi(o,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},uP=class extends ye{constructor(e,t,o,i,s,n){super(),this.column=e,this.wrapper=t,this.eventParent=o,this.updateModel=i,this.isGlobalButtons=s,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,o=t,i=o.useForm,s=i?"form":"div";this.setTemplate({tag:s,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=o,this.resetButtonsPanel(o),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:r})=>{n===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:n,state:r})=>{n===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:n,action:r,event:a})=>{n===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,o){const{buttons:i,readOnly:s}=t??{},{buttons:n,readOnly:r,useForm:a}=e;if(!o&&s===r&&ji(i,n))return;const l=n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons;let c=this.eButtons;if(l){const d=n.map(u=>{const h=`${u}Filter`;return{type:u,label:ft(this,h)}});if(this.applyActive=Fn(this.params),!c){c=this.createBean(new dP),this.appendChild(c.getGui());const u=this.column,h=g=>({event:f})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,f)};c?.addManagedListeners(c,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=c}c.updateButtons(d,a)}else this.applyActive=!1,c&&(_t(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){const t=this.hidePopup;if(!t)return;const o=e,i=o?.key;let s;(i===R.ENTER||i===R.SPACE)&&(s={keyboardEvent:o}),t(s),this.hidePopup=null}afterAction(e,t){const{params:o,applyActive:i}=this,s=o?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),s&&i&&this.close(t);break}case"reset":{s&&i&&this.close();break}case"cancel":{s&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===R.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},hP=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",gP={tag:"div",cls:"ag-filter"},pP=class extends ye{constructor(e,t,o){super(gP),this.column=e,this.source=t,this.enableGlobalButtonCheck=o,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??se.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:o,beans:{colFilter:i}}=this,s=i.getFilterUiForDisplay(t)??null;this.wrapper=s,s?.then(n=>{if(!n)return;const{isHandler:r,comp:a}=n;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new uP(t,n,i,i.updateModel.bind(i),c&&i.isGlobalButtons,c));this.comp=d,l=d.getGui()}else this.registerCSS(hP),l=a.getGui(),O(l)||D(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:o}=e;(t==="api"||t==="paramsUpdated")&&o.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Xe(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},fP=class extends x{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,o,i){e&&!e.isColumn||this.showPopup(e,s=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:o,mouseEvent:t,ePopup:s})},o,t.target,Ze(this.gos),i)}showMenuAfterButtonClick(e,t,o,i){if(e&&!e.isColumn)return;let s=-1,n="left";const r=Ze(this.gos);!r&&this.gos.get("enableRtl")&&(s=1,n="right");const a=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:o,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},o,t,r,i)}showPopup(e,t,o,i,s,n){const r=e?this.createBean(new pP(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){ce(57);return}const a=st({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:m=>this.trapFocusWithin(m,a)}),a.appendChild(r?.getGui());let l;const c=()=>r?.afterGuiDetached(),d=$f(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=m=>{Qc(e,!1,"contextMenu");const C=m instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),C&&i&&vt(i)&&Du(i)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),n?.()},h=this.getLocaleTextFunc(),g=s&&o!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:g});f&&(this.hidePopup=l=f.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:o,hidePopup:l})}),Qc(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==R.TAB||e.defaultPrevented||$o(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Ho(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},mP=class extends x{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,o){if(!t)return;const i=e.getColDef(),{selectableFilter:s,valueSvc:n,formula:r}=this.beans,a=o??s?.getFilterValueGetter(e.getColId())??i.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,i);const l=n.getValue(e,t,"data");return e.isAllowFormula()&&r?.isFormula(l)?r.resolveValue(e,t):l}executeFilterValueGetter(e,t,o,i,s){const{expressionSvc:n,valueSvc:r}=this.beans,a=K(this.gos,{data:t,node:i,column:o,colDef:s,getValue:r.getValueCallback.bind(r,i)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},CP={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},vP=class extends ye{constructor(){super(CP,[In]),this.eFloatingFilterText=W}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const o=e,i=o.getHandler();if(i.getModelAsString){const s=i.getModelAsString(o.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const o=t.getModelAsString(e);this.eFloatingFilterText.setValue(o)}})}refresh(e){this.init(e)}},wP=class extends ja{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},al=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const o=e.filterOptions??t;this.filterOptions!==o&&(this.filterOptions=o,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const o=[["displayKey"],["displayName"],["predicate","test"]],i=s=>s.some(n=>t[n]!=null)?!0:(D(72,{keys:s}),!1);if(!o.every(i)){this.filterOptions=e.filter(s=>s===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const o=t[0];if(typeof o=="string")return o;if(o.displayKey)return o.displayKey;D(73)}else D(74)}getCustomOption(e){return this.customFilterOptions[e]}};function $i(e,t,o){return o==null?e.splice(t):e.splice(t,o)}function pn(e){return e==null||typeof e=="string"&&e.trim().length===0}function bP(e){return e==="AND"||e==="OR"?e:"AND"}function SP(e,t,o){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(s=>s==null))return i(t,o)}function yP(e,t){let o=e.length;return o>t&&(e.splice(t),D(78),o=t),o}var RP=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function uo(e,t){const o=t.getCustomOption(e);if(o){const{numberOfInputs:i}=o;return i??1}return e&&RP.has(e)?0:e==="inRange"?2:1}var kn=class extends hC{constructor(e,t,o){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=o,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new al;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=bP(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),Qe(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,o)=>{const i=o===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const o=!e.operator,i=!t.operator;if(!o&&i||o&&!i)return!1;let n;if(o){const r=e,a=t;n=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;n=r.operator===a.operator&&ho(r.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return n}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),se.resolve();if(e.operator){const i=e;let s=i.conditions;s==null&&(s=[],D(77));const n=yP(s,this.maxNumConditions),r=this.getNumConditions();if(n<r)this.removeConditionsAndOperators(n);else if(n>r)for(let l=r;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const a=i.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),s.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),se.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(D(79),t=1),this.maxNumConditions=t;let o=e.numAlwaysVisibleConditions??1;o<1&&(D(80),o=1),o>t&&(D(81),o=t),this.numAlwaysVisibleConditions=o}createOption(){const e=this.getGui(),t=this.createManagedBean(new rl);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const o=this.createEValue();this.eConditionBodies.push(o),e.appendChild(o),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,s=>this.resetInput(s)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=st({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),o=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,s),this.resetJoinOperatorOr(o,i,s),this.isReadOnly()||(t.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(e,t,o){const i=this.createManagedBean(new wP);e.push(i);const s="ag-filter-condition-operator";return i.addCss(s),i.addCss(`${s}-${o}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const o of t)e.addOption(o);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,o=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:o?this.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let o=0;o<this.getNumConditions();o++)this.isConditionUiComplete(o)?e=o:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const o=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<o){this.removeConditionsAndOperators(o+1);const i=e+1,s=o-i;s>0&&this.removeConditionsAndOperators(i,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,s)=>{const n=this.isConditionDisabled(s,e);i.setDisabled(n||this.filterListOptions.length<=1),s===1&&(Qi(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((i,s)=>{me(i,this.isConditionBodyVisible(s))});const o=(t??this.getJoinOperator())==="OR";for(const i of this.eJoinAnds)i.setValue(!o,!0);for(const i of this.eJoinOrs)i.setValue(o,!0);this.forEachInput((i,s,n,r)=>{this.setElementDisplayed(i,s<r),this.setElementDisabled(i,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:o,eConditionBodies:i,eJoinPanels:s,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(o,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,o){const i=$i(e,t,o);for(const s of i)_t(s)}removeComponents(e,t,o){const i=$i(e,t,o);for(const s of i)_t(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const o=this.getInputs(0)[0];o instanceof Fo&&this.isConditionBodyVisible(0)?t=o.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,o=-1,i=!1;const s=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,o=r);else{const a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),i=!0,l&&o--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(o===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(o,s),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=o}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:o}=this;this.forEachInput((i,s,n,r)=>{if(!(i instanceof Fo))return;const a=s===0&&r>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",l=s===0&&r>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),c=o[n].getValue(),d=Iu(this,t,a,c);i.setInputPlaceholder(d),i.setInputAriaLabel(l)})}setElementValue(e,t,o){e instanceof Fo&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Nl(e)&&me(e.getGui(),t)}setElementDisabled(e,t){Nl(e)&&Qi(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Fo&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,o)=>{this.forEachPositionTypeInput(o,t,e)})}forEachPositionInput(e,t){const o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,t)}forEachPositionTypeInput(e,t,o){const i=uo(t,this.optionsFactory),s=this.getInputs(e);for(let n=0;n<s.length;n++){const r=s[n];r!=null&&o(r,n,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return uo(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(o=>o==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,o)=>this.resetJoinOperatorAnd(t,o,this.joinOperatorId+o)),this.eJoinOrs.forEach((t,o)=>this.resetJoinOperatorOr(t,o,this.joinOperatorId+o)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const o=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(o).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),o)}resetJoinOperatorOr(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),o)}resetJoinOperator(e,t,o,i,s){this.updateJoinOperatorDisabled(e.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,o)=>this.updateJoinOperatorDisabled(t,o);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const o=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,s,n)=>{n===t&&this.setElementValue(i,o[s]!=null?o[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,o,i)=>{this.setElementValue(t,o===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,o=>{this.attachElementOnChange(o,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},ll=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function ia(e){return e?.allowedCharPattern??null}function bg(e,t){const{filter:o,filterTo:i,type:s}=e||{};return[et(o),et(i)].slice(0,uo(s,t))}var FP=class extends kn{constructor(){super("bigintFilter",bg,ll),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!wi()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],o=this.eValuesTo[e];this.refreshInputPairValidation(t,o)}}refreshInputPairValidation(e,t,o=!1){const{bigintParser:i}=this.params,s=this.getParsedValue(e,i),n=this.getParsedValue(t,i),r=this.isInvalidValue(e,s),a=this.isInvalidValue(t,n),l=o?e:t,c=o?t:e,d=o?r:a,u=o?a:r;let h="";if(d)h=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!r&&!a){const g=EP(s,n,o);g&&(h=this.translate(g,[String(o?t.getValue():e.getValue())]))}l.setCustomValidity(h),u||c.setCustomValidity(""),h.length>0&&this.beans.ariaAnnounce.announceValue(h,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,s=this.state,n=i?.fromAction;return(n&&n!="apply"||o.model!==s.model||!this.areStatesEqual(o.state,s.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){super.setElementValue(e,t,o),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:o}=this,i=ia(e),s=st({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(s,t,"from",i),r=this.createFromToElement(s,o,"to",i),a=(d,u,h)=>()=>this.refreshInputPairValidation(d,u,h),l=a(n,r,!0);n.onValueChange(l),n.addGuiEventListener("focusin",l);const c=a(n,r,!1);return r.onValueChange(c),r.addGuiEventListener("focusin",c),s}createFromToElement(e,t,o,i){const s=this.createManagedBean(i?new $t({allowedCharPattern:i}):new $t);return s.addCss(`ag-filter-${o}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui()),s}removeEValues(e,t){const o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(o,i,s,n)=>{i<n&&t.push(et(o.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(o.filter=String(i[0])),i.length>1&&(o.filterTo=String(i[1])),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>t||(t=!o.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const o=e.getValue();return o==null||typeof o=="string"&&o.trim()===""?null:t?t(o):et(o)}isInvalidValue(e,t){const o=e.getValue();return o!=null&&String(o).trim()!==""&&t===null}};function EP(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Sg=class extends x{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,o=new al;this.optionsFactory=o,o.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(o,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,o=this.optionsFactory;o.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:o,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:o}=t,i=[];if(o){const r=t;i.push(...r.conditions??[])}else i.push(t);const s=o&&o==="OR"?"some":"every",n=this.params.getValue(e.node);return i[s](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:o,maxNumConditions:i}}=e;if(t==null)return;let n=yu(t)?t.conditions:[t];const r=o?.map(d=>typeof d=="string"?d:d.displayKey)??this.defaultOptions;if(!(!n||n.every(d=>r.find(u=>u===d.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const c=this.filterType;if((n&&!n.every(d=>d.filterType===c)||t.filterType!==c)&&(n=n.map(d=>({...d,filterType:c})),l=!0),typeof i=="number"&&n&&n.length>i&&(n=n.slice(0,i),l=!0),l){const d=n.length>1?{...t,filterType:c,conditions:n}:{...n[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,o){const i=this.optionsFactory,s=this.mapValuesFromModel(t,i),n=i.getCustomOption(t.type),r=SP(n,s,o);return r??(o==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,o,t,e))}},cl=class extends Sg{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:o,includeBlanksInGreaterThan:i,includeBlanksInLessThan:s,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(o)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,o){const i=o.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const s=this.comparator(),n=e[0]!=null?s(e[0],t):0;switch(i){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=s(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return pn(t);case"notBlank":return!pn(t);default:return D(76,{filterModelType:i}),!0}}},dl={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},xP={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Ln=class extends x{constructor(e,t,o){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=o}getModelAsString(e,t){const o=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?ft(this,"filterSummaryInactive"):null;if(e.operator!=null){const n=e,a=(n.conditions??[]).map(c=>this.getModelAsString(c,t)),l=n.operator==="AND"?"andCondition":"orCondition";return a.join(` ${ft(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?ft(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):o(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:a,displayName:l,numberOfInputs:c}=r||{};return a&&l&&c===0?o(a,l):this.conditionToString(n,i,n.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:o}=e;this.optionsFactory=t,this.filterParams=o}conditionForToolPanel(e,t,o,i,s,n){let r;const a=this.getTypeKey(e);return a&&(r=ft(this,a)),s&&n&&(r=this.getLocaleTextFunc()(s,n)),r!=null?t?`${r} ${ft(this,"filterSummaryInRangeValues",[o(),i()])}`:`${r} ${o()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},yg=class extends Ln{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=dl}conditionToString(e,t,o,i,s){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this),c=et(n),d=et(r);if(t){const u=this.conditionForToolPanel(a,o,()=>l(c),()=>l(d),i,s);if(u!=null)return u}return o?`${l(c)}-${l(d)}`:n!=null?l(c):`${a}`}},PP=class extends cl{constructor(){super(bg,ll),this.filterType="bigint",this.FilterModelFormatterClass=yg}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return et(e)!==null}},ul=class extends x{constructor(e){super(),this.params=e,this.eInput=W,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new $t(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const o=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:o,keydown:o})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:o}){const{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!o),i.setInputPlaceholder(o)}};function sa(e){const t=e?.trim();return t===""?e:t}function Rg(e,t){const{filter:o,filterTo:i,type:s}=e||{};return[o||null,i||null].slice(0,uo(s,t))}var Fg=class extends ye{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let o;t?o=e.conditions[0]:o=e,this.lastType=o.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const o=e;return this.isTypeEditable(o.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const o=e;this.onModelUpdated(o.model)}}setParams(e){const t=new al;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const o=this.optionsFactory.defaultOption;t||(this.lastType=o),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(o);this.setEditable(i)}refresh(e){this.params=e;const t=e,o=this.reactive;if((!o||t.source==="colDef")&&this.updateParams(e),o){const{source:i,model:s}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&uo(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},DP={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},hl=class extends Fg{constructor(){super(...arguments),this.eFloatingFilterInputContainer=W,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(DP)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:o,readOnly:i}=this,{filterPlaceholder:s,column:n,browserAutoComplete:r,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,c=e.filterParams.filterPlaceholder,d=s===!0?Iu(this,c,"filterOoo",l):s||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(n),autoComplete:r??!1,placeholder:d}),this.applyActive=Fn(a),!i){const u=Ga(a,o);t.setValueChangedListener(xe(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,o=t.getValue();Xe(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(o,!0)}syncUpWithParentFilter(e){const t=e.key===R.ENTER,o=this.reactive;if(o&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:s,lastType:n}=this;let r=i.getValue();if(s.filterParams.trimInput&&(r=sa(r),i.setValue(r,!0)),o){const a=s,l=a.model,c=this.convertValue(r),d=c==null?null:{...l??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else s.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},MP=class extends hl{constructor(){super(...arguments),this.FilterModelFormatterClass=yg,this.filterType="bigint",this.defaultOptions=ll}updateParams(e){const t=e.filterParams;ia(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=ia(t),this.bigintParser=t?.bigintParser;const o=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new ul({config:o}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):et(e)}},od=".ag-input-field-input",Eg=class{constructor(e,t,o,i,s,n){this.context=e,this.eParent=s,this.alive=!0,this.debouncedReport=xe({isAlive:()=>this.alive},id,500),this.timeoutHandle=null,Jm(t,o,i)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;s.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&a.setDisabled?.(c),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){me(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){const o=this.dateComp?.getGui().querySelector(od);if(o&&"setCustomValidity"in o){const i=e.length>0;o.setCustomValidity(e),i?t?this.timeoutHandle=this.debouncedReport(o):id(o):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),va(o,i)}}getValidity(){return this.dateComp?.getGui().querySelector(od)?.validity}};function id(e){e.reportValidity()}var gl=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function xg(e,t){const{dateFrom:o,dateTo:i,type:s}=e||{};return[o&&Ke(o,void 0,!0)||null,i&&Ke(i,void 0,!0)||null].slice(0,uo(s,t))}var sd=1e3,nd=1/0,TP=class extends kn{constructor(){super("dateFilter",xg,gl),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=sd,this.maxValidYear=nd,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!wi()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(d!=null)if(isNaN(d))D(82,{param:l});else return d==null?c:Number(d);return c},o=t("minValidYear",sd),i=t("maxValidYear",nd);this.minValidYear=o,this.maxValidYear=i,o>i&&D(83);const{minValidDate:s,maxValidDate:n}=e,r=s instanceof Date?s:Ke(s);this.minValidDate=r;const a=n instanceof Date?n:Ke(n);this.maxValidDate=a,r&&a&&r>a&&D(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,o=!1){const{dateConditionFromComps:i,dateConditionToComps:s,beans:n}=this,r=i[e],a=s[e],l=uo(this.getConditionType(e),this.optionsFactory),c=r.getDate(),d=a.getDate(),u=l>=2?IP(c,d,t):null,h=u?this.translate(u,[String(t?d:c)]):"",g=!wi()&&!o;(t?r:a).setCustomValidity(h,g),(t?a:r).setCustomValidity("",g),h.length>0&&n.ariaAnnounce.announceValue(h,"dateFilter")}createDateCompWrapper(e,t,o){const{beans:{userCompFactory:i,context:s,gos:n},params:r}=this,a=o==="from",l=new Eg(s,i,r.colDef,K(n,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:r,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=st({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,o,i){const s=st({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(s),e.appendChild(s),o.push(this.createDateCompWrapper(s,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),$i(this.eConditionPanelsFrom,e,t),$i(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,o){const i=$i(e,t,o);for(const s of i)s.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:o,minValidYear:i,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(o){if(e>o)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>t||(t=!(o.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(o,i,s,n)=>{!t||i>=n||t&&(t=this.isValidDateValue(o.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={},{params:i,filterType:s}=this,n=this.getValues(e),r=i.useIsoSeparator?"T":" ";return n.length>0&&(o.dateFrom=$e(n[0],!0,r)),n.length>1&&(o.dateTo=$e(n[1],!0,r)),{dateFrom:null,dateTo:null,filterType:s,type:t,...o}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(o)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(o,i,s,n)=>{i<n&&t.push(o.getDate())}),t}translate(e,t){let o=e;return e==="lessThan"?o="before":e==="greaterThan"&&(o="after"),super.translate(o,t)}};function IP(e,t,o){return e!=null&&t!=null&&e>=t?`${o?"max":"min"}DateValidation`:null}var Pg=class extends Ln{constructor(e,t){super(e,t,o=>{const{dataTypeSvc:i,valueSvc:s}=this.beans,n=t.column,r=i?.getDateFormatterFunction(n),a=r?r(o??void 0):o;return s.formatValue(n,null,a)}),this.filterTypeKeys=dl}conditionToString(e,t,o,i,s){const{type:n}=e,r=Ke(e.dateFrom),a=Ke(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>sS(h,l),d=()=>r!==null?c(r):"null",u=()=>a!==null?c(a):"null";if(r==null&&a==null)return ft(this,n);if(t){const h=this.conditionForToolPanel(n,o,d,u,i,s);if(h!=null)return h}return o?`${d()}-${u()}`:r!=null?c(r):`${n}`}};function AP(e,t){const o=t;return o<e?-1:o>e?1:0}var kP=class extends cl{constructor(){super(xg,gl),this.filterType="date",this.FilterModelFormatterClass=Pg,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:o}=this,i=Date.now();let s=o.get(e);if(s&&s.expires<i&&(s=void 0),!s){const[n,r]=t(new Date(i),new Date(i));s={from:n,to:r,expires:ut(new Date(i)).getTime()-i},o.set(e,s)}return s}comparator(){return this.params.filterParams.comparator??AP}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,o){const i=o.type,s=this.comparator();if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const n=i,r=XP[n];if(r){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(n,r);return s(a,t)>=0&&s(l,t)<0}return super.evaluateNonNullValue(e,t,o)}},LP=1,xs=null,OP=()=>{if(xs!=null)return xs;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return xs=e==null?LP:e%7,xs},nt=e=>(e.setHours(0,0,0,0),e),On=e=>{const t=e.getDay(),o=OP(),i=(t-o+7)%7;return e.setDate(e.getDate()-i),nt(e)},Gn=(e,t=1)=>(e.setDate(e.getDate()-t),e),ut=e=>(e.setDate(e.getDate()+1),nt(e)),Dg=e=>(On(e),e.setDate(e.getDate()+6),ut(e)),Hn=e=>(e.setDate(1),nt(e)),pl=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),nt(e)),fl=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Hn(e)},Mg=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),pl(e)},ml=e=>(e.setMonth(0,1),nt(e)),Tg=e=>(e.setMonth(12,0),ut(e)),Ri=e=>Gn(e),na=e=>Ri(On(e)),ra=e=>Ri(Hn(e)),aa=e=>Ri(fl(e)),Cl=(e,t)=>[nt(e),ut(t)],GP=(e,t)=>Cl(Ri(e),Ri(t)),vl=(e,t)=>[On(e),Dg(t)],HP=(e,t)=>vl(na(e),na(t)),wl=(e,t)=>[Hn(e),pl(t)],BP=(e,t)=>wl(ra(e),ra(t)),bl=(e,t)=>[fl(e),Mg(t)],VP=(e,t)=>bl(aa(e),aa(t)),Sl=(e,t)=>[ml(e),Tg(t)],NP=(e,t)=>[ml(e),ut(t)],WP=(e,t)=>[nt(Gn(e,7)),ut(t)],zP=(e,t)=>[nt(Gn(e,30)),ut(t)],_P=(e,t)=>[nt(Gn(e,90)),ut(t)],UP=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[nt(e),ut(t)]),$P=(e,t)=>(e.setFullYear(e.getFullYear()-1),[nt(e),ut(t)]),KP=(e,t)=>(e.setFullYear(e.getFullYear()-2),[nt(e),ut(t)]),qP=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Sl(e,t)),jP=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Sl(e,t)),YP=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),bl(e,t)),QP=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),wl(e,t)),ZP=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),vl(e,t)),JP=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),Cl(e,t)),XP={today:Cl,yesterday:GP,tomorrow:JP,thisWeek:vl,lastWeek:HP,nextWeek:ZP,thisMonth:wl,lastMonth:BP,nextMonth:QP,thisQuarter:bl,lastQuarter:VP,nextQuarter:YP,thisYear:Sl,lastYear:qP,nextYear:jP,yearToDate:NP,last7Days:WP,last30Days:zP,last90Days:_P,last6Months:UP,last12Months:$P,last24Months:KP,setStartOfDay:nt,setStartOfWeek:On,setStartOfNextDay:ut,setStartOfNextWeek:Dg,setStartOfMonth:Hn,setStartOfNextMonth:pl,setStartOfQuarter:fl,setStartOfNextQuarter:Mg,setStartOfYear:ml,setStartOfNextYear:Tg,setPreviousDay:Ri,setPreviousWeek:na,setPreviousMonth:ra,setPreviousQuarter:aa},eD={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},tD=class extends Fg{constructor(){super(eD,[In]),this.eReadOnlyText=W,this.eDateWrapper=W,this.FilterModelFormatterClass=Pg,this.filterType="date",this.defaultOptions=gl}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const o=e?Ke(e.dateFrom):null;this.dateComp.setDate(o),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){me(this.eDateWrapper,e),me(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const o=t.model,i=$e(e),s=i==null?null:{...o??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Ga(e,this.defaultDebounceMs);return K(this.gos,{onDateChanged:xe(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:o,params:{column:i}}=this;this.dateComp=new Eg(e,t,i.getColDef(),this.getDateComponentParams(),o,s=>{s.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},oD={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},iD=class extends ye{constructor(){super(oD,[In]),this.eDateInput=W,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),o=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=o&&po();const{minValidYear:i,maxValidYear:s,minValidDate:n,maxValidDate:r,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;o?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const h=rd(n,i,!0),g=rd(r,s,!1);h&&g&&h.getTime()>g.getTime()&&D(87),h&&(t.min=$e(h,u)),g&&(t.max=$e(g,u)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return Ke(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,o=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue($e(e,o))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function rd(e,t,o){return e&&t&&D(o?85:86),e instanceof Date?e:e?Ke(e):t?Ke(`${t}-${o?"01-01":"12-31"}`):null}var yl=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function la(e){return e?.allowedCharPattern??null}function fn(e){return e==null||isNaN(e)?null:e}function Ig(e,t){const{filter:o,filterTo:i,type:s}=e||{};return[fn(o),fn(i)].slice(0,uo(s,t))}var sD=class extends kn{constructor(){super("numberFilter",Ig,yl),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!wi()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],o=this.eValuesTo[e];this.refreshInputPairValidation(t,o)}}refreshInputPairValidation(e,t,o=!1){const i=this.params.numberParser,s=ad(i,e),n=ad(i,t),r=nD(s,n,o),a=r?this.translate(r,[String(o?n:s)]):"";(o?e:t).setCustomValidity(a),(o?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,s=this.state,n=i?.fromAction;return(n&&n!="apply"||o.model!==s.model||!this.areStatesEqual(o.state,s.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){const{numberFormatter:i}=this.params,s=!o&&i?i(t??null):t;super.setElementValue(e,s),s===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:o}=this,i=la(e),s=st({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(s,t,"from",i),r=this.createFromToElement(s,o,"to",i),a=(d,u,h)=>()=>this.refreshInputPairValidation(d,u,h),l=a(n,r,!0);n.onValueChange(l),n.addGuiEventListener("focusin",l);const c=a(n,r,!1);return r.onValueChange(c),r.addGuiEventListener("focusin",c),s}createFromToElement(e,t,o,i){const s=this.createManagedBean(i?new $t({allowedCharPattern:i}):new nl);return s.addCss(`ag-filter-${o}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui()),s}removeEValues(e,t){const o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(o,i,s,n)=>{i<n&&t.push(fn(Ag(this.params.numberParser,o.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>t||(t=!o.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function Ag(e,t){if(typeof t=="number")return t;let o=Nt(t);return o!=null&&o.trim()===""&&(o=null),e?e(o):o==null||o.trim()==="-"?null:Number.parseFloat(o)}function ad(e,t){return fn(Ag(e,t.getValue(!0)))}function nD(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var kg=class extends Ln{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=dl}conditionToString(e,t,o,i,s){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,o,()=>l(n),()=>l(r),i,s);if(c!=null)return c}return o?`${l(n)}-${l(r)}`:n!=null?l(n):`${a}`}},rD=class extends cl{constructor(){super(Ig,yl),this.filterType="number",this.FilterModelFormatterClass=kg}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},aD=class extends x{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new nl),this.eTextInput=this.createManagedBean(new $t),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),o=this.eTextInput.getGui();e.appendChild(t),e.appendChild(o),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(o,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:o}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,o),this.setPlaceholder(this.eTextInput,o)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},lD=class extends hl{constructor(){super(...arguments),this.FilterModelFormatterClass=kg,this.filterType="number",this.defaultOptions=yl}updateParams(e){la(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=la(e.filterParams),this.allowedCharPattern?this.createManagedBean(new ul({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new aD)}convertValue(e){return e?Number(e):null}},Rl=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],cD=class extends kn{constructor(){super("textFilter",Rg,Rl),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(o,i,s,n)=>{i<n&&t.push(Nt(o.getValue()))}),t}createEValue(){const e=st({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:o}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,o,"to"),e}createFromToElement(e,t,o){const i=this.createManagedBean(new $t);i.addCss(`ag-filter-${o}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const o=n=>this.removeComponents(n,e,t),{eValuesFrom:i,eValuesTo:s}=this;o(i),o(s)}},Lg=class extends Ln{constructor(){super(...arguments),this.filterTypeKeys=xP}conditionToString(e,t,o,i,s){const{filter:n,filterTo:r,type:a}=e;if(t){const l=d=>()=>ft(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,o,l(n),l(r),i,s);if(c!=null)return c}return o?`${n}-${r}`:n!=null?`${n}`:`${a}`}},dD=({filterOption:e,value:t,filterText:o})=>{if(o==null)return!1;switch(e){case"contains":return t.includes(o);case"notContains":return!t.includes(o);case"equals":return t===o;case"notEqual":return t!=o;case"startsWith":return t.indexOf(o)===0;case"endsWith":{const i=t.lastIndexOf(o);return i>=0&&i===t.length-o.length}default:return!1}},uD=e=>e,hD=e=>e==null?null:e.toString().toLowerCase(),gD=class extends Sg{constructor(){super(Rg,Rl),this.filterType="text",this.FilterModelFormatterClass=Lg}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??dD,this.formatter=t.textFormatter??(t.caseSensitive?uD:hD)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,o,i){const s=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(o.type==="blank")return pn(t);if(o.type==="notBlank")return!pn(t);const u={api:r,colDef:a,column:l,context:c,node:i.node,data:i.data,filterOption:o.type,value:n,textFormatter:d};return s.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=o=>{const i={...o},{filter:s,filterTo:n}=o;return s&&(i.filter=sa(s)??null),n&&(i.filterTo=sa(n)??null),i};return yu(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},pD=class extends hl{constructor(){super(...arguments),this.FilterModelFormatterClass=Lg,this.filterType="text",this.defaultOptions=Rl}createFloatingFilterInputService(){return this.createManagedBean(new ul)}};function fD(e){return!!e.quickFilter?.isFilterPresent()}function mD(e){return e.quickFilter?.getText()}function CD(e){e.quickFilter?.resetCache()}var vD=class extends x{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",o=>this.setFilter(o.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:o,pivotResultCols:i}=this.beans,s=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(s&&!o.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=o.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(o=>t?this.doesRowPassCache(e,o):this.doesRowPassNoCache(e,o))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return O(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){D(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),o=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,o&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(o=>{const i=this.getTextForColumn(o,e);return O(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let o;e?(this.checkGenerateAggText(t),o=t.quickFilterAggregateText):o=this.getAggText(t);const{quickFilterParts:i,matcher:s}=this;return s(i,o)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let o=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const s=K(this.gos,{value:o,node:t,data:t.data,column:e,colDef:i});o=i.getQuickFilterText(s)}return O(o)?o.toString().toUpperCase():null}getAggText(e){const t=[];for(const o of this.colsToUse){const i=this.getTextForColumn(o,e);O(i)&&t.push(i)}return t.join(`
|
|
61
61
|
`)}},wD={moduleName:"ClientSideRowModelFilter",version:L,rowModels:["clientSide"],beans:[hF]},Fl={moduleName:"FilterCore",version:L,beans:[lP],apiFunctions:{isAnyFilterPresent:rP,onFilterChanged:aP},css:[Vx],dependsOn:[wD]},Og={moduleName:"FilterValue",version:L,beans:[mP]},gs={moduleName:"ColumnFilter",version:L,beans:[nP,fP],dynamicBeans:{headerFilterCellCtrl:Lx},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Nx,getColumnFilterInstance:Wx,destroyFilter:zx,setFilterModel:_x,getFilterModel:Ux,getColumnFilterModel:$x,setColumnFilterModel:Kx,showColumnFilter:qx,hideColumnFilter:jx,getColumnFilterHandler:Yx,doFilterAction:Qx},dependsOn:[Fl,Tn,Og,Bx]},bD={moduleName:"CustomFilter",version:L,userComponents:{agReadOnlyFloatingFilter:vP},dependsOn:[gs]},SD={moduleName:"TextFilter",version:L,dependsOn:[gs],userComponents:{agTextColumnFilter:{classImp:cD,params:{useForm:!0}},agTextColumnFloatingFilter:pD},dynamicBeans:{agTextColumnFilterHandler:gD}},yD={moduleName:"NumberFilter",version:L,dependsOn:[gs],userComponents:{agNumberColumnFilter:{classImp:sD,params:{useForm:!0}},agNumberColumnFloatingFilter:lD},dynamicBeans:{agNumberColumnFilterHandler:rD}},RD={moduleName:"BigIntFilter",version:L,dependsOn:[gs],userComponents:{agBigIntColumnFilter:{classImp:FP,params:{useForm:!0}},agBigIntColumnFloatingFilter:MP},dynamicBeans:{agBigIntColumnFilterHandler:PP}},FD={moduleName:"DateFilter",version:L,dependsOn:[gs],userComponents:{agDateColumnFilter:{classImp:TP,params:{useForm:!0}},agDateInput:iD,agDateColumnFloatingFilter:tD},dynamicBeans:{agDateColumnFilterHandler:kP}},ED={moduleName:"QuickFilterCore",version:L,rowModels:["clientSide"],beans:[vD],dependsOn:[Fl,Og]},xD={moduleName:"QuickFilter",version:L,apiFunctions:{isQuickFilterPresent:fD,getQuickFilter:mD,resetQuickFilter:CD},dependsOn:[ED]},PD={moduleName:"ExternalFilter",version:L,dependsOn:[Fl]},DD=class extends x{constructor(e,t,o){super(),this.id=e,this.parentCache=t,this.params=o,this.state="needsLoading",this.version=0,this.startRow=e*o.blockSize,this.endRow=this.startRow+o.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,o){this.successCommon(e,{rowData:t,rowCount:o})}isRequestMostRecentAndLive(e){const t=e===this.version,o=this.isAlive();return t&&o}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:o,beans:i,rowNodes:s}=this;for(let n=0;n<e;n++){const r=o+n,a=new co(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:o,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:o,pageStatus:i}}}setDataAndId(e,t,o){O(t)?e.setDataAndId(t,o.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(we(this.params.datasource.getRows)){D(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:o,params:{sortModel:i,filterModel:s},gos:n}=this;return K(n,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,o),failCallback:this.pageLoadFailed.bind(this,o),sortModel:i,filterModel:s})}forEachNode(e,t,o){this.rowNodes.forEach((i,s)=>{this.startRow+s<o&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const o=e-this.startRow;return this.rowNodes[o]}processServerResult(e){const{rowNodes:t,beans:o}=this;t.forEach((s,n)=>{const r=e.rowData?e.rowData[n]:void 0;!s.id&&s.alreadyRendered&&r&&(t[n]=new co(o),t[n].setRowIndex(s.rowIndex),t[n].setRowTop(s.rowTop),t[n].setRowHeight(s.rowHeight),s._destroy(!0)),this.setDataAndId(t[n],r,this.startRow+n)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){const e=this.rowNodes;for(let t=0,o=e.length;t<o;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},MD=2,TD=class extends x{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const o=Math.floor(e/this.params.blockSize);let i=this.blocks[o];if(!i){if(t)return;i=this.createBlock(o)}return i.getRow(e)}createBlock(e){const t=this.params,o=this.createBean(new DD(e,this,t));return this.blocks[o.id]=o,this.blockCount++,this.purgeBlocksIfNeeded(o),t.rowNodeBlockLoader.addBlock(o),o}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Oo(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),o=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(o);const i=this.params.maxBlocksInCache>0,s=i?this.params.maxBlocksInCache-1:null,n=MD-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=i?a>=s:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:o,endRow:i}=e;return t.rowIndex>=o&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:o}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,o-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:o,overflowSize:i}=this.params,n=(e.id+1)*o+i;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,O(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const o of this.getBlocksInOrder())o.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(o,i)=>o.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const o=[];let i=-1,s=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(s&&i+1!==l.id){r=!0;continue}i=l.id,l.forEachNode(c=>{const d=c===e||c===t;(s||d)&&o.push(c),d&&(s=!s)},n,this.rowCount)}return r||s?[]:o}},ID=class extends x{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new co(e);this.rootNode=t,t.level=-1,this.rowHeight=Do(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Do(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!ji(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;vi(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:o,rowNodeBlockLoader:i,eventSvc:s,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:o?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Do(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new TD(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(o=>{o.id===e&&(t=o)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),o=this.getRowCount()-1;return t>o?o:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function AD(e){xn(e)?.refreshCache()}function kD(e){xn(e)?.purgeCache()}function LD(e){return xn(e)?.getRowCount()}var OD=class extends x{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Bf(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=xe(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){At(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Oo(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(o=>o.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const o of t)o.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:o,state:i}=t.getBlockStateJson();e[o]=i}),e}printCacheStatus(){Oo(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},GD={moduleName:"InfiniteRowModelCore",version:L,rowModels:["infinite"],beans:[ID,OD]},HD={moduleName:"InfiniteRowModel",version:L,apiFunctions:{refreshInfiniteCache:AD,purgeInfiniteCache:kD,getInfiniteRowCount:LD},dependsOn:[GD,nF]},BD=class extends x{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const o=this.wrapSvc?.wrap(e,t)??t,i=!Vs.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addListener(e,o,i)}removeListener(e,t){const o=this.wrapSvc?.unwrap(e,t)??t,s=!!this.asyncListeners.get(e)?.delete(o);s||this.syncListeners.get(e)?.delete(o),this.eventSvc.removeListener(e,o,s)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,o=(n,r)=>{Vs.has(n)&&t(n,r)},i=(n,r)=>{Vs.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=o?.unwrapGlobal(e)??e;if(i.has(s)){const{syncListener:r,asyncListener:a}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const o of e)this.eventSvc.removeGlobalListener(o,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function VD(e,t,o){e.apiEventSvc?.addListener(t,o)}function ND(e,t,o){e.apiEventSvc?.removeListener(t,o)}function WD(e,t){e.apiEventSvc?.addGlobalListener(t)}function zD(e,t){e.apiEventSvc?.removeGlobalListener(t)}var _D={moduleName:"EventApi",version:L,apiFunctions:{addEventListener:VD,addGlobalListener:WD,removeEventListener:ND,removeGlobalListener:zD},beans:[BD]},UD=class extends x{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?lf(t):cf(e.get("localeText"))}},$D={moduleName:"Locale",version:L,beans:[UD]};function KD(e){return e.stateSvc?.getState()??{}}function qD(e,t,o){return e.stateSvc?.setState(t,o)}function ld(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=jD(e)),e.version=L,e}function jD(e){return e.cellSelection=YD(e,"rangeSelection"),e}function YD(e,t){if(e&&typeof e=="object")return e[t]}var QD=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=xe(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=xe(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=xe(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:o}=this.beans;this.isClientSideRowModel=Se(e);const i=ld(e.get("initialState")??{}),s=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&o?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(i,!!s),o?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=ld(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!!s,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){t==="api"&&!o?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a,rowPinning:l}=e,c=(u,h)=>!o?.has(u)&&(h||t==="api");c("filter",i)&&this.setFilterState(i),(c("rowGroupExpansion",s)||c("ssrmRowGroupExpansion",n))&&this.setRowGroupExpansionState(n,s,t),c("rowSelection",r)&&this.setRowSelectionState(r,t),c("pagination",a)&&this.setPaginationState(a,t),c("rowPinning",l)&&this.setRowPinningState(l);const d=this.updateCachedState.bind(this);d("filter",this.getFilterState()),this.updateGroupExpansionState(),d("rowSelection",this.getRowSelectionState()),d("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n,selectableFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:a=>{(a.newPage||a.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),n&&this.addManagedListeners(n,{filterStateChanged:i}),r&&this.addManagedListeners(r,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r}=e,a=(d,u)=>!o?.has(d)&&(u||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),a("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!r?.orderedColIds,t);const l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();l("rangeSelection",c),l("cellSelection",c),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:o,cellFocusCleared:o,cellSelectionChanged:i=>{if(i.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return k1(cn(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const g=(P,I)=>{const A=!i?.has(P)&&!!(I||t==="api");return h||(h=A),A},f={},m=P=>{let I=f[P];return I||(I={colId:P},f[P]=I,I)},C={},v=g("sort",s);v&&s?.sortModel.forEach(({colId:P,sort:I,type:A},J)=>{const k=m(P);k.sort=I,k.sortIndex=J,k.sortType=A}),(v||!o)&&(C.sort=null,C.sortIndex=null);const w=g("rowGroup",n);w&&n?.groupColIds.forEach((P,I)=>{const A=m(P);A.rowGroup=!0,A.rowGroupIndex=I}),(w||!o)&&(C.rowGroup=null,C.rowGroupIndex=null);const b=g("aggregation",r);b&&r?.aggregationModel.forEach(({colId:P,aggFunc:I})=>{m(P).aggFunc=I}),(b||!o)&&(C.aggFunc=null);const y=g("pivot",a);y&&(a?.pivotColIds.forEach((P,I)=>{const A=m(P);A.pivot=!0,A.pivotIndex=I}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(y||!o)&&(C.pivot=null,C.pivotIndex=null);const S=g("columnPinning",l);if(S){for(const P of l?.leftColIds??[])m(P).pinned="left";for(const P of l?.rightColIds??[])m(P).pinned="right"}(S||!o)&&(C.pinned=null);const F=g("columnVisibility",c);if(F)for(const P of c?.hiddenColIds??[])m(P).hide=!0;(F||!o)&&(C.hide=null);const E=g("columnSizing",d);if(E)for(const{colId:P,flex:I,width:A}of d?.columnSizingModel??[]){const J=m(P);J.flex=I??null,J.width=A}(E||!o)&&(C.flex=null);const M=u?.orderedColIds,T=!!M?.length&&!i?.has("columnOrder"),G=T?M.map(P=>m(P)):Object.values(f);(G.length||h)&&(this.columnStates=G,Ct(this.beans,{state:G,applyOrder:T,defaultState:C},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n?.isPivotResultColsPresent()){if(o){const a=[];for(const l of o)n.getPivotResultCol(l.colId)&&a.push(l);Ct(s,{state:a,applyOrder:e},t)}i&&r?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return L1(t)}setColumnGroupState(e,t,o){const i=this.beans.colGroupSvc;if(!i||o?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set(e.columnGroup?.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const l=s.has(a);return l&&s.delete(a),{groupId:a,open:l}});for(const a of s)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let o=e?.getFilterModel();o&&Object.keys(o).length===0&&(o=void 0);const i=e?.getFilterState(),s=e?.getAdvFilterModel()??void 0,n=t?.getState();return o||s||i||n?{filterModel:o,columnFilterState:i,advancedFilterModel:s,selectableFilters:n}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:o}=this.beans,{filterModel:i,columnFilterState:s,advancedFilterModel:n,selectableFilters:r}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};r!==void 0&&o?.setState(r??{}),(i!==void 0||s!==void 0)&&t?.setFilterState(i??null,s??null,"columnFilter"),n!==void 0&&t?.setAdvFilterModel(n??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:o,type:i,startRow:s,endRow:n,columns:r,startColumn:a}=t;return{id:o,type:i,startRow:s,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!ao(t)||!o)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=i.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=i.getCol(r.startColId);if(!l){const c=s.allCols,d=new Set(a);l=c.find(u=>d.has(u))}n.push({...r,columns:a,startColumn:l})}o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:o}=e?.getVScrollPosition()??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(o),r.getScrollFeature()?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,o=e?.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?o:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:o)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,o){const i=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(i,o)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];ji(n,i[s])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),ji(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},ZD={moduleName:"GridState",version:L,beans:[QD],apiFunctions:{getState:KD,setState:qD}};function JD(e){return e.rowModel.isLastRowIndexKnown()}function XD(e){return e.pagination?.getPageSize()??100}function eM(e){return e.pagination?.getCurrentPage()??0}function tM(e){return e.pagination?.getTotalPages()??1}function oM(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function iM(e){e.pagination?.goToNextPage()}function sM(e){e.pagination?.goToPreviousPage()}function nM(e){e.pagination?.goToFirstPage()}function rM(e){e.pagination?.goToLastPage()}function aM(e,t){e.pagination?.goToPage(t)}var lM=class extends x{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,o=()=>{const i=Math.max(Do(t),1),s=Math.floor(e/i);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?xe(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function cM(e,t){if(typeof e!="number")return"";const o=t(),i=o("thousandSeparator",","),s=o("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var ki="paginationPageSizeSelector",dM={tag:"span",cls:"ag-paging-page-size"},uM=class extends ye{constructor(){super(dM),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ki,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){Xe(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(ki)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){const s=this.gos.exists("paginationPageSize"),n=this.gos.get(ki)!==!0;D(94,{pageSizeSet:s,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||D(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ki}),e.unshift("")}const i=String(o?"":t);this.selectPageSizeComp?(ho(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const o=this.getLocaleTextFunc(),i=o("pageSizeSelectorLabel","Page Size:"),s=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new rl).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ki);return!Array.isArray(t)||!t?.length?e:[...t].sort((o,i)=>o-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},hM={selector:"AG-PAGE-SIZE-SELECTOR",component:uM},gM=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}",pM=class extends Gv{constructor(){super(),this.btFirst=W,this.btPrevious=W,this.btNext=W,this.btLast=W,this.lbRecordCount=W,this.lbFirstRowOnPage=W,this.lbLastRowOnPage=W,this.lbCurrent=W,this.lbTotal=W,this.pageSizeComp=W,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(gM)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[hM]);const{btFirst:t,btPrevious:o,btNext:i,btLast:s}=this;this.activateTabIndex([t,o,i,s]),t.insertAdjacentElement("afterbegin",Je(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",Je(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",Je(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",Je(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):NC(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:i=>{(i.key===R.ENTER||i.key===R.SPACE)&&(i.preventDefault(),o())}})}VC(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):cM(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),o=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),s=e===o-1;this.nextButtonDisabled=s||i,this.lastButtonDisabled=!t||i||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Gp(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),i=e?o:null,s=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*s+1,a=r+n-1,e&&a>i&&(a=i));const l=r+n-1,c=!e&&o<l,d=this.formatNumber(r);this.lbFirstRowOnPage.textContent=d;let u;const h=this.getLocaleTextFunc();c?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?s+1:0,m=this.formatNumber(f);this.lbCurrent.textContent=m;let C,v;if(e)C=this.formatNumber(t),v=this.formatNumber(i);else{const w=h("more","more");C=w,v=w}this.lbTotal.textContent=C,this.lbRecordCount.textContent=v,this.announceAriaStatus(d,u,v,m,C)}announceAriaStatus(e,t,o,i,s){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${o}`,d=`${r} ${i} ${l} ${s}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},fM={selector:"AG-PAGINATION",component:pM},mM=100,CM=class extends x{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return fM}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:o}=this.beans;o?.isEditing()&&(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return O(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:O(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:O(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:O(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:mM}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const o=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}o!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const o=this.pageSize,i=t-1;this.totalPages=Math.floor(i/o)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,n=o*s;let r=o*(s+1)-1;if(r>i&&(r=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:o}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:o=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:i,keepRenderedRows:t})}},vM={moduleName:"Pagination",version:L,beans:[CM,lM],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:JD,paginationGetPageSize:XD,paginationGetCurrentPage:eM,paginationGetTotalPages:tM,paginationGetRowCount:oM,paginationGoToNextPage:iM,paginationGoToPreviousPage:sM,paginationGoToFirstPage:nM,paginationGoToLastPage:rM,paginationGoToPage:aM},dependsOn:[Tn]},wM=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function bM(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function SM(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function yM(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function RM(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function FM(e,t,o){return e.pinnedRowModel?.forEachPinnedRow(t,o)}var EM={moduleName:"PinnedRow",version:L,beans:[FC],css:[wM],apiFunctions:{getPinnedTopRowCount:bM,getPinnedBottomRowCount:SM,getPinnedTopRow:yM,getPinnedBottomRow:RM,forEachPinnedRow:FM},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},xM="↑",PM="↓",DM={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},MM=class extends ye{constructor(){super(DM),this.eValue=W,this.eDelta=W,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=O(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=xM+s:r.textContent=PM+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Xe(this.eDelta)}refresh(e,t=!1){const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(O(i)?s.textContent=i:O(o)?s.textContent=o:Xe(s),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},TM=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",IM={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},AM=class extends ye{constructor(){super(IM),this.eCurrent=W,this.refreshCount=0,this.registerCSS(TM)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:o}=this,i=st({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let o=e.value;if(we(o)&&(o=""),o===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const i=this.eCurrent;return O(e.valueFormatted)?i.textContent=e.valueFormatted:O(e.value)?i.textContent=o:Xe(i),!0}},kM=class extends x{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,a=n+o+i,l={phase:"flash",flashEndTime:r,fadeEndTime:a};s.set(e,l);const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,a]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u=l==="flash"?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:f}}=r;switch(l){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),f.transition=`background-color ${d-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),f.removeProperty("transition"),f.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=LC(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function LM(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))o.flashCell(i,t)})}var OM={moduleName:"HighlightChanges",version:L,beans:[kM],userComponents:{agAnimateShowChangeCellRenderer:MM,agAnimateSlideCellRenderer:AM},apiFunctions:{flashCells:LM}};function GM(e,t,o){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;o===null?i.removeAttribute(s):i.setAttribute(s,o)}function HM(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function BM(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function VM(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function NM(e){e.animationFrameSvc?.flushAllFrames()}function WM(e){return{rowHeight:Do(e),headerHeight:cs(e)}}function zM(e,t={}){const o=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&o.push(No(r))}if(t.columns?.length)return o;const i=[],s=jr(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(s&&!Yr(n.rowNode,s)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&i.push(No(l))}}return[...i,...o]}var _M={moduleName:"RenderApi",version:L,apiFunctions:{setGridAriaProperty:GM,refreshCells:HM,refreshHeader:BM,isAnimationFrameQueueEmpty:VM,flushAllAnimationFrames:NM,getSizesForCurrentTheme:WM,getCellRendererInstances:zM}},UM=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=xe(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=ro(this.beans,a).height;for(const d of s){let u=l?.[d.getColId()];const h=o?.getCellSpan(d,a);if(h){if(h.getLastNode()!==a)continue;if(u=o?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),n=!0)};i?.forEachPinnedRow?.("top",r),i?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:f}=_o(i),m=u+h+g+f,v=t.offsetHeight+m;if(d<5){const b=!Pe(r)?.contains(t),y=v==0;if(b||y){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(s,v,n)},l=()=>a(0);l();const c=Kt(r,t,l);return o.addDestroyFunc(()=>{c(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},$M={moduleName:"RowAutoHeight",version:L,beans:[UM]},KM=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const o of this.spannedNodes)o!==this.lastNode&&(t+=o.rowHeight);return e-t}},qM=class extends x{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=o.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g=typeof h=="function";let f=null,m=null,C;const v=(b,y)=>{f=b,m=null,C=y},w=b=>{const y=!b.isExpandable()&&!b.group&&!b.detail&&(d?!d({rowNode:b}):!0);if(b.rowIndex==null||!y){v(null,null);return}if(f==null||b.level!==f.level||b.footer||m&&b.rowIndex-1!==m?.getLastNode().rowIndex){v(b,n.getValue(t,b,"data"));return}const S=n.getValue(t,b,"data");if(g){const F=K(o,{valueA:C,nodeA:f,valueB:S,nodeB:b,column:t,colDef:a});if(!h(F)){v(b,S);return}}else if(u?!u(C,S):C!==S){v(b,S);return}if(!m){const F=l?.get(f);F?.firstNode===f?(F.reset(),m=F):m=new KM(t,f),c.set(f,m)}m.addSpannedNode(b),c.set(b,m)};switch(e){case"center":s.forEachDisplayedNode?.(b=>{(!r||r.isRowInPage(b.rowIndex))&&w(b)}),this.centerValueNodeMap=c;break;case"top":i?.forEachPinnedRow("top",w),this.topValueNodeMap=c;break;case"bottom":i?.forEachPinnedRow("bottom",w),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},jM=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=xe(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=xe(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const o=this.createManagedBean(new qM(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,s=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(s);break;case"bottom":r=t?.getPinnedBottomRow(s);break;default:r=o.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){const s=i.getCellSpan(e);t(o,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},YM=class extends mi{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,s,n,r){this.eWrapper=o,super.setComp(e,t,o,i,s,n,r),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||wa(e,t.rowIndex)}setAriaRowSpan(){Np(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(is(t)){this.focusedCellPosition=void 0;return}const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},QM=class extends un{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new YM(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},ZM=class extends x{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=this.getCtrlsMap(e),i=o.size,s=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of s)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(n.has(d.firstNode))return;const u=o.get(d.firstNode);if(u){n.set(d.firstNode,u),o.delete(d.firstNode);return}r=!0;const h=new QM(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===i;if(!(!r&&a)){for(const l of o.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t?.getCellSpanByPosition(e);if(!o)return;const i=this.getCtrlsMap(e.rowPinned).get(o.firstNode);if(i)return i.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},JM={moduleName:"CellSpan",version:L,beans:[jM,ZM]},XM=class extends x{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,gi(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),pm(e))}createColumns(e,t){const o=()=>{en(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,n=(this.columns?.treeDepth??-1)==i,r=this.generateSelectionCols();if(gm(r,this.columns?.list??[])&&n)return;o();const{colGroupSvc:l}=this.beans,c=l?.findDepth(e.tree)??0,d=l?.balanceTreeForAutoCols(r,c)??[];this.columns={list:r,tree:d,treeDepth:c,map:{}},t(h=>{if(!h)return null;const g=h.filter(f=>!go(f));return[...r,...g]})}updateColumns(e){const t=gi(e.source),{beans:o}=this;for(const i of this.columns?.list??[]){const s=this.createSelectionColDef(e.currentValue);i.setColDef(s,null,t),Ct(o,{state:[mm(s,i.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Wi(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,o=e.get("rowSelection");if(typeof o!="object"||!Po(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(o.checkboxLocation==="autoGroupColumn"&&i)return!1;const s=!!di(o),n=Is(o);return s||n}createSelectionColDef(e){const{gos:t}=this,o=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:s,spanRows:n,...r}=o??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,c,d){const u=c.isSelected(),h=d.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...r,colId:Ta,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const o=new Uo(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){const i=t&&typeof t!="string"?di(t):void 0,s=e&&typeof e!="string"?di(e):void 0,n=i!==s,r=t&&typeof t!="string"?Is(t):void 0,a=e&&typeof e!="string"?Is(e):void 0,l=r!==a,c=Qs(e),d=Qs(t);(n||l||c!==d)&&this.beans.colModel.refreshAll(o)}destroy(){en(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,o){if(!this.columns?.list.length)return;const i=e.length+t.length+o.length;if(i===0)return;const s=this.columns.list[0];if(!s.isVisible())return;const n=()=>{let l;switch(s.pinned){case"left":case!0:l=e;break;case"right":l=o;break;default:l=t}l&&At(l,s)};(this.beans.rowNumbersSvc?.getColumn(Ia)?2:1)===i&&n()}},eT=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function tT(e,t){if(!t.nodes.every(r=>r.rowPinned&&!Dn(r)?(D(59),!1):r.id===void 0?(D(60),!1):!0))return;const{nodes:i,source:s,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:s??"api",newValue:n})}function oT(e,t,o="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:o,selectAll:t})}function iT(e,t,o="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:o,selectAll:t})}function sT(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function nT(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function rT(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function aT(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function lT(e){return e.selectionSvc?.getSelectedNodes()??[]}function cT(e){return e.selectionSvc?.getSelectedRows()??[]}var dT={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},uT=class extends ye{constructor(){super(dT,[Ya]),this.eCheckbox=W}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,i=t.isSelected(),s=Sn(e,i),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);o.setValue(i,!0),o.setInputAriaLabel(`${a} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:Bo,click:i=>{Bo(i),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=typeof i=="object"?Wn(i):void 0,r=typeof s=="object"?Wn(s):void 0;n!==r&&this.onSelectableChanged()}),Ir(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:o,gos:i}=this,s=t.selectable,n=this.getIsVisible();let r;if(typeof n=="function"){const u=o?.callbackParams;if(!e)r=n({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=n({...u,...h})}}else r=n??!1;const a=s&&!r||!s&&r,l=s||r,c=i.get("rowSelection"),d=c&&typeof c!="string"?!Wn(c):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?d:!0)),this.setDisplayed(l&&(a?d:!0)),l&&this.eCheckbox.setDisabled(a),o?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?di(t):this.column?.getColDef()?.checkboxSelection}},hT=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:o,pinnedRowModel:i}=this;return t??(t=o.getRowNode(e)),i?.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const o=t[0].id===this.rootId,i=t.findIndex(s=>s.id===e.id);if(i>-1){const s=t.slice(0,i),n=t.slice(i+1);return this.setEndRange(e),o?{keep:s,discard:n}:{keep:n,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const o=this.getRoot();if(o==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&s.push(n)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const i=this.getNodesInRange(o,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}getNodesInRange(e,t){const{pinnedRowModel:o,rowModel:i}=this;if(!o?.isManual())return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return rt(o,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const s=rt(o,"bottom",void 0,e),n=i.getRowCount(),r=i.getRow(n-1);return(i.getNodesInRangeForSelection(t,r)??[]).concat(s)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return rt(o,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const s=rt(o,"top",t,void 0),n=rt(o,"bottom",void 0,e),r=i.getRow(0),a=i.getRow(i.getRowCount()-1);return s.concat(i.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return rt(o,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const s=rt(o,"top",e,void 0),n=rt(o,"bottom",void 0,t),r=i.getRow(0),a=i.getRow(i.getRowCount()-1);return s.concat(i.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return rt(o,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const s=rt(o,"bottom",void 0,t),n=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,n)??[]).concat(s)}return null}},gT=class extends x{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(ve(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new ja);this.cbSelectAll=t,t.addCss("ag-header-select-all"),ko(t.getGui(),"presentation"),this.showOrHideSelectAll();const o=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:o,paginationChanged:o,modelUpdated:o}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(i)!==n(s)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,i=t.getSelectAllState(e);o.setValue(i);const s=t.hasNodesToSelect(e);o.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:i,cbSelectAllVisible:s}=this,n=i.getValue(),r=Sn(t,n),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",s?`${a} (${r})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return Js(this.gos)?!0:(D(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:o}=this.beans;return Se(t)||xi(t)?!0:(D(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let o="uiSelectAll";t==="currentPage"?o="uiSelectAllCurrentPage":t==="filtered"&&(o="uiSelectAllFiltered");const i={source:o,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(i):s.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:o}=this,n=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return Gg(o,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=du(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:o}=this.column.getColDef();return t?"currentPage":o?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function Gg({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const l=go(o),c=Aa(o);(Qs(i)==="autoGroupColumn"&&c||l&&t?.isSelectionColumnEnabled())&&(r=Is(i))}else typeof n=="function"?r=n(K(e,{column:o,colDef:s})):r=!!n;return r}var pT=class extends x{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new hT(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const o=Ir(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=Ir(e),this.addManagedEventListeners({cellValueChanged:o=>this.updateRowSelectable(o.node),rowNodeDataChanged:o=>this.updateRowSelectable(o.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new uT}createSelectAllFeature(e){if(Gg(this.beans,e))return new gT(e)}isMultiSelect(){return Js(this.gos)}onRowCtrlSelected(e,t,o){const i=!!e.rowNode.isSelected();e.forEachGui(o,s=>{s.rowComp.toggleCss("ag-row-selected",i);const n=s.element;Ad(n,i),n.contains(ve(this.beans))&&t(s)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),o=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||o)return;const s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Dn(e)||!Po(this.gos)}updateRowSelectable(e,t){const o=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,o,t),o}setRowSelectable(e,t,o){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),o)return;if(ts(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,o=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const s=e.childrenAfterGroup[i];let n=s.isSelected();if(!s.selectable){const r=this.calculateSelectedFromChildren(s);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:o=!0;break;default:return}}if(!(t&&o))return t?!0:o?!1:e.selectable?e.__selected:null}selectRowNode(e,t,o,i="api"){if(t&&e.destroyed)return!1;const s=!e.selectable&&t,n=e.__selected===t;if(s||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...fC(e,this.gos,"rowSelected"),event:o||null,source:i}),!0}isCellCheckboxSelection(e,t){const o=this.gos.get("rowSelection");if(o&&typeof o!="string"){const i=go(e)&&di(o);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,o,i){const{gos:s,selectionCtx:n}=this,r=e.isSelected(),a=ts(s),l=Nf(s),c=Wf(s),d=this.isMultiSelect(),u=i==="rowClicked";if(u&&!(l||c))return null;if(t&&o&&d){const h=n.getRoot();if(h)if(h.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&d){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),f=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:f.keep,deselect:f.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else if(o){if(u){const h=!r;return h&&!l||!h&&!c?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!d}}else{n.setRoot(e);const h=zf(s),g=Xs(s)==="filteredDescendants",f=u&&(!h||!l);if(g&&r===void 0&&Se(s))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!d||f};if(u){const m=r?!h:l;return m===r&&!f||m&&!l||!m&&!c?null:{node:e,newValue:m,clearSelection:!d||f,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!d||f}}}},fT=class extends pT{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Zs(e),this.groupSelectsDescendants=ts(e),this.groupSelectsFiltered=Xs(e)==="filteredDescendants",this.masterSelectsDetail=Gl(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=ts(e),o=Zs(e),i=Xs(e)==="filteredDescendants";this.masterSelectsDetail=Gl(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||o!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=o)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,o){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,o),this.selectRange(i.select,!0,o);{const s=i.checkFilteredNodes?Bg(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:s,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:o})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:o,nodes:i,event:s,source:n,keepDescendants:r=!1}){if(i.length===0)return 0;const{gos:a}=this;if(!Po(a)&&e)return D(132),0;if(i.length>1&&!this.isMultiSelect())return D(130),0;let l=0;for(let c=0;c<i.length;c++){const d=i[c],u=d.primaryRow;if(u.rowPinned&&!Dn(u)){D(59);continue}if(u.id===void 0){D(60);continue}if(e&&d.destroyed)continue;this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,s,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))}return o||(i.length===1&&n==="api"&&this.selectionCtx.setRoot(i[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(i[0].primaryRow,r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,o){let i=0;return e.forEach(s=>{const n=s.primaryRow;if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,o)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o)),i}selectChildren(e,t,o){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:o,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((o,i)=>{e(o)&&t.set(i,o)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:o,rowModel:i}=this.beans;if(!Se(o))return!1;const s=i.rootNode;if(!s)return!1;let n=!1;const r=a=>{if(a!==s){const l=this.calculateSelectedFromChildren(a);n=this.selectRowNode(a,l===null?!1:l,void 0,e)||n}};return zo(s,this.beans.rowModel.hierarchical,t,r),n}clearOtherNodes(e,t,o){const i=new Map;let s=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!CT(e,n):!0)&&!r){const l=this.selectedNodes.get(n.id);s+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:o}),this.groupSelectsDescendants&&n.parent&&i.set(n.parent.id,n.parent)}}),i.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,o)}),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new co(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!Se(e))return;const o=t.getTopLevelNodes();if(o===null)return;const i=[];function s(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&s(l.childrenAfterGroup)}}return s(o),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const o=Se(this.gos);let i=!1;const s=n=>{const r=this.selectRowNode(n.primaryRow,!1,void 0,e);i||(i=r)};if(t==="currentPage"||t==="filtered"){if(!o){ce(102);return}this.getNodesToSelect(t).forEach(s)}else this.selectedNodes.forEach(s),this.reset(e);if(this.selectionCtx.selectAll=!1,o&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);i||(i=n)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,o=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&o++)}),{selectedCount:t,notSelectedCount:o}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:o}=this.getSelectedCounts(e);return Hg(t,o)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],o=s=>t.push(s);if(e==="currentPage")return this.forEachNodeOnPage(s=>{if(!s.group){o(s);return}if(!s.footer&&!s.expanded){const n=r=>{o(r);const a=r.childrenAfterFilter;if(a)for(let l=0,c=a.length;l<c;++l)n(a[l])};n(s);return}this.groupSelectsDescendants||o(s)}),t;const i=this.beans.rowModel;return e==="filtered"?(i.forEachNodeAfterFilter(o),t):(i.forEachNode(o),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:o}=this.beans,i=t.getFirstRow(),s=t.getLastRow();for(let n=i;n<=s;n++){const r=o.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:o}=this;if(!Po(t)){D(132);return}if(Vf(t)&&!Js(t)){D(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:s}=e;let n=!1;if(this.getNodesToSelect(s).forEach(r=>{const a=this.selectRowNode(r.primaryRow,!0,void 0,i);n||(n=a)}),o.selectAll=!0,Se(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(i);n||(n=r)}n&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,o){if(e||(e=[]),!Array.isArray(e)){ce(103);return}const i=new Set(e),s=[];this.beans.rowModel.forEachNode(n=>{i.has(n.id)&&s.push(n)}),o&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return Se(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:o}=this.beans;if(!Po(t))return;const i="selectableChanged",s=Se(t)&&this.groupSelectsDescendants,n=[];if(s){const r=o.rootNode;r&&zo(r,o.hierarchical,e,a=>{let l=!1;for(const c of a.childrenAfterGroup)l||(l=c.selectable),!c.group&&!this.updateRowSelectable(c,!0)&&c.isSelected()&&n.push(c);this.setRowSelectable(a,l,!0)})}else o.forEachNode(r=>{!this.updateRowSelectable(r,!0)&&r.isSelected()&&n.push(r)});n.length&&this.setNodesSelected({nodes:n,newValue:!1,source:i}),!e&&s&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const o=e.detailNode?.detailGridInfo?.api;if(!o)return;const i=mT(o);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(o.getSelectedNodes().map(n=>n.id)))}setDetailSelectionState(e,t,o){if(this.masterSelectsDetail){if(!Js(t)){D(269);return}switch(e.isSelected()){case!0:{o.selectAll();break}case!1:{o.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const s=[];for(const n of i){const r=o.getRowNode(n);r&&s.push(r)}o.setNodesSelected({nodes:s,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function mT(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),Hg(t,o)}function Hg(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function CT(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}function Bg(e){const t=e.isSelected()===!1,o=e.childrenAfterFilter?.some(Bg)??!1;return t||o}var vT={moduleName:"SharedRowSelection",version:L,beans:[XM],css:[eT],apiFunctions:{setNodesSelected:tT,selectAll:oT,deselectAll:iT,selectAllFiltered:sT,deselectAllFiltered:nT,selectAllOnCurrentPage:rT,deselectAllOnCurrentPage:aT,getSelectedNodes:lT,getSelectedRows:cT}},wT={moduleName:"RowSelection",version:L,rowModels:["clientSide","infinite","viewport"],beans:[fT],dependsOn:[vT]},bT=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,s=this.getCellClassParams(e,o);ol(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){const s=this.getCellClassParams(e,t);i=o(s)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);for(const n of this.staticClasses)t.toggleCss(n,!1);const s=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=s;for(const n of s)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:o,rowNode:i}=this.cellCtrl;return K(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},ST=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){ol(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new bT(e,this.beans)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},yT={moduleName:"CellStyle",version:L,beans:[ST]},RT={moduleName:"RowStyle",version:L,beans:[CR]},FT={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},Ye="clientSide",Be="serverSide",jo="infinite",ET={onGroupExpandedOrCollapsed:[Ye],refreshClientSideRowModel:[Ye],isRowDataEmpty:[Ye],forEachLeafNode:[Ye],forEachNodeAfterFilter:[Ye],forEachNodeAfterFilterAndSort:[Ye],resetRowHeights:[Ye,Be],applyTransaction:[Ye],applyTransactionAsync:[Ye],flushAsyncTransactions:[Ye],getBestCostNodeSelection:[Ye],getServerSideSelectionState:[Be],setServerSideSelectionState:[Be],applyServerSideTransaction:[Be],applyServerSideTransactionAsync:[Be],applyServerSideRowData:[Be],retryServerSideLoads:[Be],flushServerSideAsyncTransactions:[Be],refreshServerSide:[Be],getServerSideGroupLevelState:[Be],refreshInfiniteCache:[jo],purgeInfiniteCache:[jo],getInfiniteRowCount:[jo],isLastRowIndexKnown:[jo,Be],expandAll:[Ye,Be],collapseAll:[Ye,Be],onRowHeightChanged:[Ye,Be],setRowCount:[jo,Be],getCacheBlockState:[jo,Be]},xT={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function PT(e,t,o){const i=xT[e];if(i){const{version:n,new:r,old:a,message:l}=i,c=a??e;return(...d)=>{const u=r?`Please use ${r} instead. `:"";return Ni(`Since ${n} api.${c} is deprecated. ${u}${l??""}`),t.apply(t,d)}}const s=ET[e];return s?(...n)=>{const r=o.rowModel.getType();if(!s.includes(r)){ai(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var DT={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},MT={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},TT={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",overlayLoading:"Overlay",overlayExporting:"Overlay",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},IT=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),AT=class extends x{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,Ef(M1)}warnOnInitialPropertyUpdate(e,t){e==="api"&&FT[t]&&D(22,{key:t})}processGridOptions(e){this.processOptions(e,v0())}validateApiFunction(e,t){return PT(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=fi[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):D(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){const t=DT[e];return t?It(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){LT.has(e)&&D(10,{eventType:e})}validateIcon(e){if(IT.has(e)&&D(43,{iconName:e}),MT[e])return;const t=TT[e];if(t){ce(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Pa(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}D(134,{iconName:e})}isProvidedUserComp(e){return!!fi[e]}validateColDef(e){this.processOptions(e,a0())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:a}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=i[d];if(u){const{message:w,version:b}=u;l.add(`As of v${b}, ${String(d)} is deprecated. ${w??""}`)}const h=e[d];if(h==null||h===!1)return;const g=o[d];if(!g)return;const{dependencies:f,validate:m,supportedRowModels:C,expectedType:v}=g;if(v){const w=typeof h;if(w!==v){l.add(`${String(d)} should be of type '${v}' but received '${w}' (${h}).`);return}}if(C){const w=this.gridOptions.rowModelType??"clientSide";if(!C.includes(w)){l.add(`${String(d)} is not supported with the '${w}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(f){const w=this.checkForRequiredDependencies(d,f,e);if(w){l.add(w);return}}if(m){const w=m(e,this.gridOptions,this.beans);if(w){l.add(w);return}}}),l.size>0)for(const d of l)Ni(d)}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([n,r])=>{const a=o[n];return!r.required.includes(a)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
|
|
62
62
|
`)}checkProperties(e,t,o,i,s){const n=["__ob__","__v_skip","__metadata__"],r=kT(Object.getOwnPropertyNames(e),[...n,...t,...o],o),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${i} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;o.includes("context")&&(d+=`
|
|
63
|
-
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Ni(d)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Ni(`to see all the valid ${i} properties please check: ${l}`)}}};function kT(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));if(s.length>0)for(const n of s)i[n]=Qr({inputValue:n,allSuggestions:o}).values;return i}var LT=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),OT={moduleName:"Validation",version:L,beans:[AT]},GT={moduleName:"AllCommunity",version:L,dependsOn:[TF,JF,HD,OT,Ex,xx,Px,Dx,Mx,Tx,Ix,Fx,SD,yD,RD,FD,bD,xD,PD,ZD,G1,vM,fh,Y1,Q1,_M,HF,yw,EM,wT,f1,yT,zF,RT,_D,v1,OM,cg,$D,$M,Sw,IF,JM]};function N(e,t={}){const o=Object.keys(t).map(i=>{const s=t[i];return s!=null?`${i}=${s}`:null}).filter(Boolean).join(";");return[e,o].filter(i=>i.length>0).join(":")}var B={grid(e){return N("ag-grid-root",{gridId:e})},headerGroupCell(e){return N("ag-header-group-cell",{colId:e})},headerCell(e){return N("ag-header-cell",{colId:e})},headerCheckbox(e){return N("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return N("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return N("ag-floating-filter",{colId:e})},floatingFilterButton(e){return N("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return N("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return N("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return N(`ag-${e.source}-picker-display`,Ps(e))},numberFilterInstanceInput(e){return N(`ag-${e.source}-number-input`,Ps(e))},textFilterInstanceInput(e){return N(`ag-${e.source}-text-input`,Ps(e))},dateFilterInstanceInput(e){return N(`ag-${e.source}-date-input`,Ps(e))},setFilterInstanceMiniFilterInput(e){return N(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return N(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return N(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return N(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return N("ag-advanced-filter-input")},advancedFilterButton(e){return N("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return N("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return N("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return N("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return N("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return N("ag-advanced-filter-builder-add-item-button")},rowNode(e){return N("ag-row",{"row-id":e})},cell(e,t){return N("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return B.cell(e,oo)},checkbox(e,t){return N("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return B.checkbox(e,Ta)},autoGroupColumnCheckbox(e){return B.checkbox(e,oo)},dragHandle(e,t){return N("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return N("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return N("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return B.groupContracted(e,oo)},autoGroupExpanded(e){return B.groupExpanded(e,oo)},rowNumber(e){return B.cell(e,Ia)},menu(){return N("ag-menu")},menuOption(e){return N("ag-menu-option",{option:e})},sideBar(){return N("ag-side-bar")},sideBarButton(e){return N("ag-side-button",{label:e})},columnToolPanel(){return N("ag-column-panel")},pivotModeSelect(){return N("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return N("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return N("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return N("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return N("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return N("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,o){return N("ag-column-drop-cell-drag-handle",{source:e,area:t,label:o})},columnDropCellCancelButton(e,t,o){return N("ag-column-drop-cell-cancel",{source:e,area:t,label:o})},columnDropArea(e,t){return N("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return N("ag-filter-panel")},filterToolPanelAddFilterButton(){return N("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return N("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return N("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return N("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return N("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return N("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return N("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return N("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return N("ag-status-bar-selected-row-count")},statusBarAggregations(){return N("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return N("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return N("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return N("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return N("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return N("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return N("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return N("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return N("ag-fill-handle")},columnChooserCloseButton(){return N("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return N("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return N("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return N("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return N("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return N("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return N("ag-overlay")}};function HT(e,t){const o={};for(const i of Object.keys(e))t[i]!==null&&(o[t[i]??i]=e[i]);return o}function BT(e){return e.source!=="floating-filter"?{index:0,...e}:e}function Ps(e){return HT(BT(e),{colLabel:"label"})}var Vg="data-testid";function _(e,t){e?.setAttribute(Vg,t)}function VT(e){Vg=e}var NT=class extends x{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=xe(this,()=>this.setupAllTestIds(),500),t=xe(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=gt(this.beans),t=Ju(this.beans),o=e.querySelector(`[grid-id="${t}"]`);_(o,B.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(n=>{_(n,B.headerGroupCell(n.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(n=>{const r=n.getAttribute("col-id"),l=n.classList.contains("ag-floating-filter")?B.floatingFilter(r):B.headerCell(r);_(n,l),_(n.querySelector(".ag-header-cell-filter-button"),B.headerFilterButton(r)),_(n.querySelector(".ag-header-cell-menu-button"),B.headerCellMenuButton(r)),_(n.querySelector(".ag-header-cell-resize"),B.headerResizeHandle(r)),_(n.querySelector(".ag-checkbox input[type=checkbox]"),B.headerCheckbox(r)),_(n.querySelector(".ag-floating-filter-button button"),B.floatingFilterButton(r)),this.setupFilterInstance(n.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const i=e.querySelector(".ag-filter-menu");this.setupFilterInstance(i,{source:"column-filter"}),_(e.querySelector(".ag-advanced-filter input[type=text]"),B.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(n=>{_(n,B.advancedFilterButton(n.textContent))}),_(e.querySelector("button.ag-advanced-filter-builder-button"),B.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((n,r)=>{_(n,r===0?B.advancedFilterPanelMaximiseButton():B.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(n=>{_(n,B.advancedFilterPill(n.querySelector(".ag-picker-field-display")?.textContent))}),_(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),B.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(n=>{const r=n.getAttribute("row-id");_(n,B.rowNode(r)),n.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");_(a,B.cell(r,l)),_(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),B.checkbox(r,l)),_(a.querySelector(".ag-drag-handle"),B.dragHandle(r,l)),_(a.querySelector(".ag-group-contracted"),B.groupContracted(r,l)),_(a.querySelector(".ag-group-expanded"),B.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(n=>{_(n,B.menu()),n.querySelectorAll(".ag-menu-option").forEach(r=>{_(r,B.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(n=>{_(n,B.sideBar()),n.querySelectorAll(".ag-side-button button").forEach(r=>{_(r,B.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),n.querySelectorAll(".ag-column-panel").forEach(r=>{_(r,B.columnToolPanel()),_(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),B.pivotModeSelect()),_(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),B.columnPanelSelectHeaderCheckbox()),_(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),B.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const c=l.getAttribute("aria-label");_(l.querySelector(".ag-column-group-closed-icon"),B.columnSelectListItemGroupClosedIcon(c)),_(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),B.columnSelectListItemCheckbox(c)),_(l.querySelector(".ag-drag-handle"),B.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),n.querySelectorAll(".ag-filter-panel").forEach(r=>{_(r,B.filterToolPanel()),_(r.querySelector("button.ag-filter-add-button"),B.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");_(c,B.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),n.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{_(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),B.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;_(a,B.filterToolPanelGroup(l)),_(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),B.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),_(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),B.statusBarTotalAndFilteredRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),B.statusBarTotalRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),B.statusBarFilteredRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),B.statusBarSelectedRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),B.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(n=>{_(n.querySelector(".ag-paging-page-size .ag-picker-field-display"),B.paginationPanelSizePickerDisplay(n.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),n.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":_(r,B.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":_(r,B.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":_(r,B.paginationPanelRecordCount(r.textContent));break}}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{_(r,B.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":_(r,B.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":_(r,B.paginationSummaryPanelTotalPage(r.textContent));break}})}),_(e.querySelector(".ag-fill-handle"),B.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(n=>{_(n.querySelector(".ag-panel-title-bar-button-icon"),B.columnChooserCloseButton()),_(n.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),B.columnChooserSearchBarCheckbox()),_(n.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),B.columnChooserSearchBarFilter()),n.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");_(a.querySelector(".ag-column-group-closed-icon"),B.columnChooserListItemGroupClosedIcon(l)),_(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),B.columnChooserListItemCheckbox(l)),_(a.querySelector(".ag-drag-handle"),B.columnChooserListItemDragHandle(l))})})}),_(e.querySelector(".ag-overlay-wrapper"),B.overlay());const s=e.querySelector(".ag-column-drop-wrapper");s&&this.setupColumnDropArea(s,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(s=>{_(s,B.filterInstancePickerDisplay(t))});const o=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((s,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(s,B.numberFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((s,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(s,B.textFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((s,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(s,B.dateFilterInstanceInput(l))});const i=e.querySelector('.ag-mini-filter input[type="text"]');_(i,B.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(s=>{const n=s.querySelector(".ag-checkbox-label")?.textContent,r=s.querySelector('input[type="checkbox"]');_(r,B.setFilterInstanceItem(t,n))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(s=>{_(s,B.setFilterApplyPanelButton(t,s.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(s=>{const n=s.querySelector(".ag-radio-button-label")?.textContent;_(s.querySelector("input[type=radio]"),B.filterConditionRadioButton(t,n))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(o=>{const i=o.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");_(o,B.columnDropArea(t,i)),o.querySelectorAll(".ag-column-drop-cell").forEach(s=>{const n=s.querySelector(".ag-column-drop-cell-text")?.textContent;_(s.querySelector(".ag-drag-handle"),B.columnDropCellDragHandle(t,i,n)),_(s.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),B.columnDropCellCancelButton(t,i,n))})})}},WT={moduleName:"Testing",version:L,beans:[NT]};function zT({testIdAttribute:e}={}){e&&VT(e),Qd.registerModules([WT])}var _T=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);for(const n of t??[])this.createMethod(s,n,!0);for(const n of o??[])this.createMethod(s,n,!1);return s}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&D(49,{methodName:t}),null)}}},UT=class extends Qu{constructor(e){super(e,Oa)}},We=p.createContext({}),Ng=p.createContext("default"),ps=(e,t,o,i)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();let r,a,l=!1;return n.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),o.appendChild(a),cd(i,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),i&&cd(i,void 0))}},cd=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const o=e;o.current=t}},at=(...e)=>e.filter(o=>o!=null&&o!=="").join(" "),dt=class Wg{constructor(...t){this.classesMap={};for(const o of t)this.classesMap[o]=!0}setClass(t,o){if(!!this.classesMap[t]==o)return this;const s=new Wg;return s.classesMap={...this.classesMap},s.classesMap[t]=o,s}toString(){return Object.keys(this.classesMap).filter(o=>this.classesMap[o]).join(" ")}},Mi=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,o=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===o()},ca=p.version?.split(".")[0],zg=ca==="16"||ca==="17";function $T(){return ca==="19"}var Ws=!1;function KT(e){return Ws||setTimeout(()=>Ws=!1,0),Ws=!0,e()}var rs=(e,t)=>{!zg&&e&&!Ws?ga.flushSync(t):t()},qT=e=>{zg?e():p.startTransition(e)};function jT(e,t,o){return p.useSyncExternalStore?p.useSyncExternalStore(e,t):o}function mn(e,t,o){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(o||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const i=[],s=[],n=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];n.set(l.instanceId,l),r.has(l.instanceId)&&i.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||s.push(l)}return i.length===e.length&&s.length===0?e:i.length===0&&s.length===t.length?t:i.length===0?s:s.length===0?i:[...i,...s]}var _g=p.forwardRef((e,t)=>{const{registry:o,context:i}=p.useContext(We),s=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef(null),l=p.useRef(null),c=p.useRef(),[d,u]=p.useState(),[h,g]=p.useState(),[f,m]=p.useState(),[C,v]=p.useState(()=>new dt),[w,b]=p.useState(()=>new dt("ag-hidden")),[y,S]=p.useState(()=>new dt("ag-hidden")),[F,E]=p.useState(()=>new dt("ag-invisible"));p.useImperativeHandle(t,()=>({refresh(){return!1}})),p.useLayoutEffect(()=>ps(d,i,n.current),[d]);const M=p.useCallback(ie=>{if(s.current=ie,!ie||i.isDestroyed()){c.current=i.destroyBean(c.current);return}const $={setInnerRenderer:(z,te)=>{u(z),m(te)},setChildCount:z=>g(z),toggleCss:(z,te)=>v(q=>q.setClass(z,te)),setContractedDisplayed:z=>S(te=>te.setClass("ag-hidden",!z)),setExpandedDisplayed:z=>b(te=>te.setClass("ag-hidden",!z)),setCheckboxVisible:z=>E(te=>te.setClass("ag-invisible",!z)),setCheckboxSpacing:z=>E(te=>te.setClass("ag-group-checkbox-spacing",z))},Z=o.createDynamicBean("groupCellRendererCtrl",!0);Z&&(c.current=i.createBean(Z),c.current.init($,ie,r.current,a.current,l.current,_g,e))},[]),T=p.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),G=p.useMemo(()=>`ag-group-expanded ${w.toString()}`,[w]),P=p.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),I=p.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),A=d?.componentFromFramework,J=A?d.componentClass:void 0,k=d==null&&f!=null,j=Ei(f);return p.createElement("span",{className:T,ref:M,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:G,ref:a}),p.createElement("span",{className:P,ref:l}),p.createElement("span",{className:I,ref:r}),p.createElement("span",{className:"ag-group-value",ref:n},k?j:A?p.createElement(J,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),dd=_g,El=p.createContext({setMethods:()=>{}}),YT=e=>{const{initialProps:t,addUpdateCallback:o,CustomComponentClass:i,setMethods:s}=e,[{key:n,...r},a]=p.useState(t);return p.useEffect(()=>{o(l=>a(l))},[]),p.createElement(El.Provider,{value:{setMethods:s}},p.createElement(i,{key:n,...r}))},QT=p.memo(YT),ZT=0;function ud(){return`agPortalKey_${++ZT}`}var Ug=class{constructor(e,t,o,i){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=o,this.suppressFallbackMethods=!!i,this.statelessComponent=this.isStateless(this.reactComponent),this.key=ud(),this.portalKey=ud(),this.instanceCreated=this.isStatelessComponent()?se.resolve(!1):new se(s=>{this.resolveInstanceCreated=s})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),o=document.createElement(t||"div");return o.classList.add("ag-react-container"),e.reactContainer=o,o}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const o=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!o){setTimeout(()=>this.callMethod(e,t));return}const i=o[e];if(i)return i.apply(o,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new se(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=ga.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return p.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const o=this[`${e}Component`];if(!this.suppressFallbackMethods&&o)return o.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function Bn(e,t,o){for(const i of e){const s=t[i];s&&(o[i]=s)}}var ht=class extends Ug{constructor(){super(...arguments),this.awaitUpdateCallback=new se(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=QT}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:o=>this.setMethods(o),addUpdateCallback:o=>{this.updateCallback=()=>(o(this.getProps()),new se(i=>{setTimeout(()=>{i()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Bn(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new se(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},JT=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},XT=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}},e2=class extends ht{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},t2=class extends ht{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:o,shake:i}=this;return e.label=t,e.icon=o,e.shake=i,e}},o2=class extends ht{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new se(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new se(o=>{this.resolveFilterPassCallback=o});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},i2=class extends ht{constructor(){super(...arguments),this.awaitSetMethodsCallback=new se(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function $g(e,t){e.parentFilterInstance(o=>{(o.setModel(t)||se.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var s2=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=o=>this.updateModel(o)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Bn(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),$g(this.floatingFilterParams,e)}},n2=class extends ht{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),$g(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},r2=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},a2=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},l2=class extends ht{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},c2=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},d2=class extends ht{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function xl(){D(231)}var u2=1e3,h2=class{constructor(e,t,o){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=o||u2}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,o){this.portals=[...this.portals,e],this.waitForInstance(t,o),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,o=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-o>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){rs(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,o)})}}},g2=p.createContext([]),p2=p.createContext(void 0),f2=({ctrl:e})=>{const t=e.isAlive(),{context:o}=p.useContext(We),[i,s]=p.useState(),[n,r]=p.useState(),a=p.useRef(),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=p.useRef();t&&!h.current&&(h.current=new as(()=>l.current));const g=p.useCallback(v=>{if(l.current=v,!v||!e.isAlive()||o.isDestroyed()){a.current=o.destroyBean(a.current);return}a.current=o.createBean(new Di);const w=()=>{const y=e.getSelectAllGui();y&&(c.current?.insertAdjacentElement("afterend",y),a.current.addDestroyFunc(()=>y.remove()))},b={setWidth:y=>{l.current&&(l.current.style.width=y)},toggleCss:(y,S)=>h.current.toggleCss(y,S),setUserStyles:y=>r(y),setAriaSort:y=>{l.current&&(y?_p(l.current,y):Up(l.current))},setUserCompDetails:y=>s(y),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:w,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(b,v,c.current,d.current,a.current),w()},[]);p.useLayoutEffect(()=>ps(i,o,d.current,u),[i]),p.useEffect(()=>{e.setDragSource(l.current)},[i]);const f=p.useMemo(()=>!!(i?.componentFromFramework&&Mi(i.componentClass)),[i]),m=i?.componentFromFramework,C=i?.componentClass;return p.createElement("div",{ref:g,style:n,className:"ag-header-cell",role:"columnheader"},p.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),p.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},m?f?p.createElement(C,{...i.params}):p.createElement(C,{...i.params,ref:u}):null))},m2=p.memo(f2),C2=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Bn(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},v2=({ctrl:e})=>{const{context:t,gos:o}=p.useContext(We),[i,s]=p.useState(),[n,r]=p.useState(()=>new dt("ag-header-cell","ag-floating-filter")),[a,l]=p.useState(()=>new dt),[c,d]=p.useState(()=>new dt("ag-floating-filter-button","ag-hidden")),[u,h]=p.useState("false"),[g,f]=p.useState(),[,m]=p.useState(1),C=p.useRef(),v=p.useRef(null),w=p.useRef(null),b=p.useRef(null),y=p.useRef(null),S=p.useRef(),F=p.useRef(),E=z=>{z!=null&&S.current?.(z)},M=p.useCallback(z=>{if(v.current=z,!z||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new Di),F.current=new se(q=>{S.current=q});const te={toggleCss:(q,oe)=>r(de=>de.setClass(q,oe)),setUserStyles:q=>s(q),addOrRemoveBodyCssClass:(q,oe)=>l(de=>de.setClass(q,oe)),setButtonWrapperDisplayed:q=>{d(oe=>oe.setClass("ag-hidden",!q)),h(q?"false":"true")},setWidth:q=>{v.current&&(v.current.style.width=q)},setCompDetails:q=>f(q),getFloatingFilterComp:()=>F.current?F.current:null,setMenuIcon:q=>y.current?.appendChild(q)};e.setComp(te,z,y.current,w.current,C.current)},[]);p.useLayoutEffect(()=>ps(g,t,w.current,E),[g]);const T=p.useMemo(()=>n.toString(),[n]),G=p.useMemo(()=>a.toString(),[a]),P=p.useMemo(()=>c.toString(),[c]),I=p.useMemo(()=>!!(g&&g.componentFromFramework&&Mi(g.componentClass)),[g]),A=p.useMemo(()=>o.get("reactiveCustomComponents"),[]),J=p.useMemo(()=>o.get("enableFilterHandlers"),[]),[k,j]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(A){const z=J?C2:s2,te=new z(g.params,()=>m(q=>q+1));E(te),j(te)}else xl()},[g]);const ie=k?.getProps(),$=g?.componentFromFramework,Z=g?.componentClass;return p.createElement("div",{ref:M,style:i,className:T,role:"gridcell"},p.createElement("div",{ref:w,className:G,role:"presentation"},$?A?ie&&p.createElement(El.Provider,{value:{setMethods:z=>k.setMethods(z)}},p.createElement(Z,{...ie})):p.createElement(Z,{...g.params,ref:I?()=>{}:E}):null),p.createElement("div",{ref:b,"aria-hidden":u,className:P,role:"presentation"},p.createElement("button",{ref:y,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},w2=p.memo(v2),b2=({ctrl:e})=>{const{context:t}=p.useContext(We),[o,i]=p.useState(),[s,n]=p.useState(()=>new dt),[r,a]=p.useState(()=>new dt),[l,c]=p.useState("false"),[d,u]=p.useState(),[h,g]=p.useState(),f=p.useRef(),m=p.useRef(null),C=p.useRef(null),v=p.useRef(null),w=p.useRef(),b=p.useCallback(T=>{if(m.current=T,!T||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new Di);const G={setWidth:P=>{m.current&&(m.current.style.width=P)},toggleCss:(P,I)=>n(A=>A.setClass(P,I)),setUserStyles:P=>i(P),setHeaderWrapperHidden:P=>{const I=v.current;I&&(P?I.style.setProperty("display","none"):I.style.removeProperty("display"))},setHeaderWrapperMaxHeight:P=>{const I=v.current;I&&(P!=null?I.style.setProperty("max-height",`${P}px`):I.style.removeProperty("max-height"),I.classList.toggle("ag-header-cell-comp-wrapper-limited-height",P!=null))},setUserCompDetails:P=>g(P),setResizableDisplayed:P=>{a(I=>I.setClass("ag-hidden",!P)),c(P?"false":"true")},setAriaExpanded:P=>u(P),getUserCompInstance:()=>w.current||void 0};e.setComp(G,T,C.current,v.current,f.current)},[]);p.useLayoutEffect(()=>ps(h,t,v.current),[h]),p.useEffect(()=>{m.current&&e.setDragSource(m.current)},[h]);const y=p.useMemo(()=>!!(h?.componentFromFramework&&Mi(h.componentClass)),[h]),S=p.useMemo(()=>"ag-header-group-cell "+s.toString(),[s]),F=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),E=h?.componentFromFramework,M=h?.componentClass;return p.createElement("div",{ref:b,style:o,className:S,role:"columnheader","aria-expanded":d},p.createElement("div",{ref:v,className:"ag-header-cell-comp-wrapper",role:"presentation"},E?y?p.createElement(M,{...h.params}):p.createElement(M,{...h.params,ref:w}):null),p.createElement("div",{ref:C,"aria-hidden":l,className:F}))},S2=p.memo(b2),y2=({ctrl:e})=>{const{gos:t,context:o}=p.useContext(We),{topOffset:i,rowHeight:s}=p.useMemo(()=>e.getTopAndHeight(),[]),n=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>s+"px"),[u,h]=p.useState(()=>i+"px"),g=p.useRef(null),[f,m]=p.useState(()=>e.getUpdatedHeaderCtrls()),C=p.useRef(),v=p.useRef(null),w=p.useCallback(S=>{if(v.current=S,!S||!e.isAlive()||o.isDestroyed()){C.current=o.destroyBean(C.current);return}C.current=o.createBean(new Di);const F={setHeight:E=>d(E),setTop:E=>h(E),setHeaderCtrls:(E,M,T)=>{const G=g.current,P=mn(G,E,M);P!==G&&(g.current=P,rs(T,()=>m(P)))},setWidth:E=>{v.current&&(v.current.style.width=E)},setRowIndex:E=>{a(E)}};e.setComp(F,C.current,!1)},[]),b=p.useMemo(()=>({height:c,top:u}),[c,u]),y=p.useCallback(S=>{switch(e.type){case"group":return p.createElement(S2,{ctrl:S,key:S.instanceId});case"filter":return p.createElement(w2,{ctrl:S,key:S.instanceId});default:return p.createElement(m2,{ctrl:S,key:S.instanceId})}},[]);return p.createElement("div",{ref:w,className:l,role:"row",style:b,tabIndex:n,"aria-rowindex":r},f.map(y))},R2=p.memo(y2),F2=({pinned:e})=>{const[t,o]=p.useState(!0),[i,s]=p.useState([]),{context:n}=p.useContext(We),r=p.useRef(null),a=p.useRef(null),l=p.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=p.useCallback(m=>{if(r.current=m,!m||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new sv(e));const C={setDisplayed:o,setCtrls:v=>s(v),setCenterWidth:v=>{a.current&&(a.current.style.width=v)},setViewportScrollLeft:v=>{r.current&&(r.current.scrollLeft=v)},setPinnedContainerWidth:v=>{r.current&&(r.current.style.width=v,r.current.style.minWidth=v,r.current.style.maxWidth=v)}};l.current.setComp(C,r.current)},[]),g=t?"":"ag-hidden",f=()=>i.map(m=>p.createElement(R2,{ctrl:m,key:m.instanceId}));return c?p.createElement("div",{ref:h,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):d?p.createElement("div",{ref:h,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):u?p.createElement("div",{ref:h,className:"ag-header-viewport "+g,role:"rowgroup",tabIndex:-1},p.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},f())):null},wr=p.memo(F2),E2=()=>{const[e,t]=p.useState(()=>new dt),[o,i]=p.useState(),{context:s}=p.useContext(We),n=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(n.current=d,!d||s.isDestroyed()){r.current=s.destroyBean(r.current);return}r.current=s.createBean(new QC);const u={toggleCss:(h,g)=>t(f=>f.setClass(h,g)),setHeightAndMinHeight:h=>i(h)};r.current.setComp(u,d,d)},[]),l=p.useMemo(()=>"ag-header "+e.toString(),[e]),c=p.useMemo(()=>({height:o,minHeight:o}),[o]);return p.createElement("div",{ref:a,className:l,style:c,role:"presentation"},p.createElement(wr,{pinned:"left"}),p.createElement(wr,{pinned:null}),p.createElement(wr,{pinned:"right"}))},x2=p.memo(E2),P2=(e,t)=>{p.useEffect(()=>{const o=t.current;if(o){const i=o.parentElement;if(i){const s=document.createComment(e);return i.insertBefore(s,o),()=>{s.remove()}}}},[e])},Ro=P2,D2=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new se(o=>{this.resolveInstanceCreated=o}),this.onValueChange=o=>this.updateValue(o),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){Bn(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},M2=e=>{const t=p.useRef(e),o=p.useRef(),i=p.useRef(!1),s=p.useRef(!1),[,n]=p.useState(0);i.current&&(s.current=!0),p.useEffect(()=>(i.current||(o.current=t.current(),i.current=!0),n(r=>r+1),()=>{s.current&&o.current?.()}),[])},T2=e=>{const[t,o]=p.useState(),i=p.useContext(We),{context:s,popupSvc:n,gos:r,editSvc:a}=i,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return M2(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,f;if(!s.isDestroyed()){f=s.createBean(a.createPopupEditorWrapper(u.params));const m=f.getGui();if(e.jsChildComp){const S=e.jsChildComp.getGui();S&&m.appendChild(S)}const{column:C,rowNode:v}=c,w={column:C,rowNode:v,type:"popupCellEditor",eventSource:d,ePopup:m,position:l.popupPosition,keepWithinBounds:!0},b=n?.positionPopupByComponent.bind(n,w),y=n?.addPopup({modal:h,eChild:m,closeOnEsc:!0,closedCallback:S=>{c.onPopupEditorClosed(S)},anchorToElement:d,positionCallback:b,ariaOwns:d});g=y?y.hideFunc:void 0,o(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{g?.(),s.destroyBean(f)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(ve(i))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?ga.createPortal(e.wrappedContent,t.getGui()):null},hd=p.memo(T2),I2=(e,t,o)=>{const{compProxy:i}=e;o(i);const s=i.getProps(),n=Mi(t);return p.createElement(El.Provider,{value:{setMethods:r=>i.setMethods(r)}},n?p.createElement(t,{...s}):p.createElement(t,{...s,ref:r=>i.setRef(r)}))},gd=(e,t,o)=>e.compProxy?I2(e,t,o):p.createElement(t,{...e.compDetails.params,ref:o}),A2=(e,t,o,i,s)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?gd(e,r,t):l?p.createElement(hd,{editDetails:e,cellCtrl:i,eParentCell:o,wrappedContent:gd(e,r,t)}):c&&s?p.createElement(hd,{editDetails:e,cellCtrl:i,eParentCell:o,jsChildComp:s}):null},k2=(e,t,o,i,s,n,r=!1)=>{const{context:a}=p.useContext(We),l=p.useCallback(()=>{const c=s.current;if(!c)return;const d=c.getGui();d&&d.parentElement&&d.remove(),a.destroyBean(c),s.current=void 0},[]);p.useEffect(()=>{const c=e!=null&&!r,d=e?.compDetails&&!e.compDetails.componentFromFramework,u=t&&o==null;if(!(c&&d&&!u)){l();return}const g=e.compDetails;if(s.current){const m=s.current,v=m.refresh!=null&&e.force==!1?m.refresh(g.params):!1;if(v===!0||v===void 0)return;l()}g.newAgStackInstance().then(m=>{if(!m)return;const C=m.getGui();if(!C)return;(t?o:n.current).appendChild(C),s.current=m})},[e,t,i,r]),p.useEffect(()=>l,[])},Kg=k2,L2=({cellCtrl:e,parent:t})=>{const o=p.useRef(),i=p.useMemo(()=>{const{loadingComp:s}=e.getDeferLoadingCellRenderer();return s?{value:void 0,compDetails:s,force:!1}:void 0},[e]);if(Kg(i,!1,void 0,1,o,t),i?.compDetails?.componentFromFramework){const s=i.compDetails.componentClass;return p.createElement(s,{...i.compDetails.params})}return p.createElement(p.Fragment,null)},O2=({cellCtrl:e,printLayout:t,editingCell:o})=>{const i=p.useContext(We),{context:s}=i,{column:{colIdSanitised:n},instanceId:r}=e,a=p.useRef(),[l,c]=p.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=p.useState(),[h,g]=p.useState(1),[f,m]=p.useState(),[C,v]=p.useState(!1),[w,b]=p.useState(!1),[y,S]=p.useState(!1),F=p.useRef(null),[E,M]=p.useState(),T=p.useMemo(()=>e.isForceWrapper(),[e]),G=p.useMemo(()=>e.getCellAriaRole(),[e]),P=p.useRef(null),I=p.useRef(null),A=p.useRef(null),J=p.useRef(),k=p.useRef(),j=p.useRef(),ie=p.useRef([]),$=p.useRef(),Z=p.useRef(),[z,te]=p.useState(0),q=p.useCallback(ee=>{Z.current=ee,te(ae=>ae+1)},[]),oe=l!=null&&(C||y||w)&&(d==null||!!d.popup),de=T||oe,Oe=p.useMemo(()=>e.getCellValueClass(),[e]),Ge=p.useCallback(ee=>{if(k.current=ee,ee){const ae=ee.isCancelBeforeStart&&ee.isCancelBeforeStart();setTimeout(()=>{ae?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(ee))})}},[e]),je=p.useRef();je.current||(je.current=new as(()=>P.current));const St=!!d&&!d.popup;Kg(l,de,Z.current,z,J,P,St);const yt=p.useRef();p.useLayoutEffect(()=>{const ee=yt.current,ae=l;if(yt.current=l,ee==null||ee.compDetails==null||ae==null||ae.compDetails==null)return;$.current?.refreshVisibility();const Ce=ee.compDetails,ue=ae.compDetails;if(Ce.componentClass!=ue.componentClass||A.current?.refresh==null)return;A.current.refresh(ue.params)!=!0&&g(Re=>Re+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||s.isDestroyed())return;const ae=d.compDetails,Ce=d.popup===!0,ue=ae.newAgStackInstance();return ue.then(X=>{if(!X)return;const Re=X.getGui();Ge(X),Ce||((T?j:P).current?.appendChild(Re),X.afterGuiAttached?.()),M(X)}),()=>{ue.then(X=>{const Re=X.getGui();e.disableEditorTooltipFeature(),s.destroyBean(X),Ge(void 0),M(void 0),Re?.remove()})}},[d]);const ge=p.useCallback(ee=>{if(j.current=ee,!ee||s.isDestroyed()||!e.isAlive()){const ue=ie.current;ie.current=[];for(const X of ue)X();return}let ae;const Ce=ue=>{ue&&(ee.insertAdjacentElement("afterbegin",ue.getGui()),ie.current.push(()=>{_t(ue.getGui()),s.destroyBean(ue),$.current===ae&&($.current=void 0)}))};C&&Ce(e.createSelectionCheckbox()),y&&Ce(e.createDndSource()),w&&(ae=e.createRowDragComp(),$.current=ae,ae&&(Ce(ae),ae.refreshVisibility()))},[e,s,y,w,C]),U=p.useCallback(()=>{const ee=!e.isCellSpanning()||I.current,ae=P.current;if(!ae||!ee||!e||!e.isAlive()||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new Di);const Ce={toggleCss:(X,Re)=>je.current.toggleCss(X,Re),setUserStyles:X=>m(X),getFocusableElement:()=>P.current,setIncludeSelection:X=>v(X),setIncludeRowDrag:X=>b(X),setIncludeDndSource:X=>S(X),setRowResizerElement:X=>{F.current&&_t(F.current),F.current=X,X&&P.current&&P.current.appendChild(X)},getCellEditor:()=>k.current??null,getCellRenderer:()=>A.current??J.current,getParentOfValue:()=>Z.current??j.current??P.current,setRenderDetails:(X,Re,He)=>{const Co=()=>{c(tt=>tt?.compDetails!==X||tt?.value!==Re||tt?.force!==He?{value:Re,compDetails:X,force:He}:tt)};if(X?.params?.deferRender&&!e.rowNode.group){const{loadingComp:tt,onReady:Ko}=e.getDeferLoadingCellRenderer();if(tt){c({value:void 0,compDetails:tt,force:!1}),Ko.then(()=>qT(Co));return}}Co()},setEditDetails:(X,Re,He,Co)=>{if(X){let tt;X.componentFromFramework&&(Co?tt=new D2(X.params,()=>g(Ko=>Ko+1)):xl()),u({compDetails:X,popup:Re,popupPosition:He,compProxy:tt}),Re||c(void 0)}else e.hasBrowserFocus()&&Ce.getFocusableElement().focus({preventScroll:!0}),k.current=void 0,u(void 0)},refreshEditStyles:(X,Re)=>{if(!P.current)return;const{current:He}=je;He.toggleCss("ag-cell-value",!de),He.toggleCss("ag-cell-inline-editing",!!X&&!Re),He.toggleCss("ag-cell-popup-editing",!!X&&!!Re),He.toggleCss("ag-cell-not-inline-editing",!X||!!Re)}},ue=j.current||void 0;e.setComp(Ce,ae,I.current??void 0,ue,t,o,a.current)},[]),ne=p.useCallback(ee=>{P.current=ee,U()},[]),V=p.useCallback(ee=>{I.current=ee,U()},[]),Q=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Mi(l.compDetails.componentClass)),[l]);p.useLayoutEffect(()=>{if(!P.current)return;const{current:ee}=je;ee.toggleCss("ag-cell-value",!de),ee.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),ee.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),ee.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const le=()=>{const{compDetails:ee,value:ae}=l;if(!ee)return ae?.toString?.()??ae;if(ee.componentFromFramework){const Ce=ee.componentClass;return p.createElement(p.Suspense,{fallback:p.createElement(L2,{cellCtrl:e,parent:P})},Q?p.createElement(Ce,{...ee.params,key:h}):p.createElement(Ce,{...ee.params,key:h,ref:A}))}},Me=()=>{const ee=()=>l==null?null:de?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:Oe,ref:q},le()):le(),ae=Ce=>A2(Ce,Ge,P.current,e,E);return d!=null?d.popup?p.createElement(p.Fragment,null,ee(),ae(d)):ae(d):ee()},Ae=()=>p.createElement("div",{ref:ne,style:f,role:G,"col-id":n},de?p.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:ge},Me()):Me());return e.isCellSpanning()?p.createElement("div",{ref:V,className:"ag-spanned-cell-wrapper",role:"presentation"},Ae()):Ae()},G2=p.memo(O2),H2=({rowCtrl:e,containerType:t})=>{const{context:o,gos:i,editSvc:s}=p.useContext(We),n=p.useContext(Ng)==="default",r=p.useRef(),a=p.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=p.useState(()=>c?e.rowNode.getRowIndexString():null),[h,g]=p.useState(()=>e.rowId),[f,m]=p.useState(()=>e.businessKey),[C,v]=p.useState(()=>e.rowStyles),w=p.useRef(null),[b,y]=p.useState(()=>null),[S,F]=p.useState(),[E,M]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[T,G]=p.useState(()=>c?e.getInitialTransform(t):void 0),P=p.useRef(null),I=p.useRef(),A=p.useRef(),J=p.useRef(!1),[k,j]=p.useState(0);p.useEffect(()=>{if(J.current||!S||k>10)return;const ge=P.current?.firstChild;ge?(e.setupDetailRowAutoHeight(ge),J.current=!0):j(U=>U+1)},[S,k]);const ie=p.useRef();ie.current||(ie.current=new as(()=>P.current));const $=p.useRef(()=>{}),Z=p.useCallback(ge=>($.current=ge,()=>{$.current=()=>{}}),[]),z=jT(Z,()=>w.current,[]),te=n?z:b,q=p.useCallback(ge=>{if(P.current=ge,r.current=ge?o.createBean(new Di):o.destroyBean(r.current),!ge){e.unsetComp(t);return}if(!e.isAlive()||o.isDestroyed())return;const U={setTop:M,setTransform:G,toggleCss:(ne,V)=>ie.current.toggleCss(ne,V),setDomOrder:ne=>a.current=ne,setRowIndex:u,setRowId:g,setRowBusinessKey:m,setUserStyles:v,setCellCtrls:(ne,V)=>{const Q=w.current,le=mn(Q,ne,a.current);le!==Q&&(w.current=le,n?$.current():rs(V,()=>y(le)))},showFullWidth:ne=>{A.current=ne.params,F(ne)},getFullWidthCellRenderer:()=>I.current,getFullWidthCellRendererParams:()=>A.current,refreshFullWidth:ne=>{const V=ne();return A.current=V,je.current?(F(Q=>({...Q,params:V})),!0):!I.current||!I.current.refresh?!1:I.current.refresh(V)}};e.setComp(U,ge,t,r.current)},[]);p.useLayoutEffect(()=>ps(S,o,P.current,I),[S]);const oe=p.useMemo(()=>{const ge={top:E,transform:T};return Object.assign(ge,C),ge},[E,T,C]),de=l&&S?.componentFromFramework,Oe=!l&&te!=null,Ge=p.useMemo(()=>!!(S?.componentFromFramework&&Mi(S.componentClass)),[S]),je=p.useRef(!1);p.useEffect(()=>{je.current=Ge&&!!S&&!!i.get("reactiveCustomComponents")},[Ge,S]);const St=()=>te?.map(ge=>p.createElement(G2,{cellCtrl:ge,editingCell:s?.isEditing(ge,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:ge.instanceId})),yt=()=>{const ge=S.componentClass;return Ge?p.createElement(ge,{...S.params}):p.createElement(ge,{...S.params,ref:I})};return p.createElement("div",{ref:q,role:"row",style:oe,"row-index":d,"row-id":h,"row-business-key":f},Oe?St():de?yt():null)},pd=p.memo(H2),B2=({name:e})=>{const{context:t,gos:o}=p.useContext(We),i=p.useMemo(()=>us(e),[e]),s=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef([]),l=p.useRef([]),[c,d]=p.useState(()=>[]),u=!!o.get("enableCellSpan")&&!!i.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[f,m]=p.useState(()=>[]),C=p.useRef(!1),v=p.useRef(),w=p.useMemo(()=>at("ag-viewport",Ku(e)),[e]),b=p.useMemo(()=>at(qu(e)),[e]),y=p.useMemo(()=>at("ag-spanning-container",wv(e)),[e]),S=i.type==="center"||u,F=S?s:n;Ro(" AG Row Container "+e+" ",F);const E=p.useCallback(()=>{const k=!S||s.current!=null,j=n.current!=null,ie=!u||r.current!=null;return k&&j&&ie},[]),M=p.useCallback(()=>s.current==null&&n.current==null&&r.current==null,[]),T=p.useCallback(()=>{if(M()&&(v.current=t.destroyBean(v.current)),!t.isDestroyed()&&E()){const k=$=>{const Z=mn(l.current,a.current,C.current);Z!==l.current&&(l.current=Z,rs($,()=>d(Z)))},j=$=>{const Z=mn(g.current,h.current,C.current);Z!==g.current&&(g.current=Z,rs($,()=>m(Z)))},ie={setHorizontalScroll:$=>{s.current&&(s.current.scrollLeft=$)},setViewportHeight:$=>{s.current&&(s.current.style.height=$)},setRowCtrls:({rowCtrls:$,useFlushSync:Z})=>{const z=!!Z&&a.current.length>0&&$.length>0;a.current=$,k(z)},setSpannedRowCtrls:($,Z)=>{const z=!!Z&&h.current.length>0&&$.length>0;h.current=$,j(z)},setDomOrder:$=>{C.current!=$&&(C.current=$,k(!1))},setContainerWidth:$=>{n.current&&(n.current.style.width=$)},setOffsetTop:$=>{n.current&&(n.current.style.transform=`translateY(${$})`)}};v.current=t.createBean(new Mv(e)),v.current.setComp(ie,n.current,r.current??void 0,s.current)}},[E,M]),G=p.useCallback(k=>{n.current=k,T()},[T]),P=p.useCallback(k=>{r.current=k,T()},[T]),I=p.useCallback(k=>{s.current=k,T()},[T]),A=()=>p.createElement("div",{className:b,ref:G,role:S?"presentation":"rowgroup"},c.map(k=>p.createElement(pd,{rowCtrl:k,containerType:i.type,key:k.instanceId})));if(!S)return A();const J=()=>p.createElement("div",{className:y,ref:P,role:"presentation"},f.map(k=>p.createElement(pd,{rowCtrl:k,containerType:i.type,key:k.instanceId})));return p.createElement("div",{className:w,ref:I,role:"rowgroup"},A(),u?J():null)},V2=p.memo(B2),N2=()=>{const e=p.useContext(We),{context:t,overlays:o}=e,[i,s]=p.useState(""),[n,r]=p.useState(0),[a,l]=p.useState(0),[c,d]=p.useState("0px"),[u,h]=p.useState("0px"),[g,f]=p.useState("100%"),[m,C]=p.useState("0px"),[v,w]=p.useState("0px"),[b,y]=p.useState("100%"),[S,F]=p.useState(!0),[E,M]=p.useState(!0),[T,G]=p.useState(null),[P,I]=p.useState(""),[A,J]=p.useState(null),[k,j]=p.useState("ag-layout-normal"),ie=p.useRef();ie.current||(ie.current=new as(()=>$.current));const $=p.useRef(null),Z=p.useRef(null),z=p.useRef(null),te=p.useRef(null),q=p.useRef(null),oe=p.useRef(null),de=p.useRef(null),Oe=p.useRef([]),Ge=p.useRef([]);Ro(" AG Grid Body ",$),Ro(" AG Pinned Top ",Z),Ro(" AG Sticky Top ",z),Ro(" AG Middle ",oe),Ro(" AG Pinned Bottom ",de);const je=p.useCallback(ue=>{if($.current=ue,!ue||t.isDestroyed()){Oe.current=t.destroyBeans(Oe.current);for(const be of Ge.current)be();Ge.current=[];return}const X=(be,ot)=>{be.appendChild(ot),Ge.current.push(()=>ot.remove())},Re=be=>{const ot=t.createBean(new be);return Oe.current.push(ot),ot},He=(be,ot,hp)=>{X(be,document.createComment(hp)),X(be,Re(ot).getGui())};He(ue,rv," AG Fake Horizontal Scroll ");const Co=o?.getOverlayWrapperCompClass();Co&&He(ue,Co," AG Overlay Wrapper "),q.current&&He(q.current,lv," AG Fake Vertical Scroll ");const tt={setRowAnimationCssOnBodyViewport:s,setColumnCount:be=>{$.current&&Wp($.current,be)},setRowCount:be=>{$.current&&Vp($.current,be)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:F,setBottomInvisible:M,setColumnMovingCss:(be,ot)=>ie.current.toggleCss(be,ot),updateLayoutClasses:j,setAlwaysVerticalScrollClass:G,setPinnedTopBottomOverflowY:I,setCellSelectableCss:(be,ot)=>J(ot?be:null),setBodyViewportWidth:be=>{oe.current&&(oe.current.style.width=be)},registerBodyViewportResizeListener:be=>{if(oe.current){const ot=Kt(e,oe.current,be);Ge.current.push(()=>ot())}},setStickyBottomHeight:C,setStickyBottomBottom:w,setStickyBottomWidth:y,setGridRootRole:be=>ue.setAttribute("role",be)},Ko=t.createBean(new kv);Oe.current.push(Ko),Ko.setComp(tt,ue,oe.current,Z.current,de.current,z.current,te.current)},[]),St=p.useMemo(()=>at("ag-root","ag-unselectable",k),[k]),yt=p.useMemo(()=>at("ag-body-viewport",i,k,T,A),[i,k,T,A]),ge=p.useMemo(()=>at("ag-body",k),[k]),U=p.useMemo(()=>at("ag-floating-top",S?"ag-invisible":null,A),[A,S]),ne=p.useMemo(()=>at("ag-sticky-top",A),[A]),V=p.useMemo(()=>at("ag-sticky-bottom",m==="0px"?"ag-invisible":null,A),[A,m]),Q=p.useMemo(()=>at("ag-floating-bottom",E?"ag-invisible":null,A),[A,E]),le=p.useMemo(()=>({height:n,minHeight:n,overflowY:P}),[n,P]),Me=p.useMemo(()=>({height:c,top:u,width:g}),[c,u,g]),Ae=p.useMemo(()=>({height:m,bottom:v,width:b}),[m,v,b]),ee=p.useMemo(()=>({height:a,minHeight:a,overflowY:P}),[a,P]),ae=ue=>p.createElement(V2,{name:ue,key:`${ue}-container`}),Ce=({section:ue,children:X,className:Re,style:He})=>p.createElement("div",{ref:ue,className:Re,role:"presentation",style:He},X.map(ae));return p.createElement("div",{ref:je,className:St},p.createElement(x2,null),Ce({section:Z,className:U,style:le,children:["topLeft","topCenter","topRight","topFullWidth"]}),p.createElement("div",{className:ge,ref:q,role:"presentation"},Ce({section:oe,className:yt,children:["left","center","right","fullWidth"]})),Ce({section:z,className:ne,style:Me,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),Ce({section:te,className:V,style:Ae,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),Ce({section:de,className:Q,style:ee,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},W2=p.memo(N2),z2=(e,t)=>{const{children:o,eFocusableElement:i,onTabKeyDown:s,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=p.useContext(We),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=v=>{const w=v==null?void 0:parseInt(v,10).toString();for(const b of[c,d])w===void 0?b.current?.removeAttribute("tabindex"):b.current?.setAttribute("tabindex",w)};p.useImperativeHandle(t,()=>({forceFocusOutOfContainer(v){u.current?.forceFocusOutOfContainer(v)}}));const g=p.useCallback(()=>{const v=c.current,w=d.current;if(!v&&!w||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(v&&w){const b={setTabIndex:h};u.current=l.createBean(new UT({comp:b,eTopGuard:v,eBottomGuard:w,eFocusableElement:i,onTabKeyDown:s,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:y=>n.focusInnerElement(y),isEmpty:a}))}},[]),f=p.useCallback(v=>{c.current=v,g()},[g]),m=p.useCallback(v=>{d.current=v,g()},[g]),C=v=>{const w=v==="top"?pi.TAB_GUARD_TOP:pi.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${pi.TAB_GUARD} ${w}`,role:"presentation",ref:v==="top"?f:m})};return p.createElement(p.Fragment,null,C("top"),o,C("bottom"))},_2=p.forwardRef(z2),U2=p.memo(_2),$2=({context:e})=>{const[t,o]=p.useState(""),[i,s]=p.useState(""),[n,r]=p.useState(null),[a,l]=p.useState(null),[c,d]=p.useState(!1),[u,h]=p.useState(),g=p.useRef(),f=p.useRef(null),m=p.useRef(),[C,v]=p.useState(null),w=p.useRef(()=>{}),b=p.useRef(),y=p.useRef([]),S=p.useCallback(()=>{},[]);Ro(" AG Grid ",f);const F=p.useCallback(I=>{if(f.current=I,g.current=I?e.createBean(new Bv):e.destroyBean(g.current),!I||e.isDestroyed())return;const A=g.current;w.current=A.focusInnerElement.bind(A);const J={destroyGridUi:()=>{},setRtlClass:o,forceFocusOutOfContainer:k=>{if(!k&&b.current?.isDisplayed()){b.current.forceFocusOutOfContainer(k);return}m.current?.forceFocusOutOfContainer(k)},updateLayoutClasses:s,getFocusableContainers:()=>{const k=[],j=[],ie=f.current?.querySelector(".ag-root");for(const Z of y.current){if(!Z.isDisplayed())continue;const z=Z.getFocusableContainerName();if(z==="rowGroupToolbar"||z==="pivotToolbar"){k.push(Z);continue}j.push(Z)}const $=[...k];return ie&&$.push({getGui:()=>ie,getFocusableContainerName:()=>"gridBody"}),$.push(...j),$},setCursor:r,setUserSelect:l};A.setComp(J,I,I),d(!0)},[]);p.useEffect(()=>{const I=g.current,A=f.current;if(!u||!I||!C||!A||e.isDestroyed())return;const J=[];y.current=[],b.current=void 0;const{watermarkSelector:k,paginationSelector:j,sideBarSelector:ie,statusBarSelector:$,gridHeaderDropZonesSelector:Z}=I.getOptionalSelectors(),z=[];if(Z){const q=e.createBean(new Z.component),oe=q.getGui();A.insertAdjacentElement("afterbegin",oe),z.push(oe),J.push(q),y.current.push(...q.getFocusableContainers?.()??[])}if(ie){const q=e.createBean(new ie.component),oe=q.getGui(),de=C.querySelector(".ag-tab-guard-bottom");de&&(de.insertAdjacentElement("beforebegin",oe),z.push(oe)),J.push(q),y.current.push(q)}const te=q=>{const oe=e.createBean(new q),de=oe.getGui();return A.insertAdjacentElement("beforeend",de),z.push(de),J.push(oe),oe};if($){const q=te($.component);y.current.push(q)}if(j){const q=te(j.component);b.current=q,y.current.push(q)}return k&&te(k.component),()=>{e.destroyBeans(J),y.current=[],b.current=void 0;for(const q of z)q.remove()}},[u,C,e]);const E=p.useMemo(()=>at("ag-root-wrapper",t,i),[t,i]),M=p.useMemo(()=>at("ag-root-wrapper-body","ag-focus-managed",i),[i]),T=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),G=p.useCallback(I=>{m.current=I,h(I!==null)},[]),P=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:F,className:E,style:T,role:"presentation"},p.createElement("div",{className:M,ref:v,role:"presentation"},c&&C&&!e.isDestroyed()&&p.createElement(We.Provider,{value:e.getBeans()},p.createElement(U2,{ref:G,eFocusableElement:C,onTabKeyDown:S,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:P},p.createElement(W2,null)))))},K2=p.memo($2),q2=class extends x{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(t=>!!t.eGui))}},j2=typeof window>"u"?p.useEffect:p.useLayoutEffect,qg={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},Y2={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...qg},jg=new Set(Object.keys(Y2)),Q2=new Set(Object.keys(qg)),Yg=e=>{const t=p.useContext(g2),o=p.useContext(p2),i=p.useRef(),s=p.useRef(null),n=p.useRef(null),r=p.useRef([]),a=p.useRef([]),l=p.useRef(e),c=p.useRef(),d=p.useRef(),u=p.useRef(!1),[h,g]=p.useState(void 0),[,f]=p.useState(0),m=p.useRef(),C=S=>{const F=s.current?.classList,E=(M="")=>M.trim().split(/\s+/g).filter(Boolean);if(m.current!==S){for(const M of E(m.current))F?.contains(M)&&F.remove(M);for(const M of E(S))F?.contains(M)||F?.add(M);m.current=S}};j2(()=>{C(e.className)},[e.className]);const v=p.useCallback(S=>{if(s.current=S,C(e.className),!S){for(const k of r.current)k();r.current.length=0;return}const F=[...e.modules??[],...t??[]];o&&Zd(F)?.setLicenseKey(o),n.current||(n.current=new h2(()=>f(k=>k+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{n.current?.destroy(),n.current=null}));const E=qf(e.gridOptions,e,Object.keys(e).filter(k=>!jg.has(k))),M=()=>{if(u.current){const k=()=>c.current?.shouldQueueUpdates()?void 0:a.current.shift();let j=k();for(;j;)j(),j=k()}},T=new eI(M);c.current=T;const G=new q2,P={providedBeanInstances:{frameworkCompWrapper:new J2(n.current,E),renderStatus:G},modules:F,frameworkOverrides:T,setThemeOnGridDiv:!0},I=k=>{g(k),k.createBean(G),r.current.push(()=>{k.destroy()}),k.getBean("ctrlsSvc").whenReady({addDestroyFunc:j=>{r.current.push(j)}},()=>{if(k.isDestroyed())return;const j=i.current;j&&e.passGridApi?.(j)})},A=k=>{k.getBean("ctrlsSvc").whenReady({addDestroyFunc:j=>{r.current.push(j)}},()=>{for(const j of a.current)j();a.current.length=0,u.current=!0})},J=new A1;E.gridId??(E.gridId=d.current),i.current=J.create(S,E,I,A,P),r.current.push(()=>{i.current=void 0}),i.current&&(d.current=i.current.getGridId())},[]),w=p.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),b=p.useCallback(S=>{u.current&&!c.current?.shouldQueueUpdates()?S():a.current.push(S)},[]);p.useEffect(()=>{const S=Z2(l.current,e);l.current=e,b(()=>{i.current&&jf(S,i.current)})},[e]);const y=!p.useSyncExternalStore||As(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:w,ref:v},p.createElement(Ng.Provider,{value:y},h&&!h.isDestroyed()?p.createElement(K2,{key:h.instanceId,context:h}):null,n.current?.getPortals()??null))};function Z2(e,t){const o={};for(const i of Object.keys(t)){if(jg.has(i)){Q2.has(i)&&D(274,{prop:i});continue}const s=t[i];e[i]!==s&&(o[i]=s)}return o}var J2=class extends _T{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const o=this.gridOptions;if(As(o,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return As(o,"enableFilterHandlers")?i2:o2;case"floatingFilterComponent":return As(o,"enableFilterHandlers")?r2:n2;case"dateComponent":return e2;case"dragAndDropImageComponent":return t2;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return XT;case"statusPanel":return c2;case"toolPanel":return d2;case"menuItem":return l2;case"cellRenderer":return JT;case"innerHeaderComponent":return a2}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":xl();break}const s=!t.cellRenderer&&t.name!=="toolPanel";return new Ug(e,this.parent,t,s)}},X2=p.forwardRef((e,t)=>{const o=p.useContext(We),{registry:i,context:s,gos:n,rowModel:r}=o,[a,l]=p.useState(()=>new dt),[c,d]=p.useState(()=>new dt),[u,h]=p.useState(),[g,f]=p.useState(),m=p.useRef(),C=p.useRef(null),v=p.useRef(),w=p.useMemo(()=>Rf(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),b=p.useMemo(()=>a.toString()+" ag-details-row",[a]),y=p.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&p.useImperativeHandle(t,()=>({refresh(){return m.current?.refresh()??!1}})),e.template&&D(230);const S=p.useCallback(E=>{if(C.current=E,!E||s.isDestroyed()){m.current=s.destroyBean(m.current),v.current?.();return}const M={toggleCss:(G,P)=>l(I=>I.setClass(G,P)),toggleDetailGridCss:(G,P)=>d(I=>I.setClass(G,P)),setDetailGrid:G=>h(G),setRowData:G=>f(G),getGui:()=>C.current},T=i.createDynamicBean("detailCellRendererCtrl",!0);if(T&&(s.createBean(T),T.init(M,e),m.current=T,n.get("detailRowAutoHeight"))){const G=()=>{if(C.current==null)return;const P=C.current.clientHeight;P!=null&&P>0&&setTimeout(()=>{e.node.setRowHeight(P),(Se(n)||xi(n))&&r.onRowHeightChanged()},0)};v.current=Kt(o,E,G),G()}},[]),F=p.useCallback(E=>{m.current?.registerDetailWithMaster(E)},[]);return p.createElement("div",{className:b,ref:S},u&&p.createElement(Yg,{className:y,...u,modules:w,rowData:g,passGridApi:F}))}),eI=class extends Jh{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:dd,agGroupRowRenderer:dd,agDetailCellRenderer:X2},this.wrapIncoming=(t,o)=>o==="ensureVisible"?KT(t):t()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return $T()}},Qg=class extends p.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return p.createElement(Yg,{...this.props,passGridApi:this.setGridApi})}},Zg=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Zg||{}),Vt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Vt||{}),Cn=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Cn||{});const tI=fe("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),oI=fe("z-floating overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),da=fe("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small-text h-[34px] rounded text-primary",bn.menuItem),ua="opacity-75 !cursor-not-allowed",Jg="text-error",iI="my-1 border-t border-hover border-secondary",Zo=4,sI=H.jsx(vn.IconChevronRight,{size:14}),Xg=({ariaLabel:e,className:t,size:o=24,onClose:i,...s})=>H.jsx(Rd,{"aria-label":e,className:Mt.mergeClasses(t,"w-auto h-auto"),onClick:i,icon:H.jsx(vn.IconX,{size:o}),...s}),nI='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]',rI=["ArrowDown","ArrowUp","Home","End"],fd=e=>Array.from(e.querySelectorAll(nI)).filter(t=>!t.hasAttribute("disabled")&&t.getAttribute("aria-disabled")!=="true"),ep=e=>e.ownerDocument.defaultView?.getComputedStyle(e).direction==="rtl",aI=e=>ep(e)?"ArrowLeft":"ArrowRight",lI=e=>ep(e)?"ArrowRight":"ArrowLeft",cI=e=>e instanceof HTMLElement&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable),dI=(e,t,o)=>{if(e==="Home")return 0;if(e==="End")return o-1;const i=e==="ArrowDown"?1:-1;return t===-1?i===1?0:o-1:(t+i+o)%o};function tp(e,t="menu",o=!1,i){const[s,n]=p.useState(!1),r=pe.useFloatingNodeId(),{refs:a,elements:l,floatingStyles:c,context:d}=pe.useFloating({nodeId:r,placement:"right-start",open:s,onOpenChange:n,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:0,crossAxis:-4}),pe.flip({padding:e}),pe.shift({padding:e})]}),u=pe.useHover(d,{enabled:!o,move:!1,handleClose:pe.safePolygon(),delay:{open:80,close:80}}),h=pe.useClick(d,{enabled:!o}),g=pe.useDismiss(d,{ancestorScroll:!0,bubbles:{escapeKey:!1,outsidePress:!0}}),f=pe.useRole(d,{role:t}),{getReferenceProps:m,getFloatingProps:C}=pe.useInteractions([u,h,g,f]),[v,w]=p.useState(!1),b=l.floating;p.useEffect(()=>{!s||!v||b==null||(fd(b)[0]?.focus(),w(!1))},[s,v,b]);const y=p.useCallback(M=>{o||!(M.key===aI(M.currentTarget)||M.key==="Enter"||M.key===" ")||(M.preventDefault(),M.stopPropagation(),n(!0),w(!0))},[o]),S=p.useCallback(M=>{if(M.defaultPrevented||cI(M.target))return;if(M.key===lI(M.currentTarget)){M.preventDefault(),M.stopPropagation(),n(!1),a.domReference.current?.focus();return}if(!rI.includes(M.key))return;M.preventDefault(),M.stopPropagation();const T=fd(M.currentTarget);if(T.length===0)return;const G=M.currentTarget.ownerDocument.activeElement,P=T.findIndex(I=>I===G);T[dI(M.key,P,T.length)]?.focus()},[a.domReference]),F=p.useCallback(M=>m({...M,onKeyDown:y}),[m,y]),E=p.useCallback(M=>C({...M,onKeyDown:S}),[C,S]);return{isOpen:s,nodeId:r,refs:a,floatingStyles:c,context:d,getReferenceProps:F,getFloatingProps:E}}const uI="rounded bg-layer-0 shadow",op=({refs:e,floatingStyles:t,context:o,getFloatingProps:i,role:s,surfaceClassName:n,className:r,children:a})=>{const l=Fd();return H.jsx(pe.FloatingPortal,{children:H.jsx(pe.FloatingFocusManager,{context:o,modal:!1,initialFocus:-1,returnFocus:!0,children:H.jsx("div",{ref:e.setFloating,style:t,role:s,className:fe("z-floating overflow-auto text-primary focus-visible:outline-none",n??uI,l,r),...i(),children:a})})})},hI=({item:e,onRootClose:t})=>{const{isOpen:o,refs:i,floatingStyles:s,context:n,getReferenceProps:r,getFloatingProps:a}=tp(Zo,"menu",!!e.disabled),l=p.useCallback(c=>d=>{c.disabled||(c.onClick?.({key:c.key,domEvent:d}),t())},[t]);return H.jsxs(H.Fragment,{children:[H.jsxs("button",{ref:i.setReference,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":o,"aria-disabled":!!e.disabled,disabled:e.disabled,className:fe(da,e.disabled&&ua,e.className),...r(),children:[e.icon&&H.jsx("span",{className:fe(e.disabled&&"text-secondary"),children:H.jsx(zs,{icon:e.icon})}),H.jsx("span",{className:fe("flex-1 truncate text-start",e.disabled&&"text-secondary"),children:e.label}),H.jsx("span",{className:fe("ml-auto shrink-0",e.disabled&&"text-secondary"),children:sI})]}),o&&H.jsx(op,{refs:i,floatingStyles:s,context:n,getFloatingProps:a,role:"menu",className:"w-max",children:H.jsx("div",{role:"none",className:fe("py-1",bn.dropdownList),children:e.children.map(c=>H.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!c.disabled,disabled:c.disabled,className:fe(da,c.disabled&&ua,c.danger&&Jg,c.className),onClick:l(c),children:[c.icon&&H.jsx("span",{className:fe(c.danger&&"text-error",c.disabled&&"text-secondary"),children:H.jsx(zs,{icon:c.icon})}),H.jsx("span",{className:fe("flex-1 truncate text-start",c.danger&&"text-error",c.disabled&&"text-secondary"),children:c.label})]},c.key))})})]})},gI=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,ha=({children:e,items:t,onItemClick:o,menuHeader:i,menuFooter:s,renderOverlay:n,trigger:r=[Vt.Click],placement:a,disabled:l=!1,open:c,defaultOpen:d=!1,onOpenChange:u,closable:h=!1,onClose:g,className:f,overlayContentClassName:m,separatorClassName:C,listClassName:v,outsidePressIgnoreRef:w,outsideClosable:b=!0,allowedPlacements:y,anchorToMouse:S=!1,matchReferenceWidth:F=!0,maxDropdownHeight:E})=>{const[M,T]=p.useState(d),G=c!==void 0,P=G?!!c:M,I=p.useRef(null),A=p.useCallback(U=>{G||T(U),u?.(U)},[G,u]),J=p.useId(),k=a===void 0,{refs:j,floatingStyles:ie,context:$}=pe.useFloating({placement:a,open:P,onOpenChange:A,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:Zo,crossAxis:0}),k?pe.autoPlacement({alignment:"start",crossAxis:!0,padding:Zo,allowedPlacements:y}):pe.flip({padding:Zo}),pe.shift({padding:Zo}),pe.size({padding:Zo,apply({availableWidth:U,availableHeight:ne,elements:V}){const Q=V.floating,le=gI(V.reference);Q.style.setProperty("--fui-available-height",`${Math.floor(ne)}px`),Q.style.setProperty("--reference-width",F?`${Math.round(le)}px`:"0px"),F?Q.style.minWidth=`${Math.round(le)}px`:Q.style.removeProperty("min-width"),Q.style.maxWidth=`${Math.floor(U)}px`;const Me=Math.floor(ne);Q.style.maxHeight=`${E?Math.min(Me,E):Me}px`}})]}),Z=pe.useClick($,{enabled:r.includes(Vt.Click)&&!l}),z=pe.useHover($,{enabled:r.includes(Vt.Hover)&&!l,move:!1,restMs:40,delay:{open:80,close:80}}),te=pe.useDismiss($,{bubbles:!0,referencePress:!1,outsidePress:U=>{if(!b)return!1;const ne=U.target;return!(w?.current&&ne instanceof Node&&w.current.contains(ne))}}),q=pe.useRole($,{role:"menu"}),{getReferenceProps:oe,getFloatingProps:de}=pe.useInteractions([Z,z,te,q]),Oe=p.useCallback((U,ne)=>{j.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:U,y:ne,top:ne,left:U,right:U,bottom:ne})})},[j]),Ge=p.useCallback(U=>{!r.includes(Vt.ContextMenu)||l||(U.preventDefault(),S&&(Oe(U.clientX,U.clientY),I.current=document.elementFromPoint(U.clientX,U.clientY)),A(!0))},[S,l,A,Oe,r]),je=p.useCallback(U=>{!S||l||(r.includes(Vt.ContextMenu)&&P&&A(!1),Oe(U.clientX,U.clientY),I.current=document.elementFromPoint(U.clientX,U.clientY))},[S,l,Oe,P,r,A]);p.useEffect(()=>{l&&P&&A(!1)},[l,P,A]);const St=p.useCallback(U=>ne=>{U.disabled||(U.onClick?.({key:U.key,domEvent:ne}),o?.({key:U.key,domEvent:ne}),A(!1))},[o,A]),yt=p.useMemo(()=>n?n():t?H.jsxs(H.Fragment,{children:[i&&H.jsx(H.Fragment,{children:typeof i=="function"?i():i}),H.jsx("div",{role:"none",className:Mt.mergeClasses("py-1",m,bn.dropdownList),"aria-label":"dropdown",children:t.map(U=>U.type===Cn.Divider?H.jsx("div",{role:"separator",className:Mt.mergeClasses(iI,C)},U.key):U.type===Cn.PlainText?H.jsx("div",{className:Mt.mergeClasses("px-3 py-2 text-secondary dial-caption-text",U.className),children:U.label},U.key):U.children?.length?H.jsx(hI,{item:U,onRootClose:()=>A(!1)},U.key):H.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!U.disabled,className:fe(da,U.disabled&&ua,U.danger&&Jg,U.className),disabled:U.disabled,onClick:St(U),children:[U.icon&&H.jsx("span",{className:fe(U.danger&&"text-error",U.disabled&&"text-secondary"),children:H.jsx(zs,{icon:U.icon})}),H.jsx("span",{className:fe("flex-1 truncate text-start",U.danger&&"text-error",U.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:U.label})]},U.key))}),s&&H.jsx(H.Fragment,{children:typeof s=="function"?s():s})]}):null,[St,t,s,i,n,A,m,C]),ge=oe({onContextMenu:Ge,onMouseDown:je});return p.useEffect(()=>{if(!P)return;const U=j.reference.current;let ne=null;if(U instanceof Element?ne=U:I.current instanceof Element&&(ne=I.current),!ne)return;const V=new IntersectionObserver(([Q])=>{Q.isIntersecting||A(!1)},{root:null,threshold:0});return V.observe(ne),()=>V.disconnect()},[P,j.reference,A]),H.jsxs(H.Fragment,{children:[H.jsx("span",{ref:j.setReference,className:fe(tI,l&&"!cursor-not-allowed opacity-75",f),"aria-haspopup":"menu","aria-expanded":P,"aria-controls":J,...ge,children:e}),P&&H.jsx(pe.FloatingPortal,{children:H.jsx(pe.FloatingFocusManager,{context:$,modal:!1,initialFocus:-1,returnFocus:!0,children:H.jsxs("div",{id:J,ref:j.setFloating,style:ie,className:fe(oI,!F&&"w-max",v),...de(),children:[h&&H.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:H.jsx(Xg,{ariaLabel:"Close dropdown",onClose:U=>{g?.(U),A(!1)}})}),yt]})})})]})},ip="en-US",sp={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},pI="text-primary",br=40,np={minWidth:br,width:br,maxWidth:br},fI={cellClass:"ag-grid-no-checkbox",...np},mI={...np};var Ki=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Ki||{});const CI=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0}),rp=(e,t,o,i,s)=>{if(typeof e=="string"&&typeof t=="string"&&e&&t){const n=CI.compare(e,t);return n===0?0:n>0?1:-1}return e===t?0:e?t?e>t?1:-1:s?1:-1:s?-1:1},ap=e=>e?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)):{},vI=(e,t)=>e.some((o,i)=>o.field!==t[i].field?!0:o.hide!==t[i].hide),wI="h-full w-full",md=".ag-checkbox-input",Sr={accentColor:"var(--bg-control-accent, var(--bg-accent-primary, #3664E2))",backgroundColor:"var(--bg-layer-raised, var(--bg-layer-3, #1D2439))",oddRowBackgroundColor:"var(--bg-layer-sunken, var(--bg-layer-2, #161B2D))",selectedRowBackgroundColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderColor:"var(--bg-layer-4, #242C42)",rowBorder:"1px solid var(--stroke-tertiary, var(--stroke-primary, #696E7C))",rowHoverColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #0C101D)",foregroundColor:"var(--text-primary, #EEF1F7)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #9FA6BD)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:"var(--theme-font, var(--font-inter))"},Cd=40;var So=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(So||{}),si=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(si||{});const vd=()=>typeof window<"u"&&window.innerWidth<1279,wd=()=>typeof window<"u"&&window.innerWidth<640,bI=()=>{if(typeof window>"u")return si.Undefined;const e=window.innerWidth;return e>=1024?si.Desktop:e<640?si.Mobile:si.Tablet},lp=()=>{const[e,t]=p.useState(wd());return p.useEffect(()=>{const o=()=>t(wd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},cp=()=>{const[e,t]=p.useState(vd());return p.useEffect(()=>{const o=()=>t(vd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function dp(e,t){let o=null;return(...i)=>{o&&clearTimeout(o),o=setTimeout(()=>e(...i),t)}}let bd=!1;const up=()=>{bd||(bd=!0,zT({testIdAttribute:"dataQA"}),Qd.registerModules([GT]))},SI=({columnDefs:e,rowData:t,additionalGridOptions:o,getContextMenuItems:i,className:s,ariaLabel:n="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,onSelectionChange:c,onGridApiChange:d,getRowId:u=F=>String(F.id??JSON.stringify(F)),alternateOddRowColors:h=!1,filterPlaceholder:g="Enter value",emptyStateIcon:f,emptyStateTitle:m="No results found",emptyStateDescription:C="Sorry, we couldn't find any results for your search.",loading:v=!1,wrapperBorder:w=!0,withoutHeaderBorders:b=!1,allowDisabledContextMenu:y=!1,selectionMode:S})=>{up();const[F,E]=p.useState(),M=p.useId(),T=lp(),G=cp(),P=p.useRef(new Set),I=p.useRef(void 0),A=p.useMemo(()=>({...Sr,oddRowBackgroundColor:h?Sr.oddRowBackgroundColor:Sr.backgroundColor,wrapperBorder:w}),[h,w]),J=p.useCallback(V=>{V.api.sizeColumnsToFit()},[]),k=p.useCallback(V=>{if(V.data){const Q=u(V.data),le=a?.has(Q)??!1,Me=le&&!y,Ae=V.value==null?"":String(V.value),ee=i?.(V.data)??[];return H.jsx(ha,{trigger:[Vt.ContextMenu],items:ee,anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:Me,children:H.jsx("span",{className:"block min-w-0 h-full max-w-full",children:H.jsx(pa,{text:Ae,className:"max-w-full h-full",hideTooltip:le})})})}},[i,a,u,y]),j=p.useCallback(V=>V===So.API||V===So.ROW_DATA_CHANGED,[]),ie=p.useCallback(V=>{if(!F)return;const le=(V.selectedNodes||[]).map(Ae=>Ae.data),Me=new Set(le.map(u));P.current=Me,I.current=V.source,j(V.source)||c?.(Me,le)},[F,u,j,c]),$=p.useMemo(()=>dp(V=>ie?.(V),100),[ie]),Z=p.useCallback(V=>{if(!V.data)return null;const Q=u(V.data),le=V.node.isSelected(),Me=a?.has(Q),Ae=`row-select-${Q}`;return H.jsx("div",{className:"size-6 flex items-center justify-center",children:H.jsx(Ed,{className:"size-[18px]",inputId:Ae,checked:le,disabled:Me,name:"gridradiobutton",value:"selected",onChange:()=>{Me||(V.node.setSelected(!0,!0,So.CHECKBOX_SELECTED),V.api.refreshCells({columns:[V.column?.getColId()]}))}})})},[u,a]),z=p.useCallback(()=>{const V="dial-row-select",Q="dial-row-select-visible";return T||G||l&&l.size>0?`${V} ${Q}`:!l||l.size===0?V:`${V} ${Q}`},[T,G,l]),te=p.useCallback(()=>T||G?z():!l||l.size===0?"dial-row-not-select-header":z(),[z,T,G,l]),q=p.useMemo(()=>{if(S===Ki.SINGLE)return{...fI,cellRenderer:Z};if(S===Ki.MULTIPLE)return{...mI,headerClass:()=>te(),cellClass:V=>{const Q=V.data?u(V.data):null;let le=z();return Q&&a?.has(Q)&&(le+=" opacity-50 pointer-events-none"),le}}},[S,Z,te,u,z,a]),oe=p.useCallback(V=>{const Q=typeof r=="function"?r(V):!!r;if(!V.cellRenderer)return{...V,cellRenderer:k};if(!Q)return V;const le=V.cellRenderer;return{...V,cellRenderer:Ae=>{const ee=Ae.data?i?.(Ae.data)??[]:[];let ae=null;if(typeof le=="function"){const X=le;ae=H.jsx(X,{...Ae})}else ae=k(Ae);const Ce=Ae.data?u(Ae.data):null,ue=Ce?a?.has(Ce):!1;return H.jsx(ha,{trigger:[Vt.ContextMenu],items:ee,anchorToMouse:!0,matchReferenceWidth:!0,className:fe("w-full h-full",ue&&"!cursor-not-allowed opacity-75"),disabled:ue&&!y,children:H.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:ae})})}}},[a,i,u,k,r,y]),de=p.useMemo(()=>r?(e??[]).map(oe):e??[],[e,r,r?oe:null]),{defaultColDef:Oe,...Ge}=o??{},je=p.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:g,buttons:["reset"]},comparator:rp,...ap(Oe)}),[g,Oe]),St=V=>{const Q=document.querySelector(md);Q&&Q.setAttribute("aria-description",Rr);const le=de.map(Me=>({...Me,sort:void 0}));V.api.updateGridOptions({columnDefs:le,rowData:t}),V.api.sizeColumnsToFit(),E(V.api),o?.onGridReady?.(V),d?.(V.api)};p.useEffect(()=>{F&&t&&F.setGridOption("rowData",t)},[F,t]);const yt=p.useCallback(()=>H.jsx(xd,{title:m,description:C,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:f||H.jsx(vn.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[m,C,f]),ge=p.useMemo(()=>{if(S)return{mode:S===Ki.SINGLE?"singleRow":"multiRow",isRowSelectable:V=>{const Q=V.data?u(V.data):null;return Q?!a?.has(Q):!0}}},[a,u,S]);p.useEffect(()=>{F&&t&&P.current.size&&P.current.forEach(V=>{const Q=F.getRowNode(V);Q&&!Q.isSelected()&&Q.setSelected(!0,!1,So.API)})},[F,t]),p.useEffect(()=>{F&&l&&(F.deselectAll("all",So.API),l.forEach(V=>{const Q=F.getRowNode(V);Q&&!Q.isSelected()&&Q.setSelected(!0,!1,So.API)}))},[F,l]);const U=p.useCallback(V=>V.data?u(V.data):"",[u]),ne=p.useCallback(()=>{document.querySelectorAll(`.ag-row ${md}`).forEach(V=>{V.setAttribute("aria-description",Rr)})},[]);return p.useEffect(()=>{const V=j(I.current);if(F&&l?.size&&V){const Q=Array.from(l)[0];if(Q){const le=F.getRowNode(Q);le&&F.ensureNodeVisible(le)}}},[F,j,l]),H.jsx("div",{className:fe(wI,s,S&&"with-selection-column",b&&"dial-without-header-borders"),"aria-label":n,role:"region","aria-busy":v,children:H.jsx("div",{className:"h-full overflow-x-auto",role:"table","aria-describedby":M,children:H.jsx(Qg,{rowModelType:"clientSide",headerHeight:Cd,rowHeight:Cd,cellSelection:!1,theme:Vh.withPart(Ih).withParams({...A}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:de,defaultColDef:je,selectionColumnDef:q,onGridSizeChanged:J,onGridReady:St,loading:v,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:yt,rowData:t,rowSelection:ge,onSelectionChanged:$,getRowId:U,onRowDataUpdated:ne,onBodyScroll:ne,onFirstDataRendered:ne,...Ge})})})},Pl=e=>{if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t))return Pl(Number(t));const o=new Date(t);return isFinite(o.getTime())?o:null}return null},yI=({value:e,locale:t=ip,options:o=sp,emptyPlaceholder:i,className:s,hideTooltip:n=!1})=>{const r=Pl(e),a=p.useMemo(()=>r?new Intl.DateTimeFormat(t,o).format(r):i,[r,i,t,o]),l=r?r.toISOString():void 0;return H.jsx(pa,{text:l?H.jsx("time",{dateTime:l,children:a}):H.jsx("span",{children:a}),className:fe(pI,s),hideTooltip:n})};exports.AgGridReact=Qg;exports.DEFAULT_DATE_FORMAT_OPTIONS=sp;exports.DEFAULT_LOCALE=ip;exports.DIAL_KIT_CLASS=bn;exports.DialCloseButton=Xg;exports.DialDangerIconButton=bp;exports.DialDateCellRenderer=yI;exports.DialDropdown=ha;exports.DialEllipsisTooltip=pa;exports.DialGhostIconButton=Rd;exports.DialGrid=SI;exports.DialIcon=zs;exports.DialNeutralIconButton=wp;exports.DialNoDataContent=xd;exports.DialPrimaryIconButton=vp;exports.DialRadioButton=Ed;exports.DialSecondaryIconButton=Sp;exports.DialSuccessIconButton=Rp;exports.DialTertiaryIconButton=yp;exports.DropdownItemType=Cn;exports.DropdownTrigger=Vt;exports.DropdownType=Zg;exports.GridSelectionMode=Ki;exports.ScreenType=si;exports.SubMenuPanel=op;exports.ThemeScope=Fp;exports.ariaDescription=Rr;exports.baseColumnComparator=rp;exports.checkColDefsChanges=vI;exports.colorSchemeLight=Ih;exports.convertToDate=Pl;exports.debounceFn=dp;exports.getScreenType=bI;exports.observeElementSize=yd;exports.omitUndefined=ap;exports.registerAgGridModulesOnce=up;exports.scheduleMeasure=wn;exports.themeBalham=Vh;exports.useIsMobileScreen=lp;exports.useIsTabletScreen=cp;exports.useSubMenuFloating=tp;exports.useThemeScope=Fd;
|
|
63
|
+
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Ni(d)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Ni(`to see all the valid ${i} properties please check: ${l}`)}}};function kT(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));if(s.length>0)for(const n of s)i[n]=Qr({inputValue:n,allSuggestions:o}).values;return i}var LT=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),OT={moduleName:"Validation",version:L,beans:[AT]},GT={moduleName:"AllCommunity",version:L,dependsOn:[TF,JF,HD,OT,Ex,xx,Px,Dx,Mx,Tx,Ix,Fx,SD,yD,RD,FD,bD,xD,PD,ZD,G1,vM,fh,Y1,Q1,_M,HF,yw,EM,wT,f1,yT,zF,RT,_D,v1,OM,cg,$D,$M,Sw,IF,JM]};function N(e,t={}){const o=Object.keys(t).map(i=>{const s=t[i];return s!=null?`${i}=${s}`:null}).filter(Boolean).join(";");return[e,o].filter(i=>i.length>0).join(":")}var B={grid(e){return N("ag-grid-root",{gridId:e})},headerGroupCell(e){return N("ag-header-group-cell",{colId:e})},headerCell(e){return N("ag-header-cell",{colId:e})},headerCheckbox(e){return N("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return N("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return N("ag-floating-filter",{colId:e})},floatingFilterButton(e){return N("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return N("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return N("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return N(`ag-${e.source}-picker-display`,Ps(e))},numberFilterInstanceInput(e){return N(`ag-${e.source}-number-input`,Ps(e))},textFilterInstanceInput(e){return N(`ag-${e.source}-text-input`,Ps(e))},dateFilterInstanceInput(e){return N(`ag-${e.source}-date-input`,Ps(e))},setFilterInstanceMiniFilterInput(e){return N(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return N(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return N(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return N(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return N("ag-advanced-filter-input")},advancedFilterButton(e){return N("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return N("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return N("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return N("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return N("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return N("ag-advanced-filter-builder-add-item-button")},rowNode(e){return N("ag-row",{"row-id":e})},cell(e,t){return N("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return B.cell(e,oo)},checkbox(e,t){return N("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return B.checkbox(e,Ta)},autoGroupColumnCheckbox(e){return B.checkbox(e,oo)},dragHandle(e,t){return N("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return N("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return N("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return B.groupContracted(e,oo)},autoGroupExpanded(e){return B.groupExpanded(e,oo)},rowNumber(e){return B.cell(e,Ia)},menu(){return N("ag-menu")},menuOption(e){return N("ag-menu-option",{option:e})},sideBar(){return N("ag-side-bar")},sideBarButton(e){return N("ag-side-button",{label:e})},columnToolPanel(){return N("ag-column-panel")},pivotModeSelect(){return N("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return N("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return N("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return N("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return N("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return N("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,o){return N("ag-column-drop-cell-drag-handle",{source:e,area:t,label:o})},columnDropCellCancelButton(e,t,o){return N("ag-column-drop-cell-cancel",{source:e,area:t,label:o})},columnDropArea(e,t){return N("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return N("ag-filter-panel")},filterToolPanelAddFilterButton(){return N("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return N("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return N("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return N("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return N("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return N("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return N("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return N("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return N("ag-status-bar-selected-row-count")},statusBarAggregations(){return N("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return N("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return N("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return N("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return N("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return N("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return N("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return N("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return N("ag-fill-handle")},columnChooserCloseButton(){return N("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return N("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return N("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return N("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return N("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return N("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return N("ag-overlay")}};function HT(e,t){const o={};for(const i of Object.keys(e))t[i]!==null&&(o[t[i]??i]=e[i]);return o}function BT(e){return e.source!=="floating-filter"?{index:0,...e}:e}function Ps(e){return HT(BT(e),{colLabel:"label"})}var Vg="data-testid";function _(e,t){e?.setAttribute(Vg,t)}function VT(e){Vg=e}var NT=class extends x{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=xe(this,()=>this.setupAllTestIds(),500),t=xe(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=gt(this.beans),t=Ju(this.beans),o=e.querySelector(`[grid-id="${t}"]`);_(o,B.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(n=>{_(n,B.headerGroupCell(n.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(n=>{const r=n.getAttribute("col-id"),l=n.classList.contains("ag-floating-filter")?B.floatingFilter(r):B.headerCell(r);_(n,l),_(n.querySelector(".ag-header-cell-filter-button"),B.headerFilterButton(r)),_(n.querySelector(".ag-header-cell-menu-button"),B.headerCellMenuButton(r)),_(n.querySelector(".ag-header-cell-resize"),B.headerResizeHandle(r)),_(n.querySelector(".ag-checkbox input[type=checkbox]"),B.headerCheckbox(r)),_(n.querySelector(".ag-floating-filter-button button"),B.floatingFilterButton(r)),this.setupFilterInstance(n.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const i=e.querySelector(".ag-filter-menu");this.setupFilterInstance(i,{source:"column-filter"}),_(e.querySelector(".ag-advanced-filter input[type=text]"),B.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(n=>{_(n,B.advancedFilterButton(n.textContent))}),_(e.querySelector("button.ag-advanced-filter-builder-button"),B.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((n,r)=>{_(n,r===0?B.advancedFilterPanelMaximiseButton():B.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(n=>{_(n,B.advancedFilterPill(n.querySelector(".ag-picker-field-display")?.textContent))}),_(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),B.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(n=>{const r=n.getAttribute("row-id");_(n,B.rowNode(r)),n.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");_(a,B.cell(r,l)),_(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),B.checkbox(r,l)),_(a.querySelector(".ag-drag-handle"),B.dragHandle(r,l)),_(a.querySelector(".ag-group-contracted"),B.groupContracted(r,l)),_(a.querySelector(".ag-group-expanded"),B.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(n=>{_(n,B.menu()),n.querySelectorAll(".ag-menu-option").forEach(r=>{_(r,B.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(n=>{_(n,B.sideBar()),n.querySelectorAll(".ag-side-button button").forEach(r=>{_(r,B.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),n.querySelectorAll(".ag-column-panel").forEach(r=>{_(r,B.columnToolPanel()),_(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),B.pivotModeSelect()),_(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),B.columnPanelSelectHeaderCheckbox()),_(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),B.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const c=l.getAttribute("aria-label");_(l.querySelector(".ag-column-group-closed-icon"),B.columnSelectListItemGroupClosedIcon(c)),_(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),B.columnSelectListItemCheckbox(c)),_(l.querySelector(".ag-drag-handle"),B.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),n.querySelectorAll(".ag-filter-panel").forEach(r=>{_(r,B.filterToolPanel()),_(r.querySelector("button.ag-filter-add-button"),B.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");_(c,B.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),n.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{_(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),B.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;_(a,B.filterToolPanelGroup(l)),_(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),B.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),_(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),B.statusBarTotalAndFilteredRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),B.statusBarTotalRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),B.statusBarFilteredRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),B.statusBarSelectedRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),B.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(n=>{_(n.querySelector(".ag-paging-page-size .ag-picker-field-display"),B.paginationPanelSizePickerDisplay(n.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),n.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":_(r,B.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":_(r,B.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":_(r,B.paginationPanelRecordCount(r.textContent));break}}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{_(r,B.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":_(r,B.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":_(r,B.paginationSummaryPanelTotalPage(r.textContent));break}})}),_(e.querySelector(".ag-fill-handle"),B.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(n=>{_(n.querySelector(".ag-panel-title-bar-button-icon"),B.columnChooserCloseButton()),_(n.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),B.columnChooserSearchBarCheckbox()),_(n.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),B.columnChooserSearchBarFilter()),n.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");_(a.querySelector(".ag-column-group-closed-icon"),B.columnChooserListItemGroupClosedIcon(l)),_(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),B.columnChooserListItemCheckbox(l)),_(a.querySelector(".ag-drag-handle"),B.columnChooserListItemDragHandle(l))})})}),_(e.querySelector(".ag-overlay-wrapper"),B.overlay());const s=e.querySelector(".ag-column-drop-wrapper");s&&this.setupColumnDropArea(s,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(s=>{_(s,B.filterInstancePickerDisplay(t))});const o=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((s,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(s,B.numberFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((s,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(s,B.textFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((s,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(s,B.dateFilterInstanceInput(l))});const i=e.querySelector('.ag-mini-filter input[type="text"]');_(i,B.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(s=>{const n=s.querySelector(".ag-checkbox-label")?.textContent,r=s.querySelector('input[type="checkbox"]');_(r,B.setFilterInstanceItem(t,n))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(s=>{_(s,B.setFilterApplyPanelButton(t,s.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(s=>{const n=s.querySelector(".ag-radio-button-label")?.textContent;_(s.querySelector("input[type=radio]"),B.filterConditionRadioButton(t,n))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(o=>{const i=o.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");_(o,B.columnDropArea(t,i)),o.querySelectorAll(".ag-column-drop-cell").forEach(s=>{const n=s.querySelector(".ag-column-drop-cell-text")?.textContent;_(s.querySelector(".ag-drag-handle"),B.columnDropCellDragHandle(t,i,n)),_(s.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),B.columnDropCellCancelButton(t,i,n))})})}},WT={moduleName:"Testing",version:L,beans:[NT]};function zT({testIdAttribute:e}={}){e&&VT(e),Qd.registerModules([WT])}var _T=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);for(const n of t??[])this.createMethod(s,n,!0);for(const n of o??[])this.createMethod(s,n,!1);return s}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&D(49,{methodName:t}),null)}}},UT=class extends Qu{constructor(e){super(e,Oa)}},We=p.createContext({}),Ng=p.createContext("default"),ps=(e,t,o,i)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();let r,a,l=!1;return n.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),o.appendChild(a),cd(i,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),i&&cd(i,void 0))}},cd=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const o=e;o.current=t}},at=(...e)=>e.filter(o=>o!=null&&o!=="").join(" "),dt=class Wg{constructor(...t){this.classesMap={};for(const o of t)this.classesMap[o]=!0}setClass(t,o){if(!!this.classesMap[t]==o)return this;const s=new Wg;return s.classesMap={...this.classesMap},s.classesMap[t]=o,s}toString(){return Object.keys(this.classesMap).filter(o=>this.classesMap[o]).join(" ")}},Mi=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,o=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===o()},ca=p.version?.split(".")[0],zg=ca==="16"||ca==="17";function $T(){return ca==="19"}var Ws=!1;function KT(e){return Ws||setTimeout(()=>Ws=!1,0),Ws=!0,e()}var rs=(e,t)=>{!zg&&e&&!Ws?ga.flushSync(t):t()},qT=e=>{zg?e():p.startTransition(e)};function jT(e,t,o){return p.useSyncExternalStore?p.useSyncExternalStore(e,t):o}function mn(e,t,o){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(o||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const i=[],s=[],n=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];n.set(l.instanceId,l),r.has(l.instanceId)&&i.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||s.push(l)}return i.length===e.length&&s.length===0?e:i.length===0&&s.length===t.length?t:i.length===0?s:s.length===0?i:[...i,...s]}var _g=p.forwardRef((e,t)=>{const{registry:o,context:i}=p.useContext(We),s=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef(null),l=p.useRef(null),c=p.useRef(),[d,u]=p.useState(),[h,g]=p.useState(),[f,m]=p.useState(),[C,v]=p.useState(()=>new dt),[w,b]=p.useState(()=>new dt("ag-hidden")),[y,S]=p.useState(()=>new dt("ag-hidden")),[F,E]=p.useState(()=>new dt("ag-invisible"));p.useImperativeHandle(t,()=>({refresh(){return!1}})),p.useLayoutEffect(()=>ps(d,i,n.current),[d]);const M=p.useCallback(ie=>{if(s.current=ie,!ie||i.isDestroyed()){c.current=i.destroyBean(c.current);return}const $={setInnerRenderer:(z,te)=>{u(z),m(te)},setChildCount:z=>g(z),toggleCss:(z,te)=>v(q=>q.setClass(z,te)),setContractedDisplayed:z=>S(te=>te.setClass("ag-hidden",!z)),setExpandedDisplayed:z=>b(te=>te.setClass("ag-hidden",!z)),setCheckboxVisible:z=>E(te=>te.setClass("ag-invisible",!z)),setCheckboxSpacing:z=>E(te=>te.setClass("ag-group-checkbox-spacing",z))},Z=o.createDynamicBean("groupCellRendererCtrl",!0);Z&&(c.current=i.createBean(Z),c.current.init($,ie,r.current,a.current,l.current,_g,e))},[]),T=p.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),G=p.useMemo(()=>`ag-group-expanded ${w.toString()}`,[w]),P=p.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),I=p.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),A=d?.componentFromFramework,J=A?d.componentClass:void 0,k=d==null&&f!=null,j=Ei(f);return p.createElement("span",{className:T,ref:M,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:G,ref:a}),p.createElement("span",{className:P,ref:l}),p.createElement("span",{className:I,ref:r}),p.createElement("span",{className:"ag-group-value",ref:n},k?j:A?p.createElement(J,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),dd=_g,El=p.createContext({setMethods:()=>{}}),YT=e=>{const{initialProps:t,addUpdateCallback:o,CustomComponentClass:i,setMethods:s}=e,[{key:n,...r},a]=p.useState(t);return p.useEffect(()=>{o(l=>a(l))},[]),p.createElement(El.Provider,{value:{setMethods:s}},p.createElement(i,{key:n,...r}))},QT=p.memo(YT),ZT=0;function ud(){return`agPortalKey_${++ZT}`}var Ug=class{constructor(e,t,o,i){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=o,this.suppressFallbackMethods=!!i,this.statelessComponent=this.isStateless(this.reactComponent),this.key=ud(),this.portalKey=ud(),this.instanceCreated=this.isStatelessComponent()?se.resolve(!1):new se(s=>{this.resolveInstanceCreated=s})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),o=document.createElement(t||"div");return o.classList.add("ag-react-container"),e.reactContainer=o,o}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const o=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!o){setTimeout(()=>this.callMethod(e,t));return}const i=o[e];if(i)return i.apply(o,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new se(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=ga.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return p.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const o=this[`${e}Component`];if(!this.suppressFallbackMethods&&o)return o.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function Bn(e,t,o){for(const i of e){const s=t[i];s&&(o[i]=s)}}var ht=class extends Ug{constructor(){super(...arguments),this.awaitUpdateCallback=new se(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=QT}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:o=>this.setMethods(o),addUpdateCallback:o=>{this.updateCallback=()=>(o(this.getProps()),new se(i=>{setTimeout(()=>{i()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Bn(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new se(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},JT=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},XT=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}},eI=class extends ht{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},tI=class extends ht{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:o,shake:i}=this;return e.label=t,e.icon=o,e.shake=i,e}},oI=class extends ht{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new se(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new se(o=>{this.resolveFilterPassCallback=o});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},iI=class extends ht{constructor(){super(...arguments),this.awaitSetMethodsCallback=new se(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function $g(e,t){e.parentFilterInstance(o=>{(o.setModel(t)||se.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var sI=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=o=>this.updateModel(o)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Bn(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),$g(this.floatingFilterParams,e)}},nI=class extends ht{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),$g(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},rI=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},aI=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},lI=class extends ht{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},cI=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},dI=class extends ht{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function xl(){D(231)}var uI=1e3,hI=class{constructor(e,t,o){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=o||uI}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,o){this.portals=[...this.portals,e],this.waitForInstance(t,o),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,o=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-o>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){rs(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,o)})}}},gI=p.createContext([]),pI=p.createContext(void 0),fI=({ctrl:e})=>{const t=e.isAlive(),{context:o}=p.useContext(We),[i,s]=p.useState(),[n,r]=p.useState(),a=p.useRef(),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=p.useRef();t&&!h.current&&(h.current=new as(()=>l.current));const g=p.useCallback(v=>{if(l.current=v,!v||!e.isAlive()||o.isDestroyed()){a.current=o.destroyBean(a.current);return}a.current=o.createBean(new Di);const w=()=>{const y=e.getSelectAllGui();y&&(c.current?.insertAdjacentElement("afterend",y),a.current.addDestroyFunc(()=>y.remove()))},b={setWidth:y=>{l.current&&(l.current.style.width=y)},toggleCss:(y,S)=>h.current.toggleCss(y,S),setUserStyles:y=>r(y),setAriaSort:y=>{l.current&&(y?_p(l.current,y):Up(l.current))},setUserCompDetails:y=>s(y),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:w,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(b,v,c.current,d.current,a.current),w()},[]);p.useLayoutEffect(()=>ps(i,o,d.current,u),[i]),p.useEffect(()=>{e.setDragSource(l.current)},[i]);const f=p.useMemo(()=>!!(i?.componentFromFramework&&Mi(i.componentClass)),[i]),m=i?.componentFromFramework,C=i?.componentClass;return p.createElement("div",{ref:g,style:n,className:"ag-header-cell",role:"columnheader"},p.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),p.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},m?f?p.createElement(C,{...i.params}):p.createElement(C,{...i.params,ref:u}):null))},mI=p.memo(fI),CI=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Bn(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},vI=({ctrl:e})=>{const{context:t,gos:o}=p.useContext(We),[i,s]=p.useState(),[n,r]=p.useState(()=>new dt("ag-header-cell","ag-floating-filter")),[a,l]=p.useState(()=>new dt),[c,d]=p.useState(()=>new dt("ag-floating-filter-button","ag-hidden")),[u,h]=p.useState("false"),[g,f]=p.useState(),[,m]=p.useState(1),C=p.useRef(),v=p.useRef(null),w=p.useRef(null),b=p.useRef(null),y=p.useRef(null),S=p.useRef(),F=p.useRef(),E=z=>{z!=null&&S.current?.(z)},M=p.useCallback(z=>{if(v.current=z,!z||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new Di),F.current=new se(q=>{S.current=q});const te={toggleCss:(q,oe)=>r(de=>de.setClass(q,oe)),setUserStyles:q=>s(q),addOrRemoveBodyCssClass:(q,oe)=>l(de=>de.setClass(q,oe)),setButtonWrapperDisplayed:q=>{d(oe=>oe.setClass("ag-hidden",!q)),h(q?"false":"true")},setWidth:q=>{v.current&&(v.current.style.width=q)},setCompDetails:q=>f(q),getFloatingFilterComp:()=>F.current?F.current:null,setMenuIcon:q=>y.current?.appendChild(q)};e.setComp(te,z,y.current,w.current,C.current)},[]);p.useLayoutEffect(()=>ps(g,t,w.current,E),[g]);const T=p.useMemo(()=>n.toString(),[n]),G=p.useMemo(()=>a.toString(),[a]),P=p.useMemo(()=>c.toString(),[c]),I=p.useMemo(()=>!!(g&&g.componentFromFramework&&Mi(g.componentClass)),[g]),A=p.useMemo(()=>o.get("reactiveCustomComponents"),[]),J=p.useMemo(()=>o.get("enableFilterHandlers"),[]),[k,j]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(A){const z=J?CI:sI,te=new z(g.params,()=>m(q=>q+1));E(te),j(te)}else xl()},[g]);const ie=k?.getProps(),$=g?.componentFromFramework,Z=g?.componentClass;return p.createElement("div",{ref:M,style:i,className:T,role:"gridcell"},p.createElement("div",{ref:w,className:G,role:"presentation"},$?A?ie&&p.createElement(El.Provider,{value:{setMethods:z=>k.setMethods(z)}},p.createElement(Z,{...ie})):p.createElement(Z,{...g.params,ref:I?()=>{}:E}):null),p.createElement("div",{ref:b,"aria-hidden":u,className:P,role:"presentation"},p.createElement("button",{ref:y,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},wI=p.memo(vI),bI=({ctrl:e})=>{const{context:t}=p.useContext(We),[o,i]=p.useState(),[s,n]=p.useState(()=>new dt),[r,a]=p.useState(()=>new dt),[l,c]=p.useState("false"),[d,u]=p.useState(),[h,g]=p.useState(),f=p.useRef(),m=p.useRef(null),C=p.useRef(null),v=p.useRef(null),w=p.useRef(),b=p.useCallback(T=>{if(m.current=T,!T||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new Di);const G={setWidth:P=>{m.current&&(m.current.style.width=P)},toggleCss:(P,I)=>n(A=>A.setClass(P,I)),setUserStyles:P=>i(P),setHeaderWrapperHidden:P=>{const I=v.current;I&&(P?I.style.setProperty("display","none"):I.style.removeProperty("display"))},setHeaderWrapperMaxHeight:P=>{const I=v.current;I&&(P!=null?I.style.setProperty("max-height",`${P}px`):I.style.removeProperty("max-height"),I.classList.toggle("ag-header-cell-comp-wrapper-limited-height",P!=null))},setUserCompDetails:P=>g(P),setResizableDisplayed:P=>{a(I=>I.setClass("ag-hidden",!P)),c(P?"false":"true")},setAriaExpanded:P=>u(P),getUserCompInstance:()=>w.current||void 0};e.setComp(G,T,C.current,v.current,f.current)},[]);p.useLayoutEffect(()=>ps(h,t,v.current),[h]),p.useEffect(()=>{m.current&&e.setDragSource(m.current)},[h]);const y=p.useMemo(()=>!!(h?.componentFromFramework&&Mi(h.componentClass)),[h]),S=p.useMemo(()=>"ag-header-group-cell "+s.toString(),[s]),F=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),E=h?.componentFromFramework,M=h?.componentClass;return p.createElement("div",{ref:b,style:o,className:S,role:"columnheader","aria-expanded":d},p.createElement("div",{ref:v,className:"ag-header-cell-comp-wrapper",role:"presentation"},E?y?p.createElement(M,{...h.params}):p.createElement(M,{...h.params,ref:w}):null),p.createElement("div",{ref:C,"aria-hidden":l,className:F}))},SI=p.memo(bI),yI=({ctrl:e})=>{const{gos:t,context:o}=p.useContext(We),{topOffset:i,rowHeight:s}=p.useMemo(()=>e.getTopAndHeight(),[]),n=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>s+"px"),[u,h]=p.useState(()=>i+"px"),g=p.useRef(null),[f,m]=p.useState(()=>e.getUpdatedHeaderCtrls()),C=p.useRef(),v=p.useRef(null),w=p.useCallback(S=>{if(v.current=S,!S||!e.isAlive()||o.isDestroyed()){C.current=o.destroyBean(C.current);return}C.current=o.createBean(new Di);const F={setHeight:E=>d(E),setTop:E=>h(E),setHeaderCtrls:(E,M,T)=>{const G=g.current,P=mn(G,E,M);P!==G&&(g.current=P,rs(T,()=>m(P)))},setWidth:E=>{v.current&&(v.current.style.width=E)},setRowIndex:E=>{a(E)}};e.setComp(F,C.current,!1)},[]),b=p.useMemo(()=>({height:c,top:u}),[c,u]),y=p.useCallback(S=>{switch(e.type){case"group":return p.createElement(SI,{ctrl:S,key:S.instanceId});case"filter":return p.createElement(wI,{ctrl:S,key:S.instanceId});default:return p.createElement(mI,{ctrl:S,key:S.instanceId})}},[]);return p.createElement("div",{ref:w,className:l,role:"row",style:b,tabIndex:n,"aria-rowindex":r},f.map(y))},RI=p.memo(yI),FI=({pinned:e})=>{const[t,o]=p.useState(!0),[i,s]=p.useState([]),{context:n}=p.useContext(We),r=p.useRef(null),a=p.useRef(null),l=p.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=p.useCallback(m=>{if(r.current=m,!m||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new sv(e));const C={setDisplayed:o,setCtrls:v=>s(v),setCenterWidth:v=>{a.current&&(a.current.style.width=v)},setViewportScrollLeft:v=>{r.current&&(r.current.scrollLeft=v)},setPinnedContainerWidth:v=>{r.current&&(r.current.style.width=v,r.current.style.minWidth=v,r.current.style.maxWidth=v)}};l.current.setComp(C,r.current)},[]),g=t?"":"ag-hidden",f=()=>i.map(m=>p.createElement(RI,{ctrl:m,key:m.instanceId}));return c?p.createElement("div",{ref:h,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):d?p.createElement("div",{ref:h,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):u?p.createElement("div",{ref:h,className:"ag-header-viewport "+g,role:"rowgroup",tabIndex:-1},p.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},f())):null},wr=p.memo(FI),EI=()=>{const[e,t]=p.useState(()=>new dt),[o,i]=p.useState(),{context:s}=p.useContext(We),n=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(n.current=d,!d||s.isDestroyed()){r.current=s.destroyBean(r.current);return}r.current=s.createBean(new QC);const u={toggleCss:(h,g)=>t(f=>f.setClass(h,g)),setHeightAndMinHeight:h=>i(h)};r.current.setComp(u,d,d)},[]),l=p.useMemo(()=>"ag-header "+e.toString(),[e]),c=p.useMemo(()=>({height:o,minHeight:o}),[o]);return p.createElement("div",{ref:a,className:l,style:c,role:"presentation"},p.createElement(wr,{pinned:"left"}),p.createElement(wr,{pinned:null}),p.createElement(wr,{pinned:"right"}))},xI=p.memo(EI),PI=(e,t)=>{p.useEffect(()=>{const o=t.current;if(o){const i=o.parentElement;if(i){const s=document.createComment(e);return i.insertBefore(s,o),()=>{s.remove()}}}},[e])},Ro=PI,DI=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new se(o=>{this.resolveInstanceCreated=o}),this.onValueChange=o=>this.updateValue(o),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){Bn(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},MI=e=>{const t=p.useRef(e),o=p.useRef(),i=p.useRef(!1),s=p.useRef(!1),[,n]=p.useState(0);i.current&&(s.current=!0),p.useEffect(()=>(i.current||(o.current=t.current(),i.current=!0),n(r=>r+1),()=>{s.current&&o.current?.()}),[])},TI=e=>{const[t,o]=p.useState(),i=p.useContext(We),{context:s,popupSvc:n,gos:r,editSvc:a}=i,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return MI(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,f;if(!s.isDestroyed()){f=s.createBean(a.createPopupEditorWrapper(u.params));const m=f.getGui();if(e.jsChildComp){const S=e.jsChildComp.getGui();S&&m.appendChild(S)}const{column:C,rowNode:v}=c,w={column:C,rowNode:v,type:"popupCellEditor",eventSource:d,ePopup:m,position:l.popupPosition,keepWithinBounds:!0},b=n?.positionPopupByComponent.bind(n,w),y=n?.addPopup({modal:h,eChild:m,closeOnEsc:!0,closedCallback:S=>{c.onPopupEditorClosed(S)},anchorToElement:d,positionCallback:b,ariaOwns:d});g=y?y.hideFunc:void 0,o(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{g?.(),s.destroyBean(f)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(ve(i))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?ga.createPortal(e.wrappedContent,t.getGui()):null},hd=p.memo(TI),II=(e,t,o)=>{const{compProxy:i}=e;o(i);const s=i.getProps(),n=Mi(t);return p.createElement(El.Provider,{value:{setMethods:r=>i.setMethods(r)}},n?p.createElement(t,{...s}):p.createElement(t,{...s,ref:r=>i.setRef(r)}))},gd=(e,t,o)=>e.compProxy?II(e,t,o):p.createElement(t,{...e.compDetails.params,ref:o}),AI=(e,t,o,i,s)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?gd(e,r,t):l?p.createElement(hd,{editDetails:e,cellCtrl:i,eParentCell:o,wrappedContent:gd(e,r,t)}):c&&s?p.createElement(hd,{editDetails:e,cellCtrl:i,eParentCell:o,jsChildComp:s}):null},kI=(e,t,o,i,s,n,r=!1)=>{const{context:a}=p.useContext(We),l=p.useCallback(()=>{const c=s.current;if(!c)return;const d=c.getGui();d&&d.parentElement&&d.remove(),a.destroyBean(c),s.current=void 0},[]);p.useEffect(()=>{const c=e!=null&&!r,d=e?.compDetails&&!e.compDetails.componentFromFramework,u=t&&o==null;if(!(c&&d&&!u)){l();return}const g=e.compDetails;if(s.current){const m=s.current,v=m.refresh!=null&&e.force==!1?m.refresh(g.params):!1;if(v===!0||v===void 0)return;l()}g.newAgStackInstance().then(m=>{if(!m)return;const C=m.getGui();if(!C)return;(t?o:n.current).appendChild(C),s.current=m})},[e,t,i,r]),p.useEffect(()=>l,[])},Kg=kI,LI=({cellCtrl:e,parent:t})=>{const o=p.useRef(),i=p.useMemo(()=>{const{loadingComp:s}=e.getDeferLoadingCellRenderer();return s?{value:void 0,compDetails:s,force:!1}:void 0},[e]);if(Kg(i,!1,void 0,1,o,t),i?.compDetails?.componentFromFramework){const s=i.compDetails.componentClass;return p.createElement(s,{...i.compDetails.params})}return p.createElement(p.Fragment,null)},OI=({cellCtrl:e,printLayout:t,editingCell:o})=>{const i=p.useContext(We),{context:s}=i,{column:{colIdSanitised:n},instanceId:r}=e,a=p.useRef(),[l,c]=p.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=p.useState(),[h,g]=p.useState(1),[f,m]=p.useState(),[C,v]=p.useState(!1),[w,b]=p.useState(!1),[y,S]=p.useState(!1),F=p.useRef(null),[E,M]=p.useState(),T=p.useMemo(()=>e.isForceWrapper(),[e]),G=p.useMemo(()=>e.getCellAriaRole(),[e]),P=p.useRef(null),I=p.useRef(null),A=p.useRef(null),J=p.useRef(),k=p.useRef(),j=p.useRef(),ie=p.useRef([]),$=p.useRef(),Z=p.useRef(),[z,te]=p.useState(0),q=p.useCallback(ee=>{Z.current=ee,te(ae=>ae+1)},[]),oe=l!=null&&(C||y||w)&&(d==null||!!d.popup),de=T||oe,Oe=p.useMemo(()=>e.getCellValueClass(),[e]),Ge=p.useCallback(ee=>{if(k.current=ee,ee){const ae=ee.isCancelBeforeStart&&ee.isCancelBeforeStart();setTimeout(()=>{ae?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(ee))})}},[e]),je=p.useRef();je.current||(je.current=new as(()=>P.current));const St=!!d&&!d.popup;Kg(l,de,Z.current,z,J,P,St);const yt=p.useRef();p.useLayoutEffect(()=>{const ee=yt.current,ae=l;if(yt.current=l,ee==null||ee.compDetails==null||ae==null||ae.compDetails==null)return;$.current?.refreshVisibility();const Ce=ee.compDetails,ue=ae.compDetails;if(Ce.componentClass!=ue.componentClass||A.current?.refresh==null)return;A.current.refresh(ue.params)!=!0&&g(Re=>Re+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||s.isDestroyed())return;const ae=d.compDetails,Ce=d.popup===!0,ue=ae.newAgStackInstance();return ue.then(X=>{if(!X)return;const Re=X.getGui();Ge(X),Ce||((T?j:P).current?.appendChild(Re),X.afterGuiAttached?.()),M(X)}),()=>{ue.then(X=>{const Re=X.getGui();e.disableEditorTooltipFeature(),s.destroyBean(X),Ge(void 0),M(void 0),Re?.remove()})}},[d]);const ge=p.useCallback(ee=>{if(j.current=ee,!ee||s.isDestroyed()||!e.isAlive()){const ue=ie.current;ie.current=[];for(const X of ue)X();return}let ae;const Ce=ue=>{ue&&(ee.insertAdjacentElement("afterbegin",ue.getGui()),ie.current.push(()=>{_t(ue.getGui()),s.destroyBean(ue),$.current===ae&&($.current=void 0)}))};C&&Ce(e.createSelectionCheckbox()),y&&Ce(e.createDndSource()),w&&(ae=e.createRowDragComp(),$.current=ae,ae&&(Ce(ae),ae.refreshVisibility()))},[e,s,y,w,C]),U=p.useCallback(()=>{const ee=!e.isCellSpanning()||I.current,ae=P.current;if(!ae||!ee||!e||!e.isAlive()||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new Di);const Ce={toggleCss:(X,Re)=>je.current.toggleCss(X,Re),setUserStyles:X=>m(X),getFocusableElement:()=>P.current,setIncludeSelection:X=>v(X),setIncludeRowDrag:X=>b(X),setIncludeDndSource:X=>S(X),setRowResizerElement:X=>{F.current&&_t(F.current),F.current=X,X&&P.current&&P.current.appendChild(X)},getCellEditor:()=>k.current??null,getCellRenderer:()=>A.current??J.current,getParentOfValue:()=>Z.current??j.current??P.current,setRenderDetails:(X,Re,He)=>{const Co=()=>{c(tt=>tt?.compDetails!==X||tt?.value!==Re||tt?.force!==He?{value:Re,compDetails:X,force:He}:tt)};if(X?.params?.deferRender&&!e.rowNode.group){const{loadingComp:tt,onReady:Ko}=e.getDeferLoadingCellRenderer();if(tt){c({value:void 0,compDetails:tt,force:!1}),Ko.then(()=>qT(Co));return}}Co()},setEditDetails:(X,Re,He,Co)=>{if(X){let tt;X.componentFromFramework&&(Co?tt=new DI(X.params,()=>g(Ko=>Ko+1)):xl()),u({compDetails:X,popup:Re,popupPosition:He,compProxy:tt}),Re||c(void 0)}else e.hasBrowserFocus()&&Ce.getFocusableElement().focus({preventScroll:!0}),k.current=void 0,u(void 0)},refreshEditStyles:(X,Re)=>{if(!P.current)return;const{current:He}=je;He.toggleCss("ag-cell-value",!de),He.toggleCss("ag-cell-inline-editing",!!X&&!Re),He.toggleCss("ag-cell-popup-editing",!!X&&!!Re),He.toggleCss("ag-cell-not-inline-editing",!X||!!Re)}},ue=j.current||void 0;e.setComp(Ce,ae,I.current??void 0,ue,t,o,a.current)},[]),ne=p.useCallback(ee=>{P.current=ee,U()},[]),V=p.useCallback(ee=>{I.current=ee,U()},[]),Q=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Mi(l.compDetails.componentClass)),[l]);p.useLayoutEffect(()=>{if(!P.current)return;const{current:ee}=je;ee.toggleCss("ag-cell-value",!de),ee.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),ee.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),ee.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const le=()=>{const{compDetails:ee,value:ae}=l;if(!ee)return ae?.toString?.()??ae;if(ee.componentFromFramework){const Ce=ee.componentClass;return p.createElement(p.Suspense,{fallback:p.createElement(LI,{cellCtrl:e,parent:P})},Q?p.createElement(Ce,{...ee.params,key:h}):p.createElement(Ce,{...ee.params,key:h,ref:A}))}},Me=()=>{const ee=()=>l==null?null:de?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:Oe,ref:q},le()):le(),ae=Ce=>AI(Ce,Ge,P.current,e,E);return d!=null?d.popup?p.createElement(p.Fragment,null,ee(),ae(d)):ae(d):ee()},Ae=()=>p.createElement("div",{ref:ne,style:f,role:G,"col-id":n},de?p.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:ge},Me()):Me());return e.isCellSpanning()?p.createElement("div",{ref:V,className:"ag-spanned-cell-wrapper",role:"presentation"},Ae()):Ae()},GI=p.memo(OI),HI=({rowCtrl:e,containerType:t})=>{const{context:o,gos:i,editSvc:s}=p.useContext(We),n=p.useContext(Ng)==="default",r=p.useRef(),a=p.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=p.useState(()=>c?e.rowNode.getRowIndexString():null),[h,g]=p.useState(()=>e.rowId),[f,m]=p.useState(()=>e.businessKey),[C,v]=p.useState(()=>e.rowStyles),w=p.useRef(null),[b,y]=p.useState(()=>null),[S,F]=p.useState(),[E,M]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[T,G]=p.useState(()=>c?e.getInitialTransform(t):void 0),P=p.useRef(null),I=p.useRef(),A=p.useRef(),J=p.useRef(!1),[k,j]=p.useState(0);p.useEffect(()=>{if(J.current||!S||k>10)return;const ge=P.current?.firstChild;ge?(e.setupDetailRowAutoHeight(ge),J.current=!0):j(U=>U+1)},[S,k]);const ie=p.useRef();ie.current||(ie.current=new as(()=>P.current));const $=p.useRef(()=>{}),Z=p.useCallback(ge=>($.current=ge,()=>{$.current=()=>{}}),[]),z=jT(Z,()=>w.current,[]),te=n?z:b,q=p.useCallback(ge=>{if(P.current=ge,r.current=ge?o.createBean(new Di):o.destroyBean(r.current),!ge){e.unsetComp(t);return}if(!e.isAlive()||o.isDestroyed())return;const U={setTop:M,setTransform:G,toggleCss:(ne,V)=>ie.current.toggleCss(ne,V),setDomOrder:ne=>a.current=ne,setRowIndex:u,setRowId:g,setRowBusinessKey:m,setUserStyles:v,setCellCtrls:(ne,V)=>{const Q=w.current,le=mn(Q,ne,a.current);le!==Q&&(w.current=le,n?$.current():rs(V,()=>y(le)))},showFullWidth:ne=>{A.current=ne.params,F(ne)},getFullWidthCellRenderer:()=>I.current,getFullWidthCellRendererParams:()=>A.current,refreshFullWidth:ne=>{const V=ne();return A.current=V,je.current?(F(Q=>({...Q,params:V})),!0):!I.current||!I.current.refresh?!1:I.current.refresh(V)}};e.setComp(U,ge,t,r.current)},[]);p.useLayoutEffect(()=>ps(S,o,P.current,I),[S]);const oe=p.useMemo(()=>{const ge={top:E,transform:T};return Object.assign(ge,C),ge},[E,T,C]),de=l&&S?.componentFromFramework,Oe=!l&&te!=null,Ge=p.useMemo(()=>!!(S?.componentFromFramework&&Mi(S.componentClass)),[S]),je=p.useRef(!1);p.useEffect(()=>{je.current=Ge&&!!S&&!!i.get("reactiveCustomComponents")},[Ge,S]);const St=()=>te?.map(ge=>p.createElement(GI,{cellCtrl:ge,editingCell:s?.isEditing(ge,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:ge.instanceId})),yt=()=>{const ge=S.componentClass;return Ge?p.createElement(ge,{...S.params}):p.createElement(ge,{...S.params,ref:I})};return p.createElement("div",{ref:q,role:"row",style:oe,"row-index":d,"row-id":h,"row-business-key":f},Oe?St():de?yt():null)},pd=p.memo(HI),BI=({name:e})=>{const{context:t,gos:o}=p.useContext(We),i=p.useMemo(()=>us(e),[e]),s=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef([]),l=p.useRef([]),[c,d]=p.useState(()=>[]),u=!!o.get("enableCellSpan")&&!!i.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[f,m]=p.useState(()=>[]),C=p.useRef(!1),v=p.useRef(),w=p.useMemo(()=>at("ag-viewport",Ku(e)),[e]),b=p.useMemo(()=>at(qu(e)),[e]),y=p.useMemo(()=>at("ag-spanning-container",wv(e)),[e]),S=i.type==="center"||u,F=S?s:n;Ro(" AG Row Container "+e+" ",F);const E=p.useCallback(()=>{const k=!S||s.current!=null,j=n.current!=null,ie=!u||r.current!=null;return k&&j&&ie},[]),M=p.useCallback(()=>s.current==null&&n.current==null&&r.current==null,[]),T=p.useCallback(()=>{if(M()&&(v.current=t.destroyBean(v.current)),!t.isDestroyed()&&E()){const k=$=>{const Z=mn(l.current,a.current,C.current);Z!==l.current&&(l.current=Z,rs($,()=>d(Z)))},j=$=>{const Z=mn(g.current,h.current,C.current);Z!==g.current&&(g.current=Z,rs($,()=>m(Z)))},ie={setHorizontalScroll:$=>{s.current&&(s.current.scrollLeft=$)},setViewportHeight:$=>{s.current&&(s.current.style.height=$)},setRowCtrls:({rowCtrls:$,useFlushSync:Z})=>{const z=!!Z&&a.current.length>0&&$.length>0;a.current=$,k(z)},setSpannedRowCtrls:($,Z)=>{const z=!!Z&&h.current.length>0&&$.length>0;h.current=$,j(z)},setDomOrder:$=>{C.current!=$&&(C.current=$,k(!1))},setContainerWidth:$=>{n.current&&(n.current.style.width=$)},setOffsetTop:$=>{n.current&&(n.current.style.transform=`translateY(${$})`)}};v.current=t.createBean(new Mv(e)),v.current.setComp(ie,n.current,r.current??void 0,s.current)}},[E,M]),G=p.useCallback(k=>{n.current=k,T()},[T]),P=p.useCallback(k=>{r.current=k,T()},[T]),I=p.useCallback(k=>{s.current=k,T()},[T]),A=()=>p.createElement("div",{className:b,ref:G,role:S?"presentation":"rowgroup"},c.map(k=>p.createElement(pd,{rowCtrl:k,containerType:i.type,key:k.instanceId})));if(!S)return A();const J=()=>p.createElement("div",{className:y,ref:P,role:"presentation"},f.map(k=>p.createElement(pd,{rowCtrl:k,containerType:i.type,key:k.instanceId})));return p.createElement("div",{className:w,ref:I,role:"rowgroup"},A(),u?J():null)},VI=p.memo(BI),NI=()=>{const e=p.useContext(We),{context:t,overlays:o}=e,[i,s]=p.useState(""),[n,r]=p.useState(0),[a,l]=p.useState(0),[c,d]=p.useState("0px"),[u,h]=p.useState("0px"),[g,f]=p.useState("100%"),[m,C]=p.useState("0px"),[v,w]=p.useState("0px"),[b,y]=p.useState("100%"),[S,F]=p.useState(!0),[E,M]=p.useState(!0),[T,G]=p.useState(null),[P,I]=p.useState(""),[A,J]=p.useState(null),[k,j]=p.useState("ag-layout-normal"),ie=p.useRef();ie.current||(ie.current=new as(()=>$.current));const $=p.useRef(null),Z=p.useRef(null),z=p.useRef(null),te=p.useRef(null),q=p.useRef(null),oe=p.useRef(null),de=p.useRef(null),Oe=p.useRef([]),Ge=p.useRef([]);Ro(" AG Grid Body ",$),Ro(" AG Pinned Top ",Z),Ro(" AG Sticky Top ",z),Ro(" AG Middle ",oe),Ro(" AG Pinned Bottom ",de);const je=p.useCallback(ue=>{if($.current=ue,!ue||t.isDestroyed()){Oe.current=t.destroyBeans(Oe.current);for(const be of Ge.current)be();Ge.current=[];return}const X=(be,ot)=>{be.appendChild(ot),Ge.current.push(()=>ot.remove())},Re=be=>{const ot=t.createBean(new be);return Oe.current.push(ot),ot},He=(be,ot,hp)=>{X(be,document.createComment(hp)),X(be,Re(ot).getGui())};He(ue,rv," AG Fake Horizontal Scroll ");const Co=o?.getOverlayWrapperCompClass();Co&&He(ue,Co," AG Overlay Wrapper "),q.current&&He(q.current,lv," AG Fake Vertical Scroll ");const tt={setRowAnimationCssOnBodyViewport:s,setColumnCount:be=>{$.current&&Wp($.current,be)},setRowCount:be=>{$.current&&Vp($.current,be)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:F,setBottomInvisible:M,setColumnMovingCss:(be,ot)=>ie.current.toggleCss(be,ot),updateLayoutClasses:j,setAlwaysVerticalScrollClass:G,setPinnedTopBottomOverflowY:I,setCellSelectableCss:(be,ot)=>J(ot?be:null),setBodyViewportWidth:be=>{oe.current&&(oe.current.style.width=be)},registerBodyViewportResizeListener:be=>{if(oe.current){const ot=Kt(e,oe.current,be);Ge.current.push(()=>ot())}},setStickyBottomHeight:C,setStickyBottomBottom:w,setStickyBottomWidth:y,setGridRootRole:be=>ue.setAttribute("role",be)},Ko=t.createBean(new kv);Oe.current.push(Ko),Ko.setComp(tt,ue,oe.current,Z.current,de.current,z.current,te.current)},[]),St=p.useMemo(()=>at("ag-root","ag-unselectable",k),[k]),yt=p.useMemo(()=>at("ag-body-viewport",i,k,T,A),[i,k,T,A]),ge=p.useMemo(()=>at("ag-body",k),[k]),U=p.useMemo(()=>at("ag-floating-top",S?"ag-invisible":null,A),[A,S]),ne=p.useMemo(()=>at("ag-sticky-top",A),[A]),V=p.useMemo(()=>at("ag-sticky-bottom",m==="0px"?"ag-invisible":null,A),[A,m]),Q=p.useMemo(()=>at("ag-floating-bottom",E?"ag-invisible":null,A),[A,E]),le=p.useMemo(()=>({height:n,minHeight:n,overflowY:P}),[n,P]),Me=p.useMemo(()=>({height:c,top:u,width:g}),[c,u,g]),Ae=p.useMemo(()=>({height:m,bottom:v,width:b}),[m,v,b]),ee=p.useMemo(()=>({height:a,minHeight:a,overflowY:P}),[a,P]),ae=ue=>p.createElement(VI,{name:ue,key:`${ue}-container`}),Ce=({section:ue,children:X,className:Re,style:He})=>p.createElement("div",{ref:ue,className:Re,role:"presentation",style:He},X.map(ae));return p.createElement("div",{ref:je,className:St},p.createElement(xI,null),Ce({section:Z,className:U,style:le,children:["topLeft","topCenter","topRight","topFullWidth"]}),p.createElement("div",{className:ge,ref:q,role:"presentation"},Ce({section:oe,className:yt,children:["left","center","right","fullWidth"]})),Ce({section:z,className:ne,style:Me,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),Ce({section:te,className:V,style:Ae,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),Ce({section:de,className:Q,style:ee,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},WI=p.memo(NI),zI=(e,t)=>{const{children:o,eFocusableElement:i,onTabKeyDown:s,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=p.useContext(We),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=v=>{const w=v==null?void 0:parseInt(v,10).toString();for(const b of[c,d])w===void 0?b.current?.removeAttribute("tabindex"):b.current?.setAttribute("tabindex",w)};p.useImperativeHandle(t,()=>({forceFocusOutOfContainer(v){u.current?.forceFocusOutOfContainer(v)}}));const g=p.useCallback(()=>{const v=c.current,w=d.current;if(!v&&!w||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(v&&w){const b={setTabIndex:h};u.current=l.createBean(new UT({comp:b,eTopGuard:v,eBottomGuard:w,eFocusableElement:i,onTabKeyDown:s,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:y=>n.focusInnerElement(y),isEmpty:a}))}},[]),f=p.useCallback(v=>{c.current=v,g()},[g]),m=p.useCallback(v=>{d.current=v,g()},[g]),C=v=>{const w=v==="top"?pi.TAB_GUARD_TOP:pi.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${pi.TAB_GUARD} ${w}`,role:"presentation",ref:v==="top"?f:m})};return p.createElement(p.Fragment,null,C("top"),o,C("bottom"))},_I=p.forwardRef(zI),UI=p.memo(_I),$I=({context:e})=>{const[t,o]=p.useState(""),[i,s]=p.useState(""),[n,r]=p.useState(null),[a,l]=p.useState(null),[c,d]=p.useState(!1),[u,h]=p.useState(),g=p.useRef(),f=p.useRef(null),m=p.useRef(),[C,v]=p.useState(null),w=p.useRef(()=>{}),b=p.useRef(),y=p.useRef([]),S=p.useCallback(()=>{},[]);Ro(" AG Grid ",f);const F=p.useCallback(I=>{if(f.current=I,g.current=I?e.createBean(new Bv):e.destroyBean(g.current),!I||e.isDestroyed())return;const A=g.current;w.current=A.focusInnerElement.bind(A);const J={destroyGridUi:()=>{},setRtlClass:o,forceFocusOutOfContainer:k=>{if(!k&&b.current?.isDisplayed()){b.current.forceFocusOutOfContainer(k);return}m.current?.forceFocusOutOfContainer(k)},updateLayoutClasses:s,getFocusableContainers:()=>{const k=[],j=[],ie=f.current?.querySelector(".ag-root");for(const Z of y.current){if(!Z.isDisplayed())continue;const z=Z.getFocusableContainerName();if(z==="rowGroupToolbar"||z==="pivotToolbar"){k.push(Z);continue}j.push(Z)}const $=[...k];return ie&&$.push({getGui:()=>ie,getFocusableContainerName:()=>"gridBody"}),$.push(...j),$},setCursor:r,setUserSelect:l};A.setComp(J,I,I),d(!0)},[]);p.useEffect(()=>{const I=g.current,A=f.current;if(!u||!I||!C||!A||e.isDestroyed())return;const J=[];y.current=[],b.current=void 0;const{watermarkSelector:k,paginationSelector:j,sideBarSelector:ie,statusBarSelector:$,gridHeaderDropZonesSelector:Z}=I.getOptionalSelectors(),z=[];if(Z){const q=e.createBean(new Z.component),oe=q.getGui();A.insertAdjacentElement("afterbegin",oe),z.push(oe),J.push(q),y.current.push(...q.getFocusableContainers?.()??[])}if(ie){const q=e.createBean(new ie.component),oe=q.getGui(),de=C.querySelector(".ag-tab-guard-bottom");de&&(de.insertAdjacentElement("beforebegin",oe),z.push(oe)),J.push(q),y.current.push(q)}const te=q=>{const oe=e.createBean(new q),de=oe.getGui();return A.insertAdjacentElement("beforeend",de),z.push(de),J.push(oe),oe};if($){const q=te($.component);y.current.push(q)}if(j){const q=te(j.component);b.current=q,y.current.push(q)}return k&&te(k.component),()=>{e.destroyBeans(J),y.current=[],b.current=void 0;for(const q of z)q.remove()}},[u,C,e]);const E=p.useMemo(()=>at("ag-root-wrapper",t,i),[t,i]),M=p.useMemo(()=>at("ag-root-wrapper-body","ag-focus-managed",i),[i]),T=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),G=p.useCallback(I=>{m.current=I,h(I!==null)},[]),P=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:F,className:E,style:T,role:"presentation"},p.createElement("div",{className:M,ref:v,role:"presentation"},c&&C&&!e.isDestroyed()&&p.createElement(We.Provider,{value:e.getBeans()},p.createElement(UI,{ref:G,eFocusableElement:C,onTabKeyDown:S,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:P},p.createElement(WI,null)))))},KI=p.memo($I),qI=class extends x{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(t=>!!t.eGui))}},jI=typeof window>"u"?p.useEffect:p.useLayoutEffect,qg={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},YI={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...qg},jg=new Set(Object.keys(YI)),QI=new Set(Object.keys(qg)),Yg=e=>{const t=p.useContext(gI),o=p.useContext(pI),i=p.useRef(),s=p.useRef(null),n=p.useRef(null),r=p.useRef([]),a=p.useRef([]),l=p.useRef(e),c=p.useRef(),d=p.useRef(),u=p.useRef(!1),[h,g]=p.useState(void 0),[,f]=p.useState(0),m=p.useRef(),C=S=>{const F=s.current?.classList,E=(M="")=>M.trim().split(/\s+/g).filter(Boolean);if(m.current!==S){for(const M of E(m.current))F?.contains(M)&&F.remove(M);for(const M of E(S))F?.contains(M)||F?.add(M);m.current=S}};jI(()=>{C(e.className)},[e.className]);const v=p.useCallback(S=>{if(s.current=S,C(e.className),!S){for(const k of r.current)k();r.current.length=0;return}const F=[...e.modules??[],...t??[]];o&&Zd(F)?.setLicenseKey(o),n.current||(n.current=new hI(()=>f(k=>k+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{n.current?.destroy(),n.current=null}));const E=qf(e.gridOptions,e,Object.keys(e).filter(k=>!jg.has(k))),M=()=>{if(u.current){const k=()=>c.current?.shouldQueueUpdates()?void 0:a.current.shift();let j=k();for(;j;)j(),j=k()}},T=new e2(M);c.current=T;const G=new qI,P={providedBeanInstances:{frameworkCompWrapper:new JI(n.current,E),renderStatus:G},modules:F,frameworkOverrides:T,setThemeOnGridDiv:!0},I=k=>{g(k),k.createBean(G),r.current.push(()=>{k.destroy()}),k.getBean("ctrlsSvc").whenReady({addDestroyFunc:j=>{r.current.push(j)}},()=>{if(k.isDestroyed())return;const j=i.current;j&&e.passGridApi?.(j)})},A=k=>{k.getBean("ctrlsSvc").whenReady({addDestroyFunc:j=>{r.current.push(j)}},()=>{for(const j of a.current)j();a.current.length=0,u.current=!0})},J=new A1;E.gridId??(E.gridId=d.current),i.current=J.create(S,E,I,A,P),r.current.push(()=>{i.current=void 0}),i.current&&(d.current=i.current.getGridId())},[]),w=p.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),b=p.useCallback(S=>{u.current&&!c.current?.shouldQueueUpdates()?S():a.current.push(S)},[]);p.useEffect(()=>{const S=ZI(l.current,e);l.current=e,b(()=>{i.current&&jf(S,i.current)})},[e]);const y=!p.useSyncExternalStore||As(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:w,ref:v},p.createElement(Ng.Provider,{value:y},h&&!h.isDestroyed()?p.createElement(KI,{key:h.instanceId,context:h}):null,n.current?.getPortals()??null))};function ZI(e,t){const o={};for(const i of Object.keys(t)){if(jg.has(i)){QI.has(i)&&D(274,{prop:i});continue}const s=t[i];e[i]!==s&&(o[i]=s)}return o}var JI=class extends _T{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const o=this.gridOptions;if(As(o,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return As(o,"enableFilterHandlers")?iI:oI;case"floatingFilterComponent":return As(o,"enableFilterHandlers")?rI:nI;case"dateComponent":return eI;case"dragAndDropImageComponent":return tI;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return XT;case"statusPanel":return cI;case"toolPanel":return dI;case"menuItem":return lI;case"cellRenderer":return JT;case"innerHeaderComponent":return aI}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":xl();break}const s=!t.cellRenderer&&t.name!=="toolPanel";return new Ug(e,this.parent,t,s)}},XI=p.forwardRef((e,t)=>{const o=p.useContext(We),{registry:i,context:s,gos:n,rowModel:r}=o,[a,l]=p.useState(()=>new dt),[c,d]=p.useState(()=>new dt),[u,h]=p.useState(),[g,f]=p.useState(),m=p.useRef(),C=p.useRef(null),v=p.useRef(),w=p.useMemo(()=>Rf(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),b=p.useMemo(()=>a.toString()+" ag-details-row",[a]),y=p.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&p.useImperativeHandle(t,()=>({refresh(){return m.current?.refresh()??!1}})),e.template&&D(230);const S=p.useCallback(E=>{if(C.current=E,!E||s.isDestroyed()){m.current=s.destroyBean(m.current),v.current?.();return}const M={toggleCss:(G,P)=>l(I=>I.setClass(G,P)),toggleDetailGridCss:(G,P)=>d(I=>I.setClass(G,P)),setDetailGrid:G=>h(G),setRowData:G=>f(G),getGui:()=>C.current},T=i.createDynamicBean("detailCellRendererCtrl",!0);if(T&&(s.createBean(T),T.init(M,e),m.current=T,n.get("detailRowAutoHeight"))){const G=()=>{if(C.current==null)return;const P=C.current.clientHeight;P!=null&&P>0&&setTimeout(()=>{e.node.setRowHeight(P),(Se(n)||xi(n))&&r.onRowHeightChanged()},0)};v.current=Kt(o,E,G),G()}},[]),F=p.useCallback(E=>{m.current?.registerDetailWithMaster(E)},[]);return p.createElement("div",{className:b,ref:S},u&&p.createElement(Yg,{className:y,...u,modules:w,rowData:g,passGridApi:F}))}),e2=class extends Jh{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:dd,agGroupRowRenderer:dd,agDetailCellRenderer:XI},this.wrapIncoming=(t,o)=>o==="ensureVisible"?KT(t):t()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return $T()}},Qg=class extends p.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return p.createElement(Yg,{...this.props,passGridApi:this.setGridApi})}},Zg=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Zg||{}),Vt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Vt||{}),Cn=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Cn||{});const t2=fe("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),o2=fe("z-floating overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),da=fe("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small-text h-[34px] rounded text-primary",bn.menuItem),ua="opacity-75 !cursor-not-allowed",Jg="text-error",i2="my-1 border-t border-hover border-secondary",Zo=4,s2=H.jsx(vn.IconChevronRight,{size:14}),Xg=({ariaLabel:e,className:t,size:o=24,onClose:i,...s})=>H.jsx(Rd,{"aria-label":e,className:Mt.mergeClasses(t,"w-auto h-auto"),onClick:i,icon:H.jsx(vn.IconX,{size:o}),...s}),n2='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]',r2=["ArrowDown","ArrowUp","Home","End"],fd=e=>Array.from(e.querySelectorAll(n2)).filter(t=>!t.hasAttribute("disabled")&&t.getAttribute("aria-disabled")!=="true"),ep=e=>e.ownerDocument.defaultView?.getComputedStyle(e).direction==="rtl",a2=e=>ep(e)?"ArrowLeft":"ArrowRight",l2=e=>ep(e)?"ArrowRight":"ArrowLeft",c2=e=>e instanceof HTMLElement&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable),d2=(e,t,o)=>{if(e==="Home")return 0;if(e==="End")return o-1;const i=e==="ArrowDown"?1:-1;return t===-1?i===1?0:o-1:(t+i+o)%o};function tp(e,t="menu",o=!1,i){const[s,n]=p.useState(!1),r=pe.useFloatingNodeId(),{refs:a,elements:l,floatingStyles:c,context:d}=pe.useFloating({nodeId:r,placement:"right-start",open:s,onOpenChange:n,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:0,crossAxis:-4}),pe.flip({padding:e}),pe.shift({padding:e})]}),u=pe.useHover(d,{enabled:!o,move:!1,handleClose:pe.safePolygon(),delay:{open:80,close:80}}),h=pe.useClick(d,{enabled:!o}),g=pe.useDismiss(d,{ancestorScroll:!0,bubbles:{escapeKey:!1,outsidePress:!0}}),f=pe.useRole(d,{role:t}),{getReferenceProps:m,getFloatingProps:C}=pe.useInteractions([u,h,g,f]),[v,w]=p.useState(!1),b=l.floating;p.useEffect(()=>{!s||!v||b==null||(fd(b)[0]?.focus(),w(!1))},[s,v,b]);const y=p.useCallback(M=>{o||!(M.key===a2(M.currentTarget)||M.key==="Enter"||M.key===" ")||(M.preventDefault(),M.stopPropagation(),n(!0),w(!0))},[o]),S=p.useCallback(M=>{if(M.defaultPrevented||c2(M.target))return;if(M.key===l2(M.currentTarget)){M.preventDefault(),M.stopPropagation(),n(!1),a.domReference.current?.focus();return}if(!r2.includes(M.key))return;M.preventDefault(),M.stopPropagation();const T=fd(M.currentTarget);if(T.length===0)return;const G=M.currentTarget.ownerDocument.activeElement,P=T.findIndex(I=>I===G);T[d2(M.key,P,T.length)]?.focus()},[a.domReference]),F=p.useCallback(M=>m({...M,onKeyDown:y}),[m,y]),E=p.useCallback(M=>C({...M,onKeyDown:S}),[C,S]);return{isOpen:s,nodeId:r,refs:a,floatingStyles:c,context:d,getReferenceProps:F,getFloatingProps:E}}const u2="rounded bg-layer-0 shadow",op=({refs:e,floatingStyles:t,context:o,getFloatingProps:i,role:s,surfaceClassName:n,className:r,children:a})=>{const l=Fd();return H.jsx(pe.FloatingPortal,{children:H.jsx(pe.FloatingFocusManager,{context:o,modal:!1,initialFocus:-1,returnFocus:!0,children:H.jsx("div",{ref:e.setFloating,style:t,role:s,className:fe("z-floating overflow-auto text-primary focus-visible:outline-none",n??u2,l,r),...i(),children:a})})})},h2=({item:e,onRootClose:t})=>{const{isOpen:o,refs:i,floatingStyles:s,context:n,getReferenceProps:r,getFloatingProps:a}=tp(Zo,"menu",!!e.disabled),l=p.useCallback(c=>d=>{c.disabled||(c.onClick?.({key:c.key,domEvent:d}),t())},[t]);return H.jsxs(H.Fragment,{children:[H.jsxs("button",{ref:i.setReference,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":o,"aria-disabled":!!e.disabled,disabled:e.disabled,className:fe(da,e.disabled&&ua,e.className),...r(),children:[e.icon&&H.jsx("span",{className:fe(e.disabled&&"text-secondary"),children:H.jsx(zs,{icon:e.icon})}),H.jsx("span",{className:fe("flex-1 truncate text-start",e.disabled&&"text-secondary"),children:e.label}),H.jsx("span",{className:fe("ml-auto shrink-0",e.disabled&&"text-secondary"),children:s2})]}),o&&H.jsx(op,{refs:i,floatingStyles:s,context:n,getFloatingProps:a,role:"menu",className:"w-max",children:H.jsx("div",{role:"none",className:fe("py-1",bn.dropdownList),children:e.children.map(c=>H.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!c.disabled,disabled:c.disabled,className:fe(da,c.disabled&&ua,c.danger&&Jg,c.className),onClick:l(c),children:[c.icon&&H.jsx("span",{className:fe(c.danger&&"text-error",c.disabled&&"text-secondary"),children:H.jsx(zs,{icon:c.icon})}),H.jsx("span",{className:fe("flex-1 truncate text-start",c.danger&&"text-error",c.disabled&&"text-secondary"),children:c.label})]},c.key))})})]})},g2=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,ha=({children:e,items:t,onItemClick:o,menuHeader:i,menuFooter:s,renderOverlay:n,trigger:r=[Vt.Click],placement:a,disabled:l=!1,open:c,defaultOpen:d=!1,onOpenChange:u,closable:h=!1,onClose:g,className:f,overlayContentClassName:m,separatorClassName:C,listClassName:v,outsidePressIgnoreRef:w,outsideClosable:b=!0,allowedPlacements:y,anchorToMouse:S=!1,matchReferenceWidth:F=!0,maxDropdownHeight:E})=>{const[M,T]=p.useState(d),G=c!==void 0,P=G?!!c:M,I=p.useRef(null),A=p.useCallback(U=>{G||T(U),u?.(U)},[G,u]),J=p.useId(),k=a===void 0,{refs:j,floatingStyles:ie,context:$}=pe.useFloating({placement:a,open:P,onOpenChange:A,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:Zo,crossAxis:0}),k?pe.autoPlacement({alignment:"start",crossAxis:!0,padding:Zo,allowedPlacements:y}):pe.flip({padding:Zo}),pe.shift({padding:Zo}),pe.size({padding:Zo,apply({availableWidth:U,availableHeight:ne,elements:V}){const Q=V.floating,le=g2(V.reference);Q.style.setProperty("--fui-available-height",`${Math.floor(ne)}px`),Q.style.setProperty("--reference-width",F?`${Math.round(le)}px`:"0px"),F?Q.style.minWidth=`${Math.round(le)}px`:Q.style.removeProperty("min-width"),Q.style.maxWidth=`${Math.floor(U)}px`;const Me=Math.floor(ne);Q.style.maxHeight=`${E?Math.min(Me,E):Me}px`}})]}),Z=pe.useClick($,{enabled:r.includes(Vt.Click)&&!l}),z=pe.useHover($,{enabled:r.includes(Vt.Hover)&&!l,move:!1,restMs:40,delay:{open:80,close:80}}),te=pe.useDismiss($,{bubbles:!0,referencePress:!1,outsidePress:U=>{if(!b)return!1;const ne=U.target;return!(w?.current&&ne instanceof Node&&w.current.contains(ne))}}),q=pe.useRole($,{role:"menu"}),{getReferenceProps:oe,getFloatingProps:de}=pe.useInteractions([Z,z,te,q]),Oe=p.useCallback((U,ne)=>{j.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:U,y:ne,top:ne,left:U,right:U,bottom:ne})})},[j]),Ge=p.useCallback(U=>{!r.includes(Vt.ContextMenu)||l||(U.preventDefault(),S&&(Oe(U.clientX,U.clientY),I.current=document.elementFromPoint(U.clientX,U.clientY)),A(!0))},[S,l,A,Oe,r]),je=p.useCallback(U=>{!S||l||(r.includes(Vt.ContextMenu)&&P&&A(!1),Oe(U.clientX,U.clientY),I.current=document.elementFromPoint(U.clientX,U.clientY))},[S,l,Oe,P,r,A]);p.useEffect(()=>{l&&P&&A(!1)},[l,P,A]);const St=p.useCallback(U=>ne=>{U.disabled||(U.onClick?.({key:U.key,domEvent:ne}),o?.({key:U.key,domEvent:ne}),A(!1))},[o,A]),yt=p.useMemo(()=>n?n():t?H.jsxs(H.Fragment,{children:[i&&H.jsx(H.Fragment,{children:typeof i=="function"?i():i}),H.jsx("div",{role:"none",className:Mt.mergeClasses("py-1",m,bn.dropdownList),"aria-label":"dropdown",children:t.map(U=>U.type===Cn.Divider?H.jsx("div",{role:"separator",className:Mt.mergeClasses(i2,C)},U.key):U.type===Cn.PlainText?H.jsx("div",{className:Mt.mergeClasses("px-3 py-2 text-secondary dial-caption-text",U.className),children:U.label},U.key):U.children?.length?H.jsx(h2,{item:U,onRootClose:()=>A(!1)},U.key):H.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!U.disabled,className:fe(da,U.disabled&&ua,U.danger&&Jg,U.className),disabled:U.disabled,onClick:St(U),children:[U.icon&&H.jsx("span",{className:fe(U.danger&&"text-error",U.disabled&&"text-secondary"),children:H.jsx(zs,{icon:U.icon})}),H.jsx("span",{className:fe("flex-1 truncate text-start",U.danger&&"text-error",U.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:U.label})]},U.key))}),s&&H.jsx(H.Fragment,{children:typeof s=="function"?s():s})]}):null,[St,t,s,i,n,A,m,C]),ge=oe({onContextMenu:Ge,onMouseDown:je});return p.useEffect(()=>{if(!P)return;const U=j.reference.current;let ne=null;if(U instanceof Element?ne=U:I.current instanceof Element&&(ne=I.current),!ne)return;const V=new IntersectionObserver(([Q])=>{Q.isIntersecting||A(!1)},{root:null,threshold:0});return V.observe(ne),()=>V.disconnect()},[P,j.reference,A]),H.jsxs(H.Fragment,{children:[H.jsx("span",{ref:j.setReference,className:fe(t2,l&&"!cursor-not-allowed opacity-75",f),"aria-haspopup":"menu","aria-expanded":P,"aria-controls":J,...ge,children:e}),P&&H.jsx(pe.FloatingPortal,{children:H.jsx(pe.FloatingFocusManager,{context:$,modal:!1,initialFocus:-1,returnFocus:!0,children:H.jsxs("div",{id:J,ref:j.setFloating,style:ie,className:fe(o2,!F&&"w-max",v),...de(),children:[h&&H.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:H.jsx(Xg,{ariaLabel:"Close dropdown",onClose:U=>{g?.(U),A(!1)}})}),yt]})})})]})},ip="en-US",sp={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},p2="text-primary",br=40,np={minWidth:br,width:br,maxWidth:br},f2={cellClass:"ag-grid-no-checkbox",...np},m2={...np};var Ki=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Ki||{});const C2=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0}),rp=(e,t,o,i,s)=>{if(typeof e=="string"&&typeof t=="string"&&e&&t){const n=C2.compare(e,t);return n===0?0:n>0?1:-1}return e===t?0:e?t?e>t?1:-1:s?1:-1:s?-1:1},ap=e=>e?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)):{},v2=(e,t)=>e.some((o,i)=>o.field!==t[i].field?!0:o.hide!==t[i].hide),w2="h-full w-full",md=".ag-checkbox-input",Sr={accentColor:"var(--bg-control-accent, var(--bg-accent-primary, #3664E2))",backgroundColor:"var(--bg-layer-raised, var(--bg-layer-3, #1D2439))",oddRowBackgroundColor:"var(--bg-layer-sunken, var(--bg-layer-2, #161B2D))",selectedRowBackgroundColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderColor:"var(--bg-layer-4, #242C42)",rowBorder:"1px solid var(--stroke-tertiary, var(--stroke-primary, #696E7C))",rowHoverColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #0C101D)",foregroundColor:"var(--text-primary, #EEF1F7)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #9FA6BD)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:"var(--theme-font, var(--font-inter))"},Cd=40;var So=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(So||{}),si=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(si||{});const vd=()=>typeof window<"u"&&window.innerWidth<1279,wd=()=>typeof window<"u"&&window.innerWidth<640,b2=()=>{if(typeof window>"u")return si.Undefined;const e=window.innerWidth;return e>=1024?si.Desktop:e<640?si.Mobile:si.Tablet},lp=()=>{const[e,t]=p.useState(wd());return p.useEffect(()=>{const o=()=>t(wd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},cp=()=>{const[e,t]=p.useState(vd());return p.useEffect(()=>{const o=()=>t(vd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function dp(e,t){let o=null;return(...i)=>{o&&clearTimeout(o),o=setTimeout(()=>e(...i),t)}}let bd=!1;const up=()=>{bd||(bd=!0,zT({testIdAttribute:"dataQA"}),Qd.registerModules([GT]))},S2=({columnDefs:e,rowData:t,additionalGridOptions:o,getContextMenuItems:i,className:s,ariaLabel:n="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,onSelectionChange:c,onGridApiChange:d,getRowId:u=F=>String(F.id??JSON.stringify(F)),alternateOddRowColors:h=!1,filterPlaceholder:g="Enter value",emptyStateIcon:f,emptyStateTitle:m="No results found",emptyStateDescription:C="Sorry, we couldn't find any results for your search.",loading:v=!1,wrapperBorder:w=!0,withoutHeaderBorders:b=!1,allowDisabledContextMenu:y=!1,selectionMode:S})=>{up();const[F,E]=p.useState(),M=p.useId(),T=lp(),G=cp(),P=p.useRef(new Set),I=p.useRef(void 0),A=p.useMemo(()=>({...Sr,oddRowBackgroundColor:h?Sr.oddRowBackgroundColor:Sr.backgroundColor,wrapperBorder:w}),[h,w]),J=p.useCallback(V=>{V.api.sizeColumnsToFit()},[]),k=p.useCallback(V=>{if(V.data){const Q=u(V.data),le=a?.has(Q)??!1,Me=le&&!y,Ae=V.value==null?"":String(V.value),ee=i?.(V.data)??[];return H.jsx(ha,{trigger:[Vt.ContextMenu],items:ee,anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:Me,children:H.jsx("span",{className:"block min-w-0 h-full max-w-full",children:H.jsx(pa,{text:Ae,className:"max-w-full h-full",hideTooltip:le})})})}},[i,a,u,y]),j=p.useCallback(V=>V===So.API||V===So.ROW_DATA_CHANGED,[]),ie=p.useCallback(V=>{if(!F)return;const le=(V.selectedNodes||[]).map(Ae=>Ae.data),Me=new Set(le.map(u));P.current=Me,I.current=V.source,j(V.source)||c?.(Me,le)},[F,u,j,c]),$=p.useMemo(()=>dp(V=>ie?.(V),100),[ie]),Z=p.useCallback(V=>{if(!V.data)return null;const Q=u(V.data),le=V.node.isSelected(),Me=a?.has(Q),Ae=`row-select-${Q}`;return H.jsx("div",{className:"size-6 flex items-center justify-center",children:H.jsx(Ed,{className:"size-[18px]",inputId:Ae,checked:le,disabled:Me,name:"gridradiobutton",value:"selected",onChange:()=>{Me||(V.node.setSelected(!0,!0,So.CHECKBOX_SELECTED),V.api.refreshCells({columns:[V.column?.getColId()]}))}})})},[u,a]),z=p.useCallback(()=>{const V="dial-row-select",Q="dial-row-select-visible";return T||G||l&&l.size>0?`${V} ${Q}`:!l||l.size===0?V:`${V} ${Q}`},[T,G,l]),te=p.useCallback(()=>T||G?z():!l||l.size===0?"dial-row-not-select-header":z(),[z,T,G,l]),q=p.useMemo(()=>{if(S===Ki.SINGLE)return{...f2,cellRenderer:Z};if(S===Ki.MULTIPLE)return{...m2,headerClass:()=>te(),cellClass:V=>{const Q=V.data?u(V.data):null;let le=z();return Q&&a?.has(Q)&&(le+=" opacity-50 pointer-events-none"),le}}},[S,Z,te,u,z,a]),oe=p.useCallback(V=>{const Q=typeof r=="function"?r(V):!!r;if(!V.cellRenderer)return{...V,cellRenderer:k};if(!Q)return V;const le=V.cellRenderer;return{...V,cellRenderer:Ae=>{const ee=Ae.data?i?.(Ae.data)??[]:[];let ae=null;if(typeof le=="function"){const X=le;ae=H.jsx(X,{...Ae})}else ae=k(Ae);const Ce=Ae.data?u(Ae.data):null,ue=Ce?a?.has(Ce):!1;return H.jsx(ha,{trigger:[Vt.ContextMenu],items:ee,anchorToMouse:!0,matchReferenceWidth:!0,className:fe("w-full h-full",ue&&"!cursor-not-allowed opacity-75"),disabled:ue&&!y,children:H.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:ae})})}}},[a,i,u,k,r,y]),de=p.useMemo(()=>r?(e??[]).map(oe):e??[],[e,r,r?oe:null]),{defaultColDef:Oe,...Ge}=o??{},je=p.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:g,buttons:["reset"]},comparator:rp,...ap(Oe)}),[g,Oe]),St=V=>{const Q=document.querySelector(md);Q&&Q.setAttribute("aria-description",Rr);const le=de.map(Me=>({...Me,sort:void 0}));V.api.updateGridOptions({columnDefs:le,rowData:t}),V.api.sizeColumnsToFit(),E(V.api),o?.onGridReady?.(V),d?.(V.api)};p.useEffect(()=>{F&&t&&F.setGridOption("rowData",t)},[F,t]);const yt=p.useCallback(()=>H.jsx(xd,{title:m,description:C,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:f||H.jsx(vn.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[m,C,f]),ge=p.useMemo(()=>{if(S)return{mode:S===Ki.SINGLE?"singleRow":"multiRow",isRowSelectable:V=>{const Q=V.data?u(V.data):null;return Q?!a?.has(Q):!0}}},[a,u,S]);p.useEffect(()=>{F&&t&&P.current.size&&P.current.forEach(V=>{const Q=F.getRowNode(V);Q&&!Q.isSelected()&&Q.setSelected(!0,!1,So.API)})},[F,t]),p.useEffect(()=>{F&&l&&(F.deselectAll("all",So.API),l.forEach(V=>{const Q=F.getRowNode(V);Q&&!Q.isSelected()&&Q.setSelected(!0,!1,So.API)}))},[F,l]);const U=p.useCallback(V=>V.data?u(V.data):"",[u]),ne=p.useCallback(()=>{document.querySelectorAll(`.ag-row ${md}`).forEach(V=>{V.setAttribute("aria-description",Rr)})},[]);return p.useEffect(()=>{const V=j(I.current);if(F&&l?.size&&V){const Q=Array.from(l)[0];if(Q){const le=F.getRowNode(Q);le&&F.ensureNodeVisible(le)}}},[F,j,l]),H.jsx("div",{className:fe(w2,s,S&&"with-selection-column",b&&"dial-without-header-borders"),"aria-label":n,role:"region","aria-busy":v,children:H.jsx("div",{className:"h-full overflow-x-auto",role:"table","aria-describedby":M,children:H.jsx(Qg,{rowModelType:"clientSide",headerHeight:Cd,rowHeight:Cd,cellSelection:!1,theme:Vh.withPart(Ih).withParams({...A}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:de,defaultColDef:je,selectionColumnDef:q,onGridSizeChanged:J,onGridReady:St,loading:v,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:yt,rowData:t,rowSelection:ge,onSelectionChanged:$,getRowId:U,onRowDataUpdated:ne,onBodyScroll:ne,onFirstDataRendered:ne,...Ge})})})},Pl=e=>{if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t))return Pl(Number(t));const o=new Date(t);return isFinite(o.getTime())?o:null}return null},y2=({value:e,locale:t=ip,options:o=sp,emptyPlaceholder:i,className:s,hideTooltip:n=!1})=>{const r=Pl(e),a=p.useMemo(()=>r?new Intl.DateTimeFormat(t,o).format(r):i,[r,i,t,o]),l=r?r.toISOString():void 0;return H.jsx(pa,{text:l?H.jsx("time",{dateTime:l,children:a}):H.jsx("span",{children:a}),className:fe(p2,s),hideTooltip:n})};exports.AgGridReact=Qg;exports.DEFAULT_DATE_FORMAT_OPTIONS=sp;exports.DEFAULT_LOCALE=ip;exports.DIAL_KIT_CLASS=bn;exports.DialCloseButton=Xg;exports.DialDangerIconButton=bp;exports.DialDateCellRenderer=y2;exports.DialDropdown=ha;exports.DialEllipsisTooltip=pa;exports.DialGhostIconButton=Rd;exports.DialGrid=S2;exports.DialIcon=zs;exports.DialNeutralIconButton=wp;exports.DialNoDataContent=xd;exports.DialPrimaryIconButton=vp;exports.DialRadioButton=Ed;exports.DialSecondaryIconButton=Sp;exports.DialSuccessIconButton=Rp;exports.DialTertiaryIconButton=yp;exports.DropdownItemType=Cn;exports.DropdownTrigger=Vt;exports.DropdownType=Zg;exports.GridSelectionMode=Ki;exports.ScreenType=si;exports.SubMenuPanel=op;exports.ThemeScope=Fp;exports.ariaDescription=Rr;exports.baseColumnComparator=rp;exports.checkColDefsChanges=v2;exports.colorSchemeLight=Ih;exports.convertToDate=Pl;exports.debounceFn=dp;exports.getScreenType=b2;exports.observeElementSize=yd;exports.omitUndefined=ap;exports.registerAgGridModulesOnce=up;exports.scheduleMeasure=wn;exports.themeBalham=Vh;exports.useIsMobileScreen=lp;exports.useIsTabletScreen=cp;exports.useSubMenuFloating=tp;exports.useThemeScope=Fd;
|