@epam/ai-dial-ui-kit 0.15.0-dev.13 → 0.15.0-dev.14
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 +33 -0
- package/dist/CHANGELOG.md +4 -0
- package/dist/DateCellRenderer-Cci6cUvX.cjs +1 -0
- package/dist/{DateCellRenderer-S5QJV-Wp.cjs → DateCellRenderer-Cm09x2e4.cjs} +2 -2
- package/dist/IconButton-CVttu-k-.cjs +1 -0
- package/dist/{JsonEditor-qv1Z0dLX.cjs → JsonEditor-BDe6elKO.cjs} +1 -1
- package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-C7BONfsl.cjs} +1 -1
- package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-FVzYMdkC.cjs} +1 -1
- package/dist/{MarkdownEditorContainer-Bzcnoemw.cjs → MarkdownEditorContainer-BA94ffC4.cjs} +1 -1
- package/dist/{Switch-CUKClcEz.cjs → Switch-CfxMs3AZ.cjs} +1 -1
- package/dist/components/Dropdown/constants.js +5 -5
- package/dist/components/New/Calendar/constants.js +5 -5
- package/dist/components/New/Dropdown/Dropdown.js +94 -93
- package/dist/components/New/Dropdown/constants.js +3 -3
- package/dist/components/New/InteractiveTooltip/constants.js +2 -2
- package/dist/components/New/Popup/constants.js +3 -3
- package/dist/components/New/Tooltip/constants.js +1 -1
- package/dist/components/Popup/constants.js +8 -8
- package/dist/components/Tooltip/TooltipContent.js +11 -11
- package/dist/components-manifest.json +9 -3
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/lazy-BEsZqouS.cjs +1 -0
- package/dist/merge-classes-BEJXjzkx.cjs +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
- package/dist/src/components/New/Calendar/constants.d.ts +1 -1
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
- package/dist/src/components/Popup/constants.d.ts +1 -1
- package/dist/use-file-manager-tabs-Atz7tLcd.cjs +3 -0
- package/dist/utils/merge-classes.js +12 -5
- package/dist/utils/sub-menu-floating.js +11 -11
- package/package.json +1 -1
- package/dist/DateCellRenderer-Ba9tlNbk.cjs +0 -1
- package/dist/IconButton-DWqoaBWf.cjs +0 -1
- package/dist/lazy-tfN4sKhq.cjs +0 -1
- package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
- package/dist/use-file-manager-tabs-Ff6KIQOF.cjs +0 -3
|
@@ -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-Dipy1Ih1.cjs"),De=require("./IconButton-DWqoaBWf.cjs"),zi=({icon:e,className:t})=>e?H.jsx("span",{className:fe("flex-shrink-0",t),children:e}):null,up="text-primary",Jo=new Map,qs=new Set;let Xo=null,ns=null;const hp=()=>{ns=null;const e=Array.from(qs);qs.clear(),e.forEach(t=>t())},wn=e=>{qs.add(e),ns===null&&(ns=requestAnimationFrame(hp))},bd=()=>{Jo.forEach(wn)},gp=e=>{e.forEach(t=>{const o=Jo.get(t.target);o&&wn(o)})},pp=()=>{window.removeEventListener("resize",bd),Xo?.disconnect(),Xo=null,qs.clear(),ns!==null&&(cancelAnimationFrame(ns),ns=null)},Sd=(e,t)=>(Jo.size===0&&window.addEventListener("resize",bd),Jo.set(e,t),!Xo&&typeof ResizeObserver<"u"&&(Xo=new ResizeObserver(gp)),Xo?.observe(e),()=>{Jo.delete(e),Xo?.unobserve(e),qs.delete(t),Jo.size===0&&pp()}),pa=({text:e,className:t,contentClassName:o,hideTooltip:s,id:i,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 Sd(C,h)},[h]),p.useEffect(()=>{g()},[e,g]);const f=p.useMemo(()=>typeof e=="string"?e:d,[d,e]),m=p.useMemo(()=>s?"":n||(l?f:""),[n,f,s,l]);return H.jsxs(De.DialTooltipContainer,{...r,children:[H.jsx(De.DialTooltipTrigger,{asChild:!0,onMouseEnter:g,onFocusCapture:g,children:H.jsx("span",{id:i,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(up,o,!m&&"hidden"),children:m})]})},Fs=(e,t)=>({appearance:s,...i})=>H.jsx(De.DialIconButton,{...i,variant:e,appearance:s||t}),fp=(e,t)=>({variant:s,...i})=>H.jsx(De.DialIconButton,{...i,variant:s||t,appearance:e}),mp=Fs(De.ButtonVariant.Primary,De.ButtonAppearance.Solid),Cp=Fs(De.ButtonVariant.Neutral,De.ButtonAppearance.Outlined),vp=Fs(De.ButtonVariant.Danger,De.ButtonAppearance.Outlined),wp=Fs(De.ButtonVariant.Secondary,De.ButtonAppearance.Ghost),bp=Fs(De.ButtonVariant.Tertiary,De.ButtonAppearance.Ghost),Sp=Fs(De.ButtonVariant.Success,De.ButtonAppearance.Ghost),yd=fp(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",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",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",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(""),yp=({className:e,children:t})=>{const o=p.useContext(yr),s=p.useMemo(()=>[o,e].filter(Boolean).join(" "),[o,e]);return H.jsx(yr.Provider,{value:s,children:H.jsx("div",{className:Mt.mergeClasses("contents",e),children:t})})},Rd=()=>p.useContext(yr),Rr="checkbox-container",Fd=({name:e,value:t,label:o,description:s,checked:i=!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",!!s&&"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:i,disabled:l,"aria-describedby":i&&s?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})]})]}),i&&s&&H.jsx("div",{id:f,className:w,children:s})]})},Ed=({icon:e,title:t,description:o,containerClassName:s,titleClassName:i,descriptionClassName:n})=>H.jsxs("div",{className:Mt.mergeClasses("h-full w-full flex flex-col items-center justify-center text-secondary",s),"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",i),"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 s=e.length;if(s!==t.length)return!1;for(let i=0;i<s;i++)if(e[i]!==t[i]&&!o?.(e[i],t[i]))return!1;return!0}function Ts(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 Rp(e,t){let o=0,s=0;for(;o<e.length;o++)t.includes(e[o])||(e[s]=e[o],s++);for(;s<e.length;)e.pop()}function Dl(e,t,o){for(let s=0;s<t.length;s++)At(e,t[s]);for(let s=t.length-1;s>=0;s--)e.splice(o,0,t[s])}var Nt=e=>e==null||e===""?null:e;function L(e){return e!=null&&e!==""}function we(e){return!L(e)}var Fr=e=>e!=null&&typeof e.toString=="function"?e.toString():null,js=(e,t)=>{const o=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return o===s},Fp=(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 s=t?this.allAsyncListeners:this.allSyncListeners;let i=s.get(e);return!i&&o&&(i=new Set,s.set(e,i)),i}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 s=this.getListeners(e,o,!1);s&&(s.delete(t),s.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:s}=this,i=a=>{const l=s?()=>s.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)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>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()}},Ep=/[&<>"']/g,xp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Es(e){return e?.toString().toString()??null}function Hs(e){return Es(e)?.replace(Ep,t=>xp[t])??null}function Ml(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function Pp(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(i=>i.substring(0,1).toUpperCase()+(i.length>1?i.substring(1,i.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 s=null;const i=t.get("getDocument");return i&&L(i)?s=i():o&&(s=o.ownerDocument),s&&L(s)?s: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 s=t.querySelector("body");s?o=s:t instanceof ShadowRoot?o=t:t instanceof Document?o=t?.documentElement:o=t}return o}function Dp(e){return Ca(e)?.clientWidth??(window.innerWidth||-1)}function Mp(e){return Ca(e)?.clientHeight??(window.innerHeight||-1)}function wt(e,t,o){o==null||typeof o=="string"&&o==""?xd(e,t):bt(e,t,o)}function bt(e,t,o){e.setAttribute(Pd(t),o.toString())}function xd(e,t){e.removeAttribute(Pd(t))}function Pd(e){return`aria-${e}`}function ko(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Tp(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function Ip(e){return e.getAttribute("aria-label")}function Cs(e,t){wt(e,"label",t)}function Ys(e,t){wt(e,"labelledby",t)}function Dd(e,t){wt(e,"live",t)}function Ap(e,t){wt(e,"atomic",t)}function kp(e,t){wt(e,"relevant",t)}function va(e,t){wt(e,"invalid",t)}function Lp(e,t){wt(e,"disabled",t)}function Md(e,t){wt(e,"hidden",t)}function Er(e,t){bt(e,"expanded",t)}function Op(e,t){bt(e,"setsize",t)}function Gp(e,t){bt(e,"posinset",t)}function Hp(e,t){bt(e,"rowcount",t)}function wa(e,t){bt(e,"rowindex",t)}function Bp(e,t){bt(e,"rowspan",t)}function Vp(e,t){bt(e,"colcount",t)}function Td(e,t){bt(e,"colindex",t)}function Np(e,t){bt(e,"colspan",t)}function Wp(e,t){bt(e,"sort",t)}function zp(e){xd(e,"sort")}function Id(e,t){wt(e,"selected",t)}function _p(e,t){wt(e,"controls",t)}function Up(e,t){_p(e,t.id),Ys(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 $p="[tabindex], input, select, button, textarea, [href]",Ad="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Bs(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Ad)?!1:vt(e)}function me(e,t,o={}){const{skipAriaHidden:s}=o;e.classList.toggle("ag-hidden",!t),s||Md(e,!t)}function Kp(e,t,o={}){const{skipAriaHidden:s}=o;e.classList.toggle("ag-invisible",!t),s||Md(e,!t)}function Qs(e,t){const o="disabled",s=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);s(e);const i=e.querySelectorAll("input")??[];for(const n of i)s(n)}function Eo(e,t,o){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++s>o)break}else if(e===o)break}return!1}function _o(e){const{height:t,width:o,borderTopWidth:s,borderRightWidth:i,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(s||"0"),borderRightWidth:C(i||"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 Zs(e){const t=_o(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function kd(e){const{height:t,marginBottom:o,marginTop:s}=_o(e);return Math.floor(t+o+s)}function _i(e){const{width:t,marginLeft:o,marginRight:s}=_o(e);return Math.floor(t+o+s)}function Ld(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:s,borderRightWidth:i,borderBottomWidth:n}=_o(e);return{top:t.top+(o||0),left:t.left+(s||0),right:t.right+(i||0),bottom:t.bottom+(n||0)}}function Ui(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function $i(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 Od(e){return!!e.offsetParent}function vt(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Od(e)||window.getComputedStyle(e).visibility!=="visible")}function Sa(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Js(e){return()=>{const t=e();return t?Gd(t)||qp(t):!0}}function Gd(e){return e.clientWidth<e.scrollWidth}function qp(e){return e.clientHeight<e.scrollHeight}function Ki(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 Vs(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 jp(e,t){if(!t.isContentEditable)return;const o=ma(e).getSelection();if(!o)return;const s=Pe(e).createRange();s.selectNodeContents(t),s.collapse(!1),o.removeAllRanges(),o.addRange(s)}function Kt(e,t,o){const i=ma(e).ResizeObserver,n=i?new i(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 Hd="data-ref",Vn;function Il(){return Vn??(Vn=document.createTextNode(" ")),Vn.cloneNode()}function Lo(e){const{attrs:t,children:o,cls:s,ref:i,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),i&&a.setAttribute(Hd,i),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 Yp=["touchstart","touchend","touchmove","touchcancel","scroll"],Qp=["wheel"],Nn={},qi=(()=>{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 s=document.createElement(e[o]||"div");return o="on"+o,Nn[o]=o in s}})();function Zp(e,t){return!t||!e?!1:Xp(t).indexOf(e)>=0}function Jp(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Xp(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Jp(t)}function ef(e,t,o){const s=tf(t);let i;s!=null&&(i={passive:s}),e.addEventListener(t,o,i)}var tf=e=>{const t=Yp.includes(e),o=Qp.includes(e);if(t)return!0;if(o)return!1};function Bd(e,t,o){if(o===0)return!1;const s=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(s,i)<=o}var rs=(e,t)=>{const o=e.identifier;for(let s=0,i=t.length;s<i;++s){const n=t[s];if(n.identifier===o)return n}return null};function Xs(e,t){return e.gos.isElementInThisInstance(t.target)}function of(e,t,o){const i=e.getBoundingClientRect().height,n=Dp(o)-2,r=Mp(o)-2;if(!e.offsetParent)return;const l=Ld(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-i/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 Di=(e,...t)=>{for(const o of t){const[s,i,n,r]=o;s.addEventListener(i,n,r),e.push(o)}},Fa=e=>{if(e){for(const[t,o,s,i]of e)t.removeEventListener(o,s,i);e.length=0}},to=e=>{e.cancelable&&e.preventDefault()};function sf(e,t){return t}function Vd(e){return e?.getLocaleTextFunc()??sf}function nf(e,t,o,s){const i=t[o];return e.getLocaleTextFunc()(o,typeof i=="function"?i(s):i,s)}function rf(e){return(t,o,s)=>e({key:t,defaultValue:o,variableValues:s})}function af(e){return(t,o,s)=>{let i=e?.[t];if(i&&s?.length){let n=0;for(;!(n>=s.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",s[n++])}return i??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 s of Object.keys(t)){const i=t[s];i&&o.push(this._setupListener(e,s,i))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let s;if(lf(e))e.__addEventListener(t,o),s=()=>(e.__removeEventListener(t,o),null);else{const i=cf(e);e instanceof HTMLElement?ef(e,t,o):i?e.addListener(t,o):e.addEventListener(t,o),s=i?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==s),null)}setupPropertyListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const s=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==s),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++,s=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=i.changeSet.id}const n={type:"propertyChanged",changeSet:i.changeSet,source:i.source};t(n)};for(const i of e)this.setupPropertyListener(i,s)}getLocaleTextFunc(){return Vd(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 lf(e){return e.__addEventListener!==void 0}function cf(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 df={pending:!1,funcs:[]},uf={pending:!1,funcs:[]};function Pr(e,t="setTimeout",o){const s=t==="raf"?uf:df;if(s.funcs.push(e),s.pending)return;s.pending=!0;const i=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1;for(const r of n)r()};t==="raf"?qt(o,i):window.setTimeout(i,0)}function xe(e,t,o){let s;return function(...i){const n=this;return window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,i)},o),s}}function Al(e,t){let o=0;return function(...s){const i=this,n=Date.now();n-o<t||(o=n,e.apply(i,s))}}function hf(e,t,o,s=100){const i=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()-i>s;(t()||c)&&(o(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var Nd=new Set(["__proto__","constructor","prototype"]);function gf(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(s=>!Nd.has(s)))t(o,e[o])}}function _e(e,t,o=!0,s=!1){L(t)&&gf(t,(i,n)=>{let r=e[i];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[i]=r),kl(n)&&kl(r)&&!Array.isArray(r)?_e(r,n,o,s):(o||n!==void 0)&&(e[i]=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 s=Wd(t);if(s&&typeof s=="object"&&typeof o=="object")return Gt.applyGlobalGridOptions({[t]:o})[t]}return o}};Ea.gridOptions=void 0;Ea.mergeStrategy="shallow";var xa=Ea;function Wd(e){return xa.gridOptions?.[e]}var zd={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},_d="https://www.ag-grid.com";function Oo(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Ns(e,...t){yn(()=>Ud(e,...t),e+t?.join(""))}function as(e,...t){yn(()=>pf(e,...t),e+t?.join(""))}function pf(e,...t){console.error("AG Grid: "+e,...t)}function Ud(e,...t){console.warn("AG Grid: "+e,...t)}var $d=new Set,ji={},xo={},Mi,Kd=!1,qd=!1,ff=!1;function mf(e){const[t,o]=e.version.split(".")||[],[s,i]=Mi.split(".")||[];return t===s&&o===i}function Cf(e){Mi||(Mi=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?mf(e)||as(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Mi}.`)):as(t(`'${e.moduleName}' is incompatible.`));const o=e.validate?.();o&&!o.isValid&&as(`${o.message}`)}function ei(e,t,o=!1){o||(Kd=!0),Cf(e);const s=e.rowModels??["all"];$d.add(e);let i;t!==void 0?(qd=!0,xo[t]===void 0&&(xo[t]={}),i=xo[t]):i=ji;for(const n of s)i[n]===void 0&&(i[n]={}),i[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)ei(n,t,o)}function vf(e){delete xo[e]}function Dr(e,t,o){const s=i=>!!ji[i]?.[e]||!!xo[t]?.[i]?.[e];return s(o)||s("all")}function Pa(){return qd}function wf(e,t){const o=xo[e]??{};return[...Object.values(ji.all??{}),...Object.values(o.all??{}),...Object.values(ji[t]??{}),...Object.values(o[t]??{})]}function bf(){return new Set($d)}function Sf(e,t){const o=xo[e]??{};return[...Object.values(o.all??{}),...Object.values(o[t]??{})]}function yf(){return Kd}function jd(){return ff}var Yd=class{static register(e){ei(e,void 0)}static registerModules(e){for(const t of e)ei(t,void 0)}};function Qd(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const o=Qd(t.dependsOn);if(o)return o}}}var I="35.2.1",Ll=2e3,Ol=100,Zd="_version_",Jd=null,ls=`${_d}/javascript-data-grid`;function Rf(e){Jd=e}function Ff(e){ls=e}function Xd(e,t,o){return Jd?.(e,t)??[Df(e,t,o)]}function Da(e,t,o,s,i){e(`${s?"warning":"error"} #${t}`,...Xd(t,o,i))}function Ef(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 xf(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Ef(e)),t}function Ti(e){return e===void 0?"undefined":e===null?"null":e}function Mr(e,t){return`${e}?${t.toString()}`}function Pf(e,t,o){const s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let i=Mr(e,t);for(const[n,r]of s){if(n===Zd)continue;const a=i.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),i=Mr(e,t)}return i}function eu(e,t){const o=new URLSearchParams;if(o.append(Zd,I),t)for(const n of Object.keys(t))o.append(n,xf(t[n]));const s=`${ls}/errors/${e}`,i=Mr(s,o);return i.length<=Ll?i:Pf(s,o,Ll)}var Df=(e,t,o)=>{const s=eu(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-CVttu-k-.cjs"),zi=({icon:e,className:t})=>e?H.jsx("span",{className:fe("flex-shrink-0",t),children:e}):null,up="text-primary",Jo=new Map,qs=new Set;let Xo=null,ns=null;const hp=()=>{ns=null;const e=Array.from(qs);qs.clear(),e.forEach(t=>t())},wn=e=>{qs.add(e),ns===null&&(ns=requestAnimationFrame(hp))},bd=()=>{Jo.forEach(wn)},gp=e=>{e.forEach(t=>{const o=Jo.get(t.target);o&&wn(o)})},pp=()=>{window.removeEventListener("resize",bd),Xo?.disconnect(),Xo=null,qs.clear(),ns!==null&&(cancelAnimationFrame(ns),ns=null)},Sd=(e,t)=>(Jo.size===0&&window.addEventListener("resize",bd),Jo.set(e,t),!Xo&&typeof ResizeObserver<"u"&&(Xo=new ResizeObserver(gp)),Xo?.observe(e),()=>{Jo.delete(e),Xo?.unobserve(e),qs.delete(t),Jo.size===0&&pp()}),pa=({text:e,className:t,contentClassName:o,hideTooltip:s,id:i,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 Sd(C,h)},[h]),p.useEffect(()=>{g()},[e,g]);const f=p.useMemo(()=>typeof e=="string"?e:d,[d,e]),m=p.useMemo(()=>s?"":n||(l?f:""),[n,f,s,l]);return H.jsxs(De.DialTooltipContainer,{...r,children:[H.jsx(De.DialTooltipTrigger,{asChild:!0,onMouseEnter:g,onFocusCapture:g,children:H.jsx("span",{id:i,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(up,o,!m&&"hidden"),children:m})]})},Fs=(e,t)=>({appearance:s,...i})=>H.jsx(De.DialIconButton,{...i,variant:e,appearance:s||t}),fp=(e,t)=>({variant:s,...i})=>H.jsx(De.DialIconButton,{...i,variant:s||t,appearance:e}),mp=Fs(De.ButtonVariant.Primary,De.ButtonAppearance.Solid),Cp=Fs(De.ButtonVariant.Neutral,De.ButtonAppearance.Outlined),vp=Fs(De.ButtonVariant.Danger,De.ButtonAppearance.Outlined),wp=Fs(De.ButtonVariant.Secondary,De.ButtonAppearance.Ghost),bp=Fs(De.ButtonVariant.Tertiary,De.ButtonAppearance.Ghost),Sp=Fs(De.ButtonVariant.Success,De.ButtonAppearance.Ghost),yd=fp(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",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",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",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(""),yp=({className:e,children:t})=>{const o=p.useContext(yr),s=p.useMemo(()=>[o,e].filter(Boolean).join(" "),[o,e]);return H.jsx(yr.Provider,{value:s,children:H.jsx("div",{className:Mt.mergeClasses("contents",e),children:t})})},Rd=()=>p.useContext(yr),Rr="checkbox-container",Fd=({name:e,value:t,label:o,description:s,checked:i=!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",!!s&&"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:i,disabled:l,"aria-describedby":i&&s?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})]})]}),i&&s&&H.jsx("div",{id:f,className:w,children:s})]})},Ed=({icon:e,title:t,description:o,containerClassName:s,titleClassName:i,descriptionClassName:n})=>H.jsxs("div",{className:Mt.mergeClasses("h-full w-full flex flex-col items-center justify-center text-secondary",s),"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",i),"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 s=e.length;if(s!==t.length)return!1;for(let i=0;i<s;i++)if(e[i]!==t[i]&&!o?.(e[i],t[i]))return!1;return!0}function Ts(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 Rp(e,t){let o=0,s=0;for(;o<e.length;o++)t.includes(e[o])||(e[s]=e[o],s++);for(;s<e.length;)e.pop()}function Dl(e,t,o){for(let s=0;s<t.length;s++)At(e,t[s]);for(let s=t.length-1;s>=0;s--)e.splice(o,0,t[s])}var Nt=e=>e==null||e===""?null:e;function L(e){return e!=null&&e!==""}function we(e){return!L(e)}var Fr=e=>e!=null&&typeof e.toString=="function"?e.toString():null,js=(e,t)=>{const o=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return o===s},Fp=(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 s=t?this.allAsyncListeners:this.allSyncListeners;let i=s.get(e);return!i&&o&&(i=new Set,s.set(e,i)),i}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 s=this.getListeners(e,o,!1);s&&(s.delete(t),s.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:s}=this,i=a=>{const l=s?()=>s.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)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>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()}},Ep=/[&<>"']/g,xp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Es(e){return e?.toString().toString()??null}function Hs(e){return Es(e)?.replace(Ep,t=>xp[t])??null}function Ml(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function Pp(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(i=>i.substring(0,1).toUpperCase()+(i.length>1?i.substring(1,i.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 s=null;const i=t.get("getDocument");return i&&L(i)?s=i():o&&(s=o.ownerDocument),s&&L(s)?s: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 s=t.querySelector("body");s?o=s:t instanceof ShadowRoot?o=t:t instanceof Document?o=t?.documentElement:o=t}return o}function Dp(e){return Ca(e)?.clientWidth??(window.innerWidth||-1)}function Mp(e){return Ca(e)?.clientHeight??(window.innerHeight||-1)}function wt(e,t,o){o==null||typeof o=="string"&&o==""?xd(e,t):bt(e,t,o)}function bt(e,t,o){e.setAttribute(Pd(t),o.toString())}function xd(e,t){e.removeAttribute(Pd(t))}function Pd(e){return`aria-${e}`}function ko(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Tp(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function Ip(e){return e.getAttribute("aria-label")}function Cs(e,t){wt(e,"label",t)}function Ys(e,t){wt(e,"labelledby",t)}function Dd(e,t){wt(e,"live",t)}function Ap(e,t){wt(e,"atomic",t)}function kp(e,t){wt(e,"relevant",t)}function va(e,t){wt(e,"invalid",t)}function Lp(e,t){wt(e,"disabled",t)}function Md(e,t){wt(e,"hidden",t)}function Er(e,t){bt(e,"expanded",t)}function Op(e,t){bt(e,"setsize",t)}function Gp(e,t){bt(e,"posinset",t)}function Hp(e,t){bt(e,"rowcount",t)}function wa(e,t){bt(e,"rowindex",t)}function Bp(e,t){bt(e,"rowspan",t)}function Vp(e,t){bt(e,"colcount",t)}function Td(e,t){bt(e,"colindex",t)}function Np(e,t){bt(e,"colspan",t)}function Wp(e,t){bt(e,"sort",t)}function zp(e){xd(e,"sort")}function Id(e,t){wt(e,"selected",t)}function _p(e,t){wt(e,"controls",t)}function Up(e,t){_p(e,t.id),Ys(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 $p="[tabindex], input, select, button, textarea, [href]",Ad="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Bs(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Ad)?!1:vt(e)}function me(e,t,o={}){const{skipAriaHidden:s}=o;e.classList.toggle("ag-hidden",!t),s||Md(e,!t)}function Kp(e,t,o={}){const{skipAriaHidden:s}=o;e.classList.toggle("ag-invisible",!t),s||Md(e,!t)}function Qs(e,t){const o="disabled",s=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);s(e);const i=e.querySelectorAll("input")??[];for(const n of i)s(n)}function Eo(e,t,o){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++s>o)break}else if(e===o)break}return!1}function _o(e){const{height:t,width:o,borderTopWidth:s,borderRightWidth:i,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(s||"0"),borderRightWidth:C(i||"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 Zs(e){const t=_o(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function kd(e){const{height:t,marginBottom:o,marginTop:s}=_o(e);return Math.floor(t+o+s)}function _i(e){const{width:t,marginLeft:o,marginRight:s}=_o(e);return Math.floor(t+o+s)}function Ld(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:s,borderRightWidth:i,borderBottomWidth:n}=_o(e);return{top:t.top+(o||0),left:t.left+(s||0),right:t.right+(i||0),bottom:t.bottom+(n||0)}}function Ui(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function $i(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 Od(e){return!!e.offsetParent}function vt(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Od(e)||window.getComputedStyle(e).visibility!=="visible")}function Sa(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Js(e){return()=>{const t=e();return t?Gd(t)||qp(t):!0}}function Gd(e){return e.clientWidth<e.scrollWidth}function qp(e){return e.clientHeight<e.scrollHeight}function Ki(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 Vs(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 jp(e,t){if(!t.isContentEditable)return;const o=ma(e).getSelection();if(!o)return;const s=Pe(e).createRange();s.selectNodeContents(t),s.collapse(!1),o.removeAllRanges(),o.addRange(s)}function Kt(e,t,o){const i=ma(e).ResizeObserver,n=i?new i(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 Hd="data-ref",Vn;function Il(){return Vn??(Vn=document.createTextNode(" ")),Vn.cloneNode()}function Lo(e){const{attrs:t,children:o,cls:s,ref:i,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),i&&a.setAttribute(Hd,i),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 Yp=["touchstart","touchend","touchmove","touchcancel","scroll"],Qp=["wheel"],Nn={},qi=(()=>{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 s=document.createElement(e[o]||"div");return o="on"+o,Nn[o]=o in s}})();function Zp(e,t){return!t||!e?!1:Xp(t).indexOf(e)>=0}function Jp(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Xp(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Jp(t)}function ef(e,t,o){const s=tf(t);let i;s!=null&&(i={passive:s}),e.addEventListener(t,o,i)}var tf=e=>{const t=Yp.includes(e),o=Qp.includes(e);if(t)return!0;if(o)return!1};function Bd(e,t,o){if(o===0)return!1;const s=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(s,i)<=o}var rs=(e,t)=>{const o=e.identifier;for(let s=0,i=t.length;s<i;++s){const n=t[s];if(n.identifier===o)return n}return null};function Xs(e,t){return e.gos.isElementInThisInstance(t.target)}function of(e,t,o){const i=e.getBoundingClientRect().height,n=Dp(o)-2,r=Mp(o)-2;if(!e.offsetParent)return;const l=Ld(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-i/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 Di=(e,...t)=>{for(const o of t){const[s,i,n,r]=o;s.addEventListener(i,n,r),e.push(o)}},Fa=e=>{if(e){for(const[t,o,s,i]of e)t.removeEventListener(o,s,i);e.length=0}},to=e=>{e.cancelable&&e.preventDefault()};function sf(e,t){return t}function Vd(e){return e?.getLocaleTextFunc()??sf}function nf(e,t,o,s){const i=t[o];return e.getLocaleTextFunc()(o,typeof i=="function"?i(s):i,s)}function rf(e){return(t,o,s)=>e({key:t,defaultValue:o,variableValues:s})}function af(e){return(t,o,s)=>{let i=e?.[t];if(i&&s?.length){let n=0;for(;!(n>=s.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",s[n++])}return i??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 s of Object.keys(t)){const i=t[s];i&&o.push(this._setupListener(e,s,i))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let s;if(lf(e))e.__addEventListener(t,o),s=()=>(e.__removeEventListener(t,o),null);else{const i=cf(e);e instanceof HTMLElement?ef(e,t,o):i?e.addListener(t,o):e.addEventListener(t,o),s=i?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==s),null)}setupPropertyListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const s=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==s),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++,s=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=i.changeSet.id}const n={type:"propertyChanged",changeSet:i.changeSet,source:i.source};t(n)};for(const i of e)this.setupPropertyListener(i,s)}getLocaleTextFunc(){return Vd(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 lf(e){return e.__addEventListener!==void 0}function cf(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 df={pending:!1,funcs:[]},uf={pending:!1,funcs:[]};function Pr(e,t="setTimeout",o){const s=t==="raf"?uf:df;if(s.funcs.push(e),s.pending)return;s.pending=!0;const i=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1;for(const r of n)r()};t==="raf"?qt(o,i):window.setTimeout(i,0)}function xe(e,t,o){let s;return function(...i){const n=this;return window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,i)},o),s}}function Al(e,t){let o=0;return function(...s){const i=this,n=Date.now();n-o<t||(o=n,e.apply(i,s))}}function hf(e,t,o,s=100){const i=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()-i>s;(t()||c)&&(o(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var Nd=new Set(["__proto__","constructor","prototype"]);function gf(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(s=>!Nd.has(s)))t(o,e[o])}}function _e(e,t,o=!0,s=!1){L(t)&&gf(t,(i,n)=>{let r=e[i];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[i]=r),kl(n)&&kl(r)&&!Array.isArray(r)?_e(r,n,o,s):(o||n!==void 0)&&(e[i]=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 s=Wd(t);if(s&&typeof s=="object"&&typeof o=="object")return Gt.applyGlobalGridOptions({[t]:o})[t]}return o}};Ea.gridOptions=void 0;Ea.mergeStrategy="shallow";var xa=Ea;function Wd(e){return xa.gridOptions?.[e]}var zd={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},_d="https://www.ag-grid.com";function Oo(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Ns(e,...t){yn(()=>Ud(e,...t),e+t?.join(""))}function as(e,...t){yn(()=>pf(e,...t),e+t?.join(""))}function pf(e,...t){console.error("AG Grid: "+e,...t)}function Ud(e,...t){console.warn("AG Grid: "+e,...t)}var $d=new Set,ji={},xo={},Mi,Kd=!1,qd=!1,ff=!1;function mf(e){const[t,o]=e.version.split(".")||[],[s,i]=Mi.split(".")||[];return t===s&&o===i}function Cf(e){Mi||(Mi=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?mf(e)||as(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Mi}.`)):as(t(`'${e.moduleName}' is incompatible.`));const o=e.validate?.();o&&!o.isValid&&as(`${o.message}`)}function ei(e,t,o=!1){o||(Kd=!0),Cf(e);const s=e.rowModels??["all"];$d.add(e);let i;t!==void 0?(qd=!0,xo[t]===void 0&&(xo[t]={}),i=xo[t]):i=ji;for(const n of s)i[n]===void 0&&(i[n]={}),i[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)ei(n,t,o)}function vf(e){delete xo[e]}function Dr(e,t,o){const s=i=>!!ji[i]?.[e]||!!xo[t]?.[i]?.[e];return s(o)||s("all")}function Pa(){return qd}function wf(e,t){const o=xo[e]??{};return[...Object.values(ji.all??{}),...Object.values(o.all??{}),...Object.values(ji[t]??{}),...Object.values(o[t]??{})]}function bf(){return new Set($d)}function Sf(e,t){const o=xo[e]??{};return[...Object.values(o.all??{}),...Object.values(o[t]??{})]}function yf(){return Kd}function jd(){return ff}var Yd=class{static register(e){ei(e,void 0)}static registerModules(e){for(const t of e)ei(t,void 0)}};function Qd(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const o=Qd(t.dependsOn);if(o)return o}}}var I="35.2.1",Ll=2e3,Ol=100,Zd="_version_",Jd=null,ls=`${_d}/javascript-data-grid`;function Rf(e){Jd=e}function Ff(e){ls=e}function Xd(e,t,o){return Jd?.(e,t)??[Df(e,t,o)]}function Da(e,t,o,s,i){e(`${s?"warning":"error"} #${t}`,...Xd(t,o,i))}function Ef(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 xf(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Ef(e)),t}function Ti(e){return e===void 0?"undefined":e===null?"null":e}function Mr(e,t){return`${e}?${t.toString()}`}function Pf(e,t,o){const s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let i=Mr(e,t);for(const[n,r]of s){if(n===Zd)continue;const a=i.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),i=Mr(e,t)}return i}function eu(e,t){const o=new URLSearchParams;if(o.append(Zd,I),t)for(const n of Object.keys(t))o.append(n,xf(t[n]));const s=`${ls}/errors/${e}`,i=Mr(s,o);return i.length<=Ll?i:Pf(s,o,Ll)}var Df=(e,t,o)=>{const s=eu(e,t);return`${`${o?o+`
|
|
2
2
|
`:""}Visit ${s}`}${o?"":`
|
|
3
3
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function D(...e){Da(Ns,e[0],e[1],!0)}function ce(...e){Da(as,e[0],e[1],!1)}function Ls(e,t,o){Da(as,e,t,!1,o)}function Mf(e,t){const o=t[0];return`error #${o} `+Xd(o,t[1],e).join(" ")}function It(...e){return Mf(void 0,e)}function tu(e,t){return e.get("rowModelType")===t}function Se(e,t){return tu(e,"clientSide")}function xs(e,t){return tu(e,"serverSide")}function Le(e,t){return e.get("domLayout")===t}function Po(e){return Zi(e)!==void 0}function ou(e){return typeof e.get("getRowHeight")=="function"}function Tf(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function If({gos:e,formula:t}){const o=e.get("rowNumbers");return o||!!t?.active&&o!==!1}function ro(e,t,o=!1,s){const{gos:i,environment:n}=e;if(s==null&&(s=n.getDefaultRowHeight()),ou(i)){if(o)return{height:s,estimated:!0};const l={node:t,data:t.data},c=i.getCallback("getRowHeight")(l);if(Tr(c))return c===0&&D(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&i.get("masterDetail"))return Af(i);const r=i.get("rowHeight");return{height:r&&Tr(r)?r:s,estimated:!1}}function Af(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,s=o.get("rowHeight");if(!s||we(s))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(D(24),t.getDefaultRowHeight())}function Tr(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function su(e,t,o){const s=t[e.getDomDataKey()];return s?s[o]:void 0}function Go(e,t,o,s){const i=e.getDomDataKey();let n=t[i];we(n)&&(n={},t[i]=n),n[o]=s}function cs(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function iu(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Le(e,"print"))}function Bt(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Yi(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function nu(e){return e.get("grandTotalRow")}function kf(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Lf(e){return kf(e)&&e.get("groupHideColumnsUntilExpanded")&&Se(e)}function ru(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function au(e,t,o){return!!t.group&&!t.footer&&ru(e,o)}function vs(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let s=t(o);return typeof s!="string"&&(yn(()=>D(25,{id:s}),"getRowIdString"),s=String(s)),s}}function Of(e,t){const o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Gf(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function ds(e){return e?.checkboxes??!0}function Ii(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Qi(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Wn(e){return e?.hideDisabledCheckboxes??!1}function Hf(e){return typeof e.get("rowSelection")!="string"}function ao(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function us(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function lu(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return o&&s?!1:o?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Bf(e){const t=lu(e);return t===!0||t==="enableSelection"}function Vf(e){const t=lu(e);return t===!0||t==="enableDeselection"}function Ir(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Zi(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 Ji(e){return Zi(e)==="multiRow"}function Nf(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Xi(e){const t=e.get("rowSelection");if(typeof t=="string"){const o=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return o&&s?"filteredDescendants":o?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function cu(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function Wf(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function ti(e){const t=Xi(e);return t==="descendants"||t==="filteredDescendants"}function Gl(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function zf(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Ze(e){return e.get("columnMenu")==="legacy"}function _f(e){return!Ze(e)}function Uf(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function $f(e,t,o){typeof e!="object"&&(e={});const s={...e};for(const i of o){const n=t[i];typeof n<"u"&&(s[i]=n)}return s}function Kf(e,t){if(!e)return;const o={};let s=!1;for(const r of Object.keys(e))o[r]=e[r],s=!0;if(!s)return;const i={type:"gridOptionsChanged",options:o};t.dispatchEvent(i);const n={type:"componentStateChanged",...o};t.dispatchEvent(n)}function K(e,t){return e.addCommon(t)}function Ai(e,t){return e[t]??e.gridOptions?.[t]??Wd(t)??zd[t]}function qf({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var jf={resizable:!0,sortable:!0},Yf=0;function du(){return Yf++}function lo(e){return e instanceof Uo}var Qf=["asc","desc",null],Zf=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],Uo=class extends x{constructor(e,t,o,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=s,this.isColumn=!0,this.instanceId=du(),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=Hs(o)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:s}}=this;t?.initCol(this);const i=e.hide;i!==void 0?this.visible=!i:this.visible=!e.initialHide,o?.initCol(this),s?.initCol(this)}setColDef(e,t,o){const s=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),s&&(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,s=e.get("suppressFieldDotNotation");this.fieldContainsDots=L(t)&&t.includes(".")&&!s,this.tooltipFieldContainsDots=L(o)&&o.includes(".")&&!s}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 s=e.recreateColDef(this.colDef);this.setColDef(s,s,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]??jf[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,s=t===null?t:Ut(t?.type),i=o===null?o:Ut(o?.type);return s&&e.push(s),i&&e.push(i),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?Zf:Qf;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 L(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 s=this.createColumnEvent(e,t);o&&_e(s,o),this.colEventSvc.dispatchEvent(s)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ct(e){return hs(e)?{direction:e.direction,type:e.type}:{direction:Rn(e),type:Ut(e)}}function io(e){return e==="asc"||e==="desc"||e===null}function Ma(e){return e==="default"||e==="absolute"}function hs(e){if(!e||typeof e!="object")return!1;const t=e;return Ma(t.type)&&io(t.direction)}function ki(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 io(e)?e:null}function Ut(e){return Ma(e)?e:"default"}function Jf(e,t,o){const i=o?.()??t.sortSvc.getDisplaySortForColumn(e),n=Ut(i?.type),r=Rn(i?.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 Li}var Li=class extends x{constructor(e,t,o,s){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=s,this.isColumn=!1,this.expandable=!1,this.instanceId=du(),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 s=this.findChildrenRemovingPadding();for(let n=0,r=s.length;n<r;n++){const a=s[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 i=e&&t&&o;this.expandable!==i&&(this.expandable=i,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=o=>{for(const s of o)Ve(s)&&s.isPadding()?t(s.children):e.push(s)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Xf={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 s={},i=e.gos;return Object.assign(s,i.get("defaultColGroupDef")),Object.assign(s,t),i.validateColDef(s,o),s}var em=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 s=e??t;if(s?o!==0&&(s+="_"+o):s=o,!this.existingKeys[s]){const i=String(s);return e&&o>0&&D(273,{providedId:e,usedId:i}),this.existingKeys[i]=!0,i}o++}}},tm=(e,t)=>{Ve(e)&&e.setupExpandable(),e.originalParent=t};function om(e,t=null,o,s,i){const n=new em,{existingCols:r,existingGroups:a,existingColKeys:l}=sm(s);n.addExistingKeys(l);const c=uu(e,t,0,o,r,n,a,i),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,n):c;return Wt(null,h,tm),{columnTree:h,treeDepth:u}}function sm(e){const t=[],o=[],s=[];return e&&Wt(null,e,i=>{if(Ve(i)){const n=i;o.push(n)}else{const n=i;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:o,existingColKeys:s}}function uu(e,t,o,s,i,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&&cm(u)?c[d]=l.createProvidedColumnGroup(s,u,o,i,n,r,a):c[d]=im(e,s,u,i,n,a)}return c}function im(e,t,o,s,i,n){const r=rm(o,s);r&&s?.splice(r.idx,1);let a=r?.column;if(a){const l=Ar(e,o,a.getColId());a.setColDef(l,o,n),nm(e,a,l,n)}else{const l=i.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 hu(e,t,o,s,i,n,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;o!==void 0&&t.setVisible(!o,a),l&&(l.updateColSort(t,s,a),i!==void 0&&l.setColSortIndex(t,i)),n!==void 0&&c?.setColPinned(t,n),r!==void 0&&d?.setColFlex(t,r)}function nm(e,t,o,s){hu(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,s);const i=t.getFlex();if(!(i!=null&&i>0))if(o.width!=null)t.setActualWidth(o.width,s);else{const n=t.getActualWidth();t.setActualWidth(n,s)}}function rm(e,t){if(t)for(let o=0;o<t.length;o++){const s=t[o].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(e.field!=null){if(s.field===e.field)return{idx:o,column:t[o]};continue}if(s===e)return{idx:o,column:t[o]}}}function Ar(e,t,o,s){const{gos:i,dataTypeSvc:n}=e,r={},a=i.get("defaultColDef");_e(r,a,!1,!0);const l=am(e,r,t,o);l&&lm(e,l,r);const c=r.cellDataType;_e(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=i.get("autoGroupColumnDef"),u=Bt(i);return t.rowGroup&&d&&u&&_e(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n?.postProcess(r),n?.validateColDef(r,t,a,o),i.validateColDef(r,o,s),r}function am(e,t,o,s){const i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,o,s),n=o.type??i??t.type;return t.type=n,n?tn(n):void 0}function lm(e,t,o){if(!t.length)return;const s=Object.assign({},Xf),i=e.gos.get("columnTypes")||{};for(const n of Object.keys(i)){const r=i[n];n in s?D(34,{key:n}):(r.type&&D(35),s[n]=r)}for(const n of t){const r=s[n.trim()];r?_e(o,r,!1,!0):D(36,{t:n})}}function cm(e){return e.children!==void 0}function Wt(e,t,o){if(t)for(let s=0;s<t.length;s++){const i=t[s];Ve(i)&&Wt(i,i.getChildren(),o),o(i,e)}}var oo="ag-Grid-AutoColumn",Ta="ag-Grid-SelectionColumn",Ia="ag-Grid-RowNumbersColumn";function gu(e){const t=[],o=s=>{for(let i=0;i<s.length;i++){const n=s[i];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 s={};if(!t)return;Wt(null,t,n=>{s[n.getInstanceId()]=n}),o&&Wt(null,o,n=>{s[n.getInstanceId()]=null});const i=Object.values(s).filter(n=>n!=null);e.context.destroyBeans(i)}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 dm(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 um(e,t){return ho(e,t,(o,s)=>o.getColId()===s.getColId())}function hm(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function gs(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Ws(e,t){return e===t||e.colId==t||e.getColDef()===t}var gm=(e,t)=>(o,s)=>{const i={value1:void 0,value2:void 0};let n=!1;return e&&(e[o]!==void 0&&(i.value1=e[o],n=!0),L(s)&&e[s]!==void 0&&(i.value2=e[s],n=!0)),!n&&t&&(t[o]!==void 0&&(i.value1=t[o]),L(s)&&t[s]!==void 0&&(i.value2=t[s])),i};function pm(e,t){const o={...e,sort:void 0,colId:t},s=pu(e);return s&&(o.sort=s.direction,o.sortType=s.type),o}function pu(e){const{sort:t,initialSort:o}=e,s=hs(t)||io(t),i=hs(o)||io(o);return s?ct(t):i?ct(o):null}function fu(e,t){return e+"_"+t}function Fe(e){return e instanceof oi}var oi=class extends x{constructor(e,t,o,s){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=s,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Hs(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return fu(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"},fm=65,mm=67,Cm=86,vm=68,wm=90,bm=89;function mu(e){const{keyCode:t}=e;let o;switch(t){case fm:o=R.A;break;case mm:o=R.C;break;case Cm:o=R.V;break;case vm:o=R.D;break;case wm:o=R.Z;break;case bm:o=R.Y;break;default:o=e.code}return o}function Sm(e,t){return new ie(o=>{o(window.setInterval(e,t))})}var ie=class Os{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 Os(o=>{let s=t.length;const i=new Array(s);t.forEach((n,r)=>{n.then(a=>{i[r]=a,s--,s===0&&o(i)})})}):Os.resolve()}static resolve(t=null){return new Os(o=>o(t))}then(t){return new Os(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(s=>o(t(s)))})}onDone(t){this.status=1,this.resolution=t;for(const o of this.waiters)o(t)}onReject(t){}},ym=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:s=>this.onDragStart(e,s),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 s=0,i=t.length;s<i;s++)if(t[s].dragSource===e){const n=t[s];o.dragSvc?.removeDragSource(n),t.splice(s,1);break}}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:o}=this,s=o.dragSvc;for(const i of e)s?.removeDragSource(i);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 s=this.dropTargetEvent(o,e,!1);o.onDragStop?.(s)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:o}=this;if(e?.onDragCancelled?.(),t&&o){const s=this.dropTargetEvent(t,o,!1);t.onDragCancel?.(s)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const o=this.findCurrentDropTarget(e),{lastDropTarget:s,dragSource:i,dragItem:n}=this;let r=!1;if(o!==s){if(r=!0,s){const a=this.dropTargetEvent(s,e,t);s.onDragLeave?.(a)}if(s!==null&&!o?this.handleExit(i,n):s===null&&o&&this.handleEnter(i,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?.(),s=o?.length;if(!s)return[[t]];const i=new Array(s+1);i[0]=[t];for(let n=0;n<s;++n)i[n+1]=o[n];return i}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let s=!1;const i=(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(i(e,a)){s=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:s&&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 s=t.length;if(s===0)return null;if(s===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 s=0;for(let i=0,n=o.length;i<n;++i){const r=o[i];if(r.getContainer()===t){r.external&&--this.externalDropZoneCount;continue}s!==i&&(o[s]=r),++s}o.length=s}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){const t=this.dropTargets;for(let o=0,s=t.length;o<s;++o){const i=t[o];if(i.external&&i.getContainer()===e)return i}return null}dropTargetEvent(e,t,o){const{dragSource:s,dragItem:i,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:s,fromNudge:o,dragItem:i,dropZoneTarget:c,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=m,m}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&of(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 s=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!s||!this.isAlive()){this.destroyBean(o);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const i=this.dragImageComp;i!==o&&(this.dragImageComp=o,this.removeDragImageComp(i)),o&&(this.appendDragImageComp(o),this.updateDragImageComp(),this.positionDragImageComp(s))})}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 s=Ca(this.beans);s?s.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:o,lastDraggingEvent:s,dragImageLastLabel:i}=this;if(!e)return;this.setDragImageCompIcon(o?.getIconName?.(s)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(s)),n||(n=""),i!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function Cu(e){return typeof e=="object"&&!!e.component}function Rm(e){return e?e.prototype&&"getGui"in e.prototype:!1}function vu(e,t,o,s){const{name:i}=o;let n,r,a,l,c,d;if(t){const u=t,h=u[i+"Selector"],g=h?h(s):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[i])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var Fm=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,s=!1){return this.getCompDetails(this.gridOptions,e,t,o,s)}getCompDetails(e,t,o,s,i=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=vu(this.beans.frameworkOverrides,e,t,s),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&&!Rm(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:b}=this.beans;i&&(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,s,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,s){const i=!t;let n;i?n=new e:n=this.frameworkCompWrapper.wrap(e,s.mandatoryMethods,s.optionalMethods,s),this.createBean(n);const r=n.init?.(o);return r==null?ie.resolve(n):r.then(()=>n)}mergeParams(e,t,o,s=null,i,n){const r={...o,...i},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,s),n?n(r):r}},Em={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},xm={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Pm={name:"headerComponent",optionalMethods:["refresh"]},Dm={name:"innerHeaderComponent"},Mm={name:"innerHeaderGroupComponent"},Tm={name:"headerGroupComponent"},Im={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Am={name:"loadingCellRenderer",cellRenderer:!0},km={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Lm={name:"tooltipComponent"},ka={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Om={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Gm={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Hm={name:"loadingCellRenderer",cellRenderer:!0},Bm={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Vm={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Nm(e,t){return e.getCompDetailsFromGridOptions(xm,"agDragAndDropImage",t,!0)}function Wm(e,t,o){return e.getCompDetails(t,Pm,"agColumnHeader",o)}function zm(e,t,o){return e.getCompDetails(t,Dm,void 0,o)}function _m(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,Tm,"agColumnGroupHeader",t)}function Um(e,t,o){return e.getCompDetails(t,Mm,void 0,o)}function $m(e,t){return e.getCompDetailsFromGridOptions(Gm,void 0,t,!0)}function Km(e,t){return e.getCompDetailsFromGridOptions(Hm,"agLoadingCellRenderer",t,!0)}function qm(e,t){return e.getCompDetailsFromGridOptions(Bm,"agGroupRowRenderer",t,!0)}function jm(e,t){return e.getCompDetailsFromGridOptions(Vm,"agDetailCellRenderer",t,!0)}function Bl(e,t,o){return e.getCompDetails(t,Im,void 0,o)}function Vl(e,t,o){return e.getCompDetails(t,Am,"agSkeletonCellRenderer",o,!0)}function wu(e,t,o){return e.getCompDetails(t,km,"agCellEditor",o,!0)}function Ym(e,t,o,s){const i=t.filter;return Cu(i)&&(t={filter:i.component,filterParams:t.filterParams}),e.getCompDetails(t,ka,s,o,!0)}function Qm(e,t,o){return e.getCompDetails(t,Em,"agDateInput",o,!0)}function Zm(e,t){return e.getCompDetails(t.colDef,Lm,"agTooltipComponent",t,!0)}function Jm(e,t,o,s){return e.getCompDetails(t,Om,s,o)}function bu(e,t){return vu(e,t,ka)}function zn(e,t,o){return e.mergeParams(t,ka,o)}var Xm=class extends ym{createEvent(e){return K(this.gos,e)}createDragImageComp(e){const{gos:t,beans:o}=this;return Nm(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:s=>s===1||s===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}};function Su(e){return!!e.operator}var yu="ag-resizer-wrapper",jt=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),eC={tag:"div",cls:yu,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")]},tC=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,s=o/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(s,i,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:o,minWidth:s,width:i,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=s||d,i&&this.setWidth(i),r&&this.setHeight(r),(!i||!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],s=this.getResizerElement(t),i={dragStartPixels:0,eElement:s,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(i),this.resizeListeners.push(i),s.style.pointerEvents="all"):s.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 s=!1;if(typeof e=="string"&&e.includes("%"))Vs(o,e),e=kd(o),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const i=this.getAvailableHeight();i&&e>i&&(e=i)}this.getHeight()!==e&&(s?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?Vs(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 s=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:s.top,r=e?0:i.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-s.bottom}}return o+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:o}=this.config;let s=!1;if(typeof e=="string"&&e.includes("%"))Tt(t,e),e=_i(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:i}=this.offsetParent,n=o?this.position.x:this.element.getBoundingClientRect().left;i&&e+n>i&&(e=i-n)}this.getWidth()!==e&&(s?(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:s}=this.config,i=s?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:o}),this.setPosition(Number.parseFloat(i.style.left),Number.parseFloat(i.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:s,anywhereWithin:i,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!i,r)?0:r,c=this.shouldSkipY(t,!!s,n,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,o,s){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:i.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=s<0&&e.clientX>a+n.left||s>0&&e.clientX<a+n.left:o?l=s<0&&e.clientX>r.right||s>0&&e.clientX<a+n.left:l=s<0&&e.clientX>r.right||s>0&&e.clientX<r.right,l)}shouldSkipY(e,t,o=0,s){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:i.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=s<0&&e.clientY>a+n.top+o||s>0&&e.clientY<a+n.top:l=s<0&&e.clientY>r.bottom||s>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(eC)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${yu}`)?.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:s}=this.config;!o&&!s&&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 s of e){const i=!!s.style.flex&&s.style.flex!=="0 0 auto";if(s===this.element)continue;let n=this.minHeight||0,r=this.minWidth||0;if(i){const a=window.getComputedStyle(s);a.minHeight&&(n=Number.parseInt(a.minHeight,10)),a.minWidth&&(r=Number.parseInt(a.minWidth,10))}else n=s.offsetHeight,r=s.offsetWidth;t+=n,o+=r}return{height:t,width:o}}applySizeToSiblings(e){let t=null;const o=this.getSiblings();if(o){for(let s=0;s<o.length;s++){const i=o[s];i!==t&&(e?i.style.height=`${i.offsetHeight}px`:i.style.width=`${i.offsetWidth}px`,i.style.flex="0 0 auto",i===this.element&&(t=o[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:s,isRight:i,isBottom:n,isLeft:r}=this.currentResizer,a=i||r,l=n||s,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:s}),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=s?-1:1,C=this.getHeight(),v=C+d*m;let w=!1;s?(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 s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:i,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+i,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()}},oC=class extends tC{},W=null;function Nl(e){return typeof e?.getGui=="function"}var ai=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const s=(e||"").split(" ");if(s.length>1){for(const i of s)this.toggleCss(i,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},sC=0,Ps=class extends qe{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=sC++,this.cssManager=new ai(()=>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(Hd):null}applyElementsToComponent(e,t,o,s=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===W)this[t]=s??e;else{const n=o?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const s of e.childNodes??[])o.push(s);for(const s of o){if(!(s instanceof HTMLElement))continue;const i=this.createComponentFromElement(s,n=>{const r=n.getGui();if(r)for(const a of s.attributes??[])r.setAttribute(a.name,a.value)},t);if(i){if(i.addItems&&s.children.length){this.createChildComponentsFromTags(s,t);const n=Array.prototype.slice.call(s.children);i.addItems(n)}this.swapComponentForNode(i,e,s)}else s.childNodes&&this.createChildComponentsFromTags(s,t)}}createComponentFromElement(e,t,o){const s=e.nodeName,i=this.getDataRefAttribute(e),n=s.indexOf("AG-")===0,r=n?this.componentSelectors.get(s):null;let a=null;if(r){const l=o&&i?o[i]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${s}`);return this.applyElementsToComponent(e,i,o,a),a}swapComponentForNode(e,t,o){const s=e.getGui();t.replaceChild(s,o),t.insertBefore(document.createComment(o.nodeName),s),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 s of e)s.setAttribute("tabindex",o.toString())}setTemplate(e,t,o){let s;typeof e=="string"||e==null?s=Sa(e):s=Lo(e),this.setTemplateFromElement(s,t,o)}setTemplateFromElement(e,t,o,s=!1){if(this.eGui=e,this.suppressDataRefValidation=s,t)for(let i=0;i<t.length;i++){const n=t[i];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:s}=this.getContainerAndElement(e,t)||{};!o||!s||s.prepend(o)}appendChild(e,t){const{element:o,parent:s}=this.getContainerAndElement(e,t)||{};!o||!s||s.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;Kp(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 s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}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 Ps{},_n,Un,$n,Kn,kr,Lr,qn;function po(){return _n===void 0&&(_n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),_n}function ws(){return Un===void 0&&(Un=/(firefox)/i.test(navigator.userAgent)),Un}function Ru(){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===""&&!ws())?null:t.toString()}function iC(){if(qn!==void 0)return qn;if(!document.body)return-1;let e=1e6;const t=ws()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const s=e*2;if(o.style.height=s+"px",s>t||o.clientHeight!==s)break;e=s}return o.remove(),qn=e,e}function La(){return Lr==null&&Fu(),Lr}function Fu(){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 Eu(){return kr==null&&Fu(),kr}var Gr=!1,on=0;function nC(e){on>0||(e.addEventListener("keydown",sn),e.addEventListener("mousedown",sn))}function rC(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 aC(e){const t=Pe(e);return nC(t),on++,()=>{on--,rC(t)}}function xu(){return Gr}function To(e,t,o=!1){const s=$p;let i=Ad;t&&(i+=", "+t),o&&(i+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(s)).filter(l=>vt(l)),r=Array.prototype.slice.apply(e.querySelectorAll(i));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(n,r):n}function Ho(e,t=!1,o=!1,s=!1){const i=To(e,s?".ag-tab-guard":null,o),n=t?he(i):i[0];return n?(n.focus({preventScroll:!0}),!0):!1}function $o(e,t,o,s){const i=To(t,o?':not([tabindex="-1"])':null),n=ve(e);let r;o?r=i.findIndex(l=>l.contains(n)):r=i.indexOf(n);const a=r+(s?-1:1);return a<0||a>=i.length?null:i[a]}function Pu(e,t=5){let o=0;for(;e&&Or(e)===null&&++o<=t;)e=e.parentElement;return Or(e)===null?null:e}var lC="ag-focus-managed",Du=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:s=>{if(s.defaultPrevented)return;const i=$o(this.beans,this.eFocusable,!1,s.shiftKey);i&&(i.focus(),s.preventDefault())},...o}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(lC),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)}})}},Mu="__ag_Grid_Stop_Propagation";function Bo(e){e[Mu]=!0}function zt(e){return e[Mu]===!0}var Oa={isStopPropagation:zt,stopPropagation:Bo},li=class extends Du{constructor(e,t){super(e,Oa,t)}},cC={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 nf(e,cC,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 Tu(e,t,o,s){let i=ft(e,o);if(typeof t=="function"){const n=ft(e,s);i=t({filterOptionKey:s,filterOption:n,placeholder:i})}else typeof t=="string"&&(i=t);return i}var dC=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 li(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new oC(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:s,state:i,additionalEventAttributes:n}=t;s==="colDef"&&this.updateParams(t,o);const r=this.state;this.state=i;const a=n?.fromAction;return(a&&a!=="apply"||i.model!==r.model||!this.areStatesEqual(i.state,r.state))&&this.setModelIntoUi(i.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:s}=this.params;return t().doesFilterPass({...e,model:o,handlerParams:this.beans.colFilter.getHandlerParams(s)})}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:s}}=this;if(!o)return!1;const i=!this.areModelsEqual(t.model,s);return i&&t.onAction("apply",e),i}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const o=this.getModelFromUi(),s={model:o,state:this.getState(),valid:this.canApply(o)};this.state=s;const{params:i,gos:n,eventSvc:r,applyActive:a}=this;i.onStateChange(s),i.onUiChange(this.getUiChangeEventParams()),n.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:i.column,filterInstance:this}),s.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 s=e==="floatingFilter"||e==="columnFilter";s?(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(s)}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 Ps{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 uC(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var zl="row-group-",Ba="t-",Va="b-",hC=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=hC++,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:s}=this.beans,i=this.data;this.data=e,o?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,i,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,i,t);this.sibling.__localEventService?.dispatchEvent(a)}s.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,i,t)),s.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,s=o?.createDaemonNode?.(this),i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,s));const n=this.createDataChangedEvent(e,i,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=vs(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:s,valueSvc:i,gos:n,editSvc:r}=this.beans;if(e==null)return!1;let a=s.getCol(e)??s.getColDefCol(e);if(!a)return!1;if(!this.group){const d=a.getColDef();d.pivotValueColumn&&(a=d.pivotValueColumn)}const l=i.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=i.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:s,formula:i}=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=s.getValue(n,this,a,r);if(!r&&(i&&n.isAllowFormula()&&i.isFormula(l)&&(l=i.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 s={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};this.__localEventService?.dispatchEvent(s)}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,s=t.length;o<s;++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 s=this.frameworkEventListenerService?.wrap(e,t)??t;o.addEventListener(e,s)}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 s=this.sibling;s&&s._destroy(e)}return!0}};function gC(e,t,o){return K(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var pC=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),fC=(e,t)=>{const o=new co(t);for(const s of Object.keys(e))pC.has(s)||(o[s]=e[s]);return o.oldRowTop=null,o},Hr=(e,t,o)=>{if(!o)return;let s=o.rowIndex;if(s==null)return;s+=t;const i=e.getRowCount();for(;s>=0&&s<i;){const n=e.getRow(s);if(!n||!n.footer&&!n.detail)return n;s+=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:s}=this;t.has(e)||(t.add(e),o.add(e),s.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:s}=this;e.clear(),s.clear(),t.clear(),o.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:o}=this.beans,s=e?.getSortOptions()??[],i=this.order,n=vC(i);if(i.sort((a,l)=>t?.compareRowNodes(s,a,l)||(a.pinnedSibling?.rowIndex??0)-(l.pinnedSibling?.rowIndex??0)),!n)return;const r=nu(o);r==="bottom"||r==="pinnedBottom"?this.order.push(n):this.order.unshift(n)}hide(e){const{all:t,visible:o}=this,s=o.size;return t.forEach(i=>e(i)?o.delete(i):o.add(i)),this.order=Array.from(o),this.sort(),s!=o.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Iu(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(o=>o==e)?Iu(t):!1}function jn(e,t){const{gos:o,rowModel:s,filterManager:i}=e;return xs(o)?!s.getRowNode(t.id):i?.isAnyFilterPresent()?!Iu(t):o.get("pivotMode")?!t.group:!1}function mC(e){return!!e.footer&&e.level===-1}function CC(e){return!!e.pinnedSibling&&mC(e.pinnedSibling)}function vC(e){const t=e.findIndex(CC);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=i=>jn(t,i.pinnedSibling),s=()=>{const i=e.get("isRowPinned");i&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,i(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:i})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(a=>{n||(n=a.hide(o))});const r=this.refreshRowPositions();(!i||r||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(bC),this.refreshRowPositions()},rowNodeDataChanged:({node:i})=>{(e.get("isRowPinnable")?.(i)??!0)||this.pinRow(i,null)},firstDataRendered:s}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(i=>i.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:i})=>{this._grandTotalPinned=i==="pinnedBottom"?"bottom":i==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",s)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const o=[];t.forEach(s=>o.push(s)),o.forEach(s=>this.pinRow(s,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 s=e.rowPinned??e.pinnedSibling?.rowPinned;if(s!=null&&t!=null&&t!=s){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&&SC(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=s=>{if(s.rowHeightEstimated){const i=ro(this.beans,s);s.setRowTop(t),s.setRowHeight(i.height),t+=i.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,s=>{const i=s.pinnedSibling?.id;i!=null&&o.push(i)}),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(const s of e[o]){const i=this.beans.rowModel.getRowNode(s);i?this.pinRow(i,o):t.queue(s)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const o=new Set;e.forEachQueued(s=>{const i=this.beans.rowModel.getRowNode(s);i&&o.add(i)});for(const s of o)e.unqueue(s.id),this.pinRow(s,t)})}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:o}=this;if(!e)return;const s=e.rootNode?.sibling;if(!s)return;const i=s.pinnedSibling,n=i&&this.findPinnedRowNode(i);if(o){if(n&&n.floating!==o&&(Yn(i),n.delete(i)),!n||n.floating!==o){const r=$l(t,s,o);this.getContainer(o).add(r)}}else{if(!n)return;Yn(i),n.delete(i)}}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=s=>wC(this.beans,s);if(e)return t(this.getContainer(e));let o=!1;return this.forContainers(s=>{const i=t(s);o||(o=i)}),o}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function wC(e,t){let o=0,s=!1;return t.forEach((i,n)=>{if(s||(s=i.rowTop!==o),i.setRowTop(o),i.rowHeightEstimated||i.rowHeight==null){const r=ro(e,i).height;s||(s=i.rowHeight!==r),i.setRowHeight(r)}i.setRowIndex(n),o+=i.rowHeight}),s}function $l(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;const s=fC(t,e);s.setRowTop(null),s.setRowIndex(null),s.rowPinned=o;const i=o==="top"?Ba:Va;return s.id=`${i}${o}-${t.id}`,s.pinnedSibling=t,t.pinnedSibling=s,s}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 bC(e){const t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function SC(e,t,o){const{rowSpanSvc:s}=e,i=(o&&s?.isCellSpanning(o,t))??!1;if(o&&i)return s?.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)};Is(this.pinnedBottomRows,t),Is(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const o=s=>{if(s.rowHeightEstimated){const i=ro(this.beans,s);s.setRowTop(t),s.setRowHeight(i.height),t+=i.height,e=!0}};return Is(this.pinnedBottomRows,o),t=0,Is(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 s=vs(this.gos),i=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=s?.({data:d,level:0,rowPinned:t})??i+this.nextId++;if(a.has(u)){D(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const h=zs(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)zs(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 zs(this.getCache(t),e)}forEachPinnedRow(e,t){return Is(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 zs(e,t){return e.cache[t]}function Br(e,t){return zs(e,e.order[t])}function Is(e,t){e.order.forEach((o,s)=>{const i=zs(e,o);i&&t(i,s)})}function Vr(e){return e.order.length}var yC=class extends x{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const o=e.get("enableRowPinning"),s=nu(e),n=!!o||(s==="pinnedBottom"||s==="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()}},RC=500,FC=550,fi,EC=e=>{if(!fi)fi=new WeakSet;else if(fi.has(e))return!1;return fi.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 s=this.onTouchStart.bind(this);this.startListener=s,this.eElement.addEventListener("touchstart",s,{passive:!0})}o.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!EC(e))return;const t=e.touches[0];this.touchStart=t;const o=this.handlers;if(!o.length){const s=this.eElement,i=s.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Di(o,[s,"touchmove",n,l],[i,"touchcancel",a,l],[i,"touchend",r,c],[i,"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}))},FC)}onTouchMove(e){const{moved:t,touchStart:o}=this;if(!t&&o){const s=rs(o,e.touches);s&&!Bd(s,o,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!rs(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||!rs(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const o=this.lastTapTime;o&&t-o>RC&&(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}},xC=1,PC=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=xC++,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:s}=t(this);this.beans[o]=s,this.createdBeans.push(s)}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 s of e)s.preWireBeans?.(o),s.wireBeans?.(o);for(const s of e)s.preConstruct?.();t&&e.forEach(t);for(const s of e)s.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 DC(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var MC=["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(MC.map((e,t)=>[e,t]));function TC(e,t){const o=(e.beanName?Yl[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,s=(t.beanName?Yl[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return o-s}function IC(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}function AC(e){const{rowIndex:t,rowPinned:o,column:s}=e;return`${t}.${o??"null"}.${s.getId()}`}function Na(e,t){const o=e.column===t.column,s=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return o&&s&&i}function kC(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(L(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function LC(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:s,rowModel:i,pageBounds:n}=e;return s?.getPinnedTopRowCount()?o="top":i.getRowCount()?(o=null,t=n.getFirstRow()):s?.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function Zl(e){let t,o=null;const{pinnedRowModel:s,pageBounds:i}=e,n=s?.getPinnedBottomRowCount(),r=s?.getPinnedTopRowCount();return n?(o="bottom",t=n-1):e.rowModel.getRowCount()?t=i.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 es(e,t){const o=e.spannedRowRenderer?.getCellByPosition(t);if(o)return o;const s=e.rowRenderer.getRowByPosition(t);return s?s.getCellCtrl(t.column):null}function OC(e,t,o){const{rowModel:s,pinnedRowModel:i}=e;let n;return n??(n=s?.getRowNode(t)),o?n??(n=i?.getPinnedRowById(t,o)):(n??(n=i?.getPinnedRowById(t,"top")),n??(n=i?.getPinnedRowById(t,"bottom"))),n}function nn(e,t,o=!1){const{rowIndex:s,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(s===0)return i==="top"?null:i==="bottom"&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(o){const l=i?void 0:a.getRow(s);return Au(e,l,!0)??{rowIndex:s-1,rowPinned:i}}return{rowIndex:s-1,rowPinned:i}}function Jl(e,t,o=!1){const{rowIndex:s,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(GC(e,t))return i==="bottom"?null:i==="top"&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(o){const l=i?void 0:a.getRow(s);return Au(e,l)??{rowIndex:s+1,rowPinned:i}}return{rowIndex:s+1,rowPinned:i}}function Au(e,t,o=!1){const{gos:s,rowRenderer:i}=e;if(!t?.sticky||!iu(s))return;const n=i.getStickyTopRowCtrls(),r=i.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 GC(e,t){const{rowPinned:o,rowIndex:s}=t,{pinnedRowModel:i,pageBounds:n}=e;return o==="top"?(i?.getPinnedTopRowCount()??0)-1<=s:o==="bottom"?(i?.getPinnedBottomRowCount()??0)-1<=s:n.getLastRow()<=s}function HC(e,t,o){t.addManagedElementListeners(o,{keydown:s=>{if(!s.defaultPrevented&&!zC(s)&&s.key===R.TAB){const i=s.shiftKey;$o(e,o,!1,i)||bs(e,i)&&s.preventDefault()}}})}function BC(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function pt(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function si(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function bs(e,t,o=!1){const s=e.ctrlsSvc.get("gridCtrl"),i=s.focusNextInnerContainer(t);return i===!0?!0:i===!1?i:((o||!t&&!s.isDetailGrid()&&s.isFocusInsideGridBody())&&s.forceFocusOutOfContainer(t),!1)}function VC(e,t){const o=e.focusSvc,s=o.getFocusedCell();if(s&&t&&Na(s,t)){const{rowIndex:i,rowPinned:n,column:r}=t;fa(e)&&o.setFocusedCell({rowIndex:i,column:r,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!xu()})}}function NC(e,t){const o=e.getFocusableContainerName();return o==="gridBody"?t():ku(e,()=>To(e.getGui(),".ag-tab-guard").length>0)?o:null}function ku(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var WC="__ag_Grid_Skip_Focusable_Container";function zC(e){return e[WC]===!0}function lt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Wa(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const s of o){if(!s)continue;const i=s.getGroupRowCount()||0;for(let n=0;n<i;n++){const r=s.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 s=e.colModel.isPivotMode()?$C(e):Ou(e);const i=t.getHeaderCellCtrls();for(const n of i){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>s&&r.isAutoHeaderHeight()&&(s=a)}return s}function za(e){let o=e.colModel.isPivotMode()?UC(e):ci(e);return e.colModel.forAllCols(s=>{const i=s.getAutoHeaderHeight();i!=null&&i>o&&s.isAutoHeaderHeight()&&(o=i)}),o}function ci(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Lu(e){return e.gos.get("floatingFiltersHeight")??ci(e)}function Ou(e){return e.gos.get("groupHeaderHeight")??ci(e)}function UC(e){return e.gos.get("pivotHeaderHeight")??ci(e)}function $C(e){return e.gos.get("pivotGroupHeaderHeight")??Ou(e)}function KC(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function qC(e){return e?.headerRowIndex!=null}var jC=class extends x{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:s}=this,{headerNavigation:i,touchSvc:n,ctrlsSvc:r}=s;i&&this.createManagedBean(new li(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,s),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,s)}),this.onPivotModeChanged(s),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),s=za(e);e.filterManager?.hasFloatingFilters()&&(t+=Lu(e)),t+=o,t+=s;const i=e.environment.getHeaderRowBorderWidth(),n=t+i;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(s=>s.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",o)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,s=o!==t?"LEFT":"RIGHT",{beans:i}=this,{headerNavigation:n,focusSvc:r}=i;(n.navigateHorizontally(s,!0,e)||!o&&r.focusOverlay(!1)||bs(i,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:{L(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case R.UP:t="UP";case R.DOWN:{L(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:s}=this;!t&&o.contains(ve(s))||o.contains(t)||(s.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){const{menuSvc:s,ctrlsSvc:i}=this.beans;if(!e&&!o||!s?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===i.getHeaderRowContainerCtrl()?.eViewport)&&s.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,s=t.bodyWidth,i=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=s+i+n:(r=s,this.addSpacer&&(this.gos.get("enableRtl")?i:n)===0&&o.verticalScrollShowing&&(r+=o.getScrollbarWidth())),this.callback(r)}},Ds=class extends x{};function di(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var Ua=class extends x{constructor(e,t,o,s){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=s,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"),s=L(this.columnOrGroup.getOldLeft());t?.isActive()&&s&&!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:s}=this.beans;if(!Le(o,"print")||e.getPinned()==="left")return t;const n=s.getColsLeftWidth();if(e.getPinned()==="right"){const r=s.bodyWidth;return n+r+t}return n+t}setLeft(e){if(L(e)&&(this.eCell.style.left=`${e}px`),Fe(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Np(this.ariaEl,t.length)}}},YC="ag-column-first",QC="ag-column-last";function Gu(e,t,o,s){return we(e)?[]:JC(e.headerClass,e,t,o,s)}function Hu(e,t,o){e.toggleCss(YC,o.isColAtEdge(t,"first")),e.toggleCss(QC,o.isColAtEdge(t,"last"))}function ZC(e,t,o,s){return K(t,{colDef:e,column:o,columnGroup:s})}function JC(e,t,o,s,i){if(we(e))return[];let n;if(typeof e=="function"){const r=ZC(t,o,s,i);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var XC=0,Bu="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()+"-"+XC++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,o,s,i){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,o,s,i),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,s=o.getDefinition(),i=s?.suppressHeaderKeyboardEvent;if(!L(i))return!1;const n=K(this.gos,{colDef:s,column:o,headerRowIndex:t,event:e});return!!i(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 s=this.getHeaderClassParams();o=t(s)}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:s}=e,{beans:i}=this,n=u=>{if(!this.isAlive()||!s.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(i)?.contains(t),S=w==0;if(y||S){Pr(()=>n(u+1),"raf",i);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(),s.addDestroyFunc(()=>d()),s.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),s.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),o&&o(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:s}=this;!e||!t||!s||(Hu(e,t,o.visibleCols),Td(s,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)&&mu(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 s=e.key===R.LEFT!==t.get("enableRtl");const i=o.getPinned(),n=t.get("enableRtl");return i&&n!==(i==="right")&&(s=!s),(s?-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=Bu,{eGui:o,gos:s}=this;Go(s,o,t,this),e.addDestroyFunc(()=>Go(s,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 s=e??t,{menuSvc:i,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&s.preventDefault(),i?.isHeaderContextMenuEnabled(o)&&i.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}},ev=class extends $a{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,o,s,i){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=di(this,c,i);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:s,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 li(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 Wm(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:s}=this.beans;return K(s,{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)=>{s.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:s,beans:i}=this;let n=!1;(e.ctrlKey||e.metaKey)&&(n=this.showMenuOnKeyPress(e,!0)),n||(!e.altKey&&us(o)?i.rangeSvc?.handleColumnSelection(t,e):s&&i.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()),xu()&&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=Gu(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(o);for(const i of o)s.has(i)?s.delete(i):this.comp.toggleCss(i,!0);for(const i of s)this.comp.toggleCss(i,!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:s}=this,i=Wa(this.beans),n=i.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(s);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=i.length-c;let u=0;for(let h=0;h<d;h++)u+=i[i.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:s,sortable:i}=this;if(i){const n=this.getLocaleTextFunc(),r=t.sortSvc?.getDisplaySortForColumn(o)??null;s.setAriaSort(Tp(r)),e=n("ariaSortableColumn","Press ENTER to sort")}else s.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;us(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 s=Array.from(o.keys()).sort((i,n)=>i==="filter"?-1:n.charCodeAt(0)-i.charCodeAt(0)).map(i=>o.get(i)).join(". ");e.ariaAnnounce?.announceValue(s,"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=i=>this.handleMouseOverChange(i.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},s=i=>this.handleContextMenuMouseEvent(i,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:s})}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 tv=0,Qn=class extends x{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=tv++,this.comp=null,this.allCtrls=[];let s="ag-header-row-column";o==="group"?s="ag-header-row-group":o==="filter"&&(s="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${s}`}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=di(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:s=>this.onVirtualColumnsChanged(s.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",s=>this.isEnsureDomOrder=s.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 i=0;i<t.length;i++){if(i===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[i]};e+=t[i]}const o=za(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:o};e+=o;const s=Lu(this.beans);return{topOffset:e,rowHeight:s}}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 s of t)this.recycleAndCreateHeaderCtrls(s,this.ctrlsById,e);const o=s=>{const{focusSvc:i,visibleCols:n}=this.beans;return i.isHeaderWrapperFocused(s)?n.isVisible(s.column):!1};if(e)for(const[s,i]of e)o(i)?this.ctrlsById.set(s,i):this.destroyBean(i);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const s=e.getUniqueId();let i;if(o&&(i=o.get(s),o.delete(s)),i&&i.column!=e&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case"filter":{i=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":i=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:i=this.createBean(new ev(e,this));break}t.set(s,i)}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(i=>i.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},ov=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:s,colModel:i,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`;s.register(a,this),i.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:s}=this.beans;let i=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=s.headerGroupRowCount;i=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=i++;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=i++;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(s=>s.column===e);if(lo(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;o<this.groupsRowCtrls.length;o++){const s=t(this.groupsRowCtrls[o]);if(s)return s}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,o){const i=this.getAllCtrls()[e];return i?i.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))}},Oi={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?Oi.AUTO_HEIGHT:t.print?Oi.PRINT:Oi.NORMAL;this.view.updateLayoutClasses(o,t)}},Vu=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",Ru()||Mo())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Eu(),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;hf(this,()=>vt(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},sv={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"}]},iv=class extends Vu{constructor(){super(sv,"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,s=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=s),Tt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=s),Tt(this.eLeftSpacer,i),this.eLeftSpacer.classList.toggle("ag-scroller-corner",i<=s)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),s=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=o?0:s===0&&t?16:s,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Vs(this.getGui(),n),Vs(this.eViewport,n),Vs(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 Ui(this.eViewport,this.enableRtl)}setScrollPosition(e){vt(this.eViewport)||this.attemptSettingScrollPosition(e),$i(this.eViewport,e,this.enableRtl)}},Nu=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)}},nv={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"}]}]},rv=class extends Vu{constructor(){super(nv,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Nu(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,s=t&&e.getScrollbarWidth()||0,i=s===0&&o?16:s;this.toggleCss("ag-scrollbar-invisible",o),Tt(this.getGui(),i),Tt(this.eViewport,i),Tt(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const o=e.getGridBodyCtrl().eBodyViewport,s=this.getScrollPosition(),i=o.scrollTop;s!=i&&this.setScrollPosition(i,!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,av=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);$i(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 s=Ui(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(s),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:s}=this;s?.setScrollTop(o),this.nextScrollTop=o,s?.active?s.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 s=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),$i(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:s}=this;return{top:s,bottom:s+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,s=o.getRowCount();let i=-1;for(let n=0;n<s;n++){const r=o.getRow(n);if(typeof e=="function"){if(r&&e(r)){i=n;break}}else if(e===r||e===r.data){i=n;break}}i>=0&&this.ensureIndexVisible(i,t)}ensureIndexVisible(e,t,o=0){if(Le(this.gos,"print"))return;const{rowModel:s}=this.beans,i=s.getRowCount();if(typeof e!="number"||e<0||e>=i){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=s.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,G=S.bottom+F,k=G-E,O=a.getScrollPositionForPixel(b),P=a.getScrollPositionForPixel(y-k),A=Math.min((O+P)/2,b),M=E+f>b,J=G-m<y;let T=null;t==="top"?T=O-f:t==="bottom"?T=P+m:t==="middle"?T=A:M?T=O-f:J&&(P-O>k?T=O-f:T=P+m),T!==null&&(this.setVerticalScrollPosition(T),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>=s.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:s}=this.beans,i=o.getCol(e);if(!i||i.isPinned()||!this.visibleCols.isColDisplayed(i))return;const n=this.getPositionedHorizontalScroll(i,t);s.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:s}=this.isColumnOutsideViewport(e),i=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?o:s)||i,l=r?s: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:s,colRight:i}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>i:o<i,a=n?o<s:t>s;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,s=e.getActualWidth(),i=e.getLeft(),n=t?-1:1,r=t?o-i:i,a=r+s*n,l=r+s/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,s=e+t;return{start:o,end:s,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 lv(e,t,o=La()||0,s,i){return Wu(e,t,"horizontal",o,s,i)}function cv(e,t,o=La()||0,s,i){return Wu(e,t,"vertical",o,s,i)}function Wu(e,t,o,s,i,n){const r=oc[o],a=oc[r.opposite],l=i?vt(i):!0,c=n?vt(n):!0,d=r.overflow(e);if(d<=0)return!1;if(!t||s===0)return!0;const u=a.overflow(t);if(u<=0)return!0;if(d<=s){if(l&&c&&dv({candidateOverflow:u,candidateScrollSize:a.scrollSize(t),candidateClientSize:a.clientSize(t),scrollbarWidth:s}))return!1;const h=r.clientSize(e)+s;return r.scrollSize(e)<=h}return!0}function dv({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:o,scrollbarWidth:s}){if(e<=0||e>s)return!1;const i=o+s;return t>o&&t<=i}var uv=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,s=()=>{qt(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(s),o.registerBodyViewportResizeListener(s)}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(),s=e.getViewportScrollLeft();t.colViewport.setScrollPosition(o,s)}};function zu(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function Gi(e,t,o,s){const i=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return _u(e,t,o,s,i)}function hv(e,t,o,s){const i=t?.suppressMouseEventHandling;return _u(e,void 0,o,s,i)}function _u(e,t,o,s,i){return i?i(K(e,{column:t,node:o,event:s})):!1}function Uu(e,t,o){let s=t;for(;s;){const i=su(e,s,o);if(i)return i;s=s.parentElement}return null}var rn="cellCtrl";function qa(e,t){return Uu(e,t,rn)}var an="renderedRow";function gv(e,t){return Uu(e,t,an)}function Nr(e,t,o,s,i){const n=s?s.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=K(e,{event:t,editing:i,column:s,node:o,data:o.data,colDef:s.getColDef()});return!!(n&&n(r))}function pv(e){const{pinnedRowModel:t,rowModel:o,rangeSvc:s,visibleCols:i}=e;if(!s||i.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),s.setCellRange({rowStartIndex:0,rowStartPinned:a,rowEndIndex:c,rowEndPinned:l})}var fv=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";qi("pointerdown")?e="pointerdown":qi("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const o of t){const s=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:s})}}processMouseEvent(e,t){if(!Xs(this.beans,t)||zt(t))return;const{cellCtrl:o,rowCtrl:s}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o?.column&&o.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,s,o)):(o&&o.onMouseEvent(e,t),s&&s.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:qa(t,e),rowCtrl:gv(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):s?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,o){const s=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!Nr(this.gos,o,e.rowNode,e.column,s)&&t==="keydown"&&(!s&&this.beans.navigation?.handlePageScrollingKey(o)||e.onKeyDown(o),this.doGridOperations(o,s),zu(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:s}=e,{focusSvc:i,navigation:n}=this.beans,a=i.getFocusedCell()?.column;if(!Nr(this.gos,o,s,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||!Xs(this.beans,e))return;const o=mu(e),{clipboardSvc:s,undoRedo:i}=this.beans;if(o===R.A)return this.onCtrlAndA(e);if(o===R.C)return this.onCtrlAndC(s,e);if(o===R.D)return this.onCtrlAndD(s,e);if(o===R.V)return this.onCtrlAndV(s,e);if(o===R.X)return this.onCtrlAndX(s,e);if(o===R.Y)return this.onCtrlAndY(i);if(o===R.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:s},gos:i}=this;o&&ao(i)&&!Wf(i)&&t.isRowsToRender()?pv(this.beans):s&&s.selectAllRowNodes({source:"keyboardSelectAll",selectAll:cu(i)}),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")}},mi=e=>e.topRowCtrls,Ci=e=>e.getStickyTopRowCtrls(),vi=e=>e.getStickyBottomRowCtrls(),wi=e=>e.bottomRowCtrls,bi=e=>e.allRowCtrls,Xn=e=>e.getCtrls("top"),er=e=>e.getCtrls("center"),tr=e=>e.getCtrls("bottom"),mv={center:{type:"center",name:"center-cols",getRowCtrls:bi,getSpannedRowCtrls:er},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:bi,getSpannedRowCtrls:er},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:bi,getSpannedRowCtrls:er},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:bi},topCenter:{type:"center",name:"floating-top",getRowCtrls:mi,getSpannedRowCtrls:Xn},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:mi,getSpannedRowCtrls:Xn},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:mi,getSpannedRowCtrls:Xn},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:mi},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Ci},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Ci},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Ci},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Ci},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:vi},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:vi},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:vi},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:vi},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:wi,getSpannedRowCtrls:tr},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:wi,getSpannedRowCtrls:tr},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:wi,getSpannedRowCtrls:tr},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:wi}};function $u(e){return`ag-${ui(e).name}-viewport`}function Ku(e){const t=ui(e);return t.container??`ag-${t.name}-container`}function Cv(e){return`ag-${ui(e).name}-spanned-cells-container`}function ui(e){return mv[e]}var vv=["topCenter","topLeft","topRight"],wv=["bottomCenter","bottomLeft","bottomRight"],bv=["center","left","right"],Sv=["center","left","right","fullWidth"],yv=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Rv=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Fv=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],qu=["stickyTopCenter","stickyTopLeft","stickyTopRight"],ju=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Ev=[...qu,"stickyTopFullWidth",...ju,"stickyBottomFullWidth"],xv=[...vv,...wv,...bv,...qu,...ju],Pv=class extends x{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=ui(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new uv(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,s){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=s,this.createManagedBean(new fv(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:i,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(Rv,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(Fv,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(Sv,()=>this.createManagedBean(new Nu(this.eContainer,this.name==="center"?s:void 0))),n&&this.forContainers(xv,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(yv,()=>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:s=>this.onDisplayedRowsChanged(s.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const s=this.options.getSpannedRowCtrls(e);s&&this.comp.setSpannedRowCtrls(s,!1)}})}listenOnDomOrder(){if(Ev.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),s=Le(this.gos,"print");this.comp.setDomOrder(o||s)};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 Zs(this.eViewport)}getCenterViewportScrollLeft(){return Ui(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Kt(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Od(this.eViewport)}getViewportScrollLeft(){return Ui(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:o}=this,s=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:i}=e,n=i.getGridBodyCtrl()?.eBodyViewport,r=i.get("fakeHScrollComp")?.getGui(),a=i.get("fakeVScrollComp")?.getGui();return s||lv(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){$i(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"),i=this.gos.get("embedFullWidthRows")||o,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!i&&a:i||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},Dv="ag-force-vertical-scroll",Mv="ag-selectable",Tv="ag-column-moving",Iv=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,s,i,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=s,this.eBottom=i,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=o.querySelector(`.${$u("center")}`),this.eFullWidthContainer=o.querySelector(`.${Ku("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 av(o)),this.beans.rowDragSvc?.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,o,i,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(s),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,s=Eu()?16:0,i=`calc(100% + ${o+s}px)`;qt(this.beans,()=>this.comp.setBodyViewportWidth(i)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:o}=this;let s=o.get("treeData");if(!s){const i=t.isPivotMode();s=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(s?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:o=>{const{target:s}=o,i=Eo(s,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:o=>{const{target:s,relatedTarget:i}=o,n=t.contains(i),r=Eo(i,"ag-root",t);Eo(s,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Tv,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Mv,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,s=o===-1?-1:e+o;this.comp.setRowCount(s)}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,s=e.get("alwaysShowVerticalScroll"),i=s?Dv:null,n=Le(e,"normal");t.setAlwaysVerticalScrollClass(i,s);const r=o.get("center")?.eViewport,a=o.get("fakeHScrollComp")?.getGui(),l=o.get("fakeVScrollComp")?.getGui();return s||n&&cv(this.eBodyViewport,r,void 0,l,a)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const s=()=>{const i=o&&cs(this.gos)&&!e.stretching,n=i?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,i)};s(),this.addManagedEventListeners({heightScaleChanged:s}),this.addManagedPropertyListener("animateRows",s),this.addManagedEventListeners({stylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,s())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:s,eBottom:i,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,s,i])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:s}=e;(s||Math.abs(t)>Math.abs(o))&&Xs(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:s}=e;(s||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:s}=e||t;(s===this.eBodyViewport||s===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(),s=e?.getPinnedBottomTotalHeight(),i=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=i-n,a=o?r+o:0,l=s?r+s: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 s=0;t>0&&(s+=t),o>0&&(s+=o),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,s=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=s+n;o.setStickyBottomBottom(`${r}px`)}};function it(e){return Lo(e)}var ps={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Yu=class extends qe{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:o,eTopGuard:s,eBottomGuard:i,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=s,this.eBottomGuard=i,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 Du(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),s=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(s===-1)return;let i,n;e?(i=0,n=s):(i=s+1,n=o.length);const r=o.slice(i,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}},Av=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:s,stopPropagationCallbacks:i}=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 Yu({comp:r,focusTrapActive:a,eTopGuard:t,eBottomGuard:o,eFocusableElement:s,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:C},i))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Pe(this.beans).createElement("div"),o=e==="top"?ps.TAB_GUARD_TOP:ps.TAB_GUARD_BOTTOM;return t.classList.add(ps.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:s}=this;s?s.before(t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;_t(e),_t(t),super.destroy()}},kv=class extends Ps{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new Av(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)}},Lv=class extends kv{initialiseTabGuard(t){super.initialiseTabGuard(t,Oa)}},sc=(e,t)=>ku(e,()=>Ho(e.getGui(),t,!1,!0)),ic=e=>e?.getFocusableContainerName()??"external",Ov=e=>e==null?"external":typeof e=="string"?e:"gridBody",Gv=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:s,ctrlsSvc:i}=this.beans;s?.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()),i.register("gridCtrl",this)}isDetailGrid(){return Pu(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:s}=this.getNextFocusableIndex(t,e),i=o===-1?e?t.length-1:0:s,{gos:n,beans:{focusSvc:r,navigation:a}}=this,l=n.getCallback("tabToNextGridContainer");if(l){const c=r.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:i}),d=ic(t[i]),u=c==null&&d==="gridBody"?"gridBody":Ov(c),h=l({backwards:e,previousContainer:ic(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){Ud(`tabToNextGridContainer - ${h} container not found`);return}return sc(g,e)?!0:void 0}return qC(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:i})||void 0}focusInnerElement(e){const{gos:t,beans:o,beans:{focusSvc:s,visibleCols:i}}=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:s.focusGridView({column:he(i.allCols),backwards:!0});const a=i.allCols;if(t.get("headerHeight")===0||pt(o)){if(s.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 s.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:s}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:o,nextIndex:s})||this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!si(e)||!pt(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const o=ve(this.beans),s=e.findIndex(i=>i.getGui().contains(o));return{indexWithFocus:s,nextIndex:s+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:o,beans:{focusSvc:s,visibleCols:{allCols:i}}}=this;return e?s.focusGridView({column:he(i),backwards:!0}):t.get("headerHeight")===0||pt(o)?s.focusGridView({column:i[0]}):s.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:o,indexWithFocus:s}=e,i=t?-1:1;for(let n=e.nextIndex;n>=0&&n<o.length;n+=i){const r=o[n];if(r.getFocusableContainerName()==="gridBody"&&(s===-1||(t?s>n:s<n))){if(this.focusGridBodyDefault(t))return!0;continue}if(sc(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(){}},Hv=(e,t)=>e.eventSvc.dispatchEvent(t),Qu=class{};Reflect.defineProperty(Qu,"name",{value:"GridApi"});var Bv=class extends x{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Qu,this.fns={...or,dispatchEvent:Hv},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:s}=this;o!==or&&(o[e]=s?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:s}}=this;return s?s(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:s}=this;if(!t)D(26,{fnName:e,preDestroyLink:s});else{const i=nc[e];o.assertModuleRegistered(i,`api.${e}`)&&D(27,{fnName:e,module:i})}}destroy(){super.destroy(),this.fns=or,this.beans=null}};function Zu(e){return e.context.getId()}function Vv(e){e.gridDestroySvc.destroy()}function Nv(e){return e.gridDestroySvc.destroyCalled}function Wv(e,t){return e.gos.get(t)}function zv(e,t,o){Ju(e,{[t]:o})}function Ju(e,t){e.gos.updateGridOptions({options:t})}function _v(e,t){const o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}function Uv(e,t,o){const s=Je(e,t,o);if(s){const{className:n}=s;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return s}const i=it({tag:"span"});return i.appendChild(s),i}function Je(e,t,o){let s=null;e==="smallDown"?D(262):e==="smallLeft"?D(263):e==="smallRight"&&D(264);const i=o?.getColDef().icons;if(i&&(s=i[e]),t.gos&&!s){const n=t.gos.get("icons");n&&(s=n[e])}if(s){let n;if(typeof s=="function")n=s();else if(typeof s=="string")n=s;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),it({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var $v={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},Kv=class extends ye{constructor(e,t,o){super($v),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:s,gos:i}=this,n=o.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(s,0,0),n){const a=K(i,{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)}},qv=".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)}",jv={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"}]}]},Yv=class extends ye{constructor(){super(),this.dragSource=null,this.eIcon=W,this.eLabel=W,this.eGhost=W,this.registerCSS(qv)}postConstruct(){const e=t=>Uv(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(jv),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:o,eIcon:s,dragSource:i,dropIconMap:n,gos:r}=this;Xe(s);let a=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),a=n[e],o.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),s.classList.toggle("ag-shake-left-to-right",t),!(a===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&s.appendChild(a)}setLabel(e){this.eLabel.textContent=e}};function Qv(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function Zv(e,t){const o=e.dragAndDrop?.findExternalZone(t.getContainer());o&&e.dragAndDrop?.removeDropTarget(o)}function Jv(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function Xv(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function ew(e,t){const o=e.rowDropHighlightSvc;if(!o)return;const s=t?.row;let i=t?.dropIndicatorPosition;i!=="above"&&i!=="below"&&i!=="inside"&&(i="none");const n=s?.rowIndex;n==null||i==="none"?o.clear():o.set(s,i)}var Xu=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},tw=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const o=t.pointerId;if(!Xu(e,o))return null;const s={eElement:e,pointerId:o,onLost(i){sw(s,i)}};return e.addEventListener("lostpointercapture",s.onLost),s},ow=e=>{if(!e)return;eh(e);const{eElement:t,pointerId:o}=e;if(t){try{t.releasePointerCapture(o)}catch{}e.eElement=null}},eh=e=>{const{eElement:t,onLost:o}=e;t&&o&&(t.removeEventListener("lostpointercapture",o),e.onLost=null)},sw=(e,t)=>{eh(e);const{eElement:o,pointerId:s}=e;o&&t.pointerId===s&&Xu(o,s)},qo,ts,sr={passive:!0},Qt={passive:!1},Rt=e=>{if(!ts)ts=new WeakSet;else if(ts.has(e))return!1;return ts.add(e),!0},iw=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,s=t.length;o<s;++o){const i=t[o];if(i.params===e){t.splice(o,1),rc(i);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:o}=e,s=[];let i;if(o){const c=t.style;c&&(i=c.touchAction,c.touchAction="none")}const n={handlers:s,params:e,oldTouchAction:i};this.dragSources.push(n),Di(s,[t,"pointerdown",c=>this.onPointerDown(e,c),Qt],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");o&&!l&&Di(s,[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&&Xs(this.beans,e)&&!Bs(nr(e))}initDrag(e,...t){this.drag=e;const o=this.beans,s=a=>this.onScroll(a),i=a=>this.onKeyDown(a),n=gt(o),r=Pe(o);Di(e.handlers,[n,"contextmenu",to],[n,"keydown",i],[r,"scroll",s,{capture:!0}],[r.defaultView||window,"scroll",s],...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,ow(e.pointerCapture),Fa(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const o=this.beans;if(ts?.has(t))return;const s=t.pointerType;if(s==="touch"&&(o.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Bs(nr(t))))||!t.isPrimary||s==="mouse"&&t.button!==0)return;this.destroyDrag();const i=gt(o),n=e.eElement,r=t.pointerId,a=new ir(i,e,t,r);qo??(qo=new WeakMap),qo.set(i,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,[i,"pointerup",c],[i,"pointercancel",d],[i,"pointermove",l,Qt],[i,"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)||Bs(nr(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&to(t);return}this.destroyDrag();const s=this.beans,i=gt(s),n=new ir(i,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(s),u=t.target??e.eElement;this.initDrag(n,[u,"touchmove",r,sr],[u,"touchend",a,sr],[u,"touchcancel",l,sr],[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||ts?.has(t)||this.isPointer())return;const o=this.beans;this.destroyDrag();const s=new ir(gt(o),e,t),i=a=>this.onMouseOrPointerMove(a),n=a=>this.onMouseOrPointerUp(a),r=gt(o);this.initDrag(s,[r,"mousemove",i],[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)||rs(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!Rt(e))return;const o=rs(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 s=t.start,n=o.dragStartPixels??4;if(Bd(e,s,n)||(this.dragging=!0,o.capturePointer&&(t.pointerCapture=tw(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:o.eElement}),o.onDragStart?.(s),this.drag!==t)||(o.onDragging?.(s),this.drag!==t))return}o.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&Rt(e)&&this.onUp(rs(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)}},ir=class{constructor(e,t,o,s=null){this.rootEl=e,this.params=t,this.start=o,this.pointerId=s,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},nr=e=>{const t=e.target;return t instanceof Element?t:null},nw=class extends iw{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},rw=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)}},aw={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Si={skipAriaHidden:!0},lw=class extends ye{constructor(e,t,o,s,i,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=o,this.customGui=s,this.dragStartPixels=i,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(aw),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:s,dragAndDrop:i,rowDragSvc:n}=e,r=n?.visibility;let l=!(r==="suppress"||r==="hidden"&&!i?.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&&s.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Si),c||this.setVisible(c,Si),this.setDisabled(!c||r==="disabled"&&!i?.hasExternalDropZones()),l&&this.setDisplayed(l,Si),c&&this.setVisible(c,Si)}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 s=qi("pointerdown")?{pointerdown:to}:{mousedown:to};this.mouseDownListener=this.addManagedElementListeners(t,s)[0]}const o=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:s=>this.getDragItemName(s,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(),s=(e?.dropTarget?.rows.length??o.rowNodes?.length)||1,i=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(i)return i(o,s);if(s!==1)return`${s} ${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)}},cw=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(),s=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(o&&s)return;const i=this.scrollContainer.getBoundingClientRect(),n=this.scrollByTick;this.tickLeft=!s&&e.clientX<i.left+n,this.tickRight=!s&&e.clientX>i.right-n,this.tickUp=!o&&e.clientY<i.top+n,this.tickDown=!o&&e.clientY>i.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)}},Hi=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}},dw=(e,t,o,s)=>{if(!t.size||!e)return!1;let i=!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:s||++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,i=!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,i=!0),--d)}for(const u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,i=!0),++c;return i};function uw(e,t){return qa(e,t.target)?.getFocusedCellPosition()??null}function ac(e,t){const o=Le(e.gos,"normal"),s=t;let i,n;s.clientX!=null||s.clientY!=null?(i=s.clientX,n=s.clientY):(i=s.x,n=s.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,o){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();i+=c.left,n+=l.top}return{x:i,y:n}}var hw=.25,gw=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,s=new cw({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:o,setVerticalPosition:i=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(i),onScrollCallback:()=>{const i=o();if(this.autoScrollOldV!==i){this.autoScrollOldV=i,this.autoScrollChanging=!0;return}const n=this.autoScrollChanging;this.autoScrollChanged=n,this.autoScrollChanging=!1,n&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=s,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(pw)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:o,beans:s}=this;if(t){const a=this.getRowNodes(e);e.dragItem.rowNodes=a,cc(a,!0)}this.lastDraggingEvent=e;const i=e.fromNudge,n=this.makeRowsDrop(o,e,i,!1);s.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&&(!i&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(n),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,o,s){const{beans:i,gos:n}=this,r=this.newRowsDrop(t,s),a=i.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=fw(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=mw(u,r.y),r.yDelta=m,h?.fixRowsDrop(r,g,o,m),this.validateRowsDrop(r,g,s),t.changed||(t.changed=lc(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:o,gos:s}=this,i=o.rowModel.rootNode,n=Se(s)?s.get("rowDragManaged"):!1,r=s.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!i)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:i,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:s,target:i,yDelta:n,inside:r,moved:a,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=s!==i);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 s=o<0?"above":"below";return e?{position:t?"inside":s,fallbackPosition:s}:{position:"none",fallbackPosition:s}}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,s,i){this.beans.groupEditSvc?.clearNewSameParent(e,t);const n=i(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:s||(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&&(i=>e.onDragEnter(this.rowDragEvent("rowDragEnter",i))),onDragLeave:e.onDragLeave&&(i=>e.onDragLeave(this.rowDragEvent("rowDragLeave",i))),onDragging:e.onDragging&&(i=>e.onDragging(this.rowDragEvent("rowDragMove",i))),onDragStop:e.onDragStop&&(i=>e.onDragStop(this.rowDragEvent("rowDragEnd",i))),onDragCancel:e.onDragCancel&&(i=>e.onDragCancel(this.rowDragEvent("rowDragCancel",i)))},s={isInterestedIn:i=>i===2,getIconName:()=>"move",external:!0,...o};t.addDropTarget(s),this.addDestroyFunc(()=>t.removeDropTarget(s))}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,i=e>t.getCurrentPagePixelRange().pageLastPixel?-1:o.getRowIndexAtPixel(e);return i>=0?o.getRow(i):void 0}rowDragEvent(e,t){const o=this.beans,{dragItem:s,dropTarget:i,event:n,vDirection:r}=t,a=i?.rootNode===o.rowModel.rootNode,l=a?i.y:ac(o,t).y,c=a?i.overNode:this.getOverNode(l),d=a?i.overIndex:c?.rowIndex??-1;return{api:o.gridApi,context:o.gridOptions.context,type:e,event:n,node:s.rowNode,nodes:s.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:i}}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 s=vs(this.gos),i=this.beans.rowModel,n=o.filter(({data:a,rowPinned:l})=>!i.getRowNode(s?.({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 i.updateRowData({add:n,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:o,sameGrid:s}=e;let i;for(let n=0,r=o.length;n<r;++n){let a=!0;const l=o[n];(!l||l.footer||s&&l.destroyed&&!l.group||!this.csrmGetLeaf(l))&&(a=!1),a&&t&&!t.canDropRow(l,e)&&(a=!1),a?i?.push(l):i??(i=o.slice(0,n))}return i??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:s,rootNode:i}){let n=!1;const r=new Set;for(const h of o){s&&h.parent!==s&&(h.treeParent=s,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&&es(this.beans,l);if(r.size&&dw(i._leafs,r,t,e==="above")&&(n=!0),!n)return!1;const d=this.beans.rowModel,u=new Hi;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)),pw=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,cc=(e,t)=>{for(let o=0,s=e?.length||0;o<s;++o){const i=e[o];i.dragging!==t&&(i.dragging=t,i.dispatchRowEvent("draggingChanged"))}},fw=(e,t)=>{let o=null,s=t.target;if(s&&t.rows.indexOf(s)<0)return null;const i=t.source;if(!s||!i)return null;let n=s.rowIndex-i.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,s);if(!l)break;a.has(l)||(o=l,--n),s=l}while(n>0);return o},mw=(e,t)=>{const o=e?.rowTop,s=e?.rowHeight??0;if(o==null||!s||s<=0)return"none";const i=t-o,n=s*hw;return i<=n?"above":i>=s-n?"below":"inside"},Cw=class extends x{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const o=t.createManagedBean(new gw(e)),s=this.beans.dragAndDrop;s.addDropTarget(o),t.addDestroyFunc(()=>s.removeDropTarget(o)),this.rowDragFeature=o;const i=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],i),this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:i,columnPivotModeChanged:i,sortChanged:i,filterChanged:i}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,o,s,i,n){return new lw(e,t,o,s,i,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,s,i,n){const r=this.gos;return r.get("rowDragManaged")&&(!Se(r)||r.get("pagination"))?void 0:this.createRowDragComp(o,e,t,s,i,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 s=e.colModel.isPivotMode();return(s||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":s||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"}))}},vw=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,s=e.uiLevel,i=t!==this.position,n=s!==this.uiLevel;this.dragging=!1,(o||i||n)&&(o&&this.clear(),this.uiLevel=s,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:o,target:s,position:i}=t;if(o&&s&&i!=="none"){this.set(s,i),this.dragging=!0;return}}this.dragging&&this.clear()}},th={moduleName:"Drag",version:I,beans:[nw]},ww={moduleName:"DragAndDrop",version:I,dynamicBeans:{dndSourceComp:Kv},icons:{rowDrag:"grip"}},oh={moduleName:"SharedDragAndDrop",version:I,beans:[Xm],dependsOn:[th],userComponents:{agDragAndDropImage:Yv},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},bw={moduleName:"RowDrag",version:I,beans:[vw,Cw],apiFunctions:{addRowDropZone:Qv,removeRowDropZone:Zv,getRowDropZoneParams:Jv,getRowDropPositionIndicator:Xv,setRowDropPositionIndicator:ew},dependsOn:[oh]},Sw={moduleName:"HorizontalResize",version:I,beans:[rw],dependsOn:[th]},yw=":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}}",Rw=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:s}=this;if(o.length===0&&s.length===0){e(),t();return}const i=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),i(o)},0),window.setTimeout(()=>{t(),i(s)},200)})}};function Fw(e,t,o){e.colMoves?.moveColumnByIndex(t,o,"api")}function Ew(e,t,o){e.colMoves?.moveColumns(t,o,"api")}var xw=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:s}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&s?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function Pw(e,t){!t||t.length<=1||t.filter(s=>e.indexOf(s)<0).length>0||t.sort((s,i)=>{const n=e.indexOf(s),r=e.indexOf(i);return n-r})}function Dw(e){const t=[...e];for(const o of e){let s=null,i=o.getParent();for(;i!=null&&i.getDisplayedLeafColumns().length===1;)s=i,i=i.getParent();if(s!=null){const r=!!s.getColGroupDef()?.marryChildren?s.getProvidedColumnGroup().getLeafColumns():s.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function Mw(e,t,o,s){const i=s.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=>i.includes(h));if(r===null)r=d;else if(!ho(d,r))break;const u=Iw(c);(n===null||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}function sh(e){const{isFromHeader:t,fromLeft:o,xPosition:s,fromEnter:i,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=Dw(u));const h=u.slice();Pw(l.getCols(),h);const g=kw({movingCols:h,draggingRight:o,xPosition:s,pinned:r,gos:a,colModel:l,visibleCols:d}),f=Tw(h,l);if(g.length===0)return;const m=g[0];if(f!==null&&(t||!i)&&!n&&(!o&&m>=f||o&&m<=f))return;const v=Mw(g,h,c,d);if(!v)return;const w=v.move;if(!(w>l.getCols().length-h.length))return{columns:h,toIndex:w}}function ih(e){const{columns:t,toIndex:o}=sh(e)||{},{finished:s,colMoves:i}=e;return!t||o==null?null:(i.moveColumns(t,o,"uiColumnMoved",s),s?null:{columns:t,toIndex:o})}function Tw(e,t){const o=t.getCols(),s=e.map(l=>o.indexOf(l)).sort((l,c)=>l-c),i=s[0];return he(s)-i!==s.length-1?null:i}function Iw(e){function t(s){const i=[];let n=s.getOriginalParent();for(;n!=null;)i.push(n),n=n.getOriginalParent();return i}let o=0;for(let s=0;s<e.length-1;s++){let i=t(e[s]),n=t(e[s+1]);[i,n]=i.length>n.length?[i,n]:[n,i];for(const r of i)n.indexOf(r)===-1&&o++}return o}function Aw(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function kw(e){const{movingCols:t,draggingRight:o,xPosition:s,pinned:i,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(b=>b.getColDef().suppressMovable))return[];const c=Aw(a,i),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=s;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:s,ctrlsSvc:i,useHeaderRow:n,skipScrollPadding:r}=e;let a=i.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(o&&(l-=a.getBoundingClientRect().left),s.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=i.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,yi=zr/2,Lw=5,Ow=100,Gw=class extends x{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!L(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},s=o?.columns??[];for(const i of s){const n=i.getPinned();if(i.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 i=t.visibleState,n=(o||[]).filter(r=>i[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,s=!1){const{gos:i,ctrlsSvc:n}=this.beans,r=i.get("suppressMoveWhenColumnDragging");if(s&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!s&&we(e.hDirection))return;const a=Wr({x:e.x,pinned:this.pinned,gos:i,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,a,s):this.handleColumnDragWhileAllowingMovement(e,t,o,a,s)}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 s=e.filter(i=>!i.getColDef().lockVisible);s.length&&this.beans.colModel.setColsVisible(s,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,s,i){const n=this.getAllMovingColumns(e,!0);if(i){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,s)}}handleColumnDragWhileAllowingMovement(e,t,o,s,i){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:s,fromLeft:r,fromEnter:t,fakeEvent:o}),c=ih({...l,finished:i});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let s=null;t?(s=o.columnsInSplit,s||(s=o.columns)):s=o.columns;const i=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return s?s.filter(i):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:s,fromLeft:i,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:i,xPosition:s,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:o,colModel:s}=this.beans,i=o.get("enableRtl"),n=s.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,i),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,i),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:s}=this.beans,i=o.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,i);if(!n||!r||a==null)return;const l=s.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,i);return{fromLeft:h,xPosition:m}}getColumnMoveAndTargetInfo(e,t,o){const s=this.lastHighlightedColumn||{},{firstMovingCol:i,lastMovingCol:n}=Hw(e);if(!i||!n||s.column||!t)return{firstMovingCol:i,...s};const a=this.getPinDirection()==="left";return{firstMovingCol:i,position:a?1:0,column:a!==o?i: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:s,ctrlsSvc:i}=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:s,ctrlsSvc:i})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>dc;return t&&o||e.some(s=>s.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:s,fakeEvent:i,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:n,fromEnter:s,fakeEvent:i}),{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(),s=o+t.getCenterWidth();let i,n;this.gos.get("enableRtl")?(i=e<o+yi,n=e>s-yi):(n=e<o+yi,i=e>s-yi),this.needToMoveRight=i,this.needToMoveLeft=n,n||i?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),Ow),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*Lw,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:s,dragAndDrop:i,gos:n}=this.beans;if(this.failedMoveAttempts<=dc+1||!s)return;if(i.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 s=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!s.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:i,dragAndDrop:n}=this.beans;return i?.setColsPinned(s,t,"uiColumnDragged"),o&&n.nudge(),s.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 Hw(e){const t=e.length;let o,s;for(let i=0;i<t;i++){if(!o){const n=e[i];n.getLeft()!=null&&(o=n)}if(!s){const n=e[t-1-i];n.getLeft()!=null&&(s=n)}if(o&&s)break}return{firstMovingCol:o,lastMovingCol:s}}var Bw=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,s=>{let i;const n=s.gridBodyCtrl.eBodyViewport;switch(o){case"left":i=[[n,s.left.eContainer],[s.bottomLeft.eContainer],[s.topLeft.eContainer]];break;case"right":i=[[n,s.right.eContainer],[s.bottomRight.eContainer],[s.topRight.eContainer]];break;default:i=[[n,s.center.eViewport],[s.bottomCenter.eViewport],[s.topCenter.eViewport]];break}this.eSecondaryContainers=i}),this.moveColumnFeature=this.createManagedBean(new Gw(o)),this.bodyDropPivotTarget=this.createManagedBean(new xw(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 nh(e,t){const o=[],s=[],i=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?i.push(r):a==="left"||a===!0?o.push(r):s.push(r)}),t.get("enableRtl")?[...i,...s,...o]:[...o,...s,...i]}function rh(e,t){let o=!0;return Wt(null,t,s=>{if(!Ve(s))return;const i=s;if(!i.getColGroupDef()?.marryChildren)return;const a=[];for(const h of i.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=i.getLeafColumns().length-1;d>u&&(o=!1)}),o}var Vw=class extends x{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const s=this.beans.colModel.getCols();if(!s)return;const i=s[e];this.moveColumns([i],t,o)}moveColumns(e,t,o,s=!0){const{colModel:i,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=i.getCols();if(!l)return;if(t>l.length-e.length){D(30,{toIndex:t});return}n?.start();const c=i.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Dl(i.getCols(),c,t),r.refresh(o),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:s,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!(!rh(e,t.getColTree())||!(i=>{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 i){const d=n(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const s=this.beans.colModel.getCols().slice();return Dl(s,e,t),s}createBodyDropTarget(e,t){return new Bw(e,t)}moveHeader(e,t,o,s,i){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:s,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=c.focusedHeader;ih({allMovingColumns:h?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:m,pinned:s,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"),(!i.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=Nw(S,b)}else w=o;w&&c.focusHeaderPosition({headerPosition:{...C,column:w}})}}setDragSourceForHeader(e,t,o){const{gos:s,colModel:i,dragAndDrop:n,visibleCols:r}=this.beans;let a=!s.get("suppressDragLeaveHidesColumns");const l=Fe(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>zw(t,r.allCols):()=>Ww(t),dragItemName:o,onDragStarted:()=>{a=!s.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));i.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(f=>!f.getColDef().lockVisible)||[];i.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function Nw(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function Ww(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function zw(e,t){const o=e.getProvidedColumnGroup().getLeafColumns(),s={};for(const a of o)s[a.getId()]=a.isVisible();const i=[];for(const a of t)o.indexOf(a)>=0&&(i.push(a),At(o,a));for(const a of o)i.push(a);const n=[],r=e.getLeafColumns();for(const a of i)r.indexOf(a)!==-1&&n.push(a);return{columns:i,columnsInSplit:n,visibleState:s,containerType:n[0]?.pinned}}var _w={moduleName:"ColumnMove",version:I,beans:[Vw,Rw],apiFunctions:{moveColumnByIndex:Fw,moveColumns:Ew},dependsOn:[oh],css:[yw]},Uw=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 s=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||s.push(o),this.getPreferredWidthForElements(s)}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 s=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,o);s.appendChild(o);const i=Math.ceil(o.getBoundingClientRect().width);return o.remove(),t=t??this.gos.get("autoSizePadding"),i+t}getHeaderCellForColumn(e){let t=null;for(const o of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const s=o.getHtmlElementForColumnHeader(e);s!=null&&(t=s)}return t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const s=document.createElement("div"),i=s.classList;["ag-header-cell","ag-header-group-cell"].some(a=>o.classList.contains(a))?(i.add("ag-header","ag-header-row"),s.style.position="static"):i.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"&&i.add(c)}break}r=r.parentElement}s.appendChild(o),t.appendChild(s)}},ah={moduleName:"AutoWidth",version:I,beans:[Uw]};function $w(e,t,o=!0,s="api"){e.colResize?.setColumnWidths(t,!1,o,s)}function lh(e,t){if(!e||e.length==0)return;const o=t(e[0]);for(let s=1;s<e.length;s++)if(o!==t(e[s]))return;return o}function ch(e,t,o){if(!t.length)return;const s=t.length===1?t[0]:null,i=lh(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:s,source:o})}function Kw(e,t,o){if(!t.length)return;const s=t.length===1?t[0]:null,i=lh(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:s,source:o})}function qw(e,t,o,s){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:s})}function Ss(e,t,o,s,i=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:o,source:s})}var jw=class extends x{constructor(e,t,o,s){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,s=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(s),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:s,groupAfterColumns:i,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=s,this.resizeTakeFromCols=i,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const s=this.normaliseDragChange(t),i=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(i,o,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),o=(l,c)=>l.map(d=>d.getActualWidth()/c),s=this.getColumnsToResize(),i=t(s),n=o(s,i),r={columnsToResize:s,resizeStartWidth:i,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 s={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(s,e,t,o)}resizeColumns(e,t,o,s=!0){const{columnsToResize:i,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:i,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:s,source:o}),s&&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}},Yw=class extends x{constructor(e,t,o,s,i){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=s,this.ctrl=i}postConstruct(){const e=[];let t,o;const s=()=>{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))},i=()=>{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,i(),s())};n(),this.addDestroyFunc(i),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:o,lastResizeAmount:s,resizeStartWidth:i,beans:n}=this,r=this.normaliseResizeAmount(t),a=i+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=Zs(d.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-s)>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",s=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):s&&(t*=-1),t}},Qw=class extends x{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,s){const i=[],{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(i.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;i.push({width:g,ratios:[1],columns:[u]})}}i.length!==0&&this.resizeColumnSets({resizeSets:i,finished:o,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:s}=e;if(!(!t||t.every(d=>Zw(d)))){if(o){const d=t&&t.length>0?t[0].columns:null;Ss(this.eventSvc,d,o,s)}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 k=g[E];b+=k}});const S=1/b;w.forEach((F,E)=>{const G=E===w.length-1;let k;G?k=y:(k=Math.round(g[E]*u*S),y-=k);const O=F.getMinWidth(),P=F.getMaxWidth();k<O?(k=O,m[F.getId()]=!0,C=!0):P>0&&k>P&&(k=P,m[F.getId()]=!0,C=!0),f[F.getId()]=k})}for(const w of h){const b=f[w.getId()];w.getActualWidth()!==b&&(w.setActualWidth(b,s),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(s),u.updateBodyWidths(),h.checkViewportColumns()}const c=r.concat(l);(a||o)&&Ss(this.eventSvc,c,o,s,l)}resizeHeader(e,t,o){if(!e.isResizable())return;const s=e.getActualWidth(),i=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(s+t,i),n);this.setColumnWidths([{key:e,newWidth:r}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,s,i){return new Yw(e,t,o,s,i)}createGroupResizeFeature(e,t,o,s){return new jw(e,t,o,s)}};function Zw(e){const{columns:t,width:o}=e;let s=0,i=0,n=!0;for(const l of t){const c=l.getMinWidth();s+=c||0;const d=l.getMaxWidth();d>0?i+=d:n=!1}const r=o>=s,a=!n||o<=i;return r&&a}var Jw={moduleName:"ColumnResize",version:I,beans:[Qw],apiFunctions:{setColumnWidths:$w},dependsOn:[Sw,ah]},Xw=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)}},eb=class extends $a{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,o,s,i){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,i=di(this,a,i),this.setGui(t,i),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(i),this.setupExpandable(i),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:s,compBean:i}),this.setupUserComp(),this.addHeaderMouseListeners(i,s),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(i,g,t),d?.createRangeHighlightFeature(i,n,e),i.createManagedBean(new Ua(n,t,r)),i.createManagedBean(new Xw(e,n)),u?this.resizeFeature=i.createManagedBean(u.createGroupResizeFeature(e,o,h,n)):e.setResizableDisplayed(!1),i.createManagedBean(new li(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(i,g),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),i.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(i),i.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,s=he(t)===e;if(!o&&!s)return;const i=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=i===1,d=i===0;o&&(l?a=c:r=d),s&&(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 s=o.getInitialValues(t);o.resizeColumns(s,s.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:s}=this.beans,i=this.column,n=i.getProvidedColumnGroup(),r=K(o,{displayName:this.displayName,columnGroup:i,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,c)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>s?.showMenuAfterButtonClick(n,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>s?.showMenuAfterMouseEvent(n,l,"columnMenu",c),eGridHeader:this.eGui}),a=_m(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e,t){const{column:o,comp:s,beans:{rangeSvc:i},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}),s.toggleCss("ag-header-group-cell-selectable",us(n));const c=i?.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=Gu(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(i=>i.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 s of o)this.comp.toggleCss(s,!0)}setupMovingCss(e){const{column:t}=this,s=t.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of s)e.addManagedListeners(n,{movingChanged:i});i()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:o,expandable:s,gos:i,beans:n}=this,r=us(i);if(e.key==R.ENTER){if(r&&!e.altKey)n.rangeSvc?.handleColumnSelection(o,e);else if(s){const a=!o.isExpanded();n.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),a,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t}=this;us(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 tb(e,t,o){e.colGroupSvc?.setColumnGroupOpened(t,o,"api")}function ob(e,t,o){return e.colGroupSvc?.getColumnGroup(t,o)??null}function sb(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function ib(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function nb(e){return e.colGroupSvc?.getColumnGroupState()??[]}function rb(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function ab(e){e.colGroupSvc?.resetColumnGroupState("api")}function lb(e){return e.visibleCols.treeLeft}function cb(e){return e.visibleCols.treeCenter}function db(e){return e.visibleCols.treeRight}function ub(e){return e.visibleCols.getAllTrees()}var dh=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 hb(e,t){for(let o=0;o<t.length;o++){const s=e.indexOf(t[o]);s>=0&&(e[s]=e[e.length-1],e.pop())}}var gb=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:s,colGroupSvc:i,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(s,i),i?.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(s),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),o?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(s,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 s=o.getProvidedColumnGroup().getLevel()+1;s>e&&(e=s);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,s){let i,n;this.gos.get("enableRtl")?(i=t?t[0]:null,n=o?he(o):null):(i=t?he(t):null,n=o?o[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===i,s),r.setFirstRightPinned(r===n,s)}buildTrees(e,t){const o=e.getColsToShow(),s=o.filter(l=>l.getPinned()=="left"),i=o.filter(l=>l.getPinned()=="right"),n=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new dh,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:s,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:i,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=[],s=[],i=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?o.push(n):i.push(n):s.push(n)}this.ariaOrderColumns=o.concat(s).concat(i)}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 s=t.getCols().slice(0),i=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(i){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()}hb(s,n)}for(const n of s)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,s){const i=[];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&&(i.length===0&&n&&s&&s(a)&&i.push(n),i.push(a)),n=a}return i}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 s=this[t[o]];if(s.length)return e?he(s):s[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 s=t==="first";let i;if(Fe(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;i=s?n[0]:he(n)}else i=e;return(s?o[0]:he(o))===i}};function Io(e,t,o){if(e)for(let s=0;s<e.length;s++){const i=e[s];if(Fe(i)){const n=t?i.getDisplayedChildren():i.getChildren();Io(n,t,o)}o(i)}}function ar(e){const t=[];return Io(e,!0,o=>{lo(o)&&t.push(o)}),t}var pb=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,s=>{if(Ve(s)){const i=s.getColGroupDef(),n={groupId:s.getGroupId(),open:i?i.openByDefault:void 0};o.push(n)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:s,visibleCols:i,eventSvc:n}=this.beans;if(!o.getColTree().length)return;s?.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))}i.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),s?.finish()}setColumnGroupOpened(e,t,o){let s;Ve(e)?s=e.getId():s=e||"",this.setColumnGroupState([{groupId:s,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(),s=e.getDisplayedLeafColumns(),i=t==="After"?he(s):s[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](i);if(!r)return null;const a=this.getColGroupAtLevel(r,o);if(a!==e)return a}}getColGroupAtLevel(e,t){let o=e.getParent(),s,i;for(;s=o.getProvidedColumnGroup().getLevel(),i=o.getPaddingLevel(),!(s+i<=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(),s=typeof t=="number";let i=null;return Io(o,!1,n=>{if(Fe(n)){const r=n;let a;s?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(i=r)}}),i}createColumnGroups(e){const{columns:t,idCreator:o,pinned:s,oldDisplayedGroups:i,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(i),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,s,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,s,i,n,r){const a=i.getUniqueKey(t.groupId||null,null),l=Hl(this.beans,t,a),c=new Li(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=uu(this.beans,l.children,o+1,e,s,i,n,r);return c.setChildren(h),c}balanceColumnTree(e,t,o,s){const i=[];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,s);a.setChildren(l),i.push(a)}else{let a,l;for(let c=t;c<o;c++){const d=s.getUniqueKey(null,null),u=Hl(this.beans,null,d),h=new Li(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(i.push(a),e.some(d=>Ve(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}i.push(r)}}return i}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 s=0;s<e.length;s++){const i=e[s];if(Ve(i)){const n=i,r=this.findMaxDepth(n.getChildren(),t+1);o<r&&(o=r)}}return o}balanceTreeForAutoCols(e,t){const o=[];for(const s of e){let i=s;for(let n=t-1;n>=0;n--){const r=new Li(null,`FAKE_PATH_${s.getId()}_${n}`,!0,n);this.createBean(r),r.setChildren([i]),i.originalParent=r,i=r}t===0&&(s.originalParent=null),o.push(i)}return o}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){const i=t[s];if(i.getColGroupDef()&&i.getId()===e.groupId)return{idx:s,group:i}}}createColumnGroup(e,t,o,s,i){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=fu(n,r);let l=o[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),L(l)?l.reset():(l=new oi(e,n,r,s),i||this.createBean(l)),l}mapOldGroupsById(e){const t={},o=s=>{for(const i of s)if(Fe(i)){const n=i;t[i.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 s=o;this.setupParentsIntoCols(s.getChildren(),s)}}},fb={moduleName:"ColumnGroup",version:I,dynamicBeans:{headerGroupCellCtrl:eb},beans:[pb],apiFunctions:{getAllDisplayedColumnGroups:ub,getCenterDisplayedColumnGroups:cb,getColumnGroup:ob,getColumnGroupState:nb,getDisplayNameForColumnGroup:ib,getLeftDisplayedColumnGroups:lb,getProvidedColumnGroup:sb,getRightDisplayedColumnGroups:db,resetColumnGroupState:ab,setColumnGroupOpened:tb,setColumnGroupState:rb}};function Ct(e,t,o){const{colModel:s,rowGroupColsSvc:i,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:g,gos:f}=e,m=s.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,G,k)=>{if(!S)return;const O=gm(F,t.defaultState),P=O("flex").value1,A=O("sort").value1,M=O("sortType").value1,J=io(A)||Ma(M),T=Ut(M),j=Rn(A),se=J?{type:T,direction:j}:void 0;if(hu(e,S,O("hide").value1,se,O("sortIndex").value1,O("pinned").value1,P,o),P==null){const $=O("width").value1;if($!=null){const Z=S.getColDef().minWidth??u.getDefaultColumnMinWidth();Z!=null&&$>=Z&&S.setActualWidth($,o)}}k||!S.isPrimary()||(h?.syncColumnWithState(S,o,O),i?.syncColumnWithState(S,o,O,E),n?.syncColumnWithState(S,o,O,G))},w=(S,F,E)=>{const G=uh(e,o),k=F.slice(),O={},P={},A=[],M=[],J=[];let T=0;const j=i?.columns.slice()??[],se=n?.columns.slice()??[];for(const z of S){const te=z.colId;if(te.startsWith(oo)){A.push(z),J.push(z);continue}if(go(te)){M.push(z),J.push(z);continue}const oe=E(te);oe?(v(oe,z,O,P,!1),At(k,oe)):(J.push(z),T+=1)}const $=z=>v(z,null,O,P,!1);k.forEach($),i?.sortColumns(hc.bind(i,O,j)),n?.sortColumns(hc.bind(n,P,se)),s.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,A,r?.getColumns()?.slice()),Z(z=>a?.getColumn(z)??null,M,a?.getColumns()?.slice()),Cb(t,s,f),c.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),G(),{unmatchedAndAutoStates:J,unmatchedCount:T}};l?.start();let{unmatchedAndAutoStates:b,unmatchedCount:y}=w(t.state||[],m,S=>s.getColDefCol(S));if(b.length>0||L(t.defaultState)){const S=d?.getPivotResultCols()?.list??[];y=w(b,S,F=>d?.getPivotResultCol(F)??null).unmatchedCount}return l?.finish(),y===0}function mb(e,t){const{colModel:o,autoColSvc:s,selectionColSvc:i,eventSvc:n,gos:r}=e,a=o.getColDefCols();if(!a?.length)return;const l=o.getColDefColTree(),c=gu(l),d=[];let u=1e3,h=1e3;const g=w=>{const b=hh(w);we(b.rowGroupIndex)&&b.rowGroup&&(b.rowGroupIndex=u++),we(b.pivotIndex)&&b.pivot&&(b.pivotIndex=h++),d.push(b)};s?.getColumns()?.forEach(g),i?.getColumns()?.forEach(g),c?.forEach(g),Ct(e,{state:d},t);const f=s?.getColumns()??[],v=[...i?.getColumns()??[],...f,...a].map(w=>({colId:w.colId}));Ct(e,{state:v,applyOrder:!0},t),n.dispatchEvent(K(r,{type:"columnsReset",source:t}))}function uh(e,t){const{rowGroupColsSvc:o,pivotColsSvc:s,valueColsSvc:i,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:o?.columns.slice()??[],pivotColumns:s?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},c=cn(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(F,E,G,k)=>{const O=E.map(k),P=G.map(k);if(ho(O,P))return;const M=new Set(E);for(const T of G)M.delete(T)||M.add(T);const J=[...M];a.dispatchEvent({type:F,columns:J,column:J.length===1?J[0]:null,source:t})},h=F=>{const E=[];return n.forAllCols(G=>{const k=d[G.getColId()];k&&F(k,G)&&E.push(G)}),E},g=F=>F.getColId();u("columnRowGroupChanged",l.rowGroupColumns,o?.columns??[],g),u("columnPivotChanged",l.pivotColumns,s?.columns??[],g);const m=h((F,E)=>{const G=F.aggFunc!=null,k=G!=E.isValueActive(),O=G&&F.aggFunc!=E.getAggFunc();return k||O});m.length>0&&qw(a,"columnValueChanged",m,t),Ss(a,h((F,E)=>F.width!=E.getActualWidth()),!0,t),ch(a,h((F,E)=>F.pinned!=E.getPinned()),t),Kw(a,h((F,E)=>F.hide==E.isVisible()),t);const y=h((F,E)=>!ki(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);wb(c,S,t,n,a)}}function cn(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:s}=e,i=t.getColDefCols();if(we(i)||!t.isAlive())return[];const n=o?.columns,r=s?.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 hh(e){const t=(C,v)=>C??v??null,o=e.getColDef(),s=ct(t(o.sort,o.initialSort)),i=s.direction,n=s.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:i,sortType:n,sortIndex:r,hide:a,pinned:l,width:c,flex:d,rowGroup:h,rowGroupIndex:u,pivot:f,pivotIndex:g,aggFunc:m}}function Cb(e,t,o){if(!e.applyOrder||!e.state)return;const s=[];for(const i of e.state)i.colId!=null&&s.push(i.colId);vb(t.cols,s,t,o)}function vb(e,t,o,s){if(e==null)return;let i=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(i.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)?i.splice(r++,0,a):i.push(a)}if(i=nh(i,s),!rh(i,o.getColTree())){D(39);return}e.list=i}function wb(e,t,o,s,i){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=s.getCol(h.colId);g&&c.push(g)}}),c.length&&i.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:o})}var hc=(e,t,o,s)=>{const i=e[o.getId()],n=e[s.getId()],r=i!=null,a=n!=null;if(r&&a)return i-n;if(r)return-1;if(a)return 1;const l=t.indexOf(o),c=t.indexOf(s),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},bb=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(gs(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),gs(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:o,colAutosize:s,rowGroupColsSvc:i,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?uh(t,e):void 0;o?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=om(t,this.colDefs,!0,h,e);en(t,this.colDefCols?.tree,g.columnTree);const f=g.columnTree,m=g.treeDepth,C=gu(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),i?.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"&&s?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const o=this.cols?.tree;this.saveColOrder();const{autoColSvc:s,selectionColSvc:i,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([s,i,n],f,t);const m=Tf(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 s of e)s&&(s.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)},o),s.addColumns(t))}selectCols(e,t){const o=e?.getPivotResultCols()??null;this.showingPivotResult=o!=null;const{map:s,list:i,tree:n,treeDepth:r}=o??t;return this.cols={list:i.slice(),map:{...s},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:s,selectionColSvc:i,gos:n}=e,r=this.isPivotMode()&&!t,a=i?.isSelectionColumnEnabled(),l=If(e),c=s?.columns,d=Lf(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(s=>({colId:typeof s=="string"?s:s.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 s=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:s(h):!1};if(!o.some(u=>s(u))){const u=new Set(o);for(const h of e.list)u.has(h)||o.push(h);e.list=o;return}const i=new Map;for(let u=0;u<o.length;u++){const h=o[u];i.set(h,u)}const n=e.list.filter(u=>!i.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=i.get(C);if(v==null)continue;(f==null||f<v)&&(f=v,m=C);continue}C.forEachLeafColumn(v=>{const w=i.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=nh(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:s}=this.beans;o.refresh(t),s.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=gs(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:s,groupHierarchyColSvc:i}=this.beans;Ts(this.colDefCols?.list,e)||Ts(o?.columns?.list,e)||Ts(s?.columns?.list,e)||Ts(i?.columns?.list,e)||Ts(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:s}=t;if(typeof e=="string"&&o[e])return o[e];for(let a=0;a<s.length;a++)if(Ws(s[a],e))return s[a];const{autoColSvc:i,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return i?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},Sb=".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)}",yb=class extends Ps{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Sb)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:s,disabled:i,labelEllipsis:n}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),o!=null&&this.setLabelWidth(o),n!=null&&this.setLabelEllipsis(n),this.setLabelAlignment(s||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:(Ki(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Qs(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},gh=class extends yb{constructor(e,t,o,s){super(e,t,o),this.className=s}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o,ariaLabel:s}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),o!=null&&this.onValueChange(o),s!=null&&this.setAriaLabel(s),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==""||Ip(e)!==null?Ys(e,""):Ys(e,t??"")}setAriaLabel(e){return Cs(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 Rb(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 gh{constructor(e,t,o="text",s="input"){super(e,e?.template??Rb(s),[],t),this.inputType=o,this.displayFieldTag=s,this.eLabel=W,this.eWrapper=W,this.eInput=W}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:o,className:s}=this;e.classList.add(`${s}-label`),t.classList.add(`${s}-input-wrapper`),o.classList.add(`${s}-input`),this.addCss("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:i,inputWidth:n,inputPlaceholder:r,autoComplete:a,tabIndex:l}=this.config;i!=null&&this.setInputName(i),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 Ki(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 Cs(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Qs(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 s=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.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},Fb=".ag-checkbox-cell{height:100%}",Eb={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},xb=class extends ye{constructor(){super(Eb,[Ya]),this.eCheckbox=W,this.registerCSS(Fb)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,s=t.getInputElement();s.setAttribute("tabindex","-1"),Dd(s,"polite"),this.addManagedListeners(s,{click:i=>{if(Bo(i),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:i=>{Bo(i)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===R.SPACE&&!t.isDisabled()){e.eGridCell===ve(o)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:s,column:i,node:n}=e;if(n.group&&i)if(typeof s=="boolean")t=s;else{const u=i.getColId();u.startsWith(oo)?t=s==null||s===""?void 0:s==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=0?t=s??void 0:o=!1}else t=s??void 0;const{eCheckbox:r}=this;if(!o){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!i?.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:s,value:i}=t,{editSvc:n}=this.beans;if(!o)return;const r={rowNode:s,column:o};n?.dispatchCellEvent(r,null,"cellEditingStarted",{value:i});const a=s.setDataValue(o,e,"ui");n?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:i,newValue:e,valueChanged:a}),a||this.updateCheckbox(t)}},Pb={tag:"div",cls:"ag-skeleton-container"},Db=class extends ye{constructor(){super(Pb)}init(t){const o=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",o),this.addDestroyFunc(()=>Ys(t.eParentOfValue)),Ys(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");Cs(this.getGui(),o)}setupLoading(t){const o=it({tag:"div",cls:"ag-skeleton-effect"}),s=t.node.rowIndex;if(s!=null){const r=75+25*(s%2===0?Math.sin(s):Math.cos(s));o.style.width=`${r}%`}this.getGui().appendChild(o);const i=this.getLocaleTextFunc(),n=t.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");Cs(this.getGui(),n)}refresh(t){return!1}},Mb={moduleName:"CheckboxCellRenderer",version:I,userComponents:{agCheckboxCellRenderer:xb}},Tb={moduleName:"SkeletonCellRenderer",version:I,userComponents:{agSkeletonCellRenderer:Db}};function Ib(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function Ab(e){return e.colModel.getColumnDefs(!0)}function kb(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function Lb(e,t){return e.colModel.getColDefCol(t)}function Ob(e){return e.colModel.getColDefCols()}function Gb(e,t){return Ct(e,t,"api")}function Hb(e){return cn(e)}function Bb(e){mb(e,"api")}function Vb(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function Nb(e){return e.visibleCols.isPinningLeft()}function Wb(e){return e.visibleCols.isPinningRight()}function zb(e,t){return e.visibleCols.getColAfter(t)}function _b(e,t){return e.visibleCols.getColBefore(t)}function Ub(e,t,o){e.colModel.setColsVisible(t,o,"api")}function $b(e,t,o){e.pinnedCols?.setColsPinned(t,o,"api")}function Kb(e){return e.colModel.getCols()}function qb(e){return e.visibleCols.leftCols}function jb(e){return e.visibleCols.centerCols}function Yb(e){return e.visibleCols.rightCols}function Qb(e){return e.visibleCols.allCols}function Zb(e){return e.colViewport.getViewportColumns()}function _r(e,t){if(!e)return;const o=e,s={};for(const i of Object.keys(o)){if(t&&t.indexOf(i)>=0||Nd.has(i))continue;const n=o[i];typeof n=="object"&&n!==null&&n.constructor===Object?s[i]=_r(n):s[i]=n}return s}var Jb=class extends x{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,s,i=!1){const n=e.slice();t?n.sort((l,c)=>o.indexOf(l)-o.indexOf(c)):(o||i)&&n.sort((l,c)=>s.indexOf(l)-s.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],o=[]){const s=[],i={};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=i[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],i[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&s.push(l)}return s}createDefFromGroup(e){const t=_r(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const s=_r(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?o.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=e.isVisible()?void 0:!0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSortDef(),s.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,s}},Xb=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:s,colDelayRenderSvc:i}=this.beans,n=s.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?(i?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(i),!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||s.setLeftValues(t),e.updateBodyWidths&&s.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);Ss(this.eventSvc,m,!0,t,C)}return this.revealColumns(i),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",eS=new RegExp(`[${Qa} ]`),tS=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 s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>xt(i,2)).join("-");return t&&(s+=o+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>xt(i,2)).join(":")),s}function Ri(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 oS(e,t){if(t==null)return $e(e,!1);const o=xt(e.getFullYear(),4),s={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()}`},i=new RegExp(Object.keys(s).join("|"),"g");return t.replace(i,n=>n in s?s[n]():n)}function Bi(e,t=!1){return!!Ke(e,t)}function sS(e){return Bi(e,!0)}function Ke(e,t=!1,o){if(!e||!o&&!tS.test(e))return null;const[s,i]=e.split(eS);if(!s)return null;const n=s.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||!i&&t)return null;if(!i||i==="00:00:00")return c;const[d,u,h]=i.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 _s(e,t,o){if(!t||!e)return;if(!o)return e[t];const s=t.split(".");let i=e;for(let n=0;n<s.length;n++){if(i==null)return;i=i[s[n]]}return i}var iS=["dateTimeString","dateString","text","number","bigint","boolean","date"],nS=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:cS,absolute:dS}}},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:(s,i)=>{const n=t.getColDefCol(o),r=n?.getColDef();if(!n||!r)return 0;const a=s==null?"":e({column:n,node:null,value:s}),l=i==null?"":e({column:n,node:null,value:i});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={},s=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]=s(h)}const i=this.gos.get("dataTypeDefinitions")??{},n={};for(const d of Object.keys(i)){const u=i[d],h=this.processDataTypeDefinition(u,i,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(n[d]=u.dataTypeMatcher),o[d]=s(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 s of iS)delete o[s],o[s]=e[s]??t[s].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,s){let i;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=s[n];const a=t[n];if(r&&a&&(r=a),!fc(e,r,n))return;i=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],s);if(!a)return;i=pc(a,e)}return{...i,groupSafeValueFormatter:mc(i,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:s}=t;s===void 0&&(s=e.cellDataType);const{field:i}=t;if((s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(i,o):!1),this.addFormulaCellEditorToColDef(e,t),!s){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[s];if(!n){D(47,{cellDataType:s});return}return e.cellDataType=s,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,s,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=s=>{t.add(s.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 s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(dr(t,s))return!1;const i=t.type===null?e.type:t.type;if(i){const n=o.get("columnTypes")??{};if(tn(i).some(a=>{const l=n[a.trim()];return l&&dr(l,s)}))return!1}return!dr(e,s)}inferCellDataType(e,t){if(!e)return;let o;const s=this.getInitialData();if(s){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");o=_s(s,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:s}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[i]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(i?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&o?.processResizeOperations(),s.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const s={},i={};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=uS(a,r);d.rowGroup&&d.rowGroupIndex==null&&(s[n]=d),d.pivot&&d.pivotIndex==null&&(i[n]=d),o.push(d)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(s,i)),o.length&&Ct(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:s,pivotColsSvc:i}=this.beans;return s?.restoreColumnOrder(o,e),i?.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const s=Ar(this.beans,o,e.getColId());return e.setColDef(s,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,s){if(e.cellDataType==="object"){const i=l=>l?.cellDataType==null||l?.cellDataType===!0,n=i(t)&&i(o),r=l=>D(48,{property:l,inferred:n,colId:s}),{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:s,formatValueFuncs:i}=this,n=o[t];n&&s.colFilter?.setColDefPropsForDataType(e,n,i[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,s){const i=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:s,formatValue:i,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:s=>Ke(s.newValue&&String(s.newValue)),valueFormatter:s=>s.value==null?"":!(s.value instanceof Date)||isNaN(s.value.getTime())?t("invalidDate","Invalid Date"):$e(s.value,o)??"",dataTypeMatcher:s=>s 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=>Bi(String(o.newValue))?o.newValue:null,valueFormatter:o=>Bi(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&Bi(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"&&sS(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 rS=e=>typeof e=="bigint"||typeof e=="number",aS=e=>e==="number"||e==="bigint";function mc(e,t){if(e.valueFormatter)return o=>{const{node:s,colDef:i,column:n,value:r}=o;if(s?.group){const a=(i.pivotValueColumn??n).getAggFunc();if(a){if(a==="first"||a==="last")return e.valueFormatter(o);const{baseDataType:l}=e;if(aS(l)&&a!=="count"){if(rS(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 lS(e,t,o,s){if(!t[o])return!1;const i=e[o];return i===null?(t[o]=!1,!1):s===void 0?!!i:i===s}function cS(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const o=et(e),s=et(t);return o!=null&&s!=null?o===s?0:o>s?1:-1:0}function dS(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const o=Cc(e),s=Cc(t);return o!=null&&s!=null?o===s?0:o>s?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,s])=>lS(e,t,o,s))}function uS(e,t){const o=hh(e);for(const s of t)delete o[s],s==="rowGroup"?delete o.rowGroupIndex:s==="pivot"&&delete o.pivotIndex;return o}var hS={moduleName:"DataType",version:I,beans:[nS],dependsOn:[Mb]},gS={moduleName:"ColumnFlex",version:I,beans:[Xb]},ph={moduleName:"ColumnApi",version:I,beans:[Jb],apiFunctions:{getColumnDef:Ib,getDisplayNameForColumn:kb,getColumn:Lb,getColumns:Ob,applyColumnState:Gb,getColumnState:Hb,resetColumnState:Bb,isPinning:Vb,isPinningLeft:Nb,isPinningRight:Wb,getDisplayedColAfter:zb,getDisplayedColBefore:_b,setColumnsVisible:Ub,setColumnsPinned:$b,getAllGridColumns:Kb,getDisplayedLeftColumns:qb,getDisplayedCenterColumns:jb,getDisplayedRightColumns:Yb,getAllDisplayedColumns:Qb,getAllDisplayedVirtualColumns:Zb,getColumnDefs:Ab}},pS=class extends x{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:i}=this.beans;return o&&i?i.getHeaderName(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,o){const s=t?.getColGroupDef();return s?this.getHeaderName(s,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,s,i){const n=e.headerValueGetter;if(n){const r=K(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:s,location:i});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 Pp(e.field)}return""}},fS=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:s}=this,i=s.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!i)){if(this.scrollWidth=e,this.scrollPosition=t,s.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=s.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()||mS(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),s=this.viewportLeft-200,i=this.viewportRight+200,n=t<s&&o<s,r=t>i&&o>i;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 L(r)&&r>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:s}=this,i=s.centerCols;return s.getColsForRow(e,i,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=s=>{const i=new Set,n={};for(const r of s){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!i.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();n[d]??(n[d]=[]),n[d].push(a),i.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}extractViewport(){const e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function mS(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var CS=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(i){const n=t(i),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Sa("<span>"+n+"</span>");return}if(n==null){this.eGui=it({tag:"span"});return}this.eGui=n}}return o}},vS={moduleName:"CellRendererFunction",version:I,beans:[CS]},wS=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 s=this.dynamicBeans[e];if(s==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new s(...o)}};function bS(e){return typeof e=="object"&&!!e.getComp}var SS=class extends wS{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:s,selectors:i}=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(bS(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(s);for(const n of i??[])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:s}=this.beans,i=s.frameworkComponent(t,this.gos.get("components"));if(i!=null)return o(i,!0);const n=this.jsComps[t];if(n){const a=s.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)}},yS=23,RS=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===yS&&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}},FS=':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,fh=!1,Vo=(e,t,o,s,i,n,r=!1)=>{if(Za||fh)return;let a=e;s&&(a=`@layer ${CSS.escape(s).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=I,c.textContent=a;const d={rawCss:e,injectedCss:a,el:c,priority:i,isParams:r};let u;for(const h of l){if(h.priority>i)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)},mh=(e,t,o,s)=>{Vo(FS,e,"shared",t,0,o),s?.forEach((i,n)=>i.forEach(r=>Vo(r,e,n,t,0,o)))},ES=(e,t,o,s,i,n)=>{if(Za||fh)return;const r=Pt.grids.get(e);r?r.paramsCss=t:Pt.grids.set(e,{styleContainer:s,paramsCss:t}),Ur(s),t&&o&&Vo(t,s,o,i,2,n,!0)},xS=e=>{const t=Pt.grids.get(e)?.styleContainer;if(!t)return;Pt.grids.delete(e),Array.from(Pt.grids.values()).some(s=>s.styleContainer===t)?Ur(t):(Ur(t,!0),Pt.map.delete(t))},Ur=(e,t=!1)=>{const o=new Set;for(const i of Pt.grids.values())i.styleContainer===e&&o.add(i.paramsCss);const s=Pt.map.get(e)??[];for(let i=s.length-1;i>=0;i--)(t||s[i].isParams&&!o.has(s[i].rawCss))&&(s[i].el.remove(),s.splice(i,1))},Ch=()=>{const e=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map);let t=e.get(I);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(I,t)),t},Pt=Ch(),Ne=e=>new vh(e),Xt="$default",PS=0,vh=class{constructor({feature:e,params:t,modeParams:o={},css:s,cssImports:i}){this.feature=e,this.css=s,this.cssImports=i,this.modeParams={[Xt]:{...o[Xt]??{},...t??{}},...o}}use(e,t,o){let s=this._inject;if(s==null){let{css:i}=this;if(i){const n=`ag-theme-${this.feature??"part"}-${++PS}`;typeof i=="function"&&(i=i()),i=`:where(.${n}) {
|
|
4
4
|
${i}
|
|
@@ -60,4 +60,4 @@ See ${eu(e,t)}`;return Array.isArray(s)?s.concat(n):[s,n]}var D1={1:"Charting Ag
|
|
|
60
60
|
`,KF=class extends $F{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,s)=>{s!==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,s){o!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){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 s=this.extractRowCellValue({column:e,node:o,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(s.valueFormatted??s.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}},qF=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 s=this.getMergedParams(e),i=this.getData(s),n=new Blob(["\uFEFF",i],{type:"text/plain"}),r=s.fileName,a=typeof r=="function"?r(K(this.gos,{})):r;UF(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:s,valueSvc:i,gos:n}=this.beans,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u,valueFrom:h}=e;return new KF({colModel:t,colNames:o,valueSvc:i,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:s,valueFrom:h})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function jF(e,t){return e.csvCreator?.getDataAsCsv(t)}function YF(e,t){e.csvCreator?.exportDataAsCsv(t)}var QF={moduleName:"CsvExport",version:I,beans:[qF],apiFunctions:{getDataAsCsv:jF,exportDataAsCsv:YF},dependsOn:[zF]},ag=class extends qe{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const o="title",s=this.ctrl.getGui();s&&(e!=null&&(e!=""||t)?s.setAttribute(o,e):s.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()}},ZF=1e3,JF=1e3,Uc=100,$c,Fi=!1,XF=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()&&(Fi?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(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&s?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Fi)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<ZF}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(!L(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 s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(o,s)}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 s=t.getGui();this.tooltipComp=t,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&s.classList.add("ag-tooltip-animate"),this.interactionEnabled&&s.classList.add("ag-tooltip-interactive");const i=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:s,ariaLabel:i("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(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Pe(this.beans),{keydown:r=>{s.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:s,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?JF: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(){Fi=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Uc)}unlockService(){Fi=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("Hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},eE=class extends ag{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()}},tE=class extends Ha{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,o=this.getGui();o.textContent=Es(t);const s=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${s}-tooltip`)}},oE=".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}}",Ei=0,sE=200,iE=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:s,skipObserver:i}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:s,keepWithinBounds:!0,skipObserver:i,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:s,keepWithinBounds:i,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-(s||0)*2-d.top),{x:h,y:g}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:s,keepWithinBounds:i,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,n,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:o,event:s}=e,i=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,o);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(o,i.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 i.right-n.left-2}function f(){return i.left-n.left-c}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",o,t,s instanceof MouseEvent?s:void 0)})}shouldRenderUnderOrAbove(e,t,o,s){const i=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+s;return i>r?"under":n>r||n>i?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const s=this.popupList[o],{alignedToElement:i}=s;if(!i)return;const n=["right","left","over","above","under"];for(const r of n)i.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(i.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 s=this.popupList[o];s.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:s,nudgeY:i,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,s&&(d+=s),i&&(u+=i),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(),sE)}}getParentRect(){const e=Pe(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Ld(t)}keepXYWithinBounds(e,t,o){const s=o===0,i=s?"clientHeight":"clientWidth",n=s?"top":"left",r=s?"height":"width",a=s?"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?(s?kd:_i)(c)+c[a]:d[i];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:s,alwaysOnTop:i,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,!!i,o,s),c=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,c,r),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();L(e.style.top)||(e.style.top=`${o.top*-1}px`),L(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,s){const i=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?Cs(e,o):s&&(e.id||(e.id=`popup-component-${Ei}`),Tl(s,e.id)),a.appendChild(e),i.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,o=Pe(t),{wrapperEl:s,eChild:i,closedCallback:n,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=m=>{if(!s.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},i)||d)||(d=!0,s.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(i,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,s){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Ei,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s),Ei=Ei+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const s=this.popupList[o];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(n=>n&&n()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;const i=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=i,s.isAnchored=!0,i}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:s,ePopup:i}=e,n=s.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=o[u]-n[u],f=r(i.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 ie(u=>{d.wrapIncoming(()=>{Sm(()=>{const h=t.getBoundingClientRect(),g=s.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const m=(C,v)=>{const w=r(i.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(i,C.initial+C.initialDiff-b,C.direction);i.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:s}=e,i=o||s;if(!i)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(Zp(a.element,i))return!0}return this.isElementWithinCustomPopup(i.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")),s=o.length,i=this.getWrapper(e);if(!i||s<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==i&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const a=[],l=r.length,u=i.classList.contains("ag-always-on-top")||!l?[...n,...r,i]:[...n,i,...r];for(let h=0;h<=s;h++){const g=u[h];if(o[h]===u[h]||g===i)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)}}},nE=class extends iE{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,o,s,i){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e??{};n({column:r,rowNode:a,ePopup:o,type:t,eventSource:s,mouseEvent:i})}}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:I,beans:[nE]};function Jr(e){return e.get("tooltipShowMode")==="whenTruncated"}var rE=(e,t)=>{const o=e;return typeof o.getTranslatedMessage=="function"?o.getTranslatedMessage(t):e.message},Xr=(e,t,o)=>{const{editModelSvc:s}=e,i=s?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=s?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=i||n;return r?.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},aE=(e,t)=>{if(Jr(e.gos)){if(t.isCellRenderer()){const s=t.column.getColDef();return!!s.showRowGroup||s.cellRenderer==="agGroupCellRenderer"?Js(()=>{const n=t.eGui;return n.querySelector(".ag-group-value")||n.querySelector(".ag-cell-value")||n}):void 0}return Js(()=>{const s=t.eGui;return s.children.length===0?s:s.querySelector(".ag-cell-value")})}},lE=(e,t,o)=>{const{editSvc:s}=e,{column:i}=t,n=aE(e,t),r=()=>s?.isEditing(t)?!1:n?i.isTooltipEnabled()?n():!1:!0;return{shouldDisplayDefault:r,shouldDisplayColumnTooltip:r,shouldDisplayCustomTooltip:o??r}},cE=({beans:e,ctrl:t,value:o,displayFunctions:s,translate:i})=>{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:rE(C,i),location:"cellFormula",shouldDisplay:()=>!!r?.getFormulaError(l,c)}}if(!!!n?.isEditing(t)){const C=Xr(e,t,i);if(C)return{value:C,location:"cellEditor",shouldDisplay:()=>!n?.isEditing(t)&&!!Xr(e,t,i)}}const{shouldDisplayCustomTooltip:u,shouldDisplayColumnTooltip:h}=s;if(o!=null)return{value:o,location:"cell",shouldDisplay:u};const g=l.getColDef(),f=c.data;if(g.tooltipField&&L(f))return{value:_s(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},dE=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,s){e&&t.destroyBean(e);const i=this.gos,n=Jr(i),{column:r,eGui:a}=t,l=r.getColDef();!s&&n&&!l.headerComponent&&(s=Js(()=>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(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:s,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,s){e&&t.destroyBean(e);const i=this.gos,n=Jr(i),{column:r,eGui:a}=t,l=r.getColGroupDef();!s&&n&&!l?.headerGroupComponent&&(s=Js(()=>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(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:s,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:s}=this,{column:i,rowNode:n}=e,r=lE(s,e,o),a=this.getLocaleTextFunc();let l=null;const c=()=>(l=cE({beans:s,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:i,colDef:i.getColDef(),rowIndex:e.cellPosition.rowIndex,node:n,data:n.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,s)}setupFullWidthRowTooltip(e,t,o,s){const i={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:s},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(i,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:o}=this,{context:s}=o,i=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!i)return;const n={getGui:()=>i,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,s)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=L(t.tooltipField)||L(t.tooltipValueGetter)||L(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},uE=class extends XF{createTooltipComp(e,t){Zm(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},lg={moduleName:"Tooltip",version:I,beans:[dE],dynamicBeans:{tooltipFeature:ag,highlightTooltipFeature:eE,tooltipStateManager:uE},userComponents:{agTooltipComponent:tE},dependsOn:[Tn],css:[oE]},Qo=class{constructor(e){this.cellValueChanges=e}},mr=class extends Qo{constructor(e,t,o,s){super(e),this.initialRange=t,this.finalRange=o,this.ranges=s}},hE=10,Kc=class{constructor(e){this.actionStack=[],this.maxStackSize=e||hE,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}},gE=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),s=this.activeRowEdit!==null&&LC(this.activeRowEdit,t);if(!(o||s||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 s=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:i=>{i.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:s,newColumnsLoaded:s,columnGroupOpened:s,columnRowGroupChanged:s,columnMoved:s,columnPinned:s,columnVisible:s,rowDragEnd:s}),t.whenReady(this,i=>{this.gridBodyCtrl=i.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:o,redoStack:s}=this;t.dispatchEvent({type:"undoStarted",source:e});const i=this.undoRedo(o,s,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:i})}redo(e){const{eventSvc:t,undoStack:o,redoStack:s}=this;t.dispatchEvent({type:"redoStarted",source:e});const i=this.undoRedo(s,o,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:i})}undoRedo(e,t,o,s,i){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[s],i),n instanceof mr?this.processRange(n.ranges||[n[o]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,o){const{changeDetectionSvc:s}=this.beans;s?.beginDeferred();try{for(const i of e.cellValueChanges){const{rowIndex:n,rowPinned:r,columnId:a}=i,l={rowIndex:n,rowPinned:r},c=kt(this.beans,l);c?.displayed&&c.setDataValue(a,t(i),o)}}finally{s?.endDeferred()}}processRange(e){let t;const o=this.beans.rangeSvc;o.removeAllCellRanges(!0),e.forEach((s,i)=>{if(!s)return;const n=s.startRow,r=s.endRow;i===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:s.startColumn,columns:s.columns};o.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:o,rowPinned:s}=t,i={rowIndex:o,rowPinned:s},n=kt(this.beans,i),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:o,rowPinned:s}=e,{colModel:i,focusSvc:n,rangeSvc:r}=this.beans,a=i.getCol(o);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:s};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()}},pE=".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}",fE={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},mE=class extends En{constructor(){super(fE,[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),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${s} (${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=L(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=>{zu(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{o.clipboardData?.getData("text")?.split("").some(i=>!e.test(i))&&o.preventDefault()}})}},In={selector:"AG-INPUT-TEXT-FIELD",component:$t},CE=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)}},cg={selector:"AG-INPUT-DATE-FIELD",component:CE},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:s,eventKey:i,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,a=!0;s?(this.focusAfterAttached=!0,i===R.BACKSPACE||i===R.DELETE?r="":i&&i.length===1?n?a=!1:r=i:(r=t.getStartValue(),i!==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()}},vE={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},wE=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return vE}getAgComponents(){return[cg]}init(e,t){this.eEditor=e,this.params=t;const{min:o,max:s,step:i,colDef:n}=t;o!=null&&e.setMin(o),s!=null&&e.setMax(s),i!=null&&e.setStep(i),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:s,max:i,getValidationErrors:n}=o;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(s){const l=s instanceof Date?s:new Date(s);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(i){const l=i instanceof Date?i:new Date(i);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!L(o)&&!L(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,this.includeTime??!1)}},bE=class extends An{constructor(){super(new wE(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},SE={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},yE=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return SE}getAgComponents(){return[cg]}init(e,t){this.eEditor=e,this.params=t;const{min:o,max:s,step:i,colDef:n}=t;o!=null&&e.setMin(o),s!=null&&e.setMax(s),i!=null&&e.setStep(i),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,s=this.formatDate(this.parseDate(o??void 0)),{min:i,max:n,getValidationErrors:r}=t;let a=[];if(s){const l=new Date(s),c=this.getLocaleTextFunc();if(i){const d=new Date(i);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!L(o)&&!L(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}},RE=class extends An{constructor(){super(new yE(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},FE=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}},EE={selector:"AG-INPUT-TEXT-AREA",component:FE},xE={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},PE=class extends En{constructor(){super(xE,[EE]),this.eEditor=W}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:s,maxLength:i,cols:n,rows:r}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(i||200).setCols(n||60).setRows(r||10);let a;o?(this.focusAfterAttached=!0,s===R.BACKSPACE||s===R.DELETE?a="":s&&s.length===1?a=s:(a=this.getStartValue(e),s!==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,s=this.getLocaleTextFunc();e.setInputAriaLabel(s("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,s=e.getValue();return!L(s)&&!L(o)?o:t.parseValue(s)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,s=this.getLocaleTextFunc(),i=this.getValue();let n=[];return typeof i=="string"&&t!=null&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,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:s,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof s=="number"&&this.setMax(s),typeof i=="number"&&this.setStep(i)}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 i=Number.parseFloat(e).toFixed(o);return Number.parseFloat(i).toString()}const s=String(e).split(".");if(s.length>1){if(s[1].length<=o)return e;if(o>0)return`${s[0]}.${s[1].slice(0,o)}`}return s[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(L(o)){let s=this.isScientificNotation(o);if(s&&this.eInput.validity.valid)return e(o);if(!s){o=this.adjustPrecision(o);const i=this.normalizeValue(o);s=o!=i}if(s)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")}},DE={selector:"AG-INPUT-NUMBER-FIELD",component:nl},ME={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},TE=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return ME}getAgComponents(){return[DE]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:s,precision:i,step:n}=t;o!=null&&e.setMax(o),s!=null&&e.setMin(s),i!=null&&e.setPrecision(i),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:s}=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),s?s({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(!L(o)&&!L(t.value))return t.value;let s=t.parseValue(o);if(s==null)return s;if(typeof s=="string"){if(s==="")return null;s=Number(s)}return isNaN(s)?null:s}getStartValue(){return this.params.value}setCaret(){po()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},IE=class extends An{constructor(){super(new TE(()=>this.getLocaleTextFunc()))}},AE=".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)}}",kE="ag-active-item",LE=(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}]}),OE=class extends Ps{constructor(e,t,o){super(LE(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(kE,e),Id(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const o=this.getGui();Gp(o,e),Op(o,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Gd(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)}))}},GE=class extends Ps{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(AE)}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,s=o??t;return this.options.push({value:t,text:s}),this.renderOption(t,s),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(s=>s.value===e);if(o!==-1){const s=this.options[o];this.value=s.value,this.displayValue=s.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:s,clientHeight:i}=o,{offsetTop:n,offsetHeight:r}=t;(n+r>s+i||n<s)&&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 OE(this.cssIdentifier,t,e);o.setParentComponent(this);const s=this.createManagedBean(o);this.listItems.push(s),this.getGui().appendChild(s.getGui())}navigate(e){const t=e===R.DOWN;let o;const{listItems:s,highlightedItem:i}=this;if(!i)o=t?s[0]:he(s);else{let r=s.indexOf(i)+(t?1:-1);r=Math.min(Math.max(r,0),s.length-1),o=s[r]}this.highlightItem(o)}navigateToPage(e){const{listItems:t,highlightedItem:o}=this;if(!o||t.length===0)return;const s=t.indexOf(o),i=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=i:e===R.PAGE_DOWN?a=Math.min(s+r,i):e===R.PAGE_UP&&(a=Math.max(s-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,s)=>{o.setIndex(s+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},HE=".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}",BE={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"}}]}]},VE=class extends gh{constructor(e){if(super(e,e?.template||BE,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(HE),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:s,minPickerWidth:i,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!s,o!=null&&this.setPickerMaxHeight(o),i!=null&&this.setPickerMinWidth(i),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:s}=this.config;if(o){const i=this.beans.iconSvc.createIconNoSpan(o);i&&this.eIcon.appendChild(i)}s!=null&&this.setInputWidth(s)}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:s,modalPicker:i=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=fa(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,s),anchorToElement:d};e.style.position="absolute";const h=c.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=ya(_i(d)),a&&(e.style.maxWidth=a)):Ki(e,a??_i(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:s},eWrapper:i,pickerComponent:n}=this,r=s.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:i,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 Ki(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()}},NE=".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 VE{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(NE)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Js(()=>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 GE("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Up(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:s=>{s?.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:s,config:{placeholder:i},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!s)return this;if(o||s.setValue(e,!0),s.getValue()===this.getValue())return this;let l=s.getDisplayValue();return l==null&&i&&(l=i),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},WE={selector:"AG-SELECT",component:rl},zE={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},_E=class extends En{constructor(){super(zE,[WE]),this.eEditor=W,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:s}=this,{values:i,value:n,eventKey:r}=e;if(we(i)){D(58);return}this.startedByEnter=r!=null?r===R.ENTER:!1;let a=!1;i.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),s.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,s=this.getValue();let i=[];if(t&&s!=null&&!t.includes(s)){const n=this.getLocaleTextFunc();i.push(n("invalidSelectionValidation","Invalid selection."))}else i=null;return o?o({value:s,internalErrors:i,cellEditorParams:e}):i}},UE={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},$E=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return UE}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,s=this.getValue(),i=this.getLocaleTextFunc();let n=[];return t!=null&&typeof s=="string"&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!L(o)&&!L(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=L(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},qc=class extends An{constructor(){super(new $E(()=>this.getLocaleTextFunc()))}};function KE(e){e.undoRedo?.undo("api")}function qE(e){e.undoRedo?.redo("api")}function jE(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function YE(e){const t=e.editModelSvc?.getEditMap(),o=[];return t?.forEach((s,i)=>{const{rowIndex:n,rowPinned:r}=i;s.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 QE(e,t=!1){const{editSvc:o}=e;if(o?.isBatchEditing()){if(t)for(const s of e.editModelSvc?.getEditPositions()??[])s.state==="editing"&&o.revertSingleCellEdit(s);else so(e,{persist:!0});eo(e,void 0,{cancel:t})}else o?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function ZE(e,t){const o=re(e,t);return!!e.editSvc?.isEditing(o)}function JE(e,t){const{key:o,colKey:s,rowIndex:i,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(s);if(!l){D(12,{colKey:s});return}const d=kt(e,{rowIndex:i,rowPinned:n||null});if(!d){D(290,{rowIndex:i,rowPinned:n});return}if(!r?.isCellEditable({rowNode:d,column:l},"api"))return;n==null&&eg(e,i),Xh(e,s),r?.startEditing({rowNode:d,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api",editable:!0})}function XE(e){return e.editSvc?.validateEdit()||null}function ex(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function tx(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var ox={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},sx=class extends Ha{constructor(e){super(ox),this.params=e}postConstruct(){Go(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=s=>{Nr(this.gos,s,t.node,t.column,!0)||t.onKeyDown(s)};this.addManagedElementListeners(e,{keydown:o})}};function ix(e,{column:t},o,s,i="ui"){if(o instanceof KeyboardEvent&&(o.key===R.TAB||o.key===R.ENTER||o.key===R.F2||o.key===R.BACKSPACE&&s))return!0;if(o?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=nx(e.gos,r),l=o?.type;return l==="click"&&o?.detail===1&&a===1||l==="dblclick"&&o?.detail===2&&a===2?!0:i==="api"?!!s:!1}function nx(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,s=t.rowNode,i=o.getColDef();if(!s)return Cr(e,t);const n=i.editable;return s.group&&i.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(s,o)?!0:Cr(e,t):o.isColumnFunc(s,n)?!0:Cr(e,t)}function rx(e,t,o="ui"){const s=ea(e,t);if(s||o==="ui")return s;const{rowNode:i,column:n}=t;for(const r of e.colModel.getCols())if(r!==n&&ea(e,{rowNode:i,column:r}))return!0;return!1}var gn=(e,t=!1)=>{if(e!==void 0)return mt(e)||t&&e.state==="editing"};function dg(e,t,o=!1){return gn(e.editModelSvc?.getEdit(t),o)}var ug=(e,t,o)=>{if(e)for(let s=0,i=e.length;s<i;++s){const n=e[s];if(n.data&&(gn(t?.getEdit({rowNode:n,column:o}))||gn(t?.getEdit({rowNode:n.pinnedSibling,column:o})))||ug(n.childrenAfterGroup,t,o))return!0}};function hg(e,t){const{column:o,rowNode:s}=t;return e.gos.get("groupTotalRow")&&!s?.footer?!1:ug(s?.childrenAfterGroup,e.editModelSvc,o)}function gg(e,{rowNode:t,column:o}){if(t=t.pinnedSibling,!!t)return gn(e.editModelSvc?.getEdit({rowNode:t,column:o}))}var ax=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 i=dg(o,e)||hg(o,e)||gg(o,e);this.applyBatchingStyle(i)}else this.applyBatchingStyle(!1);const s=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",s)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},lx=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 s=e.rowNode,i=t?.getEditRow(s);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:s});if(!i&&s.pinnedSibling&&(s=s.pinnedSibling,i=t?.getEditRow(s)),i){const r=Array.from(i.keys()).some(a=>{const l={rowNode:s,column:a};return dg(o,l,!0)||hg(o,l)||gg(o,l)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const o=!!this.editSvc?.isBatchEditing(),s=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",s&&t),i.toggleCss("ag-row-batch-edit",s&&t&&o),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",s&&t&&e)})}},cx=({rowModel:e,pinnedRowModel:t,editModelSvc:o},s)=>{const i=new Set;e.forEachNode(n=>s.has(n)&&i.add(n)),t?.forEachPinnedRow("top",n=>s.has(n)&&i.add(n)),t?.forEachPinnedRow("bottom",n=>s.has(n)&&i.add(n));for(const n of s)i.has(n)||o.removeEdits({rowNode:n});return i},dx=({editModelSvc:e},t,o)=>{for(const s of t)e?.getEditRow(s)?.forEach((i,n)=>!o.has(n)&&e.removeEdits({rowNode:s,column:n}))},ux=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),s=new Set(o.keys());dx(e,cx(e,s),t)},hx=new Set(["undo","redo","paste","bulk","rangeSvc"]),gx=new Set(["ui","api"]),pg={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},px=new Set(Object.keys(pg)),fx=new Set(["paste","rangeSvc","cellClear","redo","undo"]),vr={cancel:!0,source:"api"},mx={cancel:!1,source:"api"},wo={checkSiblings:!0},Zt={force:!0,suppressFlash:!0},Cx={force:!0},vx=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:s})=>{this.stopEditing(void 0,vr),this.createStrategy(s)});const t=ux(e),o=()=>{const s=this.model.getCellValidationModel().getCellValidationMap().size>0,i=this.model.getRowValidationModel().getRowValidationMap().size>0;return s||i?this.stopEditing(void 0,vr):this.isEditing()&&(this.batch?eo(e,this.model.getEditPositions()):this.stopEditing(void 0,mx)),!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:s}=this,i=jc(o,e);if(s){if(s.beanName===i)return s;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(i,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,s="ui"){const i=ix(this.beans,e,t,o,s);return i&&(this.strategy??(this.strategy=this.createStrategy())),i}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 eR(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:s=null,source:i="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,s,o,i);if(c===!1&&i!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,i)&&!t.continueEditing&&this.stopEditing(void 0,{source:i}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:s,source:i,ignoreEventKey:n,startedEdit:o,silent:r})}stopEditing(e,t){const o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let s=!1,{edits:i}=o;try{const n=this.processStopRequest(o);return s||(s=n.res),i=n.edits,this.finishStopEditing({...o,edits:i,params:t,position:e,res:s}),s}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:o=null,cancel:s=!1,source:i="ui",forceCancel:n=!1,forceStop:r=!1,commit:a=!1}=t||{};if(px.has(i)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?pg[i]:i;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=!s&&(!!this.shouldStopEditing(e,o,l)||(this.committing||i==="paste")&&!this.batch)||r,h=s&&!!this.shouldCancelEditing(e,o,l)||n;return{cancel:s,cellCtrl:d,edits:this.model.getEditMap(!0),event:o??null,forceCancel:n,forceStop:r,commit:a,position:e,source:i,treatAsSource:l,willCancel:h,willStop:u}}processStopRequest(e){const{event:t,position:o,willCancel:s,willStop:i}=e;return i||s?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,o)?{res:!1,edits:this.handleMidBatchKey(t,o,e)}:(so(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:s,commit:i,edits:n,event:r,source:a,willCancel:l,willStop:c}=e,d=!this.batch||!l;so(t,{persist:d,isCancelling:l||s,isStopping:c});const u=o.getEditMap(),g=!l&&(!this.batch||i)?this.processEdits(u,a):[];s?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(r,i),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:s,model:i}=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)so(s,{persist:!0});else if(c&&n){const{rowNode:u,column:h}=n;if(this.batch&&u&&h){const g={rowNode:u,column:h};eo(s,[g],{silent:!0}),this.model.stop(g,!0,!0),re(s,g)?.refreshCell(Zt)}else this.revertSingleCellEdit(n)}return this.batch?this.strategy?.cleanupEditors():eo(s,i.getEditPositions(),{event:e,cancel:c}),e.preventDefault(),this.bulkRefreshMap(r,{suppressFlash:!0}),i.getEditMap()}return r}finishStopEditing({cellCtrl:e,edits:t,params:o,position:s,res:i,commit:n,forceCancel:r,willCancel:a,willStop:l}){const c=this.beans;i&&s&&(!this.batch||n)&&this.model.removeEdits(s),this.navigateAfterEdit(o,e?.cellPosition),Gs(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=K0(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:s}=e;if(!(o instanceof KeyboardEvent)||s)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()),s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,i=[],{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)&&!s){const u=re(this.beans,d);this.setNodeDataValue(r,l,c.pendingValue,u,t)||i.push(d)}}}}finally{n?.endDeferred()}return i}setNodeDataValue(e,t,o,s,i="edit"){const n=gx.has(i)?"edit":i;s&&(s.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,o,n)}finally{this.committing=!1,s&&(s.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={...wx(e),...Zt}),this.beans.rowRenderer.refreshCells(o)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:s,sourceValue:i}=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:s,oldValue:i,value:s,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,s)=>{for(const i of o.keys())this.refCell({rowNode:s,column:i},o.get(i),t)})}refCell({rowNode:e,column:t},o,s={}){const{beans:i,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(i,{rowNode:u,column:t})?.refreshCell(s);for(const u of a){const h=re(i,{rowNode:u,column:t});h&&(h.refreshCell(s),!s.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:s}=this,i=e.rowNode;if(i.group&&e.column.getColDef().groupRowEditable==null){if(o.get("treeData")){if(!i.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}const n=jc(o)==="fullRow"?rx(s,e,t):ea(s,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 s=re(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),o&&(s&&!s.hasBrowserFocus()&&s.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(s&&this.revertSingleCellEdit(s),"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,s="ui"){let i;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof ms&&n&&(i=this.strategy?.moveToNextEditingCell(e,t,o,s,r)),i===null||(i=i||!!this.beans.focusSvc.focusedHeader,i===!1&&!r&&this.stopEditing()),i}getPendingEditValue(e,t,o){if(o==="data"||o==="batch"&&!this.batch)return;const s=this.model.getEdit({rowNode:e,column:t},wo);if(!s||this.stopping&&!this.batch&&!s.editorState?.cellStartedEditing)return;if(o==="edit"){const n=s.editorValue;if(n!=null&&n!==Ie)return n}const i=s.pendingValue;if(i!==Ie)return i}getCellDataValue(e){const t=this.model.getEdit(e,wo);if(t){const o=t.pendingValue;if(o!==Ie)return o;const s=t.sourceValue;if(s!=null)return s}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){_0(this,this.beans,e)}createPopupEditorWrapper(e){return new sx(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:o,sourceValue:s,state:i}=t;return o===s||i==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:s}),this.beans.editModelSvc?.removeEdits(e),re(this.beans,e)?.refreshCell(Zt),!0)}setDataValue(e,t,o){try{const s=this.batch,i=this.isEditing(s?void 0:e);if((!i||this.committing)&&!s&&!fx.has(o)||!i&&!s&&o==="paste"||o==="batch"&&!s)return;if(o==="edit"){if(i&&this.applyEditorValue(e,t))return!0;if(!s)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(s?r="ui":this.committing?r=o??"api":r="api",!o||hx.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,s){const i=this.model.getEdit(e);if(i)return i.pendingValue===t?!1:i.sourceValue!==t?(Yo(this.beans,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...i,pendingValue:t}),!0)}applyEditorValue(e,t){const o=this.beans,s=re(o,e),i=s?.comp?.getCellEditor();return!s||!i?!1:(Yo(o,e,t,"edit",void 0,{persist:!0}),s.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in i?(i.agSetEditValue(t),!0):i.refresh&&s.editCompDetails?(i.refresh({...s.editCompDetails.params,value:t}),!0):(s.hasBrowserFocus()&&s.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 s=this.beans;if(this.batch){if(o==="batch"&&re(s,e)?.comp?.getCellEditor()){const{editModelSvc:r,valueSvc:a}=s,{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(s,e,t,o,void 0,{persist:!0}),o!=="batch"&&this.cleanupEditors();return Gs(s),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}Yo(s,e,t,o,void 0,{persist:!0});const i=re(s,e),n=this.setNodeDataValue(e.rowNode,e.column,t,i,o);return this.syncEditAfterCommit(e,n),Gs(s),re(s,e)?.refreshCell(n?Cx:Zt),n}handleColDefChanged(e){j0(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:i}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=o.getEditRowDataValue(i,wo),{compDetails:n}}return{valueToDisplay:r}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,o,s){this.strategy?.dispatchCellEvent(e,t,o,s)}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:s,rangeSvc:i,valueSvc:n}=this,{formula:r}=s;so(s,{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(i?.forEachRowInRange(h,f=>{const m=kt(s,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(),Gs(s),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(s,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new ax(e,this.beans)}createRowStyleFeature(e){return new lx(e,this.beans)}setEditingCells(e,t){const{beans:o}=this,{colModel:s,valueSvc:i}=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?s.getCol(r):l?s.getCol(l):a;if(!g)continue;const f=kt(o,{rowIndex:c,rowPinned:d});if(!f)continue;const m=i.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 i=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(i,"pendingChange")}allowedFocusTargetOnValidation(e){return re(this.beans,e)}};function wx(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 fg=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:s,beans:i}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=re(i,o));const{gos:r,editModelSvc:a}=i,l=e.type==="cellFocusCleared";if(s.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:kt(i,{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)||s.stopEditing(void 0,{cancel:C,source:l&&f?"api":void 0,event:n})||(s.isBatchEditing()?s.cleanupEditors():s.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())ni(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(),s={all:[],pass:[],fail:[]};for(const r of o)s.all.push(r),(this.model.getCellValidationModel().getCellValidation(r)?.errorMessages?.length??0)>0?s.fail.push(r):s.pass.push(r);const i=this.processValidationResults(s),n=this.editSvc.isBatchEditing()&&!t;for(const r of i.destroy)ni(this.beans,r,{event:e},re(this.beans,r)),this.model.stop(r,n,!1);for(const r of i.keep){const a=re(this.beans,r);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){so(this.beans,{persist:!1});const o=this.model.getEditPositions(),s=[];if(e)for(const i of o)i.rowNode!==e&&s.push(i);else for(const i of o)s.push(i);eo(this.beans,s),Gs(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 s=this.beans.gos.get("editType")==="fullRow";e.focusCell(s),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:o=!1,startedEdit:s,position:i,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!o&&t.key||void 0;$0(this.beans,n,i,r,t,s)}dispatchCellEvent(e,t,o,s){const i=re(this.beans,e);i&&this.eventSvc.dispatchEvent({...i.createEvent(t??null,o),...s})}dispatchRowEvent(e,t,o){if(o)return;const s=dn(this.beans,e);s&&this.eventSvc.dispatchEvent(s.createRowEvent(t))}shouldStop(e,t,o="ui"){const s=this.editSvc.isBatchEditing();return s&&o==="api"?!0:s&&(o==="ui"||o==="edit")?!1:o==="api"?!0:t instanceof KeyboardEvent&&!s?t.key===R.ENTER:null}shouldCancel(e,t,o="ui"){const s=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!s&&t.key===R.ESCAPE||s&&o==="api"||o==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,i)=>{s.forEach((n,r)=>{n.state==="editing"&&o.push({...n,rowNode:i,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),o.length>0){const s=o.at(-1),i=s.pendingValue===Ie?void 0:s.pendingValue;this.start({position:s,event:new KeyboardEvent("keydown",{key:i}),source:"api"});const n=re(this.beans,s);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},bx=class extends fg{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,o="ui"){const{rowNode:s,beans:i}=this,{rowNode:n}=e||{};if(!dn(i,{rowNode:s}))return!0;const a=super.shouldStop({rowNode:s},t,o);return a!==null?a:s?n!==s:!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:s,event:i,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:s,event:i,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:s,model:i,editSvc:n}=this;if(o&&!i.hasRowEdits(o))return!1;const r=[];if(i.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const c of a.values())if(mt(c)){r.push(l);break}}}),no(s),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:s,gos:i,model:n}=this;if(s.editSvc?.isRangeSelectionEnabledWhileEditing())return;const r=re(s,o);i.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 s of o)this.dispatchRowEvent({rowNode:s},"rowEditingStopped"),this.destroyEditorsForRow(s);o.clear()}destroyEditorsForRow(e){const t=dn(this.beans,{rowNode:e});if(!t)return;const o={};for(const s of t.getAllCellCtrls())s.comp?.getCellEditor()&&ni(this.beans,s,o,s)}moveToNextEditingCell(e,t,o,s="ui",i=!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&&!i?m?d.focusCell(!0,o):(d.comp?.getCellEditor()||Wo(n,d,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(d),d.focusCell(!1,o)):(g&&i&&this.setFocusInOnEditor(d),d.focusCell(!0,o)),!f&&!i&&(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:s,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,s)=>o.forEach(({state:i},n)=>{if(i!=="editing")return;const r=re(e,{rowNode:s,column:n});r&&!r.comp?.getCellEditor()&&Wo(e,r,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},Sx=class extends fg{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const s=super.shouldStop(e,t,o);if(s!==null)return s;const i=e?.rowNode,n=e?.column,r=this.rowNode,a=this.column;return(!r||!a)&&i&&n?null:r!==i||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:s,ignoreEventKey:i}=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:s,ignoreEventKey:i})}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:s,column:i,rowPinned:n}=e,r=kt(this.beans,{rowIndex:s,rowPinned:n}),a=qr(i),l=t.getCol(a),c=e.previousParams;if(c){const d=qr(c.column);if(c?.rowIndex===s&&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,s="ui",i=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=es(this.beans,n)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),i||(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&&!i&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");let f=!1;if(!h&&!i&&(super.cleanupEditors(a,!0),g?a.focusCell(!0,o):(f=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:o,source:s,ignoreEventKey:!0,editable:u}))),u&&!i){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&&i&&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:I,beans:[z0,vx],apiFunctions:{getEditingCells:YE,getEditRowValues:jE,getCellEditorInstances:U0,startEditingCell:JE,stopEditing:QE,isEditing:ZE,validateEdit:XE},dynamicBeans:{singleCell:Sx,fullRow:bx},dependsOn:[Tn,lg],css:[pE]},yx={moduleName:"UndoRedoEdit",version:I,beans:[gE],apiFunctions:{undoCellEditing:KE,redoCellEditing:qE,getCurrentUndoSize:ex,getCurrentRedoSize:tx},dependsOn:[mo]},Rx={moduleName:"TextEditor",version:I,userComponents:{agCellEditor:qc,agTextCellEditor:qc},dependsOn:[mo]},Fx={moduleName:"NumberEditor",version:I,userComponents:{agNumberCellEditor:{classImp:IE}},dependsOn:[mo]},Ex={moduleName:"DateEditor",version:I,userComponents:{agDateCellEditor:bE,agDateStringCellEditor:RE},dependsOn:[mo]},xx={moduleName:"CheckboxEditor",version:I,userComponents:{agCheckboxCellEditor:mE},dependsOn:[mo]},Px={moduleName:"SelectEditor",version:I,userComponents:{agSelectCellEditor:_E},dependsOn:[mo]},Dx={moduleName:"LargeTextEditor",version:I,userComponents:{agLargeTextCellEditor:PE},dependsOn:[mo]},Mx={moduleName:"CustomEditor",version:I,dependsOn:[mo]},mg={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},Tx=new Set(Object.values(mg));function Jt(e,t){const o=e.filterUi;if(!o)return null;if(o.created)return o.promise;if(t)return null;const s=o.create(o.refreshed),i=o;return i.created=!0,i.promise=s,s}function Ix(e,t,o,s,i,n,r){return t.refresh?.({...o,model:s,source:n,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;Cg(l,c,s,i,n,r)}})}function Cg(e,t,o,s,i,n){e?.refresh?.({...t,model:o,state:s,source:i,additionalEventAttributes:n})}function vg(e,t,o,s){const i=e();i?.created&&i.promise.then(n=>{const r=t();Cg(n,i.filterParams,r,o()??{model:r},"ui",s)})}function Yc(e){let t,o=!1,s;const{action:i,filterParams:n,getFilterUi:r,getModel:a,getState:l,updateState:c,updateModel:d,processModelToApply:u}=e;switch(i){case"apply":{const h=l();s=h?.model??null,u&&(s=u(s)),t={state:h?.state,model:s},o=!0;break}case"clear":{t={model:null},n?.buttons?.includes("apply")||(o=!0,s=null);break}case"reset":{t={model:null},o=!0,s=null;break}case"cancel":{t={model:a()};break}}c(t),o?d(s):vg(r,a,l,{fromAction:i})}function Te(e,t){return e[t]??null}var Ax=class extends $a{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,o,s,i){this.comp=e;const n=di(this,this.beans.context,i);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=s,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 li(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Cs(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(ve(t)===this.eGui)return;const i=$o(t,this.eGui,null,e.shiftKey);if(i){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),i.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"),s=!!e.relatedTarget&&Eo(e.relatedTarget,"ag-floating-filter");if(o&&s&&e.target===this.eGui){const i=this.lastFocusEvent,n=!!(i&&i.key===R.TAB);if(i&&n){const r=i.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:s}=this,i=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(s.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:i}),t?.isFilterActive(o)&&i(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 s=this.beans.colFilter,i=this.active?s?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!i?this.updateCompDetails(e,i,o):n.then(r=>{!r||s?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,o):this.updateFloatingFilterParams(i,"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(s=>{typeof s?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(o={...o,model:Te(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),s.refresh(o))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function kx(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:o,positionBy:"auto"})}function Lx(e){e.menuSvc?.hidePopupMenu()}var Ox=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,s){const{positionBy:i,onClosedCallback:n}=t,r=t.column;if(i==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,o,n,s)}else if(i==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,o,n,s)}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(s),o,n,s)})}}};function Qc(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}function Zc(e){const{enterpriseMenuFactory:t,filterMenuFactory:o,gos:s}=e;return t&&Ze(s)?t:o}var Gx={moduleName:"SharedMenu",version:I,beans:[Ox],apiFunctions:{showColumnMenu:kx,hidePopupMenu:Lx}},Hx=".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 Bx(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function Vx(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function Nx(e,t){const o=e.colModel.getColDefCol(t);if(o)return e.colFilter?.destroyFilter(o,"api")}function Wx(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function zx(e){return e.filterManager?.getFilterModel()??{}}function _x(e,t,o){const{gos:s,colModel:i,colFilter:n}=e;o&&!s.get("enableFilterHandlers")&&(D(288),o=!1);const r=i.getColDefCol(t);return r?n?.getModelForColumn(r,o)??null:null}function Ux(e,t,o){return e.filterManager?.setColumnFilterModel(t,o)??Promise.resolve()}function $x(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 Kx(e){e.menuSvc?.hideFilterMenu()}function qx(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}return e.colFilter?.getHandler(o,!0)}function jx(e,t){const{colModel:o,colFilter:s,gos:i}=e;if(!i.get("enableFilterHandlers")){D(287);return}const{colId:n,action:r}=t;if(n){const a=o.getColById(n);a&&s?.updateModel(a,r)}else s?.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 Yx(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function Qx(e,t){if(e==null)return-1;if(t==null)return 1;const o=et(e),s=et(t);return o!=null&&s!=null?o===s?0:o>s?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 s=e.dateParser(o);return o==null||s<t?-1:s>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:Yx}),bigint:()=>({comparator:Qx}),boolean:({t:e})=>({valueFormatter:t=>L(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:o=>{const s=e(o);return L(s)?s:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(o,s)=>{if(o==="NaN")return t("invalidDate","Invalid Date");if(s===1&&o!=null){const i=Xc[Number(o)-1];return t(i,Jc[i])}return o??t("blanks","(Blanks)")},treeListPathGetter:o=>Ri(o,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:o})=>({valueFormatter:s=>{const i=e(s);return L(i)?i:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:s=>Ri(t.dateParser(s??void 0),!1),treeListFormatter:(s,i)=>{if(i===1&&s!=null){const n=Xc[Number(s)-1];return o(n,Jc[n])}return s??o("blanks","(Blanks)")}}),dateTime:e=>{const t=oa.date(e);return t.treeListPathGetter=Ri,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,o=oa.dateString(e);return o.treeListPathGetter=s=>Ri(t(s??void 0)),o},object:({formatValue:e,t})=>({valueFormatter:o=>{const s=e(o);return L(s)?s:t("blanks","(Blanks)")}}),text:()=>{}};function Zx(e,t,o,s,i,n,r){let a=t,l=o;const c=e==="agSetColumnFilter";!l&&s.baseDataType==="object"&&!c&&(l=({column:g,node:f})=>i({column:g,node:f,value:n.valueSvc.getValue(g,f,"data")}));const u=(c?oa:ta)[s.baseDataType],h=u({dataTypeDefinition:s,formatValue:i,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var Jx={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},Xx={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function eP(e,t=!1){return(t?Xx:Jx)[e??"text"]}function tP(e,t,o){if(t==null)return null;let s=null;const{compName:i,jsComp:n,fwComp:r}=bu(e,t);return i?s={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[i]:n==null&&r==null&&t.filter===!0&&(s=o()),s}var oP={filterHandler:()=>({doesFilterPass:()=>!0})};function td(e,t,o,s){if(!e.isPrimary())return!0;const n=!o;return!e.isValueActive()||!n?!1:t?!0:s}var sP=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={...mg},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:s,dataTypeSvc:i,filterManager:n}=this.beans;if(i?.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=s.getColDefCol(c)||s.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))});ie.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;js(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:s,beans:{colModel:i}}=this;if(o.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);L(a)&&(t[r]=a)}),!e)for(const n of Object.keys(s)){const r=s[n];L(r)&&!o.has(n)&&i.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,o="api"){if(this.state.clear(),t)for(const s of Object.keys(t)){const i=t[s];this.state.set(s,{model:Te(this.model,s),state:i})}this.setModel(e,o,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let o=!1;return e.forEach((s,i)=>{const n=s.state;n!=null&&(o=!0,t[i]=n)}),o?t:void 0}getModelFromFilterWrapper(e){const o=e.column.getColId();if(e.isHandler)return Te(this.model,o);const s=e.filter;return s?typeof s.getModel!="function"?(D(66),null):s.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,s=!!Yi(o),i=[],n=[],r=(l,c,d)=>{c&&(td(l,t.isPivotMode(),t.isPivotActive(),s)?i.push(d):n.push(d))},a=[];return this.allColumnFilters.forEach(l=>{const c=l.column,d=c.getColId();if(l.isHandler)a.push(ie.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})}))}}),ie.all(a).then(()=>{this.activeAggregateFilters=i,this.activeColumnFilters=n})}updateFilterFlagInColumns(e,t){const o=[];return this.allColumnFilters.forEach(s=>{const i=s.column;if(s.isHandler)o.push(ie.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{const n=Jt(s);n&&o.push(n.then(r=>{this.setColFilterActive(i,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),ie.all(o)}doFiltersPass(e,t,o){const{data:s,aggData:i}=e,n=o?this.activeAggregateFilters:this.activeColumnFilters,r=o?i:s,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,s=()=>{this.isAlive()&&o?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(s,0):s()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:o}=e,s=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(i=>{const{column:n,isHandler:r}=i;s!==n.getColId()&&(r&&i.handler.onAnyFilterChanged?.(),Jt(i,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 s=o.isHandler;s&&o.handler.onNewRowsLoaded?.();const i=Jt(o,s);i&&t.push(i.then(n=>{n.onNewRowsLoaded?.()}))}),ie.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:s}=this.beans;return(i,n)=>{const r=n?s.getCol(n):e;return r?o.getValue(r,i,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=L(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(s=>({comp:s,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 zf(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":eP(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,o,s,i,n){const r=()=>{const c=this.createFilterCompParams(e,i,n),d=s(c,i);return Ym(this.beans.userCompFactory,t,d,o)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,o,s){const i=this.beans.selectableFilter;i?.isSelectable(t)&&(t=i.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,o)??{},l=this.createFilterComp(e,t,o,s,!!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:s}=this.beans;return K(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:i=>o?.doesRowPassOtherFilters(e.getColId(),i)??!0,rowModel:s})}createFilterCompParams(e,t,o,s){const i=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,s);if(n.filterChangedCallback=i,n.filterModifiedCallback=s?()=>{}: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(()=>{i({...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 s=t(),i={created:!0,create:t,filterParams:e.params,compDetails:e,promise:s};return s.then(o),i}createFilterWrapper(e){const{compDetails:t,handler:o,handlerGenerator:s,handlerParams:i,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(o)return delete this.initialModel[r],o.init?.({...i,source:"init",model:Te(this.model,r)}),{column:e,isHandler:!0,handler:o,handlerGenerator:s,handlerParams:i,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:s,frameworkOverrides:i,registry:n}=this.beans;let r;const a=g=>{const f=g.filter;if(Cu(f)){const m=f.handler;return m||(r=f.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof f=="string"?f:void 0},l=s.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=s.get("filterHandlers")?.[c];g!=null?u=g:Tx.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let g;const{compName:f,jsComp:m,fwComp:C}=bu(i,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(s)&&D(277,{colId:e.getColId()}),oP):void 0}createHandler(e,t,o){const s=this.createHandlerFunc(e,t,o);if(!s)return;const i=zn(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=s,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,i);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,o){const s=e.getColDef(),i=t(K(this.gos,{column:e,colDef:s})),n=this.createHandlerParams(e,o);return{handler:i,handlerParams:n}}createHandlerParams(e,t){const o=e.getColDef(),s=e.getColId(),i=this.filterChangedCallbackFactory(e);return K(this.gos,{colDef:o,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(s,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(s,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{i({...r,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:o,groupFilter:s}=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 i=s&&e.every(n=>s.isGroupFilter(n));e.length>0&&!i&&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:s,selectableFilter:i,gos:n}=this.beans,r=g=>{this.getOrCreateFilterUi(e)?.then(m=>{g(No(m))})},a=e.getColDef(),l=i?.isSelectable(a)?i.getFilterDef(e,a):a,c=tP(s,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 Jm(o,a,h,c)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,o,s){const i="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(o,s);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:i,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:i,column:t})}else this.destroyFilter(t,i)}destroyFilter(e,t="api"){const o=e.getColId(),s=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialModel[o],s&&this.disposeFilterWrapper(s,t).then(i=>{i&&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:s,isHandler:i,filterUi:n}=e,r=s.getColId();i&&(o=this.isHandlerActive(s),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(s,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:s})};if(n){if(n.created)return n.promise.then(l=>(o=i?o:!!l?.isFilterActive(),this.destroyBean(l),a(),o));a()}return ie.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 s=this.beans,i=o.column,n=i.getColDef(),r=i.isFilterAllowed(),a=this.getDefaultFilter(i),l=s.selectableFilter,c=l?.isSelectable(n)?l.getFilterDef(i,n):n,d=r?this.createHandlerFunc(i,c,this.getDefaultFilter(i)):void 0,u=!!d,h=o.isHandler;if(h!=u){this.destroyFilter(i,"paramsUpdated");return}const{compDetails:g,createFilterUi:f}=(r?this.createFilterComp(i,c,a,C=>C,u,"colDef"):null)??{compDetails:null,createFilterUi:null},m=g?.params??zn(s.userCompFactory,c,this.createFilterCompParams(i,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(i,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:[i],source:t})}else{const w=this.createHandlerParams(i,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,i,g,f);return}o.filterUi.filterParams=m,Jt(o,h)?.then(C=>{(C?.refresh?C.refresh(m):!0)===!1?this.destroyFilterUi(o,i,g,f):this.dispatchLocalEvent({type:"filterParamsChanged",column:i,params:m})})}refreshHandlerAndUi(e,t,o,s,i){const n=this.cachedFilter(e);if(!n)return s&&this.getOrCreateFilterWrapper(e,!0),ie.resolve();if(!n.isHandler)return ie.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return Ix(()=>{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 ie.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},o,i)}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:s}=t;return!(o===s||o?.render&&s?.render&&o.render===s.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(s=>{o.then(i=>{s(No(i))})}):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:s,model:i}=this,n=e.getColId(),r=s.get(n);return r?r.model??null:Te(i,n)}const o=this.cachedFilter(e);return o?this.getModelFromFilterWrapper(o):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let o=()=>{};const s=new Promise(i=>{o=i});return this.columnModelUpdates.push({key:e,model:t,resolve:o}),s}return new Promise(o=>{this.setModelForColumnLegacy(e,t).then(s=>o(s))})}getStateForColumn(e){return this.state.get(e)??{model:Te(this.model,e)}}setModelForColumnLegacy(e,t){const o=this.beans.colModel.getColDefCol(e),s=o?this.getOrCreateFilterWrapper(o,!0):null;return s?this.setModelOnFilterWrapper(s,t):ie.resolve()}setColDefPropsForDataType(e,t,o){const s=e.filter,i=s===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):s;if(typeof i!="string")return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;i==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,o)??{}:{filterParams:n,filterValueGetter:r}=Zx(i,l,c,t,o,a,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,o,s){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,s)}setModelOnFilterWrapper(e,t,o){return new ie(s=>{if(e.isHandler){const n=e.column,r=n.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),o&&t===a){s();return}this.refreshHandlerAndUi(n,t,"api").then(()=>s());return}const i=Jt(e);if(i){i.then(n=>{if(typeof n?.setModel!="function"){D(65),s();return}(n.setModel(t)||ie.resolve()).then(()=>s())});return}s()})}updateStoredModel(e,t){L(t)?this.model[e]=t:delete this.model[e];const o=this.state.get(e),s={model:t,state:o?.state};this.state.set(e,s)}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 s=e.getColId(),i=this.cachedFilter(e),n=()=>i?.filterUi;Yc({action:t,filterParams:i?.filterUi?.filterParams,getFilterUi:n,getModel:()=>Te(this.model,s),getState:()=>this.state.get(s),updateState:r=>this.updateState(e,r),updateModel:r=>n()?.filterParams?.onModelChange(r,{...o,fromAction:t}),processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}updateAllModels(e,t){const o=[];this.allColumnFilters.forEach((s,i)=>{const n=this.beans.colModel.getColDefCol(i);n&&Yc({action:e,filterParams:s.filterUi?.filterParams,getFilterUi:()=>s.filterUi,getModel:()=>Te(this.model,i),getState:()=>this.state.get(i),updateState:r=>this.updateState(n,r),updateModel:r=>{this.updateStoredModel(i,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),o.push(this.refreshHandlerAndUi(n,r,"ui"))},processModelToApply:s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0})}),o.length&&ie.all(o).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();vg(()=>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 i of o)if(i.source==="COLUMN_MENU")return!1;let s=!1;for(const i of e.keys()){const n=e.get(i);if(n.valid===!1)return!1;(n.model??null)!==Te(t,i)&&(s=!0)}return s}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,s=!!Yi(this.gos),i=e.currentValue,n=i?this.activeColumnFilters:this.activeAggregateFilters,r=i?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of n){const c=t.getColById(l.colId),d=i&&!!o?.columns.length;c&&i===td(c,i,d,s)&&(r.push(l),a.push(l))}Rp(n,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function iP(e){return!!e.filterManager?.isAnyFilterPresent()}function nP(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var rP=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:s})=>this.onAdvFilterEnabledChanged(s),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(){Yi(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:o,columns:s=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):ie.resolve()).then(()=>{const i={source:t,type:"filterChanged",columns:s};o&&_e(i,o),this.eventSvc.dispatchEvent(i),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Yi(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 aP(e){return{tag:"div",cls:e}}var lP=class extends ye{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(aP(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const o=this.buttons;if(this.buttons=e,o===e)return;const s=this.getGui();Xe(s);let i;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=it({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&&(i=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=i;const l=this.validationTooltipFeature;i&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!i&&l&&(this.validationTooltipFeature=this.destroyBean(l)),s.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const o=this.eApply;o&&(Qs(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()}},cP=class extends ye{constructor(e,t,o,s,i,n){super(),this.column=e,this.wrapper=t,this.eventParent=o,this.updateModel=s,this.isGlobalButtons=i,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,o=t,s=o.useForm,i=s?"form":"div";this.setTemplate({tag:i,cls:"ag-filter-wrapper"}),s&&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:s,readOnly:i}=t??{},{buttons:n,readOnly:r,useForm:a}=e;if(!o&&i===r&&js(s,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 lP),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,s=o?.key;let i;(s===R.ENTER||s===R.SPACE)&&(i={keyboardEvent:o}),t(i),this.hidePopup=null}afterAction(e,t){const{params:o,applyActive:s}=this,i=o?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),i&&s&&this.close(t);break}case"reset":{i&&s&&this.close();break}case"cancel":{i&&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)}},dP=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",uP={tag:"div",cls:"ag-filter"},hP=class extends ye{constructor(e,t,o){super(uP),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(()=>{})??ie.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:s}}=this,i=s.getFilterUiForDisplay(t)??null;this.wrapper=i,i?.then(n=>{if(!n)return;const{isHandler:r,comp:a}=n;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new cP(t,n,s,s.updateModel.bind(s),c&&s.isGlobalButtons,c));this.comp=d,l=d.getGui()}else this.registerCSS(dP),l=a.getGui(),L(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()}},gP=class extends x{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,o,s){e&&!e.isColumn||this.showPopup(e,i=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:o,mouseEvent:t,ePopup:i})},o,t.target,Ze(this.gos),s)}showMenuAfterButtonClick(e,t,o,s){if(e&&!e.isColumn)return;let i=-1,n="left";const r=Ze(this.gos);!r&&this.gos.get("enableRtl")&&(i=1,n="right");const a=r?void 0:4*i,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,s)}showPopup(e,t,o,s,i,n){const r=e?this.createBean(new hP(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){ce(57);return}const a=it({tag:"div",cls:`ag-menu${i?"":" 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)?s??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&&s&&vt(s)&&Pu(s)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),n?.()},h=this.getLocaleTextFunc(),g=i&&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()}},pP=class extends x{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,o){if(!t)return;const s=e.getColDef(),{selectableFilter:i,valueSvc:n,formula:r}=this.beans,a=o??i?.getFilterValueGetter(e.getColId())??s.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,s);const l=n.getValue(e,t,"data");return e.isAllowFormula()&&r?.isFormula(l)?r.resolveValue(e,t):l}executeFilterValueGetter(e,t,o,s,i){const{expressionSvc:n,valueSvc:r}=this.beans,a=K(this.gos,{data:t,node:s,column:o,colDef:i,getValue:r.getValueCallback.bind(r,s)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},fP={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},mP=class extends ye{constructor(){super(fP,[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,s=o.getHandler();if(s.getModelAsString){const i=s.getModelAsString(o.model);this.eFloatingFilterText.setValue(i)}}}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)}},CP=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"]],s=i=>i.some(n=>t[n]!=null)?!0:(D(72,{keys:i}),!1);if(!o.every(s)){this.filterOptions=e.filter(i=>i===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 $s(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 vP(e){return e==="AND"||e==="OR"?e:"AND"}function wP(e,t,o){if(e==null)return;const{predicate:s}=e;if(s!=null&&!t.some(i=>i==null))return s(t,o)}function bP(e,t){let o=e.length;return o>t&&(e.splice(t),D(78),o=t),o}var SP=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:s}=o;return s??1}return e&&SP.has(e)?0:e==="inRange"?2:1}var kn=class extends dC{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=vP(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 s=o===0?e:this.optionsFactory.defaultOption;t.setValue(s,!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,s=!t.operator;if(!o&&s||o&&!s)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),ie.resolve();if(e.operator){const s=e;let i=s.conditions;i==null&&(i=[],D(77));const n=bP(i,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=s.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),i.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const s=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(s.type,!0),this.setConditionIntoUi(s,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),ie.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 s=this.getNumConditions()-1;this.forEachPositionInput(s,i=>this.resetInput(i)),this.addChangedListeners(t,s)}createJoinOperatorPanel(){const e=it({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 s=this.eJoinPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,i),this.resetJoinOperatorOr(o,s,i),this.isReadOnly()||(t.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(e,t,o){const s=this.createManagedBean(new CP);e.push(s);const i="ag-filter-condition-operator";return s.addCss(i),s.addCss(`${i}-${o}`),t.appendChild(s.getGui()),s}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 s=e+1,i=o-s;i>0&&this.removeConditionsAndOperators(s,i),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((s,i)=>{const n=this.isConditionDisabled(i,e);s.setDisabled(n||this.filterListOptions.length<=1),i===1&&(Qs(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((s,i)=>{me(s,this.isConditionBodyVisible(i))});const o=(t??this.getJoinOperator())==="OR";for(const s of this.eJoinAnds)s.setValue(!o,!0);for(const s of this.eJoinOrs)s.setValue(o,!0);this.forEachInput((s,i,n,r)=>{this.setElementDisplayed(s,i<r),this.setElementDisabled(s,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:s,eJoinPanels:i,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(o,e,t),this.removeElements(s,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(i,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,o){const s=$s(e,t,o);for(const i of s)_t(i)}removeComponents(e,t,o){const s=$s(e,t,o);for(const i of s)_t(i.getGui()),this.destroyBean(i)}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,s=!1;const i=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),s=!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,i),s&&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((s,i,n,r)=>{if(!(s instanceof Fo))return;const a=i===0&&r>1?"inRangeStart":i===0?"filterOoo":"inRangeEnd",l=i===0&&r>1?e("ariaFilterFromValue","Filter from value"):i===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),c=o[n].getValue(),d=Tu(this,t,a,c);s.setInputPlaceholder(d),s.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)&&Qs(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 s=uo(t,this.optionsFactory),i=this.getInputs(e);for(let n=0;n<i.length;n++){const r=i[n];r!=null&&o(r,n,e,s)}}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,s,i){this.updateJoinOperatorDisabled(e.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${i}`).setLabel(s),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((s,i,n)=>{n===t&&this.setElementValue(s,o[i]!=null?o[i]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,o,s)=>{this.setElementValue(t,o===0&&s===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 sa(e){return e?.allowedCharPattern??null}function wg(e,t){const{filter:o,filterTo:s,type:i}=e||{};return[et(o),et(s)].slice(0,uo(i,t))}var yP=class extends kn{constructor(){super("bigintFilter",wg,ll),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!ws()&&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:s}=this.params,i=this.getParsedValue(e,s),n=this.getParsedValue(t,s),r=this.isInvalidValue(e,i),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=RP(i,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:s}=e,i=this.state,n=s?.fromAction;return(n&&n!="apply"||o.model!==i.model||!this.areStatesEqual(o.state,i.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,s=sa(e),i=it({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(i,t,"from",s),r=this.createFromToElement(i,o,"to",s),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),i}createFromToElement(e,t,o,s){const i=this.createManagedBean(s?new $t({allowedCharPattern:s}):new $t);return i.addCss(`ag-filter-${o}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){const o=s=>this.removeComponents(s,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(o,s,i,n)=>{s<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},s=this.getValues(e);return s.length>0&&(o.filter=String(s[0])),s.length>1&&(o.filterTo=String(s[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 RP(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var bg=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,s=[];if(o){const r=t;s.push(...r.conditions??[])}else s.push(t);const i=o&&o==="OR"?"some":"every",n=this.params.getValue(e.node);return s[i](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:o,maxNumConditions:s}}=e;if(t==null)return;let n=Su(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 s=="number"&&n&&n.length>s&&(n=n.slice(0,s),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 s=this.optionsFactory,i=this.mapValuesFromModel(t,s),n=s.getCustomOption(t.type),r=wP(n,i,o);return r??(o==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,o,t,e))}},cl=class extends bg{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:o,includeBlanksInGreaterThan:s,includeBlanksInLessThan:i,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(s)return!0;break;case"lessThan":case"lessThanOrEqual":if(i)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 s=o.type;if(!this.isValid(t))return s==="notEqual"||s==="notBlank";const i=this.comparator(),n=e[0]!=null?i(e[0],t):0;switch(s){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=i(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:s}),!0}}},dl={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},FP={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(),s=t==="filterToolPanel";if(!e)return s?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 s?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,s,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,s,i,n){let r;const a=this.getTypeKey(e);return a&&(r=ft(this,a)),i&&n&&(r=this.getLocaleTextFunc()(i,n)),r!=null?t?`${r} ${ft(this,"filterSummaryInRangeValues",[o(),s()])}`:`${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)}},Sg=class extends Ln{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=dl}conditionToString(e,t,o,s,i){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),s,i);if(u!=null)return u}return o?`${l(c)}-${l(d)}`:n!=null?l(c):`${a}`}},EP=class extends cl{constructor(){super(wg,ll),this.filterType="bigint",this.FilterModelFormatterClass=Sg}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=s=>this.onValueChanged(s);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:s}=this;s.setInputAriaLabel(e),t!==void 0&&s.setAutoComplete(t),s.toggleCss("ag-floating-filter-search-icon",!!o),s.setInputPlaceholder(o)}};function ia(e){const t=e?.trim();return t===""?e:t}function yg(e,t){const{filter:o,filterTo:s,type:i}=e||{};return[o||null,s||null].slice(0,uo(i,t))}var Rg=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 s=this.isTypeEditable(o);this.setEditable(s)}refresh(e){this.params=e;const t=e,o=this.reactive;if((!o||t.source==="colDef")&&this.updateParams(e),o){const{source:s,model:i}=t;if(s==="dataChanged"||s==="ui")return;this.onModelUpdated(i)}}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")}`}},xP={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},hl=class extends Rg{constructor(){super(...arguments),this.eFloatingFilterInputContainer=W,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(xP)}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:s}=this,{filterPlaceholder:i,column:n,browserAutoComplete:r,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,c=e.filterParams.filterPlaceholder,d=i===!0?Tu(this,c,"filterOoo",l):i||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(n),autoComplete:r??!1,placeholder:d}),this.applyActive=Fn(a),!s){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:s,params:i,lastType:n}=this;let r=s.getValue();if(i.filterParams.trimInput&&(r=ia(r),s.setValue(r,!0)),o){const a=i,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 i.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},PP=class extends hl{constructor(){super(...arguments),this.FilterModelFormatterClass=Sg,this.filterType="bigint",this.defaultOptions=ll}updateParams(e){const t=e.filterParams;sa(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=sa(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",Fg=class{constructor(e,t,o,s,i,n){this.context=e,this.eParent=i,this.alive=!0,this.debouncedReport=xe({isAlive:()=>this.alive},sd,500),this.timeoutHandle=null,Qm(t,o,s)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;i.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 s=e.length>0;o.setCustomValidity(e),s?t?this.timeoutHandle=this.debouncedReport(o):sd(o):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),va(o,s)}}getValidity(){return this.dateComp?.getGui().querySelector(od)?.validity}};function sd(e){e.reportValidity()}var gl=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Eg(e,t){const{dateFrom:o,dateTo:s,type:i}=e||{};return[o&&Ke(o,void 0,!0)||null,s&&Ke(s,void 0,!0)||null].slice(0,uo(i,t))}var id=1e3,nd=1/0,DP=class extends kn{constructor(){super("dateFilter",Eg,gl),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=id,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!ws()&&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",id),s=t("maxValidYear",nd);this.minValidYear=o,this.maxValidYear=s,o>s&&D(83);const{minValidDate:i,maxValidDate:n}=e,r=i instanceof Date?i:Ke(i);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:s,dateConditionToComps:i,beans:n}=this,r=s[e],a=i[e],l=uo(this.getConditionType(e),this.optionsFactory),c=r.getDate(),d=a.getDate(),u=l>=2?MP(c,d,t):null,h=u?this.translate(u,[String(t?d:c)]):"",g=!ws()&&!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:s,context:i,gos:n},params:r}=this,a=o==="from",l=new Fg(i,s,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=it({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,s){const i=it({tag:"div",cls:`ag-filter-${s} ag-filter-date-${s}`});t.push(i),e.appendChild(i),o.push(this.createDateCompWrapper(i,t.length-1,s))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),$s(this.eConditionPanelsFrom,e,t),$s(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,o){const s=$s(e,t,o);for(const i of s)i.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:o,minValidYear:s,maxValidYear:i}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<s)return!1;if(o){if(e>o)return!1}else if(e.getUTCFullYear()>i)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,s,i,n)=>{!t||s>=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:s,filterType:i}=this,n=this.getValues(e),r=s.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:i,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(s=>{s.setInputPlaceholder(t),s.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,s,i,n)=>{s<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 MP(e,t,o){return e!=null&&t!=null&&e>=t?`${o?"max":"min"}DateValidation`:null}var xg=class extends Ln{constructor(e,t){super(e,t,o=>{const{dataTypeSvc:s,valueSvc:i}=this.beans,n=t.column,r=s?.getDateFormatterFunction(n),a=r?r(o??void 0):o;return i.formatValue(n,null,a)}),this.filterTypeKeys=dl}conditionToString(e,t,o,s,i){const{type:n}=e,r=Ke(e.dateFrom),a=Ke(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>oS(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,s,i);if(h!=null)return h}return o?`${d()}-${u()}`:r!=null?c(r):`${n}`}};function TP(e,t){const o=t;return o<e?-1:o>e?1:0}var IP=class extends cl{constructor(){super(Eg,gl),this.filterType="date",this.FilterModelFormatterClass=xg,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:o}=this,s=Date.now();let i=o.get(e);if(i&&i.expires<s&&(i=void 0),!i){const[n,r]=t(new Date(s),new Date(s));i={from:n,to:r,expires:ut(new Date(s)).getTime()-s},o.set(e,i)}return i}comparator(){return this.params.filterParams.comparator??TP}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,o){const s=o.type,i=this.comparator();if(!this.isValid(t))return s==="notEqual"||s==="notBlank";const n=s,r=ZP[n];if(r){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(n,r);return i(a,t)>=0&&i(l,t)<0}return super.evaluateNonNullValue(e,t,o)}},AP=1,xi=null,kP=()=>{if(xi!=null)return xi;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 xi=e==null?AP:e%7,xi},nt=e=>(e.setHours(0,0,0,0),e),On=e=>{const t=e.getDay(),o=kP(),s=(t-o+7)%7;return e.setDate(e.getDate()-s),nt(e)},Gn=(e,t=1)=>(e.setDate(e.getDate()-t),e),ut=e=>(e.setDate(e.getDate()+1),nt(e)),Pg=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)},Dg=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),pl(e)},ml=e=>(e.setMonth(0,1),nt(e)),Mg=e=>(e.setMonth(12,0),ut(e)),Rs=e=>Gn(e),na=e=>Rs(On(e)),ra=e=>Rs(Hn(e)),aa=e=>Rs(fl(e)),Cl=(e,t)=>[nt(e),ut(t)],LP=(e,t)=>Cl(Rs(e),Rs(t)),vl=(e,t)=>[On(e),Pg(t)],OP=(e,t)=>vl(na(e),na(t)),wl=(e,t)=>[Hn(e),pl(t)],GP=(e,t)=>wl(ra(e),ra(t)),bl=(e,t)=>[fl(e),Dg(t)],HP=(e,t)=>bl(aa(e),aa(t)),Sl=(e,t)=>[ml(e),Mg(t)],BP=(e,t)=>[ml(e),ut(t)],VP=(e,t)=>[nt(Gn(e,7)),ut(t)],NP=(e,t)=>[nt(Gn(e,30)),ut(t)],WP=(e,t)=>[nt(Gn(e,90)),ut(t)],zP=(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)]),UP=(e,t)=>(e.setFullYear(e.getFullYear()-2),[nt(e),ut(t)]),$P=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Sl(e,t)),KP=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Sl(e,t)),qP=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),bl(e,t)),jP=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),wl(e,t)),YP=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),vl(e,t)),QP=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),Cl(e,t)),ZP={today:Cl,yesterday:LP,tomorrow:QP,thisWeek:vl,lastWeek:OP,nextWeek:YP,thisMonth:wl,lastMonth:GP,nextMonth:jP,thisQuarter:bl,lastQuarter:HP,nextQuarter:qP,thisYear:Sl,lastYear:$P,nextYear:KP,yearToDate:BP,last7Days:VP,last30Days:NP,last90Days:WP,last6Months:zP,last12Months:_P,last24Months:UP,setStartOfDay:nt,setStartOfWeek:On,setStartOfNextDay:ut,setStartOfNextWeek:Pg,setStartOfMonth:Hn,setStartOfNextMonth:pl,setStartOfQuarter:fl,setStartOfNextQuarter:Dg,setStartOfYear:ml,setStartOfNextYear:Mg,setPreviousDay:Rs,setPreviousWeek:na,setPreviousMonth:ra,setPreviousQuarter:aa},JP={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"}]},XP=class extends Rg{constructor(){super(JP,[In]),this.eReadOnlyText=W,this.eDateWrapper=W,this.FilterModelFormatterClass=xg,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,s=$e(e),i=s==null?null:{...o??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:s};t.onModelChange(i,{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:s}}=this;this.dateComp=new Fg(e,t,s.getColDef(),this.getDateComponentParams(),o,i=>{i.setInputAriaLabel(this.getAriaLabel(s))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},eD={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},tD=class extends ye{constructor(){super(eD,[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:s,maxValidYear:i,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,s,!0),g=rd(r,i,!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 Tg(e,t){const{filter:o,filterTo:s,type:i}=e||{};return[fn(o),fn(s)].slice(0,uo(i,t))}var oD=class extends kn{constructor(){super("numberFilter",Tg,yl),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!ws()&&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 s=this.params.numberParser,i=ad(s,e),n=ad(s,t),r=sD(i,n,o),a=r?this.translate(r,[String(o?n:i)]):"";(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:s}=e,i=this.state,n=s?.fromAction;return(n&&n!="apply"||o.model!==i.model||!this.areStatesEqual(o.state,i.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){const{numberFormatter:s}=this.params,i=!o&&s?s(t??null):t;super.setElementValue(e,i),i===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:o}=this,s=la(e),i=it({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(i,t,"from",s),r=this.createFromToElement(i,o,"to",s),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),i}createFromToElement(e,t,o,s){const i=this.createManagedBean(s?new $t({allowedCharPattern:s}):new nl);return i.addCss(`ag-filter-${o}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){const o=s=>this.removeComponents(s,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(o,s,i,n)=>{s<n&&t.push(fn(Ig(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},s=this.getValues(e);return s.length>0&&(o.filter=s[0]),s.length>1&&(o.filterTo=s[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 Ig(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(Ig(e,t.getValue(!0)))}function sD(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Ag=class extends Ln{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=dl}conditionToString(e,t,o,s,i){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),s,i);if(c!=null)return c}return o?`${l(n)}-${l(r)}`:n!=null?l(n):`${a}`}},iD=class extends cl{constructor(){super(Tg,yl),this.filterType="number",this.FilterModelFormatterClass=Ag}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},nD=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,s=>this.onValueChanged(s)),this.setupListeners(o,s=>this.onValueChanged(s))}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)}},rD=class extends hl{constructor(){super(...arguments),this.FilterModelFormatterClass=Ag,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 nD)}convertValue(e){return e?Number(e):null}},Rl=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],aD=class extends kn{constructor(){super("textFilter",yg,Rl),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(o.filter=s[0]),s.length>1&&(o.filterTo=s[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,s,i,n)=>{s<n&&t.push(Nt(o.getValue()))}),t}createEValue(){const e=it({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 s=this.createManagedBean(new $t);s.addCss(`ag-filter-${o}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const o=n=>this.removeComponents(n,e,t),{eValuesFrom:s,eValuesTo:i}=this;o(s),o(i)}},kg=class extends Ln{constructor(){super(...arguments),this.filterTypeKeys=FP}conditionToString(e,t,o,s,i){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),s,i);if(c!=null)return c}return o?`${n}-${r}`:n!=null?`${n}`:`${a}`}},lD=({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 s=t.lastIndexOf(o);return s>=0&&s===t.length-o.length}default:return!1}},cD=e=>e,dD=e=>e==null?null:e.toString().toLowerCase(),uD=class extends bg{constructor(){super(yg,Rl),this.filterType="text",this.FilterModelFormatterClass=kg}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??lD,this.formatter=t.textFormatter??(t.caseSensitive?cD:dD)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,o,s){const i=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:s.node,data:s.data,filterOption:o.type,value:n,textFormatter:d};return i.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=o=>{const s={...o},{filter:i,filterTo:n}=o;return i&&(s.filter=ia(i)??null),n&&(s.filterTo=ia(n)??null),s};return Su(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},hD=class extends hl{constructor(){super(...arguments),this.FilterModelFormatterClass=kg,this.filterType="text",this.defaultOptions=Rl}createFloatingFilterInputService(){return this.createManagedBean(new ul)}};function gD(e){return!!e.quickFilter?.isFilterPresent()}function pD(e){return e.quickFilter?.getText()}function fD(e){e.quickFilter?.resetCache()}var mD=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:s}=this.beans,i=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(i&&!o.get("applyQuickFilterBeforePivotOrAgg")?s?.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 L(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 s=this.getTextForColumn(o,e);return L(s)&&s.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:s,matcher:i}=this;return i(s,o)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let o=this.beans.filterValueSvc.getValue(e,t);const s=e.getColDef();if(s.getQuickFilterText){const i=K(this.gos,{value:o,node:t,data:t.data,column:e,colDef:s});o=s.getQuickFilterText(i)}return L(o)?o.toString().toUpperCase():null}getAggText(e){const t=[];for(const o of this.colsToUse){const s=this.getTextForColumn(o,e);L(s)&&t.push(s)}return t.join(`
|
|
61
61
|
`)}},CD={moduleName:"ClientSideRowModelFilter",version:I,rowModels:["clientSide"],beans:[dF]},Fl={moduleName:"FilterCore",version:I,beans:[rP],apiFunctions:{isAnyFilterPresent:iP,onFilterChanged:nP},css:[Hx],dependsOn:[CD]},Lg={moduleName:"FilterValue",version:I,beans:[pP]},gi={moduleName:"ColumnFilter",version:I,beans:[sP,gP],dynamicBeans:{headerFilterCellCtrl:Ax},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Bx,getColumnFilterInstance:Vx,destroyFilter:Nx,setFilterModel:Wx,getFilterModel:zx,getColumnFilterModel:_x,setColumnFilterModel:Ux,showColumnFilter:$x,hideColumnFilter:Kx,getColumnFilterHandler:qx,doFilterAction:jx},dependsOn:[Fl,Tn,Lg,Gx]},vD={moduleName:"CustomFilter",version:I,userComponents:{agReadOnlyFloatingFilter:mP},dependsOn:[gi]},wD={moduleName:"TextFilter",version:I,dependsOn:[gi],userComponents:{agTextColumnFilter:{classImp:aD,params:{useForm:!0}},agTextColumnFloatingFilter:hD},dynamicBeans:{agTextColumnFilterHandler:uD}},bD={moduleName:"NumberFilter",version:I,dependsOn:[gi],userComponents:{agNumberColumnFilter:{classImp:oD,params:{useForm:!0}},agNumberColumnFloatingFilter:rD},dynamicBeans:{agNumberColumnFilterHandler:iD}},SD={moduleName:"BigIntFilter",version:I,dependsOn:[gi],userComponents:{agBigIntColumnFilter:{classImp:yP,params:{useForm:!0}},agBigIntColumnFloatingFilter:PP},dynamicBeans:{agBigIntColumnFilterHandler:EP}},yD={moduleName:"DateFilter",version:I,dependsOn:[gi],userComponents:{agDateColumnFilter:{classImp:DP,params:{useForm:!0}},agDateInput:tD,agDateColumnFloatingFilter:XP},dynamicBeans:{agDateColumnFilterHandler:IP}},RD={moduleName:"QuickFilterCore",version:I,rowModels:["clientSide"],beans:[mD],dependsOn:[Fl,Lg]},FD={moduleName:"QuickFilter",version:I,apiFunctions:{isQuickFilterPresent:gD,getQuickFilter:pD,resetQuickFilter:fD},dependsOn:[RD]},ED={moduleName:"ExternalFilter",version:I,dependsOn:[Fl]},xD=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:s,rowNodes:i}=this;for(let n=0;n<e;n++){const r=o+n,a=new co(s);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),i.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:o,state:s}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:o,pageStatus:s}}}setDataAndId(e,t,o){L(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:s,filterModel:i},gos:n}=this;return K(n,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,o),failCallback:this.pageLoadFailed.bind(this,o),sortModel:s,filterModel:i})}forEachNode(e,t,o){this.rowNodes.forEach((s,i)=>{this.startRow+i<o&&e(s,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((i,n)=>{const r=e.rowData?e.rowData[n]:void 0;!i.id&&i.alreadyRendered&&r&&(t[n]=new co(o),t[n].setRowIndex(i.rowIndex),t[n].setRowTop(i.rowTop),t[n].setRowHeight(i.rowHeight),i._destroy(!0)),this.setDataAndId(t[n],r,this.startRow+n)});const s=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,s)}destroy(){const e=this.rowNodes;for(let t=0,o=e.length;t<o;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},PD=2,DD=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 s=this.blocks[o];if(!s){if(t)return;s=this.createBlock(o)}return s.getRow(e)}createBlock(e){const t=this.params,o=this.createBean(new xD(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 s=this.params.maxBlocksInCache>0,i=s?this.params.maxBlocksInCache-1:null,n=PD-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=s?a>=i:!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:s}=e;return t.rowIndex>=o&&t.rowIndex<s}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:s}=this.params,n=(e.id+1)*o+s;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,L(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,s)=>o.id-s.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 s=-1,i=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(i&&s+1!==l.id){r=!0;continue}s=l.id,l.forEachNode(c=>{const d=c===e||c===t;(i||d)&&o.push(c),d&&(i=!i)},n,this.rowCount)}return r||i?[]:o}},MD=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=!js(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;vs(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:s,eventSvc:i,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:o?.getSortModel()??[],rowNodeBlockLoader:s,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 DD(this.cacheParams)),i.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 TD(e){xn(e)?.refreshCache()}function ID(e){xn(e)?.purgeCache()}function AD(e){return xn(e)?.getRowCount()}var kD=class extends x{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Gf(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:s}=t.getBlockStateJson();e[o]=s}),e}printCacheStatus(){Oo(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},LD={moduleName:"InfiniteRowModelCore",version:I,rowModels:["infinite"],beans:[MD,kD]},OD={moduleName:"InfiniteRowModel",version:I,apiFunctions:{refreshInfiniteCache:TD,purgeInfiniteCache:ID,getInfiniteRowCount:AD},dependsOn:[LD,sF]},GD=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,s=!Vi.has(e),i=s?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(o),this.eventSvc.addListener(e,o,s)}removeListener(e,t){const o=this.wrapSvc?.unwrap(e,t)??t,i=!!this.asyncListeners.get(e)?.delete(o);i||this.syncListeners.get(e)?.delete(o),this.eventSvc.removeListener(e,o,i)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,o=(n,r)=>{Vi.has(n)&&t(n,r)},s=(n,r)=>{Vi.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:s});const i=this.eventSvc;i.addGlobalListener(o,!1),i.addGlobalListener(s,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:s}=this,i=o?.unwrapGlobal(e)??e;if(s.has(i)){const{syncListener:r,asyncListener:a}=s.get(i);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),s.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((o,s)=>{o.forEach(i=>this.eventSvc.removeListener(s,i,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:s})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(s,!0)}),e.clear()}};function HD(e,t,o){e.apiEventSvc?.addListener(t,o)}function BD(e,t,o){e.apiEventSvc?.removeListener(t,o)}function VD(e,t){e.apiEventSvc?.addGlobalListener(t)}function ND(e,t){e.apiEventSvc?.removeGlobalListener(t)}var WD={moduleName:"EventApi",version:I,apiFunctions:{addEventListener:HD,addGlobalListener:VD,removeEventListener:BD,removeGlobalListener:ND},beans:[GD]},zD=class extends x{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?rf(t):af(e.get("localeText"))}},_D={moduleName:"Locale",version:I,beans:[zD]};function UD(e){return e.stateSvc?.getState()??{}}function $D(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=KD(e)),e.version=I,e}function KD(e){return e.cellSelection=qD(e,"rangeSelection"),e}function qD(e,t){if(e&&typeof e=="object")return e[t]}var jD=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 s=ld(e.get("initialState")??{}),i=s.partialColumnState;delete s.partialColumnState,this.cachedState=s;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(s))),(s.columnOrder||s.columnVisibility||s.columnSizing||s.columnPinning||s.columnGroup)&&o?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(s,!!i),o?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(s))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(s))}})}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 s="api",i=t?new Set(t):void 0;this.setGridReadyState(o,s,i),this.setColumnsInitialisedState(o,s,!!i,i),this.setRowCountState(o,s,i),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,s,i),this.stopSuppressEvents(s)})}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,s){this.setColumnState(e,t,o,s),this.setColumnGroupState(e,t,s),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=s=>()=>this.updateColumnState([s]);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:s})=>{this.updateColumnAndGroupState(),s!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:s,rowGroupExpansion:i,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a,rowPinning:l}=e,c=(u,h)=>!o?.has(u)&&(h||t==="api");c("filter",s)&&this.setFilterState(s),(c("rowGroupExpansion",i)||c("ssrmRowGroupExpansion",n))&&this.setRowGroupExpansionState(n,i,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()},s=()=>t("filter",this.getFilterState()),{gos:i,colFilter:n,selectableFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:s,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(i.get("groupDefaultExpanded")!==0||i.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:s}),r&&this.addManagedListeners(r,{selectedFilterChanged:s})}setFirstDataRenderedState(e,t,o){const{scroll:s,cellSelection:i,focusedCell:n,columnOrder:r}=e,a=(d,u)=>!o?.has(d)&&(u||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",i)&&this.setCellSelectionState(i),a("scroll",s)&&this.setScrollState(s),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:s=>{if(s.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return I1(cn(e),e.colModel.isPivotMode())}setColumnState(e,t,o,s){const{sort:i,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const g=(P,A)=>{const M=!s?.has(P)&&!!(A||t==="api");return h||(h=M),M},f={},m=P=>{let A=f[P];return A||(A={colId:P},f[P]=A,A)},C={},v=g("sort",i);v&&i?.sortModel.forEach(({colId:P,sort:A,type:M},J)=>{const T=m(P);T.sort=A,T.sortIndex=J,T.sortType=M}),(v||!o)&&(C.sort=null,C.sortIndex=null);const w=g("rowGroup",n);w&&n?.groupColIds.forEach((P,A)=>{const M=m(P);M.rowGroup=!0,M.rowGroupIndex=A}),(w||!o)&&(C.rowGroup=null,C.rowGroupIndex=null);const b=g("aggregation",r);b&&r?.aggregationModel.forEach(({colId:P,aggFunc:A})=>{m(P).aggFunc=A}),(b||!o)&&(C.aggFunc=null);const y=g("pivot",a);y&&(a?.pivotColIds.forEach((P,A)=>{const M=m(P);M.pivot=!0,M.pivotIndex=A}),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:A,width:M}of d?.columnSizingModel??[]){const J=m(P);J.flex=A??null,J.width=M}(E||!o)&&(C.flex=null);const G=u?.orderedColIds,k=!!G?.length&&!s?.has("columnOrder"),O=k?G.map(P=>m(P)):Object.values(f);(O.length||h)&&(this.columnStates=O,Ct(this.beans,{state:O,applyOrder:k,defaultState:C},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const s=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:n,colGroupSvc:r}=i;if(n?.isPivotResultColsPresent()){if(o){const a=[];for(const l of o)n.getPivotResultCol(l.colId)&&a.push(l);Ct(i,{state:a,applyOrder:e},t)}s&&r?.setColumnGroupState(s,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return A1(t)}setColumnGroupState(e,t,o){const s=this.beans.colGroupSvc;if(!s||o?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const i=new Set(e.columnGroup?.openColumnGroupIds),r=s.getColumnGroupState().map(({groupId:a})=>{const l=i.has(a);return l&&i.delete(a),{groupId:a,open:l}});for(const a of i)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),s.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 s=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0,n=t?.getState();return o||i||s||n?{filterModel:o,columnFilterState:s,advancedFilterModel:i,selectableFilters:n}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:o}=this.beans,{filterModel:s,columnFilterState:i,advancedFilterModel:n,selectableFilters:r}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};r!==void 0&&o?.setState(r??{}),(s!==void 0||i!==void 0)&&t?.setFilterState(s??null,i??null,"columnFilter"),n!==void 0&&t?.setAdvFilterModel(n??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:o,type:s,startRow:i,endRow:n,columns:r,startColumn:a}=t;return{id:o,type:s,startRow:i,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:s,visibleCols:i}=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=s.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=s.getCol(r.startColId);if(!l){const c=i.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:s,rowRenderer:i,animationFrameSvc:n,ctrlsSvc:r}=this.beans;s.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(o),r.getScrollFeature()?.setVerticalScrollPosition(t),i.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:s}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:s,rowIndex:i,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(s),rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),s=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!s))return{page:o,pageSize:s}}setPaginationState(e,t){const{pagination:o,gos:s}=this.beans;if(!o)return;const{pageSize:i,page:n}=e??{page:0,pageSize:s.get("paginationPageSize")},r=t==="gridInitializing";i&&!s.get("paginationAutoPageSize")&&o.setPageSize(i,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(),s=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",s?o:void 0),this.updateCachedState("rowGroupExpansion",s?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 s=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(s,o)}updateColumnState(e){const t=this.getColumnState();let o=!1;const s=this.cachedState;for(const i of Object.keys(t)){const n=t[i];js(n,s[i])||(o=!0)}this.cachedState={...s,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),js(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")}},YD={moduleName:"GridState",version:I,beans:[jD],apiFunctions:{getState:UD,setState:$D}};function QD(e){return e.rowModel.isLastRowIndexKnown()}function ZD(e){return e.pagination?.getPageSize()??100}function JD(e){return e.pagination?.getCurrentPage()??0}function XD(e){return e.pagination?.getTotalPages()??1}function eM(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function tM(e){e.pagination?.goToNextPage()}function oM(e){e.pagination?.goToPreviousPage()}function sM(e){e.pagination?.goToFirstPage()}function iM(e){e.pagination?.goToLastPage()}function nM(e,t){e.pagination?.goToPage(t)}var rM=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 s=Math.max(Do(t),1),i=Math.floor(e/s);t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?xe(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function aM(e,t){if(typeof e!="number")return"";const o=t(),s=o("thousandSeparator",","),i=o("decimalSeparator",".");return e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${s}`)}var ks="paginationPageSizeSelector",lM={tag:"span",cls:"ag-paging-page-size"},cM=class extends ye{constructor(){super(lM),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(ks,()=>{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(ks)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){const i=this.gos.exists("paginationPageSize"),n=this.gos.get(ks)!==!0;D(94,{pageSizeSet:i,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||D(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ks}),e.unshift("")}const s=String(o?"":t);this.selectPageSizeComp?(ho(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const o=this.getLocaleTextFunc(),s=o("pageSizeSelectorLabel","Page Size:"),i=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new rl).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ks);return!Array.isArray(t)||!t?.length?e:[...t].sort((o,s)=>o-s)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},dM={selector:"AG-PAGE-SIZE-SELECTOR",component:cM},uM=".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}",hM=class extends Lv{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(uM)}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(),[dM]);const{btFirst:t,btPrevious:o,btNext:s,btLast:i}=this;this.activateTabIndex([t,o,s,i]),t.insertAdjacentElement("afterbegin",Je(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",Je(e?"next":"previous",this.beans)),s.insertAdjacentElement("afterbegin",Je(e?"previous":"next",this.beans)),i.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):BC(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:s=>{(s.key===R.ENTER||s.key===R.SPACE)&&(s.preventDefault(),o())}})}HC(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}):aM(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 s=this.isZeroPagesToDisplay(),i=e===o-1;this.nextButtonDisabled=i||s,this.lastButtonDisabled=!t||s||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Lp(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(),s=e?o:null,i=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*i+1,a=r+n-1,e&&a>s&&(a=s));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?i+1:0,m=this.formatNumber(f);this.lbCurrent.textContent=m;let C,v;if(e)C=this.formatNumber(t),v=this.formatNumber(s);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,s,i){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${o}`,d=`${r} ${s} ${l} ${i}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},gM={selector:"AG-PAGINATION",component:hM},pM=100,fM=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 gM}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 L(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:L(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:L(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:L(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:pM}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,s=t-1;this.totalPages=Math.floor(s/o)+1,this.adjustCurrentPageIfInvalid();const i=this.currentPage,n=o*i;let r=o*(i+1)-1;if(r>s&&(r=s),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===s)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,s=e-1;this.totalPages=Math.floor(s/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>s&&(this.bottomDisplayedRowIndex=s)}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:s=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:s,keepRenderedRows:t})}},mM={moduleName:"Pagination",version:I,beans:[fM,rM],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:QD,paginationGetPageSize:ZD,paginationGetCurrentPage:JD,paginationGetTotalPages:XD,paginationGetRowCount:eM,paginationGoToNextPage:tM,paginationGoToPreviousPage:oM,paginationGoToFirstPage:sM,paginationGoToLastPage:iM,paginationGoToPage:nM},dependsOn:[Tn]},CM=".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 vM(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function wM(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function bM(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function SM(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function yM(e,t,o){return e.pinnedRowModel?.forEachPinnedRow(t,o)}var RM={moduleName:"PinnedRow",version:I,beans:[yC],css:[CM],apiFunctions:{getPinnedTopRowCount:vM,getPinnedBottomRowCount:wM,getPinnedTopRow:bM,getPinnedBottomRow:SM,forEachPinnedRow:yM},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},FM="↑",EM="↓",xM={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},PM=class extends ye{constructor(){super(xM),this.eValue=W,this.eDelta=W,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),s=e.formatValue(o),i=L(s)?s:o,n=t>=0,r=this.eDelta;n?r.textContent=FM+i:r.textContent=EM+i,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:s}=e,{eValue:i,lastValue:n,beans:r}=this;if(o===n||(L(s)?i.textContent=s:L(o)?i.textContent=o:Xe(i),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&&i.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},DM=".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}",MM={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},TM=class extends ye{constructor(){super(MM),this.eCurrent=W,this.refreshCount=0,this.registerCSS(DM)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:o}=this,s=it({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=s,s.textContent=o.textContent,this.getGui().insertBefore(s,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 s=this.eCurrent;return L(e.valueFormatted)?s.textContent=e.valueFormatted:L(e.value)?s.textContent=o:Xe(s),!0}},IM=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"),s=this.beans.gos.get("cellFadeDuration")){const i=this.animations[t];i.delete(e);const n=Date.now(),r=n+o,a=n+o+s,l={phase:"flash",flashEndTime:r,fadeEndTime:a};i.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 s=this.animations[o],i=`ag-cell-${o}`,n=`${i}-animation`;for(const[r,a]of s){if(!r.isAlive()||!r.comp){s.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(i,!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(i,!1),g.toggleCss(n,!1),f.removeProperty("transition"),f.removeProperty("transition-delay"),s.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=AC(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 AM(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{for(const s of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))o.flashCell(s,t)})}var kM={moduleName:"HighlightChanges",version:I,beans:[IM],userComponents:{agAnimateShowChangeCellRenderer:PM,agAnimateSlideCellRenderer:TM},apiFunctions:{flashCells:AM}};function LM(e,t,o){if(!t)return;const s=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;o===null?s.removeAttribute(i):s.setAttribute(i,o)}function OM(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function GM(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function HM(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function BM(e){e.animationFrameSvc?.flushAllFrames()}function VM(e){return{rowHeight:Do(e),headerHeight:ci(e)}}function NM(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 s=[],i=jr(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(i&&!Yr(n.rowNode,i)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&s.push(No(l))}}return[...s,...o]}var WM={moduleName:"RenderApi",version:I,apiFunctions:{setGridAriaProperty:LM,refreshCells:OM,refreshHeader:GM,isAnimationFrameQueueEmpty:HM,flushAllAnimationFrames:BM,getSizesForCurrentTheme:VM,getCellRendererInstances:NM}},zM=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:s}=this.beans,i=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=ro(this.beans,a).height;for(const d of i){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)};s?.forEachPinnedRow?.("top",r),s?.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 s=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,s!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:s,visibleCols:i}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=i.getLeftColsForRow(t);break;case"right":n=i.getRightColsForRow(t);break;case null:n=s.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const s=t.parentElement,{rowNode:i,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(s),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(i,v,n)},l=()=>a(0);l();const c=Kt(r,t,l);return o.addDestroyFunc(()=>{c(),this.setRowAutoHeight(i,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(i=>i.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const s of t){const i=o.__autoHeights[s.getColId()];if(!i||o.rowHeight<i)return!1}}return!0}},_M={moduleName:"RowAutoHeight",version:I,beans:[zM]},UM=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}},$M=class extends x{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:o,pinnedRowModel:s,rowModel:i,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 UM(t,f),c.set(f,m)}m.addSpannedNode(b),c.set(b,m)};switch(e){case"center":i.forEachDisplayedNode?.(b=>{(!r||r.isRowInPage(b.rowIndex))&&w(b)}),this.centerValueNodeMap=c;break;case"top":s?.forEachPinnedRow("top",w),this.topValueNodeMap=c;break;case"bottom":s?.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}}},KM=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 $M(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,s=e.column,i=e.rowIndex,n=this.spanningColumns.get(s);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(i);break;case"bottom":r=t?.getPinnedBottomRow(i);break;default:r=o.getRow(i)}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,s]of this.spanningColumns)if(s.isCellSpanning(e)){const i=s.getCellSpan(e);t(o,i)}}destroy(){super.destroy(),this.spanningColumns.clear()}},qM=class extends ms{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,s,i,n,r){this.eWrapper=o,super.setComp(e,t,o,s,i,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(){Bp(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(si(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}},jM=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 qM(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(){}},YM=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),s=o.size,i=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of i)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 jM(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===s;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 s=this.getCtrlsMap(e.rowPinned).get(o.firstNode);if(s)return s.getAllCellCtrls().find(i=>i.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")}},QM={moduleName:"CellSpan",version:I,beans:[KM,YM]},ZM=class extends x{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,gs(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),hm(e))}createColumns(e,t){const o=()=>{en(this.beans,this.columns?.tree),this.columns=null},s=e.treeDepth,n=(this.columns?.treeDepth??-1)==s,r=this.generateSelectionCols();if(um(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=gs(e.source),{beans:o}=this;for(const s of this.columns?.list??[]){const i=this.createSelectionColDef(e.currentValue);s.setColDef(i,null,t),Ct(o,{state:[pm(i,s.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Ws(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 s=(t.autoColSvc?.getColumns()?.length??0)>0;if(o.checkboxLocation==="autoGroupColumn"&&s)return!1;const i=!!ds(o),n=Ii(o);return i||n}createSelectionColDef(e){const{gos:t}=this,o=e??t.get("selectionColumnDef"),s=t.get("enableRtl"),{rowSpan:i,spanRows:n,...r}=o??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:s?"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 s=t&&typeof t!="string"?ds(t):void 0,i=e&&typeof e!="string"?ds(e):void 0,n=s!==i,r=t&&typeof t!="string"?Ii(t):void 0,a=e&&typeof e!="string"?Ii(e):void 0,l=r!==a,c=Qi(e),d=Qi(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 s=e.length+t.length+o.length;if(s===0)return;const i=this.columns.list[0];if(!i.isVisible())return;const n=()=>{let l;switch(i.pinned){case"left":case!0:l=e;break;case"right":l=o;break;default:l=t}l&&At(l,i)};(this.beans.rowNumbersSvc?.getColumn(Ia)?2:1)===s&&n()}},JM=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function XM(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:s,source:i,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:s,source:i??"api",newValue:n})}function eT(e,t,o="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:o,selectAll:t})}function tT(e,t,o="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:o,selectAll:t})}function oT(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function sT(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function iT(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function nT(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function rT(e){return e.selectionSvc?.getSelectedNodes()??[]}function aT(e){return e.selectionSvc?.getSelectedRows()??[]}var lT={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},cT=class extends ye{constructor(){super(lT,[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,s=t.isSelected(),i=Sn(e,s),[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(s,!0),o.setInputAriaLabel(`${a} (${i})`)}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:s=>{Bo(s),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(s,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:s,previousValue:i})=>{const n=typeof s=="object"?Wn(s):void 0,r=typeof i=="object"?Wn(i):void 0;n!==r&&this.onSelectableChanged()}),Ir(this.gos)||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s}),this.addManagedListeners(this.rowNode,{dataChanged:s,cellChanged:s}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:o,gos:s}=this,i=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=i&&!r||!i&&r,l=i||r,c=s.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"?ds(t):this.column?.getColDef()?.checkboxSelection}},dT=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:s}=this;return t??(t=o.getRowNode(e)),s?.isManual()&&(t??(t=s.getPinnedRowById(e,"top")),t??(t=s.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const o=t[0].id===this.rootId,s=t.findIndex(i=>i.id===e.id);if(s>-1){const i=t.slice(0,s),n=t.slice(s+1);return this.setEndRange(e),o?{keep:i,discard:n}:{keep:n,discard:i}}else return{keep:t,discard:[]}}extend(e,t=!1){const o=this.getRoot();if(o==null){const i=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&i.push(n)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}const s=this.getNodesInRange(o,e);if(!s)return this.setRoot(e),{keep:[e],discard:[]};if(s.find(i=>i.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const i=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:i}}}getNodesInRange(e,t){const{pinnedRowModel:o,rowModel:s}=this;if(!o?.isManual())return s.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return rt(o,"top",e,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const i=rt(o,"bottom",void 0,e),n=s.getRowCount(),r=s.getRow(n-1);return(s.getNodesInRangeForSelection(t,r)??[]).concat(i)}if(!e.rowPinned&&!t.rowPinned)return s.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return rt(o,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const i=rt(o,"top",t,void 0),n=rt(o,"bottom",void 0,e),r=s.getRow(0),a=s.getRow(s.getRowCount()-1);return i.concat(s.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return rt(o,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const i=rt(o,"top",e,void 0),n=rt(o,"bottom",void 0,t),r=s.getRow(0),a=s.getRow(s.getRowCount()-1);return i.concat(s.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 i=rt(o,"bottom",void 0,t),n=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(e,n)??[]).concat(i)}return null}},uT=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:s,previousValue:i})=>{const n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(s)!==n(i)&&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,s=t.getSelectAllState(e);o.setValue(s);const i=t.hasNodesToSelect(e);o.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:s,cbSelectAllVisible:i}=this,n=s.getValue(),r=Sn(t,n),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",i?`${a} (${r})`:null),s.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return Ji(this.gos)?!0:(D(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:o}=this.beans;return Se(t)||xs(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 s={source:o,selectAll:t},i=this.beans.selectionSvc;e?i.selectAllRowNodes(s):i.deselectAllRowNodes(s)}isCheckboxSelection(){const{column:e,gos:t,beans:o}=this,n=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return Og(o,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=cu(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 Og({gos:e,selectionColSvc:t},o){const s=e.get("rowSelection"),i=o.getColDef(),{headerCheckboxSelection:n}=i;let r=!1;if(typeof s=="object"){const l=go(o),c=Aa(o);(Qi(s)==="autoGroupColumn"&&c||l&&t?.isSelectionColumnEnabled())&&(r=Ii(s))}else typeof n=="function"?r=n(K(e,{column:o,colDef:i})):r=!!n;return r}var hT=class extends x{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new dT(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 cT}createSelectAllFeature(e){if(Og(this.beans,e))return new uT(e)}isMultiSelect(){return Ji(this.gos)}onRowCtrlSelected(e,t,o){const s=!!e.rowNode.isSelected();e.forEachGui(o,i=>{i.rowComp.toggleCss("ag-row-selected",s);const n=i.element;Id(n,s),n.contains(ve(this.beans))&&t(i)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),o=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||o)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"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(ti(this.gos)){const i=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:i??!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 s=0;s<e.childrenAfterGroup.length;s++){const i=e.childrenAfterGroup[s];let n=i.isSelected();if(!i.selectable){const r=this.calculateSelectedFromChildren(i);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,s="api"){if(t&&e.destroyed)return!1;const i=!e.selectable&&t,n=e.__selected===t;if(i||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({...gC(e,this.gos,"rowSelected"),event:o||null,source:s}),!0}isCellCheckboxSelection(e,t){const o=this.gos.get("rowSelection");if(o&&typeof o!="string"){const s=go(e)&&ds(o);return e.isColumnFunc(t,s)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,o,s){const{gos:i,selectionCtx:n}=this,r=e.isSelected(),a=ti(i),l=Bf(i),c=Vf(i),d=this.isMultiSelect(),u=s==="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=Nf(i),g=Xi(i)==="filteredDescendants",f=u&&(!h||!l);if(g&&r===void 0&&Se(i))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}}}},gT=class extends hT{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=Zi(e),this.groupSelectsDescendants=ti(e),this.groupSelectsFiltered=Xi(e)==="filteredDescendants",this.masterSelectsDetail=Gl(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=ti(e),o=Zi(e),s=Xi(e)==="filteredDescendants";this.masterSelectsDetail=Gl(e)==="detail",(t!==this.groupSelectsDescendants||s!==this.groupSelectsFiltered||o!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=s,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 s=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);if(s==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in s)return s.reset?this.resetNodes():this.selectRange(s.deselect,!1,o),this.selectRange(s.select,!0,o);{const i=s.checkFilteredNodes?Hg(s.node):s.newValue;return this.setNodesSelected({nodes:[s.node],newValue:i,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:e,source:o})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:o,nodes:s,event:i,source:n,keepDescendants:r=!1}){if(s.length===0)return 0;const{gos:a}=this;if(!Po(a)&&e)return D(132),0;if(s.length>1&&!this.isMultiSelect())return D(130),0;let l=0;for(let c=0;c<s.length;c++){const d=s[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,i,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))}return o||(s.length===1&&n==="api"&&this.selectionCtx.setRoot(s[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(s[0].primaryRow,r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,o){let s=0;return e.forEach(i=>{const n=i.primaryRow;if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,o)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o)),s}selectChildren(e,t,o){const s=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return s?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:o,nodes:s}):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,s)=>{e(o)&&t.set(s,o)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:o,rowModel:s}=this.beans;if(!Se(o))return!1;const i=s.rootNode;if(!i)return!1;let n=!1;const r=a=>{if(a!==i){const l=this.calculateSelectedFromChildren(a);n=this.selectRowNode(a,l===null?!1:l,void 0,e)||n}};return zo(i,this.beans.rowModel.hierarchical,t,r),n}clearOtherNodes(e,t,o){const s=new Map;let i=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!fT(e,n):!0)&&!r){const l=this.selectedNodes.get(n.id);i+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:o}),this.groupSelectsDescendants&&n.parent&&s.set(n.parent.id,n.parent)}}),s.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,o)}),i}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 s=[];function i(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?s.push(l):l.group&&l.childrenAfterGroup&&i(l.childrenAfterGroup)}}return i(o),s}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const o=Se(this.gos);let s=!1;const i=n=>{const r=this.selectRowNode(n.primaryRow,!1,void 0,e);s||(s=r)};if(t==="currentPage"||t==="filtered"){if(!o){ce(102);return}this.getNodesToSelect(t).forEach(i)}else this.selectedNodes.forEach(i),this.reset(e);if(this.selectionCtx.selectAll=!1,o&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);s||(s=n)}s&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,o=0;return this.getNodesToSelect(e).forEach(s=>{this.groupSelectsDescendants&&s.group||(s.isSelected()?t++:s.selectable&&o++)}),{selectedCount:t,notSelectedCount:o}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:o}=this.getSelectedCounts(e);return Gg(t,o)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],o=i=>t.push(i);if(e==="currentPage")return this.forEachNodeOnPage(i=>{if(!i.group){o(i);return}if(!i.footer&&!i.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(i);return}this.groupSelectsDescendants||o(i)}),t;const s=this.beans.rowModel;return e==="filtered"?(s.forEachNodeAfterFilter(o),t):(s.forEachNode(o),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:o}=this.beans,s=t.getFirstRow(),i=t.getLastRow();for(let n=s;n<=i;n++){const r=o.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:o}=this;if(!Po(t)){D(132);return}if(Hf(t)&&!Ji(t)){D(130);return}if(!this.canSelectAll())return;const{source:s,selectAll:i}=e;let n=!1;if(this.getNodesToSelect(i).forEach(r=>{const a=this.selectRowNode(r.primaryRow,!0,void 0,s);n||(n=a)}),o.selectAll=!0,Se(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(s);n||(n=r)}n&&this.dispatchSelectionChanged(s)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,o){if(e||(e=[]),!Array.isArray(e)){ce(103);return}const s=new Set(e),i=[];this.beans.rowModel.forEachNode(n=>{s.has(n.id)&&i.push(n)}),o&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){return Se(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:o}=this.beans;if(!Po(t))return;const s="selectableChanged",i=Se(t)&&this.groupSelectsDescendants,n=[];if(i){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:s}),!e&&i&&this.updateGroupsFromChildrenSelections?.(s)}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 s=pT(o);e.isSelected()!==s&&this.selectRowNode(e,s,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),s||this.detailSelection.set(e.id,new Set(o.getSelectedNodes().map(n=>n.id)))}setDetailSelectionState(e,t,o){if(this.masterSelectsDetail){if(!Ji(t)){D(269);return}switch(e.isSelected()){case!0:{o.selectAll();break}case!1:{o.deselectAll();break}case void 0:{const s=this.detailSelection.get(e.id);if(s){const i=[];for(const n of s){const r=o.getRowNode(n);r&&i.push(r)}o.setNodesSelected({nodes:i,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function pT(e){let t=0,o=0;return e.forEachNode(s=>{s.isSelected()?t++:s.selectable&&o++}),Gg(t,o)}function Gg(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function fT(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}function Hg(e){const t=e.isSelected()===!1,o=e.childrenAfterFilter?.some(Hg)??!1;return t||o}var mT={moduleName:"SharedRowSelection",version:I,beans:[ZM],css:[JM],apiFunctions:{setNodesSelected:XM,selectAll:eT,deselectAll:tT,selectAllFiltered:oT,deselectAllFiltered:sT,selectAllOnCurrentPage:iT,deselectAllOnCurrentPage:nT,getSelectedNodes:rT,getSelectedRows:aT}},CT={moduleName:"RowSelection",version:I,rowModels:["clientSide","infinite","viewport"],beans:[gT],dependsOn:[mT]},vT=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,s=o.cellClassRules,i=this.getCellClassParams(e,o);ol(this.beans.expressionSvc,s===this.cellClassRules?void 0:this.cellClassRules,s,i,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=s}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let s;if(typeof o=="function"){const i=this.getCellClassParams(e,t);s=o(i)}else s=o;s&&this.cellComp.setUserStyles(s)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,s=this.getCellClassParams(e,o);for(const n of this.staticClasses)t.toggleCss(n,!1);const i=this.beans.cellStyles.getStaticCellClasses(o,s);this.staticClasses=i;for(const n of i)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:o,rowNode:s}=this.cellCtrl;return K(this.beans.gos,{value:o,data:s.data,node:s,colDef:t,column:e,rowIndex:s.rowIndex})}},wT=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,s){ol(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,s),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let s;return typeof o=="function"?s=o(t):s=o,typeof s=="string"&&(s=[s]),s||[]}createCellCustomStyleFeature(e){return new vT(e,this.beans)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(i=>{o(i)})}},bT={moduleName:"CellStyle",version:I,beans:[wT]},ST={moduleName:"RowStyle",version:I,beans:[fR]},yT={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",RT={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]},FT={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 ET(e,t,o){const s=FT[e];if(s){const{version:n,new:r,old:a,message:l}=s,c=a??e;return(...d)=>{const u=r?`Please use ${r} instead. `:"";return Ns(`Since ${n} api.${c} is deprecated. ${u}${l??""}`),t.apply(t,d)}}const i=RT[e];return i?(...n)=>{const r=o.rowModel.getType();if(!i.includes(r)){as(`api.${e} can only be called when gridOptions.rowModelType is ${i.join(" or ")}`);return}return t.apply(t,n)}:t}var xT={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"},PT={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},DT={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"},MT=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),TT=class extends x{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,Rf(P1)}warnOnInitialPropertyUpdate(e,t){e==="api"&&yT[t]&&D(22,{key:t})}processGridOptions(e){this.processOptions(e,m0())}validateApiFunction(e,t){return ET(e,t,this.beans)}missingUserComponent(e,t,o,s){const i=fs[t];i?this.gos.assertModuleRegistered(i,`AG Grid '${e}' component: ${t}`):D(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:s})}missingDynamicBean(e){const t=xT[e];return t?It(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){AT.has(e)&&D(10,{eventType:e})}validateIcon(e){if(MT.has(e)&&D(43,{iconName:e}),PT[e])return;const t=DT[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!!fs[e]}validateColDef(e){this.processOptions(e,n0())}processOptions(e,t){const{validations:o,deprecations:s,allProperties:i,propertyExceptions:n,objectName:r,docsUrl:a}=t;i&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(s)],i,r,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=s[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)Ns(d)}checkForRequiredDependencies(e,t,o){const i=Object.entries(t).filter(([n,r])=>{const a=o[n];return!r.required.includes(a)});return i.length===0?null:i.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,s,i){const n=["__ob__","__v_skip","__metadata__"],r=IT(Object.getOwnPropertyNames(e),[...n,...t,...o],o),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${s} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;o.includes("context")&&(d+=`
|
|
63
|
-
If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),Ns(d)}if(a.length>0&&i){const l=this.beans.frameworkOverrides.getDocLink(i);Ns(`to see all the valid ${s} properties please check: ${l}`)}}};function IT(e,t,o){const s={},i=e.filter(n=>!t.some(r=>r===n));if(i.length>0)for(const n of i)s[n]=Qr({inputValue:n,allSuggestions:o}).values;return s}var AT=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),kT={moduleName:"Validation",version:I,beans:[TT]},LT={moduleName:"AllCommunity",version:I,dependsOn:[DF,QF,OD,kT,Rx,Fx,Ex,xx,Px,Dx,Mx,yx,wD,bD,SD,yD,vD,FD,ED,YD,L1,mM,ph,q1,j1,WM,OF,bw,RM,CT,g1,bT,NF,ST,WD,m1,kM,lg,_D,_M,ww,MF,QM]};function N(e,t={}){const o=Object.keys(t).map(s=>{const i=t[s];return i!=null?`${s}=${i}`:null}).filter(Boolean).join(";");return[e,o].filter(s=>s.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`,Pi(e))},numberFilterInstanceInput(e){return N(`ag-${e.source}-number-input`,Pi(e))},textFilterInstanceInput(e){return N(`ag-${e.source}-text-input`,Pi(e))},dateFilterInstanceInput(e){return N(`ag-${e.source}-date-input`,Pi(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 OT(e,t){const o={};for(const s of Object.keys(e))t[s]!==null&&(o[t[s]??s]=e[s]);return o}function GT(e){return e.source!=="floating-filter"?{index:0,...e}:e}function Pi(e){return OT(GT(e),{colLabel:"label"})}var Bg="data-testid";function _(e,t){e?.setAttribute(Bg,t)}function HT(e){Bg=e}var BT=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=Zu(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 s=e.querySelector(".ag-filter-menu");this.setupFilterInstance(s,{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 i=e.querySelector(".ag-column-drop-wrapper");i&&this.setupColumnDropArea(i,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(i=>{_(i,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((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.numberFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.textFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.dateFilterInstanceInput(l))});const s=e.querySelector('.ag-mini-filter input[type="text"]');_(s,B.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(i=>{const n=i.querySelector(".ag-checkbox-label")?.textContent,r=i.querySelector('input[type="checkbox"]');_(r,B.setFilterInstanceItem(t,n))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(i=>{_(i,B.setFilterApplyPanelButton(t,i.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(i=>{const n=i.querySelector(".ag-radio-button-label")?.textContent;_(i.querySelector("input[type=radio]"),B.filterConditionRadioButton(t,n))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(o=>{const s=o.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");_(o,B.columnDropArea(t,s)),o.querySelectorAll(".ag-column-drop-cell").forEach(i=>{const n=i.querySelector(".ag-column-drop-cell-text")?.textContent;_(i.querySelector(".ag-drag-handle"),B.columnDropCellDragHandle(t,s,n)),_(i.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),B.columnDropCellCancelButton(t,s,n))})})}},VT={moduleName:"Testing",version:I,beans:[BT]};function NT({testIdAttribute:e}={}){e&&HT(e),Yd.registerModules([VT])}var WT=class{wrap(e,t,o,s){const i=this.createWrapper(e,s);for(const n of t??[])this.createMethod(i,n,!0);for(const n of o??[])this.createMethod(i,n,!1);return i}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)}}},zT=class extends Yu{constructor(e){super(e,Oa)}},We=p.createContext({}),Vg=p.createContext("default"),pi=(e,t,o,s)=>{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(s,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),s&&cd(s,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 Ng{constructor(...t){this.classesMap={};for(const o of t)this.classesMap[o]=!0}setClass(t,o){if(!!this.classesMap[t]==o)return this;const i=new Ng;return i.classesMap={...this.classesMap},i.classesMap[t]=o,i}toString(){return Object.keys(this.classesMap).filter(o=>this.classesMap[o]).join(" ")}},Ms=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],Wg=ca==="16"||ca==="17";function _T(){return ca==="19"}var Wi=!1;function UT(e){return Wi||setTimeout(()=>Wi=!1,0),Wi=!0,e()}var ri=(e,t)=>{!Wg&&e&&!Wi?ga.flushSync(t):t()},$T=e=>{Wg?e():p.startTransition(e)};function KT(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 s=[],i=[],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)&&s.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||i.push(l)}return s.length===e.length&&i.length===0?e:s.length===0&&i.length===t.length?t:s.length===0?i:i.length===0?s:[...s,...i]}var zg=p.forwardRef((e,t)=>{const{registry:o,context:s}=p.useContext(We),i=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(()=>pi(d,s,n.current),[d]);const G=p.useCallback(se=>{if(i.current=se,!se||s.isDestroyed()){c.current=s.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=s.createBean(Z),c.current.init($,se,r.current,a.current,l.current,zg,e))},[]),k=p.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),O=p.useMemo(()=>`ag-group-expanded ${w.toString()}`,[w]),P=p.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),A=p.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),M=d?.componentFromFramework,J=M?d.componentClass:void 0,T=d==null&&f!=null,j=Es(f);return p.createElement("span",{className:k,ref:G,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:O,ref:a}),p.createElement("span",{className:P,ref:l}),p.createElement("span",{className:A,ref:r}),p.createElement("span",{className:"ag-group-value",ref:n},T?j:M?p.createElement(J,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),dd=zg,El=p.createContext({setMethods:()=>{}}),qT=e=>{const{initialProps:t,addUpdateCallback:o,CustomComponentClass:s,setMethods:i}=e,[{key:n,...r},a]=p.useState(t);return p.useEffect(()=>{o(l=>a(l))},[]),p.createElement(El.Provider,{value:{setMethods:i}},p.createElement(s,{key:n,...r}))},jT=p.memo(qT),YT=0;function ud(){return`agPortalKey_${++YT}`}var _g=class{constructor(e,t,o,s){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=o,this.suppressFallbackMethods=!!s,this.statelessComponent=this.isStateless(this.reactComponent),this.key=ud(),this.portalKey=ud(),this.instanceCreated=this.isStatelessComponent()?ie.resolve(!1):new ie(i=>{this.resolveInstanceCreated=i})}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 s=o[e];if(s)return s.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 ie(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 s of e){const i=t[s];i&&(o[s]=i)}}var ht=class extends _g{constructor(){super(...arguments),this.awaitUpdateCallback=new ie(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=jT}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 ie(s=>{setTimeout(()=>{s()})})),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 ie(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},QT=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},ZT=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}},JT=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}},XT=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:s}=this;return e.label=t,e.icon=o,e.shake=s,e}},e2=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 ie(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 ie(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}},t2=class extends ht{constructor(){super(...arguments),this.awaitSetMethodsCallback=new ie(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 Ug(e,t){e.parentFilterInstance(o=>{(o.setModel(t)||ie.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var o2=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(),Ug(this.floatingFilterParams,e)}},s2=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(),Ug(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},i2=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},n2=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},r2=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}},a2=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},l2=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 c2=1e3,d2=class{constructor(e,t,o){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=o||c2}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){ri(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,o)})}}},u2=p.createContext([]),h2=p.createContext(void 0),g2=({ctrl:e})=>{const t=e.isAlive(),{context:o}=p.useContext(We),[s,i]=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 ai(()=>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 Ds);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?Wp(l.current,y):zp(l.current))},setUserCompDetails:y=>i(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(()=>pi(s,o,d.current,u),[s]),p.useEffect(()=>{e.setDragSource(l.current)},[s]);const f=p.useMemo(()=>!!(s?.componentFromFramework&&Ms(s.componentClass)),[s]),m=s?.componentFromFramework,C=s?.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,{...s.params}):p.createElement(C,{...s.params,ref:u}):null))},p2=p.memo(g2),f2=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"]}},m2=({ctrl:e})=>{const{context:t,gos:o}=p.useContext(We),[s,i]=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)},G=p.useCallback(z=>{if(v.current=z,!z||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new Ds),F.current=new ie(q=>{S.current=q});const te={toggleCss:(q,oe)=>r(de=>de.setClass(q,oe)),setUserStyles:q=>i(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(()=>pi(g,t,w.current,E),[g]);const k=p.useMemo(()=>n.toString(),[n]),O=p.useMemo(()=>a.toString(),[a]),P=p.useMemo(()=>c.toString(),[c]),A=p.useMemo(()=>!!(g&&g.componentFromFramework&&Ms(g.componentClass)),[g]),M=p.useMemo(()=>o.get("reactiveCustomComponents"),[]),J=p.useMemo(()=>o.get("enableFilterHandlers"),[]),[T,j]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(M){const z=J?f2:o2,te=new z(g.params,()=>m(q=>q+1));E(te),j(te)}else xl()},[g]);const se=T?.getProps(),$=g?.componentFromFramework,Z=g?.componentClass;return p.createElement("div",{ref:G,style:s,className:k,role:"gridcell"},p.createElement("div",{ref:w,className:O,role:"presentation"},$?M?se&&p.createElement(El.Provider,{value:{setMethods:z=>T.setMethods(z)}},p.createElement(Z,{...se})):p.createElement(Z,{...g.params,ref:A?()=>{}: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})))},C2=p.memo(m2),v2=({ctrl:e})=>{const{context:t}=p.useContext(We),[o,s]=p.useState(),[i,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(k=>{if(m.current=k,!k||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new Ds);const O={setWidth:P=>{m.current&&(m.current.style.width=P)},toggleCss:(P,A)=>n(M=>M.setClass(P,A)),setUserStyles:P=>s(P),setHeaderWrapperHidden:P=>{const A=v.current;A&&(P?A.style.setProperty("display","none"):A.style.removeProperty("display"))},setHeaderWrapperMaxHeight:P=>{const A=v.current;A&&(P!=null?A.style.setProperty("max-height",`${P}px`):A.style.removeProperty("max-height"),A.classList.toggle("ag-header-cell-comp-wrapper-limited-height",P!=null))},setUserCompDetails:P=>g(P),setResizableDisplayed:P=>{a(A=>A.setClass("ag-hidden",!P)),c(P?"false":"true")},setAriaExpanded:P=>u(P),getUserCompInstance:()=>w.current||void 0};e.setComp(O,k,C.current,v.current,f.current)},[]);p.useLayoutEffect(()=>pi(h,t,v.current),[h]),p.useEffect(()=>{m.current&&e.setDragSource(m.current)},[h]);const y=p.useMemo(()=>!!(h?.componentFromFramework&&Ms(h.componentClass)),[h]),S=p.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),F=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),E=h?.componentFromFramework,G=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(G,{...h.params}):p.createElement(G,{...h.params,ref:w}):null),p.createElement("div",{ref:C,"aria-hidden":l,className:F}))},w2=p.memo(v2),b2=({ctrl:e})=>{const{gos:t,context:o}=p.useContext(We),{topOffset:s,rowHeight:i}=p.useMemo(()=>e.getTopAndHeight(),[]),n=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>i+"px"),[u,h]=p.useState(()=>s+"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 Ds);const F={setHeight:E=>d(E),setTop:E=>h(E),setHeaderCtrls:(E,G,k)=>{const O=g.current,P=mn(O,E,G);P!==O&&(g.current=P,ri(k,()=>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(w2,{ctrl:S,key:S.instanceId});case"filter":return p.createElement(C2,{ctrl:S,key:S.instanceId});default:return p.createElement(p2,{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))},S2=p.memo(b2),y2=({pinned:e})=>{const[t,o]=p.useState(!0),[s,i]=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 ov(e));const C={setDisplayed:o,setCtrls:v=>i(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=()=>s.map(m=>p.createElement(S2,{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(y2),R2=()=>{const[e,t]=p.useState(()=>new dt),[o,s]=p.useState(),{context:i}=p.useContext(We),n=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(n.current=d,!d||i.isDestroyed()){r.current=i.destroyBean(r.current);return}r.current=i.createBean(new jC);const u={toggleCss:(h,g)=>t(f=>f.setClass(h,g)),setHeightAndMinHeight:h=>s(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"}))},F2=p.memo(R2),E2=(e,t)=>{p.useEffect(()=>{const o=t.current;if(o){const s=o.parentElement;if(s){const i=document.createComment(e);return s.insertBefore(i,o),()=>{i.remove()}}}},[e])},Ro=E2,x2=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new ie(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()}},P2=e=>{const t=p.useRef(e),o=p.useRef(),s=p.useRef(!1),i=p.useRef(!1),[,n]=p.useState(0);s.current&&(i.current=!0),p.useEffect(()=>(s.current||(o.current=t.current(),s.current=!0),n(r=>r+1),()=>{i.current&&o.current?.()}),[])},D2=e=>{const[t,o]=p.useState(),s=p.useContext(We),{context:i,popupSvc:n,gos:r,editSvc:a}=s,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return P2(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,f;if(!i.isDestroyed()){f=i.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?.(),i.destroyBean(f)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(ve(s))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?ga.createPortal(e.wrappedContent,t.getGui()):null},hd=p.memo(D2),M2=(e,t,o)=>{const{compProxy:s}=e;o(s);const i=s.getProps(),n=Ms(t);return p.createElement(El.Provider,{value:{setMethods:r=>s.setMethods(r)}},n?p.createElement(t,{...i}):p.createElement(t,{...i,ref:r=>s.setRef(r)}))},gd=(e,t,o)=>e.compProxy?M2(e,t,o):p.createElement(t,{...e.compDetails.params,ref:o}),T2=(e,t,o,s,i)=>{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:s,eParentCell:o,wrappedContent:gd(e,r,t)}):c&&i?p.createElement(hd,{editDetails:e,cellCtrl:s,eParentCell:o,jsChildComp:i}):null},I2=(e,t,o,s,i,n,r=!1)=>{const{context:a}=p.useContext(We),l=p.useCallback(()=>{const c=i.current;if(!c)return;const d=c.getGui();d&&d.parentElement&&d.remove(),a.destroyBean(c),i.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(i.current){const m=i.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),i.current=m})},[e,t,s,r]),p.useEffect(()=>l,[])},$g=I2,A2=({cellCtrl:e,parent:t})=>{const o=p.useRef(),s=p.useMemo(()=>{const{loadingComp:i}=e.getDeferLoadingCellRenderer();return i?{value:void 0,compDetails:i,force:!1}:void 0},[e]);if($g(s,!1,void 0,1,o,t),s?.compDetails?.componentFromFramework){const i=s.compDetails.componentClass;return p.createElement(i,{...s.compDetails.params})}return p.createElement(p.Fragment,null)},k2=({cellCtrl:e,printLayout:t,editingCell:o})=>{const s=p.useContext(We),{context:i}=s,{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,G]=p.useState(),k=p.useMemo(()=>e.isForceWrapper(),[e]),O=p.useMemo(()=>e.getCellAriaRole(),[e]),P=p.useRef(null),A=p.useRef(null),M=p.useRef(null),J=p.useRef(),T=p.useRef(),j=p.useRef(),se=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=k||oe,Oe=p.useMemo(()=>e.getCellValueClass(),[e]),Ge=p.useCallback(ee=>{if(T.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 ai(()=>P.current));const St=!!d&&!d.popup;$g(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||M.current?.refresh==null)return;M.current.refresh(ue.params)!=!0&&g(Re=>Re+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||i.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||((k?j:P).current?.appendChild(Re),X.afterGuiAttached?.()),G(X)}),()=>{ue.then(X=>{const Re=X.getGui();e.disableEditorTooltipFeature(),i.destroyBean(X),Ge(void 0),G(void 0),Re?.remove()})}},[d]);const ge=p.useCallback(ee=>{if(j.current=ee,!ee||i.isDestroyed()||!e.isAlive()){const ue=se.current;se.current=[];for(const X of ue)X();return}let ae;const Ce=ue=>{ue&&(ee.insertAdjacentElement("afterbegin",ue.getGui()),se.current.push(()=>{_t(ue.getGui()),i.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,i,y,w,C]),U=p.useCallback(()=>{const ee=!e.isCellSpanning()||A.current,ae=P.current;if(!ae||!ee||!e||!e.isAlive()||i.isDestroyed()){a.current=i.destroyBean(a.current);return}a.current=i.createBean(new Ds);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:()=>T.current??null,getCellRenderer:()=>M.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(()=>$T(Co));return}}Co()},setEditDetails:(X,Re,He,Co)=>{if(X){let tt;X.componentFromFramework&&(Co?tt=new x2(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}),T.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,A.current??void 0,ue,t,o,a.current)},[]),ne=p.useCallback(ee=>{P.current=ee,U()},[]),V=p.useCallback(ee=>{A.current=ee,U()},[]),Q=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Ms(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(A2,{cellCtrl:e,parent:P})},Q?p.createElement(Ce,{...ee.params,key:h}):p.createElement(Ce,{...ee.params,key:h,ref:M}))}},Me=()=>{const ee=()=>l==null?null:de?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:Oe,ref:q},le()):le(),ae=Ce=>T2(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:O,"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()},L2=p.memo(k2),O2=({rowCtrl:e,containerType:t})=>{const{context:o,gos:s,editSvc:i}=p.useContext(We),n=p.useContext(Vg)==="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,G]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[k,O]=p.useState(()=>c?e.getInitialTransform(t):void 0),P=p.useRef(null),A=p.useRef(),M=p.useRef(),J=p.useRef(!1),[T,j]=p.useState(0);p.useEffect(()=>{if(J.current||!S||T>10)return;const ge=P.current?.firstChild;ge?(e.setupDetailRowAutoHeight(ge),J.current=!0):j(U=>U+1)},[S,T]);const se=p.useRef();se.current||(se.current=new ai(()=>P.current));const $=p.useRef(()=>{}),Z=p.useCallback(ge=>($.current=ge,()=>{$.current=()=>{}}),[]),z=KT(Z,()=>w.current,[]),te=n?z:b,q=p.useCallback(ge=>{if(P.current=ge,r.current=ge?o.createBean(new Ds):o.destroyBean(r.current),!ge){e.unsetComp(t);return}if(!e.isAlive()||o.isDestroyed())return;const U={setTop:G,setTransform:O,toggleCss:(ne,V)=>se.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():ri(V,()=>y(le)))},showFullWidth:ne=>{M.current=ne.params,F(ne)},getFullWidthCellRenderer:()=>A.current,getFullWidthCellRendererParams:()=>M.current,refreshFullWidth:ne=>{const V=ne();return M.current=V,je.current?(F(Q=>({...Q,params:V})),!0):!A.current||!A.current.refresh?!1:A.current.refresh(V)}};e.setComp(U,ge,t,r.current)},[]);p.useLayoutEffect(()=>pi(S,o,P.current,A),[S]);const oe=p.useMemo(()=>{const ge={top:E,transform:k};return Object.assign(ge,C),ge},[E,k,C]),de=l&&S?.componentFromFramework,Oe=!l&&te!=null,Ge=p.useMemo(()=>!!(S?.componentFromFramework&&Ms(S.componentClass)),[S]),je=p.useRef(!1);p.useEffect(()=>{je.current=Ge&&!!S&&!!s.get("reactiveCustomComponents")},[Ge,S]);const St=()=>te?.map(ge=>p.createElement(L2,{cellCtrl:ge,editingCell:i?.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:A})};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(O2),G2=({name:e})=>{const{context:t,gos:o}=p.useContext(We),s=p.useMemo(()=>ui(e),[e]),i=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")&&!!s.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[f,m]=p.useState(()=>[]),C=p.useRef(!1),v=p.useRef(),w=p.useMemo(()=>at("ag-viewport",$u(e)),[e]),b=p.useMemo(()=>at(Ku(e)),[e]),y=p.useMemo(()=>at("ag-spanning-container",Cv(e)),[e]),S=s.type==="center"||u,F=S?i:n;Ro(" AG Row Container "+e+" ",F);const E=p.useCallback(()=>{const T=!S||i.current!=null,j=n.current!=null,se=!u||r.current!=null;return T&&j&&se},[]),G=p.useCallback(()=>i.current==null&&n.current==null&&r.current==null,[]),k=p.useCallback(()=>{if(G()&&(v.current=t.destroyBean(v.current)),!t.isDestroyed()&&E()){const T=$=>{const Z=mn(l.current,a.current,C.current);Z!==l.current&&(l.current=Z,ri($,()=>d(Z)))},j=$=>{const Z=mn(g.current,h.current,C.current);Z!==g.current&&(g.current=Z,ri($,()=>m(Z)))},se={setHorizontalScroll:$=>{i.current&&(i.current.scrollLeft=$)},setViewportHeight:$=>{i.current&&(i.current.style.height=$)},setRowCtrls:({rowCtrls:$,useFlushSync:Z})=>{const z=!!Z&&a.current.length>0&&$.length>0;a.current=$,T(z)},setSpannedRowCtrls:($,Z)=>{const z=!!Z&&h.current.length>0&&$.length>0;h.current=$,j(z)},setDomOrder:$=>{C.current!=$&&(C.current=$,T(!1))},setContainerWidth:$=>{n.current&&(n.current.style.width=$)},setOffsetTop:$=>{n.current&&(n.current.style.transform=`translateY(${$})`)}};v.current=t.createBean(new Pv(e)),v.current.setComp(se,n.current,r.current??void 0,i.current)}},[E,G]),O=p.useCallback(T=>{n.current=T,k()},[k]),P=p.useCallback(T=>{r.current=T,k()},[k]),A=p.useCallback(T=>{i.current=T,k()},[k]),M=()=>p.createElement("div",{className:b,ref:O,role:S?"presentation":"rowgroup"},c.map(T=>p.createElement(pd,{rowCtrl:T,containerType:s.type,key:T.instanceId})));if(!S)return M();const J=()=>p.createElement("div",{className:y,ref:P,role:"presentation"},f.map(T=>p.createElement(pd,{rowCtrl:T,containerType:s.type,key:T.instanceId})));return p.createElement("div",{className:w,ref:A,role:"rowgroup"},M(),u?J():null)},H2=p.memo(G2),B2=()=>{const e=p.useContext(We),{context:t,overlays:o}=e,[s,i]=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,G]=p.useState(!0),[k,O]=p.useState(null),[P,A]=p.useState(""),[M,J]=p.useState(null),[T,j]=p.useState("ag-layout-normal"),se=p.useRef();se.current||(se.current=new ai(()=>$.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,dp)=>{X(be,document.createComment(dp)),X(be,Re(ot).getGui())};He(ue,iv," AG Fake Horizontal Scroll ");const Co=o?.getOverlayWrapperCompClass();Co&&He(ue,Co," AG Overlay Wrapper "),q.current&&He(q.current,rv," AG Fake Vertical Scroll ");const tt={setRowAnimationCssOnBodyViewport:i,setColumnCount:be=>{$.current&&Vp($.current,be)},setRowCount:be=>{$.current&&Hp($.current,be)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:F,setBottomInvisible:G,setColumnMovingCss:(be,ot)=>se.current.toggleCss(be,ot),updateLayoutClasses:j,setAlwaysVerticalScrollClass:O,setPinnedTopBottomOverflowY:A,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 Iv);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",T),[T]),yt=p.useMemo(()=>at("ag-body-viewport",s,T,k,M),[s,T,k,M]),ge=p.useMemo(()=>at("ag-body",T),[T]),U=p.useMemo(()=>at("ag-floating-top",S?"ag-invisible":null,M),[M,S]),ne=p.useMemo(()=>at("ag-sticky-top",M),[M]),V=p.useMemo(()=>at("ag-sticky-bottom",m==="0px"?"ag-invisible":null,M),[M,m]),Q=p.useMemo(()=>at("ag-floating-bottom",E?"ag-invisible":null,M),[M,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(H2,{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(F2,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"]}))},V2=p.memo(B2),N2=(e,t)=>{const{children:o,eFocusableElement:s,onTabKeyDown:i,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 zT({comp:b,eTopGuard:v,eBottomGuard:w,eFocusableElement:s,onTabKeyDown:i,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"?ps.TAB_GUARD_TOP:ps.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${ps.TAB_GUARD} ${w}`,role:"presentation",ref:v==="top"?f:m})};return p.createElement(p.Fragment,null,C("top"),o,C("bottom"))},W2=p.forwardRef(N2),z2=p.memo(W2),_2=({context:e})=>{const[t,o]=p.useState(""),[s,i]=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(A=>{if(f.current=A,g.current=A?e.createBean(new Gv):e.destroyBean(g.current),!A||e.isDestroyed())return;const M=g.current;w.current=M.focusInnerElement.bind(M);const J={destroyGridUi:()=>{},setRtlClass:o,forceFocusOutOfContainer:T=>{if(!T&&b.current?.isDisplayed()){b.current.forceFocusOutOfContainer(T);return}m.current?.forceFocusOutOfContainer(T)},updateLayoutClasses:i,getFocusableContainers:()=>{const T=[],j=[],se=f.current?.querySelector(".ag-root");for(const Z of y.current){if(!Z.isDisplayed())continue;const z=Z.getFocusableContainerName();if(z==="rowGroupToolbar"||z==="pivotToolbar"){T.push(Z);continue}j.push(Z)}const $=[...T];return se&&$.push({getGui:()=>se,getFocusableContainerName:()=>"gridBody"}),$.push(...j),$},setCursor:r,setUserSelect:l};M.setComp(J,A,A),d(!0)},[]);p.useEffect(()=>{const A=g.current,M=f.current;if(!u||!A||!C||!M||e.isDestroyed())return;const J=[];y.current=[],b.current=void 0;const{watermarkSelector:T,paginationSelector:j,sideBarSelector:se,statusBarSelector:$,gridHeaderDropZonesSelector:Z}=A.getOptionalSelectors(),z=[];if(Z){const q=e.createBean(new Z.component),oe=q.getGui();M.insertAdjacentElement("afterbegin",oe),z.push(oe),J.push(q),y.current.push(...q.getFocusableContainers?.()??[])}if(se){const q=e.createBean(new se.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 M.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 T&&te(T.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,s),[t,s]),G=p.useMemo(()=>at("ag-root-wrapper-body","ag-focus-managed",s),[s]),k=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),O=p.useCallback(A=>{m.current=A,h(A!==null)},[]),P=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:F,className:E,style:k,role:"presentation"},p.createElement("div",{className:G,ref:v,role:"presentation"},c&&C&&!e.isDestroyed()&&p.createElement(We.Provider,{value:e.getBeans()},p.createElement(z2,{ref:O,eFocusableElement:C,onTabKeyDown:S,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:P},p.createElement(V2,null)))))},U2=p.memo(_2),$2=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))}},K2=typeof window>"u"?p.useEffect:p.useLayoutEffect,Kg={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},q2={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...Kg},qg=new Set(Object.keys(q2)),j2=new Set(Object.keys(Kg)),jg=e=>{const t=p.useContext(u2),o=p.useContext(h2),s=p.useRef(),i=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=i.current?.classList,E=(G="")=>G.trim().split(/\s+/g).filter(Boolean);if(m.current!==S){for(const G of E(m.current))F?.contains(G)&&F.remove(G);for(const G of E(S))F?.contains(G)||F?.add(G);m.current=S}};K2(()=>{C(e.className)},[e.className]);const v=p.useCallback(S=>{if(i.current=S,C(e.className),!S){for(const T of r.current)T();r.current.length=0;return}const F=[...e.modules??[],...t??[]];o&&Qd(F)?.setLicenseKey(o),n.current||(n.current=new d2(()=>f(T=>T+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{n.current?.destroy(),n.current=null}));const E=$f(e.gridOptions,e,Object.keys(e).filter(T=>!qg.has(T))),G=()=>{if(u.current){const T=()=>c.current?.shouldQueueUpdates()?void 0:a.current.shift();let j=T();for(;j;)j(),j=T()}},k=new J2(G);c.current=k;const O=new $2,P={providedBeanInstances:{frameworkCompWrapper:new Q2(n.current,E),renderStatus:O},modules:F,frameworkOverrides:k,setThemeOnGridDiv:!0},A=T=>{g(T),T.createBean(O),r.current.push(()=>{T.destroy()}),T.getBean("ctrlsSvc").whenReady({addDestroyFunc:j=>{r.current.push(j)}},()=>{if(T.isDestroyed())return;const j=s.current;j&&e.passGridApi?.(j)})},M=T=>{T.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 T1;E.gridId??(E.gridId=d.current),s.current=J.create(S,E,A,M,P),r.current.push(()=>{s.current=void 0}),s.current&&(d.current=s.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=Y2(l.current,e);l.current=e,b(()=>{s.current&&Kf(S,s.current)})},[e]);const y=!p.useSyncExternalStore||Ai(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:w,ref:v},p.createElement(Vg.Provider,{value:y},h&&!h.isDestroyed()?p.createElement(U2,{key:h.instanceId,context:h}):null,n.current?.getPortals()??null))};function Y2(e,t){const o={};for(const s of Object.keys(t)){if(qg.has(s)){j2.has(s)&&D(274,{prop:s});continue}const i=t[s];e[s]!==i&&(o[s]=i)}return o}var Q2=class extends WT{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const o=this.gridOptions;if(Ai(o,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return Ai(o,"enableFilterHandlers")?t2:e2;case"floatingFilterComponent":return Ai(o,"enableFilterHandlers")?i2:s2;case"dateComponent":return JT;case"dragAndDropImageComponent":return XT;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return ZT;case"statusPanel":return a2;case"toolPanel":return l2;case"menuItem":return r2;case"cellRenderer":return QT;case"innerHeaderComponent":return n2}})(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 i=!t.cellRenderer&&t.name!=="toolPanel";return new _g(e,this.parent,t,i)}},Z2=p.forwardRef((e,t)=>{const o=p.useContext(We),{registry:s,context:i,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(()=>Sf(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||i.isDestroyed()){m.current=i.destroyBean(m.current),v.current?.();return}const G={toggleCss:(O,P)=>l(A=>A.setClass(O,P)),toggleDetailGridCss:(O,P)=>d(A=>A.setClass(O,P)),setDetailGrid:O=>h(O),setRowData:O=>f(O),getGui:()=>C.current},k=s.createDynamicBean("detailCellRendererCtrl",!0);if(k&&(i.createBean(k),k.init(G,e),m.current=k,n.get("detailRowAutoHeight"))){const O=()=>{if(C.current==null)return;const P=C.current.clientHeight;P!=null&&P>0&&setTimeout(()=>{e.node.setRowHeight(P),(Se(n)||xs(n))&&r.onRowHeightChanged()},0)};v.current=Kt(o,E,O),O()}},[]),F=p.useCallback(E=>{m.current?.registerDetailWithMaster(E)},[]);return p.createElement("div",{className:b,ref:S},u&&p.createElement(jg,{className:y,...u,modules:w,rowData:g,passGridApi:F}))}),J2=class extends Zh{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:dd,agGroupRowRenderer:dd,agDetailCellRenderer:Z2},this.wrapIncoming=(t,o)=>o==="ensureVisible"?UT(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()}},Yg=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(jg,{...this.props,passGridApi:this.setGridApi})}},Qg=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Qg||{}),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 X2=fe("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),eI=fe("z-[53] 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",Zg="text-error",tI="my-1 border-t border-hover border-secondary",Zo=4,oI=H.jsx(vn.IconChevronRight,{size:14}),Jg=({ariaLabel:e,className:t,size:o=24,onClose:s,...i})=>H.jsx(yd,{"aria-label":e,className:Mt.mergeClasses(t,"w-auto h-auto"),onClick:s,icon:H.jsx(vn.IconX,{size:o}),...i});function Xg(e,t="menu",o=!1,s){const[i,n]=p.useState(!1),r=pe.useFloatingNodeId(),{refs:a,floatingStyles:l,context:c}=pe.useFloating({nodeId:r,placement:"right-start",open:i,onOpenChange:n,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:0,crossAxis:-4}),pe.flip({padding:e}),pe.shift({padding:e})]}),d=pe.useHover(c,{enabled:!o,move:!1,handleClose:pe.safePolygon(),delay:{open:80,close:80}}),u=pe.useClick(c,{enabled:!o}),h=pe.useDismiss(c,{bubbles:{escapeKey:!1,outsidePress:!0}}),g=pe.useRole(c,{role:t}),{getReferenceProps:f,getFloatingProps:m}=pe.useInteractions([d,u,h,g]);return{isOpen:i,nodeId:r,refs:a,floatingStyles:l,context:c,getReferenceProps:f,getFloatingProps:m}}const sI="rounded bg-layer-0 shadow",ep=({refs:e,floatingStyles:t,context:o,getFloatingProps:s,role:i,surfaceClassName:n,className:r,children:a})=>{const l=Rd();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:i,className:fe("z-[53] overflow-auto text-primary focus-visible:outline-none",n??sI,l,r),...s(),children:a})})})},iI=({item:e,onRootClose:t})=>{const{isOpen:o,refs:s,floatingStyles:i,context:n,getReferenceProps:r,getFloatingProps:a}=Xg(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:s.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(zi,{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:oI})]}),o&&H.jsx(ep,{refs:s,floatingStyles:i,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&&Zg,c.className),onClick:l(c),children:[c.icon&&H.jsx("span",{className:fe(c.danger&&"text-error",c.disabled&&"text-secondary"),children:H.jsx(zi,{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))})})]})},nI=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,ha=({children:e,items:t,onItemClick:o,menuHeader:s,menuFooter:i,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[G,k]=p.useState(d),O=c!==void 0,P=O?!!c:G,A=p.useRef(null),M=p.useCallback(U=>{O||k(U),u?.(U)},[O,u]),J=p.useId(),T=a===void 0,{refs:j,floatingStyles:se,context:$}=pe.useFloating({placement:a,open:P,onOpenChange:M,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:Zo,crossAxis:0}),T?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=nI(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),A.current=document.elementFromPoint(U.clientX,U.clientY)),M(!0))},[S,l,M,Oe,r]),je=p.useCallback(U=>{!S||l||(r.includes(Vt.ContextMenu)&&P&&M(!1),Oe(U.clientX,U.clientY),A.current=document.elementFromPoint(U.clientX,U.clientY))},[S,l,Oe,P,r,M]);p.useEffect(()=>{l&&P&&M(!1)},[l,P,M]);const St=p.useCallback(U=>ne=>{U.disabled||(U.onClick?.({key:U.key,domEvent:ne}),o?.({key:U.key,domEvent:ne}),M(!1))},[o,M]),yt=p.useMemo(()=>n?n():t?H.jsxs(H.Fragment,{children:[s&&H.jsx(H.Fragment,{children:typeof s=="function"?s():s}),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(tI,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(iI,{item:U,onRootClose:()=>M(!1)},U.key):H.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!U.disabled,className:fe(da,U.disabled&&ua,U.danger&&Zg,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(zi,{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))}),i&&H.jsx(H.Fragment,{children:typeof i=="function"?i():i})]}):null,[St,t,i,s,n,M,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:A.current instanceof Element&&(ne=A.current),!ne)return;const V=new IntersectionObserver(([Q])=>{Q.isIntersecting||M(!1)},{root:null,threshold:0});return V.observe(ne),()=>V.disconnect()},[P,j.reference,M]),H.jsxs(H.Fragment,{children:[H.jsx("span",{ref:j.setReference,className:fe(X2,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:se,className:fe(eI,!F&&"w-max",v),...de(),children:[h&&H.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:H.jsx(Jg,{ariaLabel:"Close dropdown",onClose:U=>{g?.(U),M(!1)}})}),yt]})})})]})},tp="en-US",op={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},rI="text-primary",br=40,sp={minWidth:br,width:br,maxWidth:br},aI={cellClass:"ag-grid-no-checkbox",...sp},lI={...sp};var Ks=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Ks||{});const cI=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0}),ip=(e,t,o,s,i)=>{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:i?1:-1:i?-1:1},np=e=>e?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)):{},dI=(e,t)=>e.some((o,s)=>o.field!==t[s].field?!0:o.hide!==t[s].hide),uI="h-full w-full",fd=".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))"},md=40;var So=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(So||{}),is=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(is||{});const Cd=()=>typeof window<"u"&&window.innerWidth<1279,vd=()=>typeof window<"u"&&window.innerWidth<640,hI=()=>{if(typeof window>"u")return is.Undefined;const e=window.innerWidth;return e>=1024?is.Desktop:e<640?is.Mobile:is.Tablet},rp=()=>{const[e,t]=p.useState(vd());return p.useEffect(()=>{const o=()=>t(vd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},ap=()=>{const[e,t]=p.useState(Cd());return p.useEffect(()=>{const o=()=>t(Cd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function lp(e,t){let o=null;return(...s)=>{o&&clearTimeout(o),o=setTimeout(()=>e(...s),t)}}let wd=!1;const cp=()=>{wd||(wd=!0,NT({testIdAttribute:"dataQA"}),Yd.registerModules([LT]))},gI=({columnDefs:e,rowData:t,additionalGridOptions:o,getContextMenuItems:s,className:i,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})=>{cp();const[F,E]=p.useState(),G=p.useId(),k=rp(),O=ap(),P=p.useRef(new Set),A=p.useRef(void 0),M=p.useMemo(()=>({...Sr,oddRowBackgroundColor:h?Sr.oddRowBackgroundColor:Sr.backgroundColor,wrapperBorder:w}),[h,w]),J=p.useCallback(V=>{V.api.sizeColumnsToFit()},[]),T=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=s?.(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})})})}},[s,a,u,y]),j=p.useCallback(V=>V===So.API||V===So.ROW_DATA_CHANGED,[]),se=p.useCallback(V=>{if(!F)return;const le=(V.selectedNodes||[]).map(Ae=>Ae.data),Me=new Set(le.map(u));P.current=Me,A.current=V.source,j(V.source)||c?.(Me,le)},[F,u,j,c]),$=p.useMemo(()=>lp(V=>se?.(V),100),[se]),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(Fd,{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 k||O||l&&l.size>0?`${V} ${Q}`:!l||l.size===0?V:`${V} ${Q}`},[k,O,l]),te=p.useCallback(()=>k||O?z():!l||l.size===0?"dial-row-not-select-header":z(),[z,k,O,l]),q=p.useMemo(()=>{if(S===Ks.SINGLE)return{...aI,cellRenderer:Z};if(S===Ks.MULTIPLE)return{...lI,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:T};if(!Q)return V;const le=V.cellRenderer;return{...V,cellRenderer:Ae=>{const ee=Ae.data?s?.(Ae.data)??[]:[];let ae=null;if(typeof le=="function"){const X=le;ae=H.jsx(X,{...Ae})}else ae=T(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,s,u,T,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:ip,...np(Oe)}),[g,Oe]),St=V=>{const Q=document.querySelector(fd);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(Ed,{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===Ks.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 ${fd}`).forEach(V=>{V.setAttribute("aria-description",Rr)})},[]);return p.useEffect(()=>{const V=j(A.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(uI,i,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":G,children:H.jsx(Yg,{rowModelType:"clientSide",headerHeight:md,rowHeight:md,cellSelection:!1,theme:Bh.withPart(Th).withParams({...M}),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},pI=({value:e,locale:t=tp,options:o=op,emptyPlaceholder:s,className:i,hideTooltip:n=!1})=>{const r=Pl(e),a=p.useMemo(()=>r?new Intl.DateTimeFormat(t,o).format(r):s,[r,s,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(rI,i),hideTooltip:n})};exports.AgGridReact=Yg;exports.DEFAULT_DATE_FORMAT_OPTIONS=op;exports.DEFAULT_LOCALE=tp;exports.DIAL_KIT_CLASS=bn;exports.DialCloseButton=Jg;exports.DialDangerIconButton=vp;exports.DialDateCellRenderer=pI;exports.DialDropdown=ha;exports.DialEllipsisTooltip=pa;exports.DialGhostIconButton=yd;exports.DialGrid=gI;exports.DialIcon=zi;exports.DialNeutralIconButton=Cp;exports.DialNoDataContent=Ed;exports.DialPrimaryIconButton=mp;exports.DialRadioButton=Fd;exports.DialSecondaryIconButton=wp;exports.DialSuccessIconButton=Sp;exports.DialTertiaryIconButton=bp;exports.DropdownItemType=Cn;exports.DropdownTrigger=Vt;exports.DropdownType=Qg;exports.GridSelectionMode=Ks;exports.ScreenType=is;exports.SubMenuPanel=ep;exports.ThemeScope=yp;exports.ariaDescription=Rr;exports.baseColumnComparator=ip;exports.checkColDefsChanges=dI;exports.colorSchemeLight=Th;exports.convertToDate=Pl;exports.debounceFn=lp;exports.getScreenType=hI;exports.observeElementSize=Sd;exports.omitUndefined=np;exports.registerAgGridModulesOnce=cp;exports.scheduleMeasure=wn;exports.themeBalham=Bh;exports.useIsMobileScreen=rp;exports.useIsTabletScreen=ap;exports.useSubMenuFloating=Xg;exports.useThemeScope=Rd;
|
|
63
|
+
If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),Ns(d)}if(a.length>0&&i){const l=this.beans.frameworkOverrides.getDocLink(i);Ns(`to see all the valid ${s} properties please check: ${l}`)}}};function IT(e,t,o){const s={},i=e.filter(n=>!t.some(r=>r===n));if(i.length>0)for(const n of i)s[n]=Qr({inputValue:n,allSuggestions:o}).values;return s}var AT=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),kT={moduleName:"Validation",version:I,beans:[TT]},LT={moduleName:"AllCommunity",version:I,dependsOn:[DF,QF,OD,kT,Rx,Fx,Ex,xx,Px,Dx,Mx,yx,wD,bD,SD,yD,vD,FD,ED,YD,L1,mM,ph,q1,j1,WM,OF,bw,RM,CT,g1,bT,NF,ST,WD,m1,kM,lg,_D,_M,ww,MF,QM]};function N(e,t={}){const o=Object.keys(t).map(s=>{const i=t[s];return i!=null?`${s}=${i}`:null}).filter(Boolean).join(";");return[e,o].filter(s=>s.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`,Pi(e))},numberFilterInstanceInput(e){return N(`ag-${e.source}-number-input`,Pi(e))},textFilterInstanceInput(e){return N(`ag-${e.source}-text-input`,Pi(e))},dateFilterInstanceInput(e){return N(`ag-${e.source}-date-input`,Pi(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 OT(e,t){const o={};for(const s of Object.keys(e))t[s]!==null&&(o[t[s]??s]=e[s]);return o}function GT(e){return e.source!=="floating-filter"?{index:0,...e}:e}function Pi(e){return OT(GT(e),{colLabel:"label"})}var Bg="data-testid";function _(e,t){e?.setAttribute(Bg,t)}function HT(e){Bg=e}var BT=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=Zu(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 s=e.querySelector(".ag-filter-menu");this.setupFilterInstance(s,{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 i=e.querySelector(".ag-column-drop-wrapper");i&&this.setupColumnDropArea(i,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(i=>{_(i,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((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.numberFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.textFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.dateFilterInstanceInput(l))});const s=e.querySelector('.ag-mini-filter input[type="text"]');_(s,B.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(i=>{const n=i.querySelector(".ag-checkbox-label")?.textContent,r=i.querySelector('input[type="checkbox"]');_(r,B.setFilterInstanceItem(t,n))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(i=>{_(i,B.setFilterApplyPanelButton(t,i.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(i=>{const n=i.querySelector(".ag-radio-button-label")?.textContent;_(i.querySelector("input[type=radio]"),B.filterConditionRadioButton(t,n))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(o=>{const s=o.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");_(o,B.columnDropArea(t,s)),o.querySelectorAll(".ag-column-drop-cell").forEach(i=>{const n=i.querySelector(".ag-column-drop-cell-text")?.textContent;_(i.querySelector(".ag-drag-handle"),B.columnDropCellDragHandle(t,s,n)),_(i.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),B.columnDropCellCancelButton(t,s,n))})})}},VT={moduleName:"Testing",version:I,beans:[BT]};function NT({testIdAttribute:e}={}){e&&HT(e),Yd.registerModules([VT])}var WT=class{wrap(e,t,o,s){const i=this.createWrapper(e,s);for(const n of t??[])this.createMethod(i,n,!0);for(const n of o??[])this.createMethod(i,n,!1);return i}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)}}},zT=class extends Yu{constructor(e){super(e,Oa)}},We=p.createContext({}),Vg=p.createContext("default"),pi=(e,t,o,s)=>{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(s,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),s&&cd(s,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 Ng{constructor(...t){this.classesMap={};for(const o of t)this.classesMap[o]=!0}setClass(t,o){if(!!this.classesMap[t]==o)return this;const i=new Ng;return i.classesMap={...this.classesMap},i.classesMap[t]=o,i}toString(){return Object.keys(this.classesMap).filter(o=>this.classesMap[o]).join(" ")}},Ms=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],Wg=ca==="16"||ca==="17";function _T(){return ca==="19"}var Wi=!1;function UT(e){return Wi||setTimeout(()=>Wi=!1,0),Wi=!0,e()}var ri=(e,t)=>{!Wg&&e&&!Wi?ga.flushSync(t):t()},$T=e=>{Wg?e():p.startTransition(e)};function KT(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 s=[],i=[],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)&&s.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||i.push(l)}return s.length===e.length&&i.length===0?e:s.length===0&&i.length===t.length?t:s.length===0?i:i.length===0?s:[...s,...i]}var zg=p.forwardRef((e,t)=>{const{registry:o,context:s}=p.useContext(We),i=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(()=>pi(d,s,n.current),[d]);const G=p.useCallback(se=>{if(i.current=se,!se||s.isDestroyed()){c.current=s.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=s.createBean(Z),c.current.init($,se,r.current,a.current,l.current,zg,e))},[]),k=p.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),O=p.useMemo(()=>`ag-group-expanded ${w.toString()}`,[w]),P=p.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),A=p.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),M=d?.componentFromFramework,J=M?d.componentClass:void 0,T=d==null&&f!=null,j=Es(f);return p.createElement("span",{className:k,ref:G,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:O,ref:a}),p.createElement("span",{className:P,ref:l}),p.createElement("span",{className:A,ref:r}),p.createElement("span",{className:"ag-group-value",ref:n},T?j:M?p.createElement(J,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),dd=zg,El=p.createContext({setMethods:()=>{}}),qT=e=>{const{initialProps:t,addUpdateCallback:o,CustomComponentClass:s,setMethods:i}=e,[{key:n,...r},a]=p.useState(t);return p.useEffect(()=>{o(l=>a(l))},[]),p.createElement(El.Provider,{value:{setMethods:i}},p.createElement(s,{key:n,...r}))},jT=p.memo(qT),YT=0;function ud(){return`agPortalKey_${++YT}`}var _g=class{constructor(e,t,o,s){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=o,this.suppressFallbackMethods=!!s,this.statelessComponent=this.isStateless(this.reactComponent),this.key=ud(),this.portalKey=ud(),this.instanceCreated=this.isStatelessComponent()?ie.resolve(!1):new ie(i=>{this.resolveInstanceCreated=i})}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 s=o[e];if(s)return s.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 ie(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 s of e){const i=t[s];i&&(o[s]=i)}}var ht=class extends _g{constructor(){super(...arguments),this.awaitUpdateCallback=new ie(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=jT}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 ie(s=>{setTimeout(()=>{s()})})),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 ie(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},QT=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},ZT=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}},JT=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}},XT=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:s}=this;return e.label=t,e.icon=o,e.shake=s,e}},e2=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 ie(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 ie(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}},t2=class extends ht{constructor(){super(...arguments),this.awaitSetMethodsCallback=new ie(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 Ug(e,t){e.parentFilterInstance(o=>{(o.setModel(t)||ie.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var o2=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(),Ug(this.floatingFilterParams,e)}},s2=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(),Ug(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},i2=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},n2=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},r2=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}},a2=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},l2=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 c2=1e3,d2=class{constructor(e,t,o){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=o||c2}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){ri(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,o)})}}},u2=p.createContext([]),h2=p.createContext(void 0),g2=({ctrl:e})=>{const t=e.isAlive(),{context:o}=p.useContext(We),[s,i]=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 ai(()=>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 Ds);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?Wp(l.current,y):zp(l.current))},setUserCompDetails:y=>i(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(()=>pi(s,o,d.current,u),[s]),p.useEffect(()=>{e.setDragSource(l.current)},[s]);const f=p.useMemo(()=>!!(s?.componentFromFramework&&Ms(s.componentClass)),[s]),m=s?.componentFromFramework,C=s?.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,{...s.params}):p.createElement(C,{...s.params,ref:u}):null))},p2=p.memo(g2),f2=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"]}},m2=({ctrl:e})=>{const{context:t,gos:o}=p.useContext(We),[s,i]=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)},G=p.useCallback(z=>{if(v.current=z,!z||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new Ds),F.current=new ie(q=>{S.current=q});const te={toggleCss:(q,oe)=>r(de=>de.setClass(q,oe)),setUserStyles:q=>i(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(()=>pi(g,t,w.current,E),[g]);const k=p.useMemo(()=>n.toString(),[n]),O=p.useMemo(()=>a.toString(),[a]),P=p.useMemo(()=>c.toString(),[c]),A=p.useMemo(()=>!!(g&&g.componentFromFramework&&Ms(g.componentClass)),[g]),M=p.useMemo(()=>o.get("reactiveCustomComponents"),[]),J=p.useMemo(()=>o.get("enableFilterHandlers"),[]),[T,j]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(M){const z=J?f2:o2,te=new z(g.params,()=>m(q=>q+1));E(te),j(te)}else xl()},[g]);const se=T?.getProps(),$=g?.componentFromFramework,Z=g?.componentClass;return p.createElement("div",{ref:G,style:s,className:k,role:"gridcell"},p.createElement("div",{ref:w,className:O,role:"presentation"},$?M?se&&p.createElement(El.Provider,{value:{setMethods:z=>T.setMethods(z)}},p.createElement(Z,{...se})):p.createElement(Z,{...g.params,ref:A?()=>{}: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})))},C2=p.memo(m2),v2=({ctrl:e})=>{const{context:t}=p.useContext(We),[o,s]=p.useState(),[i,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(k=>{if(m.current=k,!k||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new Ds);const O={setWidth:P=>{m.current&&(m.current.style.width=P)},toggleCss:(P,A)=>n(M=>M.setClass(P,A)),setUserStyles:P=>s(P),setHeaderWrapperHidden:P=>{const A=v.current;A&&(P?A.style.setProperty("display","none"):A.style.removeProperty("display"))},setHeaderWrapperMaxHeight:P=>{const A=v.current;A&&(P!=null?A.style.setProperty("max-height",`${P}px`):A.style.removeProperty("max-height"),A.classList.toggle("ag-header-cell-comp-wrapper-limited-height",P!=null))},setUserCompDetails:P=>g(P),setResizableDisplayed:P=>{a(A=>A.setClass("ag-hidden",!P)),c(P?"false":"true")},setAriaExpanded:P=>u(P),getUserCompInstance:()=>w.current||void 0};e.setComp(O,k,C.current,v.current,f.current)},[]);p.useLayoutEffect(()=>pi(h,t,v.current),[h]),p.useEffect(()=>{m.current&&e.setDragSource(m.current)},[h]);const y=p.useMemo(()=>!!(h?.componentFromFramework&&Ms(h.componentClass)),[h]),S=p.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),F=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),E=h?.componentFromFramework,G=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(G,{...h.params}):p.createElement(G,{...h.params,ref:w}):null),p.createElement("div",{ref:C,"aria-hidden":l,className:F}))},w2=p.memo(v2),b2=({ctrl:e})=>{const{gos:t,context:o}=p.useContext(We),{topOffset:s,rowHeight:i}=p.useMemo(()=>e.getTopAndHeight(),[]),n=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>i+"px"),[u,h]=p.useState(()=>s+"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 Ds);const F={setHeight:E=>d(E),setTop:E=>h(E),setHeaderCtrls:(E,G,k)=>{const O=g.current,P=mn(O,E,G);P!==O&&(g.current=P,ri(k,()=>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(w2,{ctrl:S,key:S.instanceId});case"filter":return p.createElement(C2,{ctrl:S,key:S.instanceId});default:return p.createElement(p2,{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))},S2=p.memo(b2),y2=({pinned:e})=>{const[t,o]=p.useState(!0),[s,i]=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 ov(e));const C={setDisplayed:o,setCtrls:v=>i(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=()=>s.map(m=>p.createElement(S2,{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(y2),R2=()=>{const[e,t]=p.useState(()=>new dt),[o,s]=p.useState(),{context:i}=p.useContext(We),n=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(n.current=d,!d||i.isDestroyed()){r.current=i.destroyBean(r.current);return}r.current=i.createBean(new jC);const u={toggleCss:(h,g)=>t(f=>f.setClass(h,g)),setHeightAndMinHeight:h=>s(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"}))},F2=p.memo(R2),E2=(e,t)=>{p.useEffect(()=>{const o=t.current;if(o){const s=o.parentElement;if(s){const i=document.createComment(e);return s.insertBefore(i,o),()=>{i.remove()}}}},[e])},Ro=E2,x2=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new ie(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()}},P2=e=>{const t=p.useRef(e),o=p.useRef(),s=p.useRef(!1),i=p.useRef(!1),[,n]=p.useState(0);s.current&&(i.current=!0),p.useEffect(()=>(s.current||(o.current=t.current(),s.current=!0),n(r=>r+1),()=>{i.current&&o.current?.()}),[])},D2=e=>{const[t,o]=p.useState(),s=p.useContext(We),{context:i,popupSvc:n,gos:r,editSvc:a}=s,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return P2(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,f;if(!i.isDestroyed()){f=i.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?.(),i.destroyBean(f)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(ve(s))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?ga.createPortal(e.wrappedContent,t.getGui()):null},hd=p.memo(D2),M2=(e,t,o)=>{const{compProxy:s}=e;o(s);const i=s.getProps(),n=Ms(t);return p.createElement(El.Provider,{value:{setMethods:r=>s.setMethods(r)}},n?p.createElement(t,{...i}):p.createElement(t,{...i,ref:r=>s.setRef(r)}))},gd=(e,t,o)=>e.compProxy?M2(e,t,o):p.createElement(t,{...e.compDetails.params,ref:o}),T2=(e,t,o,s,i)=>{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:s,eParentCell:o,wrappedContent:gd(e,r,t)}):c&&i?p.createElement(hd,{editDetails:e,cellCtrl:s,eParentCell:o,jsChildComp:i}):null},I2=(e,t,o,s,i,n,r=!1)=>{const{context:a}=p.useContext(We),l=p.useCallback(()=>{const c=i.current;if(!c)return;const d=c.getGui();d&&d.parentElement&&d.remove(),a.destroyBean(c),i.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(i.current){const m=i.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),i.current=m})},[e,t,s,r]),p.useEffect(()=>l,[])},$g=I2,A2=({cellCtrl:e,parent:t})=>{const o=p.useRef(),s=p.useMemo(()=>{const{loadingComp:i}=e.getDeferLoadingCellRenderer();return i?{value:void 0,compDetails:i,force:!1}:void 0},[e]);if($g(s,!1,void 0,1,o,t),s?.compDetails?.componentFromFramework){const i=s.compDetails.componentClass;return p.createElement(i,{...s.compDetails.params})}return p.createElement(p.Fragment,null)},k2=({cellCtrl:e,printLayout:t,editingCell:o})=>{const s=p.useContext(We),{context:i}=s,{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,G]=p.useState(),k=p.useMemo(()=>e.isForceWrapper(),[e]),O=p.useMemo(()=>e.getCellAriaRole(),[e]),P=p.useRef(null),A=p.useRef(null),M=p.useRef(null),J=p.useRef(),T=p.useRef(),j=p.useRef(),se=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=k||oe,Oe=p.useMemo(()=>e.getCellValueClass(),[e]),Ge=p.useCallback(ee=>{if(T.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 ai(()=>P.current));const St=!!d&&!d.popup;$g(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||M.current?.refresh==null)return;M.current.refresh(ue.params)!=!0&&g(Re=>Re+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||i.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||((k?j:P).current?.appendChild(Re),X.afterGuiAttached?.()),G(X)}),()=>{ue.then(X=>{const Re=X.getGui();e.disableEditorTooltipFeature(),i.destroyBean(X),Ge(void 0),G(void 0),Re?.remove()})}},[d]);const ge=p.useCallback(ee=>{if(j.current=ee,!ee||i.isDestroyed()||!e.isAlive()){const ue=se.current;se.current=[];for(const X of ue)X();return}let ae;const Ce=ue=>{ue&&(ee.insertAdjacentElement("afterbegin",ue.getGui()),se.current.push(()=>{_t(ue.getGui()),i.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,i,y,w,C]),U=p.useCallback(()=>{const ee=!e.isCellSpanning()||A.current,ae=P.current;if(!ae||!ee||!e||!e.isAlive()||i.isDestroyed()){a.current=i.destroyBean(a.current);return}a.current=i.createBean(new Ds);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:()=>T.current??null,getCellRenderer:()=>M.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(()=>$T(Co));return}}Co()},setEditDetails:(X,Re,He,Co)=>{if(X){let tt;X.componentFromFramework&&(Co?tt=new x2(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}),T.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,A.current??void 0,ue,t,o,a.current)},[]),ne=p.useCallback(ee=>{P.current=ee,U()},[]),V=p.useCallback(ee=>{A.current=ee,U()},[]),Q=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Ms(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(A2,{cellCtrl:e,parent:P})},Q?p.createElement(Ce,{...ee.params,key:h}):p.createElement(Ce,{...ee.params,key:h,ref:M}))}},Me=()=>{const ee=()=>l==null?null:de?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:Oe,ref:q},le()):le(),ae=Ce=>T2(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:O,"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()},L2=p.memo(k2),O2=({rowCtrl:e,containerType:t})=>{const{context:o,gos:s,editSvc:i}=p.useContext(We),n=p.useContext(Vg)==="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,G]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[k,O]=p.useState(()=>c?e.getInitialTransform(t):void 0),P=p.useRef(null),A=p.useRef(),M=p.useRef(),J=p.useRef(!1),[T,j]=p.useState(0);p.useEffect(()=>{if(J.current||!S||T>10)return;const ge=P.current?.firstChild;ge?(e.setupDetailRowAutoHeight(ge),J.current=!0):j(U=>U+1)},[S,T]);const se=p.useRef();se.current||(se.current=new ai(()=>P.current));const $=p.useRef(()=>{}),Z=p.useCallback(ge=>($.current=ge,()=>{$.current=()=>{}}),[]),z=KT(Z,()=>w.current,[]),te=n?z:b,q=p.useCallback(ge=>{if(P.current=ge,r.current=ge?o.createBean(new Ds):o.destroyBean(r.current),!ge){e.unsetComp(t);return}if(!e.isAlive()||o.isDestroyed())return;const U={setTop:G,setTransform:O,toggleCss:(ne,V)=>se.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():ri(V,()=>y(le)))},showFullWidth:ne=>{M.current=ne.params,F(ne)},getFullWidthCellRenderer:()=>A.current,getFullWidthCellRendererParams:()=>M.current,refreshFullWidth:ne=>{const V=ne();return M.current=V,je.current?(F(Q=>({...Q,params:V})),!0):!A.current||!A.current.refresh?!1:A.current.refresh(V)}};e.setComp(U,ge,t,r.current)},[]);p.useLayoutEffect(()=>pi(S,o,P.current,A),[S]);const oe=p.useMemo(()=>{const ge={top:E,transform:k};return Object.assign(ge,C),ge},[E,k,C]),de=l&&S?.componentFromFramework,Oe=!l&&te!=null,Ge=p.useMemo(()=>!!(S?.componentFromFramework&&Ms(S.componentClass)),[S]),je=p.useRef(!1);p.useEffect(()=>{je.current=Ge&&!!S&&!!s.get("reactiveCustomComponents")},[Ge,S]);const St=()=>te?.map(ge=>p.createElement(L2,{cellCtrl:ge,editingCell:i?.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:A})};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(O2),G2=({name:e})=>{const{context:t,gos:o}=p.useContext(We),s=p.useMemo(()=>ui(e),[e]),i=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")&&!!s.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[f,m]=p.useState(()=>[]),C=p.useRef(!1),v=p.useRef(),w=p.useMemo(()=>at("ag-viewport",$u(e)),[e]),b=p.useMemo(()=>at(Ku(e)),[e]),y=p.useMemo(()=>at("ag-spanning-container",Cv(e)),[e]),S=s.type==="center"||u,F=S?i:n;Ro(" AG Row Container "+e+" ",F);const E=p.useCallback(()=>{const T=!S||i.current!=null,j=n.current!=null,se=!u||r.current!=null;return T&&j&&se},[]),G=p.useCallback(()=>i.current==null&&n.current==null&&r.current==null,[]),k=p.useCallback(()=>{if(G()&&(v.current=t.destroyBean(v.current)),!t.isDestroyed()&&E()){const T=$=>{const Z=mn(l.current,a.current,C.current);Z!==l.current&&(l.current=Z,ri($,()=>d(Z)))},j=$=>{const Z=mn(g.current,h.current,C.current);Z!==g.current&&(g.current=Z,ri($,()=>m(Z)))},se={setHorizontalScroll:$=>{i.current&&(i.current.scrollLeft=$)},setViewportHeight:$=>{i.current&&(i.current.style.height=$)},setRowCtrls:({rowCtrls:$,useFlushSync:Z})=>{const z=!!Z&&a.current.length>0&&$.length>0;a.current=$,T(z)},setSpannedRowCtrls:($,Z)=>{const z=!!Z&&h.current.length>0&&$.length>0;h.current=$,j(z)},setDomOrder:$=>{C.current!=$&&(C.current=$,T(!1))},setContainerWidth:$=>{n.current&&(n.current.style.width=$)},setOffsetTop:$=>{n.current&&(n.current.style.transform=`translateY(${$})`)}};v.current=t.createBean(new Pv(e)),v.current.setComp(se,n.current,r.current??void 0,i.current)}},[E,G]),O=p.useCallback(T=>{n.current=T,k()},[k]),P=p.useCallback(T=>{r.current=T,k()},[k]),A=p.useCallback(T=>{i.current=T,k()},[k]),M=()=>p.createElement("div",{className:b,ref:O,role:S?"presentation":"rowgroup"},c.map(T=>p.createElement(pd,{rowCtrl:T,containerType:s.type,key:T.instanceId})));if(!S)return M();const J=()=>p.createElement("div",{className:y,ref:P,role:"presentation"},f.map(T=>p.createElement(pd,{rowCtrl:T,containerType:s.type,key:T.instanceId})));return p.createElement("div",{className:w,ref:A,role:"rowgroup"},M(),u?J():null)},H2=p.memo(G2),B2=()=>{const e=p.useContext(We),{context:t,overlays:o}=e,[s,i]=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,G]=p.useState(!0),[k,O]=p.useState(null),[P,A]=p.useState(""),[M,J]=p.useState(null),[T,j]=p.useState("ag-layout-normal"),se=p.useRef();se.current||(se.current=new ai(()=>$.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,dp)=>{X(be,document.createComment(dp)),X(be,Re(ot).getGui())};He(ue,iv," AG Fake Horizontal Scroll ");const Co=o?.getOverlayWrapperCompClass();Co&&He(ue,Co," AG Overlay Wrapper "),q.current&&He(q.current,rv," AG Fake Vertical Scroll ");const tt={setRowAnimationCssOnBodyViewport:i,setColumnCount:be=>{$.current&&Vp($.current,be)},setRowCount:be=>{$.current&&Hp($.current,be)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:F,setBottomInvisible:G,setColumnMovingCss:(be,ot)=>se.current.toggleCss(be,ot),updateLayoutClasses:j,setAlwaysVerticalScrollClass:O,setPinnedTopBottomOverflowY:A,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 Iv);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",T),[T]),yt=p.useMemo(()=>at("ag-body-viewport",s,T,k,M),[s,T,k,M]),ge=p.useMemo(()=>at("ag-body",T),[T]),U=p.useMemo(()=>at("ag-floating-top",S?"ag-invisible":null,M),[M,S]),ne=p.useMemo(()=>at("ag-sticky-top",M),[M]),V=p.useMemo(()=>at("ag-sticky-bottom",m==="0px"?"ag-invisible":null,M),[M,m]),Q=p.useMemo(()=>at("ag-floating-bottom",E?"ag-invisible":null,M),[M,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(H2,{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(F2,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"]}))},V2=p.memo(B2),N2=(e,t)=>{const{children:o,eFocusableElement:s,onTabKeyDown:i,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 zT({comp:b,eTopGuard:v,eBottomGuard:w,eFocusableElement:s,onTabKeyDown:i,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"?ps.TAB_GUARD_TOP:ps.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${ps.TAB_GUARD} ${w}`,role:"presentation",ref:v==="top"?f:m})};return p.createElement(p.Fragment,null,C("top"),o,C("bottom"))},W2=p.forwardRef(N2),z2=p.memo(W2),_2=({context:e})=>{const[t,o]=p.useState(""),[s,i]=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(A=>{if(f.current=A,g.current=A?e.createBean(new Gv):e.destroyBean(g.current),!A||e.isDestroyed())return;const M=g.current;w.current=M.focusInnerElement.bind(M);const J={destroyGridUi:()=>{},setRtlClass:o,forceFocusOutOfContainer:T=>{if(!T&&b.current?.isDisplayed()){b.current.forceFocusOutOfContainer(T);return}m.current?.forceFocusOutOfContainer(T)},updateLayoutClasses:i,getFocusableContainers:()=>{const T=[],j=[],se=f.current?.querySelector(".ag-root");for(const Z of y.current){if(!Z.isDisplayed())continue;const z=Z.getFocusableContainerName();if(z==="rowGroupToolbar"||z==="pivotToolbar"){T.push(Z);continue}j.push(Z)}const $=[...T];return se&&$.push({getGui:()=>se,getFocusableContainerName:()=>"gridBody"}),$.push(...j),$},setCursor:r,setUserSelect:l};M.setComp(J,A,A),d(!0)},[]);p.useEffect(()=>{const A=g.current,M=f.current;if(!u||!A||!C||!M||e.isDestroyed())return;const J=[];y.current=[],b.current=void 0;const{watermarkSelector:T,paginationSelector:j,sideBarSelector:se,statusBarSelector:$,gridHeaderDropZonesSelector:Z}=A.getOptionalSelectors(),z=[];if(Z){const q=e.createBean(new Z.component),oe=q.getGui();M.insertAdjacentElement("afterbegin",oe),z.push(oe),J.push(q),y.current.push(...q.getFocusableContainers?.()??[])}if(se){const q=e.createBean(new se.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 M.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 T&&te(T.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,s),[t,s]),G=p.useMemo(()=>at("ag-root-wrapper-body","ag-focus-managed",s),[s]),k=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),O=p.useCallback(A=>{m.current=A,h(A!==null)},[]),P=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:F,className:E,style:k,role:"presentation"},p.createElement("div",{className:G,ref:v,role:"presentation"},c&&C&&!e.isDestroyed()&&p.createElement(We.Provider,{value:e.getBeans()},p.createElement(z2,{ref:O,eFocusableElement:C,onTabKeyDown:S,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:P},p.createElement(V2,null)))))},U2=p.memo(_2),$2=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))}},K2=typeof window>"u"?p.useEffect:p.useLayoutEffect,Kg={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},q2={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...Kg},qg=new Set(Object.keys(q2)),j2=new Set(Object.keys(Kg)),jg=e=>{const t=p.useContext(u2),o=p.useContext(h2),s=p.useRef(),i=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=i.current?.classList,E=(G="")=>G.trim().split(/\s+/g).filter(Boolean);if(m.current!==S){for(const G of E(m.current))F?.contains(G)&&F.remove(G);for(const G of E(S))F?.contains(G)||F?.add(G);m.current=S}};K2(()=>{C(e.className)},[e.className]);const v=p.useCallback(S=>{if(i.current=S,C(e.className),!S){for(const T of r.current)T();r.current.length=0;return}const F=[...e.modules??[],...t??[]];o&&Qd(F)?.setLicenseKey(o),n.current||(n.current=new d2(()=>f(T=>T+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{n.current?.destroy(),n.current=null}));const E=$f(e.gridOptions,e,Object.keys(e).filter(T=>!qg.has(T))),G=()=>{if(u.current){const T=()=>c.current?.shouldQueueUpdates()?void 0:a.current.shift();let j=T();for(;j;)j(),j=T()}},k=new J2(G);c.current=k;const O=new $2,P={providedBeanInstances:{frameworkCompWrapper:new Q2(n.current,E),renderStatus:O},modules:F,frameworkOverrides:k,setThemeOnGridDiv:!0},A=T=>{g(T),T.createBean(O),r.current.push(()=>{T.destroy()}),T.getBean("ctrlsSvc").whenReady({addDestroyFunc:j=>{r.current.push(j)}},()=>{if(T.isDestroyed())return;const j=s.current;j&&e.passGridApi?.(j)})},M=T=>{T.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 T1;E.gridId??(E.gridId=d.current),s.current=J.create(S,E,A,M,P),r.current.push(()=>{s.current=void 0}),s.current&&(d.current=s.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=Y2(l.current,e);l.current=e,b(()=>{s.current&&Kf(S,s.current)})},[e]);const y=!p.useSyncExternalStore||Ai(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:w,ref:v},p.createElement(Vg.Provider,{value:y},h&&!h.isDestroyed()?p.createElement(U2,{key:h.instanceId,context:h}):null,n.current?.getPortals()??null))};function Y2(e,t){const o={};for(const s of Object.keys(t)){if(qg.has(s)){j2.has(s)&&D(274,{prop:s});continue}const i=t[s];e[s]!==i&&(o[s]=i)}return o}var Q2=class extends WT{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const o=this.gridOptions;if(Ai(o,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return Ai(o,"enableFilterHandlers")?t2:e2;case"floatingFilterComponent":return Ai(o,"enableFilterHandlers")?i2:s2;case"dateComponent":return JT;case"dragAndDropImageComponent":return XT;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return ZT;case"statusPanel":return a2;case"toolPanel":return l2;case"menuItem":return r2;case"cellRenderer":return QT;case"innerHeaderComponent":return n2}})(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 i=!t.cellRenderer&&t.name!=="toolPanel";return new _g(e,this.parent,t,i)}},Z2=p.forwardRef((e,t)=>{const o=p.useContext(We),{registry:s,context:i,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(()=>Sf(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||i.isDestroyed()){m.current=i.destroyBean(m.current),v.current?.();return}const G={toggleCss:(O,P)=>l(A=>A.setClass(O,P)),toggleDetailGridCss:(O,P)=>d(A=>A.setClass(O,P)),setDetailGrid:O=>h(O),setRowData:O=>f(O),getGui:()=>C.current},k=s.createDynamicBean("detailCellRendererCtrl",!0);if(k&&(i.createBean(k),k.init(G,e),m.current=k,n.get("detailRowAutoHeight"))){const O=()=>{if(C.current==null)return;const P=C.current.clientHeight;P!=null&&P>0&&setTimeout(()=>{e.node.setRowHeight(P),(Se(n)||xs(n))&&r.onRowHeightChanged()},0)};v.current=Kt(o,E,O),O()}},[]),F=p.useCallback(E=>{m.current?.registerDetailWithMaster(E)},[]);return p.createElement("div",{className:b,ref:S},u&&p.createElement(jg,{className:y,...u,modules:w,rowData:g,passGridApi:F}))}),J2=class extends Zh{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:dd,agGroupRowRenderer:dd,agDetailCellRenderer:Z2},this.wrapIncoming=(t,o)=>o==="ensureVisible"?UT(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()}},Yg=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(jg,{...this.props,passGridApi:this.setGridApi})}},Qg=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Qg||{}),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 X2=fe("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),eI=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",Zg="text-error",tI="my-1 border-t border-hover border-secondary",Zo=4,oI=H.jsx(vn.IconChevronRight,{size:14}),Jg=({ariaLabel:e,className:t,size:o=24,onClose:s,...i})=>H.jsx(yd,{"aria-label":e,className:Mt.mergeClasses(t,"w-auto h-auto"),onClick:s,icon:H.jsx(vn.IconX,{size:o}),...i});function Xg(e,t="menu",o=!1,s){const[i,n]=p.useState(!1),r=pe.useFloatingNodeId(),{refs:a,floatingStyles:l,context:c}=pe.useFloating({nodeId:r,placement:"right-start",open:i,onOpenChange:n,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:0,crossAxis:-4}),pe.flip({padding:e}),pe.shift({padding:e})]}),d=pe.useHover(c,{enabled:!o,move:!1,handleClose:pe.safePolygon(),delay:{open:80,close:80}}),u=pe.useClick(c,{enabled:!o}),h=pe.useDismiss(c,{bubbles:{escapeKey:!1,outsidePress:!0}}),g=pe.useRole(c,{role:t}),{getReferenceProps:f,getFloatingProps:m}=pe.useInteractions([d,u,h,g]);return{isOpen:i,nodeId:r,refs:a,floatingStyles:l,context:c,getReferenceProps:f,getFloatingProps:m}}const sI="rounded bg-layer-0 shadow",ep=({refs:e,floatingStyles:t,context:o,getFloatingProps:s,role:i,surfaceClassName:n,className:r,children:a})=>{const l=Rd();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:i,className:fe("z-floating overflow-auto text-primary focus-visible:outline-none",n??sI,l,r),...s(),children:a})})})},iI=({item:e,onRootClose:t})=>{const{isOpen:o,refs:s,floatingStyles:i,context:n,getReferenceProps:r,getFloatingProps:a}=Xg(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:s.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(zi,{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:oI})]}),o&&H.jsx(ep,{refs:s,floatingStyles:i,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&&Zg,c.className),onClick:l(c),children:[c.icon&&H.jsx("span",{className:fe(c.danger&&"text-error",c.disabled&&"text-secondary"),children:H.jsx(zi,{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))})})]})},nI=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,ha=({children:e,items:t,onItemClick:o,menuHeader:s,menuFooter:i,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[G,k]=p.useState(d),O=c!==void 0,P=O?!!c:G,A=p.useRef(null),M=p.useCallback(U=>{O||k(U),u?.(U)},[O,u]),J=p.useId(),T=a===void 0,{refs:j,floatingStyles:se,context:$}=pe.useFloating({placement:a,open:P,onOpenChange:M,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:Zo,crossAxis:0}),T?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=nI(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),A.current=document.elementFromPoint(U.clientX,U.clientY)),M(!0))},[S,l,M,Oe,r]),je=p.useCallback(U=>{!S||l||(r.includes(Vt.ContextMenu)&&P&&M(!1),Oe(U.clientX,U.clientY),A.current=document.elementFromPoint(U.clientX,U.clientY))},[S,l,Oe,P,r,M]);p.useEffect(()=>{l&&P&&M(!1)},[l,P,M]);const St=p.useCallback(U=>ne=>{U.disabled||(U.onClick?.({key:U.key,domEvent:ne}),o?.({key:U.key,domEvent:ne}),M(!1))},[o,M]),yt=p.useMemo(()=>n?n():t?H.jsxs(H.Fragment,{children:[s&&H.jsx(H.Fragment,{children:typeof s=="function"?s():s}),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(tI,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(iI,{item:U,onRootClose:()=>M(!1)},U.key):H.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!U.disabled,className:fe(da,U.disabled&&ua,U.danger&&Zg,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(zi,{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))}),i&&H.jsx(H.Fragment,{children:typeof i=="function"?i():i})]}):null,[St,t,i,s,n,M,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:A.current instanceof Element&&(ne=A.current),!ne)return;const V=new IntersectionObserver(([Q])=>{Q.isIntersecting||M(!1)},{root:null,threshold:0});return V.observe(ne),()=>V.disconnect()},[P,j.reference,M]),H.jsxs(H.Fragment,{children:[H.jsx("span",{ref:j.setReference,className:fe(X2,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:se,className:fe(eI,!F&&"w-max",v),...de(),children:[h&&H.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:H.jsx(Jg,{ariaLabel:"Close dropdown",onClose:U=>{g?.(U),M(!1)}})}),yt]})})})]})},tp="en-US",op={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},rI="text-primary",br=40,sp={minWidth:br,width:br,maxWidth:br},aI={cellClass:"ag-grid-no-checkbox",...sp},lI={...sp};var Ks=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Ks||{});const cI=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0}),ip=(e,t,o,s,i)=>{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:i?1:-1:i?-1:1},np=e=>e?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)):{},dI=(e,t)=>e.some((o,s)=>o.field!==t[s].field?!0:o.hide!==t[s].hide),uI="h-full w-full",fd=".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))"},md=40;var So=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(So||{}),is=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(is||{});const Cd=()=>typeof window<"u"&&window.innerWidth<1279,vd=()=>typeof window<"u"&&window.innerWidth<640,hI=()=>{if(typeof window>"u")return is.Undefined;const e=window.innerWidth;return e>=1024?is.Desktop:e<640?is.Mobile:is.Tablet},rp=()=>{const[e,t]=p.useState(vd());return p.useEffect(()=>{const o=()=>t(vd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},ap=()=>{const[e,t]=p.useState(Cd());return p.useEffect(()=>{const o=()=>t(Cd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function lp(e,t){let o=null;return(...s)=>{o&&clearTimeout(o),o=setTimeout(()=>e(...s),t)}}let wd=!1;const cp=()=>{wd||(wd=!0,NT({testIdAttribute:"dataQA"}),Yd.registerModules([LT]))},gI=({columnDefs:e,rowData:t,additionalGridOptions:o,getContextMenuItems:s,className:i,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})=>{cp();const[F,E]=p.useState(),G=p.useId(),k=rp(),O=ap(),P=p.useRef(new Set),A=p.useRef(void 0),M=p.useMemo(()=>({...Sr,oddRowBackgroundColor:h?Sr.oddRowBackgroundColor:Sr.backgroundColor,wrapperBorder:w}),[h,w]),J=p.useCallback(V=>{V.api.sizeColumnsToFit()},[]),T=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=s?.(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})})})}},[s,a,u,y]),j=p.useCallback(V=>V===So.API||V===So.ROW_DATA_CHANGED,[]),se=p.useCallback(V=>{if(!F)return;const le=(V.selectedNodes||[]).map(Ae=>Ae.data),Me=new Set(le.map(u));P.current=Me,A.current=V.source,j(V.source)||c?.(Me,le)},[F,u,j,c]),$=p.useMemo(()=>lp(V=>se?.(V),100),[se]),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(Fd,{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 k||O||l&&l.size>0?`${V} ${Q}`:!l||l.size===0?V:`${V} ${Q}`},[k,O,l]),te=p.useCallback(()=>k||O?z():!l||l.size===0?"dial-row-not-select-header":z(),[z,k,O,l]),q=p.useMemo(()=>{if(S===Ks.SINGLE)return{...aI,cellRenderer:Z};if(S===Ks.MULTIPLE)return{...lI,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:T};if(!Q)return V;const le=V.cellRenderer;return{...V,cellRenderer:Ae=>{const ee=Ae.data?s?.(Ae.data)??[]:[];let ae=null;if(typeof le=="function"){const X=le;ae=H.jsx(X,{...Ae})}else ae=T(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,s,u,T,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:ip,...np(Oe)}),[g,Oe]),St=V=>{const Q=document.querySelector(fd);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(Ed,{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===Ks.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 ${fd}`).forEach(V=>{V.setAttribute("aria-description",Rr)})},[]);return p.useEffect(()=>{const V=j(A.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(uI,i,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":G,children:H.jsx(Yg,{rowModelType:"clientSide",headerHeight:md,rowHeight:md,cellSelection:!1,theme:Bh.withPart(Th).withParams({...M}),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},pI=({value:e,locale:t=tp,options:o=op,emptyPlaceholder:s,className:i,hideTooltip:n=!1})=>{const r=Pl(e),a=p.useMemo(()=>r?new Intl.DateTimeFormat(t,o).format(r):s,[r,s,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(rI,i),hideTooltip:n})};exports.AgGridReact=Yg;exports.DEFAULT_DATE_FORMAT_OPTIONS=op;exports.DEFAULT_LOCALE=tp;exports.DIAL_KIT_CLASS=bn;exports.DialCloseButton=Jg;exports.DialDangerIconButton=vp;exports.DialDateCellRenderer=pI;exports.DialDropdown=ha;exports.DialEllipsisTooltip=pa;exports.DialGhostIconButton=yd;exports.DialGrid=gI;exports.DialIcon=zi;exports.DialNeutralIconButton=Cp;exports.DialNoDataContent=Ed;exports.DialPrimaryIconButton=mp;exports.DialRadioButton=Fd;exports.DialSecondaryIconButton=wp;exports.DialSuccessIconButton=Sp;exports.DialTertiaryIconButton=bp;exports.DropdownItemType=Cn;exports.DropdownTrigger=Vt;exports.DropdownType=Qg;exports.GridSelectionMode=Ks;exports.ScreenType=is;exports.SubMenuPanel=ep;exports.ThemeScope=yp;exports.ariaDescription=Rr;exports.baseColumnComparator=ip;exports.checkColDefsChanges=dI;exports.colorSchemeLight=Th;exports.convertToDate=Pl;exports.debounceFn=lp;exports.getScreenType=hI;exports.observeElementSize=Sd;exports.omitUndefined=np;exports.registerAgGridModulesOnce=cp;exports.scheduleMeasure=wn;exports.themeBalham=Bh;exports.useIsMobileScreen=rp;exports.useIsTabletScreen=ap;exports.useSubMenuFloating=Xg;exports.useThemeScope=Rd;
|