diff --git a/src/main/frontend/portfolio-public.js b/src/main/frontend/portfolio-public.js index 6de210b..98e7dca 100644 --- a/src/main/frontend/portfolio-public.js +++ b/src/main/frontend/portfolio-public.js @@ -9,7 +9,11 @@ import "ag-grid-community/styles/ag-theme-quartz.css"; ModuleRegistry.registerModules([AllCommunityModule]); const DEFAULT_SELECTOR = "[data-portfolio-list-panel]"; +const DETAIL_CONTENT_SELECTOR = ".portfolio-content"; const DEFAULT_PAGE_SIZE = 5; +const MIN_ZOOM_SCALE = 1; +const MAX_ZOOM_SCALE = 6; +const WHEEL_ZOOM_STEP = 0.0015; function toDate(value) { if (!value) { @@ -318,8 +322,287 @@ function initPortfolioListPanel(selector = DEFAULT_SELECTOR) { }; } +function getTouchDistance(firstPointer, secondPointer) { + return Math.hypot( + firstPointer.clientX - secondPointer.clientX, + firstPointer.clientY - secondPointer.clientY, + ); +} + +function getTouchCenter(firstPointer, secondPointer) { + return { + x: (firstPointer.clientX + secondPointer.clientX) / 2, + y: (firstPointer.clientY + secondPointer.clientY) / 2, + }; +} + +function clamp(value, min, max) { + return Math.min(Math.max(value, min), max); +} + +function initPortfolioImageZoom(selector = DETAIL_CONTENT_SELECTOR) { + const content = document.querySelector(selector); + if (!content) { + return null; + } + + const images = Array.from(content.querySelectorAll("img")).filter( + (image) => image.getAttribute("src"), + ); + if (!images.length) { + return null; + } + + const overlay = document.createElement("div"); + overlay.className = "portfolio-image-zoom"; + overlay.hidden = true; + overlay.setAttribute("aria-hidden", "true"); + + const stage = document.createElement("div"); + stage.className = "portfolio-image-zoom-stage"; + + const zoomImage = document.createElement("img"); + zoomImage.className = "portfolio-image-zoom-img"; + zoomImage.alt = ""; + zoomImage.draggable = false; + + const closeButton = document.createElement("button"); + closeButton.type = "button"; + closeButton.className = "portfolio-image-zoom-close"; + closeButton.setAttribute("aria-label", "이미지 확대 닫기"); + closeButton.textContent = "X"; + + stage.appendChild(zoomImage); + overlay.append(stage, closeButton); + document.body.appendChild(overlay); + + const pointers = new Map(); + let lastFocusedElement = null; + let scale = MIN_ZOOM_SCALE; + let translateX = 0; + let translateY = 0; + let startDistance = 0; + let startScale = MIN_ZOOM_SCALE; + let startCenter = null; + let startTranslateX = 0; + let startTranslateY = 0; + let lastPanPointer = null; + + const applyTransform = () => { + zoomImage.style.transform = `translate3d(${translateX}px, ${translateY}px, 0) scale(${scale})`; + overlay.classList.toggle("is-zoomed", scale > MIN_ZOOM_SCALE); + }; + + const resetTransform = () => { + scale = MIN_ZOOM_SCALE; + translateX = 0; + translateY = 0; + startDistance = 0; + startScale = MIN_ZOOM_SCALE; + startCenter = null; + startTranslateX = 0; + startTranslateY = 0; + lastPanPointer = null; + pointers.clear(); + applyTransform(); + }; + + const closeZoom = () => { + overlay.hidden = true; + overlay.setAttribute("aria-hidden", "true"); + document.body.classList.remove("portfolio-image-zoom-open"); + resetTransform(); + + if (lastFocusedElement && typeof lastFocusedElement.focus === "function") { + lastFocusedElement.focus({ preventScroll: true }); + } + }; + + const openZoom = (image) => { + lastFocusedElement = document.activeElement; + zoomImage.src = image.currentSrc || image.src; + zoomImage.alt = image.alt || ""; + overlay.hidden = false; + overlay.setAttribute("aria-hidden", "false"); + document.body.classList.add("portfolio-image-zoom-open"); + resetTransform(); + closeButton.focus({ preventScroll: true }); + }; + + const updateGesture = () => { + const activePointers = Array.from(pointers.values()); + + if (activePointers.length >= 2) { + const [firstPointer, secondPointer] = activePointers; + const distance = getTouchDistance(firstPointer, secondPointer); + const center = getTouchCenter(firstPointer, secondPointer); + + if (!startDistance || !startCenter) { + startDistance = distance; + startScale = scale; + startCenter = center; + startTranslateX = translateX; + startTranslateY = translateY; + } + + scale = clamp( + startScale * (distance / startDistance), + MIN_ZOOM_SCALE, + MAX_ZOOM_SCALE, + ); + + if (scale <= MIN_ZOOM_SCALE) { + translateX = 0; + translateY = 0; + } else { + translateX = startTranslateX + center.x - startCenter.x; + translateY = startTranslateY + center.y - startCenter.y; + } + + lastPanPointer = null; + applyTransform(); + return; + } + + startDistance = 0; + startCenter = null; + + if (activePointers.length === 1 && scale > MIN_ZOOM_SCALE) { + const [pointer] = activePointers; + + if (lastPanPointer) { + translateX += pointer.clientX - lastPanPointer.clientX; + translateY += pointer.clientY - lastPanPointer.clientY; + } + + lastPanPointer = { clientX: pointer.clientX, clientY: pointer.clientY }; + applyTransform(); + return; + } + + lastPanPointer = null; + }; + + const zoomAtPoint = (nextScale, clientX, clientY) => { + const previousScale = scale; + const rect = zoomImage.getBoundingClientRect(); + const centerX = rect.left + rect.width / 2; + const centerY = rect.top + rect.height / 2; + + scale = clamp(nextScale, MIN_ZOOM_SCALE, MAX_ZOOM_SCALE); + + if (scale <= MIN_ZOOM_SCALE) { + translateX = 0; + translateY = 0; + applyTransform(); + return; + } + + const scaleRatio = scale / previousScale; + translateX += (1 - scaleRatio) * (clientX - centerX); + translateY += (1 - scaleRatio) * (clientY - centerY); + applyTransform(); + }; + + images.forEach((image) => { + image.classList.add("portfolio-zoomable-image"); + image.setAttribute("tabindex", "0"); + image.setAttribute("role", "button"); + image.setAttribute("aria-label", "이미지 원본 확대 보기"); + + image.addEventListener("click", (event) => { + event.preventDefault(); + openZoom(image); + }); + + image.addEventListener("keydown", (event) => { + if (event.key !== "Enter" && event.key !== " ") { + return; + } + + event.preventDefault(); + openZoom(image); + }); + }); + + overlay.addEventListener("click", (event) => { + if (event.target === overlay || event.target === stage) { + closeZoom(); + } + }); + + closeButton.addEventListener("click", closeZoom); + + overlay.addEventListener("pointerdown", (event) => { + if (event.target !== zoomImage && event.target !== stage) { + return; + } + + if (event.pointerType === "mouse" && event.button !== 0) { + return; + } + + pointers.set(event.pointerId, event); + overlay.setPointerCapture?.(event.pointerId); + updateGesture(); + }); + + overlay.addEventListener("pointermove", (event) => { + if (!pointers.has(event.pointerId)) { + return; + } + + pointers.set(event.pointerId, event); + updateGesture(); + }); + + const releasePointer = (event) => { + pointers.delete(event.pointerId); + overlay.releasePointerCapture?.(event.pointerId); + startDistance = 0; + startCenter = null; + lastPanPointer = null; + }; + + overlay.addEventListener("pointerup", releasePointer); + overlay.addEventListener("pointercancel", releasePointer); + + overlay.addEventListener( + "wheel", + (event) => { + if (overlay.hidden) { + return; + } + + event.preventDefault(); + const nextScale = scale * (1 - event.deltaY * WHEEL_ZOOM_STEP); + zoomAtPoint(nextScale, event.clientX, event.clientY); + }, + { passive: false }, + ); + + zoomImage.addEventListener("dblclick", (event) => { + event.preventDefault(); + zoomAtPoint(scale > MIN_ZOOM_SCALE ? MIN_ZOOM_SCALE : 2.5, event.clientX, event.clientY); + }); + + document.addEventListener("keydown", (event) => { + if (overlay.hidden || event.key !== "Escape") { + return; + } + + closeZoom(); + }); + + return { + open: openZoom, + close: closeZoom, + }; +} + document.addEventListener("DOMContentLoaded", () => { initPortfolioListPanel(); + initPortfolioImageZoom(); }); -export { initPortfolioListPanel }; +export { initPortfolioImageZoom, initPortfolioListPanel }; diff --git a/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-post-list.css b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-post-list.css index acf659a..939874d 100644 --- a/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-post-list.css +++ b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-post-list.css @@ -342,3 +342,98 @@ height: 265px; } } + +.portfolio-zoomable-image { + cursor: zoom-in; +} + +.portfolio-zoomable-image:focus-visible { + outline: 3px solid rgba(31, 90, 160, 0.35); + outline-offset: 4px; +} + +.portfolio-image-zoom-open { + overflow: hidden; +} + +.portfolio-image-zoom[hidden] { + display: none; +} + +.portfolio-image-zoom { + position: fixed; + z-index: 1080; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, 0.88); + padding: 72px 24px 32px; +} + +.portfolio-image-zoom-stage { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + overflow: hidden; + touch-action: none; +} + +.portfolio-image-zoom-img { + display: block; + max-width: 100%; + max-height: 100%; + object-fit: contain; + cursor: grab; + user-select: none; + will-change: transform; + transition: transform 0.08s ease-out; + transform-origin: center center; +} + +.portfolio-image-zoom.is-zoomed .portfolio-image-zoom-img { + cursor: move; + transition: none; +} + +.portfolio-image-zoom-close { + position: fixed; + top: 22px; + right: 22px; + display: inline-flex; + align-items: center; + justify-content: center; + width: 44px; + height: 44px; + border: 1px solid rgba(255, 255, 255, 0.32); + border-radius: 50%; + background: rgba(0, 0, 0, 0.42); + color: #ffffff; + font-family: Arial, sans-serif; + font-size: 20px; + font-weight: 600; + line-height: 1; + box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28); +} + +.portfolio-image-zoom-close:hover, +.portfolio-image-zoom-close:focus-visible { + border-color: rgba(255, 255, 255, 0.72); + background: rgba(255, 255, 255, 0.16); + outline: 0; +} + +@media (max-width: 575.98px) { + .portfolio-image-zoom { + padding: 64px 12px 20px; + } + + .portfolio-image-zoom-close { + top: 14px; + right: 14px; + width: 42px; + height: 42px; + } +} diff --git a/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.js b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.js index b9b16c7..533a436 100644 --- a/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.js +++ b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.js @@ -1,64 +1,64 @@ -var IotdoorPortfolio=(()=>{var Nr=Object.defineProperty;var lu=Object.getOwnPropertyDescriptor;var cu=Object.getOwnPropertyNames;var du=Object.prototype.hasOwnProperty;var gu=(e,t)=>{for(var o in t)Nr(e,o,{get:t[o],enumerable:!0})},uu=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of cu(t))!du.call(e,r)&&r!==o&&Nr(e,r,{get:()=>t[r],enumerable:!(i=lu(t,r))||i.enumerable});return e};var hu=e=>uu(Nr({},"__esModule",{value:!0}),e);var JE={};gu(JE,{initPortfolioListPanel:()=>su});function U(e){if(e!=null&&e.length)return e[e.length-1]}function It(e,t,o){if(e===t)return!0;if(!e||!t)return e==null&&t==null;let i=e.length;if(i!==t.length)return!1;for(let r=0;r=0&&e.splice(o,1)}function pu(e,t){let o=0,i=0;for(;o=0;i--)e.splice(o,0,t[i])}var st=e=>e==null||e===""?null:e;function M(e){return e!=null&&e!==""}function Q(e){return!M(e)}var Sa=e=>e!=null&&typeof e.toString=="function"?e.toString():null,oi=(e,t)=>{let o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i},fu=(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{let c=i?()=>i.wrapIncoming(l):l;t?this.dispatchAsync(c):c()},a=this.getListeners(o,t,!1);if(((s=a==null?void 0:a.size)!=null?s:0)>0){let l=new Set(a);for(let c of l)a!=null&&a.has(c)&&r(()=>c(e))}let n=this.getGlobalListeners(t);if(n.size>0){let l=new Set(n);for(let c of l)r(()=>c(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},o=this.frameworkOverrides;o?o.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(let t of e)t()}},mu=/[&<>"']/g,vu={"&":"&","<":"<",">":">",'"':""","'":"'"};function zo(e){var t;return(t=e==null?void 0:e.toString().toString())!=null?t:null}function Ko(e){var t,o;return(o=(t=zo(e))==null?void 0:t.replace(mu,i=>vu[i]))!=null?o:null}function ws(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function Cu(e){if(!e||e==null)return null;let 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(r=>r.substring(0,1).toUpperCase()+(r.length>1?r.substring(1,r.length):"")).join(" ")}function Ue(e){return e.eRootDiv.getRootNode()}function Y(e){return Ue(e).activeElement}function te(e){let{gos:t,eRootDiv:o}=e,i=null,r=t.get("getDocument");return r&&M(r)?i=r():o&&(i=o.ownerDocument),i&&M(i)?i:document}function ln(e){let t=Y(e);return t===null||t===te(e).body}function cn(e){return te(e).defaultView||window}function dn(e){let t=null,o=null;try{t=te(e).fullscreenElement}catch{}finally{t||(t=Ue(e));let i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t==null?void 0:t.documentElement:o=t}return o}function wu(e){var o;let t=dn(e);return(o=t==null?void 0:t.clientWidth)!=null?o:window.innerWidth||-1}function bu(e){var o;let t=dn(e);return(o=t==null?void 0:t.clientHeight)!=null?o:window.innerHeight||-1}function Ge(e,t,o){o==null||typeof o=="string"&&o==""?tc(e,t):Te(e,t,o)}function Te(e,t,o){e.setAttribute(oc(t),o.toString())}function tc(e,t){e.removeAttribute(oc(t))}function oc(e){return`aria-${e}`}function Rt(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function yu(e){let t=e==null?void 0:e.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function Su(e){return e.getAttribute("aria-label")}function Fo(e,t){Ge(e,"label",t)}function ii(e,t){Ge(e,"labelledby",t)}function ic(e,t){Ge(e,"live",t)}function xu(e,t){Ge(e,"atomic",t)}function ku(e,t){Ge(e,"relevant",t)}function gn(e,t){Ge(e,"invalid",t)}function Ru(e,t){Ge(e,"disabled",t)}function rc(e,t){Ge(e,"hidden",t)}function xa(e,t){Te(e,"expanded",t)}function Eu(e,t){Te(e,"setsize",t)}function Fu(e,t){Te(e,"posinset",t)}function Du(e,t){Te(e,"multiselectable",t)}function Mu(e,t){Te(e,"rowcount",t)}function ri(e,t){Te(e,"rowindex",t)}function Pu(e,t){Te(e,"rowspan",t)}function Iu(e,t){Te(e,"colcount",t)}function ac(e,t){Te(e,"colindex",t)}function Tu(e,t){Te(e,"colspan",t)}function Au(e,t){Te(e,"sort",t)}function zu(e){tc(e,"sort")}function nc(e,t){Ge(e,"selected",t)}function Lu(e,t){Ge(e,"controls",t)}function Ou(e,t){Lu(e,t.id),ii(t,e.id)}function bs(e,t){Ge(e,"owns",t)}function yr(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Hu="[tabindex], input, select, button, textarea, [href]",sc="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function $o(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(sc)?!1:Ie(e)}function q(e,t,o={}){let{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||rc(e,!t)}function Bu(e,t,o={}){let{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||rc(e,!t)}function ai(e,t){var a;let o="disabled",i=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);i(e);let r=(a=e.querySelectorAll("input"))!=null?a:[];for(let n of r)i(n)}function qt(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function ro(e){let{height:t,width:o,borderTopWidth:i,borderRightWidth:r,borderBottomWidth:a,borderLeftWidth:n,paddingTop:s,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:g,marginRight:u,marginBottom:h,marginLeft:p,boxSizing:f}=window.getComputedStyle(e),m=Number.parseFloat;return{height:m(t||"0"),width:m(o||"0"),borderTopWidth:m(i||"0"),borderRightWidth:m(r||"0"),borderBottomWidth:m(a||"0"),borderLeftWidth:m(n||"0"),paddingTop:m(s||"0"),paddingRight:m(l||"0"),paddingBottom:m(c||"0"),paddingLeft:m(d||"0"),marginTop:m(g||"0"),marginRight:m(u||"0"),marginBottom:m(h||"0"),marginLeft:m(p||"0"),boxSizing:f}}function un(e){let t=ro(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ni(e){let t=ro(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function lc(e){let{height:t,marginBottom:o,marginTop:i}=ro(e);return Math.floor(t+o+i)}function $i(e){let{width:t,marginLeft:o,marginRight:i}=ro(e);return Math.floor(t+o+i)}function cc(e){let t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:r,borderBottomWidth:a}=ro(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(r||0),bottom:t.bottom+(a||0)}}function Yi(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function Qi(e,t,o){o&&(t*=-1),e.scrollLeft=t}function ne(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function De(e){e!=null&&e.parentNode&&e.remove()}function dc(e){return!!e.offsetParent}function Ie(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!dc(e)||window.getComputedStyle(e).visibility!=="visible")}function hn(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function gc(e,t,o){o&&o.nextSibling===t||(e.firstChild?o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.prepend(t):e.appendChild(t))}function uc(e,t){for(let o=0;o`-${t.toLocaleLowerCase()}`)}function fi(e,t){if(t)for(let o of Object.keys(t)){let i=t[o];if(!(o!=null&&o.length)||i==null)continue;let r=Vu(o),a=i.toString(),n=a.replace(/\s*!important/g,""),s=n.length!=a.length?"important":void 0;e.style.setProperty(r,n,s)}}function si(e){return()=>{let t=e();return t?hc(t)||Nu(t):!0}}function hc(e){return e.clientWidtha==null?void 0:a.disconnect()}function ht(e,t){let o=cn(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var pc="data-ref",Vo;function ys(){return Vo!=null||(Vo=document.createTextNode(" ")),Vo.cloneNode()}function Qt(e){let{attrs:t,children:o,cls:i,ref:r,role:a,tag:n}=e,s=document.createElement(n);if(i&&(s.className=i),r&&s.setAttribute(pc,r),a&&s.setAttribute("role",a),t)for(let l of Object.keys(t))s.setAttribute(l,t[l]);if(o)if(typeof o=="string")s.textContent=o;else{let l=!0;for(let c of o)c&&(typeof c=="string"?(s.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?s.appendChild(c()):(l&&(s.appendChild(ys()),l=!1),s.append(Qt(c)),s.appendChild(ys())))}return s}var Wu=["touchstart","touchend","touchmove","touchcancel","scroll"],qu=["wheel"],Gr={},Ji=(()=>{let e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof Gr[o]=="boolean")return Gr[o];let i=document.createElement(e[o]||"div");return o="on"+o,Gr[o]=o in i}})();function _u(e,t){return!t||!e?!1:ju(t).indexOf(e)>=0}function Uu(e){let t=[],o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function ju(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():Uu(t)}function Ku(e,t,o){let i=$u(t),r;i!=null&&(r={passive:i}),e.addEventListener(t,o,r)}var $u=e=>{let t=Wu.includes(e),o=qu.includes(e);if(t)return!0;if(o)return!1};function fc(e,t,o){if(o===0)return!1;let i=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY);return Math.max(i,r)<=o}var mo=(e,t)=>{let o=e.identifier;for(let i=0,r=t.length;i0&&u+e.clientWidth>a+m&&(u=a+m-e.clientWidth),u<0&&(u=0),n>0&&g+e.clientHeight>n+f&&(g=n+f-e.clientHeight),g<0&&(g=0),e.style.left=`${u}px`,e.style.top=`${g}px`}var Oi=(e,...t)=>{for(let o of t){let[i,r,a,n]=o;i.addEventListener(r,a,n),e.push(o)}},mn=e=>{if(e){for(let[t,o,i,r]of e)t.removeEventListener(o,i,r);e.length=0}},yt=e=>{e.cancelable&&e.preventDefault()};function Qu(e,t){return t}function mc(e){var t;return(t=e==null?void 0:e.getLocaleTextFunc())!=null?t:Qu}function Zu(e,t,o,i){let r=t[o];return e.getLocaleTextFunc()(o,typeof r=="function"?r(i):r,i)}function Ju(e){return(t,o,i)=>e({key:t,defaultValue:o,variableValues:i})}function Xu(e){return(t,o,i)=>{let r=e==null?void 0:e[t];if(r&&(i!=null&&i.length)){let a=0;for(;!(a>=i.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",i[a++])}return r!=null?r:o}}var ve=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(){let{destroyFunctions:e}=this;for(let t=0;tnull;let i;if(eh(e))e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null);else{let r=th(e);e instanceof HTMLElement?Ku(e,t,o):r?e.addListener(t,o):e.addEventListener(t,o),i=r?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}setupPropertyListener(e,t){let{gos:o}=this;o.addPropertyEventListener(e,t);let i=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let o=e.join("-")+this.propertyListenerId++,i=r=>{if(r.changeSet){if(r.changeSet&&r.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=r.changeSet.id}let a={type:"propertyChanged",changeSet:r.changeSet,source:r.source};t(a)};for(let r of e)this.setupPropertyListener(r,i)}getLocaleTextFunc(){return mc(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){let 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 eh(e){return e.__addEventListener!==void 0}function th(e){return e.eventServiceType==="global"}var S=class extends ve{},ka=new Set,Sr=(e,t)=>{ka.has(t)||(ka.add(t),e())};Sr._set=ka;var oh={pending:!1,funcs:[]},ih={pending:!1,funcs:[]};function Ra(e,t="setTimeout",o){let i=t==="raf"?ih:oh;if(i.funcs.push(e),i.pending)return;i.pending=!0;let r=()=>{let a=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(let n of a)n()};t==="raf"?ht(o,r):window.setTimeout(r,0)}function re(e,t,o){let i;return function(...r){let a=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(a,r)},o),i}}function Ss(e,t){let o=0;return function(...i){let r=this,a=Date.now();a-o{a!=null&&(window.clearInterval(a),a=null)};e.addDestroyFunc(s);let l=()=>{let c=Date.now()-r>i;(t()||c)&&(o(),n=!0,s())};l(),n||(a=window.setInterval(l,10))}var vc=new Set(["__proto__","constructor","prototype"]);function ah(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o!vc.has(i)))t(o,e[o])}}function he(e,t,o=!0,i=!1){M(t)&&ah(t,(r,a)=>{let n=e[r];n!==a&&(i&&n==null&&a!=null&&typeof a=="object"&&a.constructor===Object&&(n={},e[r]=n),xs(a)&&xs(n)&&!Array.isArray(n)?he(n,a,o,i):(o||a!==void 0)&&(e[r]=a))})}function xs(e){return typeof e=="object"&&e!==null}var vn=class rt{static applyGlobalGridOptions(t){if(!rt.gridOptions)return{...t};let o={};return he(o,rt.gridOptions,!0,!0),rt.mergeStrategy==="deep"?he(o,t,!0,!0):o={...o,...t},rt.gridOptions.context&&(o.context=rt.gridOptions.context),t.context&&(rt.mergeStrategy==="deep"&&o.context&&he(t.context,o.context,!0,!0),o.context=t.context),o}static applyGlobalGridOption(t,o){if(rt.mergeStrategy==="deep"){let i=nh(t);if(i&&typeof i=="object"&&typeof o=="object")return rt.applyGlobalGridOptions({[t]:o})[t]}return o}};vn.gridOptions=void 0;vn.mergeStrategy="shallow";var Cn=vn;function nh(e){var t;return(t=Cn.gridOptions)==null?void 0:t[e]}var sh={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},Cc="https://www.ag-grid.com";function Et(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Qo(e,...t){Sr(()=>wc(e,...t),e+(t==null?void 0:t.join("")))}function vo(e,...t){Sr(()=>lh(e,...t),e+(t==null?void 0:t.join("")))}function lh(e,...t){console.error("AG Grid: "+e,...t)}function wc(e,...t){console.warn("AG Grid: "+e,...t)}var bc=new Set,Xi={},Co={},Hi,yc=!1,Sc=!1,ch=!1;function dh(e){let[t,o]=e.version.split(".")||[],[i,r]=Hi.split(".")||[];return t===i&&o===r}function gh(e){var i;Hi||(Hi=e.version);let t=r=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${r} Please update all modules to the same version.`;e.version?dh(e)||vo(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Hi}.`)):vo(t(`'${e.moduleName}' is incompatible.`));let o=(i=e.validate)==null?void 0:i.call(e);o&&!o.isValid&&vo(`${o.message}`)}function ci(e,t,o=!1){var a;o||(yc=!0),gh(e);let i=(a=e.rowModels)!=null?a:["all"];bc.add(e);let r;t!==void 0?(Sc=!0,Co[t]===void 0&&(Co[t]={}),r=Co[t]):r=Xi;for(let n of i)r[n]===void 0&&(r[n]={}),r[n][e.moduleName]=e;if(e.dependsOn)for(let n of e.dependsOn)ci(n,t,o)}function uh(e){delete Co[e]}function Ea(e,t,o){let i=r=>{var a,n,s;return!!((a=Xi[r])!=null&&a[e])||!!((s=(n=Co[t])==null?void 0:n[r])!=null&&s[e])};return i(o)||i("all")}function wn(){return Sc}function hh(e,t){var i,r,a,n,s;let o=(i=Co[e])!=null?i:{};return[...Object.values((r=Xi.all)!=null?r:{}),...Object.values((a=o.all)!=null?a:{}),...Object.values((n=Xi[t])!=null?n:{}),...Object.values((s=o[t])!=null?s:{})]}function ph(){return new Set(bc)}function fh(){return yc}function bn(){return ch}var xc=class{static register(e){ci(e,void 0)}static registerModules(e){for(let t of e)ci(t,void 0)}};var D="35.2.1",ks=2e3,Rs=100,kc="_version_",Bi=null,wo=`${Cc}/javascript-data-grid`;function mh(e){Bi=e}function vh(e){wo=e}function Rc(e,t,o){var i;return(i=Bi==null?void 0:Bi(e,t))!=null?i:[yh(e,t,o)]}function yn(e,t,o,i,r){e(`${i?"warning":"error"} #${t}`,...Rc(t,o,r))}function Ch(e){if(!e)return String(e);let t={};for(let o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function wh(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Ch(e)),t}function Vi(e){return e===void 0?"undefined":e===null?"null":e}function Fa(e,t){return`${e}?${t.toString()}`}function bh(e,t,o){let i=Array.from(t.entries()).sort((a,n)=>n[1].length-a[1].length),r=Fa(e,t);for(let[a,n]of i){if(a===kc)continue;let s=r.length-o;if(s<=0)break;let l="...",c=s+l.length,d=n.length-c>Rs?n.slice(0,n.length-c)+l:n.slice(0,Rs)+l;t.set(a,d),r=Fa(e,t)}return r}function Ec(e,t){let o=new URLSearchParams;if(o.append(kc,D),t)for(let a of Object.keys(t))o.append(a,wh(t[a]));let i=`${wo}/errors/${e}`,r=Fa(i,o);return r.length<=ks?r:bh(i,o,ks)}var yh=(e,t,o)=>{let i=Ec(e,t),r=`${o?o+` -`:""}Visit ${i}`;return bn()?r:`${r}${o?"":` - Alternatively register the ValidationModule to see the full message in the console.`}`};function k(...e){yn(Qo,e[0],e[1],!0)}function W(...e){yn(vo,e[0],e[1],!1)}function _o(e,t,o){yn(vo,e,t,!1,o)}function Sh(e,t){let o=t[0];return`error #${o} `+Rc(o,t[1],e).join(" ")}function Je(...e){return Sh(void 0,e)}function Fc(e,t){return e.get("rowModelType")===t}function ee(e,t){return Fc(e,"clientSide")}function mi(e,t){return Fc(e,"serverSide")}function se(e,t){return e.get("domLayout")===t}function _t(e){return or(e)!==void 0}function Dc(e){return typeof e.get("getRowHeight")=="function"}function xh(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function kh({gos:e,formula:t}){let o=e.get("rowNumbers");return o||!!(t!=null&&t.active)&&o!==!1}function Ft(e,t,o=!1,i){let{gos:r,environment:a}=e;if(i==null&&(i=a.getDefaultRowHeight()),Dc(r)){if(o)return{height:i,estimated:!0};let l={node:t,data:t.data},c=r.getCallback("getRowHeight")(l);if(Da(c))return c===0&&k(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&r.get("masterDetail"))return Rh(r);let n=r.get("rowHeight");return{height:n&&Da(n)?n:i,estimated:!1}}function Rh(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};let t=e.get("detailRowHeight");return Da(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Ut(e){let{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||Q(i))return t.getDefaultRowHeight();let r=t.refreshRowHeightVariable();return r!==-1?r:(k(24),t.getDefaultRowHeight())}function Da(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Mc(e,t,o){let i=t[e.getDomDataKey()];return i?i[o]:void 0}function Zt(e,t,o,i){let r=e.getDomDataKey(),a=t[r];Q(a)&&(a={},t[r]=a),a[o]=i}function bo(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Pc(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||se(e,"print"))}function nt(e){let t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function er(e){let t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Ic(e){return e.get("grandTotalRow")}function Eh(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Fh(e){return Eh(e)&&e.get("groupHideColumnsUntilExpanded")&&ee(e)}function Tc(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Ac(e,t,o){return!!t.group&&!t.footer&&Tc(e,o)}function Do(e){let t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(Sr(()=>k(25,{id:i}),"getRowIdString"),i=String(i)),i}}function Dh(e,t){let o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Mh(e){let t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function yo(e){var t;return(t=e==null?void 0:e.checkboxes)!=null?t:!0}function Ni(e){var t;return(e==null?void 0:e.mode)==="multiRow"&&((t=e.headerCheckbox)!=null?t:!0)}function tr(e){var t;if(typeof e=="object")return(t=e.checkboxLocation)!=null?t:"selectionColumn"}function Wr(e){var t;return(t=e==null?void 0:e.hideDisabledCheckboxes)!=null?t:!1}function Ph(e){return typeof e.get("rowSelection")!="string"}function dt(e){let t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function So(e){var o,i;let t=(o=e.get("cellSelection"))!=null?o:!1;return(i=typeof t=="object"&&t.enableColumnSelection)!=null?i:!1}function zc(e){var o,i;let t=(o=e.get("rowSelection"))!=null?o:"single";if(typeof t=="string"){let r=e.get("suppressRowClickSelection"),a=e.get("suppressRowDeselection");return r&&a?!1:r?"enableDeselection":a?"enableSelection":!0}return(t.mode==="singleRow"||t.mode==="multiRow")&&(i=t.enableClickSelection)!=null?i:!1}function Ih(e){let t=zc(e);return t===!0||t==="enableSelection"}function Th(e){let t=zc(e);return t===!0||t==="enableDeselection"}function Ma(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function or(e){let 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==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function di(e){return or(e)==="multiRow"}function Ah(e){var o;let t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(o=t==null?void 0:t.enableSelectionWithoutKeys)!=null?o:!1}function ir(e){let t=e.get("rowSelection");if(typeof t=="string"){let o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Lc(e,t=!0){let o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function zh(e){var o;let t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"&&(o=t.ctrlASelectsRows)!=null?o:!1}function gi(e){let t=ir(e);return t==="descendants"||t==="filteredDescendants"}function Es(e){let t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Lh(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function be(e){return e.get("columnMenu")==="legacy"}function Oh(e){return!be(e)}function Hh(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function O(e,t){return e.addCommon(t)}function Bh({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Vh={resizable:!0,sortable:!0},Nh=0;function Oc(){return Nh++}function Dt(e){return e instanceof ao}var Gh=["asc","desc",null],Wh=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],ao=class extends S{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=Oc(),this.autoHeaderHeight=null,this.sortDef=Me(),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 Yt,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Ko(o)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}initState(){let{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t==null||t.initCol(this);let r=e.hide;r!==void 0?this.visible=!r:this.visible=!e.initialHide,o==null||o.initCol(this),i==null||i.initCol(this)}setColDef(e,t,o){var r;let i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((r=this.beans.rowSpanSvc)==null||r.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(){let{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=M(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=M(o)&&o.includes(".")&&!i}initMinAndMaxWidths(){var t,o;let e=this.colDef;this.minWidth=(t=e.minWidth)!=null?t:this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=(o=e.maxWidth)!=null?o:Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){let e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{let i=e.recreateColDef(this.colDef);this.setColDef(i,i,o.source)}})}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){var o,i;let t=(i=(o=e.width)!=null?o:e.initialWidth)!=null?i:200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t,o;return(o=(t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))!=null?o:!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){var i,r,a,n;this.frameworkEventListenerService=(r=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:r.call(i,this.frameworkEventListenerService,this.colEventSvc);let o=(n=(a=this.frameworkEventListenerService)==null?void 0:a.wrap(e,t))!=null?n:t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){var i,r;let o=(r=(i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))!=null?r:t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return O(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t,o;return(o=(t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))!=null?o:!1}isCellEditable(e){var t,o;return(o=(t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))!=null?o:!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){var t,o;return(o=(t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))!=null?o:!1}isSuppressPaste(e){var t,o;return this.isColumnFunc(e,(o=(t=this.colDef)==null?void 0:t.suppressPaste)!=null?o:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){var t;return(t=this.colDef[e])!=null?t:Vh[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){let o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return O(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(){let e=[],{sort:t,initialSort:o}=this.colDef,i=t===null?t:gt(t==null?void 0:t.type),r=o===null?o:gt(o==null?void 0:o.type);return i&&e.push(i),r&&e.push(r),e}getSortingOrder(){var t,o;let e=this.getColDefAllowedSortTypes().includes("absolute")?Wh:Gh;return((o=(t=this.colDef.sortingOrder)!=null?t:this.gos.get("sortingOrder"))!=null?o:e).map(i=>Me(i))}getAvailableSortTypes(){let 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 Q(this.getSort())}isSorting(){return M(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(){var e;return k(261),!!((e=this.beans.colHover)!=null&&e.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){let 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!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,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){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return O(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Q(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(Q(this.colDef.rowSpan))return 1;let 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){let i=this.createColumnEvent(e,t);o&&he(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Me(e){return xo(e)?{direction:e.direction,type:e.type}:{direction:xr(e),type:gt(e)}}function xt(e){return e==="asc"||e==="desc"||e===null}function Sn(e){return e==="default"||e==="absolute"}function xo(e){if(!e||typeof e!="object")return!1;let t=e;return Sn(t.type)&&xt(t.direction)}function Gi(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function xr(e){return xt(e)?e:null}function gt(e){return Sn(e)?e:"default"}function qh(e,t,o){let i=o==null?void 0:o(),r=i!=null?i:t.sortSvc.getDisplaySortForColumn(e),a=gt(r==null?void 0:r.type),n=xr(r==null?void 0:r.direction),s=e.getAvailableSortTypes(),l=s.has("default"),c=s.has("absolute");return{isDefaultSortAllowed:l,isAbsoluteSortAllowed:c,isAbsoluteSort:a==="absolute",isDefaultSort:a==="default",isAscending:n==="asc",isDescending:n==="desc",direction:n}}function de(e){return e instanceof Wi}var Wi=class extends S{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=Oc(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&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(){let e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(let t of this.children)Dt(t)?e(t):de(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(let t of this.children)Dt(t)?e.push(t):de(t)&&t.addLeafColumns(e)}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);for(let t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(let t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1,i=this.findChildrenRemovingPadding();for(let a=0,n=i.length;a{for(let i of o)de(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},_h={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Fs(e,t,o){let i={},r=e.gos;return Object.assign(i,r.get("defaultColGroupDef")),Object.assign(i,t),r.validateColDef(i,o),i}var Uh=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t0&&k(273,{providedId:e,usedId:r}),this.existingKeys[r]=!0,r}o++}}},jh=(e,t)=>{de(e)&&e.setupExpandable(),e.originalParent=t};function Kh(e,t=null,o,i,r){var h;let a=new Uh,{existingCols:n,existingGroups:s,existingColKeys:l}=$h(i);a.addExistingKeys(l);let c=Hc(e,t,0,o,n,a,s,r),{colGroupSvc:d}=e,g=(h=d==null?void 0:d.findMaxDepth(c,0))!=null?h:0,u=d?d.balanceColumnTree(c,0,g,a):c;return lt(null,u,jh),{columnTree:u,treeDepth:g}}function $h(e){let t=[],o=[],i=[];return e&<(null,e,r=>{if(de(r)){let a=r;o.push(a)}else{let a=r;i.push(a.getId()),t.push(a)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function Hc(e,t,o,i,r,a,n,s){if(!t)return[];let{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d0))if(o.width!=null)t.setActualWidth(o.width,i);else{let a=t.getActualWidth();t.setActualWidth(a,i)}}function Zh(e,t){if(t)for(let o=0;o{for(let r=0;rt+o.getActualWidth(),0)}function rr(e,t,o){let i={};if(!t)return;lt(null,t,a=>{i[a.getInstanceId()]=a}),o&<(null,o,a=>{i[a.getInstanceId()]=null});let r=Object.values(i).filter(a=>a!=null);e.context.destroyBeans(r)}function xn(e){return e.getId().startsWith(kr)}function At(e){var o;let t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(o=t==null?void 0:t.startsWith(Vc))!=null?o:!1}function pe(e){var o;let t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(o=t==null?void 0:t.startsWith(Nc))!=null?o:!1}function tp(e){return At(e)||pe(e)}function ar(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function op(e,t){return It(e,t,(o,i)=>o.getColId()===i.getColId())}function ip(e){e.map={};for(let t of e.list)e.map[t.getId()]=t}function ko(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Zo(e,t){return e===t||e.colId==t||e.getColDef()===t}var rp=(e,t)=>(o,i)=>{let r={value1:void 0,value2:void 0},a=!1;return e&&(e[o]!==void 0&&(r.value1=e[o],a=!0),M(i)&&e[i]!==void 0&&(r.value2=e[i],a=!0)),!a&&t&&(t[o]!==void 0&&(r.value1=t[o]),M(i)&&t[i]!==void 0&&(r.value2=t[i])),r};function ap(e,t){let o={...e,sort:void 0,colId:t},i=Wc(e);return i&&(o.sort=i.direction,o.sortType=i.type),o}function Wc(e){let{sort:t,initialSort:o}=e,i=xo(t)||xt(t),r=xo(o)||xt(o);return i?Me(t):r?Me(o):null}function qc(e,t){return e+"_"+t}function X(e){return e instanceof ui}var ui=class extends S{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Ko(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return qc(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(let e of this.displayedChildren)X(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let t=U(this.displayedChildren).getLeft();this.setLeft(t)}else{let e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){var t;let e=0;for(let o of(t=this.displayedChildren)!=null?t:[])e+=o.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(let t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(let t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){var t;for(let o of(t=this.displayedChildren)!=null?t:[])Dt(o)?e.push(o):X(o)&&o.addDisplayedLeafColumns(e)}addLeafColumns(e){var t;for(let o of(t=this.children)!=null?t:[])Dt(o)?e.push(o):X(o)&&o.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return!this.isPadding()||!(e!=null&&e.isPadding())?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){var o,i;this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(let r of(o=this.children)!=null?o:[]){if(X(r)&&!((i=r.displayedChildren)!=null&&i.length))continue;switch(r.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(r);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(r);break;default:this.displayedChildren.push(r);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},b={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"},np=65,sp=67,lp=86,cp=68,dp=90,gp=89;function _c(e){let{keyCode:t}=e,o;switch(t){case np:o=b.A;break;case sp:o=b.C;break;case lp:o=b.V;break;case cp:o=b.D;break;case dp:o=b.Z;break;case gp:o=b.Y;break;default:o=e.code}return o}function up(e,t){return new $(o=>{o(window.setInterval(e,t))})}var $=class Uo{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 Uo(o=>{let i=t.length,r=new Array(i);t.forEach((a,n)=>{a.then(s=>{r[n]=s,i--,i===0&&o(r)})})}):Uo.resolve()}static resolve(t=null){return new Uo(o=>o(t))}then(t){return new Uo(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(let o of this.waiters)o(t)}onReject(t){}},hp=class extends ve{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){let o={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:i=>this.onDragStart(e,i),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(o),this.beans.dragSvc.addDragSource(o)}setDragImageCompIcon(e,t=!1){let o=this.dragImageComp;o&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,o.setIcon(e,t))}removeDragSource(e){var i;let{dragSourceAndParamsList:t,beans:o}=this;for(let r=0,a=t.length;r{for(let c of l){let{width:d,height:g,left:u,right:h,top:p,bottom:f}=c.getBoundingClientRect();if(d===0||g===0)return!1;let m=s.clientX>=u&&s.clientX=p&&s.clientY0}findExternalZone(e){let t=this.dropTargets;for(let o=0,i=t.length;o0?"down":p<0?"up":null,hDirection:h<0?"left":h>0?"right":null,initialSourcePointerOffsetX:s,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:o,dragItem:r,dropZoneTarget:c,dropTarget:(m=a==null?void 0:a.dropTarget)!=null?m:null,changed:!!(a!=null&&a.changed)});return this.lastDraggingEvent=f,f}positionDragImageComp(e){var o;let t=(o=this.dragImageComp)==null?void 0:o.getGui();t&&Yu(t,e,this.beans)}removeDragImageComp(e){var t;this.dragImageComp===e&&(this.dragImageComp=null),e&&((t=e.getGui())==null||t.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){var o;let t=(o=this.createDragImageComp(e))!=null?o:null;this.dragImageCompPromise=t,t==null||t.then(i=>{let r=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!r||!this.isAlive()){this.destroyBean(i);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;let a=this.dragImageComp;a!==i&&(this.dragImageComp=i,this.removeDragImageComp(a)),i&&(this.appendDragImageComp(i),this.updateDragImageComp(),this.positionDragImageComp(r))})}appendDragImageComp(e){var r;let t=e.getGui(),o=t.style;o.position="absolute",o.zIndex="9999",(r=this.beans.dragSvc)!=null&&r.hasPointerCapture()&&(o.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),o.top="20px",o.left="20px";let i=dn(this.beans);i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){var n,s;let{dragImageComp:e,dragSource:t,lastDropTarget:o,lastDraggingEvent:i,dragImageLastLabel:r}=this;if(!e)return;this.setDragImageCompIcon((s=(n=o==null?void 0:o.getIconName)==null?void 0:n.call(o,i))!=null?s:null);let a=t==null?void 0:t.dragItemName;typeof a=="function"&&(a=a(i)),a||(a=""),r!==a&&(this.dragImageLastLabel=a,e.setLabel(a))}};function Uc(e){return typeof e=="object"&&!!e.component}function pp(e){return e?e.prototype&&"getGui"in e.prototype:!1}function jc(e,t,o,i){let{name:r}=o,a,n,s,l,c,d;if(t){let g=t,u=g[r+"Selector"],h=u?u(i):null,p=f=>{typeof f=="string"?a=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?s=f:n=f)};h?(p(h.component),l=h.params,c=h.popup,d=h.popupPosition):p(g[r])}return{compName:a,jsComp:n,fwComp:s,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var fp=class extends S{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,r=!1){var w;let{name:a,cellRenderer:n}=t,{compName:s,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:g,popupPositionFromSelector:u}=jc(this.beans.frameworkOverrides,e,t,i),h,p,f=y=>{let x=this.registry.getUserComponent(a,y);x&&(l=x.componentFromFramework?void 0:x.component,c=x.componentFromFramework?x.component:void 0,h=x.params,p=x.processParams)};if(s!=null&&f(s),l==null&&c==null&&o!=null&&f(o),l&&n&&!pp(l)&&(l=(w=this.agCompUtils)==null?void 0:w.adaptFunction(t,l)),!l&&!c){let{validation:y}=this.beans;r&&(s!==o||!o)?s?y!=null&&y.isProvidedUserComp(s)||W(50,{compName:s}):o?y||W(260,{...this.gos.getModuleErrorParams(),propName:a,compName:o}):W(216,{name:a}):o&&!y&&W(146,{comp:o});return}let m=this.mergeParams(e,t,i,d,h,p),v=l==null,C=l!=null?l:c;return{componentFromFramework:v,componentClass:C,params:m,type:t,popupFromSelector:g,popupPositionFromSelector:u,newAgStackInstance:()=>this.newAgStackInstance(C,v,m,t)}}newAgStackInstance(e,t,o,i){var s;let r=!t,a;r?a=new e:a=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(a);let n=(s=a.init)==null?void 0:s.call(a,o);return n==null?$.resolve(a):n.then(()=>a)}mergeParams(e,t,o,i=null,r,a){let n={...o,...r},s=e,l=s==null?void 0:s[t.name+"Params"];if(typeof l=="function"){let c=l(o);he(n,c)}else typeof l=="object"&&he(n,l);return he(n,i),a?a(n):n}},mp={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},vp={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Cp={name:"headerComponent",optionalMethods:["refresh"]},wp={name:"innerHeaderComponent"},bp={name:"innerHeaderGroupComponent"},yp={name:"headerGroupComponent"};var Sp={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0};var xp={name:"loadingCellRenderer",cellRenderer:!0},kp={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Rp={name:"tooltipComponent"},kn={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Ep={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Fp={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Dp={name:"loadingCellRenderer",cellRenderer:!0},Mp={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Pp={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Ip(e,t){return e.getCompDetailsFromGridOptions(vp,"agDragAndDropImage",t,!0)}function Tp(e,t,o){return e.getCompDetails(t,Cp,"agColumnHeader",o)}function Ap(e,t,o){return e.getCompDetails(t,wp,void 0,o)}function zp(e,t){let o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,yp,"agColumnGroupHeader",t)}function Lp(e,t,o){return e.getCompDetails(t,bp,void 0,o)}function Op(e,t){return e.getCompDetailsFromGridOptions(Fp,void 0,t,!0)}function Hp(e,t){return e.getCompDetailsFromGridOptions(Dp,"agLoadingCellRenderer",t,!0)}function Bp(e,t){return e.getCompDetailsFromGridOptions(Mp,"agGroupRowRenderer",t,!0)}function Vp(e,t){return e.getCompDetailsFromGridOptions(Pp,"agDetailCellRenderer",t,!0)}function Ds(e,t,o){return e.getCompDetails(t,Sp,void 0,o)}function Ms(e,t,o){return e.getCompDetails(t,xp,"agSkeletonCellRenderer",o,!0)}function Kc(e,t,o){return e.getCompDetails(t,kp,"agCellEditor",o,!0)}function Np(e,t,o,i){let r=t.filter;return Uc(r)&&(t={filter:r.component,filterParams:t.filterParams}),e.getCompDetails(t,kn,i,o,!0)}function Gp(e,t,o){return e.getCompDetails(t,mp,"agDateInput",o,!0)}function Wp(e,t){return e.getCompDetails(t.colDef,Rp,"agTooltipComponent",t,!0)}function qp(e,t,o,i){return e.getCompDetails(t,Ep,i,o)}function $c(e,t){return jc(e,t,kn)}function qr(e,t,o){return e.mergeParams(t,kn,o)}var _p=class extends hp{createEvent(e){return O(this.gos,e)}createDragImageComp(e){let{gos:t,beans:o}=this,i=Ip(o.userCompFactory,O(t,{dragSource:e}));return i==null?void 0:i.newAgStackInstance()}handleEnter(e,t){var o;(o=e==null?void 0:e.onGridEnter)==null||o.call(e,t)}handleExit(e,t){var o;(o=e==null?void 0:e.onGridExit)==null||o.call(e,t)}warnNoBody(){k(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){let o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}};function Yc(e){return!!e.operator}var Qc="ag-resizer-wrapper",pt=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Up={tag:"div",cls:Qc,children:[pt("eTopLeft","topLeft"),pt("eTop","top"),pt("eTopRight","topRight"),pt("eRight","right"),pt("eBottomRight","bottomRight"),pt("eBottom","bottom"),pt("eBottomLeft","bottomLeft"),pt("eLeft","left")]},jp=class extends ve{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){let{clientHeight:t,clientWidth:o}=this.offsetParent,i=o/2-this.getWidth()/2,r=t/2-this.getHeight()/2;this.offsetElement(i,r,e)}initialisePosition(e){if(this.positioned)return;let{centered:t,forcePopupParentAsOffsetParent:o,minWidth:i,width:r,minHeight:a,height:n,x:s,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0,g=Ie(this.element);if(g){let u=this.findBoundaryElement(),h=window.getComputedStyle(u);if(h.minWidth!=null){let p=u.offsetWidth-this.element.offsetWidth;d=Number.parseInt(h.minWidth,10)-p}if(h.minHeight!=null){let p=u.offsetHeight-this.element.offsetHeight;c=Number.parseInt(h.minHeight,10)-p}}if(this.minHeight=a||c,this.minWidth=i||d,r&&this.setWidth(r),n&&this.setHeight(n),(!r||!n)&&this.refreshSize(),t)this.center(e);else if(s||l)this.offsetElement(s,l,e);else if(g&&o){let u=this.boundaryEl,h=!0;if(u||(u=this.findBoundaryElement(),h=!1),u){let p=Number.parseFloat(u.style.top),f=Number.parseFloat(u.style.left);h?this.offsetElement(Number.isNaN(f)?0:f,Number.isNaN(p)?0:p,e):this.setPosition(f,p)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){var i,r;if(!this.config.popup||e===this.movable)return;this.movable=e;let o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?((i=this.dragSvc)==null||i.addDragSource(o),this.moveElementDragListener=o):((r=this.dragSvc)==null||r.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){var t;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(let o of Object.keys(e)){let i=!!e[o],r=this.getResizerElement(o),a={dragStartPixels:0,eElement:r,onDragStart:n=>this.onResizeStart(n,o),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,o)};(i||!this.isAlive()&&!i)&&(i?((t=this.dragSvc)==null||t.addDragSource(a),this.resizeListeners.push(a),r.style.pointerEvents="all"):r.style.pointerEvents="none",this.resizable[o]=i)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";let{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,o=this.element,i=!1;if(typeof e=="string"&&e.includes("%"))Yo(o,e),e=lc(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let r=this.getAvailableHeight();r&&e>r&&(e=r)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?Yo(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:o}=this.offsetParent;if(!o)return null;let i=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),a=e?this.position.y:i.top,n=e?0:r.top,s=0;if(t){let c=this.element.parentElement;if(c){let{bottom:d}=c.getBoundingClientRect();s=d-i.bottom}}return o+n-a-s}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:o}=this.config,i=!1;if(typeof e=="string"&&e.includes("%"))Ze(t,e),e=$i(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:r}=this.offsetParent,a=o?this.position.x:this.element.getBoundingClientRect().left;r&&e+a>r&&(e=r-a)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Ze(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){var a;let{forcePopupParentAsOffsetParent:i}=this.config,r=i?this.boundaryEl:this.element;r&&((a=this.popupSvc)==null||a.positionPopup({ePopup:r,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:o}),this.setPosition(Number.parseFloat(r.style.left),Number.parseFloat(r.style.top)))}constrainSizeToAvailableHeight(e){var o,i;if(!this.config.forcePopupParentAsOffsetParent)return;let t=()=>{let r=this.getAvailableHeight();this.element.style.setProperty("max-height",`${r}px`)};e&&this.popupSvc?((o=this.resizeObserverSubscriber)==null||o.call(this),this.resizeObserverSubscriber=Tt(this.beans,(i=this.popupSvc)==null?void 0:i.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){let{e:t,isLeft:o,isTop:i,anywhereWithin:r,topBuffer:a}=e,n=t.clientX-this.dragStartPosition.x,s=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!r,n)?0:n,c=this.shouldSkipY(t,!!i,a,s)?0:s;return{movementX:l,movementY:c}}shouldSkipX(e,t,o,i){let r=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.x:r.left,l=s<=0&&a.left>=e.clientX||a.right<=e.clientX&&a.right<=n.right;return l?!0:(t?l=i<0&&e.clientX>s+a.left||i>0&&e.clientXn.right||i>0&&e.clientXn.right||i>0&&e.clientX=e.clientY||a.bottom<=e.clientY&&a.bottom<=n.bottom;return l?!0:(t?l=i<0&&e.clientY>s+a.top+o||i>0&&e.clientYn.bottom||i>0&&e.clientY({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;let e=this.element;e&&(e.appendChild(Qt(Up)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;let e=this.element.querySelector(`.${Qc}`);e==null||e.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");let{popup:o,forcePopupParentAsOffsetParent:i}=this.config;!o&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(o=>!o.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,o=0;for(let i of e){let r=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let a=this.minHeight||0,n=this.minWidth||0;if(r){let s=window.getComputedStyle(i);s.minHeight&&(a=Number.parseInt(s.minHeight,10)),s.minWidth&&(n=Number.parseInt(s.minWidth,10))}else a=i.offsetHeight,n=i.offsetWidth;t+=a,o+=n}return{height:t,width:o}}applySizeToSiblings(e){let t=null,o=this.getSiblings();if(o){for(let i=0;ie)}onResize(e){if(!this.isResizing||!this.currentResizer)return;let{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:i,isRight:r,isBottom:a,isLeft:n}=this.currentResizer,s=r||n,l=a||i,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:n,isTop:i}),g=this.position.x,u=this.position.y,h=0,p=0;if(s&&c){let f=n?-1:1,m=this.getWidth(),v=m+c*f,C=!1;n&&(h=m-v,(g+h<=0||v<=this.minWidth)&&(C=!0,h=0)),C||this.setWidth(v)}if(l&&d){let f=i?-1:1,m=this.getHeight(),v=m+d*f,C=!1;i?(p=m-v,(u+p<=0||v<=this.minHeight)&&(C=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&mthis.element.parentElement.offsetHeight&&(C=!0),C||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&h||p)&&this.offsetElement(g+h,u+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){let e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;let{x:t,y:o}=this.position,i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());let{movementX:r,movementY:a}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+r,o+a),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.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(){var e;for(;this.resizeListeners.length;){let t=this.resizeListeners.pop();(e=this.dragSvc)==null||e.removeDragSource(t)}}destroy(){var e;super.destroy(),this.moveElementDragListener&&((e=this.dragSvc)==null||e.removeDragSource(this.moveElementDragListener)),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Kp=class extends jp{},E=null;function Ps(e){return typeof(e==null?void 0:e.getGui)=="function"}var Zc=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.includes(" ")){let r=(e||"").split(" ");if(r.length>1){for(let a of r)this.toggleCss(a,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},$p=0,Lo=class extends ve{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=$p++,this.cssManager=new Zc(()=>this.eGui),this.componentSelectors=new Map((t!=null?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(pc):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){let r=this[t];if(r===E)this[t]=i!=null?i:e;else{let a=o==null?void 0:o[t];if(!this.suppressDataRefValidation&&!a)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(e,t){var i;let o=[];for(let r of(i=e.childNodes)!=null?i:[])o.push(r);for(let r of o){if(!(r instanceof HTMLElement))continue;let a=this.createComponentFromElement(r,n=>{var l;let s=n.getGui();if(s)for(let c of(l=r.attributes)!=null?l:[])s.setAttribute(c.name,c.value)},t);if(a){if(a.addItems&&r.children.length){this.createChildComponentsFromTags(r,t);let n=Array.prototype.slice.call(r.children);a.addItems(n)}this.swapComponentForNode(a,e,r)}else r.childNodes&&this.createChildComponentsFromTags(r,t)}}createComponentFromElement(e,t,o){let i=e.nodeName,r=this.getDataRefAttribute(e),a=i.indexOf("AG-")===0,n=a?this.componentSelectors.get(i):null,s=null;if(n){let l=o&&r?o[r]:void 0;s=new n.component(l),s.setParentComponent(this),this.createBean(s,null,t)}else if(a)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,r,o,s),s}swapComponentForNode(e,t,o){let i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){let o=t!=null?t:this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(let i of e)i.setAttribute("tabindex",o.toString())}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=hn(e):i=Qt(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let r=0;rthis.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===Is?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){var e,t,o;if(Array.isArray(this.css)){let i="component-"+((t=(e=Object.getPrototypeOf(this))==null?void 0:e.constructor)==null?void 0:t.name);for(let r of(o=this.css)!=null?o:[])this.beans.environment.addGlobalCSS(r,i)}this.css=Is}},Is=Symbol(),_=class extends Lo{},_r,Ur,jr,Kr,Ia,Ta,$r;function zt(){return _r===void 0&&(_r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),_r}function Mo(){return Ur===void 0&&(Ur=/(firefox)/i.test(navigator.userAgent)),Ur}function Jc(){return jr===void 0&&(jr=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),jr}function jt(){return Kr===void 0&&(Kr=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Kr}function Aa(e){if(!e)return null;let t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!Mo())?null:t.toString()}function Yp(){if($r!==void 0)return $r;if(!document.body)return-1;let e=1e6,t=Mo()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){let i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return o.remove(),$r=e,e}function Rn(){return Ta==null&&Xc(),Ta}function Xc(){let e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.remove(),o!=null&&(Ta=o,Ia=o===0)}function ed(){return Ia==null&&Xc(),Ia}var za=!1,nr=0;function Qp(e){nr>0||(e.addEventListener("keydown",sr),e.addEventListener("mousedown",sr))}function Zp(e){nr>0||(e.removeEventListener("keydown",sr),e.removeEventListener("mousedown",sr))}function sr(e){let t=za,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(za=o)}function Jp(e){let t=te(e);return Qp(t),nr++,()=>{nr--,Zp(t)}}function td(){return za}function Kt(e,t,o=!1){let i=Hu,r=sc;t&&(r+=", "+t),o&&(r+=', [tabindex="-1"]');let a=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>Ie(l)),n=Array.prototype.slice.apply(e.querySelectorAll(r));return n.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(a,n):a}function Jt(e,t=!1,o=!1,i=!1){let r=Kt(e,i?".ag-tab-guard":null,o),a=t?U(r):r[0];return a?(a.focus({preventScroll:!0}),!0):!1}function no(e,t,o,i){let r=Kt(t,o?':not([tabindex="-1"])':null),a=Y(e),n;o?n=r.findIndex(l=>l.contains(a)):n=r.indexOf(a);let s=n+(i?-1:1);return s<0||s>=r.length?null:r[s]}function od(e,t=5){let o=0;for(;e&&Aa(e)===null&&++o<=t;)e=e.parentElement;return Aa(e)===null?null:e}var Xp="ag-focus-managed",id=class extends ve{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},o={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=o,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;let r=no(this.beans,this.eFocusable,!1,i.shiftKey);r&&(r.focus(),i.preventDefault())},...o}}postConstruct(){let{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(Xp),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;let{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===b.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},rd="__ag_Grid_Stop_Propagation";function Xt(e){e[rd]=!0}function ct(e){return e[rd]===!0}var ad={isStopPropagation:ct,stopPropagation:Xt},vi=class extends id{constructor(e,t){super(e,ad,t)}},ef={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 He(e,t,o){return Zu(e,ef,t,o)}function En(e,t){let{debounceMs:o}=e;return Rr(e)?(o!=null&&k(71),0):o!=null?o:t}function Rr(e){var t,o;return((o=(t=e.buttons)==null?void 0:t.indexOf("apply"))!=null?o:-1)>=0}function nd(e,t,o,i){let r=He(e,o);if(typeof t=="function"){let a=He(e,i);r=t({filterOptionKey:i,filterOption:a,placeholder:r})}else typeof t=="string"&&(r=t);return r}var tf=class extends _{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){let e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new vi(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new Kp(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){let t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){let t=e,o=this.params;this.params=t;let{source:i,state:r,additionalEventAttributes:a}=t;i==="colDef"&&this.updateParams(t,o);let n=this.state;this.state=r;let s=a==null?void 0:a.fromAction;return(s&&s!=="apply"||r.model!==n.model||!this.areStatesEqual(r.state,n.state))&&this.setModelIntoUi(r.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=Rr(e),this.setupApplyDebounced()}doesFilterPass(e){k(283);let{getHandler:t,model:o,column:i}=this.params;return t().doesFilterPass({...e,model:o,handlerParams:this.beans.colFilter.getHandlerParams(i)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return k(284),this.params.model!=null}setupApplyDebounced(){let e=En(this.params,this.defaultDebounceMs),t=re(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return k(285),this.params.model}setModel(e){k(286);let{beans:t,params:o}=this;return t.colFilter.setModelForColumnLegacy(o.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){let{params:t,state:{valid:o=!0,model:i}}=this;if(!o)return!1;let r=!this.areModelsEqual(t.model,i);return r&&t.onAction("apply",e),r}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();let o=this.getModelFromUi(),i={model:o,state:this.getState(),valid:this.canApply(o)};this.state=i;let{params:r,gos:a,eventSvc:n,applyActive:s}=this;r.onStateChange(i),r.onUiChange(this.getUiChangeEventParams()),a.get("enableFilterHandlers")||n.dispatchEvent({type:"filterModified",column:r.column,filterInstance:this}),i.valid&&(e!=null||(e=s?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e==null?void 0:e.container,this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){let{positionableFeature:t,gos:o}=this;if(!t)return;let i=e==="floatingFilter"||e==="columnFilter";i?(t.restoreLastSize(),t.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(i)}afterGuiDetached(){var e;this.checkApplyDebounce(),(e=this.positionableFeature)==null||e.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return He(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)}};var Fn=class extends Lo{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){let e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Er=class extends Fn{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){let t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Fr(e){let t=e.rowModel;return t.getType()==="infinite"?t:void 0}function of(e){let t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Ts="row-group-",Dn="t-",Mn="b-",rf=0,Mt=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=rf++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){var t,o,i;let e=this._groupData;return e!==void 0?e:this.footer?(t=this.sibling)==null?void 0:t.groupData:(i=(o=this.beans.groupStage)==null?void 0:o.loadGroupData(this))!=null?i:null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this,{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){var t,o,i;let e=this._leafs;return e===void 0?(i=(o=(t=this.beans.groupStage)==null?void 0:t.loadLeafs)==null?void 0:o.call(t,this))!=null?i:null:e}set allLeafChildren(e){this._leafs=e}get expanded(){let 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){var s,l,c;let{valueCache:o,eventSvc:i}=this.beans,r=this.data;this.data=e,o==null||o.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();let a=this.createDataChangedEvent(e,r,t);if((s=this.__localEventService)==null||s.dispatchEvent(a),this.sibling){this.sibling.data=e;let d=this.sibling.createDataChangedEvent(e,r,t);(l=this.sibling.__localEventService)==null||l.dispatchEvent(d)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});let n=this.pinnedSibling;n&&(n.data=e,(c=n.__localEventService)==null||c.dispatchEvent(n.createDataChangedEvent(e,r,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:n}))}updateDataOnDetailNode(){let 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?(W(13),null):this.rowPinned==="top"?Dn+this.rowIndex:this.rowPinned==="bottom"?Mn+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var n,s;let{selectionSvc:o}=this.beans,i=(n=o==null?void 0:o.createDaemonNode)==null?void 0:n.call(o,this),r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));let a=this.createDataChangedEvent(e,r,!1);(s=this.__localEventService)==null||s.dispatchEvent(a)}setId(e){var o,i;let t=Do(this.beans.gos);if(t)if(this.data){let r=(i=(o=this.parent)==null?void 0:o.getRoute())!=null?i:[];this.id=t({data:this.data,parentKeys:r.length>0?r:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Ts)&&W(14,{groupPrefix:Ts})}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");let 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){var i;(i=this.beans.expansionSvc)==null||i.setExpanded(this,e,t,o)}setDataValue(e,t,o){var d,g;let{colModel:i,valueSvc:r,gos:a,editSvc:n}=this.beans;if(e==null)return!1;let s=(d=i.getCol(e))!=null?d:i.getColDefCol(e);if(!s)return!1;if(!this.group){let u=s.getColDef();u.pivotValueColumn&&(s=u.pivotValueColumn)}let l=r.getValueForDisplay({column:s,node:this,from:"data"}).value;if(a.get("readOnlyEdit")){let{beans:{eventSvc:u},data:h,rowIndex:p,rowPinned:f}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:p,rowPinned:f,column:s,colDef:s.colDef,data:h,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}if(o!=="data"&&n&&!n.committing){let u=n.setDataValue({rowNode:this,column:s},t,o);if(u!=null)return u}let c=r.setValue(this,s,t,o);return this.dispatchCellChangedEvent(s,t,l),c&&((g=this.pinnedSibling)==null||g.dispatchCellChangedEvent(s,t,l)),c}getDataValue(e,t="data"){var c;let{colModel:o,valueSvc:i,formula:r}=this.beans;if(e==null)return;let a=(c=o.getCol(e))!=null?c:o.getColDefCol(e);if(!a)return;let n=t==="data-raw",s=n||t==="value"?"data":t,l=i.getValue(a,this,s,n);if(!n&&(r&&a.isAllowFormula()&&r.isFormula(l)&&(l=r.resolveValue(a,this)),t!=="data"&&a.getAggFunc()&&typeof l=="object"&&l!=null)){if(typeof l.toNumber=="function")return l.toNumber();if("value"in l)return l.value}return l}updateHasChildren(){var o;let e=this.group&&!this.footer||!!((o=this.childrenAfterGroup)!=null&&o.length),{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){var r;let i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};(r=this.__localEventService)==null||r.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e,t;return(t=(e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))!=null?t:!1}isSelected(){if(this.footer)return this.sibling.isSelected();let e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){let t=this.childrenAfterGroup;if(t)for(let o=0,i=t.length;o{let o=new Mt(t);for(let i of Object.keys(e))nf.has(i)||(o[i]=e[i]);return o.oldRowTop=null,o},La=(e,t,o)=>{if(!o)return;let i=o.rowIndex;if(i==null)return;i+=t;let r=e.getRowCount();for(;i>=0&&i{var d,g,u,h;return(t==null?void 0:t.compareRowNodes(i,l,c))||((g=(d=l.pinnedSibling)==null?void 0:d.rowIndex)!=null?g:0)-((h=(u=c.pinnedSibling)==null?void 0:u.rowIndex)!=null?h:0)}),!a)return;let n=Ic(o);n==="bottom"||n==="pinnedBottom"?this.order.push(a):this.order.unshift(a)}hide(e){let{all:t,visible:o}=this,i=o.size;return t.forEach(r=>e(r)?o.delete(r):o.add(r)),this.order=Array.from(o),this.sort(),i!=o.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function sd(e){var o;if(e.level===-1)return!0;let t=e.parent;return(o=t==null?void 0:t.childrenAfterSort)!=null&&o.some(i=>i==e)?sd(t):!1}function Yr(e,t){let{gos:o,rowModel:i,filterManager:r}=e;return mi(o,i)?!i.getRowNode(t.id):r!=null&&r.isAnyFilterPresent()?!sd(t):o.get("pivotMode")?!t.group:!1}function lf(e){return!!e.footer&&e.level===-1}function cf(e){return!!e.pinnedSibling&&lf(e.pinnedSibling)}function df(e){var o;let t=e.findIndex(cf);if(t>-1)return(o=e.splice(t,1))==null?void 0:o[0]}var zs=class extends S{constructor(){super(...arguments),this.csrm=null}postConstruct(){var r;let{gos:e,beans:t}=this;this.top=new As(t,"top"),this.bottom=new As(t,"bottom"),this.csrm=(r=ot(t))!=null?r:null;let o=a=>Yr(t,a.pinnedSibling),i=()=>{let a=e.get("isRowPinned");a&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,a(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:a})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(l=>{n||(n=l.hide(o))});let s=this.refreshRowPositions();(!a||s||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(uf),this.refreshRowPositions()},rowNodeDataChanged:({node:a})=>{var l;let n=e.get("isRowPinnable");((l=n==null?void 0:n(a))!=null?l:!0)||this.pinRow(a,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(a=>a.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:a})=>{this._grandTotalPinned=a==="pinnedBottom"?"bottom":a==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{let o=[];t.forEach(i=>o.push(i)),o.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){var n,s,l;if(t!=null&&e.destroyed)return;if(e.footer){let c=e.level;if(c>-1)return;if(c===-1){this._grandTotalPinned=t,(n=this.csrm)==null||n.reMapRows();return}}let i=(l=e.rowPinned)!=null?l:(s=e.pinnedSibling)==null?void 0:s.rowPinned;if(i!=null&&t!=null&&t!=i){let c=e.rowPinned?e:e.pinnedSibling,d=e.rowPinned?e.pinnedSibling:e;this.pinRow(c,null,o),this.pinRow(d,t,o);return}let a=o&&hf(this.beans,e,o);if(a){a.forEach(c=>this.pinRow(c,t));return}if(t==null){let c=e.rowPinned?e:e.pinnedSibling,d=this.findPinnedRowNode(c);if(!d)return;d.delete(c);let g=c.pinnedSibling;Qr(c),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(g)}else{let c=Ls(this.beans,e,t),d=this.getContainer(t);d.add(c),Yr(this.beans,e)&&d.hide(g=>Yr(this.beans,g.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,o=i=>{if(i.rowHeightEstimated){let r=Ft(this.beans,i);i.setRowTop(t),i.setRowHeight(r.height),t+=r.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Os(this.top)}getPinnedBottomTotalHeight(){return Os(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(){let e=t=>{let o=[];return this.forEachPinnedRow(t,i=>{var a;let r=(a=i.pinnedSibling)==null?void 0:a.id;r!=null&&o.push(r)}),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(let i of e[o]){let r=this.beans.rowModel.getRowNode(i);r?this.pinRow(r,o):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{let o=new Set;e.forEachQueued(i=>{let r=this.beans.rowModel.getRowNode(i);r&&o.add(r)});for(let i of o)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){var n;let{csrm:e,beans:t,_grandTotalPinned:o}=this;if(!e)return;let i=(n=e.rootNode)==null?void 0:n.sibling;if(!i)return;let r=i.pinnedSibling,a=r&&this.findPinnedRowNode(r);if(o){if(a&&a.floating!==o&&(Qr(r),a.delete(r)),!a||a.floating!==o){let s=Ls(t,i,o);this.getContainer(o).add(s)}}else{if(!a)return;Qr(r),a.delete(r)}}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){let t=i=>gf(this.beans,i);if(e)return t(this.getContainer(e));let o=!1;return this.forContainers(i=>{let r=t(i);o||(o=r)}),o}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e==null||e.dispatchRowEvent("rowPinned")}};function gf(e,t){let o=0,i=!1;return t.forEach((r,a)=>{if(i||(i=r.rowTop!==o),r.setRowTop(o),r.rowHeightEstimated||r.rowHeight==null){let n=Ft(e,r).height;i||(i=r.rowHeight!==n),r.setRowHeight(n)}r.setRowIndex(a),o+=r.rowHeight}),i}function Ls(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;let i=sf(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;let r=o==="top"?Dn:Mn;return i.id=`${r}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Qr(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);let t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function uf(e){let t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function hf(e,t,o){var a,n;let{rowSpanSvc:i}=e,r=(a=o&&(i==null?void 0:i.isCellSpanning(o,t)))!=null?a:!1;if(o&&r)return(n=i==null?void 0:i.getCellSpan(o,t))==null?void 0:n.spannedNodes}function Os(e){let t=e.size();if(t===0)return 0;let o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}var Hs=class extends S{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){let 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){let t=o=>{o.setRowHeight(o.rowHeight,!0)};No(this.pinnedBottomRows,t),No(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0,o=i=>{if(i.rowHeightEstimated){let r=Ft(this.beans,i);i.setRowTop(t),i.setRowHeight(r.height),t+=r.height,e=!0}};return No(this.pinnedBottomRows,o),t=0,No(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){var d,g;let o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}let i=Do(this.gos),r=t==="top"?Dn:Mn,a=new Set(o.order),n=[],s=new Set,l=0,c=-1;for(let u of e){let h=(d=i==null?void 0:i({data:u,level:0,rowPinned:t}))!=null?d:r+this.nextId++;if(s.has(h)){k(96,{id:h,data:u});continue}c++,s.add(h),n.push(h);let p=Jo(o,h);if(p!==void 0)p.data!==u&&p.updateData(u),l+=this.setRowTopAndRowIndex(p,l,c),a.delete(h);else{let f=new Mt(this.beans);f.id=h,f.data=u,f.rowPinned=t,l+=this.setRowTopAndRowIndex(f,l,c),o.cache[h]=f,o.order.push(h)}}for(let u of a)(g=Jo(o,u))==null||g.clearRowTopAndRowIndex(),delete o.cache[u];o.order=n}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(Ft(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return Bs(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return Bs(this.pinnedBottomRows)}getPinnedTopRowCount(){return Ha(this.pinnedTopRows)}getPinnedBottomRowCount(){return Ha(this.pinnedBottomRows)}getPinnedTopRow(e){return Oa(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Oa(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Jo(this.getCache(t),e)}forEachPinnedRow(e,t){return No(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function Bs(e){let t=Ha(e);if(t===0)return 0;let o=Oa(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function Jo(e,t){return e.cache[t]}function Oa(e,t){return Jo(e,e.order[t])}function No(e,t){e.order.forEach((o,i)=>{let r=Jo(e,o);r&&t(r,i)})}function Ha(e){return e.order.length}var pf=class extends S{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){let{gos:e}=this,t=()=>{let o=e.get("enableRowPinning"),i=Ic(e),a=!!o||(i==="pinnedBottom"||i==="pinnedTop"),n=a?this.inner instanceof Hs:this.inner instanceof zs;this.inner&&n&&this.destroyBean(this.inner),(n||!this.inner)&&(this.inner=this.createManagedBean(a?new zs:new Hs))};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()}};var ff=500,mf=550,ki,vf=e=>{if(!ki)ki=new WeakSet;else if(ki.has(e))return!1;return ki.add(e),!0},Vt=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 Yt;let i=this.onTouchStart.bind(this);this.startListener=i,this.eElement.addEventListener("touchstart",i,{passive:!0})}o.addEventListener(e,t)}removeEventListener(e,t){var o;(o=this.eventSvc)==null||o.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!vf(e))return;let t=e.touches[0];this.touchStart=t;let o=this.handlers;if(!o.length){let i=this.eElement,r=i.ownerDocument,a=this.onTouchMove.bind(this),n=this.onTouchEnd.bind(this),s=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Oi(o,[i,"touchmove",a,l],[r,"touchcancel",s,l],[r,"touchend",n,c],[r,"contextmenu",yt,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{var i;this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,(i=this.eventSvc)==null||i.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},mf)}onTouchMove(e){let{moved:t,touchStart:o}=this;if(!t&&o){let i=mo(o,e.touches);i&&!fc(i,o,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){var o;let t=this.touchStart;!t||!mo(t,e.changedTouches)||(this.moved||((o=this.eventSvc)==null||o.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&yt(e),this.cancel())}onTouchCancel(e){let t=this.touchStart;!t||!mo(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){var i;let t=Date.now(),o=this.lastTapTime;o&&t-o>ff&&((i=this.eventSvc)==null||i.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),mn(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){let e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}};var Cf=1,wf=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Cf++,e!=null&&e.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(let o of Object.keys(e.providedBeanInstances))this.beans[o]=e.providedBeanInstances[o];for(let o of e.beanClasses){let i=new o;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${o.name} is missing beanName`),this.createdBeans.push(i)}for(let o of(t=e.derivedBeans)!=null?t:[]){let{beanName:i,bean:r}=o(this);this.beans[i]=r,this.createdBeans.push(r)}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){var i,r,a,n;let o=this.beans;for(let s of e)(i=s.preWireBeans)==null||i.call(s,o),(r=s.wireBeans)==null||r.call(s,o);for(let s of e)(a=s.preConstruct)==null||a.call(s);t&&e.forEach(t);for(let s of e)(n=s.postConstruct)==null||n.call(s)}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){var t;if(this.destroyed)return;this.destroyed=!0;let e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],(t=this.destroyCallback)==null||t.call(this)}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t[e,t]));function Sf(e,t){var r,a;let o=(r=e.beanName?Vs[e.beanName]:void 0)!=null?r:Number.MAX_SAFE_INTEGER,i=(a=t.beanName?Vs[t.beanName]:void 0)!=null?a:Number.MAX_SAFE_INTEGER;return o-i}function xf(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}function kf(e){let{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${o==null?"null":o}.${i.getId()}`}function Pn(e,t){let o=e.column===t.column,i=e.rowPinned===t.rowPinned,r=e.rowIndex===t.rowIndex;return o&&i&&r}function Rf(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(M(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndexg.rowNode.rowIndex===t.rowIndex),l=s?a:n,c=(o?-1:1)*(s?-1:1),d;for(let g=0;g{if(!i.defaultPrevented&&!zf(i)&&i.key===b.TAB){let r=i.shiftKey;no(e,o,!1,r)||Po(e,r)&&i.preventDefault()}}})}function Pf(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Le(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.exclusive)}function hi(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.exclusive)}function Po(e,t,o=!1){let i=e.ctrlsSvc.get("gridCtrl"),r=i.focusNextInnerContainer(t);return r===!0?!0:r===!1?r:((o||!t&&!i.isDetailGrid()&&i.isFocusInsideGridBody())&&i.forceFocusOutOfContainer(t),!1)}function If(e,t){let o=e.focusSvc,i=o.getFocusedCell();if(i&&t&&Pn(i,t)){let{rowIndex:r,rowPinned:a,column:n}=t;ln(e)&&o.setFocusedCell({rowIndex:r,column:n,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!td()})}}function Tf(e,t){let o=e.getFocusableContainerName();return o==="gridBody"?t():cd(e,()=>Kt(e.getGui(),".ag-tab-guard").length>0)?o:null}function cd(e,t){var o,i;(o=e.setAllowFocus)==null||o.call(e,!0);try{return t()}finally{(i=e.setAllowFocus)==null||i.call(e,!1)}}var Af="__ag_Grid_Skip_Focusable_Container";function zf(e){return e[Af]===!0}function Fe(e){var t,o;return(o=(t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())!=null?o:0}function In(e){let t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(let i of o){if(!i)continue;let r=i.getGroupRowCount()||0;for(let a=0;as)&&(t[a]=l)}}}return t}function Lf(e,t){let i=e.colModel.isPivotMode()?Hf(e):gd(e),r=t.getHeaderCellCtrls();for(let a of r){let{column:n}=a,s=n.getAutoHeaderHeight();s!=null&&s>i&&n.isAutoHeaderHeight()&&(i=s)}return i}function Tn(e){let o=e.colModel.isPivotMode()?Of(e):Ci(e);return e.colModel.forAllCols(i=>{let r=i.getAutoHeaderHeight();r!=null&&r>o&&i.isAutoHeaderHeight()&&(o=r)}),o}function Ci(e){var t;return(t=e.gos.get("headerHeight"))!=null?t:e.environment.getDefaultHeaderHeight()}function dd(e){var t;return(t=e.gos.get("floatingFiltersHeight"))!=null?t:Ci(e)}function gd(e){var t;return(t=e.gos.get("groupHeaderHeight"))!=null?t:Ci(e)}function Of(e){var t;return(t=e.gos.get("pivotHeaderHeight"))!=null?t:Ci(e)}function Hf(e){var t;return(t=e.gos.get("pivotGroupHeaderHeight"))!=null?t:gd(e)}function Bf(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function Vf(e){return(e==null?void 0:e.headerRowIndex)!=null}var Nf=class extends S{setComp(e,t,o){this.comp=e,this.eGui=t;let{beans:i}=this,{headerNavigation:r,touchSvc:a,ctrlsSvc:n}=i;r&&this.createManagedBean(new vi(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();let s=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:s}),a==null||a.mockHeaderContextMenu(this,s),n.register("gridHeaderCtrl",this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>ht(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var n;let{beans:e}=this,t=0,o=In(e).reduce((s,l)=>s+l,0),i=Tn(e);(n=e.filterManager)!=null&&n.hasFloatingFilters()&&(t+=dd(e)),t+=o,t+=i;let r=e.environment.getHeaderRowBorderWidth(),a=t+r;if(this.headerHeightWithBorder!==a){this.headerHeightWithBorder=a;let s=`${a}px`;this.comp.setHeightAndMinHeight(s)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){let t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){let o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",o)}onTabKeyDown(e){let t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:r}=this,{headerNavigation:a,focusSvc:n}=r;(a.navigateHorizontally(i,!0,e)||!o&&n.focusOverlay(!1)||Po(r,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null,{headerNavigation:o}=this.beans;switch(e.key){case b.LEFT:t="LEFT";case b.RIGHT:{M(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case b.UP:t="UP";case b.DOWN:{M(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){let{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Y(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){var n;let{menuSvc:i,ctrlsSvc:r}=this.beans;if(!e&&!o||!(i!=null&&i.isHeaderContextMenuEnabled()))return;let{target:a}=e!=null?e:t;(a===this.eGui||a===((n=r.getHeaderRowContainerCtrl())==null?void 0:n.eViewport))&&i.showHeaderContextMenu(void 0,e,o)}},An=class extends _{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Gf={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},Wf=class extends An{constructor(e){super(Gf,e),this.eResize=E,this.eHeaderCompWrapper=E,this.headerCompVersion=0}postConstruct(){let e=this.getGui(),t=()=>{let i=this.ctrl.getSelectAllGui();i&&(this.eResize.insertAdjacentElement("afterend",i),this.addDestroyFunc(()=>i.remove()))},o={setWidth:i=>e.style.width=i,toggleCss:(i,r)=>this.toggleCss(i,r),setUserStyles:i=>fi(e,i),setAriaSort:i=>i?Au(e,i):zu(e),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>{var i;return(i=this.ctrl.getSelectAllGui())==null?void 0:i.remove()}};this.ctrl.setComp(o,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){var e;this.headerComp&&((e=this.headerCompGui)==null||e.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;let t=this.headerCompVersion;e.newAgStackInstance().then(o=>this.afterCompCreated(t,o))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},qf={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},_f=class extends An{constructor(e){super(qf,e),this.eResize=E,this.eHeaderCompWrapper=E}postConstruct(){let e=this.getGui(),t=(i,r)=>r!=null?e.setAttribute(i,r):e.removeAttribute(i),o={toggleCss:(i,r)=>this.toggleCss(i,r),setUserStyles:i=>fi(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>q(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(o,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){let t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}let o=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(o)}},Uf={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},jf=class extends An{constructor(e){super(Uf,e),this.eFloatingFilterBody=E,this.eButtonWrapper=E,this.eButtonShowMainFilter=E}postConstruct(){let e=this.getGui(),t={toggleCss:(o,i)=>this.toggleCss(o,i),setUserStyles:o=>fi(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>q(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>e.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){var e;(e=this.floatingFilterComp)==null||e.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}afterCompCreated(e){var t;if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),(t=e.afterGuiAttached)==null||t.call(e)}}},Kf=class extends _{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),ri(this.getGui(),this.ctrl.getAriaRowIndex());let t={setHeight:o=>this.getGui().style.height=o,setTop:o=>this.getGui().style.top=o,setHeaderCtrls:(o,i)=>this.setHeaderCtrls(o,i),setWidth:o=>this.getGui().style.width=o,setRowIndex:o=>ri(this.getGui(),o)};this.ctrl.setComp(t,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;let o=this.headerComps;this.headerComps={};for(let i of e){let r=i.instanceId,a=o[r];delete o[r],a==null&&(a=this.createHeaderComp(i),this.getGui().appendChild(a.getGui())),this.headerComps[r]=a}if(Object.values(o).forEach(i=>{i.getGui().remove(),this.destroyBean(i)}),t){let i=Object.values(this.headerComps);i.sort((a,n)=>{let s=a.getCtrl().column.getLeft(),l=n.getCtrl().column.getLeft();return s-l});let r=i.map(a=>a.getGui());uc(this.getGui(),r)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new _f(e);break;case"filter":t=new jf(e);break;default:t=new Wf(e);break}return this.createBean(t),t.setParentComponent(this),t}},zn=class extends S{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){let e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){let e=se(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,r=t.getColsLeftWidth(),a=t.getDisplayedColumnsRightWidth(),n;e?n=i+r+a:(n=i,this.addSpacer&&(this.gos.get("enableRtl")?r:a)===0&&o.verticalScrollShowing&&(n+=o.getScrollbarWidth())),this.callback(n)}};function wi(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o!=null?o:e}var Ln=class extends S{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){let{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?U(t):this.columnOrGroup}postConstruct(){let e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){let{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=M(this.columnOrGroup.getOldLeft());(t==null?void 0:t.isActive())&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let 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(){let e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){let{gos:o,visibleCols:i}=this.beans;if(!se(o,"print")||e.getPinned()==="left")return t;let a=i.getColsLeftWidth();if(e.getPinned()==="right"){let n=i.bodyWidth;return a+n+t}return a+t}setLeft(e){if(M(e)&&(this.eCell.style.left=`${e}px`),X(this.columnOrGroup)){let t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Tu(this.ariaEl,t.length)}}},$f="ag-column-first",Yf="ag-column-last";function ud(e,t,o,i){return Q(e)?[]:Zf(e.headerClass,e,t,o,i)}function hd(e,t,o){e.toggleCss($f,o.isColAtEdge(t,"first")),e.toggleCss(Yf,o.isColAtEdge(t,"last"))}function Qf(e,t,o,i){return O(t,{colDef:e,column:o,columnGroup:i})}function Zf(e,t,o,i,r){if(Q(e))return[];let a;if(typeof e=="function"){let n=Qf(t,o,i,r);a=e(n)}else a=e;return typeof a=="string"?[a]:Array.isArray(a)?[...a]:[]}var Jf=0,pd="headerCtrl",On=class extends S{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()+"-"+Jf++}postConstruct(){let e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,o,i,r){var a;t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,o,i,r),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus((a=this.lastFocusEvent)!=null?a:void 0))}shouldStopEventPropagation(e){let{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),r=i==null?void 0:i.suppressHeaderKeyboardEvent;if(!M(r))return!1;let a=O(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!r(a)}getWrapperHasFocus(){return Y(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(){let e=this.column.getDefinition();if(!e)return;let{headerStyle:t}=e,o;if(typeof t=="function"){let i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){let{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:r}=this,a=g=>{if(!this.isAlive()||!i.isAlive())return;let{paddingTop:u,paddingBottom:h,borderBottomWidth:p,borderTopWidth:f}=ro(this.eGui),m=u+h+p+f,C=t.offsetHeight+m;if(g<5){let w=te(r),y=!(w!=null&&w.contains(t)),x=C==0;if(y||x){Ra(()=>a(g+1),"raf",r);return}}this.setColHeaderHeight(this.column,C)},n=!1,s,l=()=>{let g=this.column.isAutoHeaderHeight();g&&!n&&c(),!g&&n&&d()},c=()=>{n=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),a(0),s=Tt(this.beans,t,()=>a(0))},d=()=>{n=!1,s&&s(),this.comp.toggleCss("ag-header-cell-auto-height",!1),s=void 0};l(),i.addDestroyFunc(()=>d()),i.addManagedListeners(this.column,{widthChanged:()=>n&&a(0)}),i.addManagedEventListeners({sortChanged:()=>{n&&window.setTimeout(()=>a(0))}}),o&&o(l)}onDisplayedColumnsChanged(){let{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(hd(e,t,o.visibleCols),ac(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let e=Le(this.beans);this.eGui&&we(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var n,s;let t=Y(this.beans),o=e.key===b.LEFT||e.key===b.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)&&_c(e)===b.C)return(n=this.beans.clipboardSvc)==null?void 0:n.copyToClipboard();if(!o)return;let a=e.key===b.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let l=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(l,e.shiftKey),(s=this.resizeFeature)==null||s.toggleColumnResizing(!0)}else this.moveHeader(a)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){let{gos:t,column:o}=this,i=e.key===b.LEFT!==t.get("enableRtl"),r=o.getPinned(),a=t.get("enableRtl");return r&&a!==(r==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){let t=this.getWrapperHasFocus();switch(e.key){case b.PAGE_DOWN:case b.PAGE_UP:case b.PAGE_HOME:case b.PAGE_END:t&&e.preventDefault()}}addDomData(e){let t=pd,{eGui:o,gos:i}=this;Zt(i,o,t,this),e.addDestroyFunc(()=>Zt(i,o,t,null))}focus(e){if(!this.isAlive())return!1;let{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(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){let i=e!=null?e:t,{menuSvc:r,gos:a}=this.beans;a.get("preventDefaultOnContextMenu")&&i.preventDefault(),r!=null&&r.isHeaderContextMenuEnabled(o)&&r.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;let{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}},Xf=class extends On{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,o,i,r){this.comp=e;let{rowCtrl:a,column:n,beans:s}=this,{colResize:l,context:c,colHover:d,rangeSvc:g}=s,u=wi(this,c,r);this.setGui(t,u),this.updateState(),this.setupWidth(u),this.setupMovingCss(u),this.setupMenuClass(u),this.setupSortableClass(u),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:u}),this.addColumnHoverListener(u),this.setupFilterClass(u),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(u),this.setupSelectAll(u),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=u.createManagedBean(l.createResizeFeature(a.pinned,n,o,e,this)):q(o,!1),d==null||d.createHoverFeature(u,[n],t),g==null||g.createRangeHighlightFeature(u,n,e),u.createManagedBean(new Ln(n,t,s)),u.createManagedBean(new vi(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(u),u.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),u.addManagedListeners(n,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let h=()=>this.checkDisplayName();u.addManagedEventListeners({columnValueChanged:h,columnRowGroupChanged:h,columnPivotChanged:h,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),u.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var o;(o=this.beans.colResize)==null||o.resizeHeader(this.column,e,t)}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.colDef;return O(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){let e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){let e=this.createParams(),t=this.column.getColDef();return Tp(this.beans.userCompFactory,t,e)}createParams(){let{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return O(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!o&&(!this.openFilterEnabled||be(this.gos)),showColumnMenu:(a,n)=>{e==null||e.showColumnMenu({column:this.column,buttonElement:a,positionBy:"button",onClosedCallback:n})},showColumnMenuAfterMouseClick:(a,n)=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:a,positionBy:"mouse",onClosedCallback:n})},showFilter:a=>{e==null||e.showFilterMenu({column:this.column,buttonElement:a,containerType:"columnFilter",positionBy:"button"})},progressSort:a=>{t==null||t.progressSort(this.column,!!a,"uiColumnSorted")},setSort:(a,n)=>{t==null||t.setSortForColumn(this.column,Me(a),!!n,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(a,n)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(a,n)}})}setupSelectAll(e){var o;let{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),(o=this.selectAllFeature)==null||o.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{var r;let i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),(r=this.selectAllFeature)==null||r.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===b.SPACE?(t=this.selectAllFeature)==null||t.onSpaceKeyDown(e):e.key===b.ENTER?this.onEnterKeyDown(e):e.key===b.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var n,s;let{column:t,gos:o,sortable:i,beans:r}=this,a=!1;(e.ctrlKey||e.metaKey)&&(a=this.showMenuOnKeyPress(e,!0)),a||(!e.altKey&&So(o)?(n=r.rangeSvc)==null||n.handleColumnSelection(t,e):i&&((s=r.sortSvc)==null||s.progressSort(t,e.shiftKey,"uiColumnSorted")))}showMenuOnKeyPress(e,t){let o=this.comp.getUserCompInstance();return qs(o)&&o.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),td()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){let e=()=>{let t=this.column.getColDef(),o=ud(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o);for(let r of o)i.has(r)?i.delete(r):this.comp.toggleCss(r,!0);for(let r of i)this.comp.toggleCss(r,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t,o;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=(o=(t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))!=null?o:null)}updateState(){let{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&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(let e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){let 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){let 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(){let e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){let t=()=>{let o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){let t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){let t=()=>{var o;(o=this.comp)==null||o.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){let t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){let t=()=>{let o=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",o),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let e=()=>{let t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){let 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(){var u,h;let{eGui:e,column:t,comp:o,beans:i}=this,r=In(this.beans),a=r.reduce((p,f)=>p+f,0)===0;if(o.toggleCss("ag-header-parent-hidden",a),!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}let{numberOfParents:n,isSpanningTotal:s}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",n>0);let l=Tn(i);if(n===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",s);let c=((h=(u=this.column.getFirstRealParent())==null?void 0:u.getLevel())!=null?h:-1)+1,d=r.length-c,g=0;for(let p=0;pa==="filter"?-1:n.charCodeAt(0)-a.charCodeAt(0)).map(a=>o.get(a)).join(". ");(r=e.ariaAnnounce)==null||r.announceValue(i,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){let t=r=>this.handleMouseOverChange(r.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=r=>this.handleContextMenuMouseEvent(r,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){let t=this.comp.getUserCompInstance();return qs(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function qs(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var em=0,Zr=class extends S{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=em++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";o==="group"?i="ag-header-row-group":o==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){var t;this.rowIndex=e,(t=this.comp)==null||t.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=se(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=wi(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){let t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=se(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{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;let{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0,t=In(this.beans);for(let r=0;r{let{focusSvc:r,visibleCols:a}=this.beans;return r.isHeaderWrapperFocused(i)?a.isVisible(i.column):!1};if(e)for(let[i,r]of e)o(r)?this.ctrlsById.set(i,r):this.destroyBean(r);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;let i=e.getUniqueId(),r;if(o&&(r=o.get(i),o.delete(i)),r&&r.column!=e&&(this.destroyBean(r),r=void 0),r==null)switch(this.type){case"filter":{r=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":r=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:r=this.createBean(new Xf(e,this));break}t.set(i,r)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];let e=[];for(let 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){let o=this.allCtrls.find(r=>r.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},tm=class extends S{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;let{pinnedCols:o,ctrlsSvc:i,colModel:r,colMoves:a}=this.beans;this.setupCenterWidth(),o==null||o.setupHeaderPinnedWidth(this),this.setupDragAndDrop(a,this.eViewport);let n=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:n,advancedFilterEnabledChanged:n});let s=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(s,this),r.ready&&this.refresh()}getAllCtrls(){let e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){let{focusSvc:t,filterManager:o,visibleCols:i}=this.beans,r=0,a=t.getFocusHeaderToUseAfterRefresh(),n=()=>{let g=i.headerGroupRowCount;r=g,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));let u=this.groupsRowCtrls.length;if(u!==g){if(u>g){for(let h=g;h{let g=r++;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 Zr(g,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==g&&this.columnsRowCtrl.setRowIndex(g)},l=()=>{this.includeFloatingFilter=!!(o!=null&&o.hasFloatingFilters())&&!this.hidden;let g=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){g();return}e||g();let u=r++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==u&&this.filtersRowCtrl.setRowIndex(u):this.filtersRowCtrl=this.createBean(new Zr(u,this.pinned,"filter"))},c=this.getAllCtrls();n(),s(),l();let d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,a),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){let t=o=>o==null?void 0:o.getHeaderCellCtrls().find(i=>i.column===e);if(Dt(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;othis.comp.setCenterWidth(`${e}px`),!0))}},om={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},im={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},rm={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},Jr=class extends _{constructor(e){super(),this.eCenterContainer=E,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();let e={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{let i=this.getGui();i.style.width=o,i.style.maxWidth=o,i.style.minWidth=o}};this.createManagedBean(new tm(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){let e=this.pinned=="left",t=this.pinned=="right",o=e?om:t?im:rm;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==E?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){let t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let o,i=r=>{let a=r.getGui();a.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(a),o&&gc(this.eRowContainer,a,o),o=a};for(let r of e){let a=r.instanceId,n=t[a];delete t[a];let s=n||this.createBean(new Kf(r));this.headerRowComps[a]=s,this.rowCompsList.push(s),i(s)}for(let r of Object.values(t))this.destroyRowComp(r)}},am={tag:"div",cls:"ag-header",role:"presentation"},nm=class extends _{constructor(){super(am)}postConstruct(){let e={toggleCss:(i,r)=>this.toggleCss(i,r),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new Nf).setComp(e,this.getGui(),this.getFocusableElement());let o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new Jr("left")),o(new Jr(null)),o(new Jr("right"))}},sm={selector:"AG-HEADER-ROOT",component:nm},Oe={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Hn=class extends S{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=t.autoHeight?Oe.AUTO_HEIGHT:t.print?Oe.PRINT:Oe.NORMAL;this.view.updateLayoutClasses(o,t)}},fd=class extends _{constructor(e,t){super(),this.direction=t,this.eViewport=E,this.eContainer=E,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Jc()||jt())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=ed(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){let 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(),ht(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){let t=this.eViewport;rh(this,()=>Ie(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},lm={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"}]},cm=class extends fd{constructor(){super(lm,"horizontal"),this.eLeftSpacer=E,this.eRightSpacer=E,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();let 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 zn(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(){var t,o;if(!this.invisibleScrollbar)return;let e=(o=(t=this.beans.pinnedRowModel)==null?void 0:t.getPinnedBottomTotalHeight())!=null?o:0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let e=this.scrollVisibleSvc.verticalScrollShowing,t=this.visibleCols.getDisplayedColumnsRightWidth(),o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),Ze(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let r=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(r+=i),Ze(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=i)}setScrollVisible(){let e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,a=o?0:i===0&&t?16:i,n=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Yo(this.getGui(),a),Yo(this.eViewport,a),Yo(this.eContainer,a),a||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(n,100):n()}getScrollPosition(){return Yi(this.eViewport,this.enableRtl)}setScrollPosition(e){Ie(this.eViewport)||this.attemptSettingScrollPosition(e),Qi(this.eViewport,e,this.enableRtl)}},dm={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:cm},md=class extends S{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){let t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},gm={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"}]}]},um=class extends fd{constructor(){super(gm,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new md(this.eContainer));let{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){let{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,r=i===0&&o?16:i;this.toggleCss("ag-scrollbar-invisible",o),Ze(this.getGui(),r),Ze(this.eViewport,r),Ze(this.eContainer,r),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){let o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),r=o.scrollTop;i!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Ie(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},hm={selector:"AG-FAKE-VERTICAL-SCROLL",component:um};var ft="Viewport",_s="fakeVScrollComp",Xr=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Us=100,ea=150,pm=class extends S{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=re(this,()=>this.lastScrollSource[1]=null,ea),this.resetLastVScrollDebounced=re(this,()=>this.lastScrollSource[0]=null,ea)}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");let 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,ft)});for(let e of Xr){let t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){let e=this.gos.get("debounceVerticalScrollbar"),t=e?re(this,this.onVScroll.bind(this,ft),Us):this.onVScroll.bind(this,ft),o=e?re(this,this.onVScroll.bind(this,_s),Us):this.onVScroll.bind(this,_s);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(let t of[...Xr,ft]){if(this.lastScrollSource[1]===t)continue;let o=this.getViewportForSource(t);Qi(o,e,this.enableRtl)}}getViewportForSource(e){return e===ft?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;let t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;let i=Yi(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t=e===ft?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition(),o=t;if(this.shouldBlockScrollUpdate(0,o,!0))return;e===ft?this.fakeVScrollComp.setScrollPosition(o):(this.eBodyViewport.scrollTop=t,o=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),o!==t&&this.fakeVScrollComp.setScrollPosition(o,!0));let{animationFrameSvc:i}=this;i==null||i.setScrollTop(o),this.nextScrollTop=o,i!=null&&i.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){let 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){let 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"})},ea)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!jt()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){let t=un(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){let 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(){let e=this.scrollLeft,t=!1;for(let o of Xr)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(ft)}scrollGridIfNeeded(e=!1){let t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){let i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),Qi(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){let{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;let{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){let t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){let{rowModel:o}=this.beans,i=o.getRowCount(),r=-1;for(let a=0;a=0&&this.ensureIndexVisible(r,t)}ensureIndexVisible(e,t,o=0){if(se(this.gos,"print"))return;let{rowModel:i}=this.beans,r=i.getRowCount();if(typeof e!="number"||e<0||e>=r){k(88,{index:e});return}this.clearRetryListeners();let{frameworkOverrides:a,pageBounds:n,rowContainerHeight:s,rowRenderer:l}=this.beans;a.wrapIncoming(()=>{var p,f;let c=this.ctrlsSvc.getGridBodyCtrl(),d=i.getRow(e),g,u,h=0;this.invalidateVerticalScroll();do{let{stickyTopHeight:m,stickyBottomHeight:v}=c,C=d.rowTop,w=d.rowHeight,y=n.getPixelOffset(),x=d.rowTop-y,R=x+d.rowHeight,F=this.getVScrollPosition(),P=s.divStretchOffset,T=F.top+P,I=F.bottom+P,z=I-T,L=s.getScrollPositionForPixel(x),N=s.getScrollPositionForPixel(R-z),j=Math.min((L+N)/2,x),A=T+m>x,H=I-vz?V=L-m:V=N+v),V!==null&&(this.setVerticalScrollPosition(V),l.redraw({afterScroll:!0})),g=C!==d.rowTop||w!==d.rowHeight,u=m!==c.stickyTopHeight||v!==c.stickyBottomHeight,h++}while((g||u)&&h<10);if((p=this.animationFrameSvc)==null||p.flushAllFrames(),o<10&&(d!=null&&d.stub||!((f=this.beans.rowAutoHeight)!=null&&f.areRowsMeasured()))){let m=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{let v=this.getVScrollPosition().top;m!==v&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){for(let e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){let{colModel:o,frameworkOverrides:i}=this.beans,r=o.getCol(e);if(!r||r.isPinned()||!this.visibleCols.isColDisplayed(r))return;let a=this.getPositionedHorizontalScroll(r,t);i.wrapIncoming(()=>{var n;a!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(a),this.centerRowsCtrl.onHorizontalViewportChanged(),(n=this.animationFrameSvc)==null||n.flushAllFrames()})}getPositionedHorizontalScroll(e,t){let{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),r=this.centerRowsCtrl.getCenterWidth()r:oi;return{columnBeforeStart:n,columnAfterEnd:s}}getColumnBounds(e){let t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),r=e.getLeft(),a=t?-1:1,n=t?o-r:r,s=n+i*a,l=n+i/2*a;return{colLeft:n,colMiddle:l,colRight:s}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},js={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 fm(e,t,o=Rn()||0,i,r){return vd(e,t,"horizontal",o,i,r)}function mm(e,t,o=Rn()||0,i,r){return vd(e,t,"vertical",o,i,r)}function vd(e,t,o,i,r,a){let n=js[o],s=js[n.opposite],l=r?Ie(r):!0,c=a?Ie(a):!0,d=n.overflow(e);if(d<=0)return!1;if(!t||i===0)return!0;let g=s.overflow(t);if(g<=0)return!0;if(d<=i){if(l&&c&&vm({candidateOverflow:g,candidateScrollSize:s.scrollSize(t),candidateClientSize:s.clientSize(t),scrollbarWidth:i}))return!1;let u=n.clientSize(e)+i;return n.scrollSize(e)<=u}return!0}function vm({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:o,scrollbarWidth:i}){if(e<=0||e>i)return!1;let r=o+i;return t>o&&t<=r}var Cm=class extends S{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(){let{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{ht(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){let{pinnedCols:e,colFlex:t}=this.beans;e==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t==null||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(){let e=this.gridBodyCtrl.eBodyViewport,t=un(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;let e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){let{centerContainerCtrl:e,beans:t}=this,o=e.getCenterWidth(),i=e.getViewportScrollLeft();t.colViewport.setScrollPosition(o,i)}};function Cd(e){var o;return e.altKey||e.ctrlKey||e.metaKey?!1:((o=e.key)==null?void 0:o.length)===1}function qi(e,t,o,i){var a;let r=(a=t.getColDef().cellRendererParams)==null?void 0:a.suppressMouseEventHandling;return wd(e,t,o,i,r)}function wm(e,t,o,i){let r=t==null?void 0:t.suppressMouseEventHandling;return wd(e,void 0,o,i,r)}function wd(e,t,o,i,r){return r?r(O(e,{column:t,node:o,event:i})):!1}function bd(e,t,o){let i=t;for(;i;){let r=Mc(e,i,o);if(r)return r;i=i.parentElement}return null}var cr="cellCtrl";function Bn(e,t){return bd(e,t,cr)}var dr="renderedRow";function bm(e,t){return bd(e,t,dr)}function Ba(e,t,o,i,r){let a=i?i.getColDef().suppressKeyboardEvent:void 0;if(!a)return!1;let n=O(e,{event:t,editing:r,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(a&&a(n))}function ym(e){var d,g,u;let{pinnedRowModel:t,rowModel:o,rangeSvc:i,visibleCols:r}=e;if(!i||r.allCols.length===0)return;let a=(d=t==null?void 0:t.isEmpty("top"))!=null?d:!0,n=(g=t==null?void 0:t.isEmpty("bottom"))!=null?g:!0,s=a?null:"top",l,c;n?(l=null,c=o.getRowCount()-1):(l="bottom",c=(u=t==null?void 0:t.getPinnedBottomRowCount())!=null?u:-1),i.setCellRange({rowStartIndex:0,rowStartPinned:s,rowEndIndex:c,rowEndPinned:l})}var Sm=class extends S{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){let e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";Ji("pointerdown")?e="pointerdown":Ji("touchstart")&&(e="touchstart");let t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(let o of t){let i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})}}processMouseEvent(e,t){var r;if(!li(this.beans,t)||ct(t))return;let{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o!=null&&o.column&&o.dispatchCellContextMenuEvent(t),(r=this.beans.contextMenuSvc)==null||r.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){let{gos:t}=this;return{cellCtrl:Bn(t,e),rowCtrl:bm(t,e)}}processKeyboardEvent(e,t){let{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i!=null&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){var a,n,s;let i=(n=(a=this.editSvc)==null?void 0:a.isEditing(e,{withOpenEditor:!0}))!=null?n:!1;!Ba(this.gos,o,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&((s=this.beans.navigation)!=null&&s.handlePageScrollingKey(o))||e.onKeyDown(o),this.doGridOperations(o,i),Cd(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){let{rowNode:i}=e,{focusSvc:r,navigation:a}=this.beans,n=r.getFocusedCell(),s=n==null?void 0:n.column;if(!Ba(this.gos,o,i,s,!1)){let c=o.key;if(t==="keydown")switch(c){case b.PAGE_HOME:case b.PAGE_END:case b.PAGE_UP:case b.PAGE_DOWN:a==null||a.handlePageScrollingKey(o,!0);break;case b.LEFT:case b.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case b.UP:case b.DOWN:e.onKeyboardNavigate(o);break;case b.TAB:e.onTabKeyDown(o);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!li(this.beans,e))return;let o=_c(e),{clipboardSvc:i,undoRedo:r}=this.beans;if(o===b.A)return this.onCtrlAndA(e);if(o===b.C)return this.onCtrlAndC(i,e);if(o===b.D)return this.onCtrlAndD(i,e);if(o===b.V)return this.onCtrlAndV(i,e);if(o===b.X)return this.onCtrlAndX(i,e);if(o===b.Y)return this.onCtrlAndY(r);if(o===b.Z)return this.onCtrlAndZ(r,e)}onCtrlAndA(e){let{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:r}=this;o&&dt(r)&&!zh(r)&&t.isRowsToRender()?ym(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Lc(r)}),e.preventDefault()}onCtrlAndC(e,t){var i;if(!e||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){var i;if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){var i;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.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==null||e.redo("ui")}},Ri=e=>e.topRowCtrls,Ei=e=>e.getStickyTopRowCtrls(),Fi=e=>e.getStickyBottomRowCtrls(),Di=e=>e.bottomRowCtrls,Mi=e=>e.allRowCtrls,ta=e=>e.getCtrls("top"),oa=e=>e.getCtrls("center"),ia=e=>e.getCtrls("bottom"),xm={center:{type:"center",name:"center-cols",getRowCtrls:Mi,getSpannedRowCtrls:oa},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Mi,getSpannedRowCtrls:oa},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Mi,getSpannedRowCtrls:oa},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Mi},topCenter:{type:"center",name:"floating-top",getRowCtrls:Ri,getSpannedRowCtrls:ta},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ri,getSpannedRowCtrls:ta},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ri,getSpannedRowCtrls:ta},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Ri},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Ei},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Ei},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Ei},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Ei},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Fi},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Fi},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Fi},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Fi},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Di,getSpannedRowCtrls:ia},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Di,getSpannedRowCtrls:ia},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Di,getSpannedRowCtrls:ia},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Di}};function yd(e){return`ag-${bi(e).name}-viewport`}function Sd(e){var o;let t=bi(e);return(o=t.container)!=null?o:`ag-${t.name}-container`}function km(e){return`ag-${bi(e).name}-spanned-cells-container`}function bi(e){return xm[e]}var Rm=["topCenter","topLeft","topRight"],Em=["bottomCenter","bottomLeft","bottomRight"],Fm=["center","left","right"],Dm=["center","left","right","fullWidth"],Mm=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Pm=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Im=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],xd=["stickyTopCenter","stickyTopLeft","stickyTopRight"],kd=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Tm=[...xd,"stickyTopFullWidth",...kd,"stickyBottomFullWidth"],Am=[...Rm,...Em,...Fm,...xd,...kd],zm=class extends S{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=bi(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Cm(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,i){var s;this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new Sm((s=this.eViewport)!=null?s:this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let{pinnedCols:r,rangeSvc:a}=this.beans,n=()=>this.onPinnedWidthChanged();this.forContainers(Pm,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r==null?void 0:r.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:n})}),this.forContainers(Im,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r==null?void 0:r.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:n})}),this.forContainers(Dm,()=>this.createManagedBean(new md(this.eContainer,this.name==="center"?i:void 0))),a&&this.forContainers(Am,()=>this.createManagedBean(a.createDragListenerFeature(this.eContainer))),this.forContainers(Mm,()=>this.createManagedBean(new zn(l=>this.comp.setContainerWidth(`${l}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){let{spannedRowRenderer:e,gos:t}=this.beans,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{let i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(Tm.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let t=()=>{let o=this.gos.get("ensureDomOrder"),i=se(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let{dragSvc:e}=this.beans;if(!e)return;let 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){let 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 ni(this.eViewport)}getCenterViewportScrollLeft(){return Yi(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=Tt(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return dc(this.eViewport)}getViewportScrollLeft(){return Yi(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){var l,c,d;let{beans:e,gos:t,eViewport:o}=this,i=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:r}=e,a=(l=r.getGridBodyCtrl())==null?void 0:l.eBodyViewport,n=(c=r.get("fakeHScrollComp"))==null?void 0:c.getGui(),s=(d=r.get("fakeVScrollComp"))==null?void 0:d.getGui();return i||fm(o,a,void 0,n,s)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Qi(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){let t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let o=se(this.gos,"print"),r=this.gos.get("embedFullWidthRows")||o,a=t.filter(n=>{let s=n.isFullWidth();return this.options.fullWidth?!r&&s:r||!s});this.comp.setRowCtrls({rowCtrls:a,useFlushSync:e})}},Rd="ag-force-vertical-scroll",Lm="ag-selectable",Om="ag-column-moving",Hm=class extends S{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,i,r,a,n){var s,l;this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=r,this.eStickyTop=a,this.eStickyBottom=n,this.eCenterColsViewport=o.querySelector(`.${yd("center")}`),this.eFullWidthContainer=o.querySelector(`.${Sd("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",c=>this.setCellTextSelection(c.currentValue)),this.createManagedBean(new Hn(this.comp)),this.scrollFeature=this.createManagedBean(new pm(o)),(s=this.beans.rowDragSvc)==null||s.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,r,a,n]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(l=this.filterManager)==null||l.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){let 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){let t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){let e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){let{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();let o=t&&e.getScrollbarWidth()||0,i=ed()?16:0,r=`calc(100% + ${o+i}px)`;ht(this.beans,()=>this.comp.setBodyViewportWidth(r)),this.updateScrollingClasses()}setGridRootRole(){let{rowGroupColsSvc:e,colModel:t,gos:o}=this,i=o.get("treeData");if(!i){let r=t.isPivotMode();i=(e?e.columns.length:0)>=(r?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){for(let t of e)this.addManagedElementListeners(t,{focusin:o=>{let{target:i}=o,r=qt(i,"ag-root",t);t.classList.toggle("ag-has-focus",!r)},focusout:o=>{let{target:i,relatedTarget:r}=o,a=t.contains(r),n=qt(r,"ag-root",t);qt(i,"ag-root",t)||(!a||n)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Om,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Lm,e)}updateScrollingClasses(){let{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(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var r,a,n,s;let e=((a=(r=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:r.getRowCount())!=null?a:0)+((s=(n=this.filterManager)==null?void 0:n.getHeaderRowCount())!=null?s:0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){let t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){var c,d,g;let{gos:e,comp:t,ctrlsSvc:o}=this,i=e.get("alwaysShowVerticalScroll"),r=i?Rd:null,a=se(e,"normal");t.setAlwaysVerticalScrollClass(r,i);let n=(c=o.get("center"))==null?void 0:c.eViewport,s=(d=o.get("fakeHScrollComp"))==null?void 0:d.getGui(),l=(g=o.get("fakeVScrollComp"))==null?void 0:g.getGui();return i||a&&mm(this.eBodyViewport,n,void 0,l,s)}setupRowAnimationCssClass(){let{rowContainerHeight:e,environment:t}=this.beans,o=t.sizesMeasured,i=()=>{let r=o&&bo(this.gos)&&!e.stretching,a=r?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(a,r)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({stylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){let{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:r,beans:{popupSvc:a,touchSvc:n}}=this,s=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:s}),n==null||n.mockBodyContextMenu(this,s),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,a)});let l=this.onStickyWheel.bind(this);for(let d of[t,o,i,r])this.addManagedElementListeners(d,{wheel:l});let c=this.onHorizontalWheel.bind(this);for(let 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){let{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&li(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){let{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){let{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){let{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){var r;if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();let{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&((r=this.beans.contextMenuSvc)==null||r.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&e.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){let t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){let{pinnedRowModel:e,beans:{environment:t}}=this,o=e==null?void 0:e.getPinnedTopTotalHeight(),i=e==null?void 0:e.getPinnedBottomTotalHeight(),r=t.getPinnedRowBorderWidth(),a=t.getRowBorderWidth(),n=r-a,s=o?n+o:0,l=i?n+i:0;this.comp.setTopHeight(s),this.comp.setBottomHeight(l),this.comp.setTopInvisible(s<=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{let t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){var r,a,n,s;let t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+((a=(r=this.filterManager)==null?void 0:r.getHeaderHeight())!=null?a:0),o=(s=(n=this.pinnedRowModel)==null?void 0:n.getPinnedTopTotalHeight())!=null?s:0,i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){var s;let{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=(s=e==null?void 0:e.getPinnedBottomTotalHeight())!=null?s:0,a=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,n=i+a;o.setStickyBottomBottom(`${n}px`)}};function oe(e){return Qt(e)}var Bm=class extends _{constructor(e,t,o,i,r){super(),this.cellCtrl=t,this.rowResizerElement=null,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;let a=oe({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=a;let n;t.isCellSpanning()?(n=oe({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),n.appendChild(a),this.setTemplateFromElement(n)):this.setTemplateFromElement(a),this.cellCssManager=new Zc(()=>a),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);let s={toggleCss:(l,c)=>this.cellCssManager.toggleCss(l,c),setUserStyles:l=>fi(a,l),getFocusableElement:()=>a,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRowResizerElement:l=>this.setRowResizerElement(l),setRenderDetails:(l,c,d)=>this.setRenderDetails(l,c,d),setEditDetails:(l,c,d)=>this.setEditDetails(l,c,d),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(l,c)=>this.refreshEditStyles(l,c)};t.setComp(s,a,n,this.eCellWrapper,o,r,void 0)}getParentOfValue(){var e,t;return(t=(e=this.eCellValue)!=null?e:this.eCellWrapper)!=null?t:this.eCell}setRowResizerElement(e){this.rowResizerElement&&De(this.rowResizerElement),this.rowResizerElement=e,e&&this.eCell.appendChild(e)}setRenderDetails(e,t,o){var a;if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;let r=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(o||r)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),(a=this.rowDraggingComp)==null||a.refreshVisibility(),this.rowResizerElement&&!this.rowResizerElement.parentElement&&this.eCell.appendChild(this.rowResizerElement)}setEditDetails(e,t,o){e?this.createCellEditorInstance(e,t,o):this.destroyEditor()}removeControls(){let e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){let t=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=t||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=oe({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));let r=!o&&this.eCellWrapper!=null;r&&(De(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!o);let a=!e&&o,n=a&&this.eCellValue==null;if(n){let c=this.cellCtrl.getCellValueClass();this.eCellValue=oe({tag:"span",cls:c,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}let s=!a&&this.eCellValue!=null;s&&(De(this.eCellValue),this.eCellValue=void 0);let l=i||r||n||s;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){let{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:r,includeSelection:a}=this,n=s=>{s&&t.insertBefore(s.getGui(),o)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),n(this.rowDraggingComp)),r&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),n(this.dndSourceComp)),a&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),n(this.checkboxSelectionComp))}createCellEditorInstance(e,t,o){let i=this.editorVersion,r=e.newAgStackInstance(),{params:a}=e;r.then(s=>this.afterCellEditorCreated(i,s,a,t,o)),Q(this.cellEditor)&&a.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){let t=this.getParentOfValue();ne(t);let o=zo(e);o!=null&&(t.textContent=o)}destroyRenderer(){let{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),De(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){var o,i;let{context:e}=this.beans;(((o=this.cellEditorPopupWrapper)==null?void 0:o.getGui().contains(Y(this.beans)))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),(i=this.hideEditorPopup)==null||i.call(this),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),De(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){var o;if(((o=this.cellRenderer)==null?void 0:o.refresh)==null||this.cellRendererClass!==e.componentClass)return!1;let t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){var a;let t=this.rendererVersion,o=n=>s=>{if(this.rendererVersion!==t||!this.isAlive())return;let c=n.newAgStackInstance(),d=this.afterCellRendererCreated.bind(this,t,n.componentClass);c==null||c.then(d)},{animationFrameSvc:i}=this.beans,r;if(i!=null&&i.active&&this.firstRender?r=(n,s=!1)=>{i.createTask(o(n),this.rowNode.rowIndex,"p2",n.componentFromFramework,s)}:r=n=>o(n)(),(a=e.params)!=null&&a.deferRender&&!this.cellCtrl.rowNode.group){let{loadingComp:n,onReady:s}=this.cellCtrl.getDeferLoadingCellRenderer();n&&(r(n),s.then(()=>r(e,!0)))}else r(e)}afterCellRendererCreated(e,t,o){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(o);return}this.cellRenderer=o,this.cellRendererClass=t;let r=o.getGui();if(this.cellRendererGui=r,r!=null){let a=this.getParentOfValue();ne(a),a.appendChild(r)}}afterCellEditorCreated(e,t,o,i,r){var c,d,g;let a=e!==this.editorVersion,{context:n}=this.beans;if(a){n.destroyBean(t);return}if((c=t.isCancelBeforeStart)==null?void 0:c.call(t)){n.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){k(97,{colId:this.column.getId()}),n.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();let l=i||((d=t.isPopup)==null?void 0:d.call(t));l?this.addPopupCellEditor(o,r):this.addInCellEditor(),this.refreshEditStyles(!0,l),(g=t.afterGuiAttached)==null||g.call(t),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){let{cellCssManager:o}=this;o.toggleCss("ag-cell-inline-editing",e&&!t),o.toggleCss("ag-cell-popup-editing",e&&!!t),o.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){let{eCell:e}=this;e.contains(Y(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),ne(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var y,x;let{gos:o,context:i,popupSvc:r,editSvc:a}=this.beans;o.get("editType")==="fullRow"&&k(98);let n=this.cellEditorPopupWrapper=i.createBean(a.createPopupEditorWrapper(e)),{cellEditor:s,cellEditorGui:l,eCell:c,rowNode:d,column:g,cellCtrl:u}=this,h=n.getGui();l&&h.appendChild(l);let p=o.get("stopEditingWhenCellsLoseFocus"),f=t!=null?t:(x=(y=s.getPopupPosition)==null?void 0:y.call(s))!=null?x:"over",m=o.get("enableRtl"),v={ePopup:h,additionalParams:{column:g,rowNode:d},type:"popupCellEditor",eventSource:c,position:f,alignSide:m?"right":"left",keepWithinBounds:!0},C=r.positionPopupByComponent.bind(r,v),w=r.addPopup({modal:p,eChild:h,closeOnEsc:!0,closedCallback:R=>{u.onPopupEditorClosed(R)},anchorToElement:c,positionCallback:C,ariaOwns:c});w&&(this.hideEditorPopup=w.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},Vm=class extends _{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;let i=oe({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,o),this.setTemplateFromElement(i);let r=i.style;this.domOrder=this.rowCtrl.getDomOrder();let a={setDomOrder:n=>this.domOrder=n,setCellCtrls:n=>this.setCellCtrls(n),showFullWidth:n=>this.showFullWidth(n),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(n,s)=>this.toggleCss(n,s),setUserStyles:n=>fi(i,n),setTop:n=>r.top=n,setTransform:n=>r.transform=n,setRowIndex:n=>i.setAttribute("row-index",n),setRowId:n=>i.setAttribute("row-id",n),setRowBusinessKey:n=>i.setAttribute("row-business-key",n),refreshFullWidth:n=>{var l,c,d;let s=n();return this.fullWidthCellRendererParams=s,(d=(c=(l=this.fullWidthCellRenderer)==null?void 0:l.refresh)==null?void 0:c.call(l,s))!=null?d:!1}};e.setComp(a,this.getGui(),o,void 0),this.addDestroyFunc(()=>{e.unsetComp(o)})}setInitialStyle(e,t){let o=this.rowCtrl.getInitialTransform(t);if(o)e.style.setProperty("transform",o);else{let i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){let t=i=>{if(this.isAlive()){let r=i.getGui();this.getGui().appendChild(r),this.rowCtrl.setupDetailRowAutoHeight(r),this.setFullWidthRowComp(i,e.params)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){let t=new Map(this.cellComps);for(let o of e){let i=o.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(o)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;let t=[];for(let o of e){let i=this.cellComps.get(o.instanceId);i&&t.push(i.getGui())}uc(this.getGui(),t)}newCellComp(e){var i,r;let t=(r=(i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))!=null?r:!1,o=new Bm(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,o),this.getGui().appendChild(o.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}destroyCells(e){for(let t of e.values()){if(!t)continue;let o=t.cellCtrl.instanceId;this.cellComps.get(o)===t&&(t.detach(),t.destroy(),this.cellComps.delete(o))}}};function Nm(e,t,o){let i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,r={tag:"div",ref:"eContainer",cls:Sd(e),role:"rowgroup"};if(t.type==="center"||i){let a={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${km(e)}`,role:"presentation"};return r.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${yd(e)}`,role:"rowgroup",children:[r,i?a:null]}}return r}var Gm=class extends _{constructor(e){super(),this.eViewport=E,this.eContainer=E,this.eSpannedContainer=E,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=bi(this.name)}postConstruct(){this.setTemplate(Nm(this.name,this.options,this.beans));let e={setHorizontalScroll:o=>this.eViewport.scrollLeft=o,setViewportHeight:o=>this.eViewport.style.height=o,setRowCtrls:({rowCtrls:o})=>this.setRowCtrls(o),setSpannedRowCtrls:o=>this.setRowCtrls(o,!0),setDomOrder:o=>{this.domOrder=o},setContainerWidth:o=>{this.eContainer.style.width=o,this.eSpannedContainer&&(this.eSpannedContainer.style.width=o)},setOffsetTop:o=>{let i=`translateY(${o})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new zm(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){let{beans:o,options:i}=this,r=t?this.eSpannedContainer:this.eContainer,a=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},n={};t?this.rowCompsWithSpan=n:this.rowCompsNoSpan=n,this.lastPlacedElement=null;let s=[];for(let l of e){let c=l.instanceId,d=a[c],g;if(d)g=d,delete a[c];else{if(!l.rowNode.displayed)continue;g=new Vm(l,o,i.type)}n[c]=g,s.push([g,!d])}this.removeOldRows(Object.values(a)),this.addRowNodes(s,r)}addRowNodes(e,t){let{domOrder:o}=this;for(let[i,r]of e){let a=i.getGui();o?this.ensureDomOrder(a,t):r&&t.appendChild(a)}}removeOldRows(e){for(let t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){gc(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},Wm={selector:"AG-ROW-CONTAINER",component:Gm};function Go(e,t){return t.map(o=>{let i=`e${o[0].toUpperCase()+o.substring(1)}RowContainer`;return e[i]={name:o},{tag:"ag-row-container",ref:i,attrs:{name:o}}})}function qm(e){let t={},o={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:Go(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:Go(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:Go(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:Go(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:Go(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var _m=class extends _{constructor(){super(...arguments),this.eGridRoot=E,this.eBodyViewport=E,this.eStickyTop=E,this.eStickyBottom=E,this.eTop=E,this.eBottom=E,this.eBody=E}postConstruct(){let{overlays:e,rangeSvc:t}=this.beans,o=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:r}=qm(!!o);this.setTemplate(r,[...o?[o]:[],dm,hm,sm,Wm],i);let a=(s,l)=>{let c=`${s}px`;l.style.minHeight=c,l.style.height=c},n={setRowAnimationCssOnBodyViewport:(s,l)=>this.setRowAnimationCssOnBodyViewport(s,l),setColumnCount:s=>Iu(this.getGui(),s),setRowCount:s=>Mu(this.getGui(),s),setTopHeight:s=>a(s,this.eTop),setBottomHeight:s=>a(s,this.eBottom),setTopInvisible:s=>this.eTop.classList.toggle("ag-invisible",s),setBottomInvisible:s=>this.eBottom.classList.toggle("ag-invisible",s),setStickyTopHeight:s=>this.eStickyTop.style.height=s,setStickyTopTop:s=>this.eStickyTop.style.top=s,setStickyTopWidth:s=>this.eStickyTop.style.width=s,setStickyBottomHeight:s=>{this.eStickyBottom.style.height=s,this.eStickyBottom.classList.toggle("ag-invisible",s==="0px")},setStickyBottomBottom:s=>this.eStickyBottom.style.bottom=s,setStickyBottomWidth:s=>this.eStickyBottom.style.width=s,setColumnMovingCss:(s,l)=>this.toggleCss(s,l),updateLayoutClasses:(s,l)=>{let c=[this.eBodyViewport.classList,this.eBody.classList];for(let d of c)d.toggle(Oe.AUTO_HEIGHT,l.autoHeight),d.toggle(Oe.NORMAL,l.normal),d.toggle(Oe.PRINT,l.print);this.toggleCss(Oe.AUTO_HEIGHT,l.autoHeight),this.toggleCss(Oe.NORMAL,l.normal),this.toggleCss(Oe.PRINT,l.print)},setAlwaysVerticalScrollClass:(s,l)=>this.eBodyViewport.classList.toggle(Rd,l),registerBodyViewportResizeListener:s=>{let l=Tt(this.beans,this.eBodyViewport,s);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:s=>this.eTop.style.overflowY=this.eBottom.style.overflowY=s,setCellSelectableCss:(s,l)=>{for(let c of[this.eTop,this.eBodyViewport,this.eBottom])c.classList.toggle(s,l)},setBodyViewportWidth:s=>this.eBodyViewport.style.width=s,setGridRootRole:s=>Rt(this.eGridRoot,s)};this.ctrl=this.createManagedBean(new Hm),this.ctrl.setComp(n,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&dt(this.gos)||di(this.gos))&&Du(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){let o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}getFocusableContainerName(){return"gridBody"}},Um={selector:"AG-GRID-BODY",component:_m},ra={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},jm=class extends ve{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:o,eTopGuard:i,eBottomGuard:r,focusTrapActive:a,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:s,focusInnerElement:l,onFocusIn:c,onFocusOut:d,shouldStopEventPropagation:g,onTabKeyDown:u,handleKeyDown:h,isEmpty:p,eFocusableElement:f}=e;this.comp=o,this.eTopGuard=i,this.eBottomGuard=r,this.providedFocusInnerElement=l,this.eFocusableElement=f,this.focusTrapActive=!!a,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!s,this.providedFocusIn=c,this.providedFocusOut=d,this.providedShouldStopEventPropagation=g,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new id(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(let 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;let e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Kt(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;let t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){var l;let t=te(this.beans),o=Kt(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let r,a;e?(r=0,a=i):(r=i+1,a=o.length);let n=o.slice(r,a),s=this.gos.get("tabIndex");n.sort((c,d)=>{let g=Number.parseInt(c.getAttribute("tabindex")||"0"),u=Number.parseInt(d.getAttribute("tabindex")||"0");return u===s?1:g===s?-1:g===0?1:u===0?-1:g-u}),(l=n[e?n.length-1:0])==null||l.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;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=Kt(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 no(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t!=null?t:!0)}setAllowFocus(e){this.allowFocus=e}},Km=class extends ve{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();let{eTopGuard:t,eBottomGuard:o,eFocusableElement:i,stopPropagationCallbacks:r}=this,a=[t,o],n={setTabIndex:v=>{for(let C of a)v==null?C.removeAttribute("tabindex"):C.setAttribute("tabindex",v)}};this.addTabGuards(t,o);let{focusTrapActive:s=!1,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:g,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new jm({comp:n,focusTrapActive:s,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:g,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m},r))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){let t=te(this.beans).createElement("div"),o=e==="top"?ra.TAB_GUARD_TOP:ra.TAB_GUARD_BOTTOM;return t.classList.add(ra.TAB_GUARD,o),Rt(t,"presentation"),t}addTabGuards(e,t){let o=this.eFocusableElement;o.prepend(e),o.append(t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];ne(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){fn(t)||(t=t.getGui());let{eBottomGuard:i}=this;i?i.before(t):e(t,o)}destroy(){let{eTopGuard:e,eBottomGuard:t}=this;De(e),De(t),super.destroy()}},$m=class extends Lo{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new Km(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)}},Ed=class extends $m{initialiseTabGuard(e){super.initialiseTabGuard(e,ad)}},Ks=(e,t)=>cd(e,()=>Jt(e.getGui(),t,!1,!0)),$s=e=>{var t;return(t=e==null?void 0:e.getFocusableContainerName())!=null?t:"external"},Ym=e=>e==null?"external":typeof e=="string"?e:"gridBody",Qm=class extends S{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());let{dragAndDrop:i,ctrlsSvc:r}=this.beans;i==null||i.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Hn(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");let a=Tt(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>a()),r.register("gridCtrl",this)}isDetailGrid(){var t;let e=od(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,o,i,r,a;let e=this.beans;return{paginationSelector:(t=e.pagination)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(o=e.registry)==null?void 0:o.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:(i=e.sideBar)==null?void 0:i.getSelector(),statusBarSelector:(r=e.registry)==null?void 0:r.getSelector("AG-STATUS-BAR"),watermarkSelector:(a=e.licenseManager)==null?void 0:a.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){let{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){let t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e),r=o===-1?e?t.length-1:0:i,{gos:a,beans:{focusSvc:n,navigation:s}}=this,l=a.getCallback("tabToNextGridContainer");if(l){let c=n.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:r}),d=$s(t[r]),g=c==null&&d==="gridBody"?"gridBody":Ym(c),u=l({backwards:e,previousContainer:$s(t[o]),nextContainer:g,defaultTarget:c});if(u!==void 0){if(typeof u=="boolean")return u;if(typeof u=="string"){if(u==="gridBody")return this.focusGridBodyDefault(e)||void 0;let h=t.find(p=>p.getFocusableContainerName()===u);if(!h){wc(`tabToNextGridContainer - ${u} container not found`);return}return Ks(h,e)?!0:void 0}return Vf(u)?n.focusHeaderPosition({headerPosition:u})||void 0:(s==null||s.ensureCellVisible(u),n.setFocusedCell({...u,forceBrowserFocus:!0}),n.isCellFocused(u)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:o,nextIndex:r})||void 0}focusInnerElement(e){let{gos:t,beans:o,beans:{focusSvc:i,visibleCols:r}}=this,a=t.getCallback("focusGridInnerElement");if(a!=null&&a({fromBottom:!!e}))return!0;let n=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:n,indexWithFocus:n.length,nextIndex:n.length-1})?!0:i.focusGridView({column:U(r.allCols),backwards:!0});let s=r.allCols;if(t.get("headerHeight")===0||Le(o)){if(i.focusGridView({column:s[0],backwards:e}))return!0;for(let l=1;lr.getGui().contains(o));return{indexWithFocus:i,nextIndex:i+(t?-1:1)}}focusGridBodyDefault(e){let{gos:t,beans:o,beans:{focusSvc:i,visibleCols:{allCols:r}}}=this;return e?i.focusGridView({column:U(r),backwards:!0}):t.get("headerHeight")===0||Le(o)?i.focusGridView({column:r[0]}):i.focusFirstHeader()}focusNextInnerContainerDefault(e){let{backwards:t,focusableContainers:o,indexWithFocus:i}=e,r=t?-1:1;for(let a=e.nextIndex;a>=0&&aa:ithis.destroyBean(this),setRtlClass:a=>this.addCss(a),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:a=>{this.getGui().style.userSelect=a!=null?a:"",this.getGui().style.webkitUserSelect=a!=null?a:""},setCursor:a=>{this.getGui().style.cursor=a!=null?a:""}},t=this.createManagedBean(new Qm),o=t.getOptionalSelectors(),i=this.createTemplate(o),r=[Um,...Object.values(o).filter(a=>!!a)];this.setTemplate(i,r),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:a=>t.focusInnerElement(a),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){let e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{e.remove(),Et(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){let o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:r,PRINT:a}=Oe,{autoHeight:n,normal:s,print:l}=t;o.toggle(i,n),o.toggle(r,s),o.toggle(a,l),this.toggleCss(i,n),this.toggleCss(r,s),this.toggleCss(a,l)}createTemplate(e){let t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones",ref:"gridHeaderDropZones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar",ref:"statusBar"}:null,r=e.watermarkSelector?{tag:"ag-watermark"}:null,a=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},i,a,r]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){var t;if(!e&&((t=this.pagination)!=null&&t.isDisplayed())){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){var t,o,i;let e=[...(i=(o=(t=this.gridHeaderDropZones)==null?void 0:t.getFocusableContainers)==null?void 0:o.call(t))!=null?i:[],this.gridBody];for(let r of[this.sideBar,this.statusBar,this.pagination])r&&e.push(r);return e.filter(r=>Ie(r.getGui()))}},B=(e,t)=>{for(let o of Object.keys(t))t[o]=e;return t},Ys={dispatchEvent:"CommunityCore",...B("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...B("GridState",{getState:0,setState:0}),...B("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...B("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...B("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...B("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...B("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...B("ValueCache",{expireValueCache:0}),...B("CellApi",{getCellValue:0}),...B("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...B("Sort",{onSortChanged:0}),...B("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...B("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...B("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...B("HighlightChanges",{flashCells:0}),...B("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...B("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...B("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...B("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...B("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...B("ColumnResize",{setColumnWidths:0}),...B("ColumnHover",{isColumnHovered:0}),...B("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...B("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...B("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...B("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...B("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...B("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...B("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...B("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...B("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...B("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...B("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...B("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...B("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...B("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...B("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...B("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...B("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...B("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...B("ContextMenu",{showContextMenu:0}),...B("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...B("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...B("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...B("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...B("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...B("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...B("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...B("StatusBar",{getStatusPanel:0}),...B("AiToolkit",{getStructuredSchema:0})},aa={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Jm=(e,t)=>e.eventSvc.dispatchEvent(t),Fd=class{};Reflect.defineProperty(Fd,"name",{value:"GridApi"});var Xm=class extends S{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Fd,this.fns={...aa,dispatchEvent:Jm},this.preDestroyLink="";let{api:e}=this;for(let t of Object.keys(Ys))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var r,a;let{fns:o,beans:i}=this;o!==aa&&(o[e]=(a=(r=i==null?void 0:i.validation)==null?void 0:r.validateApiFunction(e,t))!=null?a:t)}makeApi(e){return{[e]:(...t)=>{let{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){let{beans:t,gos:o,preDestroyLink:i}=this;if(!t)k(26,{fnName:e,preDestroyLink:i});else{let r=Ys[e];o.assertModuleRegistered(r,`api.${e}`)&&k(27,{fnName:e,module:r})}}destroy(){super.destroy(),this.fns=aa,this.beans=null}};function ev(e){return e.context.getId()}function tv(e){e.gridDestroySvc.destroy()}function ov(e){return e.gridDestroySvc.destroyCalled}function iv(e,t){return e.gos.get(t)}function rv(e,t,o){Dd(e,{[t]:o})}function Dd(e,t){e.gos.updateGridOptions({options:t})}function av(e,t){let o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}function nv(e,t,o){let i=ye(e,t,o);if(i){let{className:a}=i;if(typeof a=="string"&&a.includes("ag-icon")||typeof a=="object"&&a["ag-icon"])return i}let r=oe({tag:"span"});return r.appendChild(i),r}function ye(e,t,o){var a;let i=null;e==="smallDown"?k(262):e==="smallLeft"?k(263):e==="smallRight"&&k(264);let r=o==null?void 0:o.getColDef().icons;if(r&&(i=r[e]),t.gos&&!i){let n=t.gos.get("icons");n&&(i=n[e])}if(i){let n;if(typeof i=="function")n=i();else if(typeof i=="string")n=i;else{k(38,{iconName:e});return}if(typeof n=="string")return hn(n);if(fn(n))return n;k(133,{iconName:e});return}else{let n=t.registry.getIcon(e);return n||(a=t.validation)==null||a.validateIcon(e),oe({tag:"span",cls:`ag-icon ag-icon-${n!=null?n:e}`,role:"presentation",attrs:{unselectable:"on"}})}}var sv={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},lv=class extends _{constructor(e,t,o){super(sv),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(ye("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){let{rowNode:t,column:o,eCell:i,gos:r}=this,a=o.getColDef().dndSourceOnRowDrag,n=e.dataTransfer;if(n.setDragImage(i,0,0),a){let s=O(r,{rowNode:t,dragEvent:e});a(s)}else try{let s=JSON.stringify(t.data);n.setData("application/json",s),n.setData("text/plain",s)}catch{}}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},cv=".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)}",dv={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"}]}]},gv=class extends _{constructor(){super(),this.dragSource=null,this.eIcon=E,this.eLabel=E,this.eGhost=E,this.registerCSS(cv)}postConstruct(){let e=t=>nv(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(dv),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){let{eGhost:o,eIcon:i,dragSource:r,dropIconMap:a,gos:n}=this;ne(i);let s=null;e||(e=r!=null&&r.getDefaultIconName?r.getDefaultIconName():"notAllowed"),s=a[e],o.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(s===a.hide&&n.get("suppressDragLeaveHidesColumns"))&&s&&i.appendChild(s)}setLabel(e){this.eLabel.textContent=e}};function uv(e,t){var o,i;(i=(o=e.rowDragSvc)==null?void 0:o.rowDragFeature)==null||i.addRowDropZone(t)}function hv(e,t){var i,r;let o=(i=e.dragAndDrop)==null?void 0:i.findExternalZone(t.getContainer());o&&((r=e.dragAndDrop)==null||r.removeDropTarget(o))}function pv(e,t){var o,i;return(i=(o=e.rowDragSvc)==null?void 0:o.rowDragFeature)==null?void 0:i.getRowDropZone(t)}function fv(e){let t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function mv(e,t){let o=e.rowDropHighlightSvc;if(!o)return;let i=t==null?void 0:t.row,r=t==null?void 0:t.dropIndicatorPosition;r!=="above"&&r!=="below"&&r!=="inside"&&(r="none");let a=i==null?void 0:i.rowIndex;a==null||r==="none"?o.clear():o.set(i,r)}var Md=(e,t)=>{if(t!=null&&(e!=null&&e.setPointerCapture))try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},vv=(e,t)=>{if(typeof PointerEvent=="undefined"||!(t instanceof PointerEvent))return null;let o=t.pointerId;if(!Md(e,o))return null;let i={eElement:e,pointerId:o,onLost(r){wv(i,r)}};return e.addEventListener("lostpointercapture",i.onLost),i},Cv=e=>{if(!e)return;Pd(e);let{eElement:t,pointerId:o}=e;if(t){try{t.releasePointerCapture(o)}catch{}e.eElement=null}},Pd=e=>{let{eElement:t,onLost:o}=e;t&&o&&(t.removeEventListener("lostpointercapture",o),e.onLost=null)},wv=(e,t)=>{Pd(e);let{eElement:o,pointerId:i}=e;o&&t.pointerId===i&&Md(o,i)},ke,Ke,na={passive:!0},mt={passive:!1},qe=e=>{if(!Ke)Ke=new WeakSet;else if(Ke.has(e))return!1;return Ke.add(e),!0},bv=class extends ve{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){var e,t;return(t=(e=this.drag)==null?void 0:e.start.target)!=null?t:null}isPointer(){return!!(ke!=null&&ke.has(Ue(this.beans)))}hasPointerCapture(){var t,o,i;let e=(t=this.drag)==null?void 0:t.pointerCapture;return!!(e&&((i=(o=this.beans.eRootDiv).hasPointerCapture)!=null&&i.call(o,e.pointerId)))}destroy(){this.drag&&this.cancelDrag();let e=this.dragSources;for(let t of e)Qs(t);e.length=0,super.destroy()}removeDragSource(e){let t=this.dragSources;for(let o=0,i=t.length;othis.onPointerDown(e,c),mt],[t,"mousedown",c=>this.onMouseDown(e,c)]);let l=this.gos.get("suppressTouch");o&&!l&&Oi(i,[t,"touchstart",d=>this.onTouchStart(e,d),mt])}cancelDrag(e){var o,i;let t=this.drag;e!=null||(e=t==null?void 0:t.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(i=t==null?void 0:(o=t.params).onDragCancel)==null||i.call(o),this.destroyDrag()}shouldPreventMouseEvent(e){let t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&li(this.beans,e)&&!$o(la(e))}initDrag(e,...t){this.drag=e;let o=this.beans,i=s=>this.onScroll(s),r=s=>this.onKeyDown(s),a=Ue(o),n=te(o);Oi(e.handlers,[a,"contextmenu",yt],[a,"keydown",r],[n,"scroll",i,{capture:!0}],[n.defaultView||window,"scroll",i],...t)}destroyDrag(){this.dragging=!1;let e=this.drag;if(e){let t=e.rootEl;(ke==null?void 0:ke.get(t))===e&&ke.delete(t),this.drag=null,Cv(e.pointerCapture),mn(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;let o=this.beans;if(Ke!=null&&Ke.has(t))return;let i=t.pointerType;if(i==="touch"&&(o.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),$o(la(t))))||!t.isPrimary||i==="mouse"&&t.button!==0)return;this.destroyDrag();let r=Ue(o),a=e.eElement,n=t.pointerId,s=new sa(r,e,t,n);ke!=null||(ke=new WeakMap),ke.set(r,s);let l=u=>{u.pointerId===n&&this.onMouseOrPointerMove(u)},c=u=>{u.pointerId===n&&this.onMouseOrPointerUp(u)},d=u=>{u.pointerId===n&&qe(u)&&this.cancelDrag()},g=u=>this.draggingPreventDefault(u);this.initDrag(s,[r,"pointerup",c],[r,"pointercancel",d],[r,"pointermove",l,mt],[r,"touchmove",g,mt],[a,"mousemove",g,mt]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):qe(t)}onTouchStart(e,t){var u;if(this.gos.get("suppressTouch")||!e.includeTouch||!qe(t)||$o(la(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&yt(t);return}this.destroyDrag();let i=this.beans,r=Ue(i),a=new sa(r,e,t.touches[0]),n=h=>this.onTouchMove(h),s=h=>this.onTouchUp(h),l=h=>this.onTouchCancel(h),c=h=>this.draggingPreventDefault(h),d=Ue(i),g=(u=t.target)!=null?u:e.eElement;this.initDrag(a,[g,"touchmove",n,na],[g,"touchend",s,na],[g,"touchcancel",l,na],[d,"touchmove",c,mt],[d,"touchend",s,mt],[d,"touchcancel",l,mt]),e.dragStartPixels===0&&this.onMove(a.start)}draggingPreventDefault(e){this.dragging&&yt(e)}onMouseDown(e,t){if(t.button!==0||Ke!=null&&Ke.has(t)||this.isPointer())return;let o=this.beans;this.destroyDrag();let i=new sa(Ue(o),e,t),r=s=>this.onMouseOrPointerMove(s),a=s=>this.onMouseOrPointerUp(s),n=Ue(o);this.initDrag(i,[n,"mousemove",r],[n,"mouseup",a]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):qe(t)}onScroll(e){var i,r;if(!qe(e))return;let t=this.drag,o=t==null?void 0:t.lastDrag;o&&this.dragging&&((r=(i=t.params)==null?void 0:i.onDragging)==null||r.call(i,o))}onMouseOrPointerMove(e){var t;qe(e)&&(zt()&&((t=te(this.beans).getSelection())==null||t.removeAllRanges()),this.shouldPreventMouseEvent(e)&&yt(e),this.onMove(e))}onTouchCancel(e){let t=this.drag;!t||!qe(e)||mo(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){let t=this.drag;if(!t||!qe(e))return;let o=mo(t.start,e.touches);o&&(this.onMove(o),this.draggingPreventDefault(e))}onMove(e){var i,r,a;let t=this.drag;if(!t)return;t.lastDrag=e;let o=t.params;if(!this.dragging){let n=t.start,s=o.dragStartPixels,l=s!=null?s:4;if(fc(e,n,l)||(this.dragging=!0,o.capturePointer&&(t.pointerCapture=vv(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:o.eElement}),(i=o.onDragStart)==null||i.call(o,n),this.drag!==t)||((r=o.onDragging)==null||r.call(o,n),this.drag!==t))return}(a=o.onDragging)==null||a.call(o,e)}onTouchUp(e){let t=this.drag;t&&qe(e)&&this.onUp(mo(t.start,e.changedTouches))}onMouseOrPointerUp(e){qe(e)&&this.onUp(e)}onUp(e){var o,i;let t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,(i=(o=t.params).onDragStop)==null||i.call(o,e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===b.ESCAPE&&this.cancelDrag()}},Qs=e=>{mn(e.handlers);let t=e.oldTouchAction;if(t!=null){let o=e.params.eElement.style;o&&(o.touchAction=t)}},sa=class{constructor(e,t,o,i=null){this.rootEl=e,this.params=t,this.start=o,this.pointerId=i,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},la=e=>{let t=e.target;return t instanceof Element?t:null},yv=class extends bv{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},Sv=class extends S{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){let t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();let o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){let e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let 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)}},xv={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Pi={skipAriaHidden:!0},kv=class extends _{constructor(e,t,o,i,r,a=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=o,this.customGui=i,this.dragStartPixels=r,this.alwaysVisible=a,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){let{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(xv),this.getGui().appendChild(ye("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){let{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;let{beans:e,column:t,rowNode:o}=this,{gos:i,dragAndDrop:r,rowDragSvc:a}=e,n=a==null?void 0:a.visibility,l=!(n==="suppress"||n==="hidden"&&!(r!=null&&r.hasExternalDropZones())),c=l;if(l&&!this.isCustomGui()&&t){let d=t.getColDef().rowDrag;if(d===!1)l=!1;else{let g=typeof d=="function";c=t.isRowDrag(o),l=g||c}}l&&c&&o.footer&&i.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Pi),c||this.setVisible(c,Pi),this.setDisabled(!c||n==="disabled"&&!(r!=null&&r.hasExternalDropZones())),l&&this.setDisplayed(l,Pi),c&&this.setVisible(c,Pi)}setDisabled(e){var t,o;e!==this.disabled&&(this.disabled=e,(o=(t=this.getGui())==null?void 0:t.classList)==null||o.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){var i,r;let e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];let o=(r=(i=this.beans.selectionSvc)==null?void 0:i.getSelectedNodes())!=null?r:[];return o.indexOf(e)!==-1?o:[e]}getDragItem(){let{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;let t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();let i=Ji("pointerdown")?{pointerdown:yt}:{mousedown:yt};this.mouseDownListener=this.addManagedElementListeners(t,i)[0]}let o=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:i=>this.getDragItemName(i,o),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){var n,s,l,c,d,g;let o=(e==null?void 0:e.dragItem)||this.getDragItem(),i=((l=(n=e==null?void 0:e.dropTarget)==null?void 0:n.rows.length)!=null?l:(s=o.rowNodes)==null?void 0:s.length)||1,r=(g=(d=(c=this.column)==null?void 0:c.getColDef())==null?void 0:d.rowDragText)!=null?g:this.gos.get("rowDragText");if(r)return r(o,i);if(i!==1)return`${i} ${t("rowDragRows","rows")}`;let a=this.cellValueFn();return a||`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)}},Rv=class{constructor(e){var t;this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=(t=e.scrollByTick)!=null?t: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){let o=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),i=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(o&&i)return;let r=this.scrollContainer.getBoundingClientRect(),a=this.scrollByTick;this.tickLeft=!i&&e.clientXr.right-a,this.tickUp=!o&&e.clientYr.bottom-a,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++;let e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},_i=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},gr=e=>{let t=e.childrenAfterGroup;for(;t!=null&&t.length;){let o=t[0];if(o.sourceRowIndex>=0)return o;t=o.childrenAfterGroup}},Ev=(e,t,o,i)=>{var g;if(!t.size||!e)return!1;let r=!1,a=(g=e.length)!=null?g:0,n=-1;o&&(n=o.sourceRowIndex,o=n<0?gr(o):null,o&&(n=o.sourceRowIndex)),n<0||n>=a?n=a:i||++n;let s=n,l=Math.min(n,a-1);for(let u of t){let h=u.sourceRowIndex;hl&&(l=h)}let c=s;for(let u=s;u=n;--u){let h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,r=!0),--d)}for(let u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,r=!0),++c;return r};function Fv(e,t){var o,i;return(i=(o=Bn(e,t.target))==null?void 0:o.getFocusedCellPosition())!=null?i:null}function Zs(e,t){let o=se(e.gos,"normal"),i=t,r,a;i.clientX!=null||i.clientY!=null?(r=i.clientX,a=i.clientY):(r=i.x,a=i.y);let{pageFirstPixel:n}=e.pageBounds.getCurrentPagePixelRange();if(a+=n,o){let s=e.ctrlsSvc.getScrollFeature(),l=s.getVScrollPosition(),c=s.getHScrollPosition();r+=c.left,a+=l.top}return{x:r,y:a}}var Dv=.25,Mv=class extends S{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,t=>{let o=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,i=new Rv({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:o,setVerticalPosition:r=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(r),onScrollCallback:()=>{var n;let r=o();if(this.autoScrollOldV!==r){this.autoScrollOldV=r,this.autoScrollChanging=!0;return}let a=this.autoScrollChanging;this.autoScrollChanged=a,this.autoScrollChanging=!1,a&&((n=e.dragAndDrop)==null||n.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=i,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){var t;return((t=e==null?void 0:e.dropTarget)==null?void 0:t.allowed)===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){var o;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let i=(o=this.beans.selectionSvc)==null?void 0:o.getSelectedNodes();if(i&&i.indexOf(t)>=0)return i.slice().sort(Pv)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){var s;let{lastDraggingEvent:o,beans:i}=this;if(t){let l=this.getRowNodes(e);e.dragItem.rowNodes=l,Xs(l,!0)}this.lastDraggingEvent=e;let r=e.fromNudge,a=this.makeRowsDrop(o,e,r,!1);(s=i.rowDropHighlightSvc)==null||s.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);let n=this.autoScroll;a!=null&&a.rowDragManaged&&a.moved&&a.allowed&&a.sameGrid&&!a.suppressMoveWhenRowDragging&&(!r&&!(n!=null&&n.scrolling)||this.autoScrollChanged)&&this.dropRows(a),n==null||n.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,o,i){var m,v,C;let{beans:r,gos:a}=this,n=this.newRowsDrop(t,i),s=r.rowModel;if(t.dropTarget=n,t.changed=!1,!n)return null;let{sameGrid:l,rootNode:c,source:d,target:g}=n;g!=null||(g=(m=s.getRow(s.getRowCount()-1))!=null?m:null);let u=this.beans.groupEditSvc,h=!!(u!=null&&u.canSetParent(n)),p=null;if(g!=null&&g.footer){let w=(v=La(s,-1,g))!=null?v:La(s,1,g);h&&(p=(C=g.sibling)!=null?C:c),g=w!=null?w:null}g!=null&&g.detail&&(g=g.parent),n.moved&&(n.moved=d!==g);let f=.5;if(g&&(l&&n.moved&&(p||!h)?f=d.rowIndex>g.rowIndex?-.5:.5:f=(n.y-g.rowTop-g.rowHeight/2)/g.rowHeight||0),!h&&l&&g&&n.moved&&ee(a)){let w=Iv(s,n);w&&(f=d.rowIndex>w.rowIndex?-.5:.5,g=w,n.moved&&(n.moved=d!==g))}return n.target=g,n.newParent=p,n.pointerPos=Tv(g,n.y),n.yDelta=f,u==null||u.fixRowsDrop(n,h,o,f),this.validateRowsDrop(n,h,i),t.changed||(t.changed=Js(e==null?void 0:e.dropTarget,n)),n}newRowsDrop(e,t){var p;let{beans:o,gos:i}=this,r=o.rowModel.rootNode,a=ee(i)?i.get("rowDragManaged"):!1,n=i.get("suppressMoveWhenRowDragging"),s=this.isFromThisGrid(e),{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!r)return null;let d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e),g=!0;a&&(!c.length||o.rowDragSvc.visibility!=="visible"||(n||!s)&&!d)&&(g=!1);let u=Zs(o,e).y,h=this.getOverNode(u);return{api:o.gridApi,context:o.gridOptions.context,draggingEvent:e,rowDragManaged:a,suppressMoveWhenRowDragging:n,sameGrid:s,withinGrid:d,treeData:!1,rootNode:r,moved:l!==h,y:u,overNode:h,overIndex:(p=h==null?void 0:h.rowIndex)!=null?p:-1,pointerPos:"none",position:"none",source:l,target:h!=null?h:null,newParent:null,rows:c,allowed:g,highlight:!t&&a&&n&&(d||!s),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,o){var h;let{source:i,target:r,yDelta:a,inside:n,moved:s,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=i!==r);let{position:d,fallbackPosition:g}=this.computeDropPosition(s,n,a);e.position=d,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,c,"initial");let u=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");u&&this.applyDropValidator(e,t,o,l,u),l&&(e.rows=this.filterRows(e)),(h=this.beans.groupEditSvc)==null||h.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,c,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=g)}computeDropPosition(e,t,o){let i=o<0?"above":"below";return e?{position:t?"inside":i,fallbackPosition:i}:{position:"none",fallbackPosition:i}}enforceSuppressMoveWhenRowDragging(e,t,o){if(t){if(o==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,o,i,r){var s,l;(s=this.beans.groupEditSvc)==null||s.clearNewSameParent(e,t);let a=r(e);if(!a){e.allowed=!1;return}if(typeof a!="object")return;a.rows!==void 0&&(e.rows=(l=a.rows)!=null?l:[]),t&&a.newParent!==void 0&&(e.newParent=a.newParent),a.target!==void 0&&(e.target=a.target),a.position&&(e.position=a.position),a.allowed!==void 0?e.allowed=a.allowed:i||(e.allowed=!0);let n=e.draggingEvent;a.changed&&n&&(n.changed=!0),!o&&a.highlight!==void 0&&(e.highlight=a.highlight)}addRowDropZone(e){if(!e.getContainer()){k(55);return}let t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){k(56);return}let o=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(r=>e.onDragEnter(this.rowDragEvent("rowDragEnter",r))),onDragLeave:e.onDragLeave&&(r=>e.onDragLeave(this.rowDragEvent("rowDragLeave",r))),onDragging:e.onDragging&&(r=>e.onDragging(this.rowDragEvent("rowDragMove",r))),onDragStop:e.onDragStop&&(r=>e.onDragStop(this.rowDragEvent("rowDragEnd",r))),onDragCancel:e.onDragCancel&&(r=>e.onDragCancel(this.rowDragEvent("rowDragCancel",r)))},i={isInterestedIn:r=>r===2,getIconName:()=>"move",external:!0,...o};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:o=>{var i;this.onDragEnter(o),(i=e==null?void 0:e.onDragEnter)==null||i.call(e,this.rowDragEvent("rowDragEnter",o))},onDragLeave:o=>{var i;this.onDragLeave(o),(i=e==null?void 0:e.onDragLeave)==null||i.call(e,this.rowDragEvent("rowDragLeave",o))},onDragging:o=>{var i;this.onDragging(o),(i=e==null?void 0:e.onDragging)==null||i.call(e,this.rowDragEvent("rowDragMove",o))},onDragStop:o=>{var i;this.onDragStop(o),(i=e==null?void 0:e.onDragStop)==null||i.call(e,this.rowDragEvent("rowDragEnd",o))},onDragCancel:o=>{var i;this.onDragCancel(o),(i=e==null?void 0:e.onDragCancel)==null||i.call(e,this.rowDragEvent("rowDragCancel",o))},fromGrid:!0}}getOverNode(e){let{pageBounds:t,rowModel:o}=this.beans,r=e>t.getCurrentPagePixelRange().pageLastPixel?-1:o.getRowIndexAtPixel(e);return r>=0?o.getRow(r):void 0}rowDragEvent(e,t){var g;let o=this.beans,{dragItem:i,dropTarget:r,event:a,vDirection:n}=t,s=(r==null?void 0:r.rootNode)===o.rowModel.rootNode,l=s?r.y:Zs(o,t).y,c=s?r.overNode:this.getOverNode(l),d=s?r.overIndex:(g=c==null?void 0:c.rowIndex)!=null?g:-1;return{api:o.gridApi,context:o.gridOptions.context,type:e,event:a,node:i.rowNode,nodes:i.rowNodes,overIndex:d,overNode:c,y:l,vDirection:n,rowsDrop:r}}dispatchGridEvent(e,t){let o=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(o)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){var i,r;let t=(r=(i=this.lastDraggingEvent)==null?void 0:i.dropTarget)!=null?r:null,o=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),o!=null&&o.allowed&&o.rowDragManaged&&(!(t!=null&&t.droppedManaged)||Js(t,o))&&this.dropRows(o),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){var o,i;this.clearAutoScroll(),(o=this.beans.groupEditSvc)==null||o.stopDragging(t),(i=this.beans.rowDropHighlightSvc)==null||i.fromDrag(null),Xs(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){var e;(e=this.autoScroll)==null||e.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}){let i=Do(this.gos),r=this.beans.rowModel,a=o.filter(({data:s,rowPinned:l})=>{var c;return!r.getRowNode((c=i==null?void 0:i({data:s,level:0,rowPinned:l}))!=null?c:s.id)}).map(({data:s})=>s);if(a.length===0)return!1;let n;if(t){let s=t.sourceRowIndex>=0?t:gr(t);s&&(n=s.sourceRowIndex+(e==="above"?0:1))}return r.updateRowData({add:a,addIndex:n}),!0}filterRows(e){let{groupEditSvc:t}=this.beans,{rows:o,sameGrid:i}=e,r;for(let a=0,n=o.length;a=0)return e.destroyed?void 0:e;let t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):gr(e)}},Js=(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||!It(e.rows,t.rows)),Pv=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,Xs=(e,t)=>{for(let o=0,i=(e==null?void 0:e.length)||0;o{let o=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;let r=t.source;if(!i||!r)return null;let a=i.rowIndex-r.rowIndex,n=a<0?-1:1;a=t.suppressMoveWhenRowDragging?Math.abs(a):1;let s=new Set(t.rows);do{let l=La(e,n,i);if(!l)break;s.has(l)||(o=l,--a),i=l}while(a>0);return o},Tv=(e,t)=>{var n;let o=e==null?void 0:e.rowTop,i=(n=e==null?void 0:e.rowHeight)!=null?n:0;if(o==null||!i||i<=0)return"none";let r=t-o,a=i*Dv;return r<=a?"above":r>=i-a?"below":"inside"},Av=class extends S{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){let o=t.createManagedBean(new Mv(e)),i=this.beans.dragAndDrop;i.addDropTarget(o),t.addDestroyFunc(()=>i.removeDropTarget(o)),this.rowDragFeature=o;let r=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],r),this.addManagedEventListeners({newColumnsLoaded:r,columnRowGroupChanged:r,columnPivotModeChanged:r,sortChanged:r,filterChanged:r}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,o,i,r,a){return new kv(e,t,o,i,r,a)}createRowDragCompForRow(e,t){if(dt(this.gos))return;let o=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${o("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,o,i,r,a){let n=this.gos;return n.get("rowDragManaged")&&(!ee(n)||n.get("pagination"))?void 0:this.createRowDragComp(o,e,t,i,r,a)}cancelRowDrag(){var e,t;(e=this.rowDragFeature)!=null&&e.lastDraggingEvent&&((t=this.beans.dragSvc)==null||t.cancelDrag())}computeVisibility(){var r,a,n,s;let e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";let i=e.colModel.isPivotMode();return(i||(a=(r=e.rowGroupColsSvc)==null?void 0:r.columns)!=null&&a.length)&&!t.get("refreshAfterGroupEdit")?"hidden":i||(n=e.filterManager)!=null&&n.isAnyFilterPresent()||(s=e.sortSvc)!=null&&s.isSortActive()?"disabled":"visible"}refreshVisibility(){var o;let e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,(o=this.eventSvc)==null||o.dispatchEvent({type:"rowDragVisibilityChanged"}))}},zv=class extends S{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(){let e=this.row,t=this.dragging;!e||(e==null?void 0:e.rowIndex)===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){let e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){let o=e!==this.row,i=e.uiLevel,r=t!==this.position,a=i!==this.uiLevel;this.dragging=!1,(o||r||a)&&(o&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){let t=e==null?void 0:e.dropTarget;if(t){let{highlight:o,target:i,position:r}=t;if(o&&i&&r!=="none"){this.set(i,r),this.dragging=!0;return}}this.dragging&&this.clear()}},Id={moduleName:"Drag",version:D,beans:[yv]},Lv={moduleName:"DragAndDrop",version:D,dynamicBeans:{dndSourceComp:lv},icons:{rowDrag:"grip"}},Td={moduleName:"SharedDragAndDrop",version:D,beans:[_p],dependsOn:[Id],userComponents:{agDragAndDropImage:gv},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},Ov={moduleName:"RowDrag",version:D,beans:[zv,Av],apiFunctions:{addRowDropZone:uv,removeRowDropZone:hv,getRowDropZoneParams:pv,getRowDropPositionIndicator:fv,setRowDropPositionIndicator:mv},dependsOn:[Td]},Hv={moduleName:"HorizontalResize",version:D,beans:[Sv],dependsOn:[Id]},Bv=":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}}",Vv=class extends S{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;let{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++;let e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){let{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}let r=a=>{for(;a.length;){let n=a.pop();n&&n()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),r(o)},0),window.setTimeout(()=>{t(),r(i)},200)})}};function Nv(e,t,o){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,o,"api")}function Gv(e,t,o){var i;(i=e.colMoves)==null||i.moveColumns(t,o,"api")}var Wv=class extends S{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let t=e.dragItem.columns;if(t)for(let 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){let{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&(t==null||t.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop")),this.columnsToGroup.length>0&&(o==null||o.addColumns(this.columnsToGroup,"toolPanelDragAndDrop")),this.columnsToPivot.length>0&&(i==null||i.addColumns(this.columnsToPivot,"toolPanelDragAndDrop"))}onDragCancel(){this.clearColumnsList()}};function qv(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,r)=>{let a=e.indexOf(i),n=e.indexOf(r);return a-n})}function _v(e){var o;let t=[...e];for(let i of e){let r=null,a=i.getParent();for(;a!=null&&a.getDisplayedLeafColumns().length===1;)r=a,a=a.getParent();if(r!=null){let s=!!((o=r.getColGroupDef())!=null&&o.marryChildren)?r.getProvidedColumnGroup().getLeafColumns():r.getLeafColumns();for(let l of s)t.includes(l)||t.push(l)}}return t}function Uv(e,t,o,i){let r=i.allCols,a=null,n=null;for(let s=0;sr.includes(u));if(n===null)n=d;else if(!It(d,n))break;let g=Kv(c);(a===null||g=p||o&&f<=p))return;let v=Uv(h,u,c,d);if(!v)return;let C=v.move;if(!(C>l.getCols().length-u.length))return{columns:u,toIndex:C}}function zd(e){let{columns:t,toIndex:o}=Ad(e)||{},{finished:i,colMoves:r}=e;return!t||o==null?null:(r.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function jv(e,t){let o=t.getCols(),i=e.map(l=>o.indexOf(l)).sort((l,c)=>l-c),r=i[0];return U(i)-r!==i.length-1?null:r}function Kv(e){function t(i){let r=[],a=i.getOriginalParent();for(;a!=null;)r.push(a),a=a.getOriginalParent();return r}let o=0;for(let i=0;ia.length?[r,a]:[a,r];for(let n of r)a.indexOf(n)===-1&&o++}return o}function $v(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Yv(e){let{movingCols:t,draggingRight:o,xPosition:i,pinned:r,gos:a,colModel:n,visibleCols:s}=e;if(a.get("suppressMovableColumns")||t.some(w=>w.getColDef().suppressMovable))return[];let c=$v(s,r),d=n.getCols(),g=c.filter(w=>t.includes(w)),u=c.filter(w=>!t.includes(w)),h=d.filter(w=>!t.includes(w)),p=0,f=i;if(o){let w=0;for(let y of g)w+=y.getActualWidth();f-=w}if(f>0){for(let w=0;w0){let w=u[p-1];m=h.indexOf(w)+1}else m=h.indexOf(u[0]),m===-1&&(m=0);let v=[m],C=(w,y)=>w-y;if(o){let w=m+1,y=d.length-1;for(;w<=y;)v.push(w),w++;v.sort(C)}else{let w=m,y=d.length-1,x=d[w];for(;w<=y&&c.indexOf(x)<0;)w++,v.push(w),x=d[w];w=m-1;let R=0;for(;w>=R;)v.push(w),w--;v.sort(C).reverse()}return v}function Va(e){var c;let{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:r,useHeaderRow:a,skipScrollPadding:n}=e,s=(c=r.getHeaderRowContainerCtrl(t))==null?void 0:c.eViewport,{x:l}=e;return s?(o&&(l-=s.getBoundingClientRect().left),i.get("enableRtl")&&(a&&(s=s.querySelector(".ag-header-row")),l=s.clientWidth-l),t==null&&!n&&(l+=r.get("center").getCenterViewportScrollLeft()),l):0}function ca(e,t){for(let o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var el=7,Na=100,Ii=Na/2,Qv=5,Zv=100,Jv=class extends S{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!M(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){var r;let{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=(r=o==null?void 0:o.columns)!=null?r:[];for(let a of i){let n=a.getPinned();if(a.getColDef().lockPinned){if(n==e)return"move";continue}let s=o==null?void 0:o.containerType;if(s===e||!e)return"move";if(e&&(!n||s!==e))return"pinned"}return"notAllowed"}onDragEnter(e){let t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{let r=t.visibleState,a=(o||[]).filter(n=>r[n.getId()]&&!n.isVisible());this.setColumnsVisible(a,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){let{gos:r,ctrlsSvc:a}=this.beans,n=r.get("suppressMoveWhenColumnDragging");if(i&&!n){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&Q(e.hDirection))return;let s=Va({x:e.x,pinned:this.pinned,gos:r,ctrlsSvc:a});t||this.checkCenterForScrolling(s),n?this.handleColumnDragWhileSuppressingMovement(e,t,o,s,i):this.handleColumnDragWhileAllowingMovement(e,t,o,s,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,o){if(!(e!=null&&e.length))return;let i=e.filter(r=>!r.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();let e=this.lastMovedInfo;if(!e)return;let{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}updateDragItemContainerType(){let{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;let t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,o,i,r){let a=this.getAllMovingColumns(e,!0);if(r){let n=this.isAttemptingToPin(a);n&&this.attemptToPinColumns(a,void 0,!0);let{fromLeft:s,xPosition:l}=this.getNormalisedXPositionInfo(a,n)||{};if(s==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:a,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:s})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(a,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,r){let a=this.getAllMovingColumns(e),n=this.normaliseDirection(e.hDirection)==="right",s=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:a,isFromHeader:s,xPosition:i,fromLeft:n,fromEnter:t,fakeEvent:o}),c=zd({...l,finished:r});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){let o=e.dragSource.getDragItem(),i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;let r=a=>a.getColDef().lockPinned?a.getPinned()==this.pinned:!0;return i?i.filter(r):[]}getMoveColumnParams(e){let{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:r,fromEnter:a,fakeEvent:n}=e,{gos:s,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:r,xPosition:i,pinned:this.pinned,fromEnter:a,fakeEvent:n,gos:s,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){var d,g,u;let{gos:o,colModel:i}=this.beans,r=o.get("enableRtl"),a=i.getCols().filter(h=>h.isVisible()&&h.getPinned()===this.pinned),n=null,s=null,l=null;for(let h of a){if(s=h.getActualWidth(),n=this.getNormalisedColumnLeft(h,0,r),n!=null){let p=n+s;if(n<=t&&p>=t){l=h;break}}n=null,s=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let h=a.length-1;h>=0;h--){let p=a[h],f=a[h].getParent();if(!f){l=p;break}let m=f==null?void 0:f.getDisplayedLeafColumns();if(m.length){l=U(m);break}}if(!l)return;n=this.getNormalisedColumnLeft(l,0,r),s=l.getActualWidth()}if(l==null||n==null||s==null){((d=this.lastHighlightedColumn)==null?void 0:d.column)!==l&&this.clearHighlighted();return}let c;if(t-nel;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){let{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:r,fromLeft:a}=e,n=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:a,fromEnter:i,fakeEvent:r}),{columns:s,toIndex:l}=Ad(n)||{};s&&l!=null&&(this.lastMovedInfo={columns:s,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){let{lastHighlightedColumn:e}=this;e&&(tl(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;let t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth(),r,a;this.gos.get("enableRtl")?(r=ei-Ii):(a=ei-Ii),this.needToMoveRight=r,this.needToMoveLeft=a,a||r?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),Zv),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(){var i;let e;this.intervalCount++,e=10+this.intervalCount*Qv,e>Na&&(e=Na);let t=null,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++;let{pinnedCols:r,dragAndDrop:a,gos:n}=this.beans;if(this.failedMoveAttempts<=el+1||!r)return;if(a.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){let s=(i=this.lastDraggingEvent)==null?void 0:i.dragItem.columns;this.attemptToPinColumns(s,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){let i=(e||[]).filter(n=>!n.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());let{pinnedCols:r,dragAndDrop:a}=this.beans;return r==null||r.setColsPinned(i,t,"uiColumnDragged"),o&&a.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function tl(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function Xv(e){let t=e.length,o,i;for(let r=0;r{let r,a=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":r=[[a,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":r=[[a,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:r=[[a,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=r}),this.moveColumnFeature=this.createManagedBean(new Jv(o)),this.bodyDropPivotTarget=this.createManagedBean(new Wv(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 Ld(e,t){let o=[],i=[],r=[];return e.forEach(n=>{let s=n.getColDef().lockPosition;s==="right"?r.push(n):s==="left"||s===!0?o.push(n):i.push(n)}),t.get("enableRtl")?[...r,...i,...o]:[...o,...i,...r]}function Od(e,t){let o=!0;return lt(null,t,i=>{if(!de(i))return;let r=i,a=r.getColGroupDef();if(!(a==null?void 0:a.marryChildren))return;let s=[];for(let u of r.getLeafColumns()){let h=e.indexOf(u);s.push(h)}let l=Math.max.apply(Math,s),c=Math.min.apply(Math,s),d=l-c,g=r.getLeafColumns().length-1;d>g&&(o=!1)}),o}var tC=class extends S{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){let i=this.beans.colModel.getCols();if(!i)return;let r=i[e];this.moveColumns([r],t,o)}moveColumns(e,t,o,i=!0){let{colModel:r,colAnimation:a,visibleCols:n,eventSvc:s}=this.beans,l=r.getCols();if(!l)return;if(t>l.length-e.length){k(30,{toIndex:t});return}a==null||a.start();let c=r.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Cs(r.getCols(),c,t),n.refresh(o),s.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:i,source:o})),a==null||a.finish()}doesMovePassRules(e,t){let o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){let{colModel:t,gos:o}=this.beans;return!(!Od(e,t.getColTree())||!(r=>{let a=c=>c?c==="left"||c===!0?-1:1:0,n=o.get("enableRtl"),s=n?1:-1,l=!0;for(let c of r){let d=a(c.getColDef().lockPosition);n?d>s&&(l=!1):ds?"hide":"notAllowed",getDragItem:l?()=>rC(t,n.allCols):()=>iC(t),dragItemName:o,onDragStarted:()=>{s=!i.get("suppressDragLeaveHidesColumns"),ca(c,!0)},onDragStopped:()=>ca(c,!1),onDragCancelled:()=>ca(c,!1),onGridEnter:u=>{if(s){let{columns:h=[],visibleState:p}=u!=null?u:{},f=l?v=>!p||p[v.getColId()]:()=>!0,m=h.filter(v=>!v.getColDef().lockVisible&&f(v));r.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:u=>{var h;if(s){let p=((h=u==null?void 0:u.columns)==null?void 0:h.filter(f=>!f.getColDef().lockVisible))||[];r.setColsVisible(p,!1,"uiColumnMoved")}}};return a.addDragSource(g,!0),g}};function oC(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function iC(e){let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function rC(e,t){var s;let o=e.getProvidedColumnGroup().getLeafColumns(),i={};for(let l of o)i[l.getId()]=l.isVisible();let r=[];for(let l of t)o.indexOf(l)>=0&&(r.push(l),Xe(o,l));for(let l of o)r.push(l);let a=[],n=e.getLeafColumns();for(let l of r)n.indexOf(l)!==-1&&a.push(l);return{columns:r,columnsInSplit:a,visibleState:i,containerType:(s=a[0])==null?void 0:s.pinned}}var aC={moduleName:"ColumnMove",version:D,beans:[tC,Vv],apiFunctions:{moveColumnByIndex:Nv,moveColumns:Gv},dependsOn:[Td],css:[Bv]},nC=class extends S{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){let o=this.getHeaderCellForColumn(e);if(!o)return-1;let i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){let t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){let o=document.createElement("form");o.style.position="fixed";let i=this.centerRowContainerCtrl.eContainer;for(let a of e)this.cloneItemIntoDummy(a,o);i.appendChild(o);let r=Math.ceil(o.getBoundingClientRect().width);return o.remove(),t=t!=null?t:this.gos.get("autoSizePadding"),r+t}getHeaderCellForColumn(e){let t=null;for(let o of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){let i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}return t}cloneItemIntoDummy(e,t){let o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";let i=document.createElement("div"),r=i.classList;["ag-header-cell","ag-header-group-cell"].some(s=>o.classList.contains(s))?(r.add("ag-header","ag-header-row"),i.style.position="static"):r.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(l=>n.classList.contains(l))){for(let l=0;la.getPinned());e.dispatchEvent({type:"columnPinned",pinned:r!=null?r:null,columns:t,column:i,source:o})}function lC(e,t,o){if(!t.length)return;let i=t.length===1?t[0]:null,r=Bd(t,a=>a.isVisible());e.dispatchEvent({type:"columnVisible",visible:r,columns:t,column:i,source:o})}function cC(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function Io(e,t,o,i,r=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:r,finished:o,source:i})}var dC=class extends S{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){let{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:r,groupAfterStartWidth:a,groupAfterRatios:n}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=a,this.resizeTakeFromRatios=n,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){let i=this.normaliseDragChange(t),r=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(r,o,e)}getInitialValues(e){var l,c;let t=d=>d.reduce((g,u)=>g+u.getActualWidth(),0),o=(d,g)=>d.map(u=>u.getActualWidth()/g),i=this.getColumnsToResize(),r=t(i),a=o(i,r),n={columnsToResize:i,resizeStartWidth:r,resizeRatios:a},s=null;if(e&&(s=(c=(l=this.beans.colGroupSvc)==null?void 0:l.getGroupAtDirection(this.columnGroup,"After"))!=null?c:null),s){let d=s.getDisplayedLeafColumns(),g=n.groupAfterColumns=d.filter(h=>h.isResizable()),u=n.groupAfterStartWidth=t(g);n.groupAfterRatios=o(g,u)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}resizeLeafColumnsToFit(e){let 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;let i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){var g;let{columnsToResize:r,resizeStartWidth:a,resizeRatios:n,groupAfterColumns:s,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:r,ratios:n,width:t}),s){let u=t-a;d.push({columns:s,ratios:c,width:l-u})}(g=this.beans.colResize)==null||g.resizeColumnSets({resizeSets:d,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},gC=class extends S{constructor(e,t,o,i,r){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=r}postConstruct(){let e=[],t,o,i=()=>{if(q(this.eResize,t),!t)return;let{horizontalResizeSvc:n,colAutosize:s}=this.beans,l=n.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&&s&&e.push(s.addColumnAutosizeListeners(this.eResize,this.column))},r=()=>{for(let n of e)n();e.length=0},a=()=>{let n=this.column.isResizable(),s=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(n!==t||s!==o)&&(t=n,o=s,r(),i())};a(),this.addDestroyFunc(r),this.ctrl.setRefreshFunction("resize",a)}onResizing(e,t){var u,h;let{column:o,lastResizeAmount:i,resizeStartWidth:r,beans:a}=this,n=this.normaliseResizeAmount(t),s=r+n,l=[{key:o,newWidth:s}],{pinnedCols:c,ctrlsSvc:d,colResize:g}=a;if(this.column.getPinned()){let p=(u=c==null?void 0:c.leftWidth)!=null?u:0,f=(h=c==null?void 0:c.rightWidth)!=null?h:0,m=ni(d.getGridBodyCtrl().eBodyViewport)-50;if(p+f+(n-i)>m)return}this.lastResizeAmount=n,g==null||g.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,o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},uC=class extends S{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){let r=[],{colModel:a,gos:n,visibleCols:s}=this.beans;for(let l of e){let c=a.getColDefCol(l.key)||a.getCol(l.key);if(!c)continue;if(r.push({width:l.newWidth,ratios:[1],columns:[c]}),n.get("colResizeDefault")==="shift"&&(t=!t),t){let g=s.getColAfter(c);if(!g)continue;let u=c.getActualWidth()-l.newWidth,h=g.getActualWidth()+u;r.push({width:h,ratios:[1],columns:[g]})}}r.length!==0&&this.resizeColumnSets({resizeSets:r,finished:o,source:i})}resizeColumnSets(e){var d;let{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(g=>hC(g)))){if(o){let g=t&&t.length>0?t[0].columns:null;Io(this.eventSvc,g,o,i)}return}let a=[],n=[];for(let g of t){let{width:u,columns:h,ratios:p}=g,f={},m={};for(let w of h)n.push(w);let v=!0,C=0;for(;v;){if(C++,C>1e3){W(31);break}v=!1;let w=[],y=0,x=u;h.forEach((F,P)=>{if(m[F.getId()])x-=f[F.getId()];else{w.push(F);let I=p[P];y+=I}});let R=1/y;w.forEach((F,P)=>{let T=P===w.length-1,I;T?I=x:(I=Math.round(p[P]*u*R),x-=I);let z=F.getMinWidth(),L=F.getMaxWidth();I0&&I>L&&(I=L,m[F.getId()]=!0,v=!0),f[F.getId()]=I})}for(let w of h){let y=f[w.getId()];w.getActualWidth()!==y&&(w.setActualWidth(y,i),a.push(w))}}let s=a.length>0,l=[];if(s){let{colFlex:g,visibleCols:u,colViewport:h}=this.beans;l=(d=g==null?void 0:g.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}))!=null?d:[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}let c=n.concat(l);(s||o)&&Io(this.eventSvc,c,o,i,l)}resizeHeader(e,t,o){if(!e.isResizable())return;let i=e.getActualWidth(),r=e.getMinWidth(),a=e.getMaxWidth(),n=Math.min(Math.max(i+t,r),a);this.setColumnWidths([{key:e,newWidth:n}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,r){return new gC(e,t,o,i,r)}createGroupResizeFeature(e,t,o,i){return new dC(e,t,o,i)}};function hC(e){let{columns:t,width:o}=e,i=0,r=0,a=!0;for(let l of t){let c=l.getMinWidth();i+=c||0;let d=l.getMaxWidth();d>0?r+=d:a=!1}let n=o>=i,s=!a||o<=r;return n&&s}var pC={moduleName:"ColumnResize",version:D,beans:[uC],apiFunctions:{setColumnWidths:sC},dependsOn:[Hv,Hd]},fC=class extends S{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();let e=this.onWidthChanged.bind(this);for(let 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(let e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},mC=class extends On{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,o,i,r){let{column:a,beans:n}=this,{context:s,colNames:l,colHover:c,rangeSvc:d,colResize:g}=n;this.comp=e,r=wi(this,s,r),this.setGui(t,r),this.displayName=l.getDisplayNameForColumnGroup(a,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(r),this.setupExpandable(r),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:i,compBean:r}),this.setupUserComp(),this.addHeaderMouseListeners(r,i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();let u=this.rowCtrl.pinned,h=a.getProvidedColumnGroup().getLeafColumns();c==null||c.createHoverFeature(r,h,t),d==null||d.createRangeHighlightFeature(r,a,e),r.createManagedBean(new Ln(a,t,n)),r.createManagedBean(new fC(e,a)),g?this.resizeFeature=r.createManagedBean(g.createGroupResizeFeature(e,o,u,a)):e.setResizableDisplayed(!1),r.createManagedBean(new vi(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(r,h),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),r.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(r),r.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.getDefinition();return O(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){let{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(let o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){let t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=U(t)===e;if(!o&&!i)return;let r=e.getHighlighted(),a=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving()),n=!1,s=!1;if(a){let l=this.beans.gos.get("enableRtl"),c=r===1,d=r===0;o&&(l?s=c:n=d),i&&(l?n=d:s=c)}this.comp.toggleCss("ag-header-highlight-before",n),this.comp.toggleCss("ag-header-highlight-after",s)}resizeHeader(e,t){let{resizeFeature:o}=this;if(!o)return;let i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){var t;(t=this.resizeFeature)==null||t.resizeLeafColumnsToFit(e)}setupUserComp(){let{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,r=this.column,a=r.getProvidedColumnGroup(),n=O(o,{displayName:this.displayName,columnGroup:r,setExpanded:l=>{e.setColumnGroupOpened(a,l,"gridInitializing")},setTooltip:(l,c)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>i==null?void 0:i.showMenuAfterButtonClick(a,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>i==null?void 0:i.showMenuAfterMouseEvent(a,l,"columnMenu",c),eGridHeader:this.eGui}),s=zp(t,n);s&&this.comp.setUserCompDetails(s)}addHeaderMouseListeners(e,t){let{column:o,comp:i,beans:{rangeSvc:r},gos:a}=this,n=d=>this.handleMouseOverChange(d.type==="mouseenter"),s=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",o.getProvidedColumnGroup()),l=d=>this.handleContextMenuMouseEvent(d,void 0,o.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:n,mouseleave:n,click:s,contextmenu:l}),i.toggleCss("ag-header-group-cell-selectable",So(a));let c=r==null?void 0:r.createHeaderGroupCellMouseListenerFeature(this.column,t);c&&this.createManagedBean(c)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){let t=this.column.getProvidedColumnGroup();this.refreshExpanded();let o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){let{column:e}=this;this.expandable=e.isExpandable();let t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){let{column:e}=this,t=e.getColGroupDef(),o=ud(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(r=>r.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t!=null&&t.wrapHeaderText&&o.push("ag-header-cell-wrap-text"));for(let i of o)this.comp.toggleCss(i,!0)}setupMovingCss(e){let{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),r=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(let a of i)e.addManagedListeners(a,{movingChanged:r});r()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){var s;if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;let{column:o,expandable:i,gos:r,beans:a}=this,n=So(r);if(e.key==b.ENTER){if(n&&!e.altKey)(s=a.rangeSvc)==null||s.handleColumnSelection(o,e);else if(i){let l=!o.isExpanded();a.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),l,"uiColumnExpanded")}}}refreshAnnouncement(){let e,{gos:t}=this;So(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){var i;let{beans:e,eGui:t,ariaAnnouncement:o}=this;!o||!t.contains(Y(e))||(i=e.ariaAnnounce)==null||i.announceValue(o,"columnHeader")}setDragSource(e){var t,o;!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=(o=(t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))!=null?o: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 vC(e,t,o){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,o,"api")}function CC(e,t,o){var i,r;return(r=(i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,o))!=null?r:null}function wC(e,t){var o,i;return(i=(o=e.colGroupSvc)==null?void 0:o.getProvidedColGroup(t))!=null?i:null}function bC(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function yC(e){var t,o;return(o=(t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())!=null?o:[]}function SC(e,t){var o;(o=e.colGroupSvc)==null||o.setColumnGroupState(t,"api")}function xC(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function kC(e){return e.visibleCols.treeLeft}function RC(e){return e.visibleCols.treeCenter}function EC(e){return e.visibleCols.treeRight}function FC(e){return e.visibleCols.getAllTrees()}var Nd=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t=this.existingIds[e],o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function DC(e,t){for(let o=0;o=0&&(e[i]=e[e.length-1],e.pop())}}var MC=class extends S{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){let{colFlex:o,colModel:i,colGroupSvc:r,colViewport:a,selectionColSvc:n}=this.beans;t||this.buildTrees(i,r),r==null||r.updateOpenClosedVisibility(),this.leftCols=da(this.treeLeft),this.centerCols=da(this.treeCenter),this.rightCols=da(this.treeRight),n==null||n.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(s=>s.isAutoHeight()),o==null||o.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),a.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(let t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){let i=o.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}o=o.getParent()}}return e}updateBodyWidths(){let e=at(this.centerCols),t=at(this.leftCols),o=at(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let r,a;this.gos.get("enableRtl")?(r=t?t[0]:null,a=o?U(o):null):(r=t?U(t):null,a=o?o[0]:null);for(let n of e.getCols())n.setLastLeftPinned(n===r,i),n.setFirstRightPinned(n===a,i)}buildTrees(e,t){let o=e.getColsToShow(),i=o.filter(l=>l.getPinned()=="left"),r=o.filter(l=>l.getPinned()=="right"),a=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),n=new Nd,s=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=s({columns:i,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=s({columns:r,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=s({columns:a,idCreator:n,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){let t=e.getCols(),o=[],i=[],r=[];for(let a of t){let n=a.getPinned();n?n===!0||n==="left"?o.push(a):r.push(a):i.push(a)}this.ariaOrderColumns=o.concat(i).concat(r)}getAriaColIndex(e){let t;return X(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(let e of[this.treeLeft,this.treeRight,this.treeCenter])for(let t of e)X(t)&&t.checkLeft()}setLeftValuesOfCols(e){let{colModel:t}=this.beans;if(!t.getColDefCols())return;let i=t.getCols().slice(0),r=this.gos.get("enableRtl");for(let a of[this.leftCols,this.rightCols,this.centerCols]){if(r){let n=at(a);for(let s of a)n-=s.getActualWidth(),s.setLeft(n,e)}else{let n=0;for(let s of a)s.setLeft(n,e),n+=s.getActualWidth()}DC(i,a)}for(let a of i)a.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){let{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){let{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){let r=[],a=null;for(let n=0;n1){let u=c-1;for(let h=1;h<=u;h++)d.push(t[n+h]);n+=u}let g;if(o){g=!1;for(let u of d)o(u)&&(g=!0)}else g=!0;g&&(r.length===0&&a&&(i&&i(s))&&r.push(a),r.push(s)),a=s}return r}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){let 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={};let e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};$t(this.treeCenter,!1,e),$t(this.treeLeft,!1,e),$t(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){let e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o{Dt(o)&&t.push(o)}),t}var PC=class extends S{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){let e=[],t=this.beans.colModel.getColTree();return lt(null,t,o=>{de(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){let t=this.beans.colModel.getColDefColTree();if(!t)return;let o=[];lt(null,t,i=>{if(de(i)){let r=i.getColGroupDef(),a={groupId:i.getGroupId(),open:r?r.openByDefault:void 0};o.push(a)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){let{colModel:o,colAnimation:i,visibleCols:r,eventSvc:a}=this.beans;if(!o.getColTree().length)return;i==null||i.start();let s=[];for(let l of e){let c=l.groupId,d=l.open,g=this.getProvidedColGroup(c);g&&g.isExpanded()!==d&&(g.setExpanded(d),s.push(g))}r.refresh(t,!0),s.length&&a.dispatchEvent({type:"columnGroupOpened",columnGroup:s.length===1?s[0]:void 0,columnGroups:s}),i==null||i.finish()}setColumnGroupOpened(e,t,o){let i;de(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return lt(null,this.beans.colModel.getColTree(),o=>{de(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){let o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),r=t==="After"?U(i):i[0],a=`getCol${t}`;for(;;){let n=this.beans.visibleCols[a](r);if(!n)return null;let s=this.getColGroupAtLevel(n,o);if(s!==e)return s}}getColGroupAtLevel(e,t){let o=e.getParent(),i,r;for(;i=o.getProvidedColumnGroup().getLevel(),r=o.getPaddingLevel(),!(i+r<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){let e=this.beans.visibleCols.getAllTrees();$t(e,!1,t=>{X(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(X(e))return e;let o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number",r=null;return $t(o,!1,a=>{if(X(a)){let n=a,s;i?s=e===n.getGroupId()&&t===n.getPartId():s=e===n.getGroupId(),s&&(r=n)}}),r}createColumnGroups(e){let{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:r,isStandaloneStructure:a}=e,n=this.mapOldGroupsById(r),s=[],l=t;for(;l.length;){let c=l;l=[];let d=0,g=u=>{let h=d;d=u;let p=c[h],m=(X(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let C=h;Cde(d))){l.setChildren([n]);continue}else{l.setChildren(e);break}r.push(n)}}return r}findDepth(e){let t=0,o=e;for(;o!=null&&o[0]&&de(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i=0;a--){let n=new Wi(null,`FAKE_PATH_${i.getId()}_${a}`,!0,a);this.createBean(n),n.setChildren([r]),r.originalParent=n,r=n}t===0&&(i.originalParent=null),o.push(r)}return o}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i{for(let r of i)if(X(r)){let a=r;t[r.getUniqueId()]=a,o(a.getChildren())}};return e&&o(e),t}setupParentsIntoCols(e,t){for(let o of e!=null?e:[])if(o.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,X(o)){let i=o;this.setupParentsIntoCols(i.getChildren(),i)}}},IC={moduleName:"ColumnGroup",version:D,dynamicBeans:{headerGroupCellCtrl:mC},beans:[PC],apiFunctions:{getAllDisplayedColumnGroups:FC,getCenterDisplayedColumnGroups:RC,getColumnGroup:CC,getColumnGroupState:yC,getDisplayNameForColumnGroup:bC,getLeftDisplayedColumnGroups:kC,getProvidedColumnGroup:wC,getRightDisplayedColumnGroups:EC,resetColumnGroupState:xC,setColumnGroupOpened:vC,setColumnGroupState:SC}};function Ve(e,t,o){var x,R,F;let{colModel:i,rowGroupColsSvc:r,pivotColsSvc:a,autoColSvc:n,selectionColSvc:s,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:g,valueColsSvc:u,eventSvc:h,gos:p}=e,f=(x=i.getColDefCols())!=null?x:[],m=s==null?void 0:s.getColumns();if(!f.length&&!(m!=null&&m.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return k(32),!1;let v=(P,T,I,z,L)=>{var We;if(!P)return;let N=rp(T,t.defaultState),j=N("flex").value1,A=N("sort").value1,H=N("sortType").value1,V=xt(A)||Sn(H),Z=gt(H),K=xr(A),ge=V?{type:Z,direction:K}:void 0;if(Bc(e,P,N("hide").value1,ge,N("sortIndex").value1,N("pinned").value1,j,o),j==null){let le=N("width").value1;if(le!=null){let it=(We=P.getColDef().minWidth)!=null?We:g.getDefaultColumnMinWidth();it!=null&&le>=it&&P.setActualWidth(le,o)}}L||!P.isPrimary()||(u==null||u.syncColumnWithState(P,o,N),r==null||r.syncColumnWithState(P,o,N,I),a==null||a.syncColumnWithState(P,o,N,z))},C=(P,T,I)=>{var it,so,Oo,Ho;let z=Gd(e,o),L=T.slice(),N={},j={},A=[],H=[],V=[],Z=0,K=(it=r==null?void 0:r.columns.slice())!=null?it:[],ge=(so=a==null?void 0:a.columns.slice())!=null?so:[];for(let J of P){let ze=J.colId;if(ze.startsWith(kr)){A.push(J),V.push(J);continue}if(At(ze)){H.push(J),V.push(J);continue}let lo=I(ze);lo?(v(lo,J,N,j,!1),Xe(L,lo)):(V.push(J),Z+=1)}let We=J=>v(J,null,N,j,!1);L.forEach(We),r==null||r.sortColumns(ol.bind(r,N,K)),a==null||a.sortColumns(ol.bind(a,j,ge)),i.refreshCols(!1,o);let le=(J,ze,Vr=[])=>{for(let lo of ze){let vs=J(lo.colId);Xe(Vr,vs),v(vs,lo,null,null,!0)}Vr.forEach(We)};return le(J=>{var ze;return(ze=n==null?void 0:n.getColumn(J))!=null?ze:null},A,(Oo=n==null?void 0:n.getColumns())==null?void 0:Oo.slice()),le(J=>{var ze;return(ze=s==null?void 0:s.getColumn(J))!=null?ze:null},H,(Ho=s==null?void 0:s.getColumns())==null?void 0:Ho.slice()),AC(t,i,p),c.refresh(o),h.dispatchEvent({type:"columnEverythingChanged",source:o}),z(),{unmatchedAndAutoStates:V,unmatchedCount:Z}};l==null||l.start();let{unmatchedAndAutoStates:w,unmatchedCount:y}=C(t.state||[],f,P=>i.getColDefCol(P));if(w.length>0||M(t.defaultState)){let P=(F=(R=d==null?void 0:d.getPivotResultCols())==null?void 0:R.list)!=null?F:[];y=C(w,P,T=>{var I;return(I=d==null?void 0:d.getPivotResultCol(T))!=null?I:null}).unmatchedCount}return l==null||l.finish(),y===0}function TC(e,t){var C,w,y,x;let{colModel:o,autoColSvc:i,selectionColSvc:r,eventSvc:a,gos:n}=e,s=o.getColDefCols();if(!(s!=null&&s.length))return;let l=o.getColDefColTree(),c=Gc(l),d=[],g=1e3,u=1e3,h=R=>{let F=Wd(R);Q(F.rowGroupIndex)&&F.rowGroup&&(F.rowGroupIndex=g++),Q(F.pivotIndex)&&F.pivot&&(F.pivotIndex=u++),d.push(F)};(C=i==null?void 0:i.getColumns())==null||C.forEach(h),(w=r==null?void 0:r.getColumns())==null||w.forEach(h),c==null||c.forEach(h),Ve(e,{state:d},t);let p=(y=i==null?void 0:i.getColumns())!=null?y:[],v=[...(x=r==null?void 0:r.getColumns())!=null?x:[],...p,...s].map(R=>({colId:R.colId}));Ve(e,{state:v,applyOrder:!0},t),a.dispatchEvent(O(n,{type:"columnsReset",source:t}))}function Gd(e,t){var g,u,h;let{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:r,colModel:a,sortSvc:n,eventSvc:s}=e,l={rowGroupColumns:(g=o==null?void 0:o.columns.slice())!=null?g:[],pivotColumns:(u=i==null?void 0:i.columns.slice())!=null?u:[],valueColumns:(h=r==null?void 0:r.columns.slice())!=null?h:[]},c=ur(e),d={};for(let p of c)d[p.colId]=p;return()=>{var T,I;let p=(z,L,N,j)=>{let A=L.map(j),H=N.map(j);if(It(A,H))return;let Z=new Set(L);for(let ge of N)Z.delete(ge)||Z.add(ge);let K=[...Z];s.dispatchEvent({type:z,columns:K,column:K.length===1?K[0]:null,source:t})},f=z=>{let L=[];return a.forAllCols(N=>{let j=d[N.getColId()];j&&z(j,N)&&L.push(N)}),L},m=z=>z.getColId();p("columnRowGroupChanged",l.rowGroupColumns,(T=o==null?void 0:o.columns)!=null?T:[],m),p("columnPivotChanged",l.pivotColumns,(I=i==null?void 0:i.columns)!=null?I:[],m);let C=f((z,L)=>{let N=z.aggFunc!=null,j=N!=L.isValueActive(),A=N&&z.aggFunc!=L.getAggFunc();return j||A});C.length>0&&cC(s,"columnValueChanged",C,t),Io(s,f((z,L)=>z.width!=L.getActualWidth()),!0,t),Vd(s,f((z,L)=>z.pinned!=L.getPinned()),t),lC(s,f((z,L)=>z.hide==L.isVisible()),t);let F=f((z,L)=>!Gi(L.getSortDef(),{type:gt(z.sortType),direction:xr(z.sort)})||z.sortIndex!=L.getSortIndex());F.length>0&&(n==null||n.dispatchSortChangedEvents(t,F));let P=ur(e);LC(c,P,t,a,s)}}function ur(e){let{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,r=t.getColDefCols();if(Q(r)||!t.isAlive())return[];let a=o==null?void 0:o.columns,n=i==null?void 0:i.columns,s=[],l=d=>{var f,m;let g=d.isRowGroupActive()&&a?a.indexOf(d):null,u=d.isPivotActive()&&n?n.indexOf(d):null,h=d.isValueActive()?d.getAggFunc():null,p=d.getSortIndex()!=null?d.getSortIndex():null;s.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:d.getSort(),sortType:(f=d.getSortDef())==null?void 0:f.type,sortIndex:p,aggFunc:h,rowGroup:d.isRowGroupActive(),rowGroupIndex:g,pivot:d.isPivotActive(),pivotIndex:u,flex:(m=d.getFlex())!=null?m:null})};t.forAllCols(d=>l(d));let c=new Map(t.getCols().map((d,g)=>[d.getColId(),g]));return s.sort((d,g)=>{let u=c.has(d.colId)?c.get(d.colId):-1,h=c.has(g.colId)?c.get(g.colId):-1;return u-h}),s}function Wd(e){let t=(m,v)=>m!=null?m:v!=null?v:null,o=e.getColDef(),i=Me(t(o.sort,o.initialSort)),r=i.direction,a=i.type,n=t(o.sortIndex,o.initialSortIndex),s=t(o.hide,o.initialHide),l=t(o.pinned,o.initialPinned),c=t(o.width,o.initialWidth),d=t(o.flex,o.initialFlex),g=t(o.rowGroupIndex,o.initialRowGroupIndex),u=t(o.rowGroup,o.initialRowGroup);g==null&&!u&&(g=null,u=null);let h=t(o.pivotIndex,o.initialPivotIndex),p=t(o.pivot,o.initialPivot);h==null&&!p&&(h=null,p=null);let f=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:r,sortType:a,sortIndex:n,hide:s,pinned:l,width:c,flex:d,rowGroup:u,rowGroupIndex:g,pivot:p,pivotIndex:h,aggFunc:f}}function AC(e,t,o){if(!e.applyOrder||!e.state)return;let i=[];for(let r of e.state)r.colId!=null&&i.push(r.colId);zC(t.cols,i,t,o)}function zC(e,t,o,i){if(e==null)return;let r=[],a={};for(let s of t){if(a[s])continue;let l=e.map[s];l&&(r.push(l),a[s]=!0)}let n=0;for(let s of e.list){let l=s.getColId();if(a[l]!=null)continue;l.startsWith(kr)?r.splice(n++,0,s):r.push(s)}if(r=Ld(r,i),!Od(r,o.getColTree())){k(39);return}e.list=r}function LC(e,t,o,i,r){let a={};for(let d of t)a[d.colId]=d;let n={};for(let d of e)a[d.colId]&&(n[d.colId]=!0);let s=e.filter(d=>n[d.colId]),l=t.filter(d=>n[d.colId]),c=[];l.forEach((d,g)=>{let u=s==null?void 0:s[g];if(u&&u.colId!==d.colId){let h=i.getCol(u.colId);h&&c.push(h)}}),c.length&&r.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:o})}var ol=(e,t,o,i)=>{let r=e[o.getId()],a=e[i.getId()],n=r!=null,s=a!=null;if(n&&s)return r-a;if(n)return-1;if(s)return 1;let l=t.indexOf(o),c=t.indexOf(i),d=l>=0,g=c>=0;return d&&g?l-c:d?-1:1},OC=class extends S{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(ko(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),ko(e.source)))}createColsFromColDefs(e){var C,w,y;let{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:r,pivotColsSvc:a,valueColsSvc:n,visibleCols:s,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?Gd(t,e):void 0;o==null||o.expire();let g=(C=this.colDefCols)==null?void 0:C.list,u=(w=this.colDefCols)==null?void 0:w.tree,h=Kh(t,this.colDefs,!0,u,e);rr(t,(y=this.colDefCols)==null?void 0:y.tree,h.columnTree);let p=h.columnTree,f=h.treeDepth,m=Gc(p),v={};for(let x of m)v[x.getId()]=x;this.colDefCols={tree:p,treeDepth:f,list:m,map:v},this.createColumnsForService([c],this.colDefCols,e),r==null||r.extractCols(e,g),a==null||a.extractCols(e,g),n==null||n.extractCols(e,g),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,s.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var m;if(!this.colDefCols)return;let o=(m=this.cols)==null?void 0:m.tree;this.saveColOrder();let{autoColSvc:i,selectionColSvc:r,rowNumbersSvc:a,quickFilter:n,pivotResultCols:s,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:g,eventSvc:u,formula:h}=this.beans,p=this.selectCols(s,this.colDefCols);h==null||h.setFormulasActive(p),this.createColumnsForService([i,r,a],p,t);let f=xh(this.gos,this.showingPivotResult);(!e||f)&&this.restoreColOrder(p),this.positionLockedCols(p),l==null||l.refresh(),n==null||n.refreshCols(),this.setColSpanActive(),c==null||c.setAutoHeightActive(p),d.clear(),g.clear(),It(o,this.cols.tree)||u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,o){for(let i of e)i&&(i.createColumns(t,r=>{this.lastOrder=r(this.lastOrder),this.lastPivotOrder=r(this.lastPivotOrder)},o),i.addColumns(t))}selectCols(e,t){var s;let o=(s=e==null?void 0:e.getPivotResultCols())!=null?s:null;this.showingPivotResult=o!=null;let{map:i,list:r,tree:a,treeDepth:n}=o!=null?o:t;return this.cols={list:r.slice(),map:{...i},tree:a.slice(),treeDepth:n},o&&(o.list.some(c=>{var d;return((d=this.cols)==null?void 0:d.map[c.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];let{beans:e,showingPivotResult:t,cols:o}=this,{valueColsSvc:i,selectionColSvc:r,gos:a}=e,n=this.isPivotMode()&&!t,s=r==null?void 0:r.isSelectionColumnEnabled(),l=kh(e),c=i==null?void 0:i.columns,d=Fh(a);return o.list.filter(u=>{let h=xn(u);return n?(c==null?void 0:c.includes(u))||h&&(!d||u.isVisible())||s&&At(u)||l&&pe(u):h&&!d||u.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){Ve(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){let t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;let o=t.filter(g=>e.map[g.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}let i=g=>{let u=g.getOriginalParent();return u?u.getChildren().length>1?!0:i(u):!1};if(!o.some(g=>i(g))){let g=new Set(o);for(let u of e.list)g.has(u)||o.push(u);e.list=o;return}let r=new Map;for(let g=0;g!r.has(g));if(a.length===0){e.list=o;return}let n=(g,u)=>{let h=u?u.getOriginalParent():g.getOriginalParent();if(!h)return null;let p=null,f=null;for(let m of h.getChildren())if(!(m===u||m===g)){if(m instanceof ao){let v=r.get(m);if(v==null)continue;(p==null||p{let C=r.get(v);C!=null&&(p==null||p=0;g--)c[d--]=s[g];for(let g=o.length-1;g>=0;g--){let u=o[g],h=l.get(u);if(h)if(Array.isArray(h))for(let p=h.length-1;p>=0;p--){let f=h[p];c[d--]=f}else c[d--]=h;c[d--]=u}e.list=c}positionLockedCols(e){e.list=Ld(e.list,this.gos)}saveColOrder(){var e,t,o,i;this.showingPivotResult?this.lastPivotOrder=(t=(e=this.cols)==null?void 0:e.list)!=null?t:null:this.lastOrder=(i=(o=this.cols)==null?void 0:o.list)!=null?i:null}getColumnDefs(e){var t,o,i;return this.colDefCols&&((i=this.beans.colDefFactory)==null?void 0:i.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,(o=(t=this.cols)==null?void 0:t.list)!=null?o:[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);let{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;let e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var o;if(!this.cols)return;(o=this.beans.autoColSvc)==null||o.updateColumns(e);let t=ko(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;rr(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e,t;return(t=(e=this.cols)==null?void 0:e.tree)!=null?t:[]}getColDefColTree(){var e,t;return(t=(e=this.colDefCols)==null?void 0:e.tree)!=null?t:[]}getColDefCols(){var e,t;return(t=(e=this.colDefCols)==null?void 0:e.list)!=null?t:null}getCols(){var e,t;return(t=(e=this.cols)==null?void 0:e.list)!=null?t:[]}forAllCols(e){var a,n,s,l,c;let{pivotResultCols:t,autoColSvc:o,selectionColSvc:i,groupHierarchyColSvc:r}=this.beans;Bo((a=this.colDefCols)==null?void 0:a.list,e)||Bo((n=o==null?void 0:o.columns)==null?void 0:n.list,e)||Bo((s=i==null?void 0:i.columns)==null?void 0:s.list,e)||Bo((l=r==null?void 0:r.columns)==null?void 0:l.list,e)||Bo((c=t==null?void 0:t.getPivotResultCols())==null?void 0:c.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t,o;return(o=(t=this.cols)==null?void 0:t.map[e])!=null?o:null}getColFromCollection(e,t){var s,l,c;if(t==null)return null;let{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let d=0;de(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Ze(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 VC(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 Gt=class extends qd{constructor(e,t,o="text",i="input"){var r;super(e,(r=e==null?void 0:e.template)!=null?r:VC(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=E,this.eWrapper=E,this.eInput=E}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);let{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCss("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;let{inputName:r,inputWidth:a,inputPlaceholder:n,autoComplete:s,tabIndex:l}=this.config;r!=null&&this.setInputName(r),a!=null&&this.setInputWidth(a),n!=null&&this.setInputPlaceholder(n),s!=null&&this.setAutoComplete(s),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,we(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return Zi(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){let t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return we(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Fo(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ai(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)we(this.eInput,"autocomplete",null);else{let t=typeof e=="string"?e:"off";we(this.eInput,"autocomplete",t)}return this}},Vn=class extends Gt{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();let{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;let e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){let 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;let 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});let i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;let t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){let t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Nn={selector:"AG-CHECKBOX",component:Vn},NC=".ag-checkbox-cell{height:100%}",GC={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},WC=class extends _{constructor(){super(GC,[Nn]),this.eCheckbox=E,this.registerCSS(NC)}init(e){this.refresh(e);let{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),ic(i,"polite"),this.addManagedListeners(i,{click:r=>{if(Xt(r),t.isDisabled())return;let a=t.getValue();this.onCheckboxChanged(a)},dblclick:r=>{Xt(r)}}),this.addManagedElementListeners(e.eGridCell,{keydown:r=>{if(r.key===b.SPACE&&!t.isDisabled()){e.eGridCell===Y(o)&&t.toggle();let a=t.getValue();this.onCheckboxChanged(a),r.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var g;let t,o=!0,{value:i,column:r,node:a}=e;if(a.group&&r)if(typeof i=="boolean")t=i;else{let u=r.getColId();u.startsWith(kr)?t=i==null||i===""?void 0:i==="true":a.aggData&&a.aggData[u]!==void 0||a.sourceRowIndex>=0?t=i!=null?i:void 0:o=!1}else t=i!=null?i:void 0;let{eCheckbox:n}=this;if(!o){n.setDisplayed(!1);return}n.setValue(t);let s=(g=e.disabled)!=null?g:!(r!=null&&r.isCellEditable(a));n.setDisabled(s);let l=this.getLocaleTextFunc(),c=yr(l,t),d=s?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;n.setInputAriaLabel(d)}onCheckboxChanged(e){let{params:t}=this,{column:o,node:i,value:r}=t,{editSvc:a}=this.beans;if(!o)return;let n={rowNode:i,column:o};a==null||a.dispatchCellEvent(n,null,"cellEditingStarted",{value:r});let s=i.setDataValue(o,e,"ui");a==null||a.dispatchCellEvent(n,null,"cellEditingStopped",{oldValue:r,newValue:e,valueChanged:s}),s||this.updateCheckbox(t)}},qC={tag:"div",cls:"ag-skeleton-container"},_C=class extends _{constructor(){super(qC)}init(e){let t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>ii(e.eParentOfValue)),ii(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){let e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");let t=e("ariaSkeletonCellLoadingFailed","Row failed to load");Fo(this.getGui(),t)}setupLoading(e){let t=oe({tag:"div",cls:"ag-skeleton-effect"}),o=e.node.rowIndex;if(o!=null){let a=75+25*(o%2===0?Math.sin(o):Math.cos(o));t.style.width=`${a}%`}this.getGui().appendChild(t);let i=this.getLocaleTextFunc(),r=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");Fo(this.getGui(),r)}refresh(e){return!1}},UC={moduleName:"CheckboxCellRenderer",version:D,userComponents:{agCheckboxCellRenderer:WC}},jC={moduleName:"SkeletonCellRenderer",version:D,userComponents:{agSkeletonCellRenderer:_C}};function KC(e,t){let o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function $C(e){return e.colModel.getColumnDefs(!0)}function YC(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function QC(e,t){return e.colModel.getColDefCol(t)}function ZC(e){return e.colModel.getColDefCols()}function JC(e,t){return Ve(e,t,"api")}function XC(e){return ur(e)}function ew(e){TC(e,"api")}function tw(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function ow(e){return e.visibleCols.isPinningLeft()}function iw(e){return e.visibleCols.isPinningRight()}function rw(e,t){return e.visibleCols.getColAfter(t)}function aw(e,t){return e.visibleCols.getColBefore(t)}function nw(e,t,o){e.colModel.setColsVisible(t,o,"api")}function sw(e,t,o){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,o,"api")}function lw(e){return e.colModel.getCols()}function cw(e){return e.visibleCols.leftCols}function dw(e){return e.visibleCols.centerCols}function gw(e){return e.visibleCols.rightCols}function uw(e){return e.visibleCols.allCols}function hw(e){return e.colViewport.getViewportColumns()}function Ga(e,t){if(!e)return;let o=e,i={};for(let r of Object.keys(o)){if(t&&t.indexOf(r)>=0||vc.has(r))continue;let a=o[r];typeof a=="object"&&a!==null&&a.constructor===Object?i[r]=Ga(a):i[r]=a}return i}var pw=class extends S{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i,r=!1){var l,c;let a=e.slice();t?a.sort((d,g)=>o.indexOf(d)-o.indexOf(g)):(o||r)&&a.sort((d,g)=>i.indexOf(d)-i.indexOf(g));let n=(l=this.rowGroupColsSvc)==null?void 0:l.columns,s=(c=this.pivotColsSvc)==null?void 0:c.columns;return this.buildColumnDefs(a,n,s)}buildColumnDefs(e,t=[],o=[]){let i=[],r={};for(let a of e){let n=this.createDefFromColumn(a,t,o),s=!0,l=n,c=a.getOriginalParent(),d=null;for(;c;){let g=null;if(c.isPadding()){c=c.getOriginalParent();continue}let u=r[c.getGroupId()];if(u){u.children.push(l),s=!1;break}if(g=this.createDefFromGroup(c),g&&(g.children=[l],r[g.groupId]=g,l=g,c=c.getOriginalParent()),c!=null&&d===c){s=!1;break}d=c}s&&i.push(l)}return i}createDefFromGroup(e){let t=Ga(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){let i=Ga(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSortDef(),i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},fw=class extends S{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){var f;let t=(f=e.source)!=null?f:"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);let o=this.flexViewportWidth,{visibleCols:i,colDelayRenderSvc:r}=this.beans,a=i.centerCols,n=-1;if(e.resizingCols){let m=new Set(e.resizingCols);for(let v=a.length-1;v>=0;v--)if(m.has(a[v])){n=v;break}}let s=!1,l=a.map((m,v)=>{let C=m.getFlex(),w=C!=null&&C>0&&v>n;return s||(s=w),{col:m,isFlex:w,flex:Math.max(0,C!=null?C:0),initialSize:m.getActualWidth(),min:m.getMinWidth(),max:m.getMaxWidth(),targetSize:0}});if(s?(r==null||r.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(r),!o||!s)return[];let c=l.length,d=l.reduce((m,v)=>m+v.flex,0),g=o,u=(m,v)=>{m.frozenSize=v,m.col.setActualWidth(v,t),g-=v,d-=m.flex,c-=1},h=m=>m.frozenSize!=null;for(let m of l)m.isFlex||u(m,m.initialSize);for(;c>0;){let m=Math.round(d<1?g*d:g),v,C=0,w=0;for(let R of l){if(h(R))continue;v=R,w+=m*(R.flex/d);let F=w-C,P=Math.round(F);R.targetSize=P,C+=P}v&&(v.targetSize+=m-C);let y=0;for(let R of l){if(h(R))continue;let F=R.targetSize,P=Math.min(Math.max(F,R.min),R.max);y+=P-F,R.violationType=P===F?void 0:P0?"min":"max";for(let R of l)h(R)||(x==="all"||R.violationType===x)&&u(R,R.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();let p=l.filter(m=>m.isFlex&&!m.violationType).map(m=>m.col);if(e.fireResizedEvent){let m=l.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),v=l.filter(C=>C.flex).map(C=>C.col);Io(this.eventSvc,m,!0,t,v)}return this.revealColumns(r),p}revealColumns(e){this.columnsHidden&&(e==null||e.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){let{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?t:null,e.dispatchStateUpdatedEvent("flex")}},Se=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}},Gn="T",mw=new RegExp(`[${Gn} ]`),vw=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${Gn}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ye(e,t){return e.toString().padStart(t,"0")}function fe(e,t=!0,o=Gn){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(r=>Ye(r,2)).join("-");return t&&(i+=o+[e.getHours(),e.getMinutes(),e.getSeconds()].map(r=>Ye(r,2)).join(":")),i}function Ti(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ye(e.getDate(),2),Ye(e.getHours(),2),`:${Ye(e.getMinutes(),2)}`,`:${Ye(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ye(e.getDate(),2)].map(String):null}var ga=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"},il=["January","February","March","April","May","June","July","August","September","October","November","December"],ua=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Cw(e,t){if(t==null)return fe(e,!1);let o=Ye(e.getFullYear(),4),i={YYYY:()=>o.slice(o.length-4,o.length),YY:()=>o.slice(o.length-2,o.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>il[e.getMonth()],MMM:()=>il[e.getMonth()].slice(0,3),MM:()=>Ye(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${ga(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${ga(e.getDate())}`,DD:()=>Ye(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>ua[e.getDay()],ddd:()=>ua[e.getDay()].slice(0,3),dd:()=>ua[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${ga(e.getDay())}`,d:()=>`${e.getDay()}`},r=new RegExp(Object.keys(i).join("|"),"g");return t.replace(r,a=>a in i?i[a]():a)}function Ui(e,t=!1){return!!me(e,t)}function ww(e){return Ui(e,!0)}function me(e,t=!1,o){if(!e||!o&&!vw.test(e))return null;let[i,r]=e.split(mw);if(!i)return null;let a=i.split("-").map(h=>Number.parseInt(h,10));if(a.filter(h=>!isNaN(h)).length!==3)return null;let[n,s,l]=a,c=new Date(n,s-1,l);if(c.getFullYear()!==n||c.getMonth()!==s-1||c.getDate()!==l||!r&&t)return null;if(!r||r==="00:00:00")return c;let[d,g,u]=r.split(":").map(h=>Number.parseInt(h,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(g>=0&&g<60)c.setMinutes(g);else if(t)return null;if(u>=0&&u<60)c.setSeconds(u);else if(t)return null;return c}function Xo(e,t,o){if(!t||!e)return;if(!o)return e[t];let i=t.split("."),r=e;for(let a=0;anull,suppressKeyboardEvent:({node:e,event:t,column:o})=>t.key===b.SPACE&&o.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:o}){return{cellEditorParams:{useFormatter:!0},comparator:(i,r)=>{let a=t.getColDefCol(o),n=a==null?void 0:a.getColDef();if(!a||!n)return 0;let s=i==null?"":e({column:a,node:null,value:i}),l=r==null?"":e({column:a,node:null,value:r});return s===l?0:s>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(){var d;let e=this.getDefaultDataTypes(),t={},o={},i=g=>u=>{let{column:h,node:p,value:f}=u,m=h.getColDef().valueFormatter;return m===g.groupSafeValueFormatter&&(m=g.valueFormatter),this.beans.valueSvc.formatValue(h,p,f,m)};for(let g of Object.keys(e)){let u=e[g],h={...u,groupSafeValueFormatter:nl(u,this.gos)};t[g]=h,o[g]=i(h)}let r=(d=this.gos.get("dataTypeDefinitions"))!=null?d:{},a={};for(let g of Object.keys(r)){let u=r[g],h=this.processDataTypeDefinition(u,r,[g],e);h&&(t[g]=h,u.dataTypeMatcher&&(a[g]=u.dataTypeMatcher),o[g]=i(h))}let{valueParser:n,valueFormatter:s}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==n,this.hasObjectValueFormatter=c!==s,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(a,e)}sortKeysInMatchers(e,t){var i;let o={...e};for(let r of bw)delete o[r],o[r]=(i=e[r])!=null?i:t[r].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,i){let r,a=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=i[a],s=t[a];if(n&&s&&(n=s),!al(e,n,a))return;r=rl(n,e)}else{if(o.includes(a)){k(44);return}let n=t[a];if(!al(e,n,a))return;let s=this.processDataTypeDefinition(n,t,[...o,a],i);if(!s)return;r=rl(s,e)}return{...r,groupSafeValueFormatter:nl(r,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;i===void 0&&(i=e.cellDataType);let{field:r}=t;if((i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(r,o):!1),this.addFormulaCellEditorToColDef(e,t),!i){e.cellDataType=!1;return}let a=this.dataTypeDefinitions[i];if(!a){k(47,{cellDataType:i});return}return e.cellDataType=i,a.groupSafeValueFormatter&&(e.valueFormatter=a.groupSafeValueFormatter),a.valueParser&&(e.valueParser=a.valueParser),a.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,a,o),a.columnTypes}addFormulaCellEditorToColDef(e,t){var i;!((i=t.allowFormula)!=null?i:e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){var a;let{gos:o}=this;if(!ee(o))return!1;let i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(ha(t,i))return!1;let r=t.type===null?e.type:t.type;if(r){let n=(a=o.get("columnTypes"))!=null?a:{};if(ar(r).some(l=>{let c=n[l.trim()];return c&&ha(c,i)}))return!1}return!ha(e,i)}inferCellDataType(e,t){if(!e)return;let o,i=this.getInitialData();if(i){let a=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");o=Xo(i,e,a)}else this.initWaitForRowData(t);if(o==null)return;let r=Object.keys(this.dataTypeMatchers).find(a=>this.dataTypeMatchers[a](o));return r!=null?r:"object"}getInitialData(){var t;let e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{let o=(t=this.beans.rowModel.rootNode)==null?void 0:t._leafs;if(o!=null&&o.length)return o[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;let t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);let[r]=this.addManagedEventListeners({rowDataUpdateStarted:a=>{let{firstRowData:n}=a;n&&(r==null||r(),this.isPendingInference=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&(o==null||o.processResizeOperations()),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;let o=[];this.destroyColumnStateUpdateListeners();let i={},r={};for(let a of Object.keys(this.columnStateUpdatesPendingInference)){let n=this.columnStateUpdatesPendingInference[a],s=this.colModel.getCol(a);if(!s)continue;let l=s.getColDef();if(!this.resetColDefIntoCol(s,"cellDataTypeInferred"))continue;let c=s.getColDef();if(t&&c.type&&c.type!==l.type){let d=Fw(s,n);d.rowGroup&&d.rowGroupIndex==null&&(i[a]=d),d.pivot&&d.pivotIndex==null&&(r[a]=d),o.push(d)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,r)),o.length&&Ve(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){let o={},{rowGroupColsSvc:i,pivotColsSvc:r}=this.beans;return i==null||i.restoreColumnOrder(o,e),r==null||r.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){let o=e.getUserProvidedColDef();if(!o)return!1;let i=Pa(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}getDateStringTypeDefinition(e){var o;let{dateString:t}=this.dataTypeDefinitions;return e&&(o=this.getDataTypeDefinition(e))!=null?o:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){let t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i,r;if(t==null)return!0;let o=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return!o||e.getColDef().allowFormula&&((r=this.beans.formula)!=null&&r.isFormula(t))?!0:o(t)}validateColDef(e,t,o,i){if(e.cellDataType==="object"){let r=l=>(l==null?void 0:l.cellDataType)==null||(l==null?void 0:l.cellDataType)===!0,a=r(t)&&r(o),n=l=>k(48,{property:l,inferred:a,colId:i}),{object:s}=this.dataTypeDefinitions;e.valueFormatter===s.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&n("Formatter"),e.editable&&e.valueParser===s.valueParser&&!this.hasObjectValueParser&&n("Parser")}}postProcess(e){var n;let t=e.cellDataType;if(!t||typeof t!="string")return;let{dataTypeDefinitions:o,beans:i,formatValueFuncs:r}=this,a=o[t];a&&((n=i.colFilter)==null||n.setColDefPropsForDataType(e,a,r[t]))}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){let r=this.formatValueFuncs[t],a=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:r,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&a.cellEditor!==e.cellEditor&&(a.cellEditor=e.cellEditor),Object.assign(e,a)}getDateObjectTypeDef(e){let t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>me(i.newValue&&String(i.newValue)),valueFormatter:i=>{var r;return i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):(r=fe(i.value,o))!=null?r:""},dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){let t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>{var i;return(i=me(o))!=null?i:void 0},dateFormatter:o=>{var i;return(i=fe(o!=null?o:null,t))!=null?i:void 0},valueParser:o=>Ui(String(o.newValue))?o.newValue:null,valueFormatter:o=>Ui(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&Ui(o)}}getDefaultDataTypes(){let e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var o,i;return((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?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=>{let{newValue:o}=t;return o==null||typeof o=="string"&&o.trim()===""?null:Se(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:Sa(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>{var o,i;return t.newValue==null?t.newValue:((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?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"&&ww(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>{var o;return(o=Sa(t.value))!=null?o:""}}}}destroyColumnStateUpdateListeners(){for(let e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function rl(e,t){let o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...ar(e.columnTypes),...ar(t.columnTypes)]),o}function al(e,t,o){return t?t.baseDataType!==e.baseDataType?(k(46),!1):!0:(k(45,{parentCellDataType:o}),!1)}var Sw=e=>typeof e=="bigint"||typeof e=="number",xw=e=>e==="number"||e==="bigint";function nl(e,t){if(e.valueFormatter)return o=>{var s,l;let{node:i,colDef:r,column:a,value:n}=o;if(i!=null&&i.group){let c=((s=r.pivotValueColumn)!=null?s:a).getAggFunc();if(c){if(c==="first"||c==="last")return e.valueFormatter(o);let{baseDataType:d}=e;if(xw(d)&&c!=="count"){if(Sw(n))return e.valueFormatter(o);if(n==null)return;if(typeof n=="object"){if(typeof n.toNumber=="function")return e.valueFormatter({...o,value:n.toNumber()});if("value"in n)return e.valueFormatter({...o,value:n.value})}}return}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!((l=e.dataTypeMatcher)!=null&&l.call(e,o.value)))return;return e.valueFormatter(o)}}function kw(e,t,o,i){if(!t[o])return!1;let r=e[o];return r===null?(t[o]=!1,!1):i===void 0?!!r:r===i}function Rw(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;let o=Se(e),i=Se(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:0}function Ew(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;let o=sl(e),i=sl(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:0}function sl(e){let t=Se(e);return t==null?null:tkw(e,t,o,i))}function Fw(e,t){let o=Wd(e);for(let i of t)delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex;return o}var Dw={moduleName:"DataType",version:D,beans:[yw],dependsOn:[UC]},Mw={moduleName:"ColumnFlex",version:D,beans:[fw]},_d={moduleName:"ColumnApi",version:D,beans:[pw],apiFunctions:{getColumnDef:KC,getDisplayNameForColumn:YC,getColumn:QC,getColumns:ZC,applyColumnState:JC,getColumnState:XC,resetColumnState:ew,isPinning:tw,isPinningLeft:ow,isPinningRight:iw,getDisplayedColAfter:rw,getDisplayedColBefore:aw,setColumnsVisible:nw,setColumnsPinned:sw,getAllGridColumns:lw,getDisplayedLeftColumns:cw,getDisplayedCenterColumns:dw,getDisplayedRightColumns:gw,getAllDisplayedColumns:uw,getAllDisplayedVirtualColumns:hw,getColumnDefs:$C}},Pw=class extends S{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;let i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:r}=this.beans;return o&&r?r.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){let i=t==null?void 0:t.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,r){var n,s;let a=e.headerValueGetter;if(a){let l=O(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:r});return typeof a=="function"?a(l):typeof a=="string"?(s=(n=this.beans.expressionSvc)==null?void 0:n.evaluate(a,l))!=null?s:null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return Cu(e.field)}return""}},Iw=class extends S{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){let{visibleCols:i}=this,r=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!r)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){let n=i.bodyWidth;this.viewportLeft=n-t-e,this.viewportRight=n-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!=null?o:[]}extractViewportColumns(){let 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()||Tw(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,r=this.viewportRight+200,a=tr&&o>r;return!a&&!n}getViewportColumns(){let{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;let t=a=>{let n=a.getLeft();return M(n)&&n>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,r=i.centerCols;return i.getColsForRow(e,r,o,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){let{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;let o=i=>{var n;let r=new Set,a={};for(let s of i){let l=s.getParent(),c=s.isSpanHeaderHeight();for(;l&&!r.has(l);){if(c&&l.isPadding()){l=l.getParent();continue}let g=l.getProvidedColumnGroup().getLevel();(n=a[g])!=null||(a[g]=[]),a[g].push(l),r.add(l),l=l.getParent()}}return a};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}extractViewport(){let e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();let t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function Tw(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var Aw=class extends S{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(r){let a=t(r),n=typeof a;if(n==="string"||n==="number"||n==="boolean"){this.eGui=hn(""+a+"");return}if(a==null){this.eGui=oe({tag:"span"});return}this.eGui=a}}return o}},zw={moduleName:"CellRendererFunction",version:D,beans:[Aw]},Lw=class extends ve{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){var t;if(e){(t=this.dynamicBeans)!=null||(this.dynamicBeans={});for(let o of Object.keys(e))this.dynamicBeans[o]=e[o]}}createDynamicBean(e,t,...o){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));let i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new i(...o)}};function Ow(e){return typeof e=="object"&&!!e.getComp}var Hw=class extends Lw{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){let e=this.gos.get("components");if(e!=null)for(let t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){let{icons:t,userComponents:o,dynamicBeans:i,selectors:r}=e;if(o){let a=(n,s,l,c)=>{this.agGridDefaults[n]=s,(l||c)&&(this.agGridDefaultOverrides[n]={params:l,processParams:c})};for(let n of Object.keys(o)){let s=o[n];if(Ow(s)&&(s=s.getComp(this.beans)),typeof s=="object"){let{classImp:l,params:c,processParams:d}=s;a(n,l,c,d)}else a(n,s)}}this.registerDynamicBeans(i);for(let a of r!=null?r:[])this.selectors[a.selector]=a;if(t)for(let a of Object.keys(t))this.icons[a]=t[a]}getUserComponent(e,t){var s;let o=(l,c,d,g)=>({componentFromFramework:c,component:l,params:d,processParams:g}),{frameworkOverrides:i}=this.beans,r=i.frameworkComponent(t,this.gos.get("components"));if(r!=null)return o(r,!0);let a=this.jsComps[t];if(a){let l=i.isFrameworkComponent(a);return o(a,l)}let n=this.agGridDefaults[t];if(n){let l=this.agGridDefaultOverrides[t];return o(n,!1,l==null?void 0:l.params,l==null?void 0:l.processParams)}return(s=this.beans.validation)==null||s.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){var o,i;return t?Je(279,{name:e}):(i=(o=this.beans.validation)==null?void 0:o.missingDynamicBean(e))!=null?i:Je(256)}},Bw=23,Vw=class extends S{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){var e,t,o;this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(let i of this.readyCallbacks)i(this.params);this.readyCallbacks.length=0}},(o=(t=(e=this.beans.frameworkOverrides).runWhenReadyAsync)==null?void 0:t.call(e))!=null?o:!1)}updateReady(){let e=Object.values(this.params);this.ready=e.length===Bw&&e.every(t=>{var o;return(o=t==null?void 0:t.isAlive())!=null?o:!1})}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{let 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(){let{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){let t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},Nw=':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}',Xl,ec,Wn=typeof window!="object"||!((ec=(Xl=window==null?void 0:window.document)==null?void 0:Xl.fonts)!=null&&ec.forEach),hr=!1,eo=(e,t,o,i,r,a,n=!1)=>{if(Wn||hr)return;let s=e;i&&(s=`@layer ${CSS.escape(i).replaceAll("\\.",".")} { ${e} }`);let l=Qe.map.get(t);if(l||(l=[],Qe.map.set(t,l)),l.some(u=>u.injectedCss===s))return;let c=document.createElement("style");a&&c.setAttribute("nonce",a),c.dataset.agCss=o,c.dataset.agCssVersion=D,c.textContent=s;let d={rawCss:e,injectedCss:s,el:c,priority:r,isParams:n},g;for(let u of l){if(u.priority>r)break;g=u}if(g){g.el.after(c);let u=l.indexOf(g);l.splice(u+1,0,d)}else t.nodeName==="STYLE"?t.after(c):t.insertBefore(c,t.querySelector(":not(title, meta)")),l.push(d)},Ud=(e,t,o,i)=>{eo(Nw,e,"shared",t,0,o),i==null||i.forEach((r,a)=>r.forEach(n=>eo(n,e,a,t,0,o)))},Gw=(e,t,o,i,r,a)=>{if(Wn||hr)return;let n=Qe.grids.get(e);n?n.paramsCss=t:Qe.grids.set(e,{styleContainer:i,paramsCss:t}),Wa(i),t&&o&&eo(t,i,o,r,2,a,!0)},Ww=e=>{var i;let t=(i=Qe.grids.get(e))==null?void 0:i.styleContainer;if(!t)return;Qe.grids.delete(e),Array.from(Qe.grids.values()).some(r=>r.styleContainer===t)?Wa(t):(Wa(t,!0),Qe.map.delete(t))},Wa=(e,t=!1)=>{var r;let o=new Set;for(let a of Qe.grids.values())a.styleContainer===e&&o.add(a.paramsCss);let i=(r=Qe.map.get(e))!=null?r:[];for(let a=i.length-1;a>=0;a--)(t||i[a].isParams&&!o.has(i[a].rawCss))&&(i[a].el.remove(),i.splice(a,1))},jd=()=>{var o;let e=(o=globalThis.agStyleInjectionVersions)!=null?o:globalThis.agStyleInjectionVersions=new Map,t=e.get(D);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(D,t)),t},Qe=jd(),Ne=e=>new Kd(e),wt="$default",qw=0,Kd=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:r}){var a;this.feature=e,this.css=i,this.cssImports=r,this.modeParams={[wt]:{...(a=o[wt])!=null?a:{},...t!=null?t:{}},...o}}use(e,t,o){var r,a;let i=this._inject;if(i==null){let{css:n}=this;if(n){let s=`ag-theme-${(r=this.feature)!=null?r:"part"}-${++qw}`;typeof n=="function"&&(n=n()),n=`:where(.${s}) { +var IotdoorPortfolio=(()=>{var Gr=Object.defineProperty;var uu=Object.getOwnPropertyDescriptor;var hu=Object.getOwnPropertyNames;var pu=Object.prototype.hasOwnProperty;var fu=(e,t)=>{for(var o in t)Gr(e,o,{get:t[o],enumerable:!0})},mu=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of hu(t))!pu.call(e,r)&&r!==o&&Gr(e,r,{get:()=>t[r],enumerable:!(i=uu(t,r))||i.enumerable});return e};var vu=e=>mu(Gr({},"__esModule",{value:!0}),e);var nF={};fu(nF,{initPortfolioImageZoom:()=>gu,initPortfolioListPanel:()=>du});function U(e){if(e!=null&&e.length)return e[e.length-1]}function Tt(e,t,o){if(e===t)return!0;if(!e||!t)return e==null&&t==null;let i=e.length;if(i!==t.length)return!1;for(let r=0;r=0&&e.splice(o,1)}function Cu(e,t){let o=0,i=0;for(;o=0;i--)e.splice(o,0,t[i])}var lt=e=>e==null||e===""?null:e;function I(e){return e!=null&&e!==""}function Q(e){return!I(e)}var xa=e=>e!=null&&typeof e.toString=="function"?e.toString():null,ii=(e,t)=>{let o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i},wu=(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{let c=i?()=>i.wrapIncoming(l):l;t?this.dispatchAsync(c):c()},a=this.getListeners(o,t,!1);if(((s=a==null?void 0:a.size)!=null?s:0)>0){let l=new Set(a);for(let c of l)a!=null&&a.has(c)&&r(()=>c(e))}let n=this.getGlobalListeners(t);if(n.size>0){let l=new Set(n);for(let c of l)r(()=>c(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},o=this.frameworkOverrides;o?o.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(let t of e)t()}},bu=/[&<>"']/g,yu={"&":"&","<":"<",">":">",'"':""","'":"'"};function Lo(e){var t;return(t=e==null?void 0:e.toString().toString())!=null?t:null}function $o(e){var t,o;return(o=(t=Lo(e))==null?void 0:t.replace(bu,i=>yu[i]))!=null?o:null}function bs(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function Su(e){if(!e||e==null)return null;let 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(r=>r.substring(0,1).toUpperCase()+(r.length>1?r.substring(1,r.length):"")).join(" ")}function je(e){return e.eRootDiv.getRootNode()}function Y(e){return je(e).activeElement}function te(e){let{gos:t,eRootDiv:o}=e,i=null,r=t.get("getDocument");return r&&I(r)?i=r():o&&(i=o.ownerDocument),i&&I(i)?i:document}function cn(e){let t=Y(e);return t===null||t===te(e).body}function dn(e){return te(e).defaultView||window}function gn(e){let t=null,o=null;try{t=te(e).fullscreenElement}catch{}finally{t||(t=je(e));let i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t==null?void 0:t.documentElement:o=t}return o}function xu(e){var o;let t=gn(e);return(o=t==null?void 0:t.clientWidth)!=null?o:window.innerWidth||-1}function ku(e){var o;let t=gn(e);return(o=t==null?void 0:t.clientHeight)!=null?o:window.innerHeight||-1}function We(e,t,o){o==null||typeof o=="string"&&o==""?oc(e,t):Te(e,t,o)}function Te(e,t,o){e.setAttribute(ic(t),o.toString())}function oc(e,t){e.removeAttribute(ic(t))}function ic(e){return`aria-${e}`}function Et(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Ru(e){let t=e==null?void 0:e.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function Eu(e){return e.getAttribute("aria-label")}function Do(e,t){We(e,"label",t)}function ri(e,t){We(e,"labelledby",t)}function rc(e,t){We(e,"live",t)}function Fu(e,t){We(e,"atomic",t)}function Du(e,t){We(e,"relevant",t)}function un(e,t){We(e,"invalid",t)}function Mu(e,t){We(e,"disabled",t)}function ac(e,t){We(e,"hidden",t)}function ka(e,t){Te(e,"expanded",t)}function Pu(e,t){Te(e,"setsize",t)}function Iu(e,t){Te(e,"posinset",t)}function Tu(e,t){Te(e,"multiselectable",t)}function Au(e,t){Te(e,"rowcount",t)}function ai(e,t){Te(e,"rowindex",t)}function zu(e,t){Te(e,"rowspan",t)}function Lu(e,t){Te(e,"colcount",t)}function nc(e,t){Te(e,"colindex",t)}function Ou(e,t){Te(e,"colspan",t)}function Hu(e,t){Te(e,"sort",t)}function Bu(e){oc(e,"sort")}function sc(e,t){We(e,"selected",t)}function Nu(e,t){We(e,"controls",t)}function Vu(e,t){Nu(e,t.id),ri(t,e.id)}function ys(e,t){We(e,"owns",t)}function Sr(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Gu="[tabindex], input, select, button, textarea, [href]",lc="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Yo(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(lc)?!1:Ie(e)}function q(e,t,o={}){let{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||ac(e,!t)}function Wu(e,t,o={}){let{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||ac(e,!t)}function ni(e,t){var a;let o="disabled",i=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);i(e);let r=(a=e.querySelectorAll("input"))!=null?a:[];for(let n of r)i(n)}function _t(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function ao(e){let{height:t,width:o,borderTopWidth:i,borderRightWidth:r,borderBottomWidth:a,borderLeftWidth:n,paddingTop:s,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:g,marginRight:u,marginBottom:h,marginLeft:p,boxSizing:f}=window.getComputedStyle(e),m=Number.parseFloat;return{height:m(t||"0"),width:m(o||"0"),borderTopWidth:m(i||"0"),borderRightWidth:m(r||"0"),borderBottomWidth:m(a||"0"),borderLeftWidth:m(n||"0"),paddingTop:m(s||"0"),paddingRight:m(l||"0"),paddingBottom:m(c||"0"),paddingLeft:m(d||"0"),marginTop:m(g||"0"),marginRight:m(u||"0"),marginBottom:m(h||"0"),marginLeft:m(p||"0"),boxSizing:f}}function hn(e){let t=ao(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function si(e){let t=ao(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function cc(e){let{height:t,marginBottom:o,marginTop:i}=ao(e);return Math.floor(t+o+i)}function Yi(e){let{width:t,marginLeft:o,marginRight:i}=ao(e);return Math.floor(t+o+i)}function dc(e){let t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:r,borderBottomWidth:a}=ao(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(r||0),bottom:t.bottom+(a||0)}}function Qi(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function Zi(e,t,o){o&&(t*=-1),e.scrollLeft=t}function ne(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function De(e){e!=null&&e.parentNode&&e.remove()}function gc(e){return!!e.offsetParent}function Ie(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!gc(e)||window.getComputedStyle(e).visibility!=="visible")}function pn(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function uc(e,t,o){o&&o.nextSibling===t||(e.firstChild?o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.prepend(t):e.appendChild(t))}function hc(e,t){for(let o=0;o`-${t.toLocaleLowerCase()}`)}function mi(e,t){if(t)for(let o of Object.keys(t)){let i=t[o];if(!(o!=null&&o.length)||i==null)continue;let r=qu(o),a=i.toString(),n=a.replace(/\s*!important/g,""),s=n.length!=a.length?"important":void 0;e.style.setProperty(r,n,s)}}function li(e){return()=>{let t=e();return t?pc(t)||_u(t):!0}}function pc(e){return e.clientWidtha==null?void 0:a.disconnect()}function pt(e,t){let o=dn(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var fc="data-ref",Vo;function Ss(){return Vo!=null||(Vo=document.createTextNode(" ")),Vo.cloneNode()}function Zt(e){let{attrs:t,children:o,cls:i,ref:r,role:a,tag:n}=e,s=document.createElement(n);if(i&&(s.className=i),r&&s.setAttribute(fc,r),a&&s.setAttribute("role",a),t)for(let l of Object.keys(t))s.setAttribute(l,t[l]);if(o)if(typeof o=="string")s.textContent=o;else{let l=!0;for(let c of o)c&&(typeof c=="string"?(s.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?s.appendChild(c()):(l&&(s.appendChild(Ss()),l=!1),s.append(Zt(c)),s.appendChild(Ss())))}return s}var ju=["touchstart","touchend","touchmove","touchcancel","scroll"],Ku=["wheel"],Wr={},Xi=(()=>{let e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof Wr[o]=="boolean")return Wr[o];let i=document.createElement(e[o]||"div");return o="on"+o,Wr[o]=o in i}})();function $u(e,t){return!t||!e?!1:Qu(t).indexOf(e)>=0}function Yu(e){let t=[],o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Qu(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():Yu(t)}function Zu(e,t,o){let i=Ju(t),r;i!=null&&(r={passive:i}),e.addEventListener(t,o,r)}var Ju=e=>{let t=ju.includes(e),o=Ku.includes(e);if(t)return!0;if(o)return!1};function mc(e,t,o){if(o===0)return!1;let i=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY);return Math.max(i,r)<=o}var vo=(e,t)=>{let o=e.identifier;for(let i=0,r=t.length;i0&&u+e.clientWidth>a+m&&(u=a+m-e.clientWidth),u<0&&(u=0),n>0&&g+e.clientHeight>n+f&&(g=n+f-e.clientHeight),g<0&&(g=0),e.style.left=`${u}px`,e.style.top=`${g}px`}var Hi=(e,...t)=>{for(let o of t){let[i,r,a,n]=o;i.addEventListener(r,a,n),e.push(o)}},vn=e=>{if(e){for(let[t,o,i,r]of e)t.removeEventListener(o,i,r);e.length=0}},St=e=>{e.cancelable&&e.preventDefault()};function eh(e,t){return t}function vc(e){var t;return(t=e==null?void 0:e.getLocaleTextFunc())!=null?t:eh}function th(e,t,o,i){let r=t[o];return e.getLocaleTextFunc()(o,typeof r=="function"?r(i):r,i)}function oh(e){return(t,o,i)=>e({key:t,defaultValue:o,variableValues:i})}function ih(e){return(t,o,i)=>{let r=e==null?void 0:e[t];if(r&&(i!=null&&i.length)){let a=0;for(;!(a>=i.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",i[a++])}return r!=null?r:o}}var ve=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(){let{destroyFunctions:e}=this;for(let t=0;tnull;let i;if(rh(e))e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null);else{let r=ah(e);e instanceof HTMLElement?Zu(e,t,o):r?e.addListener(t,o):e.addEventListener(t,o),i=r?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}setupPropertyListener(e,t){let{gos:o}=this;o.addPropertyEventListener(e,t);let i=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let o=e.join("-")+this.propertyListenerId++,i=r=>{if(r.changeSet){if(r.changeSet&&r.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=r.changeSet.id}let a={type:"propertyChanged",changeSet:r.changeSet,source:r.source};t(a)};for(let r of e)this.setupPropertyListener(r,i)}getLocaleTextFunc(){return vc(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){let 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 rh(e){return e.__addEventListener!==void 0}function ah(e){return e.eventServiceType==="global"}var S=class extends ve{},Ra=new Set,xr=(e,t)=>{Ra.has(t)||(Ra.add(t),e())};xr._set=Ra;var nh={pending:!1,funcs:[]},sh={pending:!1,funcs:[]};function Ea(e,t="setTimeout",o){let i=t==="raf"?sh:nh;if(i.funcs.push(e),i.pending)return;i.pending=!0;let r=()=>{let a=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(let n of a)n()};t==="raf"?pt(o,r):window.setTimeout(r,0)}function re(e,t,o){let i;return function(...r){let a=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(a,r)},o),i}}function xs(e,t){let o=0;return function(...i){let r=this,a=Date.now();a-o{a!=null&&(window.clearInterval(a),a=null)};e.addDestroyFunc(s);let l=()=>{let c=Date.now()-r>i;(t()||c)&&(o(),n=!0,s())};l(),n||(a=window.setInterval(l,10))}var Cc=new Set(["__proto__","constructor","prototype"]);function ch(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o!Cc.has(i)))t(o,e[o])}}function he(e,t,o=!0,i=!1){I(t)&&ch(t,(r,a)=>{let n=e[r];n!==a&&(i&&n==null&&a!=null&&typeof a=="object"&&a.constructor===Object&&(n={},e[r]=n),ks(a)&&ks(n)&&!Array.isArray(n)?he(n,a,o,i):(o||a!==void 0)&&(e[r]=a))})}function ks(e){return typeof e=="object"&&e!==null}var Cn=class at{static applyGlobalGridOptions(t){if(!at.gridOptions)return{...t};let o={};return he(o,at.gridOptions,!0,!0),at.mergeStrategy==="deep"?he(o,t,!0,!0):o={...o,...t},at.gridOptions.context&&(o.context=at.gridOptions.context),t.context&&(at.mergeStrategy==="deep"&&o.context&&he(t.context,o.context,!0,!0),o.context=t.context),o}static applyGlobalGridOption(t,o){if(at.mergeStrategy==="deep"){let i=dh(t);if(i&&typeof i=="object"&&typeof o=="object")return at.applyGlobalGridOptions({[t]:o})[t]}return o}};Cn.gridOptions=void 0;Cn.mergeStrategy="shallow";var wn=Cn;function dh(e){var t;return(t=wn.gridOptions)==null?void 0:t[e]}var gh={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},wc="https://www.ag-grid.com";function Ft(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Zo(e,...t){xr(()=>bc(e,...t),e+(t==null?void 0:t.join("")))}function Co(e,...t){xr(()=>uh(e,...t),e+(t==null?void 0:t.join("")))}function uh(e,...t){console.error("AG Grid: "+e,...t)}function bc(e,...t){console.warn("AG Grid: "+e,...t)}var yc=new Set,er={},wo={},Bi,Sc=!1,xc=!1,hh=!1;function ph(e){let[t,o]=e.version.split(".")||[],[i,r]=Bi.split(".")||[];return t===i&&o===r}function fh(e){var i;Bi||(Bi=e.version);let t=r=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${r} Please update all modules to the same version.`;e.version?ph(e)||Co(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Bi}.`)):Co(t(`'${e.moduleName}' is incompatible.`));let o=(i=e.validate)==null?void 0:i.call(e);o&&!o.isValid&&Co(`${o.message}`)}function di(e,t,o=!1){var a;o||(Sc=!0),fh(e);let i=(a=e.rowModels)!=null?a:["all"];yc.add(e);let r;t!==void 0?(xc=!0,wo[t]===void 0&&(wo[t]={}),r=wo[t]):r=er;for(let n of i)r[n]===void 0&&(r[n]={}),r[n][e.moduleName]=e;if(e.dependsOn)for(let n of e.dependsOn)di(n,t,o)}function mh(e){delete wo[e]}function Fa(e,t,o){let i=r=>{var a,n,s;return!!((a=er[r])!=null&&a[e])||!!((s=(n=wo[t])==null?void 0:n[r])!=null&&s[e])};return i(o)||i("all")}function bn(){return xc}function vh(e,t){var i,r,a,n,s;let o=(i=wo[e])!=null?i:{};return[...Object.values((r=er.all)!=null?r:{}),...Object.values((a=o.all)!=null?a:{}),...Object.values((n=er[t])!=null?n:{}),...Object.values((s=o[t])!=null?s:{})]}function Ch(){return new Set(yc)}function wh(){return Sc}function yn(){return hh}var kc=class{static register(e){di(e,void 0)}static registerModules(e){for(let t of e)di(t,void 0)}};var P="35.2.1",Rs=2e3,Es=100,Rc="_version_",Ni=null,bo=`${wc}/javascript-data-grid`;function bh(e){Ni=e}function yh(e){bo=e}function Ec(e,t,o){var i;return(i=Ni==null?void 0:Ni(e,t))!=null?i:[Rh(e,t,o)]}function Sn(e,t,o,i,r){e(`${i?"warning":"error"} #${t}`,...Ec(t,o,r))}function Sh(e){if(!e)return String(e);let t={};for(let o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function xh(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Sh(e)),t}function Vi(e){return e===void 0?"undefined":e===null?"null":e}function Da(e,t){return`${e}?${t.toString()}`}function kh(e,t,o){let i=Array.from(t.entries()).sort((a,n)=>n[1].length-a[1].length),r=Da(e,t);for(let[a,n]of i){if(a===Rc)continue;let s=r.length-o;if(s<=0)break;let l="...",c=s+l.length,d=n.length-c>Es?n.slice(0,n.length-c)+l:n.slice(0,Es)+l;t.set(a,d),r=Da(e,t)}return r}function Fc(e,t){let o=new URLSearchParams;if(o.append(Rc,P),t)for(let a of Object.keys(t))o.append(a,xh(t[a]));let i=`${bo}/errors/${e}`,r=Da(i,o);return r.length<=Rs?r:kh(i,o,Rs)}var Rh=(e,t,o)=>{let i=Fc(e,t),r=`${o?o+` +`:""}Visit ${i}`;return yn()?r:`${r}${o?"":` + Alternatively register the ValidationModule to see the full message in the console.`}`};function R(...e){Sn(Zo,e[0],e[1],!0)}function W(...e){Sn(Co,e[0],e[1],!1)}function Uo(e,t,o){Sn(Co,e,t,!1,o)}function Eh(e,t){let o=t[0];return`error #${o} `+Ec(o,t[1],e).join(" ")}function Xe(...e){return Eh(void 0,e)}function Dc(e,t){return e.get("rowModelType")===t}function ee(e,t){return Dc(e,"clientSide")}function vi(e,t){return Dc(e,"serverSide")}function se(e,t){return e.get("domLayout")===t}function Ut(e){return ir(e)!==void 0}function Mc(e){return typeof e.get("getRowHeight")=="function"}function Fh(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Dh({gos:e,formula:t}){let o=e.get("rowNumbers");return o||!!(t!=null&&t.active)&&o!==!1}function Dt(e,t,o=!1,i){let{gos:r,environment:a}=e;if(i==null&&(i=a.getDefaultRowHeight()),Mc(r)){if(o)return{height:i,estimated:!0};let l={node:t,data:t.data},c=r.getCallback("getRowHeight")(l);if(Ma(c))return c===0&&R(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&r.get("masterDetail"))return Mh(r);let n=r.get("rowHeight");return{height:n&&Ma(n)?n:i,estimated:!1}}function Mh(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};let t=e.get("detailRowHeight");return Ma(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function jt(e){let{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||Q(i))return t.getDefaultRowHeight();let r=t.refreshRowHeightVariable();return r!==-1?r:(R(24),t.getDefaultRowHeight())}function Ma(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Pc(e,t,o){let i=t[e.getDomDataKey()];return i?i[o]:void 0}function Jt(e,t,o,i){let r=e.getDomDataKey(),a=t[r];Q(a)&&(a={},t[r]=a),a[o]=i}function yo(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Ic(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||se(e,"print"))}function st(e){let t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function tr(e){let t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Tc(e){return e.get("grandTotalRow")}function Ph(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Ih(e){return Ph(e)&&e.get("groupHideColumnsUntilExpanded")&&ee(e)}function Ac(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function zc(e,t,o){return!!t.group&&!t.footer&&Ac(e,o)}function Mo(e){let t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(xr(()=>R(25,{id:i}),"getRowIdString"),i=String(i)),i}}function Th(e,t){let o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Ah(e){let t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function So(e){var t;return(t=e==null?void 0:e.checkboxes)!=null?t:!0}function Gi(e){var t;return(e==null?void 0:e.mode)==="multiRow"&&((t=e.headerCheckbox)!=null?t:!0)}function or(e){var t;if(typeof e=="object")return(t=e.checkboxLocation)!=null?t:"selectionColumn"}function qr(e){var t;return(t=e==null?void 0:e.hideDisabledCheckboxes)!=null?t:!1}function zh(e){return typeof e.get("rowSelection")!="string"}function gt(e){let t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function xo(e){var o,i;let t=(o=e.get("cellSelection"))!=null?o:!1;return(i=typeof t=="object"&&t.enableColumnSelection)!=null?i:!1}function Lc(e){var o,i;let t=(o=e.get("rowSelection"))!=null?o:"single";if(typeof t=="string"){let r=e.get("suppressRowClickSelection"),a=e.get("suppressRowDeselection");return r&&a?!1:r?"enableDeselection":a?"enableSelection":!0}return(t.mode==="singleRow"||t.mode==="multiRow")&&(i=t.enableClickSelection)!=null?i:!1}function Lh(e){let t=Lc(e);return t===!0||t==="enableSelection"}function Oh(e){let t=Lc(e);return t===!0||t==="enableDeselection"}function Pa(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function ir(e){let 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==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function gi(e){return ir(e)==="multiRow"}function Hh(e){var o;let t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(o=t==null?void 0:t.enableSelectionWithoutKeys)!=null?o:!1}function rr(e){let t=e.get("rowSelection");if(typeof t=="string"){let o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Oc(e,t=!0){let o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function Bh(e){var o;let t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"&&(o=t.ctrlASelectsRows)!=null?o:!1}function ui(e){let t=rr(e);return t==="descendants"||t==="filteredDescendants"}function Fs(e){let t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Nh(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function be(e){return e.get("columnMenu")==="legacy"}function Vh(e){return!be(e)}function Gh(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function O(e,t){return e.addCommon(t)}function Wh({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var qh={resizable:!0,sortable:!0},_h=0;function Hc(){return _h++}function Mt(e){return e instanceof no}var Uh=["asc","desc",null],jh=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],no=class extends S{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=Hc(),this.autoHeaderHeight=null,this.sortDef=Me(),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 Qt,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=$o(o)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}initState(){let{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t==null||t.initCol(this);let r=e.hide;r!==void 0?this.visible=!r:this.visible=!e.initialHide,o==null||o.initCol(this),i==null||i.initCol(this)}setColDef(e,t,o){var r;let i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((r=this.beans.rowSpanSvc)==null||r.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(){let{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=I(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=I(o)&&o.includes(".")&&!i}initMinAndMaxWidths(){var t,o;let e=this.colDef;this.minWidth=(t=e.minWidth)!=null?t:this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=(o=e.maxWidth)!=null?o:Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){let e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{let i=e.recreateColDef(this.colDef);this.setColDef(i,i,o.source)}})}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){var o,i;let t=(i=(o=e.width)!=null?o:e.initialWidth)!=null?i:200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t,o;return(o=(t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))!=null?o:!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){var i,r,a,n;this.frameworkEventListenerService=(r=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:r.call(i,this.frameworkEventListenerService,this.colEventSvc);let o=(n=(a=this.frameworkEventListenerService)==null?void 0:a.wrap(e,t))!=null?n:t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){var i,r;let o=(r=(i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))!=null?r:t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return O(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t,o;return(o=(t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))!=null?o:!1}isCellEditable(e){var t,o;return(o=(t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))!=null?o:!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){var t,o;return(o=(t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))!=null?o:!1}isSuppressPaste(e){var t,o;return this.isColumnFunc(e,(o=(t=this.colDef)==null?void 0:t.suppressPaste)!=null?o:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){var t;return(t=this.colDef[e])!=null?t:qh[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){let o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return O(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(){let e=[],{sort:t,initialSort:o}=this.colDef,i=t===null?t:ut(t==null?void 0:t.type),r=o===null?o:ut(o==null?void 0:o.type);return i&&e.push(i),r&&e.push(r),e}getSortingOrder(){var t,o;let e=this.getColDefAllowedSortTypes().includes("absolute")?jh:Uh;return((o=(t=this.colDef.sortingOrder)!=null?t:this.gos.get("sortingOrder"))!=null?o:e).map(i=>Me(i))}getAvailableSortTypes(){let 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 Q(this.getSort())}isSorting(){return I(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(){var e;return R(261),!!((e=this.beans.colHover)!=null&&e.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){let 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!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,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){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return O(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Q(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(Q(this.colDef.rowSpan))return 1;let 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){let i=this.createColumnEvent(e,t);o&&he(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Me(e){return ko(e)?{direction:e.direction,type:e.type}:{direction:kr(e),type:ut(e)}}function kt(e){return e==="asc"||e==="desc"||e===null}function xn(e){return e==="default"||e==="absolute"}function ko(e){if(!e||typeof e!="object")return!1;let t=e;return xn(t.type)&&kt(t.direction)}function Wi(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function kr(e){return kt(e)?e:null}function ut(e){return xn(e)?e:"default"}function Kh(e,t,o){let i=o==null?void 0:o(),r=i!=null?i:t.sortSvc.getDisplaySortForColumn(e),a=ut(r==null?void 0:r.type),n=kr(r==null?void 0:r.direction),s=e.getAvailableSortTypes(),l=s.has("default"),c=s.has("absolute");return{isDefaultSortAllowed:l,isAbsoluteSortAllowed:c,isAbsoluteSort:a==="absolute",isDefaultSort:a==="default",isAscending:n==="asc",isDescending:n==="desc",direction:n}}function de(e){return e instanceof qi}var qi=class extends S{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=Hc(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&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(){let e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(let t of this.children)Mt(t)?e(t):de(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(let t of this.children)Mt(t)?e.push(t):de(t)&&t.addLeafColumns(e)}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);for(let t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(let t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1,i=this.findChildrenRemovingPadding();for(let a=0,n=i.length;a{for(let i of o)de(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},$h={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Ds(e,t,o){let i={},r=e.gos;return Object.assign(i,r.get("defaultColGroupDef")),Object.assign(i,t),r.validateColDef(i,o),i}var Yh=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t0&&R(273,{providedId:e,usedId:r}),this.existingKeys[r]=!0,r}o++}}},Qh=(e,t)=>{de(e)&&e.setupExpandable(),e.originalParent=t};function Zh(e,t=null,o,i,r){var h;let a=new Yh,{existingCols:n,existingGroups:s,existingColKeys:l}=Jh(i);a.addExistingKeys(l);let c=Bc(e,t,0,o,n,a,s,r),{colGroupSvc:d}=e,g=(h=d==null?void 0:d.findMaxDepth(c,0))!=null?h:0,u=d?d.balanceColumnTree(c,0,g,a):c;return ct(null,u,Qh),{columnTree:u,treeDepth:g}}function Jh(e){let t=[],o=[],i=[];return e&&ct(null,e,r=>{if(de(r)){let a=r;o.push(a)}else{let a=r;i.push(a.getId()),t.push(a)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function Bc(e,t,o,i,r,a,n,s){if(!t)return[];let{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d0))if(o.width!=null)t.setActualWidth(o.width,i);else{let a=t.getActualWidth();t.setActualWidth(a,i)}}function tp(e,t){if(t)for(let o=0;o{for(let r=0;rt+o.getActualWidth(),0)}function ar(e,t,o){let i={};if(!t)return;ct(null,t,a=>{i[a.getInstanceId()]=a}),o&&ct(null,o,a=>{i[a.getInstanceId()]=null});let r=Object.values(i).filter(a=>a!=null);e.context.destroyBeans(r)}function kn(e){return e.getId().startsWith(Rr)}function zt(e){var o;let t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(o=t==null?void 0:t.startsWith(Vc))!=null?o:!1}function pe(e){var o;let t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(o=t==null?void 0:t.startsWith(Gc))!=null?o:!1}function ap(e){return zt(e)||pe(e)}function nr(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function np(e,t){return Tt(e,t,(o,i)=>o.getColId()===i.getColId())}function sp(e){e.map={};for(let t of e.list)e.map[t.getId()]=t}function Ro(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Jo(e,t){return e===t||e.colId==t||e.getColDef()===t}var lp=(e,t)=>(o,i)=>{let r={value1:void 0,value2:void 0},a=!1;return e&&(e[o]!==void 0&&(r.value1=e[o],a=!0),I(i)&&e[i]!==void 0&&(r.value2=e[i],a=!0)),!a&&t&&(t[o]!==void 0&&(r.value1=t[o]),I(i)&&t[i]!==void 0&&(r.value2=t[i])),r};function cp(e,t){let o={...e,sort:void 0,colId:t},i=qc(e);return i&&(o.sort=i.direction,o.sortType=i.type),o}function qc(e){let{sort:t,initialSort:o}=e,i=ko(t)||kt(t),r=ko(o)||kt(o);return i?Me(t):r?Me(o):null}function _c(e,t){return e+"_"+t}function X(e){return e instanceof hi}var hi=class extends S{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=$o(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return _c(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(let e of this.displayedChildren)X(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let t=U(this.displayedChildren).getLeft();this.setLeft(t)}else{let e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){var t;let e=0;for(let o of(t=this.displayedChildren)!=null?t:[])e+=o.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(let t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(let t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){var t;for(let o of(t=this.displayedChildren)!=null?t:[])Mt(o)?e.push(o):X(o)&&o.addDisplayedLeafColumns(e)}addLeafColumns(e){var t;for(let o of(t=this.children)!=null?t:[])Mt(o)?e.push(o):X(o)&&o.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return!this.isPadding()||!(e!=null&&e.isPadding())?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){var o,i;this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(let r of(o=this.children)!=null?o:[]){if(X(r)&&!((i=r.displayedChildren)!=null&&i.length))continue;switch(r.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(r);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(r);break;default:this.displayedChildren.push(r);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},y={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"},dp=65,gp=67,up=86,hp=68,pp=90,fp=89;function Uc(e){let{keyCode:t}=e,o;switch(t){case dp:o=y.A;break;case gp:o=y.C;break;case up:o=y.V;break;case hp:o=y.D;break;case pp:o=y.Z;break;case fp:o=y.Y;break;default:o=e.code}return o}function mp(e,t){return new $(o=>{o(window.setInterval(e,t))})}var $=class jo{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 jo(o=>{let i=t.length,r=new Array(i);t.forEach((a,n)=>{a.then(s=>{r[n]=s,i--,i===0&&o(r)})})}):jo.resolve()}static resolve(t=null){return new jo(o=>o(t))}then(t){return new jo(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(let o of this.waiters)o(t)}onReject(t){}},vp=class extends ve{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){let o={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:i=>this.onDragStart(e,i),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(o),this.beans.dragSvc.addDragSource(o)}setDragImageCompIcon(e,t=!1){let o=this.dragImageComp;o&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,o.setIcon(e,t))}removeDragSource(e){var i;let{dragSourceAndParamsList:t,beans:o}=this;for(let r=0,a=t.length;r{for(let c of l){let{width:d,height:g,left:u,right:h,top:p,bottom:f}=c.getBoundingClientRect();if(d===0||g===0)return!1;let m=s.clientX>=u&&s.clientX=p&&s.clientY0}findExternalZone(e){let t=this.dropTargets;for(let o=0,i=t.length;o0?"down":p<0?"up":null,hDirection:h<0?"left":h>0?"right":null,initialSourcePointerOffsetX:s,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:o,dragItem:r,dropZoneTarget:c,dropTarget:(m=a==null?void 0:a.dropTarget)!=null?m:null,changed:!!(a!=null&&a.changed)});return this.lastDraggingEvent=f,f}positionDragImageComp(e){var o;let t=(o=this.dragImageComp)==null?void 0:o.getGui();t&&Xu(t,e,this.beans)}removeDragImageComp(e){var t;this.dragImageComp===e&&(this.dragImageComp=null),e&&((t=e.getGui())==null||t.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){var o;let t=(o=this.createDragImageComp(e))!=null?o:null;this.dragImageCompPromise=t,t==null||t.then(i=>{let r=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!r||!this.isAlive()){this.destroyBean(i);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;let a=this.dragImageComp;a!==i&&(this.dragImageComp=i,this.removeDragImageComp(a)),i&&(this.appendDragImageComp(i),this.updateDragImageComp(),this.positionDragImageComp(r))})}appendDragImageComp(e){var r;let t=e.getGui(),o=t.style;o.position="absolute",o.zIndex="9999",(r=this.beans.dragSvc)!=null&&r.hasPointerCapture()&&(o.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),o.top="20px",o.left="20px";let i=gn(this.beans);i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){var n,s;let{dragImageComp:e,dragSource:t,lastDropTarget:o,lastDraggingEvent:i,dragImageLastLabel:r}=this;if(!e)return;this.setDragImageCompIcon((s=(n=o==null?void 0:o.getIconName)==null?void 0:n.call(o,i))!=null?s:null);let a=t==null?void 0:t.dragItemName;typeof a=="function"&&(a=a(i)),a||(a=""),r!==a&&(this.dragImageLastLabel=a,e.setLabel(a))}};function jc(e){return typeof e=="object"&&!!e.component}function Cp(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Kc(e,t,o,i){let{name:r}=o,a,n,s,l,c,d;if(t){let g=t,u=g[r+"Selector"],h=u?u(i):null,p=f=>{typeof f=="string"?a=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?s=f:n=f)};h?(p(h.component),l=h.params,c=h.popup,d=h.popupPosition):p(g[r])}return{compName:a,jsComp:n,fwComp:s,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var wp=class extends S{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,r=!1){var w;let{name:a,cellRenderer:n}=t,{compName:s,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:g,popupPositionFromSelector:u}=Kc(this.beans.frameworkOverrides,e,t,i),h,p,f=b=>{let x=this.registry.getUserComponent(a,b);x&&(l=x.componentFromFramework?void 0:x.component,c=x.componentFromFramework?x.component:void 0,h=x.params,p=x.processParams)};if(s!=null&&f(s),l==null&&c==null&&o!=null&&f(o),l&&n&&!Cp(l)&&(l=(w=this.agCompUtils)==null?void 0:w.adaptFunction(t,l)),!l&&!c){let{validation:b}=this.beans;r&&(s!==o||!o)?s?b!=null&&b.isProvidedUserComp(s)||W(50,{compName:s}):o?b||W(260,{...this.gos.getModuleErrorParams(),propName:a,compName:o}):W(216,{name:a}):o&&!b&&W(146,{comp:o});return}let m=this.mergeParams(e,t,i,d,h,p),v=l==null,C=l!=null?l:c;return{componentFromFramework:v,componentClass:C,params:m,type:t,popupFromSelector:g,popupPositionFromSelector:u,newAgStackInstance:()=>this.newAgStackInstance(C,v,m,t)}}newAgStackInstance(e,t,o,i){var s;let r=!t,a;r?a=new e:a=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(a);let n=(s=a.init)==null?void 0:s.call(a,o);return n==null?$.resolve(a):n.then(()=>a)}mergeParams(e,t,o,i=null,r,a){let n={...o,...r},s=e,l=s==null?void 0:s[t.name+"Params"];if(typeof l=="function"){let c=l(o);he(n,c)}else typeof l=="object"&&he(n,l);return he(n,i),a?a(n):n}},bp={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},yp={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Sp={name:"headerComponent",optionalMethods:["refresh"]},xp={name:"innerHeaderComponent"},kp={name:"innerHeaderGroupComponent"},Rp={name:"headerGroupComponent"};var Ep={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0};var Fp={name:"loadingCellRenderer",cellRenderer:!0},Dp={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Mp={name:"tooltipComponent"},Rn={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Pp={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Ip={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Tp={name:"loadingCellRenderer",cellRenderer:!0},Ap={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},zp={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Lp(e,t){return e.getCompDetailsFromGridOptions(yp,"agDragAndDropImage",t,!0)}function Op(e,t,o){return e.getCompDetails(t,Sp,"agColumnHeader",o)}function Hp(e,t,o){return e.getCompDetails(t,xp,void 0,o)}function Bp(e,t){let o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,Rp,"agColumnGroupHeader",t)}function Np(e,t,o){return e.getCompDetails(t,kp,void 0,o)}function Vp(e,t){return e.getCompDetailsFromGridOptions(Ip,void 0,t,!0)}function Gp(e,t){return e.getCompDetailsFromGridOptions(Tp,"agLoadingCellRenderer",t,!0)}function Wp(e,t){return e.getCompDetailsFromGridOptions(Ap,"agGroupRowRenderer",t,!0)}function qp(e,t){return e.getCompDetailsFromGridOptions(zp,"agDetailCellRenderer",t,!0)}function Ms(e,t,o){return e.getCompDetails(t,Ep,void 0,o)}function Ps(e,t,o){return e.getCompDetails(t,Fp,"agSkeletonCellRenderer",o,!0)}function $c(e,t,o){return e.getCompDetails(t,Dp,"agCellEditor",o,!0)}function _p(e,t,o,i){let r=t.filter;return jc(r)&&(t={filter:r.component,filterParams:t.filterParams}),e.getCompDetails(t,Rn,i,o,!0)}function Up(e,t,o){return e.getCompDetails(t,bp,"agDateInput",o,!0)}function jp(e,t){return e.getCompDetails(t.colDef,Mp,"agTooltipComponent",t,!0)}function Kp(e,t,o,i){return e.getCompDetails(t,Pp,i,o)}function Yc(e,t){return Kc(e,t,Rn)}function _r(e,t,o){return e.mergeParams(t,Rn,o)}var $p=class extends vp{createEvent(e){return O(this.gos,e)}createDragImageComp(e){let{gos:t,beans:o}=this,i=Lp(o.userCompFactory,O(t,{dragSource:e}));return i==null?void 0:i.newAgStackInstance()}handleEnter(e,t){var o;(o=e==null?void 0:e.onGridEnter)==null||o.call(e,t)}handleExit(e,t){var o;(o=e==null?void 0:e.onGridExit)==null||o.call(e,t)}warnNoBody(){R(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){let o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}};function Qc(e){return!!e.operator}var Zc="ag-resizer-wrapper",ft=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Yp={tag:"div",cls:Zc,children:[ft("eTopLeft","topLeft"),ft("eTop","top"),ft("eTopRight","topRight"),ft("eRight","right"),ft("eBottomRight","bottomRight"),ft("eBottom","bottom"),ft("eBottomLeft","bottomLeft"),ft("eLeft","left")]},Qp=class extends ve{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){let{clientHeight:t,clientWidth:o}=this.offsetParent,i=o/2-this.getWidth()/2,r=t/2-this.getHeight()/2;this.offsetElement(i,r,e)}initialisePosition(e){if(this.positioned)return;let{centered:t,forcePopupParentAsOffsetParent:o,minWidth:i,width:r,minHeight:a,height:n,x:s,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0,g=Ie(this.element);if(g){let u=this.findBoundaryElement(),h=window.getComputedStyle(u);if(h.minWidth!=null){let p=u.offsetWidth-this.element.offsetWidth;d=Number.parseInt(h.minWidth,10)-p}if(h.minHeight!=null){let p=u.offsetHeight-this.element.offsetHeight;c=Number.parseInt(h.minHeight,10)-p}}if(this.minHeight=a||c,this.minWidth=i||d,r&&this.setWidth(r),n&&this.setHeight(n),(!r||!n)&&this.refreshSize(),t)this.center(e);else if(s||l)this.offsetElement(s,l,e);else if(g&&o){let u=this.boundaryEl,h=!0;if(u||(u=this.findBoundaryElement(),h=!1),u){let p=Number.parseFloat(u.style.top),f=Number.parseFloat(u.style.left);h?this.offsetElement(Number.isNaN(f)?0:f,Number.isNaN(p)?0:p,e):this.setPosition(f,p)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){var i,r;if(!this.config.popup||e===this.movable)return;this.movable=e;let o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?((i=this.dragSvc)==null||i.addDragSource(o),this.moveElementDragListener=o):((r=this.dragSvc)==null||r.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){var t;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(let o of Object.keys(e)){let i=!!e[o],r=this.getResizerElement(o),a={dragStartPixels:0,eElement:r,onDragStart:n=>this.onResizeStart(n,o),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,o)};(i||!this.isAlive()&&!i)&&(i?((t=this.dragSvc)==null||t.addDragSource(a),this.resizeListeners.push(a),r.style.pointerEvents="all"):r.style.pointerEvents="none",this.resizable[o]=i)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";let{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,o=this.element,i=!1;if(typeof e=="string"&&e.includes("%"))Qo(o,e),e=cc(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let r=this.getAvailableHeight();r&&e>r&&(e=r)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?Qo(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:o}=this.offsetParent;if(!o)return null;let i=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),a=e?this.position.y:i.top,n=e?0:r.top,s=0;if(t){let c=this.element.parentElement;if(c){let{bottom:d}=c.getBoundingClientRect();s=d-i.bottom}}return o+n-a-s}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:o}=this.config,i=!1;if(typeof e=="string"&&e.includes("%"))Je(t,e),e=Yi(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:r}=this.offsetParent,a=o?this.position.x:this.element.getBoundingClientRect().left;r&&e+a>r&&(e=r-a)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Je(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){var a;let{forcePopupParentAsOffsetParent:i}=this.config,r=i?this.boundaryEl:this.element;r&&((a=this.popupSvc)==null||a.positionPopup({ePopup:r,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:o}),this.setPosition(Number.parseFloat(r.style.left),Number.parseFloat(r.style.top)))}constrainSizeToAvailableHeight(e){var o,i;if(!this.config.forcePopupParentAsOffsetParent)return;let t=()=>{let r=this.getAvailableHeight();this.element.style.setProperty("max-height",`${r}px`)};e&&this.popupSvc?((o=this.resizeObserverSubscriber)==null||o.call(this),this.resizeObserverSubscriber=At(this.beans,(i=this.popupSvc)==null?void 0:i.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){let{e:t,isLeft:o,isTop:i,anywhereWithin:r,topBuffer:a}=e,n=t.clientX-this.dragStartPosition.x,s=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!r,n)?0:n,c=this.shouldSkipY(t,!!i,a,s)?0:s;return{movementX:l,movementY:c}}shouldSkipX(e,t,o,i){let r=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.x:r.left,l=s<=0&&a.left>=e.clientX||a.right<=e.clientX&&a.right<=n.right;return l?!0:(t?l=i<0&&e.clientX>s+a.left||i>0&&e.clientXn.right||i>0&&e.clientXn.right||i>0&&e.clientX=e.clientY||a.bottom<=e.clientY&&a.bottom<=n.bottom;return l?!0:(t?l=i<0&&e.clientY>s+a.top+o||i>0&&e.clientYn.bottom||i>0&&e.clientY({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;let e=this.element;e&&(e.appendChild(Zt(Yp)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;let e=this.element.querySelector(`.${Zc}`);e==null||e.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");let{popup:o,forcePopupParentAsOffsetParent:i}=this.config;!o&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(o=>!o.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,o=0;for(let i of e){let r=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let a=this.minHeight||0,n=this.minWidth||0;if(r){let s=window.getComputedStyle(i);s.minHeight&&(a=Number.parseInt(s.minHeight,10)),s.minWidth&&(n=Number.parseInt(s.minWidth,10))}else a=i.offsetHeight,n=i.offsetWidth;t+=a,o+=n}return{height:t,width:o}}applySizeToSiblings(e){let t=null,o=this.getSiblings();if(o){for(let i=0;ie)}onResize(e){if(!this.isResizing||!this.currentResizer)return;let{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:i,isRight:r,isBottom:a,isLeft:n}=this.currentResizer,s=r||n,l=a||i,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:n,isTop:i}),g=this.position.x,u=this.position.y,h=0,p=0;if(s&&c){let f=n?-1:1,m=this.getWidth(),v=m+c*f,C=!1;n&&(h=m-v,(g+h<=0||v<=this.minWidth)&&(C=!0,h=0)),C||this.setWidth(v)}if(l&&d){let f=i?-1:1,m=this.getHeight(),v=m+d*f,C=!1;i?(p=m-v,(u+p<=0||v<=this.minHeight)&&(C=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&mthis.element.parentElement.offsetHeight&&(C=!0),C||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&h||p)&&this.offsetElement(g+h,u+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){let e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;let{x:t,y:o}=this.position,i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());let{movementX:r,movementY:a}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+r,o+a),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.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(){var e;for(;this.resizeListeners.length;){let t=this.resizeListeners.pop();(e=this.dragSvc)==null||e.removeDragSource(t)}}destroy(){var e;super.destroy(),this.moveElementDragListener&&((e=this.dragSvc)==null||e.removeDragSource(this.moveElementDragListener)),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Zp=class extends Qp{},M=null;function Is(e){return typeof(e==null?void 0:e.getGui)=="function"}var Jc=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.includes(" ")){let r=(e||"").split(" ");if(r.length>1){for(let a of r)this.toggleCss(a,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},Jp=0,Oo=class extends ve{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Jp++,this.cssManager=new Jc(()=>this.eGui),this.componentSelectors=new Map((t!=null?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(fc):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){let r=this[t];if(r===M)this[t]=i!=null?i:e;else{let a=o==null?void 0:o[t];if(!this.suppressDataRefValidation&&!a)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(e,t){var i;let o=[];for(let r of(i=e.childNodes)!=null?i:[])o.push(r);for(let r of o){if(!(r instanceof HTMLElement))continue;let a=this.createComponentFromElement(r,n=>{var l;let s=n.getGui();if(s)for(let c of(l=r.attributes)!=null?l:[])s.setAttribute(c.name,c.value)},t);if(a){if(a.addItems&&r.children.length){this.createChildComponentsFromTags(r,t);let n=Array.prototype.slice.call(r.children);a.addItems(n)}this.swapComponentForNode(a,e,r)}else r.childNodes&&this.createChildComponentsFromTags(r,t)}}createComponentFromElement(e,t,o){let i=e.nodeName,r=this.getDataRefAttribute(e),a=i.indexOf("AG-")===0,n=a?this.componentSelectors.get(i):null,s=null;if(n){let l=o&&r?o[r]:void 0;s=new n.component(l),s.setParentComponent(this),this.createBean(s,null,t)}else if(a)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,r,o,s),s}swapComponentForNode(e,t,o){let i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){let o=t!=null?t:this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(let i of e)i.setAttribute("tabindex",o.toString())}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=pn(e):i=Zt(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let r=0;rthis.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===Ts?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){var e,t,o;if(Array.isArray(this.css)){let i="component-"+((t=(e=Object.getPrototypeOf(this))==null?void 0:e.constructor)==null?void 0:t.name);for(let r of(o=this.css)!=null?o:[])this.beans.environment.addGlobalCSS(r,i)}this.css=Ts}},Ts=Symbol(),_=class extends Oo{},Ur,jr,Kr,$r,Ta,Aa,Yr;function Lt(){return Ur===void 0&&(Ur=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Ur}function Po(){return jr===void 0&&(jr=/(firefox)/i.test(navigator.userAgent)),jr}function Xc(){return Kr===void 0&&(Kr=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Kr}function Kt(){return $r===void 0&&($r=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),$r}function za(e){if(!e)return null;let t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!Po())?null:t.toString()}function Xp(){if(Yr!==void 0)return Yr;if(!document.body)return-1;let e=1e6,t=Po()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){let i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return o.remove(),Yr=e,e}function En(){return Aa==null&&ed(),Aa}function ed(){let e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.remove(),o!=null&&(Aa=o,Ta=o===0)}function td(){return Ta==null&&ed(),Ta}var La=!1,sr=0;function ef(e){sr>0||(e.addEventListener("keydown",lr),e.addEventListener("mousedown",lr))}function tf(e){sr>0||(e.removeEventListener("keydown",lr),e.removeEventListener("mousedown",lr))}function lr(e){let t=La,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(La=o)}function of(e){let t=te(e);return ef(t),sr++,()=>{sr--,tf(t)}}function od(){return La}function $t(e,t,o=!1){let i=Gu,r=lc;t&&(r+=", "+t),o&&(r+=', [tabindex="-1"]');let a=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>Ie(l)),n=Array.prototype.slice.apply(e.querySelectorAll(r));return n.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(a,n):a}function Xt(e,t=!1,o=!1,i=!1){let r=$t(e,i?".ag-tab-guard":null,o),a=t?U(r):r[0];return a?(a.focus({preventScroll:!0}),!0):!1}function so(e,t,o,i){let r=$t(t,o?':not([tabindex="-1"])':null),a=Y(e),n;o?n=r.findIndex(l=>l.contains(a)):n=r.indexOf(a);let s=n+(i?-1:1);return s<0||s>=r.length?null:r[s]}function id(e,t=5){let o=0;for(;e&&za(e)===null&&++o<=t;)e=e.parentElement;return za(e)===null?null:e}var rf="ag-focus-managed",rd=class extends ve{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},o={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=o,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;let r=so(this.beans,this.eFocusable,!1,i.shiftKey);r&&(r.focus(),i.preventDefault())},...o}}postConstruct(){let{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(rf),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;let{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===y.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},ad="__ag_Grid_Stop_Propagation";function eo(e){e[ad]=!0}function dt(e){return e[ad]===!0}var nd={isStopPropagation:dt,stopPropagation:eo},Ci=class extends rd{constructor(e,t){super(e,nd,t)}},af={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 Be(e,t,o){return th(e,af,t,o)}function Fn(e,t){let{debounceMs:o}=e;return Er(e)?(o!=null&&R(71),0):o!=null?o:t}function Er(e){var t,o;return((o=(t=e.buttons)==null?void 0:t.indexOf("apply"))!=null?o:-1)>=0}function sd(e,t,o,i){let r=Be(e,o);if(typeof t=="function"){let a=Be(e,i);r=t({filterOptionKey:i,filterOption:a,placeholder:r})}else typeof t=="string"&&(r=t);return r}var nf=class extends _{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){let e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new Ci(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new Zp(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){let t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){let t=e,o=this.params;this.params=t;let{source:i,state:r,additionalEventAttributes:a}=t;i==="colDef"&&this.updateParams(t,o);let n=this.state;this.state=r;let s=a==null?void 0:a.fromAction;return(s&&s!=="apply"||r.model!==n.model||!this.areStatesEqual(r.state,n.state))&&this.setModelIntoUi(r.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=Er(e),this.setupApplyDebounced()}doesFilterPass(e){R(283);let{getHandler:t,model:o,column:i}=this.params;return t().doesFilterPass({...e,model:o,handlerParams:this.beans.colFilter.getHandlerParams(i)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return R(284),this.params.model!=null}setupApplyDebounced(){let e=Fn(this.params,this.defaultDebounceMs),t=re(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return R(285),this.params.model}setModel(e){R(286);let{beans:t,params:o}=this;return t.colFilter.setModelForColumnLegacy(o.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){let{params:t,state:{valid:o=!0,model:i}}=this;if(!o)return!1;let r=!this.areModelsEqual(t.model,i);return r&&t.onAction("apply",e),r}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();let o=this.getModelFromUi(),i={model:o,state:this.getState(),valid:this.canApply(o)};this.state=i;let{params:r,gos:a,eventSvc:n,applyActive:s}=this;r.onStateChange(i),r.onUiChange(this.getUiChangeEventParams()),a.get("enableFilterHandlers")||n.dispatchEvent({type:"filterModified",column:r.column,filterInstance:this}),i.valid&&(e!=null||(e=s?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e==null?void 0:e.container,this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){let{positionableFeature:t,gos:o}=this;if(!t)return;let i=e==="floatingFilter"||e==="columnFilter";i?(t.restoreLastSize(),t.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(i)}afterGuiDetached(){var e;this.checkApplyDebounce(),(e=this.positionableFeature)==null||e.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return Be(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)}};var Dn=class extends Oo{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){let e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Fr=class extends Dn{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 it(e){let t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Dr(e){let t=e.rowModel;return t.getType()==="infinite"?t:void 0}function sf(e){let t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var As="row-group-",Mn="t-",Pn="b-",lf=0,Pt=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=lf++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){var t,o,i;let e=this._groupData;return e!==void 0?e:this.footer?(t=this.sibling)==null?void 0:t.groupData:(i=(o=this.beans.groupStage)==null?void 0:o.loadGroupData(this))!=null?i:null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this,{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){var t,o,i;let e=this._leafs;return e===void 0?(i=(o=(t=this.beans.groupStage)==null?void 0:t.loadLeafs)==null?void 0:o.call(t,this))!=null?i:null:e}set allLeafChildren(e){this._leafs=e}get expanded(){let 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){var s,l,c;let{valueCache:o,eventSvc:i}=this.beans,r=this.data;this.data=e,o==null||o.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();let a=this.createDataChangedEvent(e,r,t);if((s=this.__localEventService)==null||s.dispatchEvent(a),this.sibling){this.sibling.data=e;let d=this.sibling.createDataChangedEvent(e,r,t);(l=this.sibling.__localEventService)==null||l.dispatchEvent(d)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});let n=this.pinnedSibling;n&&(n.data=e,(c=n.__localEventService)==null||c.dispatchEvent(n.createDataChangedEvent(e,r,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:n}))}updateDataOnDetailNode(){let 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?(W(13),null):this.rowPinned==="top"?Mn+this.rowIndex:this.rowPinned==="bottom"?Pn+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var n,s;let{selectionSvc:o}=this.beans,i=(n=o==null?void 0:o.createDaemonNode)==null?void 0:n.call(o,this),r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));let a=this.createDataChangedEvent(e,r,!1);(s=this.__localEventService)==null||s.dispatchEvent(a)}setId(e){var o,i;let t=Mo(this.beans.gos);if(t)if(this.data){let r=(i=(o=this.parent)==null?void 0:o.getRoute())!=null?i:[];this.id=t({data:this.data,parentKeys:r.length>0?r:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(As)&&W(14,{groupPrefix:As})}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");let 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){var i;(i=this.beans.expansionSvc)==null||i.setExpanded(this,e,t,o)}setDataValue(e,t,o){var d,g;let{colModel:i,valueSvc:r,gos:a,editSvc:n}=this.beans;if(e==null)return!1;let s=(d=i.getCol(e))!=null?d:i.getColDefCol(e);if(!s)return!1;if(!this.group){let u=s.getColDef();u.pivotValueColumn&&(s=u.pivotValueColumn)}let l=r.getValueForDisplay({column:s,node:this,from:"data"}).value;if(a.get("readOnlyEdit")){let{beans:{eventSvc:u},data:h,rowIndex:p,rowPinned:f}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:p,rowPinned:f,column:s,colDef:s.colDef,data:h,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}if(o!=="data"&&n&&!n.committing){let u=n.setDataValue({rowNode:this,column:s},t,o);if(u!=null)return u}let c=r.setValue(this,s,t,o);return this.dispatchCellChangedEvent(s,t,l),c&&((g=this.pinnedSibling)==null||g.dispatchCellChangedEvent(s,t,l)),c}getDataValue(e,t="data"){var c;let{colModel:o,valueSvc:i,formula:r}=this.beans;if(e==null)return;let a=(c=o.getCol(e))!=null?c:o.getColDefCol(e);if(!a)return;let n=t==="data-raw",s=n||t==="value"?"data":t,l=i.getValue(a,this,s,n);if(!n&&(r&&a.isAllowFormula()&&r.isFormula(l)&&(l=r.resolveValue(a,this)),t!=="data"&&a.getAggFunc()&&typeof l=="object"&&l!=null)){if(typeof l.toNumber=="function")return l.toNumber();if("value"in l)return l.value}return l}updateHasChildren(){var o;let e=this.group&&!this.footer||!!((o=this.childrenAfterGroup)!=null&&o.length),{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){var r;let i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};(r=this.__localEventService)==null||r.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e,t;return(t=(e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))!=null?t:!1}isSelected(){if(this.footer)return this.sibling.isSelected();let e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){let t=this.childrenAfterGroup;if(t)for(let o=0,i=t.length;o{let o=new Pt(t);for(let i of Object.keys(e))df.has(i)||(o[i]=e[i]);return o.oldRowTop=null,o},Oa=(e,t,o)=>{if(!o)return;let i=o.rowIndex;if(i==null)return;i+=t;let r=e.getRowCount();for(;i>=0&&i{var d,g,u,h;return(t==null?void 0:t.compareRowNodes(i,l,c))||((g=(d=l.pinnedSibling)==null?void 0:d.rowIndex)!=null?g:0)-((h=(u=c.pinnedSibling)==null?void 0:u.rowIndex)!=null?h:0)}),!a)return;let n=Tc(o);n==="bottom"||n==="pinnedBottom"?this.order.push(a):this.order.unshift(a)}hide(e){let{all:t,visible:o}=this,i=o.size;return t.forEach(r=>e(r)?o.delete(r):o.add(r)),this.order=Array.from(o),this.sort(),i!=o.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function ld(e){var o;if(e.level===-1)return!0;let t=e.parent;return(o=t==null?void 0:t.childrenAfterSort)!=null&&o.some(i=>i==e)?ld(t):!1}function Qr(e,t){let{gos:o,rowModel:i,filterManager:r}=e;return vi(o,i)?!i.getRowNode(t.id):r!=null&&r.isAnyFilterPresent()?!ld(t):o.get("pivotMode")?!t.group:!1}function uf(e){return!!e.footer&&e.level===-1}function hf(e){return!!e.pinnedSibling&&uf(e.pinnedSibling)}function pf(e){var o;let t=e.findIndex(hf);if(t>-1)return(o=e.splice(t,1))==null?void 0:o[0]}var Ls=class extends S{constructor(){super(...arguments),this.csrm=null}postConstruct(){var r;let{gos:e,beans:t}=this;this.top=new zs(t,"top"),this.bottom=new zs(t,"bottom"),this.csrm=(r=it(t))!=null?r:null;let o=a=>Qr(t,a.pinnedSibling),i=()=>{let a=e.get("isRowPinned");a&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,a(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:a})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(l=>{n||(n=l.hide(o))});let s=this.refreshRowPositions();(!a||s||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(mf),this.refreshRowPositions()},rowNodeDataChanged:({node:a})=>{var l;let n=e.get("isRowPinnable");((l=n==null?void 0:n(a))!=null?l:!0)||this.pinRow(a,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(a=>a.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:a})=>{this._grandTotalPinned=a==="pinnedBottom"?"bottom":a==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{let o=[];t.forEach(i=>o.push(i)),o.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){var n,s,l;if(t!=null&&e.destroyed)return;if(e.footer){let c=e.level;if(c>-1)return;if(c===-1){this._grandTotalPinned=t,(n=this.csrm)==null||n.reMapRows();return}}let i=(l=e.rowPinned)!=null?l:(s=e.pinnedSibling)==null?void 0:s.rowPinned;if(i!=null&&t!=null&&t!=i){let c=e.rowPinned?e:e.pinnedSibling,d=e.rowPinned?e.pinnedSibling:e;this.pinRow(c,null,o),this.pinRow(d,t,o);return}let a=o&&vf(this.beans,e,o);if(a){a.forEach(c=>this.pinRow(c,t));return}if(t==null){let c=e.rowPinned?e:e.pinnedSibling,d=this.findPinnedRowNode(c);if(!d)return;d.delete(c);let g=c.pinnedSibling;Zr(c),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(g)}else{let c=Os(this.beans,e,t),d=this.getContainer(t);d.add(c),Qr(this.beans,e)&&d.hide(g=>Qr(this.beans,g.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,o=i=>{if(i.rowHeightEstimated){let r=Dt(this.beans,i);i.setRowTop(t),i.setRowHeight(r.height),t+=r.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Hs(this.top)}getPinnedBottomTotalHeight(){return Hs(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(){let e=t=>{let o=[];return this.forEachPinnedRow(t,i=>{var a;let r=(a=i.pinnedSibling)==null?void 0:a.id;r!=null&&o.push(r)}),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(let i of e[o]){let r=this.beans.rowModel.getRowNode(i);r?this.pinRow(r,o):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{let o=new Set;e.forEachQueued(i=>{let r=this.beans.rowModel.getRowNode(i);r&&o.add(r)});for(let i of o)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){var n;let{csrm:e,beans:t,_grandTotalPinned:o}=this;if(!e)return;let i=(n=e.rootNode)==null?void 0:n.sibling;if(!i)return;let r=i.pinnedSibling,a=r&&this.findPinnedRowNode(r);if(o){if(a&&a.floating!==o&&(Zr(r),a.delete(r)),!a||a.floating!==o){let s=Os(t,i,o);this.getContainer(o).add(s)}}else{if(!a)return;Zr(r),a.delete(r)}}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){let t=i=>ff(this.beans,i);if(e)return t(this.getContainer(e));let o=!1;return this.forContainers(i=>{let r=t(i);o||(o=r)}),o}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e==null||e.dispatchRowEvent("rowPinned")}};function ff(e,t){let o=0,i=!1;return t.forEach((r,a)=>{if(i||(i=r.rowTop!==o),r.setRowTop(o),r.rowHeightEstimated||r.rowHeight==null){let n=Dt(e,r).height;i||(i=r.rowHeight!==n),r.setRowHeight(n)}r.setRowIndex(a),o+=r.rowHeight}),i}function Os(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;let i=gf(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;let r=o==="top"?Mn:Pn;return i.id=`${r}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Zr(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);let t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function mf(e){let t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function vf(e,t,o){var a,n;let{rowSpanSvc:i}=e,r=(a=o&&(i==null?void 0:i.isCellSpanning(o,t)))!=null?a:!1;if(o&&r)return(n=i==null?void 0:i.getCellSpan(o,t))==null?void 0:n.spannedNodes}function Hs(e){let t=e.size();if(t===0)return 0;let o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}var Bs=class extends S{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){let 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){let t=o=>{o.setRowHeight(o.rowHeight,!0)};Go(this.pinnedBottomRows,t),Go(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0,o=i=>{if(i.rowHeightEstimated){let r=Dt(this.beans,i);i.setRowTop(t),i.setRowHeight(r.height),t+=r.height,e=!0}};return Go(this.pinnedBottomRows,o),t=0,Go(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){var d,g;let o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}let i=Mo(this.gos),r=t==="top"?Mn:Pn,a=new Set(o.order),n=[],s=new Set,l=0,c=-1;for(let u of e){let h=(d=i==null?void 0:i({data:u,level:0,rowPinned:t}))!=null?d:r+this.nextId++;if(s.has(h)){R(96,{id:h,data:u});continue}c++,s.add(h),n.push(h);let p=Xo(o,h);if(p!==void 0)p.data!==u&&p.updateData(u),l+=this.setRowTopAndRowIndex(p,l,c),a.delete(h);else{let f=new Pt(this.beans);f.id=h,f.data=u,f.rowPinned=t,l+=this.setRowTopAndRowIndex(f,l,c),o.cache[h]=f,o.order.push(h)}}for(let u of a)(g=Xo(o,u))==null||g.clearRowTopAndRowIndex(),delete o.cache[u];o.order=n}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(Dt(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return Ns(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return Ns(this.pinnedBottomRows)}getPinnedTopRowCount(){return Ba(this.pinnedTopRows)}getPinnedBottomRowCount(){return Ba(this.pinnedBottomRows)}getPinnedTopRow(e){return Ha(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Ha(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Xo(this.getCache(t),e)}forEachPinnedRow(e,t){return Go(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function Ns(e){let t=Ba(e);if(t===0)return 0;let o=Ha(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function Xo(e,t){return e.cache[t]}function Ha(e,t){return Xo(e,e.order[t])}function Go(e,t){e.order.forEach((o,i)=>{let r=Xo(e,o);r&&t(r,i)})}function Ba(e){return e.order.length}var Cf=class extends S{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){let{gos:e}=this,t=()=>{let o=e.get("enableRowPinning"),i=Tc(e),a=!!o||(i==="pinnedBottom"||i==="pinnedTop"),n=a?this.inner instanceof Bs:this.inner instanceof Ls;this.inner&&n&&this.destroyBean(this.inner),(n||!this.inner)&&(this.inner=this.createManagedBean(a?new Ls:new Bs))};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()}};var wf=500,bf=550,Ri,yf=e=>{if(!Ri)Ri=new WeakSet;else if(Ri.has(e))return!1;return Ri.add(e),!0},Vt=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 Qt;let i=this.onTouchStart.bind(this);this.startListener=i,this.eElement.addEventListener("touchstart",i,{passive:!0})}o.addEventListener(e,t)}removeEventListener(e,t){var o;(o=this.eventSvc)==null||o.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!yf(e))return;let t=e.touches[0];this.touchStart=t;let o=this.handlers;if(!o.length){let i=this.eElement,r=i.ownerDocument,a=this.onTouchMove.bind(this),n=this.onTouchEnd.bind(this),s=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Hi(o,[i,"touchmove",a,l],[r,"touchcancel",s,l],[r,"touchend",n,c],[r,"contextmenu",St,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{var i;this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,(i=this.eventSvc)==null||i.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},bf)}onTouchMove(e){let{moved:t,touchStart:o}=this;if(!t&&o){let i=vo(o,e.touches);i&&!mc(i,o,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){var o;let t=this.touchStart;!t||!vo(t,e.changedTouches)||(this.moved||((o=this.eventSvc)==null||o.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&St(e),this.cancel())}onTouchCancel(e){let t=this.touchStart;!t||!vo(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){var i;let t=Date.now(),o=this.lastTapTime;o&&t-o>wf&&((i=this.eventSvc)==null||i.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),vn(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){let e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}};var Sf=1,xf=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Sf++,e!=null&&e.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(let o of Object.keys(e.providedBeanInstances))this.beans[o]=e.providedBeanInstances[o];for(let o of e.beanClasses){let i=new o;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${o.name} is missing beanName`),this.createdBeans.push(i)}for(let o of(t=e.derivedBeans)!=null?t:[]){let{beanName:i,bean:r}=o(this);this.beans[i]=r,this.createdBeans.push(r)}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){var i,r,a,n;let o=this.beans;for(let s of e)(i=s.preWireBeans)==null||i.call(s,o),(r=s.wireBeans)==null||r.call(s,o);for(let s of e)(a=s.preConstruct)==null||a.call(s);t&&e.forEach(t);for(let s of e)(n=s.postConstruct)==null||n.call(s)}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){var t;if(this.destroyed)return;this.destroyed=!0;let e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],(t=this.destroyCallback)==null||t.call(this)}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t[e,t]));function Ef(e,t){var r,a;let o=(r=e.beanName?Vs[e.beanName]:void 0)!=null?r:Number.MAX_SAFE_INTEGER,i=(a=t.beanName?Vs[t.beanName]:void 0)!=null?a:Number.MAX_SAFE_INTEGER;return o-i}function Ff(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}function Df(e){let{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${o==null?"null":o}.${i.getId()}`}function In(e,t){let o=e.column===t.column,i=e.rowPinned===t.rowPinned,r=e.rowIndex===t.rowIndex;return o&&i&&r}function Mf(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(I(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndexg.rowNode.rowIndex===t.rowIndex),l=s?a:n,c=(o?-1:1)*(s?-1:1),d;for(let g=0;g{if(!i.defaultPrevented&&!Bf(i)&&i.key===y.TAB){let r=i.shiftKey;so(e,o,!1,r)||Io(e,r)&&i.preventDefault()}}})}function zf(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Oe(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.exclusive)}function pi(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.exclusive)}function Io(e,t,o=!1){let i=e.ctrlsSvc.get("gridCtrl"),r=i.focusNextInnerContainer(t);return r===!0?!0:r===!1?r:((o||!t&&!i.isDetailGrid()&&i.isFocusInsideGridBody())&&i.forceFocusOutOfContainer(t),!1)}function Lf(e,t){let o=e.focusSvc,i=o.getFocusedCell();if(i&&t&&In(i,t)){let{rowIndex:r,rowPinned:a,column:n}=t;cn(e)&&o.setFocusedCell({rowIndex:r,column:n,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!od()})}}function Of(e,t){let o=e.getFocusableContainerName();return o==="gridBody"?t():dd(e,()=>$t(e.getGui(),".ag-tab-guard").length>0)?o:null}function dd(e,t){var o,i;(o=e.setAllowFocus)==null||o.call(e,!0);try{return t()}finally{(i=e.setAllowFocus)==null||i.call(e,!1)}}var Hf="__ag_Grid_Skip_Focusable_Container";function Bf(e){return e[Hf]===!0}function Fe(e){var t,o;return(o=(t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())!=null?o:0}function Tn(e){let t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(let i of o){if(!i)continue;let r=i.getGroupRowCount()||0;for(let a=0;as)&&(t[a]=l)}}}return t}function Nf(e,t){let i=e.colModel.isPivotMode()?Gf(e):ud(e),r=t.getHeaderCellCtrls();for(let a of r){let{column:n}=a,s=n.getAutoHeaderHeight();s!=null&&s>i&&n.isAutoHeaderHeight()&&(i=s)}return i}function An(e){let o=e.colModel.isPivotMode()?Vf(e):wi(e);return e.colModel.forAllCols(i=>{let r=i.getAutoHeaderHeight();r!=null&&r>o&&i.isAutoHeaderHeight()&&(o=r)}),o}function wi(e){var t;return(t=e.gos.get("headerHeight"))!=null?t:e.environment.getDefaultHeaderHeight()}function gd(e){var t;return(t=e.gos.get("floatingFiltersHeight"))!=null?t:wi(e)}function ud(e){var t;return(t=e.gos.get("groupHeaderHeight"))!=null?t:wi(e)}function Vf(e){var t;return(t=e.gos.get("pivotHeaderHeight"))!=null?t:wi(e)}function Gf(e){var t;return(t=e.gos.get("pivotGroupHeaderHeight"))!=null?t:ud(e)}function Wf(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function qf(e){return(e==null?void 0:e.headerRowIndex)!=null}var _f=class extends S{setComp(e,t,o){this.comp=e,this.eGui=t;let{beans:i}=this,{headerNavigation:r,touchSvc:a,ctrlsSvc:n}=i;r&&this.createManagedBean(new Ci(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();let s=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:s}),a==null||a.mockHeaderContextMenu(this,s),n.register("gridHeaderCtrl",this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>pt(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var n;let{beans:e}=this,t=0,o=Tn(e).reduce((s,l)=>s+l,0),i=An(e);(n=e.filterManager)!=null&&n.hasFloatingFilters()&&(t+=gd(e)),t+=o,t+=i;let r=e.environment.getHeaderRowBorderWidth(),a=t+r;if(this.headerHeightWithBorder!==a){this.headerHeightWithBorder=a;let s=`${a}px`;this.comp.setHeightAndMinHeight(s)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){let t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){let o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",o)}onTabKeyDown(e){let t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:r}=this,{headerNavigation:a,focusSvc:n}=r;(a.navigateHorizontally(i,!0,e)||!o&&n.focusOverlay(!1)||Io(r,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null,{headerNavigation:o}=this.beans;switch(e.key){case y.LEFT:t="LEFT";case y.RIGHT:{I(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case y.UP:t="UP";case y.DOWN:{I(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){let{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Y(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){var n;let{menuSvc:i,ctrlsSvc:r}=this.beans;if(!e&&!o||!(i!=null&&i.isHeaderContextMenuEnabled()))return;let{target:a}=e!=null?e:t;(a===this.eGui||a===((n=r.getHeaderRowContainerCtrl())==null?void 0:n.eViewport))&&i.showHeaderContextMenu(void 0,e,o)}},zn=class extends _{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Uf={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},jf=class extends zn{constructor(e){super(Uf,e),this.eResize=M,this.eHeaderCompWrapper=M,this.headerCompVersion=0}postConstruct(){let e=this.getGui(),t=()=>{let i=this.ctrl.getSelectAllGui();i&&(this.eResize.insertAdjacentElement("afterend",i),this.addDestroyFunc(()=>i.remove()))},o={setWidth:i=>e.style.width=i,toggleCss:(i,r)=>this.toggleCss(i,r),setUserStyles:i=>mi(e,i),setAriaSort:i=>i?Hu(e,i):Bu(e),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>{var i;return(i=this.ctrl.getSelectAllGui())==null?void 0:i.remove()}};this.ctrl.setComp(o,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){var e;this.headerComp&&((e=this.headerCompGui)==null||e.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;let t=this.headerCompVersion;e.newAgStackInstance().then(o=>this.afterCompCreated(t,o))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},Kf={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},$f=class extends zn{constructor(e){super(Kf,e),this.eResize=M,this.eHeaderCompWrapper=M}postConstruct(){let e=this.getGui(),t=(i,r)=>r!=null?e.setAttribute(i,r):e.removeAttribute(i),o={toggleCss:(i,r)=>this.toggleCss(i,r),setUserStyles:i=>mi(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>q(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(o,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){let t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}let o=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(o)}},Yf={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},Qf=class extends zn{constructor(e){super(Yf,e),this.eFloatingFilterBody=M,this.eButtonWrapper=M,this.eButtonShowMainFilter=M}postConstruct(){let e=this.getGui(),t={toggleCss:(o,i)=>this.toggleCss(o,i),setUserStyles:o=>mi(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>q(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>e.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){var e;(e=this.floatingFilterComp)==null||e.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}afterCompCreated(e){var t;if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),(t=e.afterGuiAttached)==null||t.call(e)}}},Zf=class extends _{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),ai(this.getGui(),this.ctrl.getAriaRowIndex());let t={setHeight:o=>this.getGui().style.height=o,setTop:o=>this.getGui().style.top=o,setHeaderCtrls:(o,i)=>this.setHeaderCtrls(o,i),setWidth:o=>this.getGui().style.width=o,setRowIndex:o=>ai(this.getGui(),o)};this.ctrl.setComp(t,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;let o=this.headerComps;this.headerComps={};for(let i of e){let r=i.instanceId,a=o[r];delete o[r],a==null&&(a=this.createHeaderComp(i),this.getGui().appendChild(a.getGui())),this.headerComps[r]=a}if(Object.values(o).forEach(i=>{i.getGui().remove(),this.destroyBean(i)}),t){let i=Object.values(this.headerComps);i.sort((a,n)=>{let s=a.getCtrl().column.getLeft(),l=n.getCtrl().column.getLeft();return s-l});let r=i.map(a=>a.getGui());hc(this.getGui(),r)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new $f(e);break;case"filter":t=new Qf(e);break;default:t=new jf(e);break}return this.createBean(t),t.setParentComponent(this),t}},Ln=class extends S{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){let e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){let e=se(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,r=t.getColsLeftWidth(),a=t.getDisplayedColumnsRightWidth(),n;e?n=i+r+a:(n=i,this.addSpacer&&(this.gos.get("enableRtl")?r:a)===0&&o.verticalScrollShowing&&(n+=o.getScrollbarWidth())),this.callback(n)}};function bi(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o!=null?o:e}var On=class extends S{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){let{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?U(t):this.columnOrGroup}postConstruct(){let e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){let{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=I(this.columnOrGroup.getOldLeft());(t==null?void 0:t.isActive())&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let 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(){let e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){let{gos:o,visibleCols:i}=this.beans;if(!se(o,"print")||e.getPinned()==="left")return t;let a=i.getColsLeftWidth();if(e.getPinned()==="right"){let n=i.bodyWidth;return a+n+t}return a+t}setLeft(e){if(I(e)&&(this.eCell.style.left=`${e}px`),X(this.columnOrGroup)){let t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Ou(this.ariaEl,t.length)}}},Jf="ag-column-first",Xf="ag-column-last";function hd(e,t,o,i){return Q(e)?[]:tm(e.headerClass,e,t,o,i)}function pd(e,t,o){e.toggleCss(Jf,o.isColAtEdge(t,"first")),e.toggleCss(Xf,o.isColAtEdge(t,"last"))}function em(e,t,o,i){return O(t,{colDef:e,column:o,columnGroup:i})}function tm(e,t,o,i,r){if(Q(e))return[];let a;if(typeof e=="function"){let n=em(t,o,i,r);a=e(n)}else a=e;return typeof a=="string"?[a]:Array.isArray(a)?[...a]:[]}var om=0,fd="headerCtrl",Hn=class extends S{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()+"-"+om++}postConstruct(){let e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,o,i,r){var a;t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,o,i,r),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus((a=this.lastFocusEvent)!=null?a:void 0))}shouldStopEventPropagation(e){let{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),r=i==null?void 0:i.suppressHeaderKeyboardEvent;if(!I(r))return!1;let a=O(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!r(a)}getWrapperHasFocus(){return Y(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(){let e=this.column.getDefinition();if(!e)return;let{headerStyle:t}=e,o;if(typeof t=="function"){let i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){let{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:r}=this,a=g=>{if(!this.isAlive()||!i.isAlive())return;let{paddingTop:u,paddingBottom:h,borderBottomWidth:p,borderTopWidth:f}=ao(this.eGui),m=u+h+p+f,C=t.offsetHeight+m;if(g<5){let w=te(r),b=!(w!=null&&w.contains(t)),x=C==0;if(b||x){Ea(()=>a(g+1),"raf",r);return}}this.setColHeaderHeight(this.column,C)},n=!1,s,l=()=>{let g=this.column.isAutoHeaderHeight();g&&!n&&c(),!g&&n&&d()},c=()=>{n=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),a(0),s=At(this.beans,t,()=>a(0))},d=()=>{n=!1,s&&s(),this.comp.toggleCss("ag-header-cell-auto-height",!1),s=void 0};l(),i.addDestroyFunc(()=>d()),i.addManagedListeners(this.column,{widthChanged:()=>n&&a(0)}),i.addManagedEventListeners({sortChanged:()=>{n&&window.setTimeout(()=>a(0))}}),o&&o(l)}onDisplayedColumnsChanged(){let{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(pd(e,t,o.visibleCols),nc(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let e=Oe(this.beans);this.eGui&&we(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var n,s;let t=Y(this.beans),o=e.key===y.LEFT||e.key===y.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)&&Uc(e)===y.C)return(n=this.beans.clipboardSvc)==null?void 0:n.copyToClipboard();if(!o)return;let a=e.key===y.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let l=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(l,e.shiftKey),(s=this.resizeFeature)==null||s.toggleColumnResizing(!0)}else this.moveHeader(a)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){let{gos:t,column:o}=this,i=e.key===y.LEFT!==t.get("enableRtl"),r=o.getPinned(),a=t.get("enableRtl");return r&&a!==(r==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){let t=this.getWrapperHasFocus();switch(e.key){case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:t&&e.preventDefault()}}addDomData(e){let t=fd,{eGui:o,gos:i}=this;Jt(i,o,t,this),e.addDestroyFunc(()=>Jt(i,o,t,null))}focus(e){if(!this.isAlive())return!1;let{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(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){let i=e!=null?e:t,{menuSvc:r,gos:a}=this.beans;a.get("preventDefaultOnContextMenu")&&i.preventDefault(),r!=null&&r.isHeaderContextMenuEnabled(o)&&r.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;let{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}},im=class extends Hn{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,o,i,r){this.comp=e;let{rowCtrl:a,column:n,beans:s}=this,{colResize:l,context:c,colHover:d,rangeSvc:g}=s,u=bi(this,c,r);this.setGui(t,u),this.updateState(),this.setupWidth(u),this.setupMovingCss(u),this.setupMenuClass(u),this.setupSortableClass(u),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:u}),this.addColumnHoverListener(u),this.setupFilterClass(u),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(u),this.setupSelectAll(u),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=u.createManagedBean(l.createResizeFeature(a.pinned,n,o,e,this)):q(o,!1),d==null||d.createHoverFeature(u,[n],t),g==null||g.createRangeHighlightFeature(u,n,e),u.createManagedBean(new On(n,t,s)),u.createManagedBean(new Ci(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(u),u.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),u.addManagedListeners(n,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let h=()=>this.checkDisplayName();u.addManagedEventListeners({columnValueChanged:h,columnRowGroupChanged:h,columnPivotChanged:h,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),u.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var o;(o=this.beans.colResize)==null||o.resizeHeader(this.column,e,t)}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.colDef;return O(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){let e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){let e=this.createParams(),t=this.column.getColDef();return Op(this.beans.userCompFactory,t,e)}createParams(){let{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return O(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!o&&(!this.openFilterEnabled||be(this.gos)),showColumnMenu:(a,n)=>{e==null||e.showColumnMenu({column:this.column,buttonElement:a,positionBy:"button",onClosedCallback:n})},showColumnMenuAfterMouseClick:(a,n)=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:a,positionBy:"mouse",onClosedCallback:n})},showFilter:a=>{e==null||e.showFilterMenu({column:this.column,buttonElement:a,containerType:"columnFilter",positionBy:"button"})},progressSort:a=>{t==null||t.progressSort(this.column,!!a,"uiColumnSorted")},setSort:(a,n)=>{t==null||t.setSortForColumn(this.column,Me(a),!!n,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(a,n)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(a,n)}})}setupSelectAll(e){var o;let{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),(o=this.selectAllFeature)==null||o.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{var r;let i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),(r=this.selectAllFeature)==null||r.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===y.SPACE?(t=this.selectAllFeature)==null||t.onSpaceKeyDown(e):e.key===y.ENTER?this.onEnterKeyDown(e):e.key===y.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var n,s;let{column:t,gos:o,sortable:i,beans:r}=this,a=!1;(e.ctrlKey||e.metaKey)&&(a=this.showMenuOnKeyPress(e,!0)),a||(!e.altKey&&xo(o)?(n=r.rangeSvc)==null||n.handleColumnSelection(t,e):i&&((s=r.sortSvc)==null||s.progressSort(t,e.shiftKey,"uiColumnSorted")))}showMenuOnKeyPress(e,t){let o=this.comp.getUserCompInstance();return _s(o)&&o.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),od()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){let e=()=>{let t=this.column.getColDef(),o=hd(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o);for(let r of o)i.has(r)?i.delete(r):this.comp.toggleCss(r,!0);for(let r of i)this.comp.toggleCss(r,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t,o;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=(o=(t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))!=null?o:null)}updateState(){let{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&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(let e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){let 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){let 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(){let e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){let t=()=>{let o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){let t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){let t=()=>{var o;(o=this.comp)==null||o.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){let t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){let t=()=>{let o=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",o),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let e=()=>{let t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){let 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(){var u,h;let{eGui:e,column:t,comp:o,beans:i}=this,r=Tn(this.beans),a=r.reduce((p,f)=>p+f,0)===0;if(o.toggleCss("ag-header-parent-hidden",a),!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}let{numberOfParents:n,isSpanningTotal:s}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",n>0);let l=An(i);if(n===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",s);let c=((h=(u=this.column.getFirstRealParent())==null?void 0:u.getLevel())!=null?h:-1)+1,d=r.length-c,g=0;for(let p=0;pa==="filter"?-1:n.charCodeAt(0)-a.charCodeAt(0)).map(a=>o.get(a)).join(". ");(r=e.ariaAnnounce)==null||r.announceValue(i,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){let t=r=>this.handleMouseOverChange(r.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=r=>this.handleContextMenuMouseEvent(r,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){let t=this.comp.getUserCompInstance();return _s(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function _s(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var rm=0,Jr=class extends S{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=rm++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";o==="group"?i="ag-header-row-group":o==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){var t;this.rowIndex=e,(t=this.comp)==null||t.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=se(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=bi(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){let t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=se(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{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;let{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0,t=Tn(this.beans);for(let r=0;r{let{focusSvc:r,visibleCols:a}=this.beans;return r.isHeaderWrapperFocused(i)?a.isVisible(i.column):!1};if(e)for(let[i,r]of e)o(r)?this.ctrlsById.set(i,r):this.destroyBean(r);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;let i=e.getUniqueId(),r;if(o&&(r=o.get(i),o.delete(i)),r&&r.column!=e&&(this.destroyBean(r),r=void 0),r==null)switch(this.type){case"filter":{r=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":r=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:r=this.createBean(new im(e,this));break}t.set(i,r)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];let e=[];for(let 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){let o=this.allCtrls.find(r=>r.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},am=class extends S{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;let{pinnedCols:o,ctrlsSvc:i,colModel:r,colMoves:a}=this.beans;this.setupCenterWidth(),o==null||o.setupHeaderPinnedWidth(this),this.setupDragAndDrop(a,this.eViewport);let n=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:n,advancedFilterEnabledChanged:n});let s=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(s,this),r.ready&&this.refresh()}getAllCtrls(){let e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){let{focusSvc:t,filterManager:o,visibleCols:i}=this.beans,r=0,a=t.getFocusHeaderToUseAfterRefresh(),n=()=>{let g=i.headerGroupRowCount;r=g,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));let u=this.groupsRowCtrls.length;if(u!==g){if(u>g){for(let h=g;h{let g=r++;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 Jr(g,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==g&&this.columnsRowCtrl.setRowIndex(g)},l=()=>{this.includeFloatingFilter=!!(o!=null&&o.hasFloatingFilters())&&!this.hidden;let g=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){g();return}e||g();let u=r++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==u&&this.filtersRowCtrl.setRowIndex(u):this.filtersRowCtrl=this.createBean(new Jr(u,this.pinned,"filter"))},c=this.getAllCtrls();n(),s(),l();let d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,a),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){let t=o=>o==null?void 0:o.getHeaderCellCtrls().find(i=>i.column===e);if(Mt(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;othis.comp.setCenterWidth(`${e}px`),!0))}},nm={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},sm={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},lm={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},Xr=class extends _{constructor(e){super(),this.eCenterContainer=M,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();let e={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{let i=this.getGui();i.style.width=o,i.style.maxWidth=o,i.style.minWidth=o}};this.createManagedBean(new am(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){let e=this.pinned=="left",t=this.pinned=="right",o=e?nm:t?sm:lm;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==M?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){let t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let o,i=r=>{let a=r.getGui();a.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(a),o&&uc(this.eRowContainer,a,o),o=a};for(let r of e){let a=r.instanceId,n=t[a];delete t[a];let s=n||this.createBean(new Zf(r));this.headerRowComps[a]=s,this.rowCompsList.push(s),i(s)}for(let r of Object.values(t))this.destroyRowComp(r)}},cm={tag:"div",cls:"ag-header",role:"presentation"},dm=class extends _{constructor(){super(cm)}postConstruct(){let e={toggleCss:(i,r)=>this.toggleCss(i,r),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new _f).setComp(e,this.getGui(),this.getFocusableElement());let o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new Xr("left")),o(new Xr(null)),o(new Xr("right"))}},gm={selector:"AG-HEADER-ROOT",component:dm},He={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Bn=class extends S{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=t.autoHeight?He.AUTO_HEIGHT:t.print?He.PRINT:He.NORMAL;this.view.updateLayoutClasses(o,t)}},md=class extends _{constructor(e,t){super(),this.direction=t,this.eViewport=M,this.eContainer=M,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Xc()||Kt())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=td(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){let 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(),pt(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){let t=this.eViewport;lh(this,()=>Ie(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},um={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"}]},hm=class extends md{constructor(){super(um,"horizontal"),this.eLeftSpacer=M,this.eRightSpacer=M,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();let 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 Ln(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(){var t,o;if(!this.invisibleScrollbar)return;let e=(o=(t=this.beans.pinnedRowModel)==null?void 0:t.getPinnedBottomTotalHeight())!=null?o:0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let e=this.scrollVisibleSvc.verticalScrollShowing,t=this.visibleCols.getDisplayedColumnsRightWidth(),o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),Je(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let r=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(r+=i),Je(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=i)}setScrollVisible(){let e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,a=o?0:i===0&&t?16:i,n=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Qo(this.getGui(),a),Qo(this.eViewport,a),Qo(this.eContainer,a),a||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(n,100):n()}getScrollPosition(){return Qi(this.eViewport,this.enableRtl)}setScrollPosition(e){Ie(this.eViewport)||this.attemptSettingScrollPosition(e),Zi(this.eViewport,e,this.enableRtl)}},pm={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:hm},vd=class extends S{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){let t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},fm={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"}]}]},mm=class extends md{constructor(){super(fm,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new vd(this.eContainer));let{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){let{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,r=i===0&&o?16:i;this.toggleCss("ag-scrollbar-invisible",o),Je(this.getGui(),r),Je(this.eViewport,r),Je(this.eContainer,r),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){let o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),r=o.scrollTop;i!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Ie(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},vm={selector:"AG-FAKE-VERTICAL-SCROLL",component:mm};var mt="Viewport",Us="fakeVScrollComp",ea=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],js=100,ta=150,Cm=class extends S{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=re(this,()=>this.lastScrollSource[1]=null,ta),this.resetLastVScrollDebounced=re(this,()=>this.lastScrollSource[0]=null,ta)}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");let 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,mt)});for(let e of ea){let t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){let e=this.gos.get("debounceVerticalScrollbar"),t=e?re(this,this.onVScroll.bind(this,mt),js):this.onVScroll.bind(this,mt),o=e?re(this,this.onVScroll.bind(this,Us),js):this.onVScroll.bind(this,Us);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(let t of[...ea,mt]){if(this.lastScrollSource[1]===t)continue;let o=this.getViewportForSource(t);Zi(o,e,this.enableRtl)}}getViewportForSource(e){return e===mt?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;let t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;let i=Qi(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t=e===mt?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition(),o=t;if(this.shouldBlockScrollUpdate(0,o,!0))return;e===mt?this.fakeVScrollComp.setScrollPosition(o):(this.eBodyViewport.scrollTop=t,o=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),o!==t&&this.fakeVScrollComp.setScrollPosition(o,!0));let{animationFrameSvc:i}=this;i==null||i.setScrollTop(o),this.nextScrollTop=o,i!=null&&i.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){let 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){let 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"})},ta)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!Kt()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){let t=hn(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){let 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(){let e=this.scrollLeft,t=!1;for(let o of ea)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(mt)}scrollGridIfNeeded(e=!1){let t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){let i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),Zi(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){let{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;let{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){let t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){let{rowModel:o}=this.beans,i=o.getRowCount(),r=-1;for(let a=0;a=0&&this.ensureIndexVisible(r,t)}ensureIndexVisible(e,t,o=0){if(se(this.gos,"print"))return;let{rowModel:i}=this.beans,r=i.getRowCount();if(typeof e!="number"||e<0||e>=r){R(88,{index:e});return}this.clearRetryListeners();let{frameworkOverrides:a,pageBounds:n,rowContainerHeight:s,rowRenderer:l}=this.beans;a.wrapIncoming(()=>{var p,f;let c=this.ctrlsSvc.getGridBodyCtrl(),d=i.getRow(e),g,u,h=0;this.invalidateVerticalScroll();do{let{stickyTopHeight:m,stickyBottomHeight:v}=c,C=d.rowTop,w=d.rowHeight,b=n.getPixelOffset(),x=d.rowTop-b,E=x+d.rowHeight,D=this.getVScrollPosition(),T=s.divStretchOffset,k=D.top+T,F=D.bottom+T,z=F-k,L=s.getScrollPositionForPixel(x),H=s.getScrollPositionForPixel(E-z),j=Math.min((L+H)/2,x),A=k+m>x,B=F-vz?V=L-m:V=H+v),V!==null&&(this.setVerticalScrollPosition(V),l.redraw({afterScroll:!0})),g=C!==d.rowTop||w!==d.rowHeight,u=m!==c.stickyTopHeight||v!==c.stickyBottomHeight,h++}while((g||u)&&h<10);if((p=this.animationFrameSvc)==null||p.flushAllFrames(),o<10&&(d!=null&&d.stub||!((f=this.beans.rowAutoHeight)!=null&&f.areRowsMeasured()))){let m=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{let v=this.getVScrollPosition().top;m!==v&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){for(let e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){let{colModel:o,frameworkOverrides:i}=this.beans,r=o.getCol(e);if(!r||r.isPinned()||!this.visibleCols.isColDisplayed(r))return;let a=this.getPositionedHorizontalScroll(r,t);i.wrapIncoming(()=>{var n;a!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(a),this.centerRowsCtrl.onHorizontalViewportChanged(),(n=this.animationFrameSvc)==null||n.flushAllFrames()})}getPositionedHorizontalScroll(e,t){let{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),r=this.centerRowsCtrl.getCenterWidth()r:oi;return{columnBeforeStart:n,columnAfterEnd:s}}getColumnBounds(e){let t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),r=e.getLeft(),a=t?-1:1,n=t?o-r:r,s=n+i*a,l=n+i/2*a;return{colLeft:n,colMiddle:l,colRight:s}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},Ks={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 wm(e,t,o=En()||0,i,r){return Cd(e,t,"horizontal",o,i,r)}function bm(e,t,o=En()||0,i,r){return Cd(e,t,"vertical",o,i,r)}function Cd(e,t,o,i,r,a){let n=Ks[o],s=Ks[n.opposite],l=r?Ie(r):!0,c=a?Ie(a):!0,d=n.overflow(e);if(d<=0)return!1;if(!t||i===0)return!0;let g=s.overflow(t);if(g<=0)return!0;if(d<=i){if(l&&c&&ym({candidateOverflow:g,candidateScrollSize:s.scrollSize(t),candidateClientSize:s.clientSize(t),scrollbarWidth:i}))return!1;let u=n.clientSize(e)+i;return n.scrollSize(e)<=u}return!0}function ym({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:o,scrollbarWidth:i}){if(e<=0||e>i)return!1;let r=o+i;return t>o&&t<=r}var Sm=class extends S{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(){let{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{pt(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){let{pinnedCols:e,colFlex:t}=this.beans;e==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t==null||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(){let e=this.gridBodyCtrl.eBodyViewport,t=hn(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;let e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){let{centerContainerCtrl:e,beans:t}=this,o=e.getCenterWidth(),i=e.getViewportScrollLeft();t.colViewport.setScrollPosition(o,i)}};function wd(e){var o;return e.altKey||e.ctrlKey||e.metaKey?!1:((o=e.key)==null?void 0:o.length)===1}function _i(e,t,o,i){var a;let r=(a=t.getColDef().cellRendererParams)==null?void 0:a.suppressMouseEventHandling;return bd(e,t,o,i,r)}function xm(e,t,o,i){let r=t==null?void 0:t.suppressMouseEventHandling;return bd(e,void 0,o,i,r)}function bd(e,t,o,i,r){return r?r(O(e,{column:t,node:o,event:i})):!1}function yd(e,t,o){let i=t;for(;i;){let r=Pc(e,i,o);if(r)return r;i=i.parentElement}return null}var dr="cellCtrl";function Nn(e,t){return yd(e,t,dr)}var gr="renderedRow";function km(e,t){return yd(e,t,gr)}function Na(e,t,o,i,r){let a=i?i.getColDef().suppressKeyboardEvent:void 0;if(!a)return!1;let n=O(e,{event:t,editing:r,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(a&&a(n))}function Rm(e){var d,g,u;let{pinnedRowModel:t,rowModel:o,rangeSvc:i,visibleCols:r}=e;if(!i||r.allCols.length===0)return;let a=(d=t==null?void 0:t.isEmpty("top"))!=null?d:!0,n=(g=t==null?void 0:t.isEmpty("bottom"))!=null?g:!0,s=a?null:"top",l,c;n?(l=null,c=o.getRowCount()-1):(l="bottom",c=(u=t==null?void 0:t.getPinnedBottomRowCount())!=null?u:-1),i.setCellRange({rowStartIndex:0,rowStartPinned:s,rowEndIndex:c,rowEndPinned:l})}var Em=class extends S{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){let e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";Xi("pointerdown")?e="pointerdown":Xi("touchstart")&&(e="touchstart");let t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(let o of t){let i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})}}processMouseEvent(e,t){var r;if(!ci(this.beans,t)||dt(t))return;let{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o!=null&&o.column&&o.dispatchCellContextMenuEvent(t),(r=this.beans.contextMenuSvc)==null||r.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){let{gos:t}=this;return{cellCtrl:Nn(t,e),rowCtrl:km(t,e)}}processKeyboardEvent(e,t){let{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i!=null&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){var a,n,s;let i=(n=(a=this.editSvc)==null?void 0:a.isEditing(e,{withOpenEditor:!0}))!=null?n:!1;!Na(this.gos,o,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&((s=this.beans.navigation)!=null&&s.handlePageScrollingKey(o))||e.onKeyDown(o),this.doGridOperations(o,i),wd(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){let{rowNode:i}=e,{focusSvc:r,navigation:a}=this.beans,n=r.getFocusedCell(),s=n==null?void 0:n.column;if(!Na(this.gos,o,i,s,!1)){let c=o.key;if(t==="keydown")switch(c){case y.PAGE_HOME:case y.PAGE_END:case y.PAGE_UP:case y.PAGE_DOWN:a==null||a.handlePageScrollingKey(o,!0);break;case y.LEFT:case y.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case y.UP:case y.DOWN:e.onKeyboardNavigate(o);break;case y.TAB:e.onTabKeyDown(o);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!ci(this.beans,e))return;let o=Uc(e),{clipboardSvc:i,undoRedo:r}=this.beans;if(o===y.A)return this.onCtrlAndA(e);if(o===y.C)return this.onCtrlAndC(i,e);if(o===y.D)return this.onCtrlAndD(i,e);if(o===y.V)return this.onCtrlAndV(i,e);if(o===y.X)return this.onCtrlAndX(i,e);if(o===y.Y)return this.onCtrlAndY(r);if(o===y.Z)return this.onCtrlAndZ(r,e)}onCtrlAndA(e){let{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:r}=this;o&>(r)&&!Bh(r)&&t.isRowsToRender()?Rm(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Oc(r)}),e.preventDefault()}onCtrlAndC(e,t){var i;if(!e||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){var i;if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){var i;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.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==null||e.redo("ui")}},Ei=e=>e.topRowCtrls,Fi=e=>e.getStickyTopRowCtrls(),Di=e=>e.getStickyBottomRowCtrls(),Mi=e=>e.bottomRowCtrls,Pi=e=>e.allRowCtrls,oa=e=>e.getCtrls("top"),ia=e=>e.getCtrls("center"),ra=e=>e.getCtrls("bottom"),Fm={center:{type:"center",name:"center-cols",getRowCtrls:Pi,getSpannedRowCtrls:ia},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Pi,getSpannedRowCtrls:ia},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Pi,getSpannedRowCtrls:ia},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Pi},topCenter:{type:"center",name:"floating-top",getRowCtrls:Ei,getSpannedRowCtrls:oa},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ei,getSpannedRowCtrls:oa},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ei,getSpannedRowCtrls:oa},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Ei},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Fi},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Fi},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Fi},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Fi},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Di},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Di},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Di},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Di},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Mi,getSpannedRowCtrls:ra},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Mi,getSpannedRowCtrls:ra},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Mi,getSpannedRowCtrls:ra},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Mi}};function Sd(e){return`ag-${yi(e).name}-viewport`}function xd(e){var o;let t=yi(e);return(o=t.container)!=null?o:`ag-${t.name}-container`}function Dm(e){return`ag-${yi(e).name}-spanned-cells-container`}function yi(e){return Fm[e]}var Mm=["topCenter","topLeft","topRight"],Pm=["bottomCenter","bottomLeft","bottomRight"],Im=["center","left","right"],Tm=["center","left","right","fullWidth"],Am=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],zm=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Lm=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],kd=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Rd=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Om=[...kd,"stickyTopFullWidth",...Rd,"stickyBottomFullWidth"],Hm=[...Mm,...Pm,...Im,...kd,...Rd],Bm=class extends S{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=yi(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Sm(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,i){var s;this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new Em((s=this.eViewport)!=null?s:this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let{pinnedCols:r,rangeSvc:a}=this.beans,n=()=>this.onPinnedWidthChanged();this.forContainers(zm,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r==null?void 0:r.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:n})}),this.forContainers(Lm,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r==null?void 0:r.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:n})}),this.forContainers(Tm,()=>this.createManagedBean(new vd(this.eContainer,this.name==="center"?i:void 0))),a&&this.forContainers(Hm,()=>this.createManagedBean(a.createDragListenerFeature(this.eContainer))),this.forContainers(Am,()=>this.createManagedBean(new Ln(l=>this.comp.setContainerWidth(`${l}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){let{spannedRowRenderer:e,gos:t}=this.beans,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{let i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(Om.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let t=()=>{let o=this.gos.get("ensureDomOrder"),i=se(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let{dragSvc:e}=this.beans;if(!e)return;let 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){let 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 si(this.eViewport)}getCenterViewportScrollLeft(){return Qi(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=At(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return gc(this.eViewport)}getViewportScrollLeft(){return Qi(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){var l,c,d;let{beans:e,gos:t,eViewport:o}=this,i=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:r}=e,a=(l=r.getGridBodyCtrl())==null?void 0:l.eBodyViewport,n=(c=r.get("fakeHScrollComp"))==null?void 0:c.getGui(),s=(d=r.get("fakeVScrollComp"))==null?void 0:d.getGui();return i||wm(o,a,void 0,n,s)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Zi(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){let t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let o=se(this.gos,"print"),r=this.gos.get("embedFullWidthRows")||o,a=t.filter(n=>{let s=n.isFullWidth();return this.options.fullWidth?!r&&s:r||!s});this.comp.setRowCtrls({rowCtrls:a,useFlushSync:e})}},Ed="ag-force-vertical-scroll",Nm="ag-selectable",Vm="ag-column-moving",Gm=class extends S{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,i,r,a,n){var s,l;this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=r,this.eStickyTop=a,this.eStickyBottom=n,this.eCenterColsViewport=o.querySelector(`.${Sd("center")}`),this.eFullWidthContainer=o.querySelector(`.${xd("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",c=>this.setCellTextSelection(c.currentValue)),this.createManagedBean(new Bn(this.comp)),this.scrollFeature=this.createManagedBean(new Cm(o)),(s=this.beans.rowDragSvc)==null||s.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,r,a,n]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(l=this.filterManager)==null||l.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){let 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){let t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){let e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){let{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();let o=t&&e.getScrollbarWidth()||0,i=td()?16:0,r=`calc(100% + ${o+i}px)`;pt(this.beans,()=>this.comp.setBodyViewportWidth(r)),this.updateScrollingClasses()}setGridRootRole(){let{rowGroupColsSvc:e,colModel:t,gos:o}=this,i=o.get("treeData");if(!i){let r=t.isPivotMode();i=(e?e.columns.length:0)>=(r?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){for(let t of e)this.addManagedElementListeners(t,{focusin:o=>{let{target:i}=o,r=_t(i,"ag-root",t);t.classList.toggle("ag-has-focus",!r)},focusout:o=>{let{target:i,relatedTarget:r}=o,a=t.contains(r),n=_t(r,"ag-root",t);_t(i,"ag-root",t)||(!a||n)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Vm,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Nm,e)}updateScrollingClasses(){let{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(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var r,a,n,s;let e=((a=(r=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:r.getRowCount())!=null?a:0)+((s=(n=this.filterManager)==null?void 0:n.getHeaderRowCount())!=null?s:0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){let t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){var c,d,g;let{gos:e,comp:t,ctrlsSvc:o}=this,i=e.get("alwaysShowVerticalScroll"),r=i?Ed:null,a=se(e,"normal");t.setAlwaysVerticalScrollClass(r,i);let n=(c=o.get("center"))==null?void 0:c.eViewport,s=(d=o.get("fakeHScrollComp"))==null?void 0:d.getGui(),l=(g=o.get("fakeVScrollComp"))==null?void 0:g.getGui();return i||a&&bm(this.eBodyViewport,n,void 0,l,s)}setupRowAnimationCssClass(){let{rowContainerHeight:e,environment:t}=this.beans,o=t.sizesMeasured,i=()=>{let r=o&&yo(this.gos)&&!e.stretching,a=r?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(a,r)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({stylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){let{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:r,beans:{popupSvc:a,touchSvc:n}}=this,s=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:s}),n==null||n.mockBodyContextMenu(this,s),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,a)});let l=this.onStickyWheel.bind(this);for(let d of[t,o,i,r])this.addManagedElementListeners(d,{wheel:l});let c=this.onHorizontalWheel.bind(this);for(let 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){let{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&ci(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){let{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){let{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){let{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){var r;if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();let{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&((r=this.beans.contextMenuSvc)==null||r.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&e.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){let t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){let{pinnedRowModel:e,beans:{environment:t}}=this,o=e==null?void 0:e.getPinnedTopTotalHeight(),i=e==null?void 0:e.getPinnedBottomTotalHeight(),r=t.getPinnedRowBorderWidth(),a=t.getRowBorderWidth(),n=r-a,s=o?n+o:0,l=i?n+i:0;this.comp.setTopHeight(s),this.comp.setBottomHeight(l),this.comp.setTopInvisible(s<=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{let t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){var r,a,n,s;let t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+((a=(r=this.filterManager)==null?void 0:r.getHeaderHeight())!=null?a:0),o=(s=(n=this.pinnedRowModel)==null?void 0:n.getPinnedTopTotalHeight())!=null?s:0,i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){var s;let{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=(s=e==null?void 0:e.getPinnedBottomTotalHeight())!=null?s:0,a=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,n=i+a;o.setStickyBottomBottom(`${n}px`)}};function oe(e){return Zt(e)}var Wm=class extends _{constructor(e,t,o,i,r){super(),this.cellCtrl=t,this.rowResizerElement=null,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;let a=oe({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=a;let n;t.isCellSpanning()?(n=oe({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),n.appendChild(a),this.setTemplateFromElement(n)):this.setTemplateFromElement(a),this.cellCssManager=new Jc(()=>a),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);let s={toggleCss:(l,c)=>this.cellCssManager.toggleCss(l,c),setUserStyles:l=>mi(a,l),getFocusableElement:()=>a,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRowResizerElement:l=>this.setRowResizerElement(l),setRenderDetails:(l,c,d)=>this.setRenderDetails(l,c,d),setEditDetails:(l,c,d)=>this.setEditDetails(l,c,d),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(l,c)=>this.refreshEditStyles(l,c)};t.setComp(s,a,n,this.eCellWrapper,o,r,void 0)}getParentOfValue(){var e,t;return(t=(e=this.eCellValue)!=null?e:this.eCellWrapper)!=null?t:this.eCell}setRowResizerElement(e){this.rowResizerElement&&De(this.rowResizerElement),this.rowResizerElement=e,e&&this.eCell.appendChild(e)}setRenderDetails(e,t,o){var a;if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;let r=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(o||r)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),(a=this.rowDraggingComp)==null||a.refreshVisibility(),this.rowResizerElement&&!this.rowResizerElement.parentElement&&this.eCell.appendChild(this.rowResizerElement)}setEditDetails(e,t,o){e?this.createCellEditorInstance(e,t,o):this.destroyEditor()}removeControls(){let e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){let t=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=t||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=oe({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));let r=!o&&this.eCellWrapper!=null;r&&(De(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!o);let a=!e&&o,n=a&&this.eCellValue==null;if(n){let c=this.cellCtrl.getCellValueClass();this.eCellValue=oe({tag:"span",cls:c,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}let s=!a&&this.eCellValue!=null;s&&(De(this.eCellValue),this.eCellValue=void 0);let l=i||r||n||s;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){let{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:r,includeSelection:a}=this,n=s=>{s&&t.insertBefore(s.getGui(),o)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),n(this.rowDraggingComp)),r&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),n(this.dndSourceComp)),a&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),n(this.checkboxSelectionComp))}createCellEditorInstance(e,t,o){let i=this.editorVersion,r=e.newAgStackInstance(),{params:a}=e;r.then(s=>this.afterCellEditorCreated(i,s,a,t,o)),Q(this.cellEditor)&&a.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){let t=this.getParentOfValue();ne(t);let o=Lo(e);o!=null&&(t.textContent=o)}destroyRenderer(){let{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),De(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){var o,i;let{context:e}=this.beans;(((o=this.cellEditorPopupWrapper)==null?void 0:o.getGui().contains(Y(this.beans)))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),(i=this.hideEditorPopup)==null||i.call(this),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),De(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){var o;if(((o=this.cellRenderer)==null?void 0:o.refresh)==null||this.cellRendererClass!==e.componentClass)return!1;let t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){var a;let t=this.rendererVersion,o=n=>s=>{if(this.rendererVersion!==t||!this.isAlive())return;let c=n.newAgStackInstance(),d=this.afterCellRendererCreated.bind(this,t,n.componentClass);c==null||c.then(d)},{animationFrameSvc:i}=this.beans,r;if(i!=null&&i.active&&this.firstRender?r=(n,s=!1)=>{i.createTask(o(n),this.rowNode.rowIndex,"p2",n.componentFromFramework,s)}:r=n=>o(n)(),(a=e.params)!=null&&a.deferRender&&!this.cellCtrl.rowNode.group){let{loadingComp:n,onReady:s}=this.cellCtrl.getDeferLoadingCellRenderer();n&&(r(n),s.then(()=>r(e,!0)))}else r(e)}afterCellRendererCreated(e,t,o){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(o);return}this.cellRenderer=o,this.cellRendererClass=t;let r=o.getGui();if(this.cellRendererGui=r,r!=null){let a=this.getParentOfValue();ne(a),a.appendChild(r)}}afterCellEditorCreated(e,t,o,i,r){var c,d,g;let a=e!==this.editorVersion,{context:n}=this.beans;if(a){n.destroyBean(t);return}if((c=t.isCancelBeforeStart)==null?void 0:c.call(t)){n.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){R(97,{colId:this.column.getId()}),n.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();let l=i||((d=t.isPopup)==null?void 0:d.call(t));l?this.addPopupCellEditor(o,r):this.addInCellEditor(),this.refreshEditStyles(!0,l),(g=t.afterGuiAttached)==null||g.call(t),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){let{cellCssManager:o}=this;o.toggleCss("ag-cell-inline-editing",e&&!t),o.toggleCss("ag-cell-popup-editing",e&&!!t),o.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){let{eCell:e}=this;e.contains(Y(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),ne(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var b,x;let{gos:o,context:i,popupSvc:r,editSvc:a}=this.beans;o.get("editType")==="fullRow"&&R(98);let n=this.cellEditorPopupWrapper=i.createBean(a.createPopupEditorWrapper(e)),{cellEditor:s,cellEditorGui:l,eCell:c,rowNode:d,column:g,cellCtrl:u}=this,h=n.getGui();l&&h.appendChild(l);let p=o.get("stopEditingWhenCellsLoseFocus"),f=t!=null?t:(x=(b=s.getPopupPosition)==null?void 0:b.call(s))!=null?x:"over",m=o.get("enableRtl"),v={ePopup:h,additionalParams:{column:g,rowNode:d},type:"popupCellEditor",eventSource:c,position:f,alignSide:m?"right":"left",keepWithinBounds:!0},C=r.positionPopupByComponent.bind(r,v),w=r.addPopup({modal:p,eChild:h,closeOnEsc:!0,closedCallback:E=>{u.onPopupEditorClosed(E)},anchorToElement:c,positionCallback:C,ariaOwns:c});w&&(this.hideEditorPopup=w.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},qm=class extends _{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;let i=oe({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,o),this.setTemplateFromElement(i);let r=i.style;this.domOrder=this.rowCtrl.getDomOrder();let a={setDomOrder:n=>this.domOrder=n,setCellCtrls:n=>this.setCellCtrls(n),showFullWidth:n=>this.showFullWidth(n),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(n,s)=>this.toggleCss(n,s),setUserStyles:n=>mi(i,n),setTop:n=>r.top=n,setTransform:n=>r.transform=n,setRowIndex:n=>i.setAttribute("row-index",n),setRowId:n=>i.setAttribute("row-id",n),setRowBusinessKey:n=>i.setAttribute("row-business-key",n),refreshFullWidth:n=>{var l,c,d;let s=n();return this.fullWidthCellRendererParams=s,(d=(c=(l=this.fullWidthCellRenderer)==null?void 0:l.refresh)==null?void 0:c.call(l,s))!=null?d:!1}};e.setComp(a,this.getGui(),o,void 0),this.addDestroyFunc(()=>{e.unsetComp(o)})}setInitialStyle(e,t){let o=this.rowCtrl.getInitialTransform(t);if(o)e.style.setProperty("transform",o);else{let i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){let t=i=>{if(this.isAlive()){let r=i.getGui();this.getGui().appendChild(r),this.rowCtrl.setupDetailRowAutoHeight(r),this.setFullWidthRowComp(i,e.params)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){let t=new Map(this.cellComps);for(let o of e){let i=o.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(o)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;let t=[];for(let o of e){let i=this.cellComps.get(o.instanceId);i&&t.push(i.getGui())}hc(this.getGui(),t)}newCellComp(e){var i,r;let t=(r=(i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))!=null?r:!1,o=new Wm(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,o),this.getGui().appendChild(o.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}destroyCells(e){for(let t of e.values()){if(!t)continue;let o=t.cellCtrl.instanceId;this.cellComps.get(o)===t&&(t.detach(),t.destroy(),this.cellComps.delete(o))}}};function _m(e,t,o){let i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,r={tag:"div",ref:"eContainer",cls:xd(e),role:"rowgroup"};if(t.type==="center"||i){let a={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${Dm(e)}`,role:"presentation"};return r.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${Sd(e)}`,role:"rowgroup",children:[r,i?a:null]}}return r}var Um=class extends _{constructor(e){super(),this.eViewport=M,this.eContainer=M,this.eSpannedContainer=M,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=yi(this.name)}postConstruct(){this.setTemplate(_m(this.name,this.options,this.beans));let e={setHorizontalScroll:o=>this.eViewport.scrollLeft=o,setViewportHeight:o=>this.eViewport.style.height=o,setRowCtrls:({rowCtrls:o})=>this.setRowCtrls(o),setSpannedRowCtrls:o=>this.setRowCtrls(o,!0),setDomOrder:o=>{this.domOrder=o},setContainerWidth:o=>{this.eContainer.style.width=o,this.eSpannedContainer&&(this.eSpannedContainer.style.width=o)},setOffsetTop:o=>{let i=`translateY(${o})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new Bm(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){let{beans:o,options:i}=this,r=t?this.eSpannedContainer:this.eContainer,a=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},n={};t?this.rowCompsWithSpan=n:this.rowCompsNoSpan=n,this.lastPlacedElement=null;let s=[];for(let l of e){let c=l.instanceId,d=a[c],g;if(d)g=d,delete a[c];else{if(!l.rowNode.displayed)continue;g=new qm(l,o,i.type)}n[c]=g,s.push([g,!d])}this.removeOldRows(Object.values(a)),this.addRowNodes(s,r)}addRowNodes(e,t){let{domOrder:o}=this;for(let[i,r]of e){let a=i.getGui();o?this.ensureDomOrder(a,t):r&&t.appendChild(a)}}removeOldRows(e){for(let t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){uc(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},jm={selector:"AG-ROW-CONTAINER",component:Um};function Wo(e,t){return t.map(o=>{let i=`e${o[0].toUpperCase()+o.substring(1)}RowContainer`;return e[i]={name:o},{tag:"ag-row-container",ref:i,attrs:{name:o}}})}function Km(e){let t={},o={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:Wo(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:Wo(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:Wo(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:Wo(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:Wo(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var $m=class extends _{constructor(){super(...arguments),this.eGridRoot=M,this.eBodyViewport=M,this.eStickyTop=M,this.eStickyBottom=M,this.eTop=M,this.eBottom=M,this.eBody=M}postConstruct(){let{overlays:e,rangeSvc:t}=this.beans,o=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:r}=Km(!!o);this.setTemplate(r,[...o?[o]:[],pm,vm,gm,jm],i);let a=(s,l)=>{let c=`${s}px`;l.style.minHeight=c,l.style.height=c},n={setRowAnimationCssOnBodyViewport:(s,l)=>this.setRowAnimationCssOnBodyViewport(s,l),setColumnCount:s=>Lu(this.getGui(),s),setRowCount:s=>Au(this.getGui(),s),setTopHeight:s=>a(s,this.eTop),setBottomHeight:s=>a(s,this.eBottom),setTopInvisible:s=>this.eTop.classList.toggle("ag-invisible",s),setBottomInvisible:s=>this.eBottom.classList.toggle("ag-invisible",s),setStickyTopHeight:s=>this.eStickyTop.style.height=s,setStickyTopTop:s=>this.eStickyTop.style.top=s,setStickyTopWidth:s=>this.eStickyTop.style.width=s,setStickyBottomHeight:s=>{this.eStickyBottom.style.height=s,this.eStickyBottom.classList.toggle("ag-invisible",s==="0px")},setStickyBottomBottom:s=>this.eStickyBottom.style.bottom=s,setStickyBottomWidth:s=>this.eStickyBottom.style.width=s,setColumnMovingCss:(s,l)=>this.toggleCss(s,l),updateLayoutClasses:(s,l)=>{let c=[this.eBodyViewport.classList,this.eBody.classList];for(let d of c)d.toggle(He.AUTO_HEIGHT,l.autoHeight),d.toggle(He.NORMAL,l.normal),d.toggle(He.PRINT,l.print);this.toggleCss(He.AUTO_HEIGHT,l.autoHeight),this.toggleCss(He.NORMAL,l.normal),this.toggleCss(He.PRINT,l.print)},setAlwaysVerticalScrollClass:(s,l)=>this.eBodyViewport.classList.toggle(Ed,l),registerBodyViewportResizeListener:s=>{let l=At(this.beans,this.eBodyViewport,s);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:s=>this.eTop.style.overflowY=this.eBottom.style.overflowY=s,setCellSelectableCss:(s,l)=>{for(let c of[this.eTop,this.eBodyViewport,this.eBottom])c.classList.toggle(s,l)},setBodyViewportWidth:s=>this.eBodyViewport.style.width=s,setGridRootRole:s=>Et(this.eGridRoot,s)};this.ctrl=this.createManagedBean(new Gm),this.ctrl.setComp(n,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&>(this.gos)||gi(this.gos))&&Tu(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){let o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}getFocusableContainerName(){return"gridBody"}},Ym={selector:"AG-GRID-BODY",component:$m},aa={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Qm=class extends ve{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:o,eTopGuard:i,eBottomGuard:r,focusTrapActive:a,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:s,focusInnerElement:l,onFocusIn:c,onFocusOut:d,shouldStopEventPropagation:g,onTabKeyDown:u,handleKeyDown:h,isEmpty:p,eFocusableElement:f}=e;this.comp=o,this.eTopGuard=i,this.eBottomGuard=r,this.providedFocusInnerElement=l,this.eFocusableElement=f,this.focusTrapActive=!!a,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!s,this.providedFocusIn=c,this.providedFocusOut=d,this.providedShouldStopEventPropagation=g,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new rd(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(let 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;let e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():$t(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;let t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){var l;let t=te(this.beans),o=$t(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let r,a;e?(r=0,a=i):(r=i+1,a=o.length);let n=o.slice(r,a),s=this.gos.get("tabIndex");n.sort((c,d)=>{let g=Number.parseInt(c.getAttribute("tabindex")||"0"),u=Number.parseInt(d.getAttribute("tabindex")||"0");return u===s?1:g===s?-1:g===0?1:u===0?-1:g-u}),(l=n[e?n.length-1:0])==null||l.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;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=$t(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 so(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t!=null?t:!0)}setAllowFocus(e){this.allowFocus=e}},Zm=class extends ve{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();let{eTopGuard:t,eBottomGuard:o,eFocusableElement:i,stopPropagationCallbacks:r}=this,a=[t,o],n={setTabIndex:v=>{for(let C of a)v==null?C.removeAttribute("tabindex"):C.setAttribute("tabindex",v)}};this.addTabGuards(t,o);let{focusTrapActive:s=!1,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:g,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new Qm({comp:n,focusTrapActive:s,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:g,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m},r))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){let t=te(this.beans).createElement("div"),o=e==="top"?aa.TAB_GUARD_TOP:aa.TAB_GUARD_BOTTOM;return t.classList.add(aa.TAB_GUARD,o),Et(t,"presentation"),t}addTabGuards(e,t){let o=this.eFocusableElement;o.prepend(e),o.append(t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];ne(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){mn(t)||(t=t.getGui());let{eBottomGuard:i}=this;i?i.before(t):e(t,o)}destroy(){let{eTopGuard:e,eBottomGuard:t}=this;De(e),De(t),super.destroy()}},Jm=class extends Oo{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new Zm(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)}},Fd=class extends Jm{initialiseTabGuard(e){super.initialiseTabGuard(e,nd)}},$s=(e,t)=>dd(e,()=>Xt(e.getGui(),t,!1,!0)),Ys=e=>{var t;return(t=e==null?void 0:e.getFocusableContainerName())!=null?t:"external"},Xm=e=>e==null?"external":typeof e=="string"?e:"gridBody",ev=class extends S{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());let{dragAndDrop:i,ctrlsSvc:r}=this.beans;i==null||i.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Bn(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");let a=At(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>a()),r.register("gridCtrl",this)}isDetailGrid(){var t;let e=id(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,o,i,r,a;let e=this.beans;return{paginationSelector:(t=e.pagination)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(o=e.registry)==null?void 0:o.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:(i=e.sideBar)==null?void 0:i.getSelector(),statusBarSelector:(r=e.registry)==null?void 0:r.getSelector("AG-STATUS-BAR"),watermarkSelector:(a=e.licenseManager)==null?void 0:a.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){let{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){let t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e),r=o===-1?e?t.length-1:0:i,{gos:a,beans:{focusSvc:n,navigation:s}}=this,l=a.getCallback("tabToNextGridContainer");if(l){let c=n.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:r}),d=Ys(t[r]),g=c==null&&d==="gridBody"?"gridBody":Xm(c),u=l({backwards:e,previousContainer:Ys(t[o]),nextContainer:g,defaultTarget:c});if(u!==void 0){if(typeof u=="boolean")return u;if(typeof u=="string"){if(u==="gridBody")return this.focusGridBodyDefault(e)||void 0;let h=t.find(p=>p.getFocusableContainerName()===u);if(!h){bc(`tabToNextGridContainer - ${u} container not found`);return}return $s(h,e)?!0:void 0}return qf(u)?n.focusHeaderPosition({headerPosition:u})||void 0:(s==null||s.ensureCellVisible(u),n.setFocusedCell({...u,forceBrowserFocus:!0}),n.isCellFocused(u)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:o,nextIndex:r})||void 0}focusInnerElement(e){let{gos:t,beans:o,beans:{focusSvc:i,visibleCols:r}}=this,a=t.getCallback("focusGridInnerElement");if(a!=null&&a({fromBottom:!!e}))return!0;let n=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:n,indexWithFocus:n.length,nextIndex:n.length-1})?!0:i.focusGridView({column:U(r.allCols),backwards:!0});let s=r.allCols;if(t.get("headerHeight")===0||Oe(o)){if(i.focusGridView({column:s[0],backwards:e}))return!0;for(let l=1;lr.getGui().contains(o));return{indexWithFocus:i,nextIndex:i+(t?-1:1)}}focusGridBodyDefault(e){let{gos:t,beans:o,beans:{focusSvc:i,visibleCols:{allCols:r}}}=this;return e?i.focusGridView({column:U(r),backwards:!0}):t.get("headerHeight")===0||Oe(o)?i.focusGridView({column:r[0]}):i.focusFirstHeader()}focusNextInnerContainerDefault(e){let{backwards:t,focusableContainers:o,indexWithFocus:i}=e,r=t?-1:1;for(let a=e.nextIndex;a>=0&&aa:ithis.destroyBean(this),setRtlClass:a=>this.addCss(a),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:a=>{this.getGui().style.userSelect=a!=null?a:"",this.getGui().style.webkitUserSelect=a!=null?a:""},setCursor:a=>{this.getGui().style.cursor=a!=null?a:""}},t=this.createManagedBean(new ev),o=t.getOptionalSelectors(),i=this.createTemplate(o),r=[Ym,...Object.values(o).filter(a=>!!a)];this.setTemplate(i,r),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:a=>t.focusInnerElement(a),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){let e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{e.remove(),Ft(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){let o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:r,PRINT:a}=He,{autoHeight:n,normal:s,print:l}=t;o.toggle(i,n),o.toggle(r,s),o.toggle(a,l),this.toggleCss(i,n),this.toggleCss(r,s),this.toggleCss(a,l)}createTemplate(e){let t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones",ref:"gridHeaderDropZones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar",ref:"statusBar"}:null,r=e.watermarkSelector?{tag:"ag-watermark"}:null,a=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},i,a,r]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){var t;if(!e&&((t=this.pagination)!=null&&t.isDisplayed())){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){var t,o,i;let e=[...(i=(o=(t=this.gridHeaderDropZones)==null?void 0:t.getFocusableContainers)==null?void 0:o.call(t))!=null?i:[],this.gridBody];for(let r of[this.sideBar,this.statusBar,this.pagination])r&&e.push(r);return e.filter(r=>Ie(r.getGui()))}},N=(e,t)=>{for(let o of Object.keys(t))t[o]=e;return t},Qs={dispatchEvent:"CommunityCore",...N("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...N("GridState",{getState:0,setState:0}),...N("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...N("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...N("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...N("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...N("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...N("ValueCache",{expireValueCache:0}),...N("CellApi",{getCellValue:0}),...N("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...N("Sort",{onSortChanged:0}),...N("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...N("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...N("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...N("HighlightChanges",{flashCells:0}),...N("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...N("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}),...N("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...N("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...N("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...N("ColumnResize",{setColumnWidths:0}),...N("ColumnHover",{isColumnHovered:0}),...N("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...N("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...N("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...N("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...N("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...N("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...N("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...N("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...N("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...N("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...N("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}),...N("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...N("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...N("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...N("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...N("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...N("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...N("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...N("ContextMenu",{showContextMenu:0}),...N("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...N("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...N("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...N("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...N("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}),...N("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...N("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...N("StatusBar",{getStatusPanel:0}),...N("AiToolkit",{getStructuredSchema:0})},na={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},ov=(e,t)=>e.eventSvc.dispatchEvent(t),Dd=class{};Reflect.defineProperty(Dd,"name",{value:"GridApi"});var iv=class extends S{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Dd,this.fns={...na,dispatchEvent:ov},this.preDestroyLink="";let{api:e}=this;for(let t of Object.keys(Qs))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var r,a;let{fns:o,beans:i}=this;o!==na&&(o[e]=(a=(r=i==null?void 0:i.validation)==null?void 0:r.validateApiFunction(e,t))!=null?a:t)}makeApi(e){return{[e]:(...t)=>{let{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){let{beans:t,gos:o,preDestroyLink:i}=this;if(!t)R(26,{fnName:e,preDestroyLink:i});else{let r=Qs[e];o.assertModuleRegistered(r,`api.${e}`)&&R(27,{fnName:e,module:r})}}destroy(){super.destroy(),this.fns=na,this.beans=null}};function rv(e){return e.context.getId()}function av(e){e.gridDestroySvc.destroy()}function nv(e){return e.gridDestroySvc.destroyCalled}function sv(e,t){return e.gos.get(t)}function lv(e,t,o){Md(e,{[t]:o})}function Md(e,t){e.gos.updateGridOptions({options:t})}function cv(e,t){let o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}function dv(e,t,o){let i=ye(e,t,o);if(i){let{className:a}=i;if(typeof a=="string"&&a.includes("ag-icon")||typeof a=="object"&&a["ag-icon"])return i}let r=oe({tag:"span"});return r.appendChild(i),r}function ye(e,t,o){var a;let i=null;e==="smallDown"?R(262):e==="smallLeft"?R(263):e==="smallRight"&&R(264);let r=o==null?void 0:o.getColDef().icons;if(r&&(i=r[e]),t.gos&&!i){let n=t.gos.get("icons");n&&(i=n[e])}if(i){let n;if(typeof i=="function")n=i();else if(typeof i=="string")n=i;else{R(38,{iconName:e});return}if(typeof n=="string")return pn(n);if(mn(n))return n;R(133,{iconName:e});return}else{let n=t.registry.getIcon(e);return n||(a=t.validation)==null||a.validateIcon(e),oe({tag:"span",cls:`ag-icon ag-icon-${n!=null?n:e}`,role:"presentation",attrs:{unselectable:"on"}})}}var gv={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},uv=class extends _{constructor(e,t,o){super(gv),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(ye("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){let{rowNode:t,column:o,eCell:i,gos:r}=this,a=o.getColDef().dndSourceOnRowDrag,n=e.dataTransfer;if(n.setDragImage(i,0,0),a){let s=O(r,{rowNode:t,dragEvent:e});a(s)}else try{let s=JSON.stringify(t.data);n.setData("application/json",s),n.setData("text/plain",s)}catch{}}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},hv=".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)}",pv={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"}]}]},fv=class extends _{constructor(){super(),this.dragSource=null,this.eIcon=M,this.eLabel=M,this.eGhost=M,this.registerCSS(hv)}postConstruct(){let e=t=>dv(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(pv),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){let{eGhost:o,eIcon:i,dragSource:r,dropIconMap:a,gos:n}=this;ne(i);let s=null;e||(e=r!=null&&r.getDefaultIconName?r.getDefaultIconName():"notAllowed"),s=a[e],o.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(s===a.hide&&n.get("suppressDragLeaveHidesColumns"))&&s&&i.appendChild(s)}setLabel(e){this.eLabel.textContent=e}};function mv(e,t){var o,i;(i=(o=e.rowDragSvc)==null?void 0:o.rowDragFeature)==null||i.addRowDropZone(t)}function vv(e,t){var i,r;let o=(i=e.dragAndDrop)==null?void 0:i.findExternalZone(t.getContainer());o&&((r=e.dragAndDrop)==null||r.removeDropTarget(o))}function Cv(e,t){var o,i;return(i=(o=e.rowDragSvc)==null?void 0:o.rowDragFeature)==null?void 0:i.getRowDropZone(t)}function wv(e){let t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function bv(e,t){let o=e.rowDropHighlightSvc;if(!o)return;let i=t==null?void 0:t.row,r=t==null?void 0:t.dropIndicatorPosition;r!=="above"&&r!=="below"&&r!=="inside"&&(r="none");let a=i==null?void 0:i.rowIndex;a==null||r==="none"?o.clear():o.set(i,r)}var Pd=(e,t)=>{if(t!=null&&(e!=null&&e.setPointerCapture))try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},yv=(e,t)=>{if(typeof PointerEvent=="undefined"||!(t instanceof PointerEvent))return null;let o=t.pointerId;if(!Pd(e,o))return null;let i={eElement:e,pointerId:o,onLost(r){xv(i,r)}};return e.addEventListener("lostpointercapture",i.onLost),i},Sv=e=>{if(!e)return;Id(e);let{eElement:t,pointerId:o}=e;if(t){try{t.releasePointerCapture(o)}catch{}e.eElement=null}},Id=e=>{let{eElement:t,onLost:o}=e;t&&o&&(t.removeEventListener("lostpointercapture",o),e.onLost=null)},xv=(e,t)=>{Id(e);let{eElement:o,pointerId:i}=e;o&&t.pointerId===i&&Pd(o,i)},ke,$e,sa={passive:!0},vt={passive:!1},_e=e=>{if(!$e)$e=new WeakSet;else if($e.has(e))return!1;return $e.add(e),!0},kv=class extends ve{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){var e,t;return(t=(e=this.drag)==null?void 0:e.start.target)!=null?t:null}isPointer(){return!!(ke!=null&&ke.has(je(this.beans)))}hasPointerCapture(){var t,o,i;let e=(t=this.drag)==null?void 0:t.pointerCapture;return!!(e&&((i=(o=this.beans.eRootDiv).hasPointerCapture)!=null&&i.call(o,e.pointerId)))}destroy(){this.drag&&this.cancelDrag();let e=this.dragSources;for(let t of e)Zs(t);e.length=0,super.destroy()}removeDragSource(e){let t=this.dragSources;for(let o=0,i=t.length;othis.onPointerDown(e,c),vt],[t,"mousedown",c=>this.onMouseDown(e,c)]);let l=this.gos.get("suppressTouch");o&&!l&&Hi(i,[t,"touchstart",d=>this.onTouchStart(e,d),vt])}cancelDrag(e){var o,i;let t=this.drag;e!=null||(e=t==null?void 0:t.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(i=t==null?void 0:(o=t.params).onDragCancel)==null||i.call(o),this.destroyDrag()}shouldPreventMouseEvent(e){let t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&ci(this.beans,e)&&!Yo(ca(e))}initDrag(e,...t){this.drag=e;let o=this.beans,i=s=>this.onScroll(s),r=s=>this.onKeyDown(s),a=je(o),n=te(o);Hi(e.handlers,[a,"contextmenu",St],[a,"keydown",r],[n,"scroll",i,{capture:!0}],[n.defaultView||window,"scroll",i],...t)}destroyDrag(){this.dragging=!1;let e=this.drag;if(e){let t=e.rootEl;(ke==null?void 0:ke.get(t))===e&&ke.delete(t),this.drag=null,Sv(e.pointerCapture),vn(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;let o=this.beans;if($e!=null&&$e.has(t))return;let i=t.pointerType;if(i==="touch"&&(o.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Yo(ca(t))))||!t.isPrimary||i==="mouse"&&t.button!==0)return;this.destroyDrag();let r=je(o),a=e.eElement,n=t.pointerId,s=new la(r,e,t,n);ke!=null||(ke=new WeakMap),ke.set(r,s);let l=u=>{u.pointerId===n&&this.onMouseOrPointerMove(u)},c=u=>{u.pointerId===n&&this.onMouseOrPointerUp(u)},d=u=>{u.pointerId===n&&_e(u)&&this.cancelDrag()},g=u=>this.draggingPreventDefault(u);this.initDrag(s,[r,"pointerup",c],[r,"pointercancel",d],[r,"pointermove",l,vt],[r,"touchmove",g,vt],[a,"mousemove",g,vt]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):_e(t)}onTouchStart(e,t){var u;if(this.gos.get("suppressTouch")||!e.includeTouch||!_e(t)||Yo(ca(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&St(t);return}this.destroyDrag();let i=this.beans,r=je(i),a=new la(r,e,t.touches[0]),n=h=>this.onTouchMove(h),s=h=>this.onTouchUp(h),l=h=>this.onTouchCancel(h),c=h=>this.draggingPreventDefault(h),d=je(i),g=(u=t.target)!=null?u:e.eElement;this.initDrag(a,[g,"touchmove",n,sa],[g,"touchend",s,sa],[g,"touchcancel",l,sa],[d,"touchmove",c,vt],[d,"touchend",s,vt],[d,"touchcancel",l,vt]),e.dragStartPixels===0&&this.onMove(a.start)}draggingPreventDefault(e){this.dragging&&St(e)}onMouseDown(e,t){if(t.button!==0||$e!=null&&$e.has(t)||this.isPointer())return;let o=this.beans;this.destroyDrag();let i=new la(je(o),e,t),r=s=>this.onMouseOrPointerMove(s),a=s=>this.onMouseOrPointerUp(s),n=je(o);this.initDrag(i,[n,"mousemove",r],[n,"mouseup",a]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):_e(t)}onScroll(e){var i,r;if(!_e(e))return;let t=this.drag,o=t==null?void 0:t.lastDrag;o&&this.dragging&&((r=(i=t.params)==null?void 0:i.onDragging)==null||r.call(i,o))}onMouseOrPointerMove(e){var t;_e(e)&&(Lt()&&((t=te(this.beans).getSelection())==null||t.removeAllRanges()),this.shouldPreventMouseEvent(e)&&St(e),this.onMove(e))}onTouchCancel(e){let t=this.drag;!t||!_e(e)||vo(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){let t=this.drag;if(!t||!_e(e))return;let o=vo(t.start,e.touches);o&&(this.onMove(o),this.draggingPreventDefault(e))}onMove(e){var i,r,a;let t=this.drag;if(!t)return;t.lastDrag=e;let o=t.params;if(!this.dragging){let n=t.start,s=o.dragStartPixels,l=s!=null?s:4;if(mc(e,n,l)||(this.dragging=!0,o.capturePointer&&(t.pointerCapture=yv(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:o.eElement}),(i=o.onDragStart)==null||i.call(o,n),this.drag!==t)||((r=o.onDragging)==null||r.call(o,n),this.drag!==t))return}(a=o.onDragging)==null||a.call(o,e)}onTouchUp(e){let t=this.drag;t&&_e(e)&&this.onUp(vo(t.start,e.changedTouches))}onMouseOrPointerUp(e){_e(e)&&this.onUp(e)}onUp(e){var o,i;let t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,(i=(o=t.params).onDragStop)==null||i.call(o,e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===y.ESCAPE&&this.cancelDrag()}},Zs=e=>{vn(e.handlers);let t=e.oldTouchAction;if(t!=null){let o=e.params.eElement.style;o&&(o.touchAction=t)}},la=class{constructor(e,t,o,i=null){this.rootEl=e,this.params=t,this.start=o,this.pointerId=i,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},ca=e=>{let t=e.target;return t instanceof Element?t:null},Rv=class extends kv{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},Ev=class extends S{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){let t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();let o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){let e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let 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)}},Fv={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Ii={skipAriaHidden:!0},Dv=class extends _{constructor(e,t,o,i,r,a=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=o,this.customGui=i,this.dragStartPixels=r,this.alwaysVisible=a,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){let{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(Fv),this.getGui().appendChild(ye("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){let{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;let{beans:e,column:t,rowNode:o}=this,{gos:i,dragAndDrop:r,rowDragSvc:a}=e,n=a==null?void 0:a.visibility,l=!(n==="suppress"||n==="hidden"&&!(r!=null&&r.hasExternalDropZones())),c=l;if(l&&!this.isCustomGui()&&t){let d=t.getColDef().rowDrag;if(d===!1)l=!1;else{let g=typeof d=="function";c=t.isRowDrag(o),l=g||c}}l&&c&&o.footer&&i.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Ii),c||this.setVisible(c,Ii),this.setDisabled(!c||n==="disabled"&&!(r!=null&&r.hasExternalDropZones())),l&&this.setDisplayed(l,Ii),c&&this.setVisible(c,Ii)}setDisabled(e){var t,o;e!==this.disabled&&(this.disabled=e,(o=(t=this.getGui())==null?void 0:t.classList)==null||o.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){var i,r;let e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];let o=(r=(i=this.beans.selectionSvc)==null?void 0:i.getSelectedNodes())!=null?r:[];return o.indexOf(e)!==-1?o:[e]}getDragItem(){let{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;let t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();let i=Xi("pointerdown")?{pointerdown:St}:{mousedown:St};this.mouseDownListener=this.addManagedElementListeners(t,i)[0]}let o=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:i=>this.getDragItemName(i,o),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){var n,s,l,c,d,g;let o=(e==null?void 0:e.dragItem)||this.getDragItem(),i=((l=(n=e==null?void 0:e.dropTarget)==null?void 0:n.rows.length)!=null?l:(s=o.rowNodes)==null?void 0:s.length)||1,r=(g=(d=(c=this.column)==null?void 0:c.getColDef())==null?void 0:d.rowDragText)!=null?g:this.gos.get("rowDragText");if(r)return r(o,i);if(i!==1)return`${i} ${t("rowDragRows","rows")}`;let a=this.cellValueFn();return a||`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)}},Mv=class{constructor(e){var t;this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=(t=e.scrollByTick)!=null?t: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){let o=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),i=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(o&&i)return;let r=this.scrollContainer.getBoundingClientRect(),a=this.scrollByTick;this.tickLeft=!i&&e.clientXr.right-a,this.tickUp=!o&&e.clientYr.bottom-a,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++;let e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Ui=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},ur=e=>{let t=e.childrenAfterGroup;for(;t!=null&&t.length;){let o=t[0];if(o.sourceRowIndex>=0)return o;t=o.childrenAfterGroup}},Pv=(e,t,o,i)=>{var g;if(!t.size||!e)return!1;let r=!1,a=(g=e.length)!=null?g:0,n=-1;o&&(n=o.sourceRowIndex,o=n<0?ur(o):null,o&&(n=o.sourceRowIndex)),n<0||n>=a?n=a:i||++n;let s=n,l=Math.min(n,a-1);for(let u of t){let h=u.sourceRowIndex;hl&&(l=h)}let c=s;for(let u=s;u=n;--u){let h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,r=!0),--d)}for(let u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,r=!0),++c;return r};function Iv(e,t){var o,i;return(i=(o=Nn(e,t.target))==null?void 0:o.getFocusedCellPosition())!=null?i:null}function Js(e,t){let o=se(e.gos,"normal"),i=t,r,a;i.clientX!=null||i.clientY!=null?(r=i.clientX,a=i.clientY):(r=i.x,a=i.y);let{pageFirstPixel:n}=e.pageBounds.getCurrentPagePixelRange();if(a+=n,o){let s=e.ctrlsSvc.getScrollFeature(),l=s.getVScrollPosition(),c=s.getHScrollPosition();r+=c.left,a+=l.top}return{x:r,y:a}}var Tv=.25,Av=class extends S{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,t=>{let o=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,i=new Mv({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:o,setVerticalPosition:r=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(r),onScrollCallback:()=>{var n;let r=o();if(this.autoScrollOldV!==r){this.autoScrollOldV=r,this.autoScrollChanging=!0;return}let a=this.autoScrollChanging;this.autoScrollChanged=a,this.autoScrollChanging=!1,a&&((n=e.dragAndDrop)==null||n.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=i,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){var t;return((t=e==null?void 0:e.dropTarget)==null?void 0:t.allowed)===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){var o;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let i=(o=this.beans.selectionSvc)==null?void 0:o.getSelectedNodes();if(i&&i.indexOf(t)>=0)return i.slice().sort(zv)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){var s;let{lastDraggingEvent:o,beans:i}=this;if(t){let l=this.getRowNodes(e);e.dragItem.rowNodes=l,el(l,!0)}this.lastDraggingEvent=e;let r=e.fromNudge,a=this.makeRowsDrop(o,e,r,!1);(s=i.rowDropHighlightSvc)==null||s.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);let n=this.autoScroll;a!=null&&a.rowDragManaged&&a.moved&&a.allowed&&a.sameGrid&&!a.suppressMoveWhenRowDragging&&(!r&&!(n!=null&&n.scrolling)||this.autoScrollChanged)&&this.dropRows(a),n==null||n.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,o,i){var m,v,C;let{beans:r,gos:a}=this,n=this.newRowsDrop(t,i),s=r.rowModel;if(t.dropTarget=n,t.changed=!1,!n)return null;let{sameGrid:l,rootNode:c,source:d,target:g}=n;g!=null||(g=(m=s.getRow(s.getRowCount()-1))!=null?m:null);let u=this.beans.groupEditSvc,h=!!(u!=null&&u.canSetParent(n)),p=null;if(g!=null&&g.footer){let w=(v=Oa(s,-1,g))!=null?v:Oa(s,1,g);h&&(p=(C=g.sibling)!=null?C:c),g=w!=null?w:null}g!=null&&g.detail&&(g=g.parent),n.moved&&(n.moved=d!==g);let f=.5;if(g&&(l&&n.moved&&(p||!h)?f=d.rowIndex>g.rowIndex?-.5:.5:f=(n.y-g.rowTop-g.rowHeight/2)/g.rowHeight||0),!h&&l&&g&&n.moved&&ee(a)){let w=Lv(s,n);w&&(f=d.rowIndex>w.rowIndex?-.5:.5,g=w,n.moved&&(n.moved=d!==g))}return n.target=g,n.newParent=p,n.pointerPos=Ov(g,n.y),n.yDelta=f,u==null||u.fixRowsDrop(n,h,o,f),this.validateRowsDrop(n,h,i),t.changed||(t.changed=Xs(e==null?void 0:e.dropTarget,n)),n}newRowsDrop(e,t){var p;let{beans:o,gos:i}=this,r=o.rowModel.rootNode,a=ee(i)?i.get("rowDragManaged"):!1,n=i.get("suppressMoveWhenRowDragging"),s=this.isFromThisGrid(e),{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!r)return null;let d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e),g=!0;a&&(!c.length||o.rowDragSvc.visibility!=="visible"||(n||!s)&&!d)&&(g=!1);let u=Js(o,e).y,h=this.getOverNode(u);return{api:o.gridApi,context:o.gridOptions.context,draggingEvent:e,rowDragManaged:a,suppressMoveWhenRowDragging:n,sameGrid:s,withinGrid:d,treeData:!1,rootNode:r,moved:l!==h,y:u,overNode:h,overIndex:(p=h==null?void 0:h.rowIndex)!=null?p:-1,pointerPos:"none",position:"none",source:l,target:h!=null?h:null,newParent:null,rows:c,allowed:g,highlight:!t&&a&&n&&(d||!s),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,o){var h;let{source:i,target:r,yDelta:a,inside:n,moved:s,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=i!==r);let{position:d,fallbackPosition:g}=this.computeDropPosition(s,n,a);e.position=d,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,c,"initial");let u=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");u&&this.applyDropValidator(e,t,o,l,u),l&&(e.rows=this.filterRows(e)),(h=this.beans.groupEditSvc)==null||h.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,c,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=g)}computeDropPosition(e,t,o){let i=o<0?"above":"below";return e?{position:t?"inside":i,fallbackPosition:i}:{position:"none",fallbackPosition:i}}enforceSuppressMoveWhenRowDragging(e,t,o){if(t){if(o==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,o,i,r){var s,l;(s=this.beans.groupEditSvc)==null||s.clearNewSameParent(e,t);let a=r(e);if(!a){e.allowed=!1;return}if(typeof a!="object")return;a.rows!==void 0&&(e.rows=(l=a.rows)!=null?l:[]),t&&a.newParent!==void 0&&(e.newParent=a.newParent),a.target!==void 0&&(e.target=a.target),a.position&&(e.position=a.position),a.allowed!==void 0?e.allowed=a.allowed:i||(e.allowed=!0);let n=e.draggingEvent;a.changed&&n&&(n.changed=!0),!o&&a.highlight!==void 0&&(e.highlight=a.highlight)}addRowDropZone(e){if(!e.getContainer()){R(55);return}let t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){R(56);return}let o=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(r=>e.onDragEnter(this.rowDragEvent("rowDragEnter",r))),onDragLeave:e.onDragLeave&&(r=>e.onDragLeave(this.rowDragEvent("rowDragLeave",r))),onDragging:e.onDragging&&(r=>e.onDragging(this.rowDragEvent("rowDragMove",r))),onDragStop:e.onDragStop&&(r=>e.onDragStop(this.rowDragEvent("rowDragEnd",r))),onDragCancel:e.onDragCancel&&(r=>e.onDragCancel(this.rowDragEvent("rowDragCancel",r)))},i={isInterestedIn:r=>r===2,getIconName:()=>"move",external:!0,...o};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:o=>{var i;this.onDragEnter(o),(i=e==null?void 0:e.onDragEnter)==null||i.call(e,this.rowDragEvent("rowDragEnter",o))},onDragLeave:o=>{var i;this.onDragLeave(o),(i=e==null?void 0:e.onDragLeave)==null||i.call(e,this.rowDragEvent("rowDragLeave",o))},onDragging:o=>{var i;this.onDragging(o),(i=e==null?void 0:e.onDragging)==null||i.call(e,this.rowDragEvent("rowDragMove",o))},onDragStop:o=>{var i;this.onDragStop(o),(i=e==null?void 0:e.onDragStop)==null||i.call(e,this.rowDragEvent("rowDragEnd",o))},onDragCancel:o=>{var i;this.onDragCancel(o),(i=e==null?void 0:e.onDragCancel)==null||i.call(e,this.rowDragEvent("rowDragCancel",o))},fromGrid:!0}}getOverNode(e){let{pageBounds:t,rowModel:o}=this.beans,r=e>t.getCurrentPagePixelRange().pageLastPixel?-1:o.getRowIndexAtPixel(e);return r>=0?o.getRow(r):void 0}rowDragEvent(e,t){var g;let o=this.beans,{dragItem:i,dropTarget:r,event:a,vDirection:n}=t,s=(r==null?void 0:r.rootNode)===o.rowModel.rootNode,l=s?r.y:Js(o,t).y,c=s?r.overNode:this.getOverNode(l),d=s?r.overIndex:(g=c==null?void 0:c.rowIndex)!=null?g:-1;return{api:o.gridApi,context:o.gridOptions.context,type:e,event:a,node:i.rowNode,nodes:i.rowNodes,overIndex:d,overNode:c,y:l,vDirection:n,rowsDrop:r}}dispatchGridEvent(e,t){let o=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(o)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){var i,r;let t=(r=(i=this.lastDraggingEvent)==null?void 0:i.dropTarget)!=null?r:null,o=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),o!=null&&o.allowed&&o.rowDragManaged&&(!(t!=null&&t.droppedManaged)||Xs(t,o))&&this.dropRows(o),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){var o,i;this.clearAutoScroll(),(o=this.beans.groupEditSvc)==null||o.stopDragging(t),(i=this.beans.rowDropHighlightSvc)==null||i.fromDrag(null),el(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){var e;(e=this.autoScroll)==null||e.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}){let i=Mo(this.gos),r=this.beans.rowModel,a=o.filter(({data:s,rowPinned:l})=>{var c;return!r.getRowNode((c=i==null?void 0:i({data:s,level:0,rowPinned:l}))!=null?c:s.id)}).map(({data:s})=>s);if(a.length===0)return!1;let n;if(t){let s=t.sourceRowIndex>=0?t:ur(t);s&&(n=s.sourceRowIndex+(e==="above"?0:1))}return r.updateRowData({add:a,addIndex:n}),!0}filterRows(e){let{groupEditSvc:t}=this.beans,{rows:o,sameGrid:i}=e,r;for(let a=0,n=o.length;a=0)return e.destroyed?void 0:e;let t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):ur(e)}},Xs=(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||!Tt(e.rows,t.rows)),zv=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,el=(e,t)=>{for(let o=0,i=(e==null?void 0:e.length)||0;o{let o=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;let r=t.source;if(!i||!r)return null;let a=i.rowIndex-r.rowIndex,n=a<0?-1:1;a=t.suppressMoveWhenRowDragging?Math.abs(a):1;let s=new Set(t.rows);do{let l=Oa(e,n,i);if(!l)break;s.has(l)||(o=l,--a),i=l}while(a>0);return o},Ov=(e,t)=>{var n;let o=e==null?void 0:e.rowTop,i=(n=e==null?void 0:e.rowHeight)!=null?n:0;if(o==null||!i||i<=0)return"none";let r=t-o,a=i*Tv;return r<=a?"above":r>=i-a?"below":"inside"},Hv=class extends S{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){let o=t.createManagedBean(new Av(e)),i=this.beans.dragAndDrop;i.addDropTarget(o),t.addDestroyFunc(()=>i.removeDropTarget(o)),this.rowDragFeature=o;let r=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],r),this.addManagedEventListeners({newColumnsLoaded:r,columnRowGroupChanged:r,columnPivotModeChanged:r,sortChanged:r,filterChanged:r}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,o,i,r,a){return new Dv(e,t,o,i,r,a)}createRowDragCompForRow(e,t){if(gt(this.gos))return;let o=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${o("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,o,i,r,a){let n=this.gos;return n.get("rowDragManaged")&&(!ee(n)||n.get("pagination"))?void 0:this.createRowDragComp(o,e,t,i,r,a)}cancelRowDrag(){var e,t;(e=this.rowDragFeature)!=null&&e.lastDraggingEvent&&((t=this.beans.dragSvc)==null||t.cancelDrag())}computeVisibility(){var r,a,n,s;let e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";let i=e.colModel.isPivotMode();return(i||(a=(r=e.rowGroupColsSvc)==null?void 0:r.columns)!=null&&a.length)&&!t.get("refreshAfterGroupEdit")?"hidden":i||(n=e.filterManager)!=null&&n.isAnyFilterPresent()||(s=e.sortSvc)!=null&&s.isSortActive()?"disabled":"visible"}refreshVisibility(){var o;let e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,(o=this.eventSvc)==null||o.dispatchEvent({type:"rowDragVisibilityChanged"}))}},Bv=class extends S{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(){let e=this.row,t=this.dragging;!e||(e==null?void 0:e.rowIndex)===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){let e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){let o=e!==this.row,i=e.uiLevel,r=t!==this.position,a=i!==this.uiLevel;this.dragging=!1,(o||r||a)&&(o&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){let t=e==null?void 0:e.dropTarget;if(t){let{highlight:o,target:i,position:r}=t;if(o&&i&&r!=="none"){this.set(i,r),this.dragging=!0;return}}this.dragging&&this.clear()}},Td={moduleName:"Drag",version:P,beans:[Rv]},Nv={moduleName:"DragAndDrop",version:P,dynamicBeans:{dndSourceComp:uv},icons:{rowDrag:"grip"}},Ad={moduleName:"SharedDragAndDrop",version:P,beans:[$p],dependsOn:[Td],userComponents:{agDragAndDropImage:fv},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},Vv={moduleName:"RowDrag",version:P,beans:[Bv,Hv],apiFunctions:{addRowDropZone:mv,removeRowDropZone:vv,getRowDropZoneParams:Cv,getRowDropPositionIndicator:wv,setRowDropPositionIndicator:bv},dependsOn:[Ad]},Gv={moduleName:"HorizontalResize",version:P,beans:[Ev],dependsOn:[Td]},Wv=":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}}",qv=class extends S{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;let{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++;let e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){let{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}let r=a=>{for(;a.length;){let n=a.pop();n&&n()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),r(o)},0),window.setTimeout(()=>{t(),r(i)},200)})}};function _v(e,t,o){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,o,"api")}function Uv(e,t,o){var i;(i=e.colMoves)==null||i.moveColumns(t,o,"api")}var jv=class extends S{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let t=e.dragItem.columns;if(t)for(let 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){let{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&(t==null||t.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop")),this.columnsToGroup.length>0&&(o==null||o.addColumns(this.columnsToGroup,"toolPanelDragAndDrop")),this.columnsToPivot.length>0&&(i==null||i.addColumns(this.columnsToPivot,"toolPanelDragAndDrop"))}onDragCancel(){this.clearColumnsList()}};function Kv(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,r)=>{let a=e.indexOf(i),n=e.indexOf(r);return a-n})}function $v(e){var o;let t=[...e];for(let i of e){let r=null,a=i.getParent();for(;a!=null&&a.getDisplayedLeafColumns().length===1;)r=a,a=a.getParent();if(r!=null){let s=!!((o=r.getColGroupDef())!=null&&o.marryChildren)?r.getProvidedColumnGroup().getLeafColumns():r.getLeafColumns();for(let l of s)t.includes(l)||t.push(l)}}return t}function Yv(e,t,o,i){let r=i.allCols,a=null,n=null;for(let s=0;sr.includes(u));if(n===null)n=d;else if(!Tt(d,n))break;let g=Zv(c);(a===null||g=p||o&&f<=p))return;let v=Yv(h,u,c,d);if(!v)return;let C=v.move;if(!(C>l.getCols().length-u.length))return{columns:u,toIndex:C}}function Ld(e){let{columns:t,toIndex:o}=zd(e)||{},{finished:i,colMoves:r}=e;return!t||o==null?null:(r.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function Qv(e,t){let o=t.getCols(),i=e.map(l=>o.indexOf(l)).sort((l,c)=>l-c),r=i[0];return U(i)-r!==i.length-1?null:r}function Zv(e){function t(i){let r=[],a=i.getOriginalParent();for(;a!=null;)r.push(a),a=a.getOriginalParent();return r}let o=0;for(let i=0;ia.length?[r,a]:[a,r];for(let n of r)a.indexOf(n)===-1&&o++}return o}function Jv(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Xv(e){let{movingCols:t,draggingRight:o,xPosition:i,pinned:r,gos:a,colModel:n,visibleCols:s}=e;if(a.get("suppressMovableColumns")||t.some(w=>w.getColDef().suppressMovable))return[];let c=Jv(s,r),d=n.getCols(),g=c.filter(w=>t.includes(w)),u=c.filter(w=>!t.includes(w)),h=d.filter(w=>!t.includes(w)),p=0,f=i;if(o){let w=0;for(let b of g)w+=b.getActualWidth();f-=w}if(f>0){for(let w=0;w0){let w=u[p-1];m=h.indexOf(w)+1}else m=h.indexOf(u[0]),m===-1&&(m=0);let v=[m],C=(w,b)=>w-b;if(o){let w=m+1,b=d.length-1;for(;w<=b;)v.push(w),w++;v.sort(C)}else{let w=m,b=d.length-1,x=d[w];for(;w<=b&&c.indexOf(x)<0;)w++,v.push(w),x=d[w];w=m-1;let E=0;for(;w>=E;)v.push(w),w--;v.sort(C).reverse()}return v}function Va(e){var c;let{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:r,useHeaderRow:a,skipScrollPadding:n}=e,s=(c=r.getHeaderRowContainerCtrl(t))==null?void 0:c.eViewport,{x:l}=e;return s?(o&&(l-=s.getBoundingClientRect().left),i.get("enableRtl")&&(a&&(s=s.querySelector(".ag-header-row")),l=s.clientWidth-l),t==null&&!n&&(l+=r.get("center").getCenterViewportScrollLeft()),l):0}function da(e,t){for(let o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var tl=7,Ga=100,Ti=Ga/2,eC=5,tC=100,oC=class extends S{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!I(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){var r;let{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=(r=o==null?void 0:o.columns)!=null?r:[];for(let a of i){let n=a.getPinned();if(a.getColDef().lockPinned){if(n==e)return"move";continue}let s=o==null?void 0:o.containerType;if(s===e||!e)return"move";if(e&&(!n||s!==e))return"pinned"}return"notAllowed"}onDragEnter(e){let t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{let r=t.visibleState,a=(o||[]).filter(n=>r[n.getId()]&&!n.isVisible());this.setColumnsVisible(a,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){let{gos:r,ctrlsSvc:a}=this.beans,n=r.get("suppressMoveWhenColumnDragging");if(i&&!n){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&Q(e.hDirection))return;let s=Va({x:e.x,pinned:this.pinned,gos:r,ctrlsSvc:a});t||this.checkCenterForScrolling(s),n?this.handleColumnDragWhileSuppressingMovement(e,t,o,s,i):this.handleColumnDragWhileAllowingMovement(e,t,o,s,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,o){if(!(e!=null&&e.length))return;let i=e.filter(r=>!r.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();let e=this.lastMovedInfo;if(!e)return;let{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}updateDragItemContainerType(){let{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;let t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,o,i,r){let a=this.getAllMovingColumns(e,!0);if(r){let n=this.isAttemptingToPin(a);n&&this.attemptToPinColumns(a,void 0,!0);let{fromLeft:s,xPosition:l}=this.getNormalisedXPositionInfo(a,n)||{};if(s==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:a,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:s})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(a,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,r){let a=this.getAllMovingColumns(e),n=this.normaliseDirection(e.hDirection)==="right",s=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:a,isFromHeader:s,xPosition:i,fromLeft:n,fromEnter:t,fakeEvent:o}),c=Ld({...l,finished:r});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){let o=e.dragSource.getDragItem(),i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;let r=a=>a.getColDef().lockPinned?a.getPinned()==this.pinned:!0;return i?i.filter(r):[]}getMoveColumnParams(e){let{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:r,fromEnter:a,fakeEvent:n}=e,{gos:s,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:r,xPosition:i,pinned:this.pinned,fromEnter:a,fakeEvent:n,gos:s,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){var d,g,u;let{gos:o,colModel:i}=this.beans,r=o.get("enableRtl"),a=i.getCols().filter(h=>h.isVisible()&&h.getPinned()===this.pinned),n=null,s=null,l=null;for(let h of a){if(s=h.getActualWidth(),n=this.getNormalisedColumnLeft(h,0,r),n!=null){let p=n+s;if(n<=t&&p>=t){l=h;break}}n=null,s=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let h=a.length-1;h>=0;h--){let p=a[h],f=a[h].getParent();if(!f){l=p;break}let m=f==null?void 0:f.getDisplayedLeafColumns();if(m.length){l=U(m);break}}if(!l)return;n=this.getNormalisedColumnLeft(l,0,r),s=l.getActualWidth()}if(l==null||n==null||s==null){((d=this.lastHighlightedColumn)==null?void 0:d.column)!==l&&this.clearHighlighted();return}let c;if(t-ntl;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){let{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:r,fromLeft:a}=e,n=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:a,fromEnter:i,fakeEvent:r}),{columns:s,toIndex:l}=zd(n)||{};s&&l!=null&&(this.lastMovedInfo={columns:s,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){let{lastHighlightedColumn:e}=this;e&&(ol(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;let t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth(),r,a;this.gos.get("enableRtl")?(r=ei-Ti):(a=ei-Ti),this.needToMoveRight=r,this.needToMoveLeft=a,a||r?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),tC),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(){var i;let e;this.intervalCount++,e=10+this.intervalCount*eC,e>Ga&&(e=Ga);let t=null,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++;let{pinnedCols:r,dragAndDrop:a,gos:n}=this.beans;if(this.failedMoveAttempts<=tl+1||!r)return;if(a.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){let s=(i=this.lastDraggingEvent)==null?void 0:i.dragItem.columns;this.attemptToPinColumns(s,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){let i=(e||[]).filter(n=>!n.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());let{pinnedCols:r,dragAndDrop:a}=this.beans;return r==null||r.setColsPinned(i,t,"uiColumnDragged"),o&&a.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function ol(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function iC(e){let t=e.length,o,i;for(let r=0;r{let r,a=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":r=[[a,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":r=[[a,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:r=[[a,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=r}),this.moveColumnFeature=this.createManagedBean(new oC(o)),this.bodyDropPivotTarget=this.createManagedBean(new jv(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 Od(e,t){let o=[],i=[],r=[];return e.forEach(n=>{let s=n.getColDef().lockPosition;s==="right"?r.push(n):s==="left"||s===!0?o.push(n):i.push(n)}),t.get("enableRtl")?[...r,...i,...o]:[...o,...i,...r]}function Hd(e,t){let o=!0;return ct(null,t,i=>{if(!de(i))return;let r=i,a=r.getColGroupDef();if(!(a==null?void 0:a.marryChildren))return;let s=[];for(let u of r.getLeafColumns()){let h=e.indexOf(u);s.push(h)}let l=Math.max.apply(Math,s),c=Math.min.apply(Math,s),d=l-c,g=r.getLeafColumns().length-1;d>g&&(o=!1)}),o}var aC=class extends S{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){let i=this.beans.colModel.getCols();if(!i)return;let r=i[e];this.moveColumns([r],t,o)}moveColumns(e,t,o,i=!0){let{colModel:r,colAnimation:a,visibleCols:n,eventSvc:s}=this.beans,l=r.getCols();if(!l)return;if(t>l.length-e.length){R(30,{toIndex:t});return}a==null||a.start();let c=r.getColsForKeys(e);this.doesMovePassRules(c,t)&&(ws(r.getCols(),c,t),n.refresh(o),s.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:i,source:o})),a==null||a.finish()}doesMovePassRules(e,t){let o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){let{colModel:t,gos:o}=this.beans;return!(!Hd(e,t.getColTree())||!(r=>{let a=c=>c?c==="left"||c===!0?-1:1:0,n=o.get("enableRtl"),s=n?1:-1,l=!0;for(let c of r){let d=a(c.getColDef().lockPosition);n?d>s&&(l=!1):ds?"hide":"notAllowed",getDragItem:l?()=>lC(t,n.allCols):()=>sC(t),dragItemName:o,onDragStarted:()=>{s=!i.get("suppressDragLeaveHidesColumns"),da(c,!0)},onDragStopped:()=>da(c,!1),onDragCancelled:()=>da(c,!1),onGridEnter:u=>{if(s){let{columns:h=[],visibleState:p}=u!=null?u:{},f=l?v=>!p||p[v.getColId()]:()=>!0,m=h.filter(v=>!v.getColDef().lockVisible&&f(v));r.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:u=>{var h;if(s){let p=((h=u==null?void 0:u.columns)==null?void 0:h.filter(f=>!f.getColDef().lockVisible))||[];r.setColsVisible(p,!1,"uiColumnMoved")}}};return a.addDragSource(g,!0),g}};function nC(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function sC(e){let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function lC(e,t){var s;let o=e.getProvidedColumnGroup().getLeafColumns(),i={};for(let l of o)i[l.getId()]=l.isVisible();let r=[];for(let l of t)o.indexOf(l)>=0&&(r.push(l),et(o,l));for(let l of o)r.push(l);let a=[],n=e.getLeafColumns();for(let l of r)n.indexOf(l)!==-1&&a.push(l);return{columns:r,columnsInSplit:a,visibleState:i,containerType:(s=a[0])==null?void 0:s.pinned}}var cC={moduleName:"ColumnMove",version:P,beans:[aC,qv],apiFunctions:{moveColumnByIndex:_v,moveColumns:Uv},dependsOn:[Ad],css:[Wv]},dC=class extends S{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){let o=this.getHeaderCellForColumn(e);if(!o)return-1;let i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){let t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){let o=document.createElement("form");o.style.position="fixed";let i=this.centerRowContainerCtrl.eContainer;for(let a of e)this.cloneItemIntoDummy(a,o);i.appendChild(o);let r=Math.ceil(o.getBoundingClientRect().width);return o.remove(),t=t!=null?t:this.gos.get("autoSizePadding"),r+t}getHeaderCellForColumn(e){let t=null;for(let o of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){let i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}return t}cloneItemIntoDummy(e,t){let o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";let i=document.createElement("div"),r=i.classList;["ag-header-cell","ag-header-group-cell"].some(s=>o.classList.contains(s))?(r.add("ag-header","ag-header-row"),i.style.position="static"):r.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(l=>n.classList.contains(l))){for(let l=0;la.getPinned());e.dispatchEvent({type:"columnPinned",pinned:r!=null?r:null,columns:t,column:i,source:o})}function uC(e,t,o){if(!t.length)return;let i=t.length===1?t[0]:null,r=Nd(t,a=>a.isVisible());e.dispatchEvent({type:"columnVisible",visible:r,columns:t,column:i,source:o})}function hC(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function To(e,t,o,i,r=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:r,finished:o,source:i})}var pC=class extends S{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){let{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:r,groupAfterStartWidth:a,groupAfterRatios:n}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=a,this.resizeTakeFromRatios=n,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){let i=this.normaliseDragChange(t),r=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(r,o,e)}getInitialValues(e){var l,c;let t=d=>d.reduce((g,u)=>g+u.getActualWidth(),0),o=(d,g)=>d.map(u=>u.getActualWidth()/g),i=this.getColumnsToResize(),r=t(i),a=o(i,r),n={columnsToResize:i,resizeStartWidth:r,resizeRatios:a},s=null;if(e&&(s=(c=(l=this.beans.colGroupSvc)==null?void 0:l.getGroupAtDirection(this.columnGroup,"After"))!=null?c:null),s){let d=s.getDisplayedLeafColumns(),g=n.groupAfterColumns=d.filter(h=>h.isResizable()),u=n.groupAfterStartWidth=t(g);n.groupAfterRatios=o(g,u)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}resizeLeafColumnsToFit(e){let 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;let i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){var g;let{columnsToResize:r,resizeStartWidth:a,resizeRatios:n,groupAfterColumns:s,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:r,ratios:n,width:t}),s){let u=t-a;d.push({columns:s,ratios:c,width:l-u})}(g=this.beans.colResize)==null||g.resizeColumnSets({resizeSets:d,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},fC=class extends S{constructor(e,t,o,i,r){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=r}postConstruct(){let e=[],t,o,i=()=>{if(q(this.eResize,t),!t)return;let{horizontalResizeSvc:n,colAutosize:s}=this.beans,l=n.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&&s&&e.push(s.addColumnAutosizeListeners(this.eResize,this.column))},r=()=>{for(let n of e)n();e.length=0},a=()=>{let n=this.column.isResizable(),s=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(n!==t||s!==o)&&(t=n,o=s,r(),i())};a(),this.addDestroyFunc(r),this.ctrl.setRefreshFunction("resize",a)}onResizing(e,t){var u,h;let{column:o,lastResizeAmount:i,resizeStartWidth:r,beans:a}=this,n=this.normaliseResizeAmount(t),s=r+n,l=[{key:o,newWidth:s}],{pinnedCols:c,ctrlsSvc:d,colResize:g}=a;if(this.column.getPinned()){let p=(u=c==null?void 0:c.leftWidth)!=null?u:0,f=(h=c==null?void 0:c.rightWidth)!=null?h:0,m=si(d.getGridBodyCtrl().eBodyViewport)-50;if(p+f+(n-i)>m)return}this.lastResizeAmount=n,g==null||g.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,o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},mC=class extends S{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){let r=[],{colModel:a,gos:n,visibleCols:s}=this.beans;for(let l of e){let c=a.getColDefCol(l.key)||a.getCol(l.key);if(!c)continue;if(r.push({width:l.newWidth,ratios:[1],columns:[c]}),n.get("colResizeDefault")==="shift"&&(t=!t),t){let g=s.getColAfter(c);if(!g)continue;let u=c.getActualWidth()-l.newWidth,h=g.getActualWidth()+u;r.push({width:h,ratios:[1],columns:[g]})}}r.length!==0&&this.resizeColumnSets({resizeSets:r,finished:o,source:i})}resizeColumnSets(e){var d;let{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(g=>vC(g)))){if(o){let g=t&&t.length>0?t[0].columns:null;To(this.eventSvc,g,o,i)}return}let a=[],n=[];for(let g of t){let{width:u,columns:h,ratios:p}=g,f={},m={};for(let w of h)n.push(w);let v=!0,C=0;for(;v;){if(C++,C>1e3){W(31);break}v=!1;let w=[],b=0,x=u;h.forEach((D,T)=>{if(m[D.getId()])x-=f[D.getId()];else{w.push(D);let F=p[T];b+=F}});let E=1/b;w.forEach((D,T)=>{let k=T===w.length-1,F;k?F=x:(F=Math.round(p[T]*u*E),x-=F);let z=D.getMinWidth(),L=D.getMaxWidth();F0&&F>L&&(F=L,m[D.getId()]=!0,v=!0),f[D.getId()]=F})}for(let w of h){let b=f[w.getId()];w.getActualWidth()!==b&&(w.setActualWidth(b,i),a.push(w))}}let s=a.length>0,l=[];if(s){let{colFlex:g,visibleCols:u,colViewport:h}=this.beans;l=(d=g==null?void 0:g.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}))!=null?d:[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}let c=n.concat(l);(s||o)&&To(this.eventSvc,c,o,i,l)}resizeHeader(e,t,o){if(!e.isResizable())return;let i=e.getActualWidth(),r=e.getMinWidth(),a=e.getMaxWidth(),n=Math.min(Math.max(i+t,r),a);this.setColumnWidths([{key:e,newWidth:n}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,r){return new fC(e,t,o,i,r)}createGroupResizeFeature(e,t,o,i){return new pC(e,t,o,i)}};function vC(e){let{columns:t,width:o}=e,i=0,r=0,a=!0;for(let l of t){let c=l.getMinWidth();i+=c||0;let d=l.getMaxWidth();d>0?r+=d:a=!1}let n=o>=i,s=!a||o<=r;return n&&s}var CC={moduleName:"ColumnResize",version:P,beans:[mC],apiFunctions:{setColumnWidths:gC},dependsOn:[Gv,Bd]},wC=class extends S{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();let e=this.onWidthChanged.bind(this);for(let 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(let e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},bC=class extends Hn{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,o,i,r){let{column:a,beans:n}=this,{context:s,colNames:l,colHover:c,rangeSvc:d,colResize:g}=n;this.comp=e,r=bi(this,s,r),this.setGui(t,r),this.displayName=l.getDisplayNameForColumnGroup(a,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(r),this.setupExpandable(r),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:i,compBean:r}),this.setupUserComp(),this.addHeaderMouseListeners(r,i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();let u=this.rowCtrl.pinned,h=a.getProvidedColumnGroup().getLeafColumns();c==null||c.createHoverFeature(r,h,t),d==null||d.createRangeHighlightFeature(r,a,e),r.createManagedBean(new On(a,t,n)),r.createManagedBean(new wC(e,a)),g?this.resizeFeature=r.createManagedBean(g.createGroupResizeFeature(e,o,u,a)):e.setResizableDisplayed(!1),r.createManagedBean(new Ci(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(r,h),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),r.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(r),r.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.getDefinition();return O(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){let{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(let o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){let t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=U(t)===e;if(!o&&!i)return;let r=e.getHighlighted(),a=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving()),n=!1,s=!1;if(a){let l=this.beans.gos.get("enableRtl"),c=r===1,d=r===0;o&&(l?s=c:n=d),i&&(l?n=d:s=c)}this.comp.toggleCss("ag-header-highlight-before",n),this.comp.toggleCss("ag-header-highlight-after",s)}resizeHeader(e,t){let{resizeFeature:o}=this;if(!o)return;let i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){var t;(t=this.resizeFeature)==null||t.resizeLeafColumnsToFit(e)}setupUserComp(){let{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,r=this.column,a=r.getProvidedColumnGroup(),n=O(o,{displayName:this.displayName,columnGroup:r,setExpanded:l=>{e.setColumnGroupOpened(a,l,"gridInitializing")},setTooltip:(l,c)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>i==null?void 0:i.showMenuAfterButtonClick(a,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>i==null?void 0:i.showMenuAfterMouseEvent(a,l,"columnMenu",c),eGridHeader:this.eGui}),s=Bp(t,n);s&&this.comp.setUserCompDetails(s)}addHeaderMouseListeners(e,t){let{column:o,comp:i,beans:{rangeSvc:r},gos:a}=this,n=d=>this.handleMouseOverChange(d.type==="mouseenter"),s=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",o.getProvidedColumnGroup()),l=d=>this.handleContextMenuMouseEvent(d,void 0,o.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:n,mouseleave:n,click:s,contextmenu:l}),i.toggleCss("ag-header-group-cell-selectable",xo(a));let c=r==null?void 0:r.createHeaderGroupCellMouseListenerFeature(this.column,t);c&&this.createManagedBean(c)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){let t=this.column.getProvidedColumnGroup();this.refreshExpanded();let o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){let{column:e}=this;this.expandable=e.isExpandable();let t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){let{column:e}=this,t=e.getColGroupDef(),o=hd(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(r=>r.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t!=null&&t.wrapHeaderText&&o.push("ag-header-cell-wrap-text"));for(let i of o)this.comp.toggleCss(i,!0)}setupMovingCss(e){let{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),r=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(let a of i)e.addManagedListeners(a,{movingChanged:r});r()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){var s;if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;let{column:o,expandable:i,gos:r,beans:a}=this,n=xo(r);if(e.key==y.ENTER){if(n&&!e.altKey)(s=a.rangeSvc)==null||s.handleColumnSelection(o,e);else if(i){let l=!o.isExpanded();a.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),l,"uiColumnExpanded")}}}refreshAnnouncement(){let e,{gos:t}=this;xo(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){var i;let{beans:e,eGui:t,ariaAnnouncement:o}=this;!o||!t.contains(Y(e))||(i=e.ariaAnnounce)==null||i.announceValue(o,"columnHeader")}setDragSource(e){var t,o;!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=(o=(t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))!=null?o: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 yC(e,t,o){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,o,"api")}function SC(e,t,o){var i,r;return(r=(i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,o))!=null?r:null}function xC(e,t){var o,i;return(i=(o=e.colGroupSvc)==null?void 0:o.getProvidedColGroup(t))!=null?i:null}function kC(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function RC(e){var t,o;return(o=(t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())!=null?o:[]}function EC(e,t){var o;(o=e.colGroupSvc)==null||o.setColumnGroupState(t,"api")}function FC(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function DC(e){return e.visibleCols.treeLeft}function MC(e){return e.visibleCols.treeCenter}function PC(e){return e.visibleCols.treeRight}function IC(e){return e.visibleCols.getAllTrees()}var Gd=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t=this.existingIds[e],o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function TC(e,t){for(let o=0;o=0&&(e[i]=e[e.length-1],e.pop())}}var AC=class extends S{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){let{colFlex:o,colModel:i,colGroupSvc:r,colViewport:a,selectionColSvc:n}=this.beans;t||this.buildTrees(i,r),r==null||r.updateOpenClosedVisibility(),this.leftCols=ga(this.treeLeft),this.centerCols=ga(this.treeCenter),this.rightCols=ga(this.treeRight),n==null||n.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(s=>s.isAutoHeight()),o==null||o.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),a.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(let t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){let i=o.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}o=o.getParent()}}return e}updateBodyWidths(){let e=nt(this.centerCols),t=nt(this.leftCols),o=nt(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let r,a;this.gos.get("enableRtl")?(r=t?t[0]:null,a=o?U(o):null):(r=t?U(t):null,a=o?o[0]:null);for(let n of e.getCols())n.setLastLeftPinned(n===r,i),n.setFirstRightPinned(n===a,i)}buildTrees(e,t){let o=e.getColsToShow(),i=o.filter(l=>l.getPinned()=="left"),r=o.filter(l=>l.getPinned()=="right"),a=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),n=new Gd,s=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=s({columns:i,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=s({columns:r,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=s({columns:a,idCreator:n,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){let t=e.getCols(),o=[],i=[],r=[];for(let a of t){let n=a.getPinned();n?n===!0||n==="left"?o.push(a):r.push(a):i.push(a)}this.ariaOrderColumns=o.concat(i).concat(r)}getAriaColIndex(e){let t;return X(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(let e of[this.treeLeft,this.treeRight,this.treeCenter])for(let t of e)X(t)&&t.checkLeft()}setLeftValuesOfCols(e){let{colModel:t}=this.beans;if(!t.getColDefCols())return;let i=t.getCols().slice(0),r=this.gos.get("enableRtl");for(let a of[this.leftCols,this.rightCols,this.centerCols]){if(r){let n=nt(a);for(let s of a)n-=s.getActualWidth(),s.setLeft(n,e)}else{let n=0;for(let s of a)s.setLeft(n,e),n+=s.getActualWidth()}TC(i,a)}for(let a of i)a.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){let{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){let{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){let r=[],a=null;for(let n=0;n1){let u=c-1;for(let h=1;h<=u;h++)d.push(t[n+h]);n+=u}let g;if(o){g=!1;for(let u of d)o(u)&&(g=!0)}else g=!0;g&&(r.length===0&&a&&(i&&i(s))&&r.push(a),r.push(s)),a=s}return r}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){let 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={};let e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Yt(this.treeCenter,!1,e),Yt(this.treeLeft,!1,e),Yt(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){let e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o{Mt(o)&&t.push(o)}),t}var zC=class extends S{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){let e=[],t=this.beans.colModel.getColTree();return ct(null,t,o=>{de(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){let t=this.beans.colModel.getColDefColTree();if(!t)return;let o=[];ct(null,t,i=>{if(de(i)){let r=i.getColGroupDef(),a={groupId:i.getGroupId(),open:r?r.openByDefault:void 0};o.push(a)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){let{colModel:o,colAnimation:i,visibleCols:r,eventSvc:a}=this.beans;if(!o.getColTree().length)return;i==null||i.start();let s=[];for(let l of e){let c=l.groupId,d=l.open,g=this.getProvidedColGroup(c);g&&g.isExpanded()!==d&&(g.setExpanded(d),s.push(g))}r.refresh(t,!0),s.length&&a.dispatchEvent({type:"columnGroupOpened",columnGroup:s.length===1?s[0]:void 0,columnGroups:s}),i==null||i.finish()}setColumnGroupOpened(e,t,o){let i;de(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return ct(null,this.beans.colModel.getColTree(),o=>{de(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){let o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),r=t==="After"?U(i):i[0],a=`getCol${t}`;for(;;){let n=this.beans.visibleCols[a](r);if(!n)return null;let s=this.getColGroupAtLevel(n,o);if(s!==e)return s}}getColGroupAtLevel(e,t){let o=e.getParent(),i,r;for(;i=o.getProvidedColumnGroup().getLevel(),r=o.getPaddingLevel(),!(i+r<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){let e=this.beans.visibleCols.getAllTrees();Yt(e,!1,t=>{X(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(X(e))return e;let o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number",r=null;return Yt(o,!1,a=>{if(X(a)){let n=a,s;i?s=e===n.getGroupId()&&t===n.getPartId():s=e===n.getGroupId(),s&&(r=n)}}),r}createColumnGroups(e){let{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:r,isStandaloneStructure:a}=e,n=this.mapOldGroupsById(r),s=[],l=t;for(;l.length;){let c=l;l=[];let d=0,g=u=>{let h=d;d=u;let p=c[h],m=(X(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let C=h;Cde(d))){l.setChildren([n]);continue}else{l.setChildren(e);break}r.push(n)}}return r}findDepth(e){let t=0,o=e;for(;o!=null&&o[0]&&de(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i=0;a--){let n=new qi(null,`FAKE_PATH_${i.getId()}_${a}`,!0,a);this.createBean(n),n.setChildren([r]),r.originalParent=n,r=n}t===0&&(i.originalParent=null),o.push(r)}return o}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i{for(let r of i)if(X(r)){let a=r;t[r.getUniqueId()]=a,o(a.getChildren())}};return e&&o(e),t}setupParentsIntoCols(e,t){for(let o of e!=null?e:[])if(o.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,X(o)){let i=o;this.setupParentsIntoCols(i.getChildren(),i)}}},LC={moduleName:"ColumnGroup",version:P,dynamicBeans:{headerGroupCellCtrl:bC},beans:[zC],apiFunctions:{getAllDisplayedColumnGroups:IC,getCenterDisplayedColumnGroups:MC,getColumnGroup:SC,getColumnGroupState:RC,getDisplayNameForColumnGroup:kC,getLeftDisplayedColumnGroups:DC,getProvidedColumnGroup:xC,getRightDisplayedColumnGroups:PC,resetColumnGroupState:FC,setColumnGroupOpened:yC,setColumnGroupState:EC}};function Ve(e,t,o){var x,E,D;let{colModel:i,rowGroupColsSvc:r,pivotColsSvc:a,autoColSvc:n,selectionColSvc:s,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:g,valueColsSvc:u,eventSvc:h,gos:p}=e,f=(x=i.getColDefCols())!=null?x:[],m=s==null?void 0:s.getColumns();if(!f.length&&!(m!=null&&m.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return R(32),!1;let v=(T,k,F,z,L)=>{var qe;if(!T)return;let H=lp(k,t.defaultState),j=H("flex").value1,A=H("sort").value1,B=H("sortType").value1,V=kt(A)||xn(B),Z=ut(B),K=kr(A),ge=V?{type:Z,direction:K}:void 0;if(Nc(e,T,H("hide").value1,ge,H("sortIndex").value1,H("pinned").value1,j,o),j==null){let le=H("width").value1;if(le!=null){let rt=(qe=T.getColDef().minWidth)!=null?qe:g.getDefaultColumnMinWidth();rt!=null&&le>=rt&&T.setActualWidth(le,o)}}L||!T.isPrimary()||(u==null||u.syncColumnWithState(T,o,H),r==null||r.syncColumnWithState(T,o,H,F),a==null||a.syncColumnWithState(T,o,H,z))},C=(T,k,F)=>{var rt,lo,Ho,Bo;let z=Wd(e,o),L=k.slice(),H={},j={},A=[],B=[],V=[],Z=0,K=(rt=r==null?void 0:r.columns.slice())!=null?rt:[],ge=(lo=a==null?void 0:a.columns.slice())!=null?lo:[];for(let J of T){let Le=J.colId;if(Le.startsWith(Rr)){A.push(J),V.push(J);continue}if(zt(Le)){B.push(J),V.push(J);continue}let co=F(Le);co?(v(co,J,H,j,!1),et(L,co)):(V.push(J),Z+=1)}let qe=J=>v(J,null,H,j,!1);L.forEach(qe),r==null||r.sortColumns(il.bind(r,H,K)),a==null||a.sortColumns(il.bind(a,j,ge)),i.refreshCols(!1,o);let le=(J,Le,Vr=[])=>{for(let co of Le){let Cs=J(co.colId);et(Vr,Cs),v(Cs,co,null,null,!0)}Vr.forEach(qe)};return le(J=>{var Le;return(Le=n==null?void 0:n.getColumn(J))!=null?Le:null},A,(Ho=n==null?void 0:n.getColumns())==null?void 0:Ho.slice()),le(J=>{var Le;return(Le=s==null?void 0:s.getColumn(J))!=null?Le:null},B,(Bo=s==null?void 0:s.getColumns())==null?void 0:Bo.slice()),HC(t,i,p),c.refresh(o),h.dispatchEvent({type:"columnEverythingChanged",source:o}),z(),{unmatchedAndAutoStates:V,unmatchedCount:Z}};l==null||l.start();let{unmatchedAndAutoStates:w,unmatchedCount:b}=C(t.state||[],f,T=>i.getColDefCol(T));if(w.length>0||I(t.defaultState)){let T=(D=(E=d==null?void 0:d.getPivotResultCols())==null?void 0:E.list)!=null?D:[];b=C(w,T,k=>{var F;return(F=d==null?void 0:d.getPivotResultCol(k))!=null?F:null}).unmatchedCount}return l==null||l.finish(),b===0}function OC(e,t){var C,w,b,x;let{colModel:o,autoColSvc:i,selectionColSvc:r,eventSvc:a,gos:n}=e,s=o.getColDefCols();if(!(s!=null&&s.length))return;let l=o.getColDefColTree(),c=Wc(l),d=[],g=1e3,u=1e3,h=E=>{let D=qd(E);Q(D.rowGroupIndex)&&D.rowGroup&&(D.rowGroupIndex=g++),Q(D.pivotIndex)&&D.pivot&&(D.pivotIndex=u++),d.push(D)};(C=i==null?void 0:i.getColumns())==null||C.forEach(h),(w=r==null?void 0:r.getColumns())==null||w.forEach(h),c==null||c.forEach(h),Ve(e,{state:d},t);let p=(b=i==null?void 0:i.getColumns())!=null?b:[],v=[...(x=r==null?void 0:r.getColumns())!=null?x:[],...p,...s].map(E=>({colId:E.colId}));Ve(e,{state:v,applyOrder:!0},t),a.dispatchEvent(O(n,{type:"columnsReset",source:t}))}function Wd(e,t){var g,u,h;let{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:r,colModel:a,sortSvc:n,eventSvc:s}=e,l={rowGroupColumns:(g=o==null?void 0:o.columns.slice())!=null?g:[],pivotColumns:(u=i==null?void 0:i.columns.slice())!=null?u:[],valueColumns:(h=r==null?void 0:r.columns.slice())!=null?h:[]},c=hr(e),d={};for(let p of c)d[p.colId]=p;return()=>{var k,F;let p=(z,L,H,j)=>{let A=L.map(j),B=H.map(j);if(Tt(A,B))return;let Z=new Set(L);for(let ge of H)Z.delete(ge)||Z.add(ge);let K=[...Z];s.dispatchEvent({type:z,columns:K,column:K.length===1?K[0]:null,source:t})},f=z=>{let L=[];return a.forAllCols(H=>{let j=d[H.getColId()];j&&z(j,H)&&L.push(H)}),L},m=z=>z.getColId();p("columnRowGroupChanged",l.rowGroupColumns,(k=o==null?void 0:o.columns)!=null?k:[],m),p("columnPivotChanged",l.pivotColumns,(F=i==null?void 0:i.columns)!=null?F:[],m);let C=f((z,L)=>{let H=z.aggFunc!=null,j=H!=L.isValueActive(),A=H&&z.aggFunc!=L.getAggFunc();return j||A});C.length>0&&hC(s,"columnValueChanged",C,t),To(s,f((z,L)=>z.width!=L.getActualWidth()),!0,t),Vd(s,f((z,L)=>z.pinned!=L.getPinned()),t),uC(s,f((z,L)=>z.hide==L.isVisible()),t);let D=f((z,L)=>!Wi(L.getSortDef(),{type:ut(z.sortType),direction:kr(z.sort)})||z.sortIndex!=L.getSortIndex());D.length>0&&(n==null||n.dispatchSortChangedEvents(t,D));let T=hr(e);NC(c,T,t,a,s)}}function hr(e){let{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,r=t.getColDefCols();if(Q(r)||!t.isAlive())return[];let a=o==null?void 0:o.columns,n=i==null?void 0:i.columns,s=[],l=d=>{var f,m;let g=d.isRowGroupActive()&&a?a.indexOf(d):null,u=d.isPivotActive()&&n?n.indexOf(d):null,h=d.isValueActive()?d.getAggFunc():null,p=d.getSortIndex()!=null?d.getSortIndex():null;s.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:d.getSort(),sortType:(f=d.getSortDef())==null?void 0:f.type,sortIndex:p,aggFunc:h,rowGroup:d.isRowGroupActive(),rowGroupIndex:g,pivot:d.isPivotActive(),pivotIndex:u,flex:(m=d.getFlex())!=null?m:null})};t.forAllCols(d=>l(d));let c=new Map(t.getCols().map((d,g)=>[d.getColId(),g]));return s.sort((d,g)=>{let u=c.has(d.colId)?c.get(d.colId):-1,h=c.has(g.colId)?c.get(g.colId):-1;return u-h}),s}function qd(e){let t=(m,v)=>m!=null?m:v!=null?v:null,o=e.getColDef(),i=Me(t(o.sort,o.initialSort)),r=i.direction,a=i.type,n=t(o.sortIndex,o.initialSortIndex),s=t(o.hide,o.initialHide),l=t(o.pinned,o.initialPinned),c=t(o.width,o.initialWidth),d=t(o.flex,o.initialFlex),g=t(o.rowGroupIndex,o.initialRowGroupIndex),u=t(o.rowGroup,o.initialRowGroup);g==null&&!u&&(g=null,u=null);let h=t(o.pivotIndex,o.initialPivotIndex),p=t(o.pivot,o.initialPivot);h==null&&!p&&(h=null,p=null);let f=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:r,sortType:a,sortIndex:n,hide:s,pinned:l,width:c,flex:d,rowGroup:u,rowGroupIndex:g,pivot:p,pivotIndex:h,aggFunc:f}}function HC(e,t,o){if(!e.applyOrder||!e.state)return;let i=[];for(let r of e.state)r.colId!=null&&i.push(r.colId);BC(t.cols,i,t,o)}function BC(e,t,o,i){if(e==null)return;let r=[],a={};for(let s of t){if(a[s])continue;let l=e.map[s];l&&(r.push(l),a[s]=!0)}let n=0;for(let s of e.list){let l=s.getColId();if(a[l]!=null)continue;l.startsWith(Rr)?r.splice(n++,0,s):r.push(s)}if(r=Od(r,i),!Hd(r,o.getColTree())){R(39);return}e.list=r}function NC(e,t,o,i,r){let a={};for(let d of t)a[d.colId]=d;let n={};for(let d of e)a[d.colId]&&(n[d.colId]=!0);let s=e.filter(d=>n[d.colId]),l=t.filter(d=>n[d.colId]),c=[];l.forEach((d,g)=>{let u=s==null?void 0:s[g];if(u&&u.colId!==d.colId){let h=i.getCol(u.colId);h&&c.push(h)}}),c.length&&r.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:o})}var il=(e,t,o,i)=>{let r=e[o.getId()],a=e[i.getId()],n=r!=null,s=a!=null;if(n&&s)return r-a;if(n)return-1;if(s)return 1;let l=t.indexOf(o),c=t.indexOf(i),d=l>=0,g=c>=0;return d&&g?l-c:d?-1:1},VC=class extends S{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(Ro(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Ro(e.source)))}createColsFromColDefs(e){var C,w,b;let{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:r,pivotColsSvc:a,valueColsSvc:n,visibleCols:s,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?Wd(t,e):void 0;o==null||o.expire();let g=(C=this.colDefCols)==null?void 0:C.list,u=(w=this.colDefCols)==null?void 0:w.tree,h=Zh(t,this.colDefs,!0,u,e);ar(t,(b=this.colDefCols)==null?void 0:b.tree,h.columnTree);let p=h.columnTree,f=h.treeDepth,m=Wc(p),v={};for(let x of m)v[x.getId()]=x;this.colDefCols={tree:p,treeDepth:f,list:m,map:v},this.createColumnsForService([c],this.colDefCols,e),r==null||r.extractCols(e,g),a==null||a.extractCols(e,g),n==null||n.extractCols(e,g),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,s.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var m;if(!this.colDefCols)return;let o=(m=this.cols)==null?void 0:m.tree;this.saveColOrder();let{autoColSvc:i,selectionColSvc:r,rowNumbersSvc:a,quickFilter:n,pivotResultCols:s,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:g,eventSvc:u,formula:h}=this.beans,p=this.selectCols(s,this.colDefCols);h==null||h.setFormulasActive(p),this.createColumnsForService([i,r,a],p,t);let f=Fh(this.gos,this.showingPivotResult);(!e||f)&&this.restoreColOrder(p),this.positionLockedCols(p),l==null||l.refresh(),n==null||n.refreshCols(),this.setColSpanActive(),c==null||c.setAutoHeightActive(p),d.clear(),g.clear(),Tt(o,this.cols.tree)||u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,o){for(let i of e)i&&(i.createColumns(t,r=>{this.lastOrder=r(this.lastOrder),this.lastPivotOrder=r(this.lastPivotOrder)},o),i.addColumns(t))}selectCols(e,t){var s;let o=(s=e==null?void 0:e.getPivotResultCols())!=null?s:null;this.showingPivotResult=o!=null;let{map:i,list:r,tree:a,treeDepth:n}=o!=null?o:t;return this.cols={list:r.slice(),map:{...i},tree:a.slice(),treeDepth:n},o&&(o.list.some(c=>{var d;return((d=this.cols)==null?void 0:d.map[c.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];let{beans:e,showingPivotResult:t,cols:o}=this,{valueColsSvc:i,selectionColSvc:r,gos:a}=e,n=this.isPivotMode()&&!t,s=r==null?void 0:r.isSelectionColumnEnabled(),l=Dh(e),c=i==null?void 0:i.columns,d=Ih(a);return o.list.filter(u=>{let h=kn(u);return n?(c==null?void 0:c.includes(u))||h&&(!d||u.isVisible())||s&&zt(u)||l&&pe(u):h&&!d||u.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){Ve(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){let t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;let o=t.filter(g=>e.map[g.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}let i=g=>{let u=g.getOriginalParent();return u?u.getChildren().length>1?!0:i(u):!1};if(!o.some(g=>i(g))){let g=new Set(o);for(let u of e.list)g.has(u)||o.push(u);e.list=o;return}let r=new Map;for(let g=0;g!r.has(g));if(a.length===0){e.list=o;return}let n=(g,u)=>{let h=u?u.getOriginalParent():g.getOriginalParent();if(!h)return null;let p=null,f=null;for(let m of h.getChildren())if(!(m===u||m===g)){if(m instanceof no){let v=r.get(m);if(v==null)continue;(p==null||p{let C=r.get(v);C!=null&&(p==null||p=0;g--)c[d--]=s[g];for(let g=o.length-1;g>=0;g--){let u=o[g],h=l.get(u);if(h)if(Array.isArray(h))for(let p=h.length-1;p>=0;p--){let f=h[p];c[d--]=f}else c[d--]=h;c[d--]=u}e.list=c}positionLockedCols(e){e.list=Od(e.list,this.gos)}saveColOrder(){var e,t,o,i;this.showingPivotResult?this.lastPivotOrder=(t=(e=this.cols)==null?void 0:e.list)!=null?t:null:this.lastOrder=(i=(o=this.cols)==null?void 0:o.list)!=null?i:null}getColumnDefs(e){var t,o,i;return this.colDefCols&&((i=this.beans.colDefFactory)==null?void 0:i.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,(o=(t=this.cols)==null?void 0:t.list)!=null?o:[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);let{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;let e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var o;if(!this.cols)return;(o=this.beans.autoColSvc)==null||o.updateColumns(e);let t=Ro(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;ar(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e,t;return(t=(e=this.cols)==null?void 0:e.tree)!=null?t:[]}getColDefColTree(){var e,t;return(t=(e=this.colDefCols)==null?void 0:e.tree)!=null?t:[]}getColDefCols(){var e,t;return(t=(e=this.colDefCols)==null?void 0:e.list)!=null?t:null}getCols(){var e,t;return(t=(e=this.cols)==null?void 0:e.list)!=null?t:[]}forAllCols(e){var a,n,s,l,c;let{pivotResultCols:t,autoColSvc:o,selectionColSvc:i,groupHierarchyColSvc:r}=this.beans;No((a=this.colDefCols)==null?void 0:a.list,e)||No((n=o==null?void 0:o.columns)==null?void 0:n.list,e)||No((s=i==null?void 0:i.columns)==null?void 0:s.list,e)||No((l=r==null?void 0:r.columns)==null?void 0:l.list,e)||No((c=t==null?void 0:t.getPivotResultCols())==null?void 0:c.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t,o;return(o=(t=this.cols)==null?void 0:t.map[e])!=null?o:null}getColFromCollection(e,t){var s,l,c;if(t==null)return null;let{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let d=0;de(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Je(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 qC(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 Wt=class extends _d{constructor(e,t,o="text",i="input"){var r;super(e,(r=e==null?void 0:e.template)!=null?r:qC(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=M,this.eWrapper=M,this.eInput=M}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);let{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCss("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;let{inputName:r,inputWidth:a,inputPlaceholder:n,autoComplete:s,tabIndex:l}=this.config;r!=null&&this.setInputName(r),a!=null&&this.setInputWidth(a),n!=null&&this.setInputPlaceholder(n),s!=null&&this.setAutoComplete(s),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,we(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return Ji(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){let t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return we(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Do(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ni(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)we(this.eInput,"autocomplete",null);else{let t=typeof e=="string"?e:"off";we(this.eInput,"autocomplete",t)}return this}},Vn=class extends Wt{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();let{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;let e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){let 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;let 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});let i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;let t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){let t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Gn={selector:"AG-CHECKBOX",component:Vn},_C=".ag-checkbox-cell{height:100%}",UC={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},jC=class extends _{constructor(){super(UC,[Gn]),this.eCheckbox=M,this.registerCSS(_C)}init(e){this.refresh(e);let{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),rc(i,"polite"),this.addManagedListeners(i,{click:r=>{if(eo(r),t.isDisabled())return;let a=t.getValue();this.onCheckboxChanged(a)},dblclick:r=>{eo(r)}}),this.addManagedElementListeners(e.eGridCell,{keydown:r=>{if(r.key===y.SPACE&&!t.isDisabled()){e.eGridCell===Y(o)&&t.toggle();let a=t.getValue();this.onCheckboxChanged(a),r.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var g;let t,o=!0,{value:i,column:r,node:a}=e;if(a.group&&r)if(typeof i=="boolean")t=i;else{let u=r.getColId();u.startsWith(Rr)?t=i==null||i===""?void 0:i==="true":a.aggData&&a.aggData[u]!==void 0||a.sourceRowIndex>=0?t=i!=null?i:void 0:o=!1}else t=i!=null?i:void 0;let{eCheckbox:n}=this;if(!o){n.setDisplayed(!1);return}n.setValue(t);let s=(g=e.disabled)!=null?g:!(r!=null&&r.isCellEditable(a));n.setDisabled(s);let l=this.getLocaleTextFunc(),c=Sr(l,t),d=s?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;n.setInputAriaLabel(d)}onCheckboxChanged(e){let{params:t}=this,{column:o,node:i,value:r}=t,{editSvc:a}=this.beans;if(!o)return;let n={rowNode:i,column:o};a==null||a.dispatchCellEvent(n,null,"cellEditingStarted",{value:r});let s=i.setDataValue(o,e,"ui");a==null||a.dispatchCellEvent(n,null,"cellEditingStopped",{oldValue:r,newValue:e,valueChanged:s}),s||this.updateCheckbox(t)}},KC={tag:"div",cls:"ag-skeleton-container"},$C=class extends _{constructor(){super(KC)}init(e){let t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>ri(e.eParentOfValue)),ri(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){let e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");let t=e("ariaSkeletonCellLoadingFailed","Row failed to load");Do(this.getGui(),t)}setupLoading(e){let t=oe({tag:"div",cls:"ag-skeleton-effect"}),o=e.node.rowIndex;if(o!=null){let a=75+25*(o%2===0?Math.sin(o):Math.cos(o));t.style.width=`${a}%`}this.getGui().appendChild(t);let i=this.getLocaleTextFunc(),r=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");Do(this.getGui(),r)}refresh(e){return!1}},YC={moduleName:"CheckboxCellRenderer",version:P,userComponents:{agCheckboxCellRenderer:jC}},QC={moduleName:"SkeletonCellRenderer",version:P,userComponents:{agSkeletonCellRenderer:$C}};function ZC(e,t){let o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function JC(e){return e.colModel.getColumnDefs(!0)}function XC(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function ew(e,t){return e.colModel.getColDefCol(t)}function tw(e){return e.colModel.getColDefCols()}function ow(e,t){return Ve(e,t,"api")}function iw(e){return hr(e)}function rw(e){OC(e,"api")}function aw(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function nw(e){return e.visibleCols.isPinningLeft()}function sw(e){return e.visibleCols.isPinningRight()}function lw(e,t){return e.visibleCols.getColAfter(t)}function cw(e,t){return e.visibleCols.getColBefore(t)}function dw(e,t,o){e.colModel.setColsVisible(t,o,"api")}function gw(e,t,o){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,o,"api")}function uw(e){return e.colModel.getCols()}function hw(e){return e.visibleCols.leftCols}function pw(e){return e.visibleCols.centerCols}function fw(e){return e.visibleCols.rightCols}function mw(e){return e.visibleCols.allCols}function vw(e){return e.colViewport.getViewportColumns()}function Wa(e,t){if(!e)return;let o=e,i={};for(let r of Object.keys(o)){if(t&&t.indexOf(r)>=0||Cc.has(r))continue;let a=o[r];typeof a=="object"&&a!==null&&a.constructor===Object?i[r]=Wa(a):i[r]=a}return i}var Cw=class extends S{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i,r=!1){var l,c;let a=e.slice();t?a.sort((d,g)=>o.indexOf(d)-o.indexOf(g)):(o||r)&&a.sort((d,g)=>i.indexOf(d)-i.indexOf(g));let n=(l=this.rowGroupColsSvc)==null?void 0:l.columns,s=(c=this.pivotColsSvc)==null?void 0:c.columns;return this.buildColumnDefs(a,n,s)}buildColumnDefs(e,t=[],o=[]){let i=[],r={};for(let a of e){let n=this.createDefFromColumn(a,t,o),s=!0,l=n,c=a.getOriginalParent(),d=null;for(;c;){let g=null;if(c.isPadding()){c=c.getOriginalParent();continue}let u=r[c.getGroupId()];if(u){u.children.push(l),s=!1;break}if(g=this.createDefFromGroup(c),g&&(g.children=[l],r[g.groupId]=g,l=g,c=c.getOriginalParent()),c!=null&&d===c){s=!1;break}d=c}s&&i.push(l)}return i}createDefFromGroup(e){let t=Wa(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){let i=Wa(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSortDef(),i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},ww=class extends S{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){var f;let t=(f=e.source)!=null?f:"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);let o=this.flexViewportWidth,{visibleCols:i,colDelayRenderSvc:r}=this.beans,a=i.centerCols,n=-1;if(e.resizingCols){let m=new Set(e.resizingCols);for(let v=a.length-1;v>=0;v--)if(m.has(a[v])){n=v;break}}let s=!1,l=a.map((m,v)=>{let C=m.getFlex(),w=C!=null&&C>0&&v>n;return s||(s=w),{col:m,isFlex:w,flex:Math.max(0,C!=null?C:0),initialSize:m.getActualWidth(),min:m.getMinWidth(),max:m.getMaxWidth(),targetSize:0}});if(s?(r==null||r.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(r),!o||!s)return[];let c=l.length,d=l.reduce((m,v)=>m+v.flex,0),g=o,u=(m,v)=>{m.frozenSize=v,m.col.setActualWidth(v,t),g-=v,d-=m.flex,c-=1},h=m=>m.frozenSize!=null;for(let m of l)m.isFlex||u(m,m.initialSize);for(;c>0;){let m=Math.round(d<1?g*d:g),v,C=0,w=0;for(let E of l){if(h(E))continue;v=E,w+=m*(E.flex/d);let D=w-C,T=Math.round(D);E.targetSize=T,C+=T}v&&(v.targetSize+=m-C);let b=0;for(let E of l){if(h(E))continue;let D=E.targetSize,T=Math.min(Math.max(D,E.min),E.max);b+=T-D,E.violationType=T===D?void 0:T0?"min":"max";for(let E of l)h(E)||(x==="all"||E.violationType===x)&&u(E,E.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();let p=l.filter(m=>m.isFlex&&!m.violationType).map(m=>m.col);if(e.fireResizedEvent){let m=l.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),v=l.filter(C=>C.flex).map(C=>C.col);To(this.eventSvc,m,!0,t,v)}return this.revealColumns(r),p}revealColumns(e){this.columnsHidden&&(e==null||e.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){let{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?t:null,e.dispatchStateUpdatedEvent("flex")}},Se=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}},Wn="T",bw=new RegExp(`[${Wn} ]`),yw=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${Wn}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Qe(e,t){return e.toString().padStart(t,"0")}function fe(e,t=!0,o=Wn){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(r=>Qe(r,2)).join("-");return t&&(i+=o+[e.getHours(),e.getMinutes(),e.getSeconds()].map(r=>Qe(r,2)).join(":")),i}function Ai(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Qe(e.getDate(),2),Qe(e.getHours(),2),`:${Qe(e.getMinutes(),2)}`,`:${Qe(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Qe(e.getDate(),2)].map(String):null}var ua=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"},rl=["January","February","March","April","May","June","July","August","September","October","November","December"],ha=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Sw(e,t){if(t==null)return fe(e,!1);let o=Qe(e.getFullYear(),4),i={YYYY:()=>o.slice(o.length-4,o.length),YY:()=>o.slice(o.length-2,o.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>rl[e.getMonth()],MMM:()=>rl[e.getMonth()].slice(0,3),MM:()=>Qe(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${ua(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${ua(e.getDate())}`,DD:()=>Qe(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>ha[e.getDay()],ddd:()=>ha[e.getDay()].slice(0,3),dd:()=>ha[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${ua(e.getDay())}`,d:()=>`${e.getDay()}`},r=new RegExp(Object.keys(i).join("|"),"g");return t.replace(r,a=>a in i?i[a]():a)}function ji(e,t=!1){return!!me(e,t)}function xw(e){return ji(e,!0)}function me(e,t=!1,o){if(!e||!o&&!yw.test(e))return null;let[i,r]=e.split(bw);if(!i)return null;let a=i.split("-").map(h=>Number.parseInt(h,10));if(a.filter(h=>!isNaN(h)).length!==3)return null;let[n,s,l]=a,c=new Date(n,s-1,l);if(c.getFullYear()!==n||c.getMonth()!==s-1||c.getDate()!==l||!r&&t)return null;if(!r||r==="00:00:00")return c;let[d,g,u]=r.split(":").map(h=>Number.parseInt(h,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(g>=0&&g<60)c.setMinutes(g);else if(t)return null;if(u>=0&&u<60)c.setSeconds(u);else if(t)return null;return c}function ei(e,t,o){if(!t||!e)return;if(!o)return e[t];let i=t.split("."),r=e;for(let a=0;anull,suppressKeyboardEvent:({node:e,event:t,column:o})=>t.key===y.SPACE&&o.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:o}){return{cellEditorParams:{useFormatter:!0},comparator:(i,r)=>{let a=t.getColDefCol(o),n=a==null?void 0:a.getColDef();if(!a||!n)return 0;let s=i==null?"":e({column:a,node:null,value:i}),l=r==null?"":e({column:a,node:null,value:r});return s===l?0:s>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(){var d;let e=this.getDefaultDataTypes(),t={},o={},i=g=>u=>{let{column:h,node:p,value:f}=u,m=h.getColDef().valueFormatter;return m===g.groupSafeValueFormatter&&(m=g.valueFormatter),this.beans.valueSvc.formatValue(h,p,f,m)};for(let g of Object.keys(e)){let u=e[g],h={...u,groupSafeValueFormatter:sl(u,this.gos)};t[g]=h,o[g]=i(h)}let r=(d=this.gos.get("dataTypeDefinitions"))!=null?d:{},a={};for(let g of Object.keys(r)){let u=r[g],h=this.processDataTypeDefinition(u,r,[g],e);h&&(t[g]=h,u.dataTypeMatcher&&(a[g]=u.dataTypeMatcher),o[g]=i(h))}let{valueParser:n,valueFormatter:s}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==n,this.hasObjectValueFormatter=c!==s,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(a,e)}sortKeysInMatchers(e,t){var i;let o={...e};for(let r of kw)delete o[r],o[r]=(i=e[r])!=null?i:t[r].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,i){let r,a=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=i[a],s=t[a];if(n&&s&&(n=s),!nl(e,n,a))return;r=al(n,e)}else{if(o.includes(a)){R(44);return}let n=t[a];if(!nl(e,n,a))return;let s=this.processDataTypeDefinition(n,t,[...o,a],i);if(!s)return;r=al(s,e)}return{...r,groupSafeValueFormatter:sl(r,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;i===void 0&&(i=e.cellDataType);let{field:r}=t;if((i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(r,o):!1),this.addFormulaCellEditorToColDef(e,t),!i){e.cellDataType=!1;return}let a=this.dataTypeDefinitions[i];if(!a){R(47,{cellDataType:i});return}return e.cellDataType=i,a.groupSafeValueFormatter&&(e.valueFormatter=a.groupSafeValueFormatter),a.valueParser&&(e.valueParser=a.valueParser),a.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,a,o),a.columnTypes}addFormulaCellEditorToColDef(e,t){var i;!((i=t.allowFormula)!=null?i:e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){var a;let{gos:o}=this;if(!ee(o))return!1;let i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(pa(t,i))return!1;let r=t.type===null?e.type:t.type;if(r){let n=(a=o.get("columnTypes"))!=null?a:{};if(nr(r).some(l=>{let c=n[l.trim()];return c&&pa(c,i)}))return!1}return!pa(e,i)}inferCellDataType(e,t){if(!e)return;let o,i=this.getInitialData();if(i){let a=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");o=ei(i,e,a)}else this.initWaitForRowData(t);if(o==null)return;let r=Object.keys(this.dataTypeMatchers).find(a=>this.dataTypeMatchers[a](o));return r!=null?r:"object"}getInitialData(){var t;let e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{let o=(t=this.beans.rowModel.rootNode)==null?void 0:t._leafs;if(o!=null&&o.length)return o[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;let t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);let[r]=this.addManagedEventListeners({rowDataUpdateStarted:a=>{let{firstRowData:n}=a;n&&(r==null||r(),this.isPendingInference=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&(o==null||o.processResizeOperations()),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;let o=[];this.destroyColumnStateUpdateListeners();let i={},r={};for(let a of Object.keys(this.columnStateUpdatesPendingInference)){let n=this.columnStateUpdatesPendingInference[a],s=this.colModel.getCol(a);if(!s)continue;let l=s.getColDef();if(!this.resetColDefIntoCol(s,"cellDataTypeInferred"))continue;let c=s.getColDef();if(t&&c.type&&c.type!==l.type){let d=Iw(s,n);d.rowGroup&&d.rowGroupIndex==null&&(i[a]=d),d.pivot&&d.pivotIndex==null&&(r[a]=d),o.push(d)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,r)),o.length&&Ve(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){let o={},{rowGroupColsSvc:i,pivotColsSvc:r}=this.beans;return i==null||i.restoreColumnOrder(o,e),r==null||r.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){let o=e.getUserProvidedColDef();if(!o)return!1;let i=Ia(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}getDateStringTypeDefinition(e){var o;let{dateString:t}=this.dataTypeDefinitions;return e&&(o=this.getDataTypeDefinition(e))!=null?o:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){let t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i,r;if(t==null)return!0;let o=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return!o||e.getColDef().allowFormula&&((r=this.beans.formula)!=null&&r.isFormula(t))?!0:o(t)}validateColDef(e,t,o,i){if(e.cellDataType==="object"){let r=l=>(l==null?void 0:l.cellDataType)==null||(l==null?void 0:l.cellDataType)===!0,a=r(t)&&r(o),n=l=>R(48,{property:l,inferred:a,colId:i}),{object:s}=this.dataTypeDefinitions;e.valueFormatter===s.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&n("Formatter"),e.editable&&e.valueParser===s.valueParser&&!this.hasObjectValueParser&&n("Parser")}}postProcess(e){var n;let t=e.cellDataType;if(!t||typeof t!="string")return;let{dataTypeDefinitions:o,beans:i,formatValueFuncs:r}=this,a=o[t];a&&((n=i.colFilter)==null||n.setColDefPropsForDataType(e,a,r[t]))}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){let r=this.formatValueFuncs[t],a=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:r,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&a.cellEditor!==e.cellEditor&&(a.cellEditor=e.cellEditor),Object.assign(e,a)}getDateObjectTypeDef(e){let t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>me(i.newValue&&String(i.newValue)),valueFormatter:i=>{var r;return i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):(r=fe(i.value,o))!=null?r:""},dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){let t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>{var i;return(i=me(o))!=null?i:void 0},dateFormatter:o=>{var i;return(i=fe(o!=null?o:null,t))!=null?i:void 0},valueParser:o=>ji(String(o.newValue))?o.newValue:null,valueFormatter:o=>ji(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&ji(o)}}getDefaultDataTypes(){let e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var o,i;return((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?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=>{let{newValue:o}=t;return o==null||typeof o=="string"&&o.trim()===""?null:Se(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:xa(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>{var o,i;return t.newValue==null?t.newValue:((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?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"&&xw(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>{var o;return(o=xa(t.value))!=null?o:""}}}}destroyColumnStateUpdateListeners(){for(let e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function al(e,t){let o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...nr(e.columnTypes),...nr(t.columnTypes)]),o}function nl(e,t,o){return t?t.baseDataType!==e.baseDataType?(R(46),!1):!0:(R(45,{parentCellDataType:o}),!1)}var Ew=e=>typeof e=="bigint"||typeof e=="number",Fw=e=>e==="number"||e==="bigint";function sl(e,t){if(e.valueFormatter)return o=>{var s,l;let{node:i,colDef:r,column:a,value:n}=o;if(i!=null&&i.group){let c=((s=r.pivotValueColumn)!=null?s:a).getAggFunc();if(c){if(c==="first"||c==="last")return e.valueFormatter(o);let{baseDataType:d}=e;if(Fw(d)&&c!=="count"){if(Ew(n))return e.valueFormatter(o);if(n==null)return;if(typeof n=="object"){if(typeof n.toNumber=="function")return e.valueFormatter({...o,value:n.toNumber()});if("value"in n)return e.valueFormatter({...o,value:n.value})}}return}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!((l=e.dataTypeMatcher)!=null&&l.call(e,o.value)))return;return e.valueFormatter(o)}}function Dw(e,t,o,i){if(!t[o])return!1;let r=e[o];return r===null?(t[o]=!1,!1):i===void 0?!!r:r===i}function Mw(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;let o=Se(e),i=Se(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:0}function Pw(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;let o=ll(e),i=ll(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:0}function ll(e){let t=Se(e);return t==null?null:tDw(e,t,o,i))}function Iw(e,t){let o=qd(e);for(let i of t)delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex;return o}var Tw={moduleName:"DataType",version:P,beans:[Rw],dependsOn:[YC]},Aw={moduleName:"ColumnFlex",version:P,beans:[ww]},Ud={moduleName:"ColumnApi",version:P,beans:[Cw],apiFunctions:{getColumnDef:ZC,getDisplayNameForColumn:XC,getColumn:ew,getColumns:tw,applyColumnState:ow,getColumnState:iw,resetColumnState:rw,isPinning:aw,isPinningLeft:nw,isPinningRight:sw,getDisplayedColAfter:lw,getDisplayedColBefore:cw,setColumnsVisible:dw,setColumnsPinned:gw,getAllGridColumns:uw,getDisplayedLeftColumns:hw,getDisplayedCenterColumns:pw,getDisplayedRightColumns:fw,getAllDisplayedColumns:mw,getAllDisplayedVirtualColumns:vw,getColumnDefs:JC}},zw=class extends S{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;let i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:r}=this.beans;return o&&r?r.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){let i=t==null?void 0:t.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,r){var n,s;let a=e.headerValueGetter;if(a){let l=O(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:r});return typeof a=="function"?a(l):typeof a=="string"?(s=(n=this.beans.expressionSvc)==null?void 0:n.evaluate(a,l))!=null?s:null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return Su(e.field)}return""}},Lw=class extends S{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){let{visibleCols:i}=this,r=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!r)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){let n=i.bodyWidth;this.viewportLeft=n-t-e,this.viewportRight=n-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!=null?o:[]}extractViewportColumns(){let 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()||Ow(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,r=this.viewportRight+200,a=tr&&o>r;return!a&&!n}getViewportColumns(){let{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;let t=a=>{let n=a.getLeft();return I(n)&&n>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,r=i.centerCols;return i.getColsForRow(e,r,o,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){let{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;let o=i=>{var n;let r=new Set,a={};for(let s of i){let l=s.getParent(),c=s.isSpanHeaderHeight();for(;l&&!r.has(l);){if(c&&l.isPadding()){l=l.getParent();continue}let g=l.getProvidedColumnGroup().getLevel();(n=a[g])!=null||(a[g]=[]),a[g].push(l),r.add(l),l=l.getParent()}}return a};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}extractViewport(){let e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();let t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function Ow(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var Hw=class extends S{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(r){let a=t(r),n=typeof a;if(n==="string"||n==="number"||n==="boolean"){this.eGui=pn(""+a+"");return}if(a==null){this.eGui=oe({tag:"span"});return}this.eGui=a}}return o}},Bw={moduleName:"CellRendererFunction",version:P,beans:[Hw]},Nw=class extends ve{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){var t;if(e){(t=this.dynamicBeans)!=null||(this.dynamicBeans={});for(let o of Object.keys(e))this.dynamicBeans[o]=e[o]}}createDynamicBean(e,t,...o){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));let i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new i(...o)}};function Vw(e){return typeof e=="object"&&!!e.getComp}var Gw=class extends Nw{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){let e=this.gos.get("components");if(e!=null)for(let t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){let{icons:t,userComponents:o,dynamicBeans:i,selectors:r}=e;if(o){let a=(n,s,l,c)=>{this.agGridDefaults[n]=s,(l||c)&&(this.agGridDefaultOverrides[n]={params:l,processParams:c})};for(let n of Object.keys(o)){let s=o[n];if(Vw(s)&&(s=s.getComp(this.beans)),typeof s=="object"){let{classImp:l,params:c,processParams:d}=s;a(n,l,c,d)}else a(n,s)}}this.registerDynamicBeans(i);for(let a of r!=null?r:[])this.selectors[a.selector]=a;if(t)for(let a of Object.keys(t))this.icons[a]=t[a]}getUserComponent(e,t){var s;let o=(l,c,d,g)=>({componentFromFramework:c,component:l,params:d,processParams:g}),{frameworkOverrides:i}=this.beans,r=i.frameworkComponent(t,this.gos.get("components"));if(r!=null)return o(r,!0);let a=this.jsComps[t];if(a){let l=i.isFrameworkComponent(a);return o(a,l)}let n=this.agGridDefaults[t];if(n){let l=this.agGridDefaultOverrides[t];return o(n,!1,l==null?void 0:l.params,l==null?void 0:l.processParams)}return(s=this.beans.validation)==null||s.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){var o,i;return t?Xe(279,{name:e}):(i=(o=this.beans.validation)==null?void 0:o.missingDynamicBean(e))!=null?i:Xe(256)}},Ww=23,qw=class extends S{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){var e,t,o;this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(let i of this.readyCallbacks)i(this.params);this.readyCallbacks.length=0}},(o=(t=(e=this.beans.frameworkOverrides).runWhenReadyAsync)==null?void 0:t.call(e))!=null?o:!1)}updateReady(){let e=Object.values(this.params);this.ready=e.length===Ww&&e.every(t=>{var o;return(o=t==null?void 0:t.isAlive())!=null?o:!1})}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{let 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(){let{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){let t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},_w=':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}',ec,tc,qn=typeof window!="object"||!((tc=(ec=window==null?void 0:window.document)==null?void 0:ec.fonts)!=null&&tc.forEach),pr=!1,to=(e,t,o,i,r,a,n=!1)=>{if(qn||pr)return;let s=e;i&&(s=`@layer ${CSS.escape(i).replaceAll("\\.",".")} { ${e} }`);let l=Ze.map.get(t);if(l||(l=[],Ze.map.set(t,l)),l.some(u=>u.injectedCss===s))return;let c=document.createElement("style");a&&c.setAttribute("nonce",a),c.dataset.agCss=o,c.dataset.agCssVersion=P,c.textContent=s;let d={rawCss:e,injectedCss:s,el:c,priority:r,isParams:n},g;for(let u of l){if(u.priority>r)break;g=u}if(g){g.el.after(c);let u=l.indexOf(g);l.splice(u+1,0,d)}else t.nodeName==="STYLE"?t.after(c):t.insertBefore(c,t.querySelector(":not(title, meta)")),l.push(d)},jd=(e,t,o,i)=>{to(_w,e,"shared",t,0,o),i==null||i.forEach((r,a)=>r.forEach(n=>to(n,e,a,t,0,o)))},Uw=(e,t,o,i,r,a)=>{if(qn||pr)return;let n=Ze.grids.get(e);n?n.paramsCss=t:Ze.grids.set(e,{styleContainer:i,paramsCss:t}),qa(i),t&&o&&to(t,i,o,r,2,a,!0)},jw=e=>{var i;let t=(i=Ze.grids.get(e))==null?void 0:i.styleContainer;if(!t)return;Ze.grids.delete(e),Array.from(Ze.grids.values()).some(r=>r.styleContainer===t)?qa(t):(qa(t,!0),Ze.map.delete(t))},qa=(e,t=!1)=>{var r;let o=new Set;for(let a of Ze.grids.values())a.styleContainer===e&&o.add(a.paramsCss);let i=(r=Ze.map.get(e))!=null?r:[];for(let a=i.length-1;a>=0;a--)(t||i[a].isParams&&!o.has(i[a].rawCss))&&(i[a].el.remove(),i.splice(a,1))},Kd=()=>{var o;let e=(o=globalThis.agStyleInjectionVersions)!=null?o:globalThis.agStyleInjectionVersions=new Map,t=e.get(P);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(P,t)),t},Ze=Kd(),Ge=e=>new $d(e),bt="$default",Kw=0,$d=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:r}){var a;this.feature=e,this.css=i,this.cssImports=r,this.modeParams={[bt]:{...(a=o[bt])!=null?a:{},...t!=null?t:{}},...o}}use(e,t,o){var r,a;let i=this._inject;if(i==null){let{css:n}=this;if(n){let s=`ag-theme-${(r=this.feature)!=null?r:"part"}-${++Kw}`;typeof n=="function"&&(n=n()),n=`:where(.${s}) { ${n} } `;for(let l of(a=this.cssImports)!=null?a:[])n=`@import url(${JSON.stringify(l)}); -${n}`;i={css:n,class:s}}else i=!1;this._inject=i}return i&&e&&eo(i.css,e,i.class,t,1,o),i?i.class:!1}},_w=e=>e.replace(/[A-Z]|\d+/g,t=>`-${t}`).toLowerCase(),qn=e=>`--ag-${_w(e)}`,tt=e=>`var(${qn(e)})`,Uw=(e,t,o)=>Math.max(t,Math.min(o,e)),jw=e=>{let t=new Map;return o=>{let i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}},je=e=>({ref:"accentColor",mix:e}),Ee=e=>({ref:"foregroundColor",mix:e}),Pe=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),Kw=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),ue={ref:"backgroundColor"},Wt={ref:"foregroundColor"},$e={ref:"accentColor"},pr={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:Ee(.15),chromeBackgroundColor:Pe(.02),browserColorScheme:"light"},$w={...pr,textColor:Wt,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,fontWeight:"inherit",focusShadow:{spread:3,color:je(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:ue,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:$e,toggleButtonOffBackgroundColor:Pe(.3),toggleButtonSwitchBackgroundColor:ue,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:ue,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:Ee(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:Ee(.2)},menuBackgroundColor:Pe(.03),menuTextColor:Pe(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},Yw=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Qw=jw(e=>{var t;return e=e.toLowerCase(),(t=Yw.find(o=>e.endsWith(o.toLowerCase())))!=null?t:"length"}),Dr=e=>typeof e=="object"&&(e!=null&&e.ref)?tt(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,_n=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e&&"ref"in e){let t=tt(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?tt(e.onto):"transparent"}, ${t} ${Uw(e.mix*100,0,100)}%)`}return!1},Zw=Dr,po=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:typeof e=="object"&&e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:" "+tt(o)+" ")})`:typeof e=="object"&&e&&"ref"in e?tt(e.ref):!1,Jw=Dr,qa=(e,t)=>{var o,i,r;return typeof e=="string"?e:e===!0?qa({},t):e===!1?t==="columnBorder"?qa({color:"transparent"},t):"none":typeof e=="object"&&e&&"ref"in e?tt(e.ref):$d((o=e.style)!=null?o:"solid")+" "+po((i=e.width)!=null?i:{ref:"borderWidth"})+" "+_n((r=e.color)!=null?r:{ref:"borderColor"})},ll=e=>{var t,o,i,r,a;return[po((t=e.offsetX)!=null?t:0),po((o=e.offsetY)!=null?o:0),po((i=e.radius)!=null?i:0),po((r=e.spread)!=null?r:0),_n((a=e.color)!=null?a:{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" ")},Xw=e=>typeof e=="string"?e:e===!1?"none":typeof e=="object"&&e&&"ref"in e?tt(e.ref):Array.isArray(e)?e.map(ll).join(", "):ll(e),$d=Dr,Yd=e=>typeof e=="string"?e.includes(",")?e:cl(e):typeof e=="object"&&e&&"googleFont"in e?Yd(e.googleFont):typeof e=="object"&&e&&"ref"in e?tt(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),cl(t))).join(", "):!1,cl=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),e0=Dr,Qd=e=>typeof e=="string"?e:typeof e=="object"&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:typeof e=="object"&&e&&"svg"in e?Qd({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):typeof e=="object"&&e&&"ref"in e?tt(e.ref):!1,t0=(e,t,o)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&(o==null||o.warn(104,{value:e,param:t})),`${e}s`):typeof e=="object"&&e&&"ref"in e?tt(e.ref):!1,o0={color:_n,colorScheme:Zw,length:po,scale:Jw,border:qa,borderStyle:$d,shadow:Xw,image:Qd,fontFamily:Yd,fontWeight:e0,duration:t0},i0=(e,t,o)=>{let i=Qw(e);return o0[i](t,e,o)};var r0=(e,t)=>new Zd({themeLogger:e,overridePrefix:t}),Zd=class Jd{constructor(t,o=[]){this.params=t,this.parts=o}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Kd?new Jd(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(Ne({feature:t}))}withParams(t,o=wt){return this.withPart(Ne({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:i,loadThemeGoogleFonts:r,moduleCss:a}){if(Wn||hr)return;n0(),Ud(t,o,i,a);let n=a0(this);if(n.length>0)for(let s of n)r&&s0(s,i);for(let s of this.parts)s.use(t,o,i)}_getCssClass(){var t;return hr?"ag-theme-quartz":(t=this._cssClassCache)!=null?t:this._cssClassCache=dl(this.parts).map(o=>o.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" ")}_getParamsClassName(){var t;return(t=this._paramsClassName)!=null?t:this._paramsClassName=`ag-theme-params-${++jd().paramsId}`}_getModeParams(){var o;let t=this._paramsCache;if(!t){let i={[wt]:{...$w}};for(let r of dl(this.parts))for(let a of Object.keys(r.modeParams)){let n=r.modeParams[a];if(n){let s=(o=i[a])!=null?o:i[a]={},l=new Set;for(let c of Object.keys(n)){let d=n[c];d!==void 0&&(s[c]=d,l.add(c))}if(a===wt)for(let c of Object.keys(i)){let d=i[c];if(c!==wt)for(let g of l)delete d[g]}}}this._paramsCache=t=i}return t}_getParamsCss(){if(!this._paramsCssCache){let t="",o="",i=this._getModeParams(),{overridePrefix:r,themeLogger:a}=this.params,n=r?`--ag-${r}-`:void 0;for(let c of Object.keys(i)){let d=i[c];if(c!==wt){let u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(c):c}"]) & { -`;t+=u,o+=u}for(let g of Object.keys(d).sort()){let u=d[g],h=i0(g,u,a);if(h===!1)a.error(107,{key:g,value:u});else{let p=qn(g),f=n?p.replace("--ag-",n):p,m=p.replace("--ag-","--ag-inherited-");t+=` ${p}: var(${m}, ${h}); +${n}`;i={css:n,class:s}}else i=!1;this._inject=i}return i&&e&&to(i.css,e,i.class,t,1,o),i?i.class:!1}},$w=e=>e.replace(/[A-Z]|\d+/g,t=>`-${t}`).toLowerCase(),_n=e=>`--ag-${$w(e)}`,ot=e=>`var(${_n(e)})`,Yw=(e,t,o)=>Math.max(t,Math.min(o,e)),Qw=e=>{let t=new Map;return o=>{let i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}},Ke=e=>({ref:"accentColor",mix:e}),Ee=e=>({ref:"foregroundColor",mix:e}),Pe=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),Zw=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),ue={ref:"backgroundColor"},qt={ref:"foregroundColor"},Ye={ref:"accentColor"},fr={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:Ee(.15),chromeBackgroundColor:Pe(.02),browserColorScheme:"light"},Jw={...fr,textColor:qt,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,fontWeight:"inherit",focusShadow:{spread:3,color:Ke(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:ue,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Ye,toggleButtonOffBackgroundColor:Pe(.3),toggleButtonSwitchBackgroundColor:ue,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:ue,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:Ee(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:Ee(.2)},menuBackgroundColor:Pe(.03),menuTextColor:Pe(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},Xw=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],e0=Qw(e=>{var t;return e=e.toLowerCase(),(t=Xw.find(o=>e.endsWith(o.toLowerCase())))!=null?t:"length"}),Mr=e=>typeof e=="object"&&(e!=null&&e.ref)?ot(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Un=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e&&"ref"in e){let t=ot(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?ot(e.onto):"transparent"}, ${t} ${Yw(e.mix*100,0,100)}%)`}return!1},t0=Mr,fo=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:typeof e=="object"&&e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:" "+ot(o)+" ")})`:typeof e=="object"&&e&&"ref"in e?ot(e.ref):!1,o0=Mr,_a=(e,t)=>{var o,i,r;return typeof e=="string"?e:e===!0?_a({},t):e===!1?t==="columnBorder"?_a({color:"transparent"},t):"none":typeof e=="object"&&e&&"ref"in e?ot(e.ref):Yd((o=e.style)!=null?o:"solid")+" "+fo((i=e.width)!=null?i:{ref:"borderWidth"})+" "+Un((r=e.color)!=null?r:{ref:"borderColor"})},cl=e=>{var t,o,i,r,a;return[fo((t=e.offsetX)!=null?t:0),fo((o=e.offsetY)!=null?o:0),fo((i=e.radius)!=null?i:0),fo((r=e.spread)!=null?r:0),Un((a=e.color)!=null?a:{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" ")},i0=e=>typeof e=="string"?e:e===!1?"none":typeof e=="object"&&e&&"ref"in e?ot(e.ref):Array.isArray(e)?e.map(cl).join(", "):cl(e),Yd=Mr,Qd=e=>typeof e=="string"?e.includes(",")?e:dl(e):typeof e=="object"&&e&&"googleFont"in e?Qd(e.googleFont):typeof e=="object"&&e&&"ref"in e?ot(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),dl(t))).join(", "):!1,dl=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),r0=Mr,Zd=e=>typeof e=="string"?e:typeof e=="object"&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:typeof e=="object"&&e&&"svg"in e?Zd({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):typeof e=="object"&&e&&"ref"in e?ot(e.ref):!1,a0=(e,t,o)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&(o==null||o.warn(104,{value:e,param:t})),`${e}s`):typeof e=="object"&&e&&"ref"in e?ot(e.ref):!1,n0={color:Un,colorScheme:t0,length:fo,scale:o0,border:_a,borderStyle:Yd,shadow:i0,image:Zd,fontFamily:Qd,fontWeight:r0,duration:a0},s0=(e,t,o)=>{let i=e0(e);return n0[i](t,e,o)};var l0=(e,t)=>new Jd({themeLogger:e,overridePrefix:t}),Jd=class Xd{constructor(t,o=[]){this.params=t,this.parts=o}withPart(t){return typeof t=="function"&&(t=t()),t instanceof $d?new Xd(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(Ge({feature:t}))}withParams(t,o=bt){return this.withPart(Ge({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:i,loadThemeGoogleFonts:r,moduleCss:a}){if(qn||pr)return;d0(),jd(t,o,i,a);let n=c0(this);if(n.length>0)for(let s of n)r&&g0(s,i);for(let s of this.parts)s.use(t,o,i)}_getCssClass(){var t;return pr?"ag-theme-quartz":(t=this._cssClassCache)!=null?t:this._cssClassCache=gl(this.parts).map(o=>o.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" ")}_getParamsClassName(){var t;return(t=this._paramsClassName)!=null?t:this._paramsClassName=`ag-theme-params-${++Kd().paramsId}`}_getModeParams(){var o;let t=this._paramsCache;if(!t){let i={[bt]:{...Jw}};for(let r of gl(this.parts))for(let a of Object.keys(r.modeParams)){let n=r.modeParams[a];if(n){let s=(o=i[a])!=null?o:i[a]={},l=new Set;for(let c of Object.keys(n)){let d=n[c];d!==void 0&&(s[c]=d,l.add(c))}if(a===bt)for(let c of Object.keys(i)){let d=i[c];if(c!==bt)for(let g of l)delete d[g]}}}this._paramsCache=t=i}return t}_getParamsCss(){if(!this._paramsCssCache){let t="",o="",i=this._getModeParams(),{overridePrefix:r,themeLogger:a}=this.params,n=r?`--ag-${r}-`:void 0;for(let c of Object.keys(i)){let d=i[c];if(c!==bt){let u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(c):c}"]) & { +`;t+=u,o+=u}for(let g of Object.keys(d).sort()){let u=d[g],h=s0(g,u,a);if(h===!1)a.error(107,{key:g,value:u});else{let p=_n(g),f=n?p.replace("--ag-",n):p,m=p.replace("--ag-","--ag-inherited-");t+=` ${p}: var(${m}, ${h}); `,o+=` ${m}: var(${f}); -`}}c!==wt&&(t+=`} +`}}c!==bt&&(t+=`} `,o+=`} `)}let s=`:where(.${this._getParamsClassName()})`,l=`${s} { ${t}} `;l+=`:has(> ${s}):not(${s}) { ${o}} -`,this._paramsCssCache=l}return this._paramsCssCache}},dl=e=>{let t=new Map;for(let i of e)t.set(i.feature,i);let o=[];for(let i of e)(!i.feature||t.get(i.feature)===i)&&o.push(i);return o},a0=e=>{let t=new Set,o=a=>{if(Array.isArray(a))a.forEach(o);else{let n=a==null?void 0:a.googleFont;typeof n=="string"&&t.add(n)}};return Object.values(e._getModeParams()).flatMap(a=>Object.values(a)).forEach(o),Array.from(t).sort()},gl=!1,n0=()=>{if(!gl){gl=!0;for(let e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},s0=async(e,t)=>{let o=`@import url('https://${l0}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap'); -`;eo(o,document.head,`googleFont:${e}`,void 0,0,t)},l0="fonts.googleapis.com",ul={changeKey:"listItemHeight",type:"length",defaultValue:24},c0=class extends ve{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){var a;let{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);let o=e.get("themeStyleContainer"),i=typeof ShadowRoot!="undefined",r=i&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(a=typeof o=="function"?o():o)!=null?a:r?t:document.head,!o&&!r&&i&&d0(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(ul),this.initVariables(),this.addDestroyFunc(()=>Ww(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){let{theme:o}=this,i=o?o._getCssClass():this.applyLegacyThemeClasses();for(let r of Array.from(e.classList))r.startsWith("ag-theme-")&&e.classList.remove(r);if(i){let r=e.className;e.className=`${r}${r?" ":""}${i}${t!=null&&t.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let o=!1;for(let i of Array.from(t.classList))i.startsWith("ag-theme-")&&(o=!0,e=e?`${e} ${i}`:i);o&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?eo(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(ul)}getCSSVariablePixelValue(e){let t=this.lastKnownValues.get(e);if(t!=null)return t;let o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){let t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";let o=t.offsetWidth;return o===pa?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Qt({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let o=this.getMeasurementContainer();t=Qt({tag:"div"});let i=this.setSizeElStyles(t,e);o.appendChild(t),this.sizeEls.set(e,t);let{type:r,noWarn:a}=e;if(r!=="length"&&r!=="border")return t;let n=this.measureSizeEl(e);n==="no-styles"&&!a&&this.varError(i,e.defaultValue);let s=Tt(this.beans,t,()=>{let l=this.measureSizeEl(e);l==="detached"||l==="no-styles"||(this.lastKnownValues.set(e,l),l!==n&&(n=l,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>s()),t}setSizeElStyles(e,t){let{changeKey:o,type:i}=t,r=qn(o);return i==="border"?(r.endsWith("-width")&&(r=r.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${r}, solid ${pa}px)`)):e.style.width=`var(${r}, ${pa}px)`,r}handleThemeChange(){let{gos:e,theme:t}=this,o=e.get("theme"),i;if(o==="legacy")i=void 0;else{let r=o!=null?o:this.getDefaultTheme();r instanceof Zd?i=r:this.themeError(r)}i!==t&&this.handleNewTheme(i),this.postProcessThemeChange(i,o)}handleNewTheme(e){var a,n;let{gos:t,eRootDiv:o,globalCSS:i}=this,r=this.getAdditionalCss();if(e){Ud(this.eStyleContainer,this.cssLayer,this.styleNonce,r);for(let[s,l]of i)eo(s,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);i.length=0}this.theme=e,e==null||e._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:r}),Gw(this,(a=e==null?void 0:e._getParamsCss())!=null?a:null,(n=e==null?void 0:e._getParamsClassName())!=null?n:null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(o),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},pa=15538,d0=(e,t,o)=>{let i=60,r=setInterval(()=>{typeof ShadowRoot!="undefined"&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(r)),(e.isConnected||--i<0)&&clearInterval(r)},1e3);o(()=>clearInterval(r))},g0='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}',u0={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:ue,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:$e,rangeSelectionBackgroundColor:je(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:je(.5),rangeHeaderHighlightColor:Kw(.08),rowNumbersSelectedColor:je(.5),rowHoverColor:je(.08),columnHoverColor:je(.05),selectedRowBackgroundColor:je(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:ue,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:Ee(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:Ee(.1),iconButtonActiveColor:$e,iconButtonActiveBackgroundColor:je(.28),iconButtonActiveIndicatorColor:$e,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:Ee(.8),cellEditingBorder:{color:$e},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:Ee(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:Ee(.13)},selectCellBackgroundColor:Ee(.07),selectCellBorder:{color:Ee(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:ue,filterPanelApplyButtonBackgroundColor:$e,columnPanelApplyButtonColor:ue,columnPanelApplyButtonBackgroundColor:$e,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Wt,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Wt,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:Ee(.15),statusBarLabelColor:Wt,statusBarLabelFontWeight:500,statusBarValueColor:Wt,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},h0=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",Xd={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},p0={...Xd,cellBatchEditTextColor:"#f3d0b3"},f0=()=>Ne({feature:"batchEditStyle",params:Xd,css:h0}),m0=f0(),v0=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",C0={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}};var w0=()=>Ne({feature:"buttonStyle",params:{...C0,buttonBackgroundColor:ue,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:$e}},css:v0}),b0=w0();var y0=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}";var S0=()=>Ne({feature:"columnDropStyle",css:y0}),eg=S0();var x0={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},k0=()=>Ne({feature:"formulaStyle",params:x0}),R0=k0(),E0={warn:(...e)=>{k(e[0],e[1])},error:(...e)=>{W(e[0],e[1])},preInitErr:(...e)=>{_o(e[0],e[2],e[1])}},F0=()=>r0(E0).withParams(u0).withPart(b0).withPart(eg).withPart(m0).withPart(R0),D0='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',M0=()=>Ne({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ue,checkboxUncheckedBorderColor:Pe(.3),checkboxCheckedBackgroundColor:$e,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:''},checkboxCheckedShapeColor:ue,checkboxIndeterminateBackgroundColor:Pe(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:''},checkboxIndeterminateShapeColor:ue,radioCheckedShapeImage:{svg:''}},css:D0}),P0=M0();var tg=()=>({...pr,...p0,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Pe(.05),rowHoverColor:je(.15),selectedRowBackgroundColor:je(.2),menuBackgroundColor:Pe(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Wt,columnPanelApplyButtonColor:Wt,findMatchColor:ue,findActiveMatchColor:ue,checkboxUncheckedBorderColor:Pe(.4),toggleButtonOffBackgroundColor:Pe(.4),rowBatchEditBackgroundColor:Pe(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"});var I0=()=>({...tg(),backgroundColor:"#1f2836"});var T0=()=>Ne({feature:"colorScheme",params:pr,modeParams:{light:pr,dark:tg(),"dark-blue":I0()}}),A0=T0();var og={aggregation:'',arrows:'',asc:'',cancel:'',chart:'',"color-picker":'',columns:'',contracted:'',copy:'',cross:'',csv:'',cut:'',desc:'',down:'',excel:'',expanded:'',eye:'',"eye-slash":'',filter:'',first:'',grip:'',group:'',last:'',left:'',linked:'',loading:'',maximize:'',menu:'',"menu-alt":'',minimize:'',minus:'',next:'',none:'',"not-allowed":'',paste:'',pin:'',pivot:'',plus:'',previous:'',right:'',save:'',settings:'',"small-left":'',"small-right":'',tick:'',"tree-closed":'',"tree-indeterminate":'',"tree-open":'',unlinked:'',up:''},ig={aasc:'',adesc:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"column-arrow":'',edit:'',"filter-add":'',"pinned-bottom":'',"pinned-top":'',"small-down":'',"small-up":'',"un-pin":''},z0=(e={})=>{let t="";for(let o of[...Object.keys(og),...Object.keys(ig)]){let i=L0(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); } -`}return t},L0=(e,t=1.5)=>{let o=ig[e];if(o)return o;let i=og[e];if(!i)throw new Error(`Missing icon data for ${e}`);return``+i+""},O0=(e={})=>Ne({feature:"iconSet",css:()=>z0(e)});var H0=O0();var B0=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',V0=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}";var N0={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4};var G0=()=>Ne({feature:"inputStyle",params:{...N0,inputBackgroundColor:ue,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:$e},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Pe(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>B0+V0}),W0=G0();var q0='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}';var _0={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1};var U0=()=>Ne({feature:"tabStyle",params:{..._0,tabBarBorder:!0,tabBarBackgroundColor:Ee(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ue},css:q0}),j0=U0();var K0=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),$0=()=>F0().withPart(P0).withPart(A0).withPart(H0).withPart(j0).withPart(W0).withPart(eg).withParams(K0()),Y0=$0();var Lt=(e,t,o,i,r)=>({changeKey:e,type:t,defaultValue:o,noWarn:i,cacheDefault:r}),Q0=Lt("cellHorizontalPadding","length",16),Z0=Lt("indentationLevel","length",0,!0,!0),J0=Lt("rowGroupIndentSize","length",0),hl=Lt("rowHeight","length",42),pl=Lt("headerHeight","length",48),fa=Lt("rowBorderWidth","border",1),fl=Lt("pinnedRowBorderWidth","border",1),X0=Lt("headerRowBorderWidth","border",1);function eb(e,t){for(let o of t.sort((i,r)=>i.moduleName.localeCompare(r.moduleName))){let i=o.css;i&&e.set(`module-${o.moduleName}`,i)}}var tb=class extends c0{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(hl),this.getSizeEl(pl),this.getSizeEl(fa),this.getSizeEl(fl),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(fl)}getRowBorderWidth(){return this.getCSSVariablePixelValue(fa)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(X0)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(hl)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(pl)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(Q0)}getCellPaddingLeft(){let e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(Z0),o=this.getCSSVariablePixelValue(J0);return e-1+o*t}getCellPadding(){let e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){let{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;let i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){let e=this.getCSSVariablePixelValue(fa);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&W(t?106:239)}getAdditionalCss(){let e=new Map;return e.set("core",[g0]),eb(e,Array.from(ph())),e}getDefaultTheme(){return Y0}varError(e,t){k(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){W(240,{theme:e})}shadowRootError(){W(293)}},ob=class extends ve{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new Yt}addListener(e,t,o){this.globalSvc.addEventListener(e,t,o)}removeListener(e,t,o){this.globalSvc.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},ib=class extends ob{postConstruct(){let{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function _a(e,t,o){let i=e.visibleCols.headerGroupRowCount;if(o>=i)return{column:t,headerRowIndex:o};let r=t.getParent();for(;r&&r.getProvidedColumnGroup().getLevel()>o;)r=r.getParent();let a=t.isSpanHeaderHeight();return!r||a&&r.isPadding()?{column:t,headerRowIndex:i}:{column:r,headerRowIndex:r.getProvidedColumnGroup().getLevel()}}var rb=class extends S{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});let t=te(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){var h;let o,{colModel:i,colGroupSvc:r,ctrlsSvc:a}=this.beans;if(typeof e=="string"?(o=i.getCol(e),o||(o=(h=r==null?void 0:r.getColumnGroup(e))!=null?h:null)):o=e,!o)return null;let n=a.getHeaderRowContainerCtrl(),s=n==null?void 0:n.getAllCtrls(),l=U(s||[]).type==="filter",c=Fe(this.beans)-1,d=-1,g=o;for(;g;)d++,g=g.getParent();let u=d;return t&&l&&u===c-1&&u++,u===-1?null:{headerRowIndex:u,column:o}}navigateVertically(e,t){let{focusSvc:o,visibleCols:i}=this.beans,{focusedHeader:r}=o;if(!r)return!1;let{headerRowIndex:a}=r,n=r.column,s=Fe(this.beans),l=this.getHeaderRowType(a),c=i.headerGroupRowCount,{headerRowIndex:d,column:g,headerRowIndexWithoutSpan:u}=e==="UP"?ab(l,n,a):nb(n,a,c),h=!1;return d<0&&(d=0,g=n,h=!0),d>=s?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!h&&!g?!1:o.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:g},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,o){let{focusSvc:i,gos:r}=this.beans,a={...i.focusedHeader},n,s;this.currentHeaderRowWithoutSpan!==-1?a.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=a.headerRowIndex,e==="LEFT"!==r.get("enableRtl")?(s="Before",n=this.findHeader(a,s)):(s="After",n=this.findHeader(a,s));let l=r.getCallback("tabToNextHeader");if(t&&l){let c=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:n,direction:s});if(c){let{headerRowIndex:d}=i.focusedHeader||{};d!=null&&d!=a.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return n||!t?i.focusHeaderPosition({headerPosition:n,direction:s,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(a,s,o)}focusNextHeaderRow(e,t,o){let i=this.beans,r=e.headerRowIndex,a=null,n,s=Fe(i),l=this.beans.visibleCols.allCols;if(t==="Before"){if(r<=0)return!1;a=U(l),n=r-1,this.currentHeaderRowWithoutSpan-=1}else a=l[0],n=r+1,this.currentHeaderRowWithoutSpan=s&&(d=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(X(e)){let i=e.getDisplayedLeafColumns();o=t==="Before"?U(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){let{colGroupSvc:o,visibleCols:i}=this.beans,r=e.column;if(r instanceof ui){let l=r.getDisplayedLeafColumns();r=t==="Before"?l[0]:l[l.length-1]}let a=t==="Before"?i.getColBefore(r):i.getColAfter(r);if(!a)return;let n=i.headerGroupRowCount;if(e.headerRowIndex>=n)return{headerRowIndex:e.headerRowIndex,column:a};let s=o==null?void 0:o.getColGroupAtLevel(a,e.headerRowIndex);return s?s.isPadding()&&a.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:a}:{headerRowIndex:e.headerRowIndex,column:s!=null?s:a}:{headerRowIndex:a instanceof ao&&a.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:a}}getHeaderRowType(e){let t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function ab(e,t,o){let i=o-1;if(e!=="filter"){let r=t instanceof ao&&t.isSpanHeaderHeight(),a=t.getParent();for(;a&&(a.getProvidedColumnGroup().getLevel()>i||r&&a.isPadding());)a=a.getParent();if(a)return r?{column:a,headerRowIndex:a.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:i}:{column:a,headerRowIndex:i,headerRowIndexWithoutSpan:i}}return{column:t,headerRowIndex:i,headerRowIndexWithoutSpan:i}}function nb(e,t,o){let i=t+1,r={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof ui){if(i>=o)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:o,headerRowIndexWithoutSpan:i};let n=e.getDisplayedChildren()[0];if(n instanceof ui&&n.isPadding()){let l=n.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(n=l)}r.column=n,n instanceof ao&&n.isSpanHeaderHeight()&&(r.headerRowIndex=o,r.headerRowIndexWithoutSpan=i)}return r}var sb=class extends S{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){let e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(Jp(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;let e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){let{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Y(this.beans),pd)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){let e=Y(this.beans);return this.isDomDataPresentInHierarchy(e,cr,!0)?!0:this.isDomDataPresentInHierarchy(e,dr,!0)}isDomDataPresentInHierarchy(e,t,o){let i=e;for(;i;){let r=Mc(this.gos,i,t);if(r)return r.destroyed&&o?(this.attemptToRecoverFocus(),!1):!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){let{rowIndex:t,rowPinned:o,column:i}=e,r={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},a=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return a&&(r.isFullWidthCell=a.isFullWidth()),r}clearFocusedCell(){if(this.focusedCell==null)return;let e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();let{column:t,rowIndex:o,rowPinned:i,forceBrowserFocus:r=!1,preventScrollOnBrowserFocus:a=!1,sourceEvent:n}=e,s=this.colModel.getCol(t);if(!s){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:st(i),column:s};let l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:r,preventScrollOnBrowserFocus:a,sourceEvent:n}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:Pn(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;let{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:r,headerRowIndex:a}=this.focusedHeader;return t===r&&o===a&&i==r.getPinned()}focusHeaderPosition(e){var c;if(this.setFocusRecovered(),Le(this.beans))return!1;let{direction:t,fromTab:o,allowUserOverride:i,event:r,fromCell:a,rowWithoutSpanValue:n,scroll:s=!0}=e,{headerPosition:l}=e;if(a&&((c=this.filterManager)!=null&&c.isAdvFilterHeaderActive()))return this.focusAdvancedFilter(l);if(i){let d=this.focusedHeader,g=Fe(this.beans);if(o){let u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:l,headerRowCount:g}))}else{let u=this.gos.getCallback("navigateToNextHeader");if(u&&r){let h={key:r.key,previousHeaderPosition:d,nextHeaderPosition:l,headerRowCount:g,event:r},p=u(h);l=p===null?d:p}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:r,fromCell:a,rowWithoutSpanValue:n,scroll:s}):!1}focusHeaderPositionFromUserFunc(e){if(Le(this.beans))return!1;let{userFunc:t,headerPosition:o,direction:i,event:r}=e,a=this.focusedHeader,n=Fe(this.beans),s=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:a,headerPosition:o,headerRowCount:n});return!!s&&this.focusProvidedHeaderPosition({headerPosition:s,direction:i,event:r})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:o,currentPosition:i,headerPosition:r,headerRowCount:a}=e,s=t({backwards:o==="Before",previousHeaderPosition:i,nextHeaderPosition:r,headerRowCount:a});return s===!0?i:s===!1?null:s}focusProvidedHeaderPosition(e){let{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:r,event:a,scroll:n=!0}=e,{column:s,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:g}=this.beans;if(this.focusedHeader&&Bf(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return c!=null&&c.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:s,event:a});n&&(g==null||g.scrollToColumn(s,o));let u=d.getHeaderRowContainerCtrl(s.getPinned()),h=(u==null?void 0:u.focusHeader(t.headerRowIndex,s,a))||!1;return g&&h&&(r!=null||i)&&(g.currentHeaderRowWithoutSpan=r!=null?r:-1),h}focusFirstHeader(){var o;if((o=this.overlays)!=null&&o.exclusive&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;let t=_a(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){var i;if((i=this.overlays)!=null&&i.exclusive&&this.focusOverlay(!0))return!0;let t=Fe(this.beans)-1,o=U(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){var t;return(t=this.filterManager)!=null&&t.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===st(t)}focusOverlay(e){var o,i;let t=((o=this.overlays)==null?void 0:o.isVisible())&&((i=this.overlays.eWrapper)==null?void 0:i.getGui());return!!t&&Jt(t,e)}getDefaultTabToNextGridContainerTarget(e){let{backwards:t,focusableContainers:o}=e,i=t?-1:1,r,a=()=>(r===void 0&&(r=this.getGridBodyTabTarget(t)),r);for(let n=e.nextIndex;n>=0&&n{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){var o;let e=this.ctrlsSvc.get("center");if(!e||(o=this.colAnimation)!=null&&o.isActive())return;let t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){let e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){let e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:Rn();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},cb=class extends S{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){var i,r;if(this.destroyCalled)return;let{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:(i=e==null?void 0:e.getState())!=null?i:{}}),this.destroyCalled=!0,(r=t.get("gridCtrl"))==null||r.destroyGridUi(),o.destroy(),super.destroy()}},db=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"];var ji=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Un=db.reduce((e,t)=>(e[t]=Hh(t),e),{}),Ro={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function ml(e){return`"${e}"`}var gb=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),ub={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:o})=>{var r;return!!t||!!o?typeof e=="string"&&(r=Ro[e])!=null?r:"CustomEditor":null},cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Ro[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>{var t;return e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"&&(t=Ro[e])!=null?t:"ColumnFilter"},floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{var o;let t=["columnsMenuTab","generalMenuTab"];return(o=e.menuTabs)!=null&&o.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},hb=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:o})=>o?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,o)=>o.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{let o=t.headerValueGetter;return typeof o=="function"||typeof o=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Je(262);if(t.smallLeft)return Je(263);if(t.smallRight)return Je(264)}return null}},sort:{validate:t=>xo(t.sort)||xt(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):Vi(t.sort)}`},initialSort:{validate:t=>xo(t.initialSort)||xt(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):Vi(t.initialSort)}`},sortingOrder:{validate:t=>{let o=t.sortingOrder;if(Array.isArray(o)&&o.length>0){let i=o.filter(r=>!(xo(r)||xt(r)));if(i.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${i.map(r=>typeof r=="string"||r==null?Vi(r):JSON.stringify(r)).join(", ")}]`}else if(!Array.isArray(o)||!o.length)return`sortingOrder must be an array with at least one element, currently it is [${o}]`;return null}},type:{validate:t=>{let o=t.type;return o instanceof Array?o.some(r=>typeof r!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof o=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:o})=>o?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:o,cellSelection:i,suppressRowTransform:r,enableCellSpan:a,rowDragEntireRow:n,enableCellTextSelection:s})=>typeof o=="object"&&(o==null?void 0:o.mode)==="singleRow"&&o!=null&&o.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":r?"colDef.spanRows is not supported with suppressRowTransform.":a?n?"colDef.spanRows is not supported with rowDragEntireRow.":s?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:o={}},i){var n,s;let r=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),a=[];for(let l of(n=t.groupHierarchy)!=null?n:[]){if(typeof l=="object"){(s=i.validation)==null||s.validateColDef(l);continue}!r.has(l)&&!(l in o)&&a.push(ml(l))}if(a.length>0){let l=`The following parts of colDef.groupHierarchy are not recognised: ${a.join(", ")}.`,c=`Choose one of ${[...r].map(ml).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${l} -${c}`}return null}}}),pb={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},fb=()=>Object.keys(pb),mb=()=>({objectName:"colDef",allProperties:fb(),docsUrl:"column-properties/",deprecations:gb(),validations:hb()}),vb=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],Cb=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],wb=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],rg=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],bb=["theme","rowSelection"],yb=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],ag=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],Sb=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],xb=()=>[...wb,...Cb,...vb,...rg,...Sb,...ag,...yb,...bb];var kb=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function _e(e,t,o){return typeof t=="number"||t==null?t==null||t>=o?null:`${e}: value should be greater than or equal to ${o}`:`${e}: value should be a number`}var Rb={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},Eb=()=>{let e={autoSizePadding:{validate({autoSizePadding:o}){return _e("autoSizePadding",o,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return _e("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return _e("cacheOverflowSize",o,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:o=>{let i=o.domLayout,r=["autoHeight","normal","print"];return i&&!r.includes(i)?`domLayout must be one of [${r.join()}], currently it's ${i}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,pinnedTopRowData:i,pinnedBottomRowData:r}){return o&&(i||r)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinnable:i,pinnedTopRowData:r,pinnedBottomRowData:a}){return i&&(r||a)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinned:i,pinnedTopRowData:r,pinnedBottomRowData:a}){return i&&(r||a)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:o,groupHideOpenParents:i,groupDisplayType:r}){return o&&!i&&r!=="multipleColumns"?"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`":null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:o={}},i,r){var a;for(let n of Object.keys(o))(a=r.validation)==null||a.validateColDef(o[n]);return null}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return Je(262);if(o.smallLeft)return Je(263);if(o.smallRight)return Je(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return _e("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:o=>{if(typeof o.ssrmExpandAllAffectsAllRows=="boolean"){if(o.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(o.ssrmExpandAllAffectsAllRows&&typeof o.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return _e("keepDetailRowsCount",o,1)}},paginationPageSize:{validate({paginationPageSize:o}){return _e("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{let i=o.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array. - If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:o}){return _e("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:o=>{let i=o.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:o}){return _e("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:o=>{let i=o.sortingOrder;if(Array.isArray(i)&&i.length>0){let r=i.filter(a=>!Me(a));if(r.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${r.map(a=>typeof a=="string"||a==null?Vi(a):JSON.stringify(a))}]`}else if(!Array.isArray(i)||!i.length)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:o=>o.tooltipSwitchShowDelay&&o.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:o=>{var r;let i=(r=o.rowModelType)!=null?r:"clientSide";switch(i){case"clientSide":{let{treeDataChildrenField:a,treeDataParentIdField:n,getDataPath:s,getRowId:l}=o;if(!a&&!n&&!s)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(a){if(s)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!l)return"getRowId callback not provided, tree data with parent id cannot be built.";if(s)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{let a=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:a}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return _e("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return _e("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:i}){return o!=null&&o.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o!=null&&o.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:o=>{let i=o.renderingMode,r=["default","legacy"];return i&&!r.includes(i)?`renderingMode must be one of [${r.join()}], currently it's ${i}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:o})=>{if(!o)return null;let i=["fitCellContents","fitGridWidth","fitProvidedWidth"],r=o.type;return r!=="fitCellContents"&&r!=="fitGridWidth"&&r!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${i.map(a=>'"'+a+'"').join(", ")}, currently it's ${r}`:r==="fitProvidedWidth"&&typeof o.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${o.width}`:null}}},t={};for(let o of ag)t[o]={expectedType:"boolean"};for(let o of rg)t[o]={expectedType:"number"};return he(t,e),t},Fb=()=>({objectName:"gridOptions",allProperties:[...xb(),...Object.values(Un)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:kb(),validations:Eb()}),Db=0,Mb=0,vl="__ag_grid_instance",Pb=class extends S{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=Mb++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Yt,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;let i=ji.has(t);if(i&&!e||!i&&e||!Ib(t))return;let r=(a,n)=>{let s=Un[a],l=this.gridOptions[s];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(n))};if(this.gridReadyFired)r(t,o);else if(t==="gridReady"){r(t,o),this.gridReadyFired=!0;for(let a of this.queueEvents)r(a.eventName,a.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:o})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){var t;return(t=this.gridOptions[e])!=null?t:sh[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return M(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addCommon(o)))}updateGridOptions({options:e,force:t,source:o="api"}){let i={id:Db++,properties:[]},r=[],{gridOptions:a,validation:n}=this;for(let s of Object.keys(e)){let l=Cn.applyGlobalGridOption(s,e[s]);n==null||n.warnOnInitialPropertyUpdate(o,s);let c=t||typeof l=="object"&&o==="api",d=a[s];if(c||d!==l){a[s]=l;let g={type:s,currentValue:l,previousValue:d,changeSet:i,source:o};r.push(g)}}this.validateGridOptions(this.gridOptions),i.properties=r.map(s=>s.type);for(let s of r)Et(this,`Updated property ${s.type} from`,s.previousValue," to ",s.currentValue),this.propEventSvc.dispatchEvent(s)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(let o of Object.keys(e)){let i=e[o];if(i==null||i===!1)continue;let r=t[o];typeof r=="function"&&(r=r(e,this.gridOptions,this.beans)),r&&this.assertModuleRegistered(r,o)}}validateGridOptions(e){var t;this.validateOptions(e,Rb),(t=this.validation)==null||t.processGridOptions(e)}validateColDef(e,t,o){var i,r;(o||!((i=this.beans.dataTypeSvc)!=null&&i.isColPendingInference(t)))&&(this.validateOptions(e,ub),(r=this.validation)==null||r.validateColDef(e))}assertModuleRegistered(e,t){let o=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return o||W(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:wn(),rowModelType:this.get("rowModelType"),isUmd:bn()}}isModuleRegistered(e){return Ea(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[vl]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){let o=t[vl];if(M(o))return o===this.instanceId;t=t.parentElement}return!1}};function Ib(e){return!!Un[e]}var Tb=class extends S{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){let{sortSvc:t,rangeSvc:o,gos:i}=this.beans;if(!(So(i)?e.altKey:!0))o==null||o.handleColumnSelection(this.column,e);else if(this.column.isSortable()){let a=this.column.isMoving(),s=Date.now()-this.lastMovingChanged<50;a||s||t==null||t.progressSortFromEvent(this.column,e)}}};function Ab(e,t){let o={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:o},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:o},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:o},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var zb=class extends _{constructor(){super(...arguments),this.eFilter=E,this.eFilterButton=E,this.eSortIndicator=E,this.eMenu=E,this.eLabel=E,this.eText=E,this.eColRef=E,this.eSortOrder=E,this.eSortAsc=E,this.eSortDesc=E,this.eSortMixed=E,this.eSortNone=E,this.eSortAbsoluteAsc=E,this.eSortAbsoluteDesc=E,this.isLoadingInnerComponent=!1}refresh(e){var o,i,r;let t=this.params;if(this.params=e,this.workOutTemplate(e,!!((o=this.beans)!=null&&o.sortSvc))!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){let a={...e};he(a,e.innerHeaderComponentParams),(r=(i=this.innerHeaderComponent).refresh)==null||r.call(i,a)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){let{formula:o}=this.beans,i=e.template;return i?i!=null&&i.trim?i.trim():i:Ab(!!(o!=null&&o.active),t)}init(e){var n;this.params=e;let{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:r}=this.beans,a=t==null?void 0:t.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!a),this.setTemplate(this.currentTemplate,a?[a]:void 0),this.eLabel&&((n=this.mouseListener)!=null||(this.mouseListener=this.createManagedBean(new Tb(e.column,this.eLabel)))),o==null||o.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),i==null||i.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(r,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){let o=Ap(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText&&this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){let{displayName:t}=e,o=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=zo(t))}addInIcon(e,t,o){let i=ye(e,this.beans,o);i&&t.appendChild(i)}workOutShowMenu(){var e;return this.params.enableMenu&&!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonEnabled())}shouldSuppressMenuHide(){var e;return!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonAlwaysShowEnabled())}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){De(this.eMenu),this.eMenu=void 0;return}let{gos:e,eMenu:t,params:o}=this,i=be(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);let r=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=r,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(r)}toggleMenuAlwaysShow(e){var t;(t=this.eMenu)==null||t.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){let{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){var l,c,d;let{params:t,gos:o,beans:i,eMenu:r,eFilterButton:a}=this,n=t.column,s=be(o);if(e&&!s){if((l=i.menuSvc)!=null&&l.isFilterMenuInHeaderEnabled(n))return t.showFilter((c=a!=null?a:r)!=null?c:this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu((d=r!=null?r:a)!=null?d:this.getGui()),!0;return!1}setupSort(){let{sortSvc:e}=this.beans;if(!e)return;let{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));let{eSortIndicator:i,eSortOrder:r,eSortAsc:a,eSortDesc:n,eSortMixed:s,eSortNone:l,eSortAbsoluteAsc:c,eSortAbsoluteDesc:d}=this;i.attachCustomElements(r,a,n,s,l,c,d)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o)}setupColumnRefIndicator(){let{eColRef:e,beans:{editModelSvc:t},params:o}=this;e&&(this.currentRef=o.column.formulaRef,e.textContent=this.currentRef,q(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{let i=t==null?void 0:t.getEditPositions(),r=!!this.currentRef&&!!(i!=null&&i.some(a=>a.column.isAllowFormula()));q(e,r)},cellEditingStopped:()=>{q(e,!1)}}))}setupFilterIcon(){let{eFilter:e,params:t}=this;if(!e)return;let o=()=>{let i=t.column.isFilterActive();q(e,i,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,o,"filterActive")}setupFilterButton(){let{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,i){if(!e)return De(t),!1;let r=this.params.column;return this.addInIcon(i,t,r),this.addManagedListeners(r,{filterChanged:o}),o(),!0}onFilterChangedButton(){let e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){var i,r;let{eFilterButton:t,eMenu:o}=this;return e?(i=t!=null?t:o)!=null?i:this.getGui():(r=o!=null?o:t)!=null?r:this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},Lb=class extends S{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){let{columnGroup:e,beans:t}=this,{ctrlsSvc:o}=t;o.whenReady(this,()=>{let i=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:r=>{r.direction==="horizontal"&&this.updateSticky(r.left)}}),this.addManagedListeners(e,{leftChanged:i,displayedChildrenChanged:i}),this.addManagedEventListeners({columnResized:i}),this.refreshPosition()})}refreshPosition(){let{columnGroup:e,beans:t}=this,o=e.getLeft(),i=e.getActualWidth();if(o==null||i===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=o,this.right=o+i;let r=t.colViewport.getScrollPosition();r!=null&&this.updateSticky(r)}updateSticky(e){let{beans:t,left:o,right:i}=this;if(o==null||i==null){this.setSticky(!1);return}let{gos:r,visibleCols:a}=t,s=r.get("enableRtl")?a.bodyWidth-e:e;this.setSticky(os)}setSticky(e){let{isSticky:t,eLabel:o}=this;t!==e&&(this.isSticky=e,o.classList.toggle("ag-sticky-label",e))}},Ob={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},Hb=class extends _{constructor(){super(Ob),this.agOpened=E,this.agClosed=E,this.agLabel=E,this.isLoadingInnerComponent=!1}init(e){let{userCompFactory:t,touchSvc:o}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),o==null||o.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&k(89)}workOutInnerHeaderGroupComponent(e,t){let o=Lp(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){let{agOpened:e,agClosed:t,params:{columnGroup:o},beans:{colGroupSvc:i}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);let r=l=>{if(ct(l))return;let c=!o.isExpanded();i.setColumnGroupOpened(o.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(t,r),this.addTouchAndClickListeners(e,r);let a=l=>{Xt(l)};this.addManagedElementListeners(t,{dblclick:a}),this.addManagedElementListeners(e,{dblclick:a}),this.addManagedElementListeners(this.getGui(),{dblclick:r}),this.updateIconVisibility();let n=o.getProvidedColumnGroup(),s=this.updateIconVisibility.bind(this);this.addManagedListeners(n,{expandedChanged:s,expandableChanged:s})}addTouchAndClickListeners(e,t){var o;(o=this.beans.touchSvc)==null||o.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){let{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){let i=o.isExpanded();q(e,i),q(t,!i)}else q(e,!1),q(t,!1)}addInIcon(e,t){let o=ye(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){let{agOpened:t,agClosed:o}=this;q(t,!1),q(o,!1)}}setupLabel(e){var n;let{displayName:t,columnGroup:o}=e,{innerHeaderGroupComponent:i,isLoadingInnerComponent:r}=this,a=i||r;M(t)&&!a&&(this.agLabel.textContent=zo(t)),(n=o.getColGroupDef())!=null&&n.suppressStickyLabel||this.createManagedBean(new Lb(this.getGui(),o))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},Bb={moduleName:"ColumnHeaderComp",version:D,userComponents:{agColumnHeader:zb},icons:{menu:"menu",menuAlt:"menu-alt"}},Vb={moduleName:"ColumnGroupHeaderComp",version:D,userComponents:{agColumnGroupHeader:Hb},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},Nb=class extends S{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&k(92)}createTask(e,t,o,i,r=!1){this.verify();let a=o;i&&this.batchFrameworkComps&&(a="f1");let n={task:e,index:t,createOrder:++this.taskCount,deferred:r};this.addTaskToList(this[a],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;let t=this.scrollGoingDown?1:-1;e.list.sort((o,i)=>o.deferred!==i.deferred?o.deferred?-1:1:o.index!==i.index?t*(i.index-o.index):i.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){let{p1:t,p2:o,f1:i,destroyTasks:r,beans:a}=this,{ctrlsSvc:n,frameworkOverrides:s}=a,l=t.list,c=o.list,d=i.list,g=Date.now(),u=0,h=e<=0,p=n.getScrollFeature();for(;h||u{for(;(h||u{};else if(r.length)m=r.pop();else break;m()}u=Date.now()-g}l.length||c.length||d.length||r.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){let e=this.executeFrame.bind(this,60);ht(this.beans,e)}isQueueEmpty(){return!this.ticking}},Gb={moduleName:"AnimationFrame",version:D,beans:[Nb]},Wb=class extends S{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return ye(e,this.beans,t==null?void 0:t.column)}},qb=(e,t,o)=>t||e&&o,_b=class extends S{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!jt())return;let t=(o,i,r)=>{var s,l;let{rowCtrl:a,cellCtrl:n}=e.getControlsForEventTarget((s=r==null?void 0:r.target)!=null?s:null);n!=null&&n.column&&n.dispatchCellContextMenuEvent(r!=null?r:null),(l=this.beans.contextMenuSvc)==null||l.handleContextMenuMouseEvent(void 0,r,a,n)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!jt()||Ji("dblclick"))return!1;let i=Date.now(),r=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,r})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){let{gos:t,sortSvc:o,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;let{params:r,eMenu:a,eFilterButton:n}=e,s=new Vt(e.getGui(),!0);e.addDestroyFunc(()=>s.destroy());let l=e.shouldSuppressMenuHide(),c=l&&M(a)&&r.enableMenu,d=!!(i!=null&&i.isHeaderContextMenuEnabled(r.column)),g=qb(r.enableMenu,d,be(t)),u=s;c&&(u=new Vt(a,!0),e.addDestroyFunc(()=>u.destroy()));let h=p=>r.showColumnMenuAfterMouseClick(p.touchStart);if(c&&r.enableMenu&&e.addManagedListeners(u,{tap:h}),g&&e.addManagedListeners(s,{longTap:h}),r.enableSorting){let p=f=>{let m=f.touchStart.target;l&&(a!=null&&a.contains(m)||n!=null&&n.contains(m))||o==null||o.progressSort(r.column,!1,"uiColumnSorted")};e.addManagedListeners(s,{tap:p})}if(r.enableFilterButton&&n){let p=new Vt(n,!0);e.addManagedListeners(p,{tap:()=>r.showFilter(n)}),e.addDestroyFunc(()=>p.destroy())}}setupForHeaderGroup(e){var o;let t=e.params;if((o=this.beans.menuSvc)!=null&&o.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){let i=new Vt(t.eGridHeader,!0),r=a=>t.showColumnMenuAfterMouseClick(a.touchStart);e.addManagedListeners(i,{longTap:r}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,o){let i=new Vt(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,o){if(!jt())return;let i=new Vt(t),r=a=>{li(this.beans,a.touchEvent)&&o(void 0,a.touchStart,a.touchEvent)};e.addManagedListeners(i,{longTap:r}),e.addDestroyFunc(()=>i.destroy())}},Ub={moduleName:"Touch",version:D,beans:[_b]},jb=class extends S{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){let o=e===b.UP,i=e===b.DOWN,r=e===b.LEFT,a,n,{pageBounds:s,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:g}=t;if(o||i)g&&d?o?n=0:n=g==="top"?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:n=o?s.getFirstRow():s.getLastRow(),a=t.column;else{let u=l.get("enableRtl");n=t.rowIndex,a=(r!==u?c.allCols:[...c.allCols].reverse()).find(p=>!pe(p)&&this.isCellGoodToFocusOn({rowIndex:n,rowPinned:null,column:p}))}return a?{rowIndex:n,rowPinned:g,column:a}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case b.UP:o=this.getCellAbove(o);break;case b.DOWN:o=this.getCellBelow(o);break;case b.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case b.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,k(8,{key:e});break}o?i=this.isCellGoodToFocusOn(o):i=!0}return o}isCellGoodToFocusOn(e){let t=e.column,o,{pinnedRowModel:i,rowModel:r}=this.beans;switch(e.rowPinned){case"top":o=i==null?void 0:i.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i==null?void 0:i.getPinnedBottomRow(e.rowIndex);break;default:o=r.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!1}getCellToLeft(e){if(!e)return null;let t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;let t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){var i,r;if(!e)return null;let t=(r=(i=this.rowSpanSvc)==null?void 0:i.getCellEnd(e))!=null?r:e,o=Ws(this.beans,t,!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){var i,r;if(!e)return null;let t=(r=(i=this.rowSpanSvc)==null?void 0:i.getCellStart(e))!=null?r:e,o=lr(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){var s;let{visibleCols:t,pagination:o}=this.beans,i=t.allCols,r=e.rowIndex,a=e.rowPinned,n=t.getColAfter(e.column);if(!n){n=i[0];let l=Ws(this.beans,e,!0);if(Q(l)||!l.rowPinned&&!((s=o==null?void 0:o.isRowInPage(l.rowIndex))==null||s))return null;r=l?l.rowIndex:null,a=l?l.rowPinned:null}return{rowIndex:r,column:n,rowPinned:a}}getNextTabbedCellBackwards(e){var l;let{beans:t}=this,{visibleCols:o,pagination:i}=t,r=o.allCols,a=e.rowIndex,n=e.rowPinned,s=o.getColBefore(e.column);if(!s){s=U(r);let c=lr(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Q(c)||!c.rowPinned&&!((l=i==null?void 0:i.isRowInPage(c.rowIndex))==null||l))return null;a=c?c.rowIndex:null,n=c?c.rowPinned:null}return{rowIndex:a,column:s,rowPinned:n}}isSuppressNavigable(e,t){let{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){let i=e.createColumnFunctionCallbackParams(t);return o(i)}return!1}};function Kb(e){return e.focusSvc.getFocusedCell()}function $b(e){return e.focusSvc.clearFocusedCell()}function Yb(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})}function Qb(e,t){var o,i;return(i=(o=e.navigation)==null?void 0:o.tabToNextCell(!1,t))!=null?i:!1}function Zb(e,t){var o,i;return(i=(o=e.navigation)==null?void 0:o.tabToNextCell(!0,t))!=null?i:!1}function Jb(e,t,o=!1){var r;let i=(r=e.headerNavigation)==null?void 0:r.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}function to(e){let t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}var Xb=class extends S{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new ng,this.rowValidations=new sg,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;let o=this.getEditRow(e);t?o.delete(t):o.clear(),o.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;let o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){let i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;let o=this.getEditRow(e),i=e.pinnedSibling,r=t&&i&&this.getEditRow(i);if(!o&&!r)return;let a={...e.data},n=(s,l)=>s.forEach(({editorValue:c,pendingValue:d},g)=>{let u=c===void 0?d:c;u!==ae&&(l[g.getColId()]=u)});return o&&n(o,a),r&&n(r,a),a}getEdit(e={},t){var n,s;let{rowNode:o,column:i}=e,r=this.edits;if(this.suspendEdits||r.size===0||!o||!i)return;let a=(n=r.get(o))==null?void 0:n.get(i);if(a)return a;if(t!=null&&t.checkSiblings){let l=o.pinnedSibling;if(l)return(s=r.get(l))==null?void 0:s.get(i)}}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;let t=new Map;return this.edits.forEach((o,i)=>{let r=new Map;o.forEach(({editorState:a,...n},s)=>r.set(s,{...n})),t.set(i,r)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,o)=>{let i=new Map;t.forEach((r,a)=>i.set(a,{...r})),this.edits.set(o,i)})}setEdit(e,t){let o=this.edits;(o.size===0||!o.has(e.rowNode))&&o.set(e.rowNode,new Map);let i=this.getEdit(e),r={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...i,...t};return this.getEditRow(e.rowNode).set(e.column,r),r}clearEditValue(e){var a;let{rowNode:t,column:o}=e;if(!t)return;let i=n=>{n.editorValue=void 0,n.pendingValue=n.sourceValue,n.state="changed"};if(!o){(a=this.getEditRow(t))==null||a.forEach(i);return}let r=this.getEdit(e);r&&i(r)}getState(e){var t;if(!this.suspendEdits)return(t=this.getEdit(e))==null?void 0:t.state}getEditPositions(e){if(this.suspendEdits||(e!=null?e:this.edits).size===0)return[];let t=[];return(e!=null?e:this.edits).forEach((o,i)=>{for(let r of o.keys()){let{editorState:a,...n}=o.get(r);t.push({rowNode:i,column:r,...n})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){var a;if(this.suspendEdits||this.edits.size===0)return!1;let{rowNode:o,column:i}=e,{withOpenEditor:r}=t;if(o){let n=this.getEditRow(o,t);return n?i?r?((a=this.getEdit(e))==null?void 0:a.state)==="editing":n.has(i):n.size!==0?r?Array.from(n.values()).some(({state:s})=>s==="editing"):!0:!1:!1}return r?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){var r;let t=(r=this.getEditRow(e.rowNode))!=null?r:new Map,{rowNode:o,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:ae,sourceValue:this.beans.valueSvc.getValue(i,o,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(o,t)}stop(e,t,o){var i;if(this.hasEdits(e))if(t){let r=(i=this.getEditRow(e.rowNode))==null?void 0:i.get(e.column);r&&(r.pendingValue===ae||r.pendingValue===r.sourceValue)?this.removeEdits(e):r&&o&&(r.editorValue=void 0)}else this.removeEdits(e)}clear(){for(let e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},ng=class{constructor(){this.cellValidations=new Map}getCellValidation(e){var i,r;let{rowNode:t,column:o}=e||{};return(r=(i=this.cellValidations)==null?void 0:i.get(t))==null?void 0:r.get(o)}hasCellValidation(e){return!(e!=null&&e.rowNode)||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){let{rowNode:o,column:i}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(i,t)}clearCellValidation(e){var i;let{rowNode:t,column:o}=e;(i=this.cellValidations.get(t))==null||i.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},sg=class{constructor(){this.rowValidations=new Map}getRowValidation(e){let{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e!=null&&e.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function fr(e,t={}){let{rowIndex:o,rowId:i,rowCtrl:r,rowPinned:a}=t;if(r)return r;let{rowModel:n,rowRenderer:s}=e,{rowNode:l}=t;return l||(i?l=Ff(e,i,a):o!=null&&(l=n.getRow(o))),l?s.getRowCtrlByNode(l):void 0}function G(e,t={}){var d,g,u,h,p;let{cellCtrl:o,colId:i,columnId:r,column:a}=t;if(o)return o;let n=e.colModel.getCol((d=i!=null?i:r)!=null?d:Ua(a)),s=(g=t.rowCtrl)!=null?g:fr(e,t),l=(u=s==null?void 0:s.getCellCtrl(n))!=null?u:void 0;if(l)return l;let c=(h=t.rowNode)!=null?h:s==null?void 0:s.rowNode;if(c)return(p=e.rowRenderer.getCellCtrls([c],[n]))==null?void 0:p[0]}function Cl(e){let{editSvc:t}=e;t!=null&&t.isBatchEditing()?(St(e,{persist:!0}),bt(e)):t==null||t.stopEditing(void 0,{source:"api"})}function e1(e,t,o){let{gos:i,popupSvc:r}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;let a=n=>{let s=n.relatedTarget;if(Aa(s)===null){Cl(t);return}let l=o.some(c=>c.contains(s))&&i.isElementInThisInstance(s);l||(l=!!r&&(r.getActivePopups().some(c=>c.contains(s))||r.isElementWithinCustomPopup(s))),l||Cl(t)};for(let n of o)e.addManagedElementListeners(n,{focusout:a})}function Ua(e){if(e)return typeof e=="string"?e:e.getColId()}var ae=Symbol("unedited"),t1=(e,t={})=>{var a;let o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),i=new Array(o.length),r=0;for(let n=0,s=o.length;n0&&t.set(o,r)}return t}function oo(e,t,o){var T,I,z;let{key:i,event:r,cellStartedEdit:a,silent:n}=o!=null?o:{},{editModelSvc:s,gos:l,userCompFactory:c}=e,d=G(e,t),g=(T=d==null?void 0:d.comp)==null?void 0:T.getCellEditor(),u=cg(e,t,i,a&&!n),h=s==null?void 0:s.getEdit(t),p=(I=u.value)!=null?I:h==null?void 0:h.sourceValue;if(g){s==null||s.setEdit(t,{editorValue:To(e,p,!0,t.column),state:"editing"}),(z=g.refresh)==null||z.call(g,u);return}let f=t.column.getColDef(),m=Kc(c,f,u);if(!m)return;let{popupFromSelector:v,popupPositionFromSelector:C}=m,w=v!=null?v:!!f.cellEditorPopup,y=C!=null?C:f.cellEditorPopupPosition;if(dg(m.params,r),!d)return;let{rangeFeature:x,rowCtrl:R,comp:F,onEditorAttachedFuncs:P}=d;s==null||s.setEdit(t,{editorValue:To(e,p,!0,t.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),d.editCompDetails=m,P.push(()=>x==null?void 0:x.unsetComp()),F==null||F.setEditDetails(m,w,y,l.get("reactiveCustomComponents")),R==null||R.refreshRow({suppressFlash:!0}),r1(e,t,r,p,n)}function r1(e,t,o,i,r){var l;let{editSvc:a,editModelSvc:n}=e,s=n==null?void 0:n.getEdit(t);!r&&(s==null?void 0:s.state)==="editing"&&!((l=s==null?void 0:s.editorState)!=null&&l.cellStartedEditing)&&(a==null||a.dispatchCellEvent(t,o,"cellEditingStarted",{value:i}),n==null||n.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function lg(e,t,o){var a,n,s;let i={editorValueExists:!1};if(jn(e)){let l=(a=t.getValidationErrors)==null?void 0:a.call(t);if(((n=l==null?void 0:l.length)!=null?n:0)>0)return i}if(o!=null&&o.isCancelling)return i;if(o!=null&&o.isStopping){let l=(s=t==null?void 0:t.isCancelAfterEnd)==null?void 0:s.call(t);if(l)return{...i,isCancelAfterEnd:l}}return{editorValue:t.getValue(),editorValueExists:!0}}function cg(e,t,o,i){var w,y,x,R,F,P,T,I;let{valueSvc:r,gos:a,editSvc:n}=e,s=e.gos.get("enableGroupEdit"),l=G(e,t),c=(y=(w=t.rowNode)==null?void 0:w.rowIndex)!=null?y:void 0,d=n==null?void 0:n.isBatchEditing(),g=e.colModel.getCol(t.column.getId()),{rowNode:u,column:h}=t,p=(x=l.comp)==null?void 0:x.getCellEditor(),f=n==null?void 0:n.getCellDataValue(t),m=f===void 0?p?(R=lg(e,p))==null?void 0:R.editorValue:void 0:f,v=m===ae?(F=r.getValueForDisplay({column:g,node:u,from:"edit"}))==null?void 0:F.value:m,C=s?m:v;return h.isAllowFormula()&&((P=e.formula)!=null&&P.isFormula(C))&&(C=(I=(T=e.formula)==null?void 0:T.normaliseFormula(C,!0))!=null?I:C),O(a,{value:C,eventKey:o!=null?o:null,column:h,colDef:h.getColDef(),rowIndex:c,node:u,data:u.data,cellStartedEdit:!!i,onKeyDown:l==null?void 0:l.onKeyDown.bind(l),stopEditing:z=>{n.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:z}),pi(e,t,{})},eGridCell:l==null?void 0:l.eGui,parseValue:z=>r.parseValue(g,u,z,l==null?void 0:l.value),formatValue:l==null?void 0:l.formatValue.bind(l),validate:()=>{n==null||n.validateEdit()}})}function jo(e,t){let{editModelSvc:o}=e;o==null||o.getEditMap().forEach((i,r)=>{i.forEach((a,n)=>{!t&&(a.state==="editing"||a.pendingValue===ae)||!Be(a)&&(a.state!=="editing"||t)&&(o==null||o.removeEdits({rowNode:r,column:n}))})})}function a1(e,t){var c;let o=(c=t.comp)==null?void 0:c.getCellEditor();if(!(o!=null&&o.refresh))return;let{eventKey:i,cellStartedEdit:r}=t.editCompDetails.params,{column:a}=t,n=cg(e,t,i,r),s=a.getColDef(),l=Kc(e.userCompFactory,s,n);o.refresh(dg(l.params,i))}function dg(e,t){var o,i;return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes((o=t==null?void 0:t.key)!=null?o:"")||e.suppressPreventDefault:(i=t==null?void 0:t.preventDefault)==null||i.call(t),e}function St(e,t){var o,i,r,a,n,s;for(let l of(i=(o=e.editModelSvc)==null?void 0:o.getEditPositions())!=null?i:[]){let c=G(e,l);if(!c)continue;let d=(r=c.comp)==null?void 0:r.getCellEditor();if(!d)continue;let{editorValue:g,editorValueExists:u,isCancelAfterEnd:h}=lg(e,d,t);if(h){let{cellStartedEditing:p,cellStoppedEditing:f}=((n=(a=e.editModelSvc)==null?void 0:a.getEdit(l))==null?void 0:n.editorState)||{};(s=e.editModelSvc)==null||s.setEdit(l,{editorState:{isCancelAfterEnd:h,cellStartedEditing:p,cellStoppedEditing:f}})}go(e,l,g,void 0,!u,t)}}function go(e,t,o,i,r,a){let{editModelSvc:n,valueSvc:s}=e;if(!n)return;let{rowNode:l,column:c}=t;if(!(l&&c))return;let d=n.getEdit(t);if((d==null?void 0:d.sourceValue)===void 0){let g=d?To(e,d.editorValue,!1,c):ae,u={sourceValue:s.getValue(c,l,"data"),pendingValue:g};a!=null&&a.persist&&(u.state="changed"),d=n.setEdit(t,u)}n.setEdit(t,{editorValue:r?To(e,d.sourceValue,!0,c):o}),a!=null&&a.persist&&n1(e,t)}function To(e,t,o,i){var a;let{formula:r}=e;return i.isAllowFormula()&&(r!=null&&r.isFormula(t))&&(a=r==null?void 0:r.normaliseFormula(t,o))!=null?a:t}function n1(e,t){var n;let{editModelSvc:o}=e,i=o==null?void 0:o.getEdit(t),a={pendingValue:To(e,i==null?void 0:i.editorValue,!1,t.column)};!((n=i==null?void 0:i.editorState)!=null&&n.cellStoppedEditing)&&(i==null?void 0:i.state)!=="editing"&&(a.state="changed"),o==null||o.setEdit(t,a)}function bt(e,t,o={}){var i;if(t||(t=(i=e.editModelSvc)==null?void 0:i.getEditPositions()),t)for(let r of t)pi(e,r,o)}function pi(e,t,o,i=G(e,t)){var d,g;let r=e.editModelSvc,a=r==null?void 0:r.getEdit(t),n;if(a&&a.state!=="editing"&&((d=a.editorState)!=null&&d.cellStoppedEditing)?n=a.state:n="changed",!i){a&&(r==null||r.setEdit(t,{state:n}));return}let s=i.comp,l=s==null?void 0:s.getCellEditor();if(s&&!l){if(i==null||i.refreshCell(),a){r==null||r.setEdit(t,{state:n});let u=e.gos.get("enableGroupEdit")?wl(a,o==null?void 0:o.cancel):{valueChanged:!1,newValue:void 0,oldValue:a.sourceValue};bl(e,t,u,o)}return}if(jn(e)){let u=a&&((g=l==null?void 0:l.getValidationErrors)==null?void 0:g.call(l)),h=r==null?void 0:r.getCellValidationModel();u!=null&&u.length?h==null||h.setCellValidation(t,{errorMessages:u}):h==null||h.clearCellValidation(t)}a&&(r==null||r.setEdit(t,{state:n})),s==null||s.setEditDetails(),s==null||s.refreshEditStyles(!1,!1),i==null||i.refreshCell({force:!0,suppressFlash:!0});let c=r==null?void 0:r.getEdit(t);if(c&&c.state!=="editing"){let u=o==null?void 0:o.cancel,h=e.gos.get("enableGroupEdit")?wl(c,u):s1(c,a,u);bl(e,t,h,o)}}function wl(e,t){let{sourceValue:o,pendingValue:i}=e,r;return!t&&i!==ae&&(r=i),{valueChanged:!t&&Be(e),newValue:r,oldValue:o,value:o}}function s1(e,t,o){if(o||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let i=e.editorValue;return(i==null||i===ae)&&(i=t==null?void 0:t.pendingValue),i===ae&&(i=void 0),{valueChanged:Be(e),newValue:i,oldValue:e.sourceValue}}function bl(e,t,o,{silent:i,event:r}={}){let{editSvc:a,editModelSvc:n}=e,s=n==null?void 0:n.getEdit(t),{editorState:l}=s||{},{isCancelBeforeStart:c,cellStartedEditing:d,cellStoppedEditing:g}=l||{};!i&&!c&&d&&!g&&(a==null||a.dispatchCellEvent(t,r,"cellEditingStopped",o),n==null||n.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function l1(e){if(!e)return!1;for(let t=0,o=e.length;t0,N=L?I.join(". "):"";gn(z,L),L&&i.announceValue(`${c} ${I}`,"editorValidation"),z instanceof HTMLInputElement?z.setCustomValidity(N):z.classList.toggle("invalid",L)}(I==null?void 0:I.length)>0&&o.setCellValidation({rowNode:P,column:T},{errorMessages:I}),d.add(x.rowCtrl)}if(St(e,{persist:!1}),a==null||a.setCellValidationModel(o),s){let x=d1(e);a==null||a.setRowValidationModel(x)}for(let x of d.values()){(m=x.rowEditStyleFeature)==null||m.applyRowStyles();for(let R of x.getAllCellCtrls())(v=R.tooltipFeature)==null||v.refreshTooltip(!0),(C=R.editorTooltipFeature)==null||C.refreshTooltip(!0),(y=(w=R.editStyleFeature)==null?void 0:w.applyCellStyles)==null||y.call(w)}}var d1=e=>{var r,a,n;let t=new sg,o=e.gos.get("getFullRowEditValidationErrors"),i=(r=e.editModelSvc)==null?void 0:r.getEditMap();if(!i)return t;for(let s of i.keys()){let l=i.get(s);if(!l)continue;let c=[],{rowIndex:d,rowPinned:g}=s;for(let h of l.keys()){let p=l.get(h);if(!p)continue;let{editorValue:f,pendingValue:m,sourceValue:v}=p,C=(a=f!=null?f:m===ae?void 0:m)!=null?a:v;c.push({column:h,colId:h.getColId(),rowIndex:d,rowPinned:g,oldValue:v,newValue:C})}let u=(n=o==null?void 0:o({editorsState:c}))!=null?n:[];u.length>0&&t.setRowValidation({rowNode:s},{errorMessages:u})}return t};function g1(e){var i;kt(e,!0);let t=(i=e.editModelSvc)==null?void 0:i.getCellValidationModel().getCellValidationMap();if(!t)return null;let o=[];return t.forEach((r,a)=>{r.forEach(({errorMessages:n},s)=>{o.push({column:s,rowIndex:a.rowIndex,rowPinned:a.rowPinned,messages:n!=null?n:null})})}),o}function Mr(e){return!!(e.rowPinned&&e.pinnedSibling)}function Re(e,t,o,i){let r=t==="top";if(!o)return Re(e,t,r?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){let l=r?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Re(e,t,o,r?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let a=!1,n=!1,s=[];return e.forEachPinnedRow(t,l=>{if(l===o&&!a){a=!0,s.push(l);return}if(a&&l===i){n=!0,s.push(l);return}a&&!n&&s.push(l)}),s}function u1(e,t,o,{rowNode:i,column:r},a){return O(e.gos,{type:o,node:i,data:i.data,value:a,column:r,colDef:r.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function h1(e,t=!1){return e===b.DELETE?!0:!t&&e===b.BACKSPACE?Jc():!1}var p1=class extends S{constructor(e,t,o,i){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){var o;let t=e.key;if(!(t===b.ENTER&&pe(this.cellCtrl.column)&&((o=this.beans.rowNumbersSvc)!=null&&o.handleKeyDownOnCell(this.cellCtrl.cellPosition,e))))switch(t){case b.ENTER:this.onEnterKeyDown(e);break;case b.F2:this.onF2KeyDown(e);break;case b.ESCAPE:this.onEscapeKeyDown(e);break;case b.TAB:this.onTabKeyDown(e);break;case b.BACKSPACE:case b.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case b.DOWN:case b.UP:case b.RIGHT:case b.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var r,a;let{cellCtrl:o,beans:i}=this;if(!((r=i.editSvc)!=null&&r.isEditing(o,{withOpenEditor:!0}))){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{let n=o.getFocusedCellPosition();(a=i.navigation)==null||a.navigateToNextCell(e,t,n,!0)}e.preventDefault()}}onShiftRangeSelect(e){let{rangeSvc:t,navigation:o}=this.beans;if(!t)return;let i=t.extendLatestRangeInDirection(e);i&&(e.key===b.LEFT||e.key===b.RIGHT?o==null||o.ensureColumnVisible(i.column):o==null||o.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var c;let{cellCtrl:o,beans:i,rowNode:r}=this,{gos:a,rangeSvc:n,eventSvc:s,editSvc:l}=i;if(s.dispatchEvent({type:"keyShortcutChangedCellStart"}),h1(e,a.get("enableCellEditingOnBackspace"))&&!(l!=null&&l.isEditing(o,{withOpenEditor:!0}))){if(n&&dt(a))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){let d=i.valueSvc.getDeleteValue(o.column,r);r.setDataValue(o.column,d,"cellClear")}}else l!=null&&l.isEditing(o,{withOpenEditor:!0})||(c=i.editSvc)==null||c.startEditing(o,{startedEdit:!0,event:t});s.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){var c;let{cellCtrl:t,beans:o}=this,{editSvc:i,navigation:r}=o,a=i==null?void 0:i.isEditing(t,{withOpenEditor:!0}),n=t.rowNode,s=i==null?void 0:i.isRowEditing(n,{withOpenEditor:!0}),l=d=>{(i==null?void 0:i.startEditing(d,{startedEdit:!0,event:e,source:"edit"}))&&e.preventDefault()};if(a||s){if(this.isCtrlEnter(e)){i==null||i.applyBulkEdit(t,((c=o==null?void 0:o.rangeSvc)==null?void 0:c.getCellRanges())||[]);return}if(kt(o),(i==null?void 0:i.checkNavWithValidation(void 0,e))==="block-stop")return;i!=null&&i.isEditing(t,{withOpenEditor:!0})?i==null||i.stopEditing(t,{event:e,source:"edit"}):s&&!t.isCellEditable()?i==null||i.stopEditing({rowNode:n},{event:e,source:"edit"}):l(t)}else if(o.gos.get("enterNavigatesVertically")){let d=e.shiftKey?b.UP:b.DOWN;r==null||r.navigateToNextCell(null,d,t.cellPosition,!1)}else{if(i!=null&&i.hasValidationErrors())return;i!=null&&i.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===b.ENTER}onF2KeyDown(e){let{cellCtrl:t,beans:{editSvc:o}}=this;o!=null&&o.isEditing()&&(kt(this.beans),(o==null?void 0:o.checkNavWithValidation(void 0,e))==="block-stop")||o==null||o.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){let{cellCtrl:t,beans:{editSvc:o}}=this;(o==null?void 0:o.checkNavWithValidation(t,e))==="block-stop"&&o.revertSingleCellEdit(t),setTimeout(()=>{o==null||o.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){var n;let o=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:r}=this;if(o||i!=null&&i.isEditing(r,{withOpenEditor:!0}))return;if(e.key===b.SPACE)this.onSpaceKeyDown(e);else if(i!=null&&i.isCellEditable(r,"ui")){if(i!=null&&i.hasValidationErrors()&&!(i!=null&&i.hasValidationErrors(r)))return;i==null||i.startEditing(r,{startedEdit:!0,event:e,source:"api",editable:!0});let s=r.editCompDetails;!((n=s==null?void 0:s.params)!=null&&n.suppressPreventDefault)&&e.preventDefault()}}onSpaceKeyDown(e){var r;let{gos:t,editSvc:o}=this.beans,{rowNode:i}=this.cellCtrl;!(o!=null&&o.isEditing(this.cellCtrl,{withOpenEditor:!0}))&&_t(t)&&((r=this.beans.selectionSvc)==null||r.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}},f1=class extends S{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!ct(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){var f,m,v;if((f=this.beans.touchSvc)!=null&&f.handleCellDoubleClick(this,e))return;let{eventSvc:t,rangeSvc:o,editSvc:i,editModelSvc:r,frameworkOverrides:a,gos:n}=this.beans,s=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:g}=l,u=qi(n,c,g,e);o&&s&&!u&&o.getCellRangeCount(d)>1&&o.intersectLastRange(!0);let h=l.createEvent(e,"cellClicked");h.isEventHandlingSuppressed=u,t.dispatchEvent(h);let p=c.getColDef();if(p.onCellClicked&&window.setTimeout(()=>{a.wrapOutgoing(()=>{p.onCellClicked(h)})},0),!u&&(r==null?void 0:r.getState(l))!=="editing"){let C=i==null?void 0:i.isEditing(),w=i==null?void 0:i.isRangeSelectionEnabledWhileEditing(),y=(m=r==null?void 0:r.getCellValidationModel().getCellValidationMap().size)!=null?m:0,x=(v=r==null?void 0:r.getRowValidationModel().getRowValidationMap().size)!=null?v:0;if(C&&(w||y>0||x>0))return;i!=null&&i.shouldStartEditing(l,e)?i==null||i.startEditing(l,{event:e}):i!=null&&i.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?i==null||i.stopEditing(l,{event:e,source:"edit"}):i==null||i.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){var u,h;let{column:t,beans:o,cellCtrl:i}=this,{eventSvc:r,frameworkOverrides:a,editSvc:n,editModelSvc:s,gos:l}=o,c=qi(l,i.column,i.rowNode,e),d=t.getColDef(),g=i.createEvent(e,"cellDoubleClicked");if(g.isEventHandlingSuppressed=c,r.dispatchEvent(g),typeof d.onCellDoubleClicked=="function"&&window.setTimeout(()=>{a.wrapOutgoing(()=>{d.onCellDoubleClicked(g)})},0),!c&&n!=null&&n.shouldStartEditing(i,e)&&(s==null?void 0:s.getState(i))!=="editing"){let p=n==null?void 0:n.isEditing(),f=n==null?void 0:n.isRangeSelectionEnabledWhileEditing(),m=(u=s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)!=null?u:0,v=(h=s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)!=null?h:0;if(p&&(f||m>0||v>0))return;n==null||n.startEditing(i,{event:e})}}onMouseDown(e){var w;let{shiftKey:t}=e,o=e.target,{cellCtrl:i,beans:r}=this,{eventSvc:a,rangeSvc:n,rowNumbersSvc:s,focusSvc:l,gos:c,editSvc:d}=r,{column:g,rowNode:u,cellPosition:h}=i,p=qi(c,g,u,e),f=()=>{let y=i.createEvent(e,"cellMouseDown");y.isEventHandlingSuppressed=p,a.dispatchEvent(y)};if(p){f();return}if(this.isRightClickInExistingRange(e))return;let m=n&&!n.isEmpty(),v=this.containsWidget(o),C=pe(g);if(!(s&&C&&!s.handleMouseDownOnCell(h,e))){if(!t||!m){let y=d==null?void 0:d.isEditing(i),R=c.get("enableCellTextSelection")&&e.defaultPrevented,F=(zt()||R)&&!y&&!$o(o)&&!v;i.focusCell(F,e)}if(t&&m&&!l.isCellFocused(h)){e.preventDefault();let y=l.getFocusedCell();if(y){let{column:x,rowIndex:R,rowPinned:F}=y,P=!!((w=d==null?void 0:d.isRangeSelectionEnabledWhileEditing)!=null&&w.call(d));d!=null&&d.isEditing(y)&&!P&&(d==null||d.stopEditing(y)),P||l.setFocusedCell({column:x,rowIndex:R,rowPinned:F,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}v||(n==null||n.handleCellMouseDown(e,h),f())}}isRightClickInExistingRange(e){let{rangeSvc:t}=this.beans;if(t){let o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=Bh(this.beans,e);if(o&&i)return!0}return!1}containsWidget(e){return qt(e,"ag-selection-checkbox",3)||qt(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o==null||o.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o==null||o.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;let t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}},m1=class extends S{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;let e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){let t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){let t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){let e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){let e=this.getColSpanningList();It(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;let e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){let{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(o===1)i.push(e);else{let r=e,a=e.getPinned();for(let n=0;r&&nthis.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,n),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),(c=this.positionFeature)==null||c.init(),(d=this.customStyleFeature)==null||d.setComp(e),(g=this.editStyleFeature)==null||g.setComp(e),(u=this.tooltipFeature)==null||u.refreshTooltip(),(h=this.keyboardListener)==null||h.init(),(p=this.rangeFeature)==null||p.setComp(e),(f=this.rowResizeFeature)==null||f.refreshRowResizer();let s=a?this.isCellEditable():void 0,l=!s&&this.hasEdit&&((m=this.editSvc)==null?void 0:m.isEditing(this,{withOpenEditor:!0}));if(s||l?(v=this.editSvc)==null||v.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:s}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(let C of this.onCompAttachedFuncs)C();this.onCompAttachedFuncs=[]}}checkFormulaError(){var t;let e=!!((t=this.beans.formula)!=null&&t.getFormulaError(this.column,this.rowNode));this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){var o,i;this.isAutoHeight=(i=(o=this.beans.rowAutoHeight)==null?void 0:o.setupCellAutoHeight(this,e,t))!=null?i:!1}getCellAriaRole(){var e;return(e=this.column.getColDef().cellAriaRole)!=null?e:"gridcell"}isCellRenderer(){let e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){var e;return(e=this.valueFormatted)!=null?e:this.value}getDeferLoadingCellRenderer(){var l,c;let{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:i,eventSvc:r}=e,a=t.getColDef(),n=this.createCellRendererParams();n.deferRender=!0;let s=Ms(o,a,n);if((c=(l=i.getGridBodyCtrl())==null?void 0:l.scrollFeature)!=null&&c.isScrolling()){let d,g=new $(h=>{d=h}),[u]=this.addManagedListeners(r,{bodyScrollEnd:()=>{d(),u()}});return{loadingComp:s,onReady:g}}return{loadingComp:s,onReady:$.resolve()}}showValue(e,t){var g,u,h,p;let{beans:o,column:i,rowNode:r,rangeFeature:a}=this,{userCompFactory:n}=o,s=this.getValueToDisplay(),l,c=r.stub&&((g=r.groupData)==null?void 0:g[i.getId()])==null,d=i.getColDef();if(c||this.isCellRenderer()){let f=this.createCellRendererParams();!c||pe(i)?l=Ds(n,d,f):l=Ms(n,d,f)}if(!l&&!c&&((u=o.findSvc)!=null&&u.isMatch(r,i))){let f=this.createCellRendererParams();l=Ds(n,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},f)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(r,{checkSiblings:!0})){let f=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:s});f&&(f.compDetails?l=f.compDetails:f.valueToDisplay&&(s=f.valueToDisplay))}this.comp.setRenderDetails(l,s,e),(h=this.customRowDragComp)==null||h.refreshVisibility(),!t&&a&&ht(o,()=>a==null?void 0:a.refreshRangeStyleAndHandle()),(p=this.rowResizeFeature)==null||p.refreshRowResizer()}setupControlComps(){let e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){let e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer",o="";return t&&(o=" ag-allow-overflow"),`${e}${o}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&Mr(this.rowNode))&&!!e}isCheckboxSelection(e){let{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=tr(t),r=At(this.column);return o==="custom"&&i!=="selectionColumn"&&r?!1:e.checkboxSelection||r&&typeof t=="object"&&yo(t)}refreshShouldDestroy(){let e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),r=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||r}onPopupEditorClosed(e){let{editSvc:t}=this.beans;if(!(t!=null&&t.isEditing(this,{withOpenEditor:!0})))return;let o=e instanceof KeyboardEvent,i=e instanceof MouseEvent,r=o&&e.key===b.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?"ui":"api",cancel:r,event:o||i?e:void 0}),r&&this.focusCell(!0,e)}stopEditing(e=!1){var o;let{editSvc:t}=this.beans;return(o=t==null?void 0:t.stopEditing(this,{cancel:e,source:t!=null&&t.isBatchEditing()?"ui":"api"}))!=null?o:!1}createCellRendererParams(){let{value:e,valueFormatted:t,column:o,rowNode:i,comp:r,eGui:a,beans:{valueSvc:n,gos:s,editSvc:l}}=this;return O(s,{value:e,valueFormatted:t,getValue:()=>n.getValueForDisplay({column:o,node:i,from:"edit"}).value,setValue:d=>(l==null?void 0:l.setDataValue({rowNode:i,column:o},d))||i.setDataValue(o,d),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:a,eParentOfValue:r.getParentOfValue(),registerRowDragger:(d,g,u,h)=>this.registerRowDragger(d,g,h),setTooltip:(d,g)=>{var u;s.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,g),(u=this.tooltipFeature)==null||u.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){var t;if(this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){let{editSvc:o,comp:i}=this;!(i!=null&&i.getCellEditor())&&o.isEditing(this,{withOpenEditor:!0})&&o.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(e){var y,x;let{editStyleFeature:t,customStyleFeature:o,rowCtrl:{rowEditStyleFeature:i},beans:{cellFlashSvc:r,filterManager:a},column:n,comp:s,suppressRefreshCell:l,tooltipFeature:c}=this;if(l)return;let{field:d,valueGetter:g,showRowGroup:u,enableCellChangeFlash:h}=n.getColDef(),p=d==null&&g==null&&u==null,f=(y=e==null?void 0:e.newData)!=null?y:!1,m=p||e&&(e.force||f),v=!!s,C=this.updateAndFormatValue(v),w=m||C;if(v){if(w){this.showValue(!!f,!1);let R=a==null?void 0:a.isSuppressFlashingCellsBecauseFiltering();!(e!=null&&e.suppressFlash)&&!R&&h&&(r==null||r.flashCell(this)),(x=t==null?void 0:t.applyCellStyles)==null||x.call(t),o==null||o.applyUserStyles(),o==null||o.applyClassesFromColDef(),i==null||i.applyRowStyles(),this.checkFormulaError()}c==null||c.refreshTooltip(),o==null||o.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){var t;return(t=this.callValueFormatter(e))!=null?t:e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){let t=this.value,o=this.valueFormatted,{value:i,valueFormatted:r}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=i,this.valueFormatted=r,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){let o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){let t=this.eGui;Zt(this.beans.gos,t,cr,this),e.addDestroyFunc(()=>Zt(this.beans.gos,t,cr,null))}createEvent(e,t){let{rowNode:o,column:i,value:r,beans:a}=this;return u1(a,e,t,{rowNode:o,column:i},r)}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var o;(o=this.mouseListener)==null||o.onMouseEvent(e,t)}getColSpanningList(){var e,t;return(t=(e=this.positionFeature)==null?void 0:e.getColSpanningList())!=null?t:[]}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{comp:e,column:t,beans:o}=this;hd(e,t,o.visibleCols)}refreshAriaColIndex(){let e=this.beans.visibleCols.getAriaColIndex(this.column);ac(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){let{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){var i;let o=(i=this.editSvc)==null?void 0:i.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){let{beans:{editSvc:t,focusSvc:o},comp:i}=this;if(!i||t!=null&&t.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;let r=()=>{if(!this.isAlive())return;let a=i.getFocusableElement();this.isCellFocused()&&a.focus({preventScroll:!0})};if(e){setTimeout(r,0);return}r()}onRowIndexChanged(){var e,t;this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),(e=this.rangeFeature)==null||e.onCellSelectionChanged(),(t=this.rowResizeFeature)==null||t.refreshRowResizer()}onSuppressCellFocusChanged(e){let t=this.eGui;t&&we(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;let e=this.column.isFirstRightPinned();this.comp.toggleCss(y1,e)}onLastLeftPinnedChanged(){if(!this.comp)return;let e=this.column.isLastLeftPinned();this.comp.toggleCss(S1,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){let e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){var e;this.restoreFocus(!0),this.onCellFocused((e=this.focusEventWhileNotReady)!=null?e:void 0)}onCellFocused(e){var r,a;let{beans:t}=this;if(hi(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}let o=this.isCellFocused(),i=(a=(r=t.editSvc)==null?void 0:r.isEditing(this))!=null?a:!1;if(this.comp.toggleCss(b1,o),o&&(e!=null&&e.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let n=this.comp.getFocusableElement();if(i){let l=Kt(n,null,!0);l.length&&(n=l[0])}let s=e?e.preventScrollOnBrowserFocus:!0;n.focus({preventScroll:s}),Gu(t,n)}o&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),o&&e&&this.rowCtrl.announceDescription()}createCellPosition(){let{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:st(t),column:this.column}}applyStaticCssClasses(){let{comp:e}=this;e.toggleCss(v1,!0),e.toggleCss(x1,!0);let t=this.column.isAutoHeight()==!0;e.toggleCss(C1,t),e.toggleCss(w1,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e,t;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),(e=this.editSvc)!=null&&e.isEditing(this)?(t=this.editSvc)==null||t.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){let e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(k1,e)}dispatchCellContextMenuEvent(e){let t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(o)})},0)}getCellRenderer(){var e,t;return(t=(e=this.comp)==null?void 0:e.getCellRenderer())!=null?t:null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){var e,t;return(t=(e=this.eGui)==null?void 0:e.contains(Y(this.beans)))!=null?t:!1}createSelectionCheckbox(){var t;let e=(t=this.beans.selectionSvc)==null?void 0:t.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){let e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,o){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}let i=this.createRowDragComp(e,t,o);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}),i.refreshVisibility())}createRowDragComp(e,t,o){var r;let i=(r=this.beans.rowDragSvc)==null?void 0:r.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){for(let e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!pe(this.column)||!this.eGui)return;let{ariaRowIndex:e}=this.rowCtrl;e!=null&&ri(this.eGui,e)}getRootElement(){return this.eGui}};function Kn(e,t,o,i,r,a){if(o==null&&t==null)return;let n={},s={},l=(c,d)=>{for(let g of c.split(" "))g.trim()!=""&&d(g)};if(o){let c=Object.keys(o);for(let d=0;d{h?n[p]=!0:s[p]=!0})}}if(t&&a)for(let c of Object.keys(t))l(c,d=>{n[d]||(s[d]=!0)});a&&Object.keys(s).forEach(a),Object.keys(n).forEach(r)}function yl(e){if(e.group)return e.level;let t=e.parent;return t?t.level+1:0}var E1=class extends S{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){let o=this.gos,i=n=>{if(typeof n=="string")e.push(n);else if(Array.isArray(n))for(let s of n)e.push(s)},r=o.get("rowClass");r&&i(r);let a=o.getCallback("getRowClass");if(a){let n={data:t.data,node:t,rowIndex:t.rowIndex},s=a(n);i(s)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){let{gos:i,expressionSvc:r}=this.beans,a=O(i,{data:e.data,node:e,rowIndex:e.rowIndex});Kn(r,void 0,i.get("rowClassRules"),a,t,o)}processStylesFromGridOptions(e){let t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle"),r;if(i){let a={data:e.data,node:e,rowIndex:e.rowIndex};r=i(a)}if(r||o)return Object.assign({},o,r)}},F1=0,mr=class extends S{constructor(e,t,o,i,r){var a,n,s;super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=r,this.focusEventWhileNotReady=null,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=(n=(a=t.pagination)==null?void 0:a.getCurrentPage())!=null?n:0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+F1++,this.rowId=Ko(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=yl(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=(s=t.editSvc)==null?void 0:s.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Ko(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){let{context:r,rowRenderer:a}=this.beans;i=wi(this,r,i);let n={rowComp:e,element:t,containerType:o,compBean:i};this.allRowGuis.push(n),this.updateGui(o,n),this.initialiseRowComp(n);let s=this.rowNode,l=this.rowType==="FullWidthLoading"||s.stub,c=!s.data&&this.beans.rowModel.getType()==="infinite";!l&&!c&&!s.rowPinned&&a.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){let t=e?"none":"";for(let o of this.allRowGuis)o.element.style.display=t}initialiseRowComp(e){let t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),_t(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);let o=e.rowComp,i=this.getInitialRowClasses(e.containerType);for(let r of i)o.toggleCss(r,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&xa(e.element,!!this.rowNode.expanded),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),Zt(t,e.element,dr,this),e.compBean.addDestroyFunc(()=>Zt(t,e.element,dr,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){let t=Ko(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(Ra(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Ra(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var i;let t=(i=this.beans.rowDragSvc)==null?void 0:i.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;let o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(r=>r!==o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){let t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(o=>{var i;return(i=o==null?void 0:o.rowComp)==null?void 0:i.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){let e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;let t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){let{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,r=!!e||!i.isPinningLeft(),a=!!t,n=!!o||!i.isPinningRight();return r&&a&&n}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){let{rowNode:e,gos:t,beans:{colModel:o}}=this,i=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),r=this.isNodeFullWidthCell(),a=t.get("masterDetail")&&e.detail,n=o.isPivotMode(),s=Ac(t,e,n);i?this.rowType="FullWidthLoading":a?this.rowType="FullWidthDetail":r?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;let{animationFrameSvc:o}=this.beans;if(!(o!=null&&o.active)||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){var o;if(!((o=this.beans.rowSpanSvc)!=null&&o.isCellSpanning(e,this.rowNode)))return new Eo(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){var t;return!((t=this.beans.rowSpanSvc)!=null&&t.isCellSpanning(e.column,this.rowNode))}createCellCtrls(e,t,o=null){let i={list:[],map:{}},r=(c,d,g)=>{g!=null?i.list.splice(g,0,d):i.list.push(d),i.map[c]=d},a=[];for(let c of t){let d=c.getInstanceId(),g=e.map[d];g&&!this.isCorrectCtrlForSpan(g)&&(g.destroy(),g=void 0),g||(g=this.getNewCellCtrl(c)),g&&r(d,g)}for(let c of e.list){let d=c.column.getInstanceId();if(i.map[d]!=null)continue;!this.isCellEligibleToBeRemoved(c,o)?a.push([d,c]):c.destroy()}if(a.length)for(let[c,d]of a){let g=i.list.findIndex(h=>h.column.getLeft()>d.column.getLeft()),u=g===-1?void 0:Math.max(g-1,0);r(c,d,u)}let{focusSvc:n,visibleCols:s}=this.beans,l=n.getFocusedCell();if(l&&l.column.getPinned()==o){let c=l.column.getInstanceId();if(!i.map[c]&&s.allCols.includes(l.column)){let g=this.createFocusedCellCtrl();if(g){let u=i.list.findIndex(p=>p.column.getLeft()>g.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);r(c,g,h)}}}return i}createFocusedCellCtrl(){let{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;let i=t==null?void 0:t.getCellSpan(o.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(let t of this.allRowGuis){let o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){let e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);let i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");let r=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}}isCellEligibleToBeRemoved(e,t){let{column:r}=e;if(r.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;let{visibleCols:a,editSvc:n}=this.beans,s=n==null?void 0:n.isEditing(e),l=e.isCellFocused();return s||l?!(a.allCols.indexOf(r)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||se(this.gos,"print")}listenOnDomOrder(e){let t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;let t=M(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),r=o.isPinningRight();if(t){let{slideInAnimation:a}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){a.fullWidth=!0;return}a.center=!0,a.left=i,a.right=r}else{let{fadeInAnimation:a}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){a.fullWidth=!0;return}a.center=!0,a.left=i,a.right=r}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){let e=(n,s)=>n?n.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(n.element,s).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),i=e(this.leftGui,"left"),r=e(this.rightGui,"right");return t&&o&&i&&r}addListeners(){var s;let{beans:e,gos:t,rowNode:o}=this,{expansionSvc:i,eventSvc:r,context:a,rowSpanSvc:n}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...(s=i==null?void 0:i.getRowExpandedListeners(this))!=null?s:{}}),o.detail&&this.addManagedListeners(o.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(o,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(r,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),n&&this.addManagedListeners(n,{spannedCellsUpdated:({pinned:l})=>{l&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,a),this.tooltipFeature=this.destroyBean(this.tooltipFeature,a),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,a)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(let c of this.allRowGuis)this.addRowDraggerToRow(c);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,a)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(let e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(let t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(let e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(let o of this.getAllCellCtrls())o.refreshCell(e);for(let o of this.allRowGuis)this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){var e;this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),(e=this.rowEditStyleFeature)==null||e.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.beans.rowDropHighlightSvc,t=(e==null?void 0:e.row)===this.rowNode?e.position:"none",o=t==="above",i=t==="inside",r=t==="below",a=t!=="none",n=o||r,s=this.rowNode.uiLevel,l=n&&s>0,c=l?s.toString():"0";for(let d of this.allRowGuis){let g=d.rowComp;g.toggleCss("ag-row-highlight-above",o),g.toggleCss("ag-row-highlight-inside",i),g.toggleCss("ag-row-highlight-below",r),g.toggleCss("ag-row-highlight-indent",l),a?d.element.style.setProperty("--ag-row-highlight-level",c):d.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){let e=this.rowNode.dragging;for(let t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:st(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){var g;let t=this.findFullWidthInfoForEvent(e);if(!t)return;let{rowGui:o,column:i}=t;if(!(o.element===e.target))return;let n=this.rowNode,{focusSvc:s,navigation:l}=this.beans,c=s.getFocusedCell(),d={rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:(g=c==null?void 0:c.column)!=null?g:i};l==null||l.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){var s;if(e.defaultPrevented||ct(e))return;let t=this.allRowGuis.find(l=>l.element.contains(e.target)),o=t?t.element:null,i=o===e.target,r=Y(this.beans),a=!1;o&&r&&(a=o.contains(r)&&r.classList.contains("ag-cell"));let n=null;!i&&!a&&(n=no(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!n)&&((s=this.beans.navigation)==null||s.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;let e=(t=this.allRowGuis.find(o=>Ie(o.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){let t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(let o of this.allRowGuis)we(o.element,"tabindex",t)}setupFocus(){var e;this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused((e=this.focusEventWhileNotReady)!=null?e:void 0))}restoreFullWidthFocus(e=!1){let{focusSvc:t,editSvc:o}=this.beans;if(o!=null&&o.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;let i=this.getFullWidthRowGuiForFocus();if(!i)return;let r=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&i.element.focus({preventScroll:!0})};if(e){setTimeout(r,0);return}r()}getFullWidthRowGuiForFocus(e){var r;if(this.fullWidthGui)return this.fullWidthGui;let t=this.beans.focusSvc.getFocusedCell(),o=this.beans.colModel.getCol((r=e==null?void 0:e.column)!=null?r:t==null?void 0:t.column);if(!o)return;let i=o==null?void 0:o.pinned;return i==="right"?this.rightGui:i==="left"?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,o=>{o.element.classList.toggle("ag-full-width-focus",t&&o===e)})}onFullWidthRowFocused(e){let{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}let i=this.getFullWidthRowGuiForFocus(e);if(!i){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(i,!0),this.focusEventWhileNotReady=null,e!=null&&e.forceBrowserFocus&&i.element.focus({preventScroll:!0})}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){let o={list:[],map:{}};for(let i of e.list)i!==t&&(o.list.push(i),o.map[i.column.getInstanceId()]=i);return o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){let{rowNode:o}=this;return O(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){let o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){if(ct(e))return;let t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;let t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){let{visibleCols:t}=this.beans;switch(e==null?void 0:e.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=qt(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;let{rangeSvc:t,focusSvc:o}=this.beans;t==null||t.removeAllCellRanges();let i=this.findFullWidthInfoForEvent(e);if(!i)return;let{rowGui:r,column:a}=i,n=r.element,s=e.target,l=this.rowNode,c=e.defaultPrevented||zt();n&&n.contains(s)&&$o(s)&&(c=!1),o.setFocusedCell({rowIndex:l.rowIndex,column:a,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){let{gos:t,rowNode:o}=this;if(this.isFullWidth()){let r=this.findFullWidthRowGui(e.target);return wm(t,r==null?void 0:r.rowComp.getFullWidthCellRendererParams(),o,e)}let i=Bn(t,e.target);return i!=null&&qi(t,i.column,o,e)}onRowClick(e){if(ct(e)||this.lastMouseDownOnDragger)return;let o=this.isSuppressMouseEvent(e),{eventSvc:i,selectionSvc:r}=this.beans,a=this.createRowEventWithSource("rowClicked",e);a.isEventHandlingSuppressed=o,i.dispatchEvent(a),!o&&(r==null||r.handleSelectionEvent(e,this.rowNode,"rowClicked"))}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){let{gos:o,rowNode:i}=this,r=O(o,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(n,s,l,c)=>this.addFullWidthRowDragging(n,s,l,c),setTooltip:(n,s)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(n,s)}}),a=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return Vp(a,r);case"FullWidthGroup":{let{value:n,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return r.value=n,r.valueFormatted=s,Bp(a,r)}case"FullWidthLoading":return Hp(a,r);default:return Op(a,r)}}setupFullWidthRowTooltip(e,t){var o;this.fullWidthGui&&(this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){let{rowDragSvc:r,context:a}=this.beans;if(!r||!this.isFullWidth())return;let n=r.createRowDragComp(()=>o,this.rowNode,void 0,e,t,i);this.createBean(n,a),this.addDestroyFunc(()=>{this.destroyBean(n,a)})}onUiLevelChanged(){let e=yl(this.rowNode);if(this.rowLevel!=e){let t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;for(let i of this.allRowGuis)i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(o,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){let e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(let o of this.allRowGuis)o.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(let o of this.allRowGuis)o.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){var t;let e=[];if((t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(let o of e)for(let i of this.allRowGuis)i.rowComp.toggleCss(o,!0)}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{for(let o of this.allRowGuis)o.rowComp.toggleCss(t,!0)},t=>{for(let o of this.allRowGuis)o.rowComp.toggleCss(t,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){var s,l;let t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,beans:r}=this,a=[];a.push("ag-row"),a.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&a.push("ag-opacity-zero"),a.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(a.push("ag-row-pinned"),(s=r.pinnedRowModel)!=null&&s.isManual()&&a.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&a.push("ag-row-pinned-source"),i.isSelected()&&a.push("ag-row-selected"),i.footer&&a.push("ag-row-footer"),a.push("ag-row-level-"+this.rowLevel),i.stub&&a.push("ag-row-loading"),o&&a.push("ag-full-width-row"),(l=r.expansionSvc)==null||l.addExpandedCss(a,i),i.dragging&&a.push("ag-row-dragging");let{rowStyleSvc:n}=r;return n&&(n.processClassesFromGridOptions(a,i),n.preProcessRowClassRules(a,i)),a.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&a.push("ag-row-first"),this.isLastRowOnPage()&&a.push("ag-row-last"),o&&(t==="left"&&a.push("ag-cell-last-left-pinned"),t==="right"&&a.push("ag-cell-first-right-pinned")),a}processStylesFromGridOptions(){var e,t;return(t=(e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))!=null?t:this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,o=>{(o===this.centerGui||o===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;let{element:t,compBean:o}=e,{rowNode:i,beans:r,gos:a}=this;o.addManagedListeners(t,{pointerenter:n=>{n.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:n=>{n.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(i,{mouseEnter:()=>{var n;!((n=r.dragSvc)!=null&&n.dragging)&&!a.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){let t=e?[e]:this.allRowGuis.map(o=>o.element);for(let o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){let t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),i)}forEachGui(e,t){if(e)t(e);else for(let o of this.allRowGuis)t(o)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;let t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),r=Dc(this.gos)?Ft(this.beans,this.rowNode).height:void 0,a=r?`${Math.min(o,r)-2}px`:void 0;this.forEachGui(e,n=>{n.element.style.height=`${t}px`,a&&n.element.style.setProperty("--ag-line-height",a)})}destroyFirstPass(e=!1){var i;this.active=!1;let{rowNode:t}=this;if(!e&&bo(this.gos)&&!t.sticky)if(t.rowTop!=null){let a=this.roundRowTopToBounds(t.rowTop);this.setRowTop(a)}else for(let a of this.allRowGuis)a.rowComp.toggleCss("ag-opacity-zero",!0);(i=this.fullWidthGui)!=null&&i.element.contains(Y(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);let o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;let e=t=>{for(let o of t.list)o.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){var t,o;let e=(o=(t=this.beans.pagination)==null?void 0:t.getCurrentPage())!=null?o:0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;let o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&M(e)){let t=this.applyPaginationOffset(e),r=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(r)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";let t=this.rowNode,o;if(t.sticky)o=t.stickyRowTop;else{let i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,r=this.applyPaginationOffset(i);o=t.isRowPinned()?r:this.beans.rowContainerHeight.getRealPixelPosition(r)}return o+"px"}setRowTopStyle(e){for(let t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let o=null;for(let i of this.getAllCellCtrls())i.column==e&&(o=i);if(o!=null||t)return o;for(let i of this.getAllCellCtrls())(i==null?void 0:i.getColSpanningList().indexOf(e))>=0&&(o=i);return o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var a,n,s,l;let t=this.rowNode.getRowIndexString();if(t===null)return;let o=((n=(a=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:a.getRowCount())!=null?n:0)+((l=(s=this.beans.filterManager)==null?void 0:s.getHeaderRowCount())!=null?l:0),i=this.rowNode.rowIndex%2===0,r=this.ariaRowIndex=o+this.rowNode.rowIndex+1;this.forEachGui(e,c=>{c.rowComp.setRowIndex(t),c.rowComp.toggleCss("ag-row-even",i),c.rowComp.toggleCss("ag-row-odd",!i),ri(c.element,r)})}},D1=class extends S{constructor(){super(),this.beanName="navigation",this.onPageDown=Ss(this.onPageDown,100),this.onPageUp=Ss(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){let o=e.key,i=e.altKey,r=e.ctrlKey||e.metaKey,a=!!this.beans.rangeSvc&&e.shiftKey,n=Fv(this.gos,e),s=!1;switch(o){case b.PAGE_HOME:case b.PAGE_END:!r&&!i&&(this.onHomeOrEndKey(o),s=!0);break;case b.LEFT:case b.RIGHT:case b.UP:case b.DOWN:if(!n)return!1;r&&!i&&!a&&(this.onCtrlUpDownLeftRight(o,n),s=!0);break;case b.PAGE_DOWN:case b.PAGE_UP:!r&&!i&&(s=this.handlePageUpDown(o,n,t));break}return s&&e.preventDefault(),s}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===b.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:o,focusIndex:i,focusColumn:r,isAsync:a,rowPinned:n}){let{scrollFeature:s}=this.gridBodyCon;M(o)&&!o.isPinned()&&s.ensureColumnVisible(o),M(e)&&s.ensureIndexVisible(e,t),a||s.ensureIndexVisible(i);let{focusSvc:l}=this.beans;l.setFocusedCell({rowIndex:i,column:r,rowPinned:n,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:i,rowPinned:n,column:r})}onPageDown(e){let t=this.beans,o=ma(t),i=this.getViewportHeight(),{pageBounds:r,rowModel:a,rowAutoHeight:n}=t,s=r.getPixelOffset(),l=o.top+i,c=a.getRowIndexAtPixel(l+s);n!=null&&n.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){let t=this.beans,o=ma(t),{pageBounds:i,rowModel:r,rowAutoHeight:a}=t,n=i.getPixelOffset(),s=o.top,l=r.getRowIndexAtPixel(s+n);a!=null&&a.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){let{pageBounds:i,rowModel:r}=this.beans,a=this.getViewportHeight(),n=i.getFirstRow(),s=i.getLastRow(),l=i.getPixelOffset(),c=r.getRow(e.rowIndex),d=o?(c==null?void 0:c.rowHeight)-a-l:a-l,g=(c==null?void 0:c.rowTop)+d,u=r.getRowIndexAtPixel(g+l);if(u===e.rowIndex){let p=o?-1:1;t=u=e.rowIndex+p}let h;o?(h="bottom",us&&(u=s),t>s&&(t=s)),this.isRowTallerThanView(r.getRow(u))&&(t=u,h="top"),this.navigateTo({scrollIndex:t,scrollType:h,scrollColumn:null,focusIndex:u,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{let i=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){var c;let o=t?-1:1,i=this.getViewportHeight(),{pageBounds:r,rowModel:a}=this.beans,n=r.getLastRow(),s=0,l=e.rowIndex;for(;l>=0&&l<=n;){let d=a.getRow(l);if(d){let g=(c=d.rowHeight)!=null?c:0;if(s+g>i)break;s+=g}l+=o}return Math.max(0,Math.min(l,n))}getViewportHeight(){let e=this.beans,t=ma(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth(),i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;let t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!o)return;let i=this.getNormalisedPosition(o),{rowIndex:r,rowPinned:a,column:n}=i!=null?i:o,s=n;this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:s,focusIndex:r,focusColumn:s,rowPinned:a})}onHomeOrEndKey(e){let t=e===b.PAGE_HOME,{visibleCols:o,pageBounds:i,rowModel:r}=this.beans,a=o.allCols,n=t?i.getFirstRow():i.getLastRow(),s=r.getRow(n);if(!s)return;let l=(t?a:[...a].reverse()).find(c=>!c.isSuppressNavigable(s)&&!pe(c));l&&this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:l,focusIndex:n,focusColumn:l})}onTabKeyDown(e,t){let o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),r=this.beans,{ctrlsSvc:a,pageBounds:n,focusSvc:s,gos:l}=r;if(i!==!1){i?t.preventDefault():i===null&&a.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){let{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?c===0:c===n.getFirstRow())&&(l.get("headerHeight")===0||Le(r)?Po(r,!0,!0):(t.preventDefault(),s.focusPreviousFromFirstCell(t)))}else e instanceof Eo&&e.focusCell(!0),(s.focusOverlay(!1)||Po(r,o))&&t.preventDefault()}tabToNextCell(e,t){let o=this.beans,{focusSvc:i,rowRenderer:r}=o,a=i.getFocusedCell();if(!a)return!1;let n=ho(o,a);return!n&&(n=r.getRowByPosition(a),!(n!=null&&n.isFullWidth()))?!1:!!this.tabToNextCellCommon(n,e,t,"api")}tabToNextCellCommon(e,t,o,i="ui"){var l;let{editSvc:r,focusSvc:a}=this.beans,n,s=e instanceof Eo?e:(l=e.getAllCellCtrls())==null?void 0:l[0];return r!=null&&r.isEditing()?n=r==null?void 0:r.moveToNextCell(s,t,o,i):n=this.moveToNextCellNotEditing(e,t,o),n===null?n:n||!!a.focusedHeader}moveToNextCellNotEditing(e,t,o){let i=this.beans.visibleCols.allCols,r;if(e instanceof mr){if(r={...e.getRowPosition(),column:t?i[0]:U(i)},this.gos.get("embedFullWidthRows")&&o){let n=e.findFullWidthInfoForEvent(o);n&&(r.column=n.column)}}else r=e.getFocusedCellPosition();let a=this.findNextCellToFocusOn(r,{backwards:t,startEditing:!1});if(a===!1)return null;if(a instanceof Eo)a.focusCell(!0);else if(a)return this.tryToFocusFullWidthRow(a,t);return M(a)}findNextCellToFocusOn(e,{backwards:t,startEditing:o,skipToNextEditableCell:i}){let r=e,a=this.beans,{cellNavigation:n,gos:s,focusSvc:l,rowRenderer:c}=a;for(;;){e!==r&&(e=r),t||(r=this.getLastCellOfColSpan(r)),r=n.getNextTabbedCell(r,t);let d=s.getCallback("tabToNextCell");if(M(d)){let p=d({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:r||null});if(p===!0)r=e;else{if(p===!1)return!1;r={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!r)return null;if(r.rowIndex<0){let h=Fe(a);return l.focusHeaderPosition({headerPosition:{headerRowIndex:h+r.rowIndex,column:r.column},fromCell:!0}),null}let g=s.get("editType")==="fullRow";if(o&&(!g||i)&&!this.isCellEditable(r))continue;this.ensureCellVisible(r);let u=ho(a,r);if(!u){let h=c.getRowByPosition(r);if(!h||!h.isFullWidth()||o)continue;return{...h.getRowPosition(),column:r==null?void 0:r.column}}if(!n.isSuppressNavigable(u.column,u.rowNode))return u.setFocusedCellPosition(r),this.setRangeToCellIfSupported(r),u}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){let{pinnedRowModel:o,rowModel:i}=this.beans;return t==="top"?o==null?void 0:o.getPinnedTopRow(e):t==="bottom"?o==null?void 0:o.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){var g;let r=o,a=!1,n=this.beans,{cellNavigation:s,focusSvc:l,gos:c}=n;for(;r&&(r===o||!this.isValidNavigateCell(r));)c.get("enableRtl")?t===b.LEFT&&(r=this.getLastCellOfColSpan(r)):t===b.RIGHT&&(r=this.getLastCellOfColSpan(r)),r=s.getNextCellToFocus(t,r),a=Q(r);if(a&&e&&e.key===b.UP&&(r={rowIndex:-1,rowPinned:null,column:o.column}),i){let u=c.getCallback("navigateToNextCell");if(M(u)){let p=u({key:t,previousCellPosition:o,nextCellPosition:r||null,event:e});M(p)?r={rowPinned:p.rowPinned,rowIndex:p.rowIndex,column:p.column}:r=null}}if(!r)return;if(r.rowIndex<0){let u=Fe(n);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+r.rowIndex,column:(g=r.column)!=null?g:o.column},event:e||void 0,fromCell:!0});return}let d=this.getNormalisedPosition(r);d?this.focusPosition(d):this.tryToFocusFullWidthRow(r)}getNormalisedPosition(e){var i;if(!!((i=this.beans.spannedRowRenderer)!=null&&i.getCellByPosition(e)))return e;this.ensureCellVisible(e);let o=ho(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){let{visibleCols:o,rowRenderer:i,focusSvc:r,eventSvc:a}=this.beans,n=o.allCols,s=i.getRowByPosition(e);if(!(s!=null&&s.isFullWidth()))return!1;let l=r.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?U(n):n[0])};this.focusPosition(c);let d=t==null?l!=null&&Rf(c,l):t;return a.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){let{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){var t;pe(e.column)||(t=this.beans.rangeSvc)==null||t.setRangeToCell(e)}isValidNavigateCell(e){return!!et(this.beans,e)}getLastCellOfColSpan(e){let t=ho(this.beans,e);if(!t)return e;let o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:U(o),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=Pc(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&(o==null?void 0:o.sticky),{scrollFeature:r}=this.gridBodyCon;!i&&Q(e.rowPinned)&&r.ensureIndexVisible(e.rowIndex),e.column.isPinned()||r.ensureColumnVisible(e.column)}ensureColumnVisible(e){let t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function ma(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var M1={moduleName:"KeyboardNavigation",version:D,beans:[D1,jb,rb],apiFunctions:{getFocusedCell:Kb,clearFocusedCell:$b,setFocusedCell:Yb,setFocusedHeader:Jb,tabToNextCell:Qb,tabToPreviousCell:Zb}},P1=class extends S{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){var t,o,i,r,a;this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:(t=e==null?void 0:e.animate)!=null?t:!1,newData:(o=e==null?void 0:e.newData)!=null?o:!1,newPage:(i=e==null?void 0:e.newPage)!=null?i:!1,newPageSize:(r=e==null?void 0:e.newPageSize)!=null?r:!1,keepRenderedRows:(a=e==null?void 0:e.keepRenderedRows)!=null?a:!1})}calculatePages(){let{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},I1=class extends S{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){var e,t;return(t=(e=this.topRowBounds)==null?void 0:e.rowIndex)!=null?t:-1}getLastRow(){var e,t;return(t=(e=this.bottomRowBounds)==null?void 0:e.rowIndex)!=null?t:-1}getCurrentPageHeight(){let{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){var r;let{topRowBounds:e,bottomRowBounds:t}=this,o=(r=e==null?void 0:e.rowTop)!=null?r:0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:i}}calculateBounds(e,t){let{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;let r=o.getRowBounds(t);r&&(r.rowIndex=t),this.bottomRowBounds=r,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){var t,o;let e=(o=(t=this.topRowBounds)==null?void 0:t.rowTop)!=null?o:0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},T1=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",A1=class extends S{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){let e=this.getWidth(),t=e>0;for(let o of this.elements)o&&(q(o,t),Ze(o,e))}},z1=class extends S{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});let e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){let{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=se(e,"print"),r=i?0:t.getColsLeftWidth(),a=i?0:t.getDisplayedColumnsRightWidth();r!=this.leftWidth&&(this.leftWidth=r,o.dispatchEvent({type:"leftPinnedWidthChanged"})),a!=this.rightWidth&&(this.rightWidth=a,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){let e=this.gridBodyCtrl.eBodyViewport,t=ni(e);if(t<=50)return;let o=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:r,hasLockedPinned:a}=o,n=r;!n.length&&!a||(i&&(n=i({columns:n,viewportWidth:t})),n!=null&&n.length&&(n=n.filter(s=>!pe(s)),this.setColsPinned(n,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new A1(e,t)}setColsPinned(e,t,o){let{colModel:i,colAnimation:r,visibleCols:a,gos:n}=this.beans;if(!i.cols||!(e!=null&&e.length))return;if(se(n,"print")){k(37);return}r==null||r.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null;let l=[];for(let c of e){if(!c)continue;let d=i.getCol(c);d&&d.getPinned()!==s&&(this.setColPinned(d,s),l.push(d))}l.length&&(a.refresh(o),Vd(this.eventSvc,l,o)),r==null||r.finish()}initCol(e){let{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){let{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;let o=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;let r=()=>{let a=o?this.leftWidth:this.rightWidth;if(a==null)return;let n=a==0,s=e.hidden!==n,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth(),g=t.verticalScrollShowing&&(l&&o||!l&&i)?a+c:a;e.comp.setPinnedContainerWidth(`${g}px`),e.comp.setDisplayed(!n),s&&(e.hidden=n,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:r,rightPinnedWidthChanged:r,scrollVisibilityChanged:r,scrollbarWidthChanged:r})}getHeaderResizeDiff(e,t){if(t.getPinned()){let{leftWidth:i,rightWidth:r}=this,a=ni(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+r+e>a)if(a>i+r)e=a-i-r;else return 0}return e}getPinnedColumnsOverflowingViewport(e){var h,p;let t=(h=this.rightWidth)!=null?h:0,o=(p=this.leftWidth)!=null?p:0,i=t+o,r=!1;if(i0;){if(l0){let f=n[c++];if(f.colDef.lockPinned){r=!0;continue}u-=f.getActualWidth(),g.push(f)}}return{columns:g,hasLockedPinned:r}}},L1={moduleName:"PinnedColumn",version:D,beans:[z1],css:[T1]},O1=class extends ve{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=re(this,this.updateAnnouncement.bind(this),200)}postConstruct(){let e=this.beans,t=te(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),ic(o,"polite"),ku(o,"additions text"),xu(o,!0),e.eRootDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}\u200B`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(ne(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},H1=class extends O1{},B1={moduleName:"Aria",version:D,beans:[H1]},V1=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",Sl="ag-delay-render",N1=class extends S{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(Sl)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;let{renderStatus:t,ctrlsSvc:o}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}o.getGridBodyCtrl().eGridBody.classList.remove(Sl),this.alreadyRevealed=!0}},G1={moduleName:"ColumnDelayRender",version:D,beans:[N1],css:[V1]},Pr=class extends _{constructor(){super()}},W1={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},q1=class extends Pr{constructor(){super(...arguments),this.eExportingIcon=E,this.eExportingText=E}init(e){var r,a;let{beans:t}=this;this.setTemplate(W1);let o=ye("overlayExporting",t,null);o&&this.eExportingIcon.appendChild(o);let i=(a=(r=e.exporting)==null?void 0:r.overlayText)!=null?a:this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}},_1={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},U1=class extends Pr{constructor(){super(...arguments),this.eLoadingIcon=E,this.eLoadingText=E}init(e){var r,a,n;let{beans:t,gos:o}=this,i=st((r=o.get("overlayLoadingTemplate"))==null?void 0:r.trim());if(this.setTemplate(i!=null?i:_1),!i){let s=ye("overlayLoading",t,null);s&&this.eLoadingIcon.appendChild(s);let l=(n=(a=e.loading)==null?void 0:a.overlayText)!=null?n:this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=l,t.ariaAnnounce.announceValue(l,"overlay")}}},j1={tag:"span",cls:"ag-overlay-no-matching-rows-center"},K1=class extends Pr{init(e){var i,r;let{beans:t}=this;this.setTemplate(j1);let o=(r=(i=e.noMatchingRows)==null?void 0:i.overlayText)!=null?r:this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}},$1={tag:"span",cls:"ag-overlay-no-rows-center"},Y1=class extends Pr{init(e){var r,a,n;let{beans:t,gos:o}=this,i=st((r=o.get("overlayNoRowsTemplate"))==null?void 0:r.trim());if(this.setTemplate(i!=null?i:$1),!i){let s=(n=(a=e.noRows)==null?void 0:a.overlayText)!=null?n:this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}}};function Q1(e){var t;(t=e.overlays)==null||t.showLoadingOverlay()}function Z1(e){var t;(t=e.overlays)==null||t.showNoRowsOverlay()}function J1(e){var t;(t=e.overlays)==null||t.hideOverlay()}var X1=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",ey={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},gg=class extends _{constructor(){super(ey),this.eOverlayWrapper=E,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(X1)}handleKeyDown(e){if(e.key!==b.TAB||e.defaultPrevented||ct(e))return;let{beans:t,eOverlayWrapper:o}=this;if(o&&no(t,o,!1,e.shiftKey))return;let r=!1;e.shiftKey?r=t.focusSvc.focusGridView({column:U(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):r=Po(t,!1),r&&e.preventDefault()}updateLayoutClasses(e,t){let o=this.eOverlayWrapper;if(!o)return;let i=o.classList,{AUTO_HEIGHT:r,NORMAL:a,PRINT:n}=Oe;i.toggle(r,t.autoHeight),i.toggle(a,t.normal),i.toggle(n,t.print)}postConstruct(){this.createManagedBean(new Hn(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){var o;let t=(o=this.eOverlayWrapper)==null?void 0:o.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=o,!e)return this.refreshWrapperPadding(),$.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),o&&this.isGridFocused()){let i=Y(this.beans);i&&!ln(this.beans)&&(this.elToFocusAfter=i)}return e.then(i=>{let r=this.eOverlayWrapper;if(!r){this.destroyBean(i);return}if(this.activePromise!==e){this.activeOverlay!==i&&(this.destroyBean(i),i=null);return}this.activePromise=null,i&&(this.activeOverlay!==i&&(r.appendChild(i.getGui()),this.activeOverlay=i),o&&this.isGridFocused()&&Jt(r))}),e}refreshWrapperPadding(){var o;if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}let e=!!this.activeOverlay||!!this.activePromise,t=0;e&&!this.overlayExclusive&&(t=((o=this.beans.ctrlsSvc.get("gridHeaderCtrl"))==null?void 0:o.headerHeight)||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){var i;this.activePromise=null;let e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);let o=this.eOverlayWrapper;o&&ne(o),(i=t==null?void 0:t.focus)==null||i.call(t,{preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){let e=Y(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},ty={selector:"AG-OVERLAY-WRAPPER",component:gg},oy=["refresh"],yi=e=>({name:e,optionalMethods:oy}),Nt={id:"agLoadingOverlay",overlayType:"loading",comp:yi("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{let t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},fo={id:"agNoRowsOverlay",overlayType:"noRows",comp:yi("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},$n={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:yi("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},vr={id:"agExportingOverlay",overlayType:"exporting",comp:yi("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},Ki={id:"activeOverlay",comp:yi("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},iy=e=>{var t;return e?(t={agLoadingOverlay:Nt,agNoRowsOverlay:fo,agNoMatchingRowsOverlay:$n,agExportingOverlay:vr}[e])!=null?t:Ki:null},ry=e=>e?{loading:Nt,noRows:fo,noMatchingRows:$n,exporting:vr}[e]:null,ay=class extends S{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){let e=this.gos;this.showInitialOverlay=ee(e);let t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[o,i,r,a]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),i()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=o,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],n=>{var s;return this.onPropChange(new Set((s=n.changeSet)==null?void 0:s.properties))})}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;let e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(Nt))return;let t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(Nt)}showNoRowsOverlay(){this.showInitialOverlay=!1;let e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(fo)||(this.userForcedNoRows=!0,this.doShowOverlay(fo))}async showExportOverlay(e){let{gos:t,beans:o}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(vr)||this.userForcedNoRows&&this.currentDef===fo){e();return}let i=this.getDesiredDefWithOverride(vr);if(!i){e();return}this.exportsInProgress++,this.focusedCell=o.focusSvc.getFocusedCell(),await this.doShowOverlay(i),await new Promise(a=>setTimeout(()=>a()));let r=Date.now();try{e()}finally{let a=Date.now()-r,n=Math.max(0,300-a),s=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),If(o,this.focusedCell),this.focusedCell=null)};n>0?setTimeout(()=>s(),n):s()}}hideOverlay(){let e=this.gos;this.showInitialOverlay=!1;let t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){k(99);return}if(e.get("activeOverlay")){k(296);return}if(this.currentDef===$n){k(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==fo&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return ty}getOverlayWrapperCompClass(){return gg}onPropChange(e){var r,a,n;let t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;let o=this.currentDef,i=(r=this.eWrapper)==null?void 0:r.activeOverlay;if(i&&o){let s=e.has("activeOverlayParams");if(o===Ki)s&&((a=i.refresh)==null||a.call(i,this.makeCompParams(!0)));else{let l=o.paramsKey;(e.has("overlayComponentParams")||l&&e.has(l))&&((n=i.refresh)==null||n.call(i,this.makeCompParams(!1,l,o.overlayType)))}}}updateOverlay(e){let t=this.eWrapper;if(!t)return this.currentDef=null,!1;let o=this.getDesiredDefWithOverride(),i=this.currentDef,r=o===Ki&&e;return o!==i?o?(this.doShowOverlay(o),!0):(this.disableInitialOverlay(),this.doHideOverlay()):r&&o?(t.hideOverlay(),this.doShowOverlay(o),!0):(o||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){let{gos:t}=this,o=iy(t.get("activeOverlay"));return o||(o=e!=null?e:this.getOverlayDef(),o&&this.isDisabled(o)&&(o=null)),o}getOverlayDef(){let{gos:e,beans:t}=this,{rowModel:o}=t,i=e.get("loading");if(i!==void 0){if(this.disableInitialOverlay(),i)return Nt}else if(this.showInitialOverlay){if(!this.isDisabled(Nt)&&(!e.get("columnDefs")||!e.get("rowData")))return Nt;this.disableInitialOverlay()}else this.disableInitialOverlay();let a=o.getOverlayType();return ry(a)}disableInitialOverlay(){var e;this.showInitialOverlay=!1,(e=this.newColumnsLoadedCleanup)==null||e.call(this),this.newColumnsLoadedCleanup=null}doShowOverlay(e){var d,g;let{gos:t,beans:o}=this,{userCompFactory:i}=o;this.currentDef=e;let r=e!==Ki,a=!!e.exclusive;this.exclusive=a;let n;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(n=e.paramsKey);let s;r&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(s=i.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),s!=null||(s=i.getCompDetailsFromGridOptions(e.comp,r?e.id:void 0,this.makeCompParams(!r,n,e.overlayType),!1));let l=(d=s==null?void 0:s.newAgStackInstance())!=null?d:null,c=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,a):$.resolve();return(g=this.eWrapper)==null||g.refreshWrapperPadding(),this.setExclusive(a),c}makeCompParams(e,t,o){let{gos:i}=this,r=e?i.get("activeOverlayParams"):{...i.get("overlayComponentParams"),...t&&i.get(t)||null,overlayType:o};return O(i,r!=null?r:{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;let t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){var o,i;let{gos:t}=this;return e.overlayType&&((o=t.get("suppressOverlays"))==null?void 0:o.includes(e.overlayType))||((i=e.isSuppressed)==null?void 0:i.call(e,t))===!0}},ny={moduleName:"Overlay",version:D,userComponents:{agLoadingOverlay:U1,agNoRowsOverlay:Y1,agNoMatchingRowsOverlay:K1,agExportingOverlay:q1},apiFunctions:{showLoadingOverlay:Q1,showNoRowsOverlay:Z1,hideOverlay:J1},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[ay]},sy=class extends S{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=Yp(),Et(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;let e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Et(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){let t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;let t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},ly=400,cy=class extends S{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{let e=()=>{for(let a of this.getAllCellCtrls())a.onCellSelectionChanged()},t=()=>{for(let a of this.getAllCellCtrls())a.updateRangeBordersIfRangeCount()},o=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},i=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{dt(this.gos)?o():i()}),dt(this.gos)&&o()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:r})=>{(!r&&i||r&&!i)&&this.redrawRows()});let{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{let i=o.columns;i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{let i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=se(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let e=this.getKeepDetailRowsCount(),t=e!=null?e:3;this.cachedRowCtrls=new dy(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){var e,t;return(t=(e=this.stickyRowFeature)==null?void 0:e.stickyTopRowCtrls)!=null?t:[]}getStickyBottomRowCtrls(){var e,t;return(t=(e=this.stickyRowFeature)==null?void 0:e.stickyBottomRowCtrls)!=null?t:[]}updateAllRowCtrls(){var i,r;let e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=(r=(i=this.cachedRowCtrls)==null?void 0:i.getEntries())!=null?r:[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){var r;let o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!((r=this.beans.spannedRowRenderer)==null?void 0:r.getCellByPosition({rowIndex:e,column:t,rowPinned:null}))||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){for(let t of this.getAllCellCtrls())t.onCellFocused(e);for(let t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){var t;if((e==null?void 0:e.rowIndex)!=null&&!e.rowPinned){let o=(t=this.beans.colModel.getCol(e.column))!=null?t:void 0;this.isCellBeingRendered(e.rowIndex,o)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(let t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(let t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{let{cellFlashSvc:t}=this.beans;if(t)for(let o of this.getAllCellCtrls())t.onFlashCells(o,e)},columnHoverChanged:()=>{for(let e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(let e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(let e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(let e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();let e=this.colModel.getCols();for(let t of e){let o=l=>{for(let c of this.getAllCellCtrls())c.column===t&&l(c)},i=()=>{o(l=>l.onLeftChanged())},r=()=>{o(l=>l.onWidthChanged())},a=()=>{o(l=>l.onFirstRightPinnedChanged())},n=()=>{o(l=>l.onLastLeftPinnedChanged())},s=()=>{o(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",r),t.__addEventListener("firstRightPinnedChanged",a),t.__addEventListener("lastLeftPinnedChanged",n),t.__addEventListener("colDefChanged",s),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",r),t.__removeEventListener("firstRightPinnedChanged",a),t.__removeEventListener("lastLeftPinnedChanged",n),t.__removeEventListener("colDefChanged",s)})}}onDomLayoutChanged(){let e=se(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){let t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){var o;let t=[];for(let i of this.getAllRowCtrls()){let r=(o=i.getCellCtrl(e,!0))==null?void 0:o.eGui;r&&t.push(r)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,o){var l;let{pinnedRowModel:i,beans:r,printLayout:a}=this,n=Object.fromEntries(e.map(c=>[c.rowNode.id,c]));i==null||i.forEachPinnedRow(t,(c,d)=>{let g=e[d];g&&i.getPinnedRowById(g.rowNode.id,t)===void 0&&(g.destroyFirstPass(),g.destroySecondPass()),c.id in n&&o?(e[d]=n[c.id],delete n[c.id]):e[d]=new mr(c,r,!1,!1,a)});let s=(l=t==="top"?i==null?void 0:i.getPinnedTopRowCount():i==null?void 0:i.getPinnedBottomRowCount())!=null?l:0;e.length=s}onPinnedRowDataChanged(){let e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var o,i;if(e.sticky)(o=this.stickyRowFeature)==null||o.refreshStickyNode(e);else if((i=this.cachedRowCtrls)!=null&&i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{let r=a=>{let n=a[e.rowIndex];n&&n.rowNode===e&&(n.destroyFirstPass(),n.destroySecondPass(),a[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":r(this.topRowCtrls);break;case"bottom":r(this.bottomRowCtrls);break;default:r(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){let{editSvc:t}=this.beans;if(t!=null&&t.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(let i of e!=null?e:[])this.redrawRow(i,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){var s;this.getLockOnRefresh();let t=(s=this.beans.focusSvc)==null?void 0:s.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);let o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&bo(this.gos),r=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();let{stickyRowFeature:a,gos:n}=this;if(a){a.checkStickyRows();let l=a.extraTopHeight+a.extraBottomHeight;l&&this.updateContainerHeights(l)}this.recycleRows(r,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(n.get("enableRowPinning")?o:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){var i;let t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),(i=this.stickyRowFeature)==null||i.resetOffsets())}updateContainerHeights(e=0){let{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){var e,t;if(this.refreshInProgress)throw new Error(Je(252));this.refreshInProgress=!0,(t=(e=this.beans.frameworkOverrides).getLockOnRefresh)==null||t.call(e)}releaseLockOnRefresh(){var e,t;this.refreshInProgress=!1,(t=(e=this.beans.frameworkOverrides).releaseLockOnRefresh)==null||t.call(e)}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;let t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:Fe(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(O(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){let{pagination:t,pageBounds:o}=this.beans,i=e;for(i.rowPinned==null&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(i.rowPinned==null&&o)if(i.rowIndexo.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});let r=this.getRowByPosition(i);if(r!=null&&r.isAlive())return{...r.getRowPosition(),column:e.column};i=lr(this.beans,i)}return null}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i{let r=i.rowNode;return Ka(r,t)})}getCellCtrls(e,t){let o;M(t)&&(o={},t.forEach(r=>{let a=this.colModel.getCol(r);M(a)&&(o[a.getId()]=!0)}));let i=[];for(let r of this.getRowCtrls(e))for(let a of r.getAllCellCtrls()){let n=a.column.getId();o&&!o[n]||i.push(a)}return i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){var o;let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),(o=this.stickyRowFeature)==null||o.destroyStickyCtrls()}getRowsToRecycle(){let e=[];for(let o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);let t={};for(let o of Object.values(this.rowCtrlsByRowIndex)){let i=o.rowNode;t[i.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(let o of e){let i=this.rowCtrlsByRowIndex[o];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){let{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e,r,a=this.stickyRowFeature;a&&(r=(t==null?void 0:t.getFocusCellToUseAfterRefresh())||void 0);let n=this.firstRenderedRow,s=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(a){l=a.checkStickyRows();let d=a.extraTopHeight+a.extraBottomHeight;d&&this.updateContainerHeights(d)}let c=this.firstRenderedRow!==n||this.lastRenderedRow!==s;if(!(i&&!l&&!c)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),r!=null)){let d=t==null?void 0:t.getFocusCellToUseAfterRefresh();r!=null&&d==null&&(o==null||o.flushAllFrames(),this.restoreFocusedCell(r))}}removeRowCompsNotToDraw(e,t){let o={};for(let a of e)o[a]=!0;let r=Object.keys(this.rowCtrlsByRowIndex).filter(a=>!o[a]);this.removeRowCtrls(r,t)}calculateIndexesToDraw(e){var n,s;let t=[];for(let l=this.firstRenderedRow;l<=this.lastRenderedRow;l++)t.push(l);let o=this.beans.pagination,i=(s=(n=this.beans.focusSvc)==null?void 0:n.getFocusedCell())==null?void 0:s.rowIndex;i!=null&&(ithis.lastRenderedRow)&&(!o||o.isRowInPage(i))&&i{let c=l.rowNode.rowIndex;c==null||c===i||(cthis.lastRenderedRow)&&this.doNotUnVirtualiseRow(l)&&t.push(c)};for(let l of Object.values(this.rowCtrlsByRowIndex))r(l);if(e)for(let l of Object.values(e))r(l);t.sort((l,c)=>l-c);let a=[];for(let l=0;l{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){let{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){let e=[];for(let t of this.getFullWidthRowCtrls()){let o=t.rowNode.rowIndex;e.push(o.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=ja(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;let i=o.rowNode;return!(t!=null&&!Ka(i,t))})}createOrUpdateRowCtrl(e,t,o,i){let r,a=this.rowCtrlsByRowIndex[e];if(a||(r=this.rowModel.getRow(e),M(r)&&M(t)&&t[r.id]&&r.alreadyRendered&&(a=t[r.id],t[r.id]=null)),!a)if(r||(r=this.rowModel.getRow(e)),M(r))a=this.createRowCon(r,o,i);else return;r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=a}destroyRowCtrls(e,t){let o=[];if(e){for(let i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){let r=i.instanceId;this.zombieRowCtrls[r]=i,o.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[r]})}else i.destroySecondPass()}}t&&(o.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(let i of o)i()},ly))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){let e=this.getRowBuffer(),t=Ut(this.beans);return e*t}workOutFirstAndLastRowsToRender(){let{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let i,r;if(!o.isRowsToRender())i=0,r=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),r=t.getLastRow();else{let d=this.getRowBufferInPixels(),g=this.ctrlsSvc.getScrollFeature(),u=this.gos.get("suppressRowVirtualisation"),h=!1,p,f;do{let y=t.getPixelOffset(),{pageFirstPixel:x,pageLastPixel:R}=t.getCurrentPagePixelRange(),F=e.divStretchOffset,P=g.getVScrollPosition(),T=P.top,I=P.bottom;u?(p=x+F,f=R+F):(p=Math.max(T+y-d,x)+F,f=Math.min(I+y+d,R)+F),this.firstVisibleVPixel=Math.max(T+y,x)+F,this.lastVisibleVPixel=Math.min(I+y,R)+F,h=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(h);let m=o.getRowIndexAtPixel(p),v=o.getRowIndexAtPixel(f),C=t.getFirstRow(),w=t.getLastRow();mw&&(v=w),i=m,r=v}let a=se(this.gos,"normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),s=Math.max(this.getRowBuffer(),500);a&&!n&&r-i>s&&(r=i+s);let l=i!==this.firstRenderedRow,c=r!==this.lastRenderedRow;(l||c)&&(this.firstRenderedRow=i,this.lastRenderedRow=r,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:r}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,ht(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){var s,l;let o=(s=this.pinnedRowModel)==null?void 0:s.ensureRowHeightsValid(),i=(l=this.stickyRowFeature)==null?void 0:l.ensureRowHeightsValid(),{pageBounds:r,rowModel:a}=this,n=a.ensureRowHeightsValid(e,t,r.getFirstRow(),r.getLastRow());return(n||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||n||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){var c;let i=e.rowNode,r=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),a=(c=this.editSvc)==null?void 0:c.isEditing(e),n=i.detail;return r||a||n?!!this.isRowPresent(i):!1}isRowPresent(e){var t,o;return this.rowModel.isRowPresent(e)?(o=(t=this.beans.pagination)==null?void 0:t.isRowInPage(e.rowIndex))!=null?o:!0:!1}createRowCon(e,t,o){var n,s,l;let i=(s=(n=this.cachedRowCtrls)==null?void 0:n.getRow(e))!=null?s:null;if(i)return i;let r=o&&!this.printLayout&&!!((l=this.beans.animationFrameSvc)!=null&&l.active);return new mr(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){let e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),o=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t,{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;let i=e>this.lastRenderedRow;return!(tthis.maxCount){let t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if((e==null?void 0:e.id)==null)return null;let t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){let t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],Xe(this.entriesList,o)}removeFromCache(e){let t=e.rowNode.id;delete this.entriesMap[t],Xe(this.entriesList,e)}getEntries(){return this.entriesList}};function ja(e){if(!e)return;let t={top:{},bottom:{},normal:{}};for(let o of e){let i=o.id;switch(o.rowPinned){case"top":t.top[i]=o;break;case"bottom":t.bottom[i]=o;break;default:t.normal[i]=o;break}}return t}function Ka(e,t){let o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var gy=class extends S{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=ee(this.gos)?gr:uy,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));let e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=nt(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((o,i)=>this.compareRowNodes(t,o,i))}compareRowNodes(e,t,o){if(t===o)return 0;let i=this.accentedSort;for(let r=0,a=e.length;r{if(e.data)return e;let t=e.childrenAfterGroup;for(;t!=null&&t.length;){let o=t[0];if(o.data)return o;t=o.childrenAfterGroup}},xl=e=>{if(!e)return e;if(typeof e=="bigint")return e({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),py={tag:"span",cls:"ag-sort-indicator-container",children:[Ht("Order","order"),Ht("Asc","ascending-icon"),Ht("Desc","descending-icon"),Ht("Mixed","mixed-icon"),Ht("AbsoluteAsc","absolute-ascending-icon"),Ht("AbsoluteDesc","absolute-descending-icon"),Ht("None","none-icon")]},Yn=class extends _{constructor(e){super(),this.eSortOrder=E,this.eSortAsc=E,this.eSortDesc=E,this.eSortMixed=E,this.eSortNone=E,this.eSortAbsoluteAsc=E,this.eSortAbsoluteDesc=E,e||this.setTemplate(py)}attachCustomElements(e,t,o,i,r,a,n){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=r,this.eSortAbsoluteAsc=a,this.eSortAbsoluteDesc=n}setupSort(e,t=!1,o){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=o,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);let i=this.updateIcons.bind(this),r=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:r,columnRowGroupChanged:r}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;let i=ye(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:o,eSortAbsoluteDesc:i,eSortNone:r,column:a,gos:n,beans:s}=this,l=qh(a,s,this.getSortDefOverride),c=l.isDefaultSortAllowed,d=l.isAbsoluteSortAllowed,{isAbsoluteSort:g,isDefaultSort:u,isAscending:h,isDescending:p,direction:f}=l;if(e&&q(e,h&&u&&c,{skipAriaHidden:!0}),t&&q(t,p&&u&&c,{skipAriaHidden:!0}),r){let m=!a.getColDef().unSortIcon&&!n.get("unSortIcon");q(r,!m&&!f,{skipAriaHidden:!0})}o&&q(o,h&&g&&d,{skipAriaHidden:!0}),i&&q(i,p&&g&&d,{skipAriaHidden:!0})}setupMultiSortIndicator(){let{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);let i=t.getColDef().showRowGroup;nt(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){var i;let{eSortMixed:e,beans:t,column:o}=this;if(e){let r=((i=t.sortSvc.getDisplaySortForColumn(o))==null?void 0:i.direction)==="mixed";q(e,r,{skipAriaHidden:!0})}}updateSortOrder(){var s;let{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;let i=o.getColumnsWithSortingOrdered(),r=(s=o.getDisplaySortIndexForColumn(t))!=null?s:-1,a=i.some(l=>{var c;return(c=o.getDisplaySortIndexForColumn(l))!=null?c:!1}),n=r>=0&&a;q(e,n,{skipAriaHidden:!0}),r>=0?e.textContent=(r+1).toString():ne(e)}refresh(){this.onSortChanged()}},fy={selector:"AG-SORT-INDICATOR",component:Yn},my=class extends S{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){let i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){let i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,o,i){var d;let{gos:r,showRowGroupCols:a}=this.beans,n=nt(r),s=[e];if(n&&e.getColDef().showRowGroup){let g=(d=a==null?void 0:a.getSourceColumnsForGroupColumn)==null?void 0:d.call(a,e),u=g==null?void 0:g.filter(h=>h.isSortable());u&&(s=[e,...u])}for(let g of s)this.setColSort(g,t,i);let l=(o||r.get("alwaysMultiSort"))&&!r.get("suppressMultiSort"),c=[];if(!l){let g=this.clearSortBarTheseColumns(s,i);c.push(...g)}this.updateSortIndex(e),c.push(...s),this.dispatchSortChangedEvents(i,c)}updateSortIndex(e){let{gos:t,colModel:o,showRowGroupCols:i}=this.beans,r=nt(t),a=i==null?void 0:i.getShowRowGroupCol(e.getId()),n=r&&a||e,s=this.getColumnsWithSortingOrdered();o.forAllCols(d=>this.setColSortIndex(d,null));let l=s.filter(d=>r&&d.getColDef().showRowGroup?!1:d!==n);(n.getSortDef()?[...l,n]:l).forEach((d,g)=>this.setColSortIndex(d,g))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){let o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){let o=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSortDef()&&o.push(i),this.setColSort(i,void 0,t))}),o}getNextSortDirection(e,t){let o=e.getSortingOrder(),i=t===void 0?e.getSortDef():Me(t),a=o.findIndex(n=>Gi(n,i))+1;return a>=o.length&&(a=0),Me(o[a])}getIndexedSortMap(){var c;let{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans,r=[];if(t.forAllCols(d=>{d.getSortDef()&&r.push(d)}),t.isPivotMode()){let d=nt(e);r=r.filter(g=>{let u=!!g.getAggFunc(),h=!g.isPrimary(),p=d?o==null?void 0:o.getShowRowGroupCol(g.getId()):g.getColDef().showRowGroup;return u||h||p})}let a=(c=i==null?void 0:i.columns.filter(d=>!!d.getSortDef()))!=null?c:[],n={};r.forEach((d,g)=>n[d.getId()]=g),r.sort((d,g)=>{let u=d.getSortIndex(),h=g.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){let p=n[d.getId()],f=n[g.getId()];return p>f?1:-1}else return h==null?-1:1});let s=nt(e)&&!!a.length;s&&(r=[...new Set(r.map(d=>{var g;return(g=o==null?void 0:o.getShowRowGroupCol(d.getId()))!=null?g:d}))]);let l=new Map;if(r.forEach((d,g)=>l.set(d,g)),s)for(let d of a){let g=o.getShowRowGroupCol(d.getId());l.set(d,l.get(g))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){var i,r;let t=[],o=this.getColumnsWithSortingOrdered();for(let a of o){let n=(i=a.getSortDef())==null?void 0:i.direction;if(!n)continue;let s=gt((r=a.getSortDef())==null?void 0:r.type),l={sort:n,type:s};e?l.colId=a.getId():l.column=a,t.push(l)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){let t=nt(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){var n,s;let t=(n=this.beans.showRowGroupCols)==null?void 0:n.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSortDef();let i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,r=i[0].getSortDef();return i.every(l=>Gi(l.getSortDef(),r))?r:{type:gt((s=e.getSortDef())==null?void 0:s.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){let o=()=>{var a;let{type:i,direction:r}=Me(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",r==="asc"),e.toggleCss("ag-header-cell-sorted-desc",r==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",i==="absolute"&&r==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",i==="absolute"&&r==="desc"),e.toggleCss("ag-header-cell-sorted-none",!r),t.getColDef().showRowGroup){let n=(a=this.beans.showRowGroupCols)==null?void 0:a.getSourceColumnsForGroupColumn(t),l=!(n==null?void 0:n.every(c=>{var d;return r==((d=c.getSortDef())==null?void 0:d.direction)}));e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:o,columnPinned:o,columnRowGroupChanged:o,displayedColumnsChanged:o})}initCol(e){let{sortIndex:t,initialSortIndex:o}=e.colDef,i=Wc(e.colDef);i&&e.setSortDef(i,!0),t!==void 0?t!==null&&(e.sortIndex=t):o!==null&&(e.sortIndex=o)}updateColSort(e,t,o){t!==void 0&&this.setColSort(e,Me(t),o)}setColSort(e,t,o){Gi(e.getSortDef(),t)||(e.setSortDef(Me(t),t===void 0),e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Yn(e)}getSortIndicatorSelector(){return fy}},ug={moduleName:"Sort",version:D,beans:[my,gy],apiFunctions:{onSortChanged:hy},userComponents:{agSortIndicator:Yn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},vy=class extends S{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{let e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){let{colModel:t,rowModel:o}=this.beans;t.setColumnDefs(e!=null?e:[],"gridInitializing"),o.start()}gridReady(){let{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Et(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){let t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,ko(e.source))}}};function Cy(e){var t;(t=e.valueCache)==null||t.expire()}function wy(e,t){var l,c;let{colKey:o,rowNode:i,useFormatter:r,from:a="edit"}=t,n=(l=e.colModel.getColDefCol(o))!=null?l:e.colModel.getCol(o);if(!n)return null;let s=e.valueSvc.getValueForDisplay({column:n,node:i,includeValueFormatted:r,from:a});return r?(c=s.valueFormatted)!=null?c:zo(s.value):s.value}var by="paste",yy=class extends S{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=ot(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){var i;if(this.deferredDepth===0||--this.deferredDepth>0)return;let e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&((i=this.csrm)==null||i.doAggregate(e));let{rowRenderer:o}=this.beans;if(t)for(let r of t)kl(o,r);if(e){let r=e.getSortedRows();for(let a=0,n=r.length;a{let{sibling:o,pinnedSibling:i}=t;e.refreshRowByNode(t),e.refreshRowByNode(o),e.refreshRowByNode(i),e.refreshRowByNode(o==null?void 0:o.pinnedSibling),e.refreshRowByNode(i==null?void 0:i.sibling)},Sy=class extends S{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);W(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(o){return W(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){let t=this.cache;if(t[e])return t[e];let o=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=i,i}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},xy=class extends S{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){let e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,o){if(this.active){let i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=o}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},ky={moduleName:"ValueCache",version:D,beans:[xy],apiFunctions:{expireValueCache:Cy}},Ry={moduleName:"Expression",version:D,beans:[Sy]},Ey={moduleName:"ChangeDetection",version:D,beans:[yy]},Fy={moduleName:"CellApi",version:D,apiFunctions:{getCellValue:wy}},Dy=class extends S{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){let{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=mi(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;let o=i=>this.callColumnCellValueChangedHandler(i);this.eventSvc.addListener("cellValueChanged",o,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",o,!0)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue)}getValueForDisplay(e){let t=this.beans,o=e.column,i=e.node,r=t.showRowGroupColValueSvc,a=!o&&i.group,n=o==null?void 0:o.colDef.showRowGroup,s=!this.isTreeData||i.footer;if(r&&s&&(a||n)){let u=r.getGroupValue(i,o,this.displayIgnoresAggData(i));return u==null?{value:null,valueFormatted:null}:{value:u.value,valueFormatted:e.includeValueFormatted?r.formatAndPrefixGroupColValue(u,o,e.exporting):null}}if(!o)return{value:i.key,valueFormatted:null};let l=this.getValue(o,i,e.from,this.displayIgnoresAggData(i)),c=l,d=t.formula;o.isAllowFormula()&&(d!=null&&d.isFormula(l))&&(e.useRawFormula?(l=d.normaliseFormula(l,!0),c=d.resolveValue(o,i)):(l=d.resolveValue(o,i),c=l));let g=e.includeValueFormatted&&!(e.exporting&&o.colDef.useValueFormatterForExport===!1);return{value:l,valueFormatted:g?this.formatValue(o,i,c):null}}getValue(e,t,o,i=!1){var l,c;if(this.initialised||this.init(),!t)return;let r=e.colDef,a=t.group;if(!a){let d=r.pivotValueColumn;d&&(e=d)}let n=(l=this.editSvc)==null?void 0:l.getPendingEditValue(t,e,o);if(n!==void 0)return n;let s=this.resolveValue(e,t,i,a);if(s===void 0){if(a){let d=r.showRowGroup;if(typeof d=="string"){let g=(c=this.rowGroupColsSvc)==null?void 0:c.getColumnIndex(d);if(g!=null&&g>t.level)return null}}return}if(this.cellExpressions&&ws(s)){let d=s.substring(1);s=this.executeValueGetter(d,t.data,e,t)}return s}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get("groupSuppressBlankHeader")||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,o,i){let r=e.colDef,a=e.colId,n=!i&&this.formulaDataSvc;if(n&&n.hasDataSource()&&r.allowFormula===!0){let C=n.getFormula({column:e,rowNode:t});if(ws(C))return C}let s=i&&!o?t.aggData:void 0,l=this.isTreeData;if(l&&(s==null?void 0:s[a])!==void 0)return s[a];let c=t.data,d=r.field,g=r.valueGetter;if(l){if(g)return this.executeValueGetter(g,c,e,t);if(d&&c)return Xo(c,d,e.isFieldContainsDots())}let u=t.groupData;if(u&&a in u)return u[a];if((s==null?void 0:s[a])!==void 0)return s[a];let h=r.showRowGroup,p=typeof h!="string"||!i,f=this.isSsrm,m=f&&o&&!!r.aggFunc;if(g&&!m)return p?this.executeValueGetter(g,c,e,t):void 0;if(f&&t.footer&&t.field&&(h===!0||h===t.field))return Xo(c,t.field,e.isFieldContainsDots());if(d&&c&&!m)return p?Xo(c,d,e.isFieldContainsDots()):void 0}parseValue(e,t,o,i){var n,s;let r=e.getColDef();if(r.allowFormula&&((n=this.beans.formula)!=null&&n.isFormula(o)))return o;let a=r.valueParser;if(M(a)){let l=O(this.gos,{node:t,data:t==null?void 0:t.data,oldValue:i,newValue:o,colDef:r,column:e});return typeof a=="function"?a(l):(s=this.expressionSvc)==null?void 0:s.evaluate(a,l)}return o}getDeleteValue(e,t){var o;return M(e.getColDef().valueParser)&&(o=this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value))!=null?o:null}formatValue(e,t,o,i,r=!0){let{expressionSvc:a}=this.beans,n=null,s,l=e.getColDef();if(i?s=i:r&&(s=l.valueFormatter),s){let c=t?t.data:null,d=O(this.gos,{value:o,node:t,data:c,colDef:l,column:e});typeof s=="function"?n=s(d):n=a?a.evaluate(s,d):null}else if(l.refData)return l.refData[o]||"";return n==null&&Array.isArray(o)&&(n=o.join(", ")),n}setValue(e,t,o,i){var c;let r=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,r)&&(e.data={}),!this.isSetValueSupported(t,e,o,r))return!1;let a=this.getValue(t,e,"data"),n=O(this.gos,{node:e,data:e.data,oldValue:a,newValue:o,colDef:r,column:t}),s=!1;if(e.data){let d=this.handleExternalFormulaChange({column:t,eventSource:i,newValue:o,setterParams:n,rowNode:e});if(d!==null)return d;let g=this.computeValueChange({column:t,rowNode:e,newValue:o,params:n,rowData:e.data,valueSetter:r.valueSetter,field:r.field});s=g!=null?g:!0}let l=this.beans.changeDetectionSvc;l==null||l.beginDeferred();try{if(e.group){let d=(c=this.beans.rowGroupingEditValueSvc)==null?void 0:c.setGroupDataValue(e,t,o,a,i,s||o!==a);if(d!==void 0)return!s&&!d?!1:this.finishValueChange(e,t,n,i,o)}return s?this.finishValueChange(e,t,n,i):!1}finally{l==null||l.endDeferred()}}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,o,i,r){var n;e.resetQuickFilterAggregateText(),(n=this.valueCache)==null||n.onDataChanged();let a=r===void 0?this.getValue(t,e,"data"):r;return this.dispatchCellValueChangedEvent(e,o,a,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,o,a,i),!0}isSetValueSupported(e,t,o,i){var c;let{field:r,valueSetter:a}=i,n=this.beans.formula,s=e.isAllowFormula()&&(n==null?void 0:n.isFormula(o)),l=!!((c=this.formulaDataSvc)!=null&&c.hasDataSource());return Q(r)&&Q(a)&&!(l&&s)?t.group&&(i.groupRowValueSetter||i.groupRowEditable)?!0:(k(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,o)?(k(135),!1):!0}handleExternalFormulaChange(e){let{column:t,rowNode:o,newValue:i,eventSource:r,setterParams:a}=e,n=this.beans.formula,s=this.formulaDataSvc;if(!(s!=null&&s.hasDataSource())||!t.isAllowFormula())return null;let l=n==null?void 0:n.isFormula(i),c=s.getFormula({column:t,rowNode:o});if(l){if(!(c!==i))return!1;s.setFormula({column:t,rowNode:o,formula:i});let g=n==null?void 0:n.resolveValue(t,o),u=t.getColDef();if(M(u.valueSetter)||!Q(u.field)){let h={...a,newValue:g};this.computeValueChange({column:t,rowNode:o,newValue:g,params:h,rowData:o.data,valueSetter:u.valueSetter,field:u.field})}return this.finishValueChange(o,t,a,r)}return c!==void 0&&s.setFormula({column:t,rowNode:o,formula:void 0}),null}computeValueChange(e){var s;let{valueSetter:t,params:o,rowData:i,field:r,column:a,newValue:n}=e;return M(t)?typeof t=="function"?t(o):(s=this.expressionSvc)==null?void 0:s.evaluate(t,o):!!i&&this.setValueUsingField(i,r,n,a.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,o,i){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:o,newRawValue:t.newValue,value:o,source:i})}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,o,i){if(!t)return!1;let r=!1;if(!i)r=e[t]===o,r||(e[t]=o);else{let a=t.split("."),n=e;for(;a.length>0&&n;){let s=a.shift();a.length===0?(r=n[s]===o,r||(n[s]=o)):n=n[s]}}return!r}executeValueGetterWithValueCache(e,t,o,i){let r=o.getColId(),a=this.valueCache.getValue(i,r);if(a!==void 0)return a;let n=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,r,n),n}executeValueGetterWithoutValueCache(e,t,o,i){var n;let r=O(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:s=>this.getValueCallback(i,s)}),a;return typeof e=="function"?a=e(r):a=(n=this.expressionSvc)==null?void 0:n.evaluate(e,r),a}getValueCallback(e,t){let o=this.colModel.getColDefCol(t);return o?this.getValue(o,e,"data"):null}getKeyForNode(e,t){let o=this.getValue(e,t,"data"),i=e.getColDef().keyCreator,r=o;if(i){let a=O(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});r=i(a)}return typeof r=="string"||r==null||(r=String(r),r==="[object Object]"&&k(121)),r}},My={moduleName:"CommunityCore",version:D,beans:[cb,Xm,Hw,fp,sy,MC,ib,Pb,OC,I1,P1,cy,Dy,sb,tb,lb,Vw,vy,Pw,Iw,Wb],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:ev,destroy:tv,isDestroyed:ov,getGridOption:iv,setGridOption:rv,updateGridOptions:Dd,isModuleRegistered:av},dependsOn:[Dw,aC,pC,ug,Bb,IC,Vb,ny,Ey,Gb,M1,L1,B1,Ub,zw,Mw,Ry,jC,G1]};function $a(e){let{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:r}=e,a=(o!=null?o:[]).map((l,c)=>({value:l,relevance:Py(t,l),idx:c}));if(a.sort((l,c)=>l.relevance-c.relevance),i&&(a=a.filter(l=>l.relevance0&&r&&r>0){let c=a[0].relevance*r;a=a.filter(d=>c-d.relevance<0)}let n=[],s=[];for(let l of a)n.push(l.value),s.push(l.idx);return{values:n,indices:s}}function Py(e,t){let o=e.length,i=t.length;if(i===0)return o||0;let r=e.toLocaleLowerCase(),a=t.toLocaleLowerCase(),n;e.length1&&p>1){let v=e[g-2],C=r[g-2],w=t[p-2],y=a[p-2];C===y&&(c++,v===w&&c++)}g`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule: +`,this._paramsCssCache=l}return this._paramsCssCache}},gl=e=>{let t=new Map;for(let i of e)t.set(i.feature,i);let o=[];for(let i of e)(!i.feature||t.get(i.feature)===i)&&o.push(i);return o},c0=e=>{let t=new Set,o=a=>{if(Array.isArray(a))a.forEach(o);else{let n=a==null?void 0:a.googleFont;typeof n=="string"&&t.add(n)}};return Object.values(e._getModeParams()).flatMap(a=>Object.values(a)).forEach(o),Array.from(t).sort()},ul=!1,d0=()=>{if(!ul){ul=!0;for(let e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},g0=async(e,t)=>{let o=`@import url('https://${u0}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap'); +`;to(o,document.head,`googleFont:${e}`,void 0,0,t)},u0="fonts.googleapis.com",hl={changeKey:"listItemHeight",type:"length",defaultValue:24},h0=class extends ve{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){var a;let{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);let o=e.get("themeStyleContainer"),i=typeof ShadowRoot!="undefined",r=i&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(a=typeof o=="function"?o():o)!=null?a:r?t:document.head,!o&&!r&&i&&p0(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(hl),this.initVariables(),this.addDestroyFunc(()=>jw(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){let{theme:o}=this,i=o?o._getCssClass():this.applyLegacyThemeClasses();for(let r of Array.from(e.classList))r.startsWith("ag-theme-")&&e.classList.remove(r);if(i){let r=e.className;e.className=`${r}${r?" ":""}${i}${t!=null&&t.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let o=!1;for(let i of Array.from(t.classList))i.startsWith("ag-theme-")&&(o=!0,e=e?`${e} ${i}`:i);o&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?to(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(hl)}getCSSVariablePixelValue(e){let t=this.lastKnownValues.get(e);if(t!=null)return t;let o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){let t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";let o=t.offsetWidth;return o===fa?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Zt({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let o=this.getMeasurementContainer();t=Zt({tag:"div"});let i=this.setSizeElStyles(t,e);o.appendChild(t),this.sizeEls.set(e,t);let{type:r,noWarn:a}=e;if(r!=="length"&&r!=="border")return t;let n=this.measureSizeEl(e);n==="no-styles"&&!a&&this.varError(i,e.defaultValue);let s=At(this.beans,t,()=>{let l=this.measureSizeEl(e);l==="detached"||l==="no-styles"||(this.lastKnownValues.set(e,l),l!==n&&(n=l,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>s()),t}setSizeElStyles(e,t){let{changeKey:o,type:i}=t,r=_n(o);return i==="border"?(r.endsWith("-width")&&(r=r.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${r}, solid ${fa}px)`)):e.style.width=`var(${r}, ${fa}px)`,r}handleThemeChange(){let{gos:e,theme:t}=this,o=e.get("theme"),i;if(o==="legacy")i=void 0;else{let r=o!=null?o:this.getDefaultTheme();r instanceof Jd?i=r:this.themeError(r)}i!==t&&this.handleNewTheme(i),this.postProcessThemeChange(i,o)}handleNewTheme(e){var a,n;let{gos:t,eRootDiv:o,globalCSS:i}=this,r=this.getAdditionalCss();if(e){jd(this.eStyleContainer,this.cssLayer,this.styleNonce,r);for(let[s,l]of i)to(s,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);i.length=0}this.theme=e,e==null||e._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:r}),Uw(this,(a=e==null?void 0:e._getParamsCss())!=null?a:null,(n=e==null?void 0:e._getParamsClassName())!=null?n:null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(o),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},fa=15538,p0=(e,t,o)=>{let i=60,r=setInterval(()=>{typeof ShadowRoot!="undefined"&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(r)),(e.isConnected||--i<0)&&clearInterval(r)},1e3);o(()=>clearInterval(r))},f0='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}',m0={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:ue,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Ye,rangeSelectionBackgroundColor:Ke(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Ke(.5),rangeHeaderHighlightColor:Zw(.08),rowNumbersSelectedColor:Ke(.5),rowHoverColor:Ke(.08),columnHoverColor:Ke(.05),selectedRowBackgroundColor:Ke(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:ue,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:Ee(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:Ee(.1),iconButtonActiveColor:Ye,iconButtonActiveBackgroundColor:Ke(.28),iconButtonActiveIndicatorColor:Ye,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:Ee(.8),cellEditingBorder:{color:Ye},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:Ee(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:Ee(.13)},selectCellBackgroundColor:Ee(.07),selectCellBorder:{color:Ee(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:ue,filterPanelApplyButtonBackgroundColor:Ye,columnPanelApplyButtonColor:ue,columnPanelApplyButtonBackgroundColor:Ye,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:qt,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:qt,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:Ee(.15),statusBarLabelColor:qt,statusBarLabelFontWeight:500,statusBarValueColor:qt,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},v0=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",eg={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},C0={...eg,cellBatchEditTextColor:"#f3d0b3"},w0=()=>Ge({feature:"batchEditStyle",params:eg,css:v0}),b0=w0(),y0=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",S0={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}};var x0=()=>Ge({feature:"buttonStyle",params:{...S0,buttonBackgroundColor:ue,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Ye}},css:y0}),k0=x0();var R0=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}";var E0=()=>Ge({feature:"columnDropStyle",css:R0}),tg=E0();var F0={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},D0=()=>Ge({feature:"formulaStyle",params:F0}),M0=D0(),P0={warn:(...e)=>{R(e[0],e[1])},error:(...e)=>{W(e[0],e[1])},preInitErr:(...e)=>{Uo(e[0],e[2],e[1])}},I0=()=>l0(P0).withParams(m0).withPart(k0).withPart(tg).withPart(b0).withPart(M0),T0='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',A0=()=>Ge({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ue,checkboxUncheckedBorderColor:Pe(.3),checkboxCheckedBackgroundColor:Ye,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:''},checkboxCheckedShapeColor:ue,checkboxIndeterminateBackgroundColor:Pe(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:''},checkboxIndeterminateShapeColor:ue,radioCheckedShapeImage:{svg:''}},css:T0}),z0=A0();var og=()=>({...fr,...C0,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Pe(.05),rowHoverColor:Ke(.15),selectedRowBackgroundColor:Ke(.2),menuBackgroundColor:Pe(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:qt,columnPanelApplyButtonColor:qt,findMatchColor:ue,findActiveMatchColor:ue,checkboxUncheckedBorderColor:Pe(.4),toggleButtonOffBackgroundColor:Pe(.4),rowBatchEditBackgroundColor:Pe(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"});var L0=()=>({...og(),backgroundColor:"#1f2836"});var O0=()=>Ge({feature:"colorScheme",params:fr,modeParams:{light:fr,dark:og(),"dark-blue":L0()}}),H0=O0();var ig={aggregation:'',arrows:'',asc:'',cancel:'',chart:'',"color-picker":'',columns:'',contracted:'',copy:'',cross:'',csv:'',cut:'',desc:'',down:'',excel:'',expanded:'',eye:'',"eye-slash":'',filter:'',first:'',grip:'',group:'',last:'',left:'',linked:'',loading:'',maximize:'',menu:'',"menu-alt":'',minimize:'',minus:'',next:'',none:'',"not-allowed":'',paste:'',pin:'',pivot:'',plus:'',previous:'',right:'',save:'',settings:'',"small-left":'',"small-right":'',tick:'',"tree-closed":'',"tree-indeterminate":'',"tree-open":'',unlinked:'',up:''},rg={aasc:'',adesc:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"column-arrow":'',edit:'',"filter-add":'',"pinned-bottom":'',"pinned-top":'',"small-down":'',"small-up":'',"un-pin":''},B0=(e={})=>{let t="";for(let o of[...Object.keys(ig),...Object.keys(rg)]){let i=N0(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); } +`}return t},N0=(e,t=1.5)=>{let o=rg[e];if(o)return o;let i=ig[e];if(!i)throw new Error(`Missing icon data for ${e}`);return``+i+""},V0=(e={})=>Ge({feature:"iconSet",css:()=>B0(e)});var G0=V0();var W0=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',q0=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}";var _0={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4};var U0=()=>Ge({feature:"inputStyle",params:{..._0,inputBackgroundColor:ue,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Ye},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Pe(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>W0+q0}),j0=U0();var K0='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}';var $0={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1};var Y0=()=>Ge({feature:"tabStyle",params:{...$0,tabBarBorder:!0,tabBarBackgroundColor:Ee(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ue},css:K0}),Q0=Y0();var Z0=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),J0=()=>I0().withPart(z0).withPart(H0).withPart(G0).withPart(Q0).withPart(j0).withPart(tg).withParams(Z0()),X0=J0();var Ot=(e,t,o,i,r)=>({changeKey:e,type:t,defaultValue:o,noWarn:i,cacheDefault:r}),eb=Ot("cellHorizontalPadding","length",16),tb=Ot("indentationLevel","length",0,!0,!0),ob=Ot("rowGroupIndentSize","length",0),pl=Ot("rowHeight","length",42),fl=Ot("headerHeight","length",48),ma=Ot("rowBorderWidth","border",1),ml=Ot("pinnedRowBorderWidth","border",1),ib=Ot("headerRowBorderWidth","border",1);function rb(e,t){for(let o of t.sort((i,r)=>i.moduleName.localeCompare(r.moduleName))){let i=o.css;i&&e.set(`module-${o.moduleName}`,i)}}var ab=class extends h0{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(pl),this.getSizeEl(fl),this.getSizeEl(ma),this.getSizeEl(ml),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(ml)}getRowBorderWidth(){return this.getCSSVariablePixelValue(ma)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(ib)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(pl)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(fl)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(eb)}getCellPaddingLeft(){let e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(tb),o=this.getCSSVariablePixelValue(ob);return e-1+o*t}getCellPadding(){let e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){let{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;let i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){let e=this.getCSSVariablePixelValue(ma);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&W(t?106:239)}getAdditionalCss(){let e=new Map;return e.set("core",[f0]),rb(e,Array.from(Ch())),e}getDefaultTheme(){return X0}varError(e,t){R(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){W(240,{theme:e})}shadowRootError(){W(293)}},nb=class extends ve{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new Qt}addListener(e,t,o){this.globalSvc.addEventListener(e,t,o)}removeListener(e,t,o){this.globalSvc.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},sb=class extends nb{postConstruct(){let{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function Ua(e,t,o){let i=e.visibleCols.headerGroupRowCount;if(o>=i)return{column:t,headerRowIndex:o};let r=t.getParent();for(;r&&r.getProvidedColumnGroup().getLevel()>o;)r=r.getParent();let a=t.isSpanHeaderHeight();return!r||a&&r.isPadding()?{column:t,headerRowIndex:i}:{column:r,headerRowIndex:r.getProvidedColumnGroup().getLevel()}}var lb=class extends S{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});let t=te(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){var h;let o,{colModel:i,colGroupSvc:r,ctrlsSvc:a}=this.beans;if(typeof e=="string"?(o=i.getCol(e),o||(o=(h=r==null?void 0:r.getColumnGroup(e))!=null?h:null)):o=e,!o)return null;let n=a.getHeaderRowContainerCtrl(),s=n==null?void 0:n.getAllCtrls(),l=U(s||[]).type==="filter",c=Fe(this.beans)-1,d=-1,g=o;for(;g;)d++,g=g.getParent();let u=d;return t&&l&&u===c-1&&u++,u===-1?null:{headerRowIndex:u,column:o}}navigateVertically(e,t){let{focusSvc:o,visibleCols:i}=this.beans,{focusedHeader:r}=o;if(!r)return!1;let{headerRowIndex:a}=r,n=r.column,s=Fe(this.beans),l=this.getHeaderRowType(a),c=i.headerGroupRowCount,{headerRowIndex:d,column:g,headerRowIndexWithoutSpan:u}=e==="UP"?cb(l,n,a):db(n,a,c),h=!1;return d<0&&(d=0,g=n,h=!0),d>=s?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!h&&!g?!1:o.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:g},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,o){let{focusSvc:i,gos:r}=this.beans,a={...i.focusedHeader},n,s;this.currentHeaderRowWithoutSpan!==-1?a.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=a.headerRowIndex,e==="LEFT"!==r.get("enableRtl")?(s="Before",n=this.findHeader(a,s)):(s="After",n=this.findHeader(a,s));let l=r.getCallback("tabToNextHeader");if(t&&l){let c=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:n,direction:s});if(c){let{headerRowIndex:d}=i.focusedHeader||{};d!=null&&d!=a.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return n||!t?i.focusHeaderPosition({headerPosition:n,direction:s,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(a,s,o)}focusNextHeaderRow(e,t,o){let i=this.beans,r=e.headerRowIndex,a=null,n,s=Fe(i),l=this.beans.visibleCols.allCols;if(t==="Before"){if(r<=0)return!1;a=U(l),n=r-1,this.currentHeaderRowWithoutSpan-=1}else a=l[0],n=r+1,this.currentHeaderRowWithoutSpan=s&&(d=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(X(e)){let i=e.getDisplayedLeafColumns();o=t==="Before"?U(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){let{colGroupSvc:o,visibleCols:i}=this.beans,r=e.column;if(r instanceof hi){let l=r.getDisplayedLeafColumns();r=t==="Before"?l[0]:l[l.length-1]}let a=t==="Before"?i.getColBefore(r):i.getColAfter(r);if(!a)return;let n=i.headerGroupRowCount;if(e.headerRowIndex>=n)return{headerRowIndex:e.headerRowIndex,column:a};let s=o==null?void 0:o.getColGroupAtLevel(a,e.headerRowIndex);return s?s.isPadding()&&a.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:a}:{headerRowIndex:e.headerRowIndex,column:s!=null?s:a}:{headerRowIndex:a instanceof no&&a.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:a}}getHeaderRowType(e){let t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function cb(e,t,o){let i=o-1;if(e!=="filter"){let r=t instanceof no&&t.isSpanHeaderHeight(),a=t.getParent();for(;a&&(a.getProvidedColumnGroup().getLevel()>i||r&&a.isPadding());)a=a.getParent();if(a)return r?{column:a,headerRowIndex:a.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:i}:{column:a,headerRowIndex:i,headerRowIndexWithoutSpan:i}}return{column:t,headerRowIndex:i,headerRowIndexWithoutSpan:i}}function db(e,t,o){let i=t+1,r={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof hi){if(i>=o)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:o,headerRowIndexWithoutSpan:i};let n=e.getDisplayedChildren()[0];if(n instanceof hi&&n.isPadding()){let l=n.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(n=l)}r.column=n,n instanceof no&&n.isSpanHeaderHeight()&&(r.headerRowIndex=o,r.headerRowIndexWithoutSpan=i)}return r}var gb=class extends S{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){let e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(of(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;let e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){let{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Y(this.beans),fd)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){let e=Y(this.beans);return this.isDomDataPresentInHierarchy(e,dr,!0)?!0:this.isDomDataPresentInHierarchy(e,gr,!0)}isDomDataPresentInHierarchy(e,t,o){let i=e;for(;i;){let r=Pc(this.gos,i,t);if(r)return r.destroyed&&o?(this.attemptToRecoverFocus(),!1):!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){let{rowIndex:t,rowPinned:o,column:i}=e,r={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},a=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return a&&(r.isFullWidthCell=a.isFullWidth()),r}clearFocusedCell(){if(this.focusedCell==null)return;let e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();let{column:t,rowIndex:o,rowPinned:i,forceBrowserFocus:r=!1,preventScrollOnBrowserFocus:a=!1,sourceEvent:n}=e,s=this.colModel.getCol(t);if(!s){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:lt(i),column:s};let l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:r,preventScrollOnBrowserFocus:a,sourceEvent:n}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:In(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;let{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:r,headerRowIndex:a}=this.focusedHeader;return t===r&&o===a&&i==r.getPinned()}focusHeaderPosition(e){var c;if(this.setFocusRecovered(),Oe(this.beans))return!1;let{direction:t,fromTab:o,allowUserOverride:i,event:r,fromCell:a,rowWithoutSpanValue:n,scroll:s=!0}=e,{headerPosition:l}=e;if(a&&((c=this.filterManager)!=null&&c.isAdvFilterHeaderActive()))return this.focusAdvancedFilter(l);if(i){let d=this.focusedHeader,g=Fe(this.beans);if(o){let u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:l,headerRowCount:g}))}else{let u=this.gos.getCallback("navigateToNextHeader");if(u&&r){let h={key:r.key,previousHeaderPosition:d,nextHeaderPosition:l,headerRowCount:g,event:r},p=u(h);l=p===null?d:p}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:r,fromCell:a,rowWithoutSpanValue:n,scroll:s}):!1}focusHeaderPositionFromUserFunc(e){if(Oe(this.beans))return!1;let{userFunc:t,headerPosition:o,direction:i,event:r}=e,a=this.focusedHeader,n=Fe(this.beans),s=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:a,headerPosition:o,headerRowCount:n});return!!s&&this.focusProvidedHeaderPosition({headerPosition:s,direction:i,event:r})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:o,currentPosition:i,headerPosition:r,headerRowCount:a}=e,s=t({backwards:o==="Before",previousHeaderPosition:i,nextHeaderPosition:r,headerRowCount:a});return s===!0?i:s===!1?null:s}focusProvidedHeaderPosition(e){let{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:r,event:a,scroll:n=!0}=e,{column:s,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:g}=this.beans;if(this.focusedHeader&&Wf(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return c!=null&&c.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:s,event:a});n&&(g==null||g.scrollToColumn(s,o));let u=d.getHeaderRowContainerCtrl(s.getPinned()),h=(u==null?void 0:u.focusHeader(t.headerRowIndex,s,a))||!1;return g&&h&&(r!=null||i)&&(g.currentHeaderRowWithoutSpan=r!=null?r:-1),h}focusFirstHeader(){var o;if((o=this.overlays)!=null&&o.exclusive&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;let t=Ua(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){var i;if((i=this.overlays)!=null&&i.exclusive&&this.focusOverlay(!0))return!0;let t=Fe(this.beans)-1,o=U(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){var t;return(t=this.filterManager)!=null&&t.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===lt(t)}focusOverlay(e){var o,i;let t=((o=this.overlays)==null?void 0:o.isVisible())&&((i=this.overlays.eWrapper)==null?void 0:i.getGui());return!!t&&Xt(t,e)}getDefaultTabToNextGridContainerTarget(e){let{backwards:t,focusableContainers:o}=e,i=t?-1:1,r,a=()=>(r===void 0&&(r=this.getGridBodyTabTarget(t)),r);for(let n=e.nextIndex;n>=0&&n{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){var o;let e=this.ctrlsSvc.get("center");if(!e||(o=this.colAnimation)!=null&&o.isActive())return;let t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){let e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){let e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:En();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},hb=class extends S{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){var i,r;if(this.destroyCalled)return;let{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:(i=e==null?void 0:e.getState())!=null?i:{}}),this.destroyCalled=!0,(r=t.get("gridCtrl"))==null||r.destroyGridUi(),o.destroy(),super.destroy()}},pb=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"];var Ki=new Set(["gridPreDestroyed","fillStart","pasteStart"]),jn=pb.reduce((e,t)=>(e[t]=Gh(t),e),{}),Eo={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function vl(e){return`"${e}"`}var fb=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),mb={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:o})=>{var r;return!!t||!!o?typeof e=="string"&&(r=Eo[e])!=null?r:"CustomEditor":null},cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Eo[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>{var t;return e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"&&(t=Eo[e])!=null?t:"ColumnFilter"},floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{var o;let t=["columnsMenuTab","generalMenuTab"];return(o=e.menuTabs)!=null&&o.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},vb=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:o})=>o?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,o)=>o.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{let o=t.headerValueGetter;return typeof o=="function"||typeof o=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Xe(262);if(t.smallLeft)return Xe(263);if(t.smallRight)return Xe(264)}return null}},sort:{validate:t=>ko(t.sort)||kt(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):Vi(t.sort)}`},initialSort:{validate:t=>ko(t.initialSort)||kt(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):Vi(t.initialSort)}`},sortingOrder:{validate:t=>{let o=t.sortingOrder;if(Array.isArray(o)&&o.length>0){let i=o.filter(r=>!(ko(r)||kt(r)));if(i.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${i.map(r=>typeof r=="string"||r==null?Vi(r):JSON.stringify(r)).join(", ")}]`}else if(!Array.isArray(o)||!o.length)return`sortingOrder must be an array with at least one element, currently it is [${o}]`;return null}},type:{validate:t=>{let o=t.type;return o instanceof Array?o.some(r=>typeof r!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof o=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:o})=>o?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:o,cellSelection:i,suppressRowTransform:r,enableCellSpan:a,rowDragEntireRow:n,enableCellTextSelection:s})=>typeof o=="object"&&(o==null?void 0:o.mode)==="singleRow"&&o!=null&&o.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":r?"colDef.spanRows is not supported with suppressRowTransform.":a?n?"colDef.spanRows is not supported with rowDragEntireRow.":s?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:o={}},i){var n,s;let r=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),a=[];for(let l of(n=t.groupHierarchy)!=null?n:[]){if(typeof l=="object"){(s=i.validation)==null||s.validateColDef(l);continue}!r.has(l)&&!(l in o)&&a.push(vl(l))}if(a.length>0){let l=`The following parts of colDef.groupHierarchy are not recognised: ${a.join(", ")}.`,c=`Choose one of ${[...r].map(vl).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${l} +${c}`}return null}}}),Cb={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},wb=()=>Object.keys(Cb),bb=()=>({objectName:"colDef",allProperties:wb(),docsUrl:"column-properties/",deprecations:fb(),validations:vb()}),yb=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],Sb=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],xb=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],ag=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],kb=["theme","rowSelection"],Rb=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],ng=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],Eb=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],Fb=()=>[...xb,...Sb,...yb,...ag,...Eb,...ng,...Rb,...kb];var Db=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function Ue(e,t,o){return typeof t=="number"||t==null?t==null||t>=o?null:`${e}: value should be greater than or equal to ${o}`:`${e}: value should be a number`}var Mb={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},Pb=()=>{let e={autoSizePadding:{validate({autoSizePadding:o}){return Ue("autoSizePadding",o,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return Ue("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return Ue("cacheOverflowSize",o,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:o=>{let i=o.domLayout,r=["autoHeight","normal","print"];return i&&!r.includes(i)?`domLayout must be one of [${r.join()}], currently it's ${i}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,pinnedTopRowData:i,pinnedBottomRowData:r}){return o&&(i||r)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinnable:i,pinnedTopRowData:r,pinnedBottomRowData:a}){return i&&(r||a)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinned:i,pinnedTopRowData:r,pinnedBottomRowData:a}){return i&&(r||a)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:o,groupHideOpenParents:i,groupDisplayType:r}){return o&&!i&&r!=="multipleColumns"?"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`":null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:o={}},i,r){var a;for(let n of Object.keys(o))(a=r.validation)==null||a.validateColDef(o[n]);return null}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return Xe(262);if(o.smallLeft)return Xe(263);if(o.smallRight)return Xe(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return Ue("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:o=>{if(typeof o.ssrmExpandAllAffectsAllRows=="boolean"){if(o.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(o.ssrmExpandAllAffectsAllRows&&typeof o.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return Ue("keepDetailRowsCount",o,1)}},paginationPageSize:{validate({paginationPageSize:o}){return Ue("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{let i=o.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array. + If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:o}){return Ue("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:o=>{let i=o.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:o}){return Ue("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:o=>{let i=o.sortingOrder;if(Array.isArray(i)&&i.length>0){let r=i.filter(a=>!Me(a));if(r.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${r.map(a=>typeof a=="string"||a==null?Vi(a):JSON.stringify(a))}]`}else if(!Array.isArray(i)||!i.length)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:o=>o.tooltipSwitchShowDelay&&o.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:o=>{var r;let i=(r=o.rowModelType)!=null?r:"clientSide";switch(i){case"clientSide":{let{treeDataChildrenField:a,treeDataParentIdField:n,getDataPath:s,getRowId:l}=o;if(!a&&!n&&!s)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(a){if(s)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!l)return"getRowId callback not provided, tree data with parent id cannot be built.";if(s)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{let a=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:a}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return Ue("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return Ue("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:i}){return o!=null&&o.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o!=null&&o.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:o=>{let i=o.renderingMode,r=["default","legacy"];return i&&!r.includes(i)?`renderingMode must be one of [${r.join()}], currently it's ${i}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:o})=>{if(!o)return null;let i=["fitCellContents","fitGridWidth","fitProvidedWidth"],r=o.type;return r!=="fitCellContents"&&r!=="fitGridWidth"&&r!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${i.map(a=>'"'+a+'"').join(", ")}, currently it's ${r}`:r==="fitProvidedWidth"&&typeof o.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${o.width}`:null}}},t={};for(let o of ng)t[o]={expectedType:"boolean"};for(let o of ag)t[o]={expectedType:"number"};return he(t,e),t},Ib=()=>({objectName:"gridOptions",allProperties:[...Fb(),...Object.values(jn)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:Db(),validations:Pb()}),Tb=0,Ab=0,Cl="__ag_grid_instance",zb=class extends S{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=Ab++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Qt,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;let i=Ki.has(t);if(i&&!e||!i&&e||!Lb(t))return;let r=(a,n)=>{let s=jn[a],l=this.gridOptions[s];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(n))};if(this.gridReadyFired)r(t,o);else if(t==="gridReady"){r(t,o),this.gridReadyFired=!0;for(let a of this.queueEvents)r(a.eventName,a.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:o})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){var t;return(t=this.gridOptions[e])!=null?t:gh[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return I(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addCommon(o)))}updateGridOptions({options:e,force:t,source:o="api"}){let i={id:Tb++,properties:[]},r=[],{gridOptions:a,validation:n}=this;for(let s of Object.keys(e)){let l=wn.applyGlobalGridOption(s,e[s]);n==null||n.warnOnInitialPropertyUpdate(o,s);let c=t||typeof l=="object"&&o==="api",d=a[s];if(c||d!==l){a[s]=l;let g={type:s,currentValue:l,previousValue:d,changeSet:i,source:o};r.push(g)}}this.validateGridOptions(this.gridOptions),i.properties=r.map(s=>s.type);for(let s of r)Ft(this,`Updated property ${s.type} from`,s.previousValue," to ",s.currentValue),this.propEventSvc.dispatchEvent(s)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(let o of Object.keys(e)){let i=e[o];if(i==null||i===!1)continue;let r=t[o];typeof r=="function"&&(r=r(e,this.gridOptions,this.beans)),r&&this.assertModuleRegistered(r,o)}}validateGridOptions(e){var t;this.validateOptions(e,Mb),(t=this.validation)==null||t.processGridOptions(e)}validateColDef(e,t,o){var i,r;(o||!((i=this.beans.dataTypeSvc)!=null&&i.isColPendingInference(t)))&&(this.validateOptions(e,mb),(r=this.validation)==null||r.validateColDef(e))}assertModuleRegistered(e,t){let o=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return o||W(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:bn(),rowModelType:this.get("rowModelType"),isUmd:yn()}}isModuleRegistered(e){return Fa(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[Cl]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){let o=t[Cl];if(I(o))return o===this.instanceId;t=t.parentElement}return!1}};function Lb(e){return!!jn[e]}var Ob=class extends S{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){let{sortSvc:t,rangeSvc:o,gos:i}=this.beans;if(!(xo(i)?e.altKey:!0))o==null||o.handleColumnSelection(this.column,e);else if(this.column.isSortable()){let a=this.column.isMoving(),s=Date.now()-this.lastMovingChanged<50;a||s||t==null||t.progressSortFromEvent(this.column,e)}}};function Hb(e,t){let o={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:o},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:o},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:o},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var Bb=class extends _{constructor(){super(...arguments),this.eFilter=M,this.eFilterButton=M,this.eSortIndicator=M,this.eMenu=M,this.eLabel=M,this.eText=M,this.eColRef=M,this.eSortOrder=M,this.eSortAsc=M,this.eSortDesc=M,this.eSortMixed=M,this.eSortNone=M,this.eSortAbsoluteAsc=M,this.eSortAbsoluteDesc=M,this.isLoadingInnerComponent=!1}refresh(e){var o,i,r;let t=this.params;if(this.params=e,this.workOutTemplate(e,!!((o=this.beans)!=null&&o.sortSvc))!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){let a={...e};he(a,e.innerHeaderComponentParams),(r=(i=this.innerHeaderComponent).refresh)==null||r.call(i,a)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){let{formula:o}=this.beans,i=e.template;return i?i!=null&&i.trim?i.trim():i:Hb(!!(o!=null&&o.active),t)}init(e){var n;this.params=e;let{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:r}=this.beans,a=t==null?void 0:t.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!a),this.setTemplate(this.currentTemplate,a?[a]:void 0),this.eLabel&&((n=this.mouseListener)!=null||(this.mouseListener=this.createManagedBean(new Ob(e.column,this.eLabel)))),o==null||o.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),i==null||i.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(r,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){let o=Hp(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText&&this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){let{displayName:t}=e,o=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=Lo(t))}addInIcon(e,t,o){let i=ye(e,this.beans,o);i&&t.appendChild(i)}workOutShowMenu(){var e;return this.params.enableMenu&&!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonEnabled())}shouldSuppressMenuHide(){var e;return!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonAlwaysShowEnabled())}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){De(this.eMenu),this.eMenu=void 0;return}let{gos:e,eMenu:t,params:o}=this,i=be(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);let r=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=r,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(r)}toggleMenuAlwaysShow(e){var t;(t=this.eMenu)==null||t.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){let{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){var l,c,d;let{params:t,gos:o,beans:i,eMenu:r,eFilterButton:a}=this,n=t.column,s=be(o);if(e&&!s){if((l=i.menuSvc)!=null&&l.isFilterMenuInHeaderEnabled(n))return t.showFilter((c=a!=null?a:r)!=null?c:this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu((d=r!=null?r:a)!=null?d:this.getGui()),!0;return!1}setupSort(){let{sortSvc:e}=this.beans;if(!e)return;let{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));let{eSortIndicator:i,eSortOrder:r,eSortAsc:a,eSortDesc:n,eSortMixed:s,eSortNone:l,eSortAbsoluteAsc:c,eSortAbsoluteDesc:d}=this;i.attachCustomElements(r,a,n,s,l,c,d)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o)}setupColumnRefIndicator(){let{eColRef:e,beans:{editModelSvc:t},params:o}=this;e&&(this.currentRef=o.column.formulaRef,e.textContent=this.currentRef,q(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{let i=t==null?void 0:t.getEditPositions(),r=!!this.currentRef&&!!(i!=null&&i.some(a=>a.column.isAllowFormula()));q(e,r)},cellEditingStopped:()=>{q(e,!1)}}))}setupFilterIcon(){let{eFilter:e,params:t}=this;if(!e)return;let o=()=>{let i=t.column.isFilterActive();q(e,i,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,o,"filterActive")}setupFilterButton(){let{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,i){if(!e)return De(t),!1;let r=this.params.column;return this.addInIcon(i,t,r),this.addManagedListeners(r,{filterChanged:o}),o(),!0}onFilterChangedButton(){let e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){var i,r;let{eFilterButton:t,eMenu:o}=this;return e?(i=t!=null?t:o)!=null?i:this.getGui():(r=o!=null?o:t)!=null?r:this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},Nb=class extends S{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){let{columnGroup:e,beans:t}=this,{ctrlsSvc:o}=t;o.whenReady(this,()=>{let i=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:r=>{r.direction==="horizontal"&&this.updateSticky(r.left)}}),this.addManagedListeners(e,{leftChanged:i,displayedChildrenChanged:i}),this.addManagedEventListeners({columnResized:i}),this.refreshPosition()})}refreshPosition(){let{columnGroup:e,beans:t}=this,o=e.getLeft(),i=e.getActualWidth();if(o==null||i===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=o,this.right=o+i;let r=t.colViewport.getScrollPosition();r!=null&&this.updateSticky(r)}updateSticky(e){let{beans:t,left:o,right:i}=this;if(o==null||i==null){this.setSticky(!1);return}let{gos:r,visibleCols:a}=t,s=r.get("enableRtl")?a.bodyWidth-e:e;this.setSticky(os)}setSticky(e){let{isSticky:t,eLabel:o}=this;t!==e&&(this.isSticky=e,o.classList.toggle("ag-sticky-label",e))}},Vb={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},Gb=class extends _{constructor(){super(Vb),this.agOpened=M,this.agClosed=M,this.agLabel=M,this.isLoadingInnerComponent=!1}init(e){let{userCompFactory:t,touchSvc:o}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),o==null||o.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&R(89)}workOutInnerHeaderGroupComponent(e,t){let o=Np(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){let{agOpened:e,agClosed:t,params:{columnGroup:o},beans:{colGroupSvc:i}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);let r=l=>{if(dt(l))return;let c=!o.isExpanded();i.setColumnGroupOpened(o.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(t,r),this.addTouchAndClickListeners(e,r);let a=l=>{eo(l)};this.addManagedElementListeners(t,{dblclick:a}),this.addManagedElementListeners(e,{dblclick:a}),this.addManagedElementListeners(this.getGui(),{dblclick:r}),this.updateIconVisibility();let n=o.getProvidedColumnGroup(),s=this.updateIconVisibility.bind(this);this.addManagedListeners(n,{expandedChanged:s,expandableChanged:s})}addTouchAndClickListeners(e,t){var o;(o=this.beans.touchSvc)==null||o.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){let{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){let i=o.isExpanded();q(e,i),q(t,!i)}else q(e,!1),q(t,!1)}addInIcon(e,t){let o=ye(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){let{agOpened:t,agClosed:o}=this;q(t,!1),q(o,!1)}}setupLabel(e){var n;let{displayName:t,columnGroup:o}=e,{innerHeaderGroupComponent:i,isLoadingInnerComponent:r}=this,a=i||r;I(t)&&!a&&(this.agLabel.textContent=Lo(t)),(n=o.getColGroupDef())!=null&&n.suppressStickyLabel||this.createManagedBean(new Nb(this.getGui(),o))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},Wb={moduleName:"ColumnHeaderComp",version:P,userComponents:{agColumnHeader:Bb},icons:{menu:"menu",menuAlt:"menu-alt"}},qb={moduleName:"ColumnGroupHeaderComp",version:P,userComponents:{agColumnGroupHeader:Gb},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},_b=class extends S{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&R(92)}createTask(e,t,o,i,r=!1){this.verify();let a=o;i&&this.batchFrameworkComps&&(a="f1");let n={task:e,index:t,createOrder:++this.taskCount,deferred:r};this.addTaskToList(this[a],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;let t=this.scrollGoingDown?1:-1;e.list.sort((o,i)=>o.deferred!==i.deferred?o.deferred?-1:1:o.index!==i.index?t*(i.index-o.index):i.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){let{p1:t,p2:o,f1:i,destroyTasks:r,beans:a}=this,{ctrlsSvc:n,frameworkOverrides:s}=a,l=t.list,c=o.list,d=i.list,g=Date.now(),u=0,h=e<=0,p=n.getScrollFeature();for(;h||u{for(;(h||u{};else if(r.length)m=r.pop();else break;m()}u=Date.now()-g}l.length||c.length||d.length||r.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){let e=this.executeFrame.bind(this,60);pt(this.beans,e)}isQueueEmpty(){return!this.ticking}},Ub={moduleName:"AnimationFrame",version:P,beans:[_b]},jb=class extends S{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return ye(e,this.beans,t==null?void 0:t.column)}},Kb=(e,t,o)=>t||e&&o,$b=class extends S{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Kt())return;let t=(o,i,r)=>{var s,l;let{rowCtrl:a,cellCtrl:n}=e.getControlsForEventTarget((s=r==null?void 0:r.target)!=null?s:null);n!=null&&n.column&&n.dispatchCellContextMenuEvent(r!=null?r:null),(l=this.beans.contextMenuSvc)==null||l.handleContextMenuMouseEvent(void 0,r,a,n)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Kt()||Xi("dblclick"))return!1;let i=Date.now(),r=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,r})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){let{gos:t,sortSvc:o,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;let{params:r,eMenu:a,eFilterButton:n}=e,s=new Vt(e.getGui(),!0);e.addDestroyFunc(()=>s.destroy());let l=e.shouldSuppressMenuHide(),c=l&&I(a)&&r.enableMenu,d=!!(i!=null&&i.isHeaderContextMenuEnabled(r.column)),g=Kb(r.enableMenu,d,be(t)),u=s;c&&(u=new Vt(a,!0),e.addDestroyFunc(()=>u.destroy()));let h=p=>r.showColumnMenuAfterMouseClick(p.touchStart);if(c&&r.enableMenu&&e.addManagedListeners(u,{tap:h}),g&&e.addManagedListeners(s,{longTap:h}),r.enableSorting){let p=f=>{let m=f.touchStart.target;l&&(a!=null&&a.contains(m)||n!=null&&n.contains(m))||o==null||o.progressSort(r.column,!1,"uiColumnSorted")};e.addManagedListeners(s,{tap:p})}if(r.enableFilterButton&&n){let p=new Vt(n,!0);e.addManagedListeners(p,{tap:()=>r.showFilter(n)}),e.addDestroyFunc(()=>p.destroy())}}setupForHeaderGroup(e){var o;let t=e.params;if((o=this.beans.menuSvc)!=null&&o.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){let i=new Vt(t.eGridHeader,!0),r=a=>t.showColumnMenuAfterMouseClick(a.touchStart);e.addManagedListeners(i,{longTap:r}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,o){let i=new Vt(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,o){if(!Kt())return;let i=new Vt(t),r=a=>{ci(this.beans,a.touchEvent)&&o(void 0,a.touchStart,a.touchEvent)};e.addManagedListeners(i,{longTap:r}),e.addDestroyFunc(()=>i.destroy())}},Yb={moduleName:"Touch",version:P,beans:[$b]},Qb=class extends S{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){let o=e===y.UP,i=e===y.DOWN,r=e===y.LEFT,a,n,{pageBounds:s,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:g}=t;if(o||i)g&&d?o?n=0:n=g==="top"?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:n=o?s.getFirstRow():s.getLastRow(),a=t.column;else{let u=l.get("enableRtl");n=t.rowIndex,a=(r!==u?c.allCols:[...c.allCols].reverse()).find(p=>!pe(p)&&this.isCellGoodToFocusOn({rowIndex:n,rowPinned:null,column:p}))}return a?{rowIndex:n,rowPinned:g,column:a}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case y.UP:o=this.getCellAbove(o);break;case y.DOWN:o=this.getCellBelow(o);break;case y.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case y.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,R(8,{key:e});break}o?i=this.isCellGoodToFocusOn(o):i=!0}return o}isCellGoodToFocusOn(e){let t=e.column,o,{pinnedRowModel:i,rowModel:r}=this.beans;switch(e.rowPinned){case"top":o=i==null?void 0:i.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i==null?void 0:i.getPinnedBottomRow(e.rowIndex);break;default:o=r.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!1}getCellToLeft(e){if(!e)return null;let t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;let t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){var i,r;if(!e)return null;let t=(r=(i=this.rowSpanSvc)==null?void 0:i.getCellEnd(e))!=null?r:e,o=qs(this.beans,t,!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){var i,r;if(!e)return null;let t=(r=(i=this.rowSpanSvc)==null?void 0:i.getCellStart(e))!=null?r:e,o=cr(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){var s;let{visibleCols:t,pagination:o}=this.beans,i=t.allCols,r=e.rowIndex,a=e.rowPinned,n=t.getColAfter(e.column);if(!n){n=i[0];let l=qs(this.beans,e,!0);if(Q(l)||!l.rowPinned&&!((s=o==null?void 0:o.isRowInPage(l.rowIndex))==null||s))return null;r=l?l.rowIndex:null,a=l?l.rowPinned:null}return{rowIndex:r,column:n,rowPinned:a}}getNextTabbedCellBackwards(e){var l;let{beans:t}=this,{visibleCols:o,pagination:i}=t,r=o.allCols,a=e.rowIndex,n=e.rowPinned,s=o.getColBefore(e.column);if(!s){s=U(r);let c=cr(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Q(c)||!c.rowPinned&&!((l=i==null?void 0:i.isRowInPage(c.rowIndex))==null||l))return null;a=c?c.rowIndex:null,n=c?c.rowPinned:null}return{rowIndex:a,column:s,rowPinned:n}}isSuppressNavigable(e,t){let{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){let i=e.createColumnFunctionCallbackParams(t);return o(i)}return!1}};function Zb(e){return e.focusSvc.getFocusedCell()}function Jb(e){return e.focusSvc.clearFocusedCell()}function Xb(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})}function e1(e,t){var o,i;return(i=(o=e.navigation)==null?void 0:o.tabToNextCell(!1,t))!=null?i:!1}function t1(e,t){var o,i;return(i=(o=e.navigation)==null?void 0:o.tabToNextCell(!0,t))!=null?i:!1}function o1(e,t,o=!1){var r;let i=(r=e.headerNavigation)==null?void 0:r.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}function oo(e){let t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}var i1=class extends S{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new sg,this.rowValidations=new lg,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;let o=this.getEditRow(e);t?o.delete(t):o.clear(),o.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;let o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){let i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;let o=this.getEditRow(e),i=e.pinnedSibling,r=t&&i&&this.getEditRow(i);if(!o&&!r)return;let a={...e.data},n=(s,l)=>s.forEach(({editorValue:c,pendingValue:d},g)=>{let u=c===void 0?d:c;u!==ae&&(l[g.getColId()]=u)});return o&&n(o,a),r&&n(r,a),a}getEdit(e={},t){var n,s;let{rowNode:o,column:i}=e,r=this.edits;if(this.suspendEdits||r.size===0||!o||!i)return;let a=(n=r.get(o))==null?void 0:n.get(i);if(a)return a;if(t!=null&&t.checkSiblings){let l=o.pinnedSibling;if(l)return(s=r.get(l))==null?void 0:s.get(i)}}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;let t=new Map;return this.edits.forEach((o,i)=>{let r=new Map;o.forEach(({editorState:a,...n},s)=>r.set(s,{...n})),t.set(i,r)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,o)=>{let i=new Map;t.forEach((r,a)=>i.set(a,{...r})),this.edits.set(o,i)})}setEdit(e,t){let o=this.edits;(o.size===0||!o.has(e.rowNode))&&o.set(e.rowNode,new Map);let i=this.getEdit(e),r={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...i,...t};return this.getEditRow(e.rowNode).set(e.column,r),r}clearEditValue(e){var a;let{rowNode:t,column:o}=e;if(!t)return;let i=n=>{n.editorValue=void 0,n.pendingValue=n.sourceValue,n.state="changed"};if(!o){(a=this.getEditRow(t))==null||a.forEach(i);return}let r=this.getEdit(e);r&&i(r)}getState(e){var t;if(!this.suspendEdits)return(t=this.getEdit(e))==null?void 0:t.state}getEditPositions(e){if(this.suspendEdits||(e!=null?e:this.edits).size===0)return[];let t=[];return(e!=null?e:this.edits).forEach((o,i)=>{for(let r of o.keys()){let{editorState:a,...n}=o.get(r);t.push({rowNode:i,column:r,...n})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){var a;if(this.suspendEdits||this.edits.size===0)return!1;let{rowNode:o,column:i}=e,{withOpenEditor:r}=t;if(o){let n=this.getEditRow(o,t);return n?i?r?((a=this.getEdit(e))==null?void 0:a.state)==="editing":n.has(i):n.size!==0?r?Array.from(n.values()).some(({state:s})=>s==="editing"):!0:!1:!1}return r?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){var r;let t=(r=this.getEditRow(e.rowNode))!=null?r:new Map,{rowNode:o,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:ae,sourceValue:this.beans.valueSvc.getValue(i,o,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(o,t)}stop(e,t,o){var i;if(this.hasEdits(e))if(t){let r=(i=this.getEditRow(e.rowNode))==null?void 0:i.get(e.column);r&&(r.pendingValue===ae||r.pendingValue===r.sourceValue)?this.removeEdits(e):r&&o&&(r.editorValue=void 0)}else this.removeEdits(e)}clear(){for(let e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},sg=class{constructor(){this.cellValidations=new Map}getCellValidation(e){var i,r;let{rowNode:t,column:o}=e||{};return(r=(i=this.cellValidations)==null?void 0:i.get(t))==null?void 0:r.get(o)}hasCellValidation(e){return!(e!=null&&e.rowNode)||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){let{rowNode:o,column:i}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(i,t)}clearCellValidation(e){var i;let{rowNode:t,column:o}=e;(i=this.cellValidations.get(t))==null||i.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},lg=class{constructor(){this.rowValidations=new Map}getRowValidation(e){let{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e!=null&&e.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function mr(e,t={}){let{rowIndex:o,rowId:i,rowCtrl:r,rowPinned:a}=t;if(r)return r;let{rowModel:n,rowRenderer:s}=e,{rowNode:l}=t;return l||(i?l=If(e,i,a):o!=null&&(l=n.getRow(o))),l?s.getRowCtrlByNode(l):void 0}function G(e,t={}){var d,g,u,h,p;let{cellCtrl:o,colId:i,columnId:r,column:a}=t;if(o)return o;let n=e.colModel.getCol((d=i!=null?i:r)!=null?d:ja(a)),s=(g=t.rowCtrl)!=null?g:mr(e,t),l=(u=s==null?void 0:s.getCellCtrl(n))!=null?u:void 0;if(l)return l;let c=(h=t.rowNode)!=null?h:s==null?void 0:s.rowNode;if(c)return(p=e.rowRenderer.getCellCtrls([c],[n]))==null?void 0:p[0]}function wl(e){let{editSvc:t}=e;t!=null&&t.isBatchEditing()?(xt(e,{persist:!0}),yt(e)):t==null||t.stopEditing(void 0,{source:"api"})}function r1(e,t,o){let{gos:i,popupSvc:r}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;let a=n=>{let s=n.relatedTarget;if(za(s)===null){wl(t);return}let l=o.some(c=>c.contains(s))&&i.isElementInThisInstance(s);l||(l=!!r&&(r.getActivePopups().some(c=>c.contains(s))||r.isElementWithinCustomPopup(s))),l||wl(t)};for(let n of o)e.addManagedElementListeners(n,{focusout:a})}function ja(e){if(e)return typeof e=="string"?e:e.getColId()}var ae=Symbol("unedited"),a1=(e,t={})=>{var a;let o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),i=new Array(o.length),r=0;for(let n=0,s=o.length;n0&&t.set(o,r)}return t}function io(e,t,o){var k,F,z;let{key:i,event:r,cellStartedEdit:a,silent:n}=o!=null?o:{},{editModelSvc:s,gos:l,userCompFactory:c}=e,d=G(e,t),g=(k=d==null?void 0:d.comp)==null?void 0:k.getCellEditor(),u=dg(e,t,i,a&&!n),h=s==null?void 0:s.getEdit(t),p=(F=u.value)!=null?F:h==null?void 0:h.sourceValue;if(g){s==null||s.setEdit(t,{editorValue:Ao(e,p,!0,t.column),state:"editing"}),(z=g.refresh)==null||z.call(g,u);return}let f=t.column.getColDef(),m=$c(c,f,u);if(!m)return;let{popupFromSelector:v,popupPositionFromSelector:C}=m,w=v!=null?v:!!f.cellEditorPopup,b=C!=null?C:f.cellEditorPopupPosition;if(gg(m.params,r),!d)return;let{rangeFeature:x,rowCtrl:E,comp:D,onEditorAttachedFuncs:T}=d;s==null||s.setEdit(t,{editorValue:Ao(e,p,!0,t.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),d.editCompDetails=m,T.push(()=>x==null?void 0:x.unsetComp()),D==null||D.setEditDetails(m,w,b,l.get("reactiveCustomComponents")),E==null||E.refreshRow({suppressFlash:!0}),l1(e,t,r,p,n)}function l1(e,t,o,i,r){var l;let{editSvc:a,editModelSvc:n}=e,s=n==null?void 0:n.getEdit(t);!r&&(s==null?void 0:s.state)==="editing"&&!((l=s==null?void 0:s.editorState)!=null&&l.cellStartedEditing)&&(a==null||a.dispatchCellEvent(t,o,"cellEditingStarted",{value:i}),n==null||n.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function cg(e,t,o){var a,n,s;let i={editorValueExists:!1};if(Kn(e)){let l=(a=t.getValidationErrors)==null?void 0:a.call(t);if(((n=l==null?void 0:l.length)!=null?n:0)>0)return i}if(o!=null&&o.isCancelling)return i;if(o!=null&&o.isStopping){let l=(s=t==null?void 0:t.isCancelAfterEnd)==null?void 0:s.call(t);if(l)return{...i,isCancelAfterEnd:l}}return{editorValue:t.getValue(),editorValueExists:!0}}function dg(e,t,o,i){var w,b,x,E,D,T,k,F;let{valueSvc:r,gos:a,editSvc:n}=e,s=e.gos.get("enableGroupEdit"),l=G(e,t),c=(b=(w=t.rowNode)==null?void 0:w.rowIndex)!=null?b:void 0,d=n==null?void 0:n.isBatchEditing(),g=e.colModel.getCol(t.column.getId()),{rowNode:u,column:h}=t,p=(x=l.comp)==null?void 0:x.getCellEditor(),f=n==null?void 0:n.getCellDataValue(t),m=f===void 0?p?(E=cg(e,p))==null?void 0:E.editorValue:void 0:f,v=m===ae?(D=r.getValueForDisplay({column:g,node:u,from:"edit"}))==null?void 0:D.value:m,C=s?m:v;return h.isAllowFormula()&&((T=e.formula)!=null&&T.isFormula(C))&&(C=(F=(k=e.formula)==null?void 0:k.normaliseFormula(C,!0))!=null?F:C),O(a,{value:C,eventKey:o!=null?o:null,column:h,colDef:h.getColDef(),rowIndex:c,node:u,data:u.data,cellStartedEdit:!!i,onKeyDown:l==null?void 0:l.onKeyDown.bind(l),stopEditing:z=>{n.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:z}),fi(e,t,{})},eGridCell:l==null?void 0:l.eGui,parseValue:z=>r.parseValue(g,u,z,l==null?void 0:l.value),formatValue:l==null?void 0:l.formatValue.bind(l),validate:()=>{n==null||n.validateEdit()}})}function Ko(e,t){let{editModelSvc:o}=e;o==null||o.getEditMap().forEach((i,r)=>{i.forEach((a,n)=>{!t&&(a.state==="editing"||a.pendingValue===ae)||!Ne(a)&&(a.state!=="editing"||t)&&(o==null||o.removeEdits({rowNode:r,column:n}))})})}function c1(e,t){var c;let o=(c=t.comp)==null?void 0:c.getCellEditor();if(!(o!=null&&o.refresh))return;let{eventKey:i,cellStartedEdit:r}=t.editCompDetails.params,{column:a}=t,n=dg(e,t,i,r),s=a.getColDef(),l=$c(e.userCompFactory,s,n);o.refresh(gg(l.params,i))}function gg(e,t){var o,i;return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes((o=t==null?void 0:t.key)!=null?o:"")||e.suppressPreventDefault:(i=t==null?void 0:t.preventDefault)==null||i.call(t),e}function xt(e,t){var o,i,r,a,n,s;for(let l of(i=(o=e.editModelSvc)==null?void 0:o.getEditPositions())!=null?i:[]){let c=G(e,l);if(!c)continue;let d=(r=c.comp)==null?void 0:r.getCellEditor();if(!d)continue;let{editorValue:g,editorValueExists:u,isCancelAfterEnd:h}=cg(e,d,t);if(h){let{cellStartedEditing:p,cellStoppedEditing:f}=((n=(a=e.editModelSvc)==null?void 0:a.getEdit(l))==null?void 0:n.editorState)||{};(s=e.editModelSvc)==null||s.setEdit(l,{editorState:{isCancelAfterEnd:h,cellStartedEditing:p,cellStoppedEditing:f}})}uo(e,l,g,void 0,!u,t)}}function uo(e,t,o,i,r,a){let{editModelSvc:n,valueSvc:s}=e;if(!n)return;let{rowNode:l,column:c}=t;if(!(l&&c))return;let d=n.getEdit(t);if((d==null?void 0:d.sourceValue)===void 0){let g=d?Ao(e,d.editorValue,!1,c):ae,u={sourceValue:s.getValue(c,l,"data"),pendingValue:g};a!=null&&a.persist&&(u.state="changed"),d=n.setEdit(t,u)}n.setEdit(t,{editorValue:r?Ao(e,d.sourceValue,!0,c):o}),a!=null&&a.persist&&d1(e,t)}function Ao(e,t,o,i){var a;let{formula:r}=e;return i.isAllowFormula()&&(r!=null&&r.isFormula(t))&&(a=r==null?void 0:r.normaliseFormula(t,o))!=null?a:t}function d1(e,t){var n;let{editModelSvc:o}=e,i=o==null?void 0:o.getEdit(t),a={pendingValue:Ao(e,i==null?void 0:i.editorValue,!1,t.column)};!((n=i==null?void 0:i.editorState)!=null&&n.cellStoppedEditing)&&(i==null?void 0:i.state)!=="editing"&&(a.state="changed"),o==null||o.setEdit(t,a)}function yt(e,t,o={}){var i;if(t||(t=(i=e.editModelSvc)==null?void 0:i.getEditPositions()),t)for(let r of t)fi(e,r,o)}function fi(e,t,o,i=G(e,t)){var d,g;let r=e.editModelSvc,a=r==null?void 0:r.getEdit(t),n;if(a&&a.state!=="editing"&&((d=a.editorState)!=null&&d.cellStoppedEditing)?n=a.state:n="changed",!i){a&&(r==null||r.setEdit(t,{state:n}));return}let s=i.comp,l=s==null?void 0:s.getCellEditor();if(s&&!l){if(i==null||i.refreshCell(),a){r==null||r.setEdit(t,{state:n});let u=e.gos.get("enableGroupEdit")?bl(a,o==null?void 0:o.cancel):{valueChanged:!1,newValue:void 0,oldValue:a.sourceValue};yl(e,t,u,o)}return}if(Kn(e)){let u=a&&((g=l==null?void 0:l.getValidationErrors)==null?void 0:g.call(l)),h=r==null?void 0:r.getCellValidationModel();u!=null&&u.length?h==null||h.setCellValidation(t,{errorMessages:u}):h==null||h.clearCellValidation(t)}a&&(r==null||r.setEdit(t,{state:n})),s==null||s.setEditDetails(),s==null||s.refreshEditStyles(!1,!1),i==null||i.refreshCell({force:!0,suppressFlash:!0});let c=r==null?void 0:r.getEdit(t);if(c&&c.state!=="editing"){let u=o==null?void 0:o.cancel,h=e.gos.get("enableGroupEdit")?bl(c,u):g1(c,a,u);yl(e,t,h,o)}}function bl(e,t){let{sourceValue:o,pendingValue:i}=e,r;return!t&&i!==ae&&(r=i),{valueChanged:!t&&Ne(e),newValue:r,oldValue:o,value:o}}function g1(e,t,o){if(o||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let i=e.editorValue;return(i==null||i===ae)&&(i=t==null?void 0:t.pendingValue),i===ae&&(i=void 0),{valueChanged:Ne(e),newValue:i,oldValue:e.sourceValue}}function yl(e,t,o,{silent:i,event:r}={}){let{editSvc:a,editModelSvc:n}=e,s=n==null?void 0:n.getEdit(t),{editorState:l}=s||{},{isCancelBeforeStart:c,cellStartedEditing:d,cellStoppedEditing:g}=l||{};!i&&!c&&d&&!g&&(a==null||a.dispatchCellEvent(t,r,"cellEditingStopped",o),n==null||n.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function u1(e){if(!e)return!1;for(let t=0,o=e.length;t0,H=L?F.join(". "):"";un(z,L),L&&i.announceValue(`${c} ${F}`,"editorValidation"),z instanceof HTMLInputElement?z.setCustomValidity(H):z.classList.toggle("invalid",L)}(F==null?void 0:F.length)>0&&o.setCellValidation({rowNode:T,column:k},{errorMessages:F}),d.add(x.rowCtrl)}if(xt(e,{persist:!1}),a==null||a.setCellValidationModel(o),s){let x=p1(e);a==null||a.setRowValidationModel(x)}for(let x of d.values()){(m=x.rowEditStyleFeature)==null||m.applyRowStyles();for(let E of x.getAllCellCtrls())(v=E.tooltipFeature)==null||v.refreshTooltip(!0),(C=E.editorTooltipFeature)==null||C.refreshTooltip(!0),(b=(w=E.editStyleFeature)==null?void 0:w.applyCellStyles)==null||b.call(w)}}var p1=e=>{var r,a,n;let t=new lg,o=e.gos.get("getFullRowEditValidationErrors"),i=(r=e.editModelSvc)==null?void 0:r.getEditMap();if(!i)return t;for(let s of i.keys()){let l=i.get(s);if(!l)continue;let c=[],{rowIndex:d,rowPinned:g}=s;for(let h of l.keys()){let p=l.get(h);if(!p)continue;let{editorValue:f,pendingValue:m,sourceValue:v}=p,C=(a=f!=null?f:m===ae?void 0:m)!=null?a:v;c.push({column:h,colId:h.getColId(),rowIndex:d,rowPinned:g,oldValue:v,newValue:C})}let u=(n=o==null?void 0:o({editorsState:c}))!=null?n:[];u.length>0&&t.setRowValidation({rowNode:s},{errorMessages:u})}return t};function f1(e){var i;Rt(e,!0);let t=(i=e.editModelSvc)==null?void 0:i.getCellValidationModel().getCellValidationMap();if(!t)return null;let o=[];return t.forEach((r,a)=>{r.forEach(({errorMessages:n},s)=>{o.push({column:s,rowIndex:a.rowIndex,rowPinned:a.rowPinned,messages:n!=null?n:null})})}),o}function Pr(e){return!!(e.rowPinned&&e.pinnedSibling)}function Re(e,t,o,i){let r=t==="top";if(!o)return Re(e,t,r?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){let l=r?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Re(e,t,o,r?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let a=!1,n=!1,s=[];return e.forEachPinnedRow(t,l=>{if(l===o&&!a){a=!0,s.push(l);return}if(a&&l===i){n=!0,s.push(l);return}a&&!n&&s.push(l)}),s}function m1(e,t,o,{rowNode:i,column:r},a){return O(e.gos,{type:o,node:i,data:i.data,value:a,column:r,colDef:r.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function v1(e,t=!1){return e===y.DELETE?!0:!t&&e===y.BACKSPACE?Xc():!1}var C1=class extends S{constructor(e,t,o,i){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){var o;let t=e.key;if(!(t===y.ENTER&&pe(this.cellCtrl.column)&&((o=this.beans.rowNumbersSvc)!=null&&o.handleKeyDownOnCell(this.cellCtrl.cellPosition,e))))switch(t){case y.ENTER:this.onEnterKeyDown(e);break;case y.F2:this.onF2KeyDown(e);break;case y.ESCAPE:this.onEscapeKeyDown(e);break;case y.TAB:this.onTabKeyDown(e);break;case y.BACKSPACE:case y.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case y.DOWN:case y.UP:case y.RIGHT:case y.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var r,a;let{cellCtrl:o,beans:i}=this;if(!((r=i.editSvc)!=null&&r.isEditing(o,{withOpenEditor:!0}))){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{let n=o.getFocusedCellPosition();(a=i.navigation)==null||a.navigateToNextCell(e,t,n,!0)}e.preventDefault()}}onShiftRangeSelect(e){let{rangeSvc:t,navigation:o}=this.beans;if(!t)return;let i=t.extendLatestRangeInDirection(e);i&&(e.key===y.LEFT||e.key===y.RIGHT?o==null||o.ensureColumnVisible(i.column):o==null||o.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var c;let{cellCtrl:o,beans:i,rowNode:r}=this,{gos:a,rangeSvc:n,eventSvc:s,editSvc:l}=i;if(s.dispatchEvent({type:"keyShortcutChangedCellStart"}),v1(e,a.get("enableCellEditingOnBackspace"))&&!(l!=null&&l.isEditing(o,{withOpenEditor:!0}))){if(n&>(a))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){let d=i.valueSvc.getDeleteValue(o.column,r);r.setDataValue(o.column,d,"cellClear")}}else l!=null&&l.isEditing(o,{withOpenEditor:!0})||(c=i.editSvc)==null||c.startEditing(o,{startedEdit:!0,event:t});s.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){var c;let{cellCtrl:t,beans:o}=this,{editSvc:i,navigation:r}=o,a=i==null?void 0:i.isEditing(t,{withOpenEditor:!0}),n=t.rowNode,s=i==null?void 0:i.isRowEditing(n,{withOpenEditor:!0}),l=d=>{(i==null?void 0:i.startEditing(d,{startedEdit:!0,event:e,source:"edit"}))&&e.preventDefault()};if(a||s){if(this.isCtrlEnter(e)){i==null||i.applyBulkEdit(t,((c=o==null?void 0:o.rangeSvc)==null?void 0:c.getCellRanges())||[]);return}if(Rt(o),(i==null?void 0:i.checkNavWithValidation(void 0,e))==="block-stop")return;i!=null&&i.isEditing(t,{withOpenEditor:!0})?i==null||i.stopEditing(t,{event:e,source:"edit"}):s&&!t.isCellEditable()?i==null||i.stopEditing({rowNode:n},{event:e,source:"edit"}):l(t)}else if(o.gos.get("enterNavigatesVertically")){let d=e.shiftKey?y.UP:y.DOWN;r==null||r.navigateToNextCell(null,d,t.cellPosition,!1)}else{if(i!=null&&i.hasValidationErrors())return;i!=null&&i.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===y.ENTER}onF2KeyDown(e){let{cellCtrl:t,beans:{editSvc:o}}=this;o!=null&&o.isEditing()&&(Rt(this.beans),(o==null?void 0:o.checkNavWithValidation(void 0,e))==="block-stop")||o==null||o.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){let{cellCtrl:t,beans:{editSvc:o}}=this;(o==null?void 0:o.checkNavWithValidation(t,e))==="block-stop"&&o.revertSingleCellEdit(t),setTimeout(()=>{o==null||o.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){var n;let o=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:r}=this;if(o||i!=null&&i.isEditing(r,{withOpenEditor:!0}))return;if(e.key===y.SPACE)this.onSpaceKeyDown(e);else if(i!=null&&i.isCellEditable(r,"ui")){if(i!=null&&i.hasValidationErrors()&&!(i!=null&&i.hasValidationErrors(r)))return;i==null||i.startEditing(r,{startedEdit:!0,event:e,source:"api",editable:!0});let s=r.editCompDetails;!((n=s==null?void 0:s.params)!=null&&n.suppressPreventDefault)&&e.preventDefault()}}onSpaceKeyDown(e){var r;let{gos:t,editSvc:o}=this.beans,{rowNode:i}=this.cellCtrl;!(o!=null&&o.isEditing(this.cellCtrl,{withOpenEditor:!0}))&&Ut(t)&&((r=this.beans.selectionSvc)==null||r.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}},w1=class extends S{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!dt(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){var f,m,v;if((f=this.beans.touchSvc)!=null&&f.handleCellDoubleClick(this,e))return;let{eventSvc:t,rangeSvc:o,editSvc:i,editModelSvc:r,frameworkOverrides:a,gos:n}=this.beans,s=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:g}=l,u=_i(n,c,g,e);o&&s&&!u&&o.getCellRangeCount(d)>1&&o.intersectLastRange(!0);let h=l.createEvent(e,"cellClicked");h.isEventHandlingSuppressed=u,t.dispatchEvent(h);let p=c.getColDef();if(p.onCellClicked&&window.setTimeout(()=>{a.wrapOutgoing(()=>{p.onCellClicked(h)})},0),!u&&(r==null?void 0:r.getState(l))!=="editing"){let C=i==null?void 0:i.isEditing(),w=i==null?void 0:i.isRangeSelectionEnabledWhileEditing(),b=(m=r==null?void 0:r.getCellValidationModel().getCellValidationMap().size)!=null?m:0,x=(v=r==null?void 0:r.getRowValidationModel().getRowValidationMap().size)!=null?v:0;if(C&&(w||b>0||x>0))return;i!=null&&i.shouldStartEditing(l,e)?i==null||i.startEditing(l,{event:e}):i!=null&&i.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?i==null||i.stopEditing(l,{event:e,source:"edit"}):i==null||i.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){var u,h;let{column:t,beans:o,cellCtrl:i}=this,{eventSvc:r,frameworkOverrides:a,editSvc:n,editModelSvc:s,gos:l}=o,c=_i(l,i.column,i.rowNode,e),d=t.getColDef(),g=i.createEvent(e,"cellDoubleClicked");if(g.isEventHandlingSuppressed=c,r.dispatchEvent(g),typeof d.onCellDoubleClicked=="function"&&window.setTimeout(()=>{a.wrapOutgoing(()=>{d.onCellDoubleClicked(g)})},0),!c&&n!=null&&n.shouldStartEditing(i,e)&&(s==null?void 0:s.getState(i))!=="editing"){let p=n==null?void 0:n.isEditing(),f=n==null?void 0:n.isRangeSelectionEnabledWhileEditing(),m=(u=s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)!=null?u:0,v=(h=s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)!=null?h:0;if(p&&(f||m>0||v>0))return;n==null||n.startEditing(i,{event:e})}}onMouseDown(e){var w;let{shiftKey:t}=e,o=e.target,{cellCtrl:i,beans:r}=this,{eventSvc:a,rangeSvc:n,rowNumbersSvc:s,focusSvc:l,gos:c,editSvc:d}=r,{column:g,rowNode:u,cellPosition:h}=i,p=_i(c,g,u,e),f=()=>{let b=i.createEvent(e,"cellMouseDown");b.isEventHandlingSuppressed=p,a.dispatchEvent(b)};if(p){f();return}if(this.isRightClickInExistingRange(e))return;let m=n&&!n.isEmpty(),v=this.containsWidget(o),C=pe(g);if(!(s&&C&&!s.handleMouseDownOnCell(h,e))){if(!t||!m){let b=d==null?void 0:d.isEditing(i),E=c.get("enableCellTextSelection")&&e.defaultPrevented,D=(Lt()||E)&&!b&&!Yo(o)&&!v;i.focusCell(D,e)}if(t&&m&&!l.isCellFocused(h)){e.preventDefault();let b=l.getFocusedCell();if(b){let{column:x,rowIndex:E,rowPinned:D}=b,T=!!((w=d==null?void 0:d.isRangeSelectionEnabledWhileEditing)!=null&&w.call(d));d!=null&&d.isEditing(b)&&!T&&(d==null||d.stopEditing(b)),T||l.setFocusedCell({column:x,rowIndex:E,rowPinned:D,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}v||(n==null||n.handleCellMouseDown(e,h),f())}}isRightClickInExistingRange(e){let{rangeSvc:t}=this.beans;if(t){let o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=Wh(this.beans,e);if(o&&i)return!0}return!1}containsWidget(e){return _t(e,"ag-selection-checkbox",3)||_t(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o==null||o.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o==null||o.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;let t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}},b1=class extends S{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;let e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){let t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){let t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){let e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){let e=this.getColSpanningList();Tt(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;let e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){let{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(o===1)i.push(e);else{let r=e,a=e.getPinned();for(let n=0;r&&nthis.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,n),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),(c=this.positionFeature)==null||c.init(),(d=this.customStyleFeature)==null||d.setComp(e),(g=this.editStyleFeature)==null||g.setComp(e),(u=this.tooltipFeature)==null||u.refreshTooltip(),(h=this.keyboardListener)==null||h.init(),(p=this.rangeFeature)==null||p.setComp(e),(f=this.rowResizeFeature)==null||f.refreshRowResizer();let s=a?this.isCellEditable():void 0,l=!s&&this.hasEdit&&((m=this.editSvc)==null?void 0:m.isEditing(this,{withOpenEditor:!0}));if(s||l?(v=this.editSvc)==null||v.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:s}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(let C of this.onCompAttachedFuncs)C();this.onCompAttachedFuncs=[]}}checkFormulaError(){var t;let e=!!((t=this.beans.formula)!=null&&t.getFormulaError(this.column,this.rowNode));this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){var o,i;this.isAutoHeight=(i=(o=this.beans.rowAutoHeight)==null?void 0:o.setupCellAutoHeight(this,e,t))!=null?i:!1}getCellAriaRole(){var e;return(e=this.column.getColDef().cellAriaRole)!=null?e:"gridcell"}isCellRenderer(){let e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){var e;return(e=this.valueFormatted)!=null?e:this.value}getDeferLoadingCellRenderer(){var l,c;let{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:i,eventSvc:r}=e,a=t.getColDef(),n=this.createCellRendererParams();n.deferRender=!0;let s=Ps(o,a,n);if((c=(l=i.getGridBodyCtrl())==null?void 0:l.scrollFeature)!=null&&c.isScrolling()){let d,g=new $(h=>{d=h}),[u]=this.addManagedListeners(r,{bodyScrollEnd:()=>{d(),u()}});return{loadingComp:s,onReady:g}}return{loadingComp:s,onReady:$.resolve()}}showValue(e,t){var g,u,h,p;let{beans:o,column:i,rowNode:r,rangeFeature:a}=this,{userCompFactory:n}=o,s=this.getValueToDisplay(),l,c=r.stub&&((g=r.groupData)==null?void 0:g[i.getId()])==null,d=i.getColDef();if(c||this.isCellRenderer()){let f=this.createCellRendererParams();!c||pe(i)?l=Ms(n,d,f):l=Ps(n,d,f)}if(!l&&!c&&((u=o.findSvc)!=null&&u.isMatch(r,i))){let f=this.createCellRendererParams();l=Ms(n,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},f)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(r,{checkSiblings:!0})){let f=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:s});f&&(f.compDetails?l=f.compDetails:f.valueToDisplay&&(s=f.valueToDisplay))}this.comp.setRenderDetails(l,s,e),(h=this.customRowDragComp)==null||h.refreshVisibility(),!t&&a&&pt(o,()=>a==null?void 0:a.refreshRangeStyleAndHandle()),(p=this.rowResizeFeature)==null||p.refreshRowResizer()}setupControlComps(){let e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){let e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer",o="";return t&&(o=" ag-allow-overflow"),`${e}${o}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&Pr(this.rowNode))&&!!e}isCheckboxSelection(e){let{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=or(t),r=zt(this.column);return o==="custom"&&i!=="selectionColumn"&&r?!1:e.checkboxSelection||r&&typeof t=="object"&&So(t)}refreshShouldDestroy(){let e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),r=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||r}onPopupEditorClosed(e){let{editSvc:t}=this.beans;if(!(t!=null&&t.isEditing(this,{withOpenEditor:!0})))return;let o=e instanceof KeyboardEvent,i=e instanceof MouseEvent,r=o&&e.key===y.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?"ui":"api",cancel:r,event:o||i?e:void 0}),r&&this.focusCell(!0,e)}stopEditing(e=!1){var o;let{editSvc:t}=this.beans;return(o=t==null?void 0:t.stopEditing(this,{cancel:e,source:t!=null&&t.isBatchEditing()?"ui":"api"}))!=null?o:!1}createCellRendererParams(){let{value:e,valueFormatted:t,column:o,rowNode:i,comp:r,eGui:a,beans:{valueSvc:n,gos:s,editSvc:l}}=this;return O(s,{value:e,valueFormatted:t,getValue:()=>n.getValueForDisplay({column:o,node:i,from:"edit"}).value,setValue:d=>(l==null?void 0:l.setDataValue({rowNode:i,column:o},d))||i.setDataValue(o,d),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:a,eParentOfValue:r.getParentOfValue(),registerRowDragger:(d,g,u,h)=>this.registerRowDragger(d,g,h),setTooltip:(d,g)=>{var u;s.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,g),(u=this.tooltipFeature)==null||u.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){var t;if(this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){let{editSvc:o,comp:i}=this;!(i!=null&&i.getCellEditor())&&o.isEditing(this,{withOpenEditor:!0})&&o.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(e){var b,x;let{editStyleFeature:t,customStyleFeature:o,rowCtrl:{rowEditStyleFeature:i},beans:{cellFlashSvc:r,filterManager:a},column:n,comp:s,suppressRefreshCell:l,tooltipFeature:c}=this;if(l)return;let{field:d,valueGetter:g,showRowGroup:u,enableCellChangeFlash:h}=n.getColDef(),p=d==null&&g==null&&u==null,f=(b=e==null?void 0:e.newData)!=null?b:!1,m=p||e&&(e.force||f),v=!!s,C=this.updateAndFormatValue(v),w=m||C;if(v){if(w){this.showValue(!!f,!1);let E=a==null?void 0:a.isSuppressFlashingCellsBecauseFiltering();!(e!=null&&e.suppressFlash)&&!E&&h&&(r==null||r.flashCell(this)),(x=t==null?void 0:t.applyCellStyles)==null||x.call(t),o==null||o.applyUserStyles(),o==null||o.applyClassesFromColDef(),i==null||i.applyRowStyles(),this.checkFormulaError()}c==null||c.refreshTooltip(),o==null||o.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){var t;return(t=this.callValueFormatter(e))!=null?t:e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){let t=this.value,o=this.valueFormatted,{value:i,valueFormatted:r}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=i,this.valueFormatted=r,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){let o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){let t=this.eGui;Jt(this.beans.gos,t,dr,this),e.addDestroyFunc(()=>Jt(this.beans.gos,t,dr,null))}createEvent(e,t){let{rowNode:o,column:i,value:r,beans:a}=this;return m1(a,e,t,{rowNode:o,column:i},r)}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var o;(o=this.mouseListener)==null||o.onMouseEvent(e,t)}getColSpanningList(){var e,t;return(t=(e=this.positionFeature)==null?void 0:e.getColSpanningList())!=null?t:[]}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{comp:e,column:t,beans:o}=this;pd(e,t,o.visibleCols)}refreshAriaColIndex(){let e=this.beans.visibleCols.getAriaColIndex(this.column);nc(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){let{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){var i;let o=(i=this.editSvc)==null?void 0:i.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){let{beans:{editSvc:t,focusSvc:o},comp:i}=this;if(!i||t!=null&&t.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;let r=()=>{if(!this.isAlive())return;let a=i.getFocusableElement();this.isCellFocused()&&a.focus({preventScroll:!0})};if(e){setTimeout(r,0);return}r()}onRowIndexChanged(){var e,t;this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),(e=this.rangeFeature)==null||e.onCellSelectionChanged(),(t=this.rowResizeFeature)==null||t.refreshRowResizer()}onSuppressCellFocusChanged(e){let t=this.eGui;t&&we(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;let e=this.column.isFirstRightPinned();this.comp.toggleCss(R1,e)}onLastLeftPinnedChanged(){if(!this.comp)return;let e=this.column.isLastLeftPinned();this.comp.toggleCss(E1,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){let e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){var e;this.restoreFocus(!0),this.onCellFocused((e=this.focusEventWhileNotReady)!=null?e:void 0)}onCellFocused(e){var r,a;let{beans:t}=this;if(pi(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}let o=this.isCellFocused(),i=(a=(r=t.editSvc)==null?void 0:r.isEditing(this))!=null?a:!1;if(this.comp.toggleCss(k1,o),o&&(e!=null&&e.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let n=this.comp.getFocusableElement();if(i){let l=$t(n,null,!0);l.length&&(n=l[0])}let s=e?e.preventScrollOnBrowserFocus:!0;n.focus({preventScroll:s}),Uu(t,n)}o&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),o&&e&&this.rowCtrl.announceDescription()}createCellPosition(){let{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:lt(t),column:this.column}}applyStaticCssClasses(){let{comp:e}=this;e.toggleCss(y1,!0),e.toggleCss(F1,!0);let t=this.column.isAutoHeight()==!0;e.toggleCss(S1,t),e.toggleCss(x1,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e,t;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),(e=this.editSvc)!=null&&e.isEditing(this)?(t=this.editSvc)==null||t.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){let e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(D1,e)}dispatchCellContextMenuEvent(e){let t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(o)})},0)}getCellRenderer(){var e,t;return(t=(e=this.comp)==null?void 0:e.getCellRenderer())!=null?t:null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){var e,t;return(t=(e=this.eGui)==null?void 0:e.contains(Y(this.beans)))!=null?t:!1}createSelectionCheckbox(){var t;let e=(t=this.beans.selectionSvc)==null?void 0:t.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){let e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,o){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}let i=this.createRowDragComp(e,t,o);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}),i.refreshVisibility())}createRowDragComp(e,t,o){var r;let i=(r=this.beans.rowDragSvc)==null?void 0:r.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){for(let e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!pe(this.column)||!this.eGui)return;let{ariaRowIndex:e}=this.rowCtrl;e!=null&&ai(this.eGui,e)}getRootElement(){return this.eGui}};function $n(e,t,o,i,r,a){if(o==null&&t==null)return;let n={},s={},l=(c,d)=>{for(let g of c.split(" "))g.trim()!=""&&d(g)};if(o){let c=Object.keys(o);for(let d=0;d{h?n[p]=!0:s[p]=!0})}}if(t&&a)for(let c of Object.keys(t))l(c,d=>{n[d]||(s[d]=!0)});a&&Object.keys(s).forEach(a),Object.keys(n).forEach(r)}function Sl(e){if(e.group)return e.level;let t=e.parent;return t?t.level+1:0}var P1=class extends S{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){let o=this.gos,i=n=>{if(typeof n=="string")e.push(n);else if(Array.isArray(n))for(let s of n)e.push(s)},r=o.get("rowClass");r&&i(r);let a=o.getCallback("getRowClass");if(a){let n={data:t.data,node:t,rowIndex:t.rowIndex},s=a(n);i(s)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){let{gos:i,expressionSvc:r}=this.beans,a=O(i,{data:e.data,node:e,rowIndex:e.rowIndex});$n(r,void 0,i.get("rowClassRules"),a,t,o)}processStylesFromGridOptions(e){let t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle"),r;if(i){let a={data:e.data,node:e,rowIndex:e.rowIndex};r=i(a)}if(r||o)return Object.assign({},o,r)}},I1=0,vr=class extends S{constructor(e,t,o,i,r){var a,n,s;super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=r,this.focusEventWhileNotReady=null,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=(n=(a=t.pagination)==null?void 0:a.getCurrentPage())!=null?n:0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+I1++,this.rowId=$o(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Sl(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=(s=t.editSvc)==null?void 0:s.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=$o(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){let{context:r,rowRenderer:a}=this.beans;i=bi(this,r,i);let n={rowComp:e,element:t,containerType:o,compBean:i};this.allRowGuis.push(n),this.updateGui(o,n),this.initialiseRowComp(n);let s=this.rowNode,l=this.rowType==="FullWidthLoading"||s.stub,c=!s.data&&this.beans.rowModel.getType()==="infinite";!l&&!c&&!s.rowPinned&&a.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){let t=e?"none":"";for(let o of this.allRowGuis)o.element.style.display=t}initialiseRowComp(e){let t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),Ut(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);let o=e.rowComp,i=this.getInitialRowClasses(e.containerType);for(let r of i)o.toggleCss(r,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&ka(e.element,!!this.rowNode.expanded),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),Jt(t,e.element,gr,this),e.compBean.addDestroyFunc(()=>Jt(t,e.element,gr,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){let t=$o(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(Ea(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Ea(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var i;let t=(i=this.beans.rowDragSvc)==null?void 0:i.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;let o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(r=>r!==o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){let t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(o=>{var i;return(i=o==null?void 0:o.rowComp)==null?void 0:i.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){let e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;let t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){let{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,r=!!e||!i.isPinningLeft(),a=!!t,n=!!o||!i.isPinningRight();return r&&a&&n}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){let{rowNode:e,gos:t,beans:{colModel:o}}=this,i=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),r=this.isNodeFullWidthCell(),a=t.get("masterDetail")&&e.detail,n=o.isPivotMode(),s=zc(t,e,n);i?this.rowType="FullWidthLoading":a?this.rowType="FullWidthDetail":r?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;let{animationFrameSvc:o}=this.beans;if(!(o!=null&&o.active)||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){var o;if(!((o=this.beans.rowSpanSvc)!=null&&o.isCellSpanning(e,this.rowNode)))return new Fo(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){var t;return!((t=this.beans.rowSpanSvc)!=null&&t.isCellSpanning(e.column,this.rowNode))}createCellCtrls(e,t,o=null){let i={list:[],map:{}},r=(c,d,g)=>{g!=null?i.list.splice(g,0,d):i.list.push(d),i.map[c]=d},a=[];for(let c of t){let d=c.getInstanceId(),g=e.map[d];g&&!this.isCorrectCtrlForSpan(g)&&(g.destroy(),g=void 0),g||(g=this.getNewCellCtrl(c)),g&&r(d,g)}for(let c of e.list){let d=c.column.getInstanceId();if(i.map[d]!=null)continue;!this.isCellEligibleToBeRemoved(c,o)?a.push([d,c]):c.destroy()}if(a.length)for(let[c,d]of a){let g=i.list.findIndex(h=>h.column.getLeft()>d.column.getLeft()),u=g===-1?void 0:Math.max(g-1,0);r(c,d,u)}let{focusSvc:n,visibleCols:s}=this.beans,l=n.getFocusedCell();if(l&&l.column.getPinned()==o){let c=l.column.getInstanceId();if(!i.map[c]&&s.allCols.includes(l.column)){let g=this.createFocusedCellCtrl();if(g){let u=i.list.findIndex(p=>p.column.getLeft()>g.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);r(c,g,h)}}}return i}createFocusedCellCtrl(){let{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;let i=t==null?void 0:t.getCellSpan(o.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(let t of this.allRowGuis){let o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){let e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);let i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");let r=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}}isCellEligibleToBeRemoved(e,t){let{column:r}=e;if(r.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;let{visibleCols:a,editSvc:n}=this.beans,s=n==null?void 0:n.isEditing(e),l=e.isCellFocused();return s||l?!(a.allCols.indexOf(r)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||se(this.gos,"print")}listenOnDomOrder(e){let t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;let t=I(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),r=o.isPinningRight();if(t){let{slideInAnimation:a}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){a.fullWidth=!0;return}a.center=!0,a.left=i,a.right=r}else{let{fadeInAnimation:a}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){a.fullWidth=!0;return}a.center=!0,a.left=i,a.right=r}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){let e=(n,s)=>n?n.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(n.element,s).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),i=e(this.leftGui,"left"),r=e(this.rightGui,"right");return t&&o&&i&&r}addListeners(){var s;let{beans:e,gos:t,rowNode:o}=this,{expansionSvc:i,eventSvc:r,context:a,rowSpanSvc:n}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...(s=i==null?void 0:i.getRowExpandedListeners(this))!=null?s:{}}),o.detail&&this.addManagedListeners(o.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(o,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(r,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),n&&this.addManagedListeners(n,{spannedCellsUpdated:({pinned:l})=>{l&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,a),this.tooltipFeature=this.destroyBean(this.tooltipFeature,a),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,a)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(let c of this.allRowGuis)this.addRowDraggerToRow(c);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,a)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(let e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(let t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(let e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(let o of this.getAllCellCtrls())o.refreshCell(e);for(let o of this.allRowGuis)this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){var e;this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),(e=this.rowEditStyleFeature)==null||e.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.beans.rowDropHighlightSvc,t=(e==null?void 0:e.row)===this.rowNode?e.position:"none",o=t==="above",i=t==="inside",r=t==="below",a=t!=="none",n=o||r,s=this.rowNode.uiLevel,l=n&&s>0,c=l?s.toString():"0";for(let d of this.allRowGuis){let g=d.rowComp;g.toggleCss("ag-row-highlight-above",o),g.toggleCss("ag-row-highlight-inside",i),g.toggleCss("ag-row-highlight-below",r),g.toggleCss("ag-row-highlight-indent",l),a?d.element.style.setProperty("--ag-row-highlight-level",c):d.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){let e=this.rowNode.dragging;for(let t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:lt(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){var g;let t=this.findFullWidthInfoForEvent(e);if(!t)return;let{rowGui:o,column:i}=t;if(!(o.element===e.target))return;let n=this.rowNode,{focusSvc:s,navigation:l}=this.beans,c=s.getFocusedCell(),d={rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:(g=c==null?void 0:c.column)!=null?g:i};l==null||l.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){var s;if(e.defaultPrevented||dt(e))return;let t=this.allRowGuis.find(l=>l.element.contains(e.target)),o=t?t.element:null,i=o===e.target,r=Y(this.beans),a=!1;o&&r&&(a=o.contains(r)&&r.classList.contains("ag-cell"));let n=null;!i&&!a&&(n=so(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!n)&&((s=this.beans.navigation)==null||s.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;let e=(t=this.allRowGuis.find(o=>Ie(o.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){let t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(let o of this.allRowGuis)we(o.element,"tabindex",t)}setupFocus(){var e;this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused((e=this.focusEventWhileNotReady)!=null?e:void 0))}restoreFullWidthFocus(e=!1){let{focusSvc:t,editSvc:o}=this.beans;if(o!=null&&o.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;let i=this.getFullWidthRowGuiForFocus();if(!i)return;let r=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&i.element.focus({preventScroll:!0})};if(e){setTimeout(r,0);return}r()}getFullWidthRowGuiForFocus(e){var r;if(this.fullWidthGui)return this.fullWidthGui;let t=this.beans.focusSvc.getFocusedCell(),o=this.beans.colModel.getCol((r=e==null?void 0:e.column)!=null?r:t==null?void 0:t.column);if(!o)return;let i=o==null?void 0:o.pinned;return i==="right"?this.rightGui:i==="left"?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,o=>{o.element.classList.toggle("ag-full-width-focus",t&&o===e)})}onFullWidthRowFocused(e){let{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}let i=this.getFullWidthRowGuiForFocus(e);if(!i){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(i,!0),this.focusEventWhileNotReady=null,e!=null&&e.forceBrowserFocus&&i.element.focus({preventScroll:!0})}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){let o={list:[],map:{}};for(let i of e.list)i!==t&&(o.list.push(i),o.map[i.column.getInstanceId()]=i);return o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){let{rowNode:o}=this;return O(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){let o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){if(dt(e))return;let t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;let t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){let{visibleCols:t}=this.beans;switch(e==null?void 0:e.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=_t(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;let{rangeSvc:t,focusSvc:o}=this.beans;t==null||t.removeAllCellRanges();let i=this.findFullWidthInfoForEvent(e);if(!i)return;let{rowGui:r,column:a}=i,n=r.element,s=e.target,l=this.rowNode,c=e.defaultPrevented||Lt();n&&n.contains(s)&&Yo(s)&&(c=!1),o.setFocusedCell({rowIndex:l.rowIndex,column:a,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){let{gos:t,rowNode:o}=this;if(this.isFullWidth()){let r=this.findFullWidthRowGui(e.target);return xm(t,r==null?void 0:r.rowComp.getFullWidthCellRendererParams(),o,e)}let i=Nn(t,e.target);return i!=null&&_i(t,i.column,o,e)}onRowClick(e){if(dt(e)||this.lastMouseDownOnDragger)return;let o=this.isSuppressMouseEvent(e),{eventSvc:i,selectionSvc:r}=this.beans,a=this.createRowEventWithSource("rowClicked",e);a.isEventHandlingSuppressed=o,i.dispatchEvent(a),!o&&(r==null||r.handleSelectionEvent(e,this.rowNode,"rowClicked"))}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){let{gos:o,rowNode:i}=this,r=O(o,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(n,s,l,c)=>this.addFullWidthRowDragging(n,s,l,c),setTooltip:(n,s)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(n,s)}}),a=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return qp(a,r);case"FullWidthGroup":{let{value:n,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return r.value=n,r.valueFormatted=s,Wp(a,r)}case"FullWidthLoading":return Gp(a,r);default:return Vp(a,r)}}setupFullWidthRowTooltip(e,t){var o;this.fullWidthGui&&(this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){let{rowDragSvc:r,context:a}=this.beans;if(!r||!this.isFullWidth())return;let n=r.createRowDragComp(()=>o,this.rowNode,void 0,e,t,i);this.createBean(n,a),this.addDestroyFunc(()=>{this.destroyBean(n,a)})}onUiLevelChanged(){let e=Sl(this.rowNode);if(this.rowLevel!=e){let t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;for(let i of this.allRowGuis)i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(o,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){let e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(let o of this.allRowGuis)o.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(let o of this.allRowGuis)o.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){var t;let e=[];if((t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(let o of e)for(let i of this.allRowGuis)i.rowComp.toggleCss(o,!0)}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{for(let o of this.allRowGuis)o.rowComp.toggleCss(t,!0)},t=>{for(let o of this.allRowGuis)o.rowComp.toggleCss(t,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){var s,l;let t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,beans:r}=this,a=[];a.push("ag-row"),a.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&a.push("ag-opacity-zero"),a.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(a.push("ag-row-pinned"),(s=r.pinnedRowModel)!=null&&s.isManual()&&a.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&a.push("ag-row-pinned-source"),i.isSelected()&&a.push("ag-row-selected"),i.footer&&a.push("ag-row-footer"),a.push("ag-row-level-"+this.rowLevel),i.stub&&a.push("ag-row-loading"),o&&a.push("ag-full-width-row"),(l=r.expansionSvc)==null||l.addExpandedCss(a,i),i.dragging&&a.push("ag-row-dragging");let{rowStyleSvc:n}=r;return n&&(n.processClassesFromGridOptions(a,i),n.preProcessRowClassRules(a,i)),a.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&a.push("ag-row-first"),this.isLastRowOnPage()&&a.push("ag-row-last"),o&&(t==="left"&&a.push("ag-cell-last-left-pinned"),t==="right"&&a.push("ag-cell-first-right-pinned")),a}processStylesFromGridOptions(){var e,t;return(t=(e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))!=null?t:this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,o=>{(o===this.centerGui||o===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;let{element:t,compBean:o}=e,{rowNode:i,beans:r,gos:a}=this;o.addManagedListeners(t,{pointerenter:n=>{n.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:n=>{n.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(i,{mouseEnter:()=>{var n;!((n=r.dragSvc)!=null&&n.dragging)&&!a.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){let t=e?[e]:this.allRowGuis.map(o=>o.element);for(let o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){let t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),i)}forEachGui(e,t){if(e)t(e);else for(let o of this.allRowGuis)t(o)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;let t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),r=Mc(this.gos)?Dt(this.beans,this.rowNode).height:void 0,a=r?`${Math.min(o,r)-2}px`:void 0;this.forEachGui(e,n=>{n.element.style.height=`${t}px`,a&&n.element.style.setProperty("--ag-line-height",a)})}destroyFirstPass(e=!1){var i;this.active=!1;let{rowNode:t}=this;if(!e&&yo(this.gos)&&!t.sticky)if(t.rowTop!=null){let a=this.roundRowTopToBounds(t.rowTop);this.setRowTop(a)}else for(let a of this.allRowGuis)a.rowComp.toggleCss("ag-opacity-zero",!0);(i=this.fullWidthGui)!=null&&i.element.contains(Y(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);let o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;let e=t=>{for(let o of t.list)o.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){var t,o;let e=(o=(t=this.beans.pagination)==null?void 0:t.getCurrentPage())!=null?o:0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;let o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&I(e)){let t=this.applyPaginationOffset(e),r=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(r)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";let t=this.rowNode,o;if(t.sticky)o=t.stickyRowTop;else{let i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,r=this.applyPaginationOffset(i);o=t.isRowPinned()?r:this.beans.rowContainerHeight.getRealPixelPosition(r)}return o+"px"}setRowTopStyle(e){for(let t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let o=null;for(let i of this.getAllCellCtrls())i.column==e&&(o=i);if(o!=null||t)return o;for(let i of this.getAllCellCtrls())(i==null?void 0:i.getColSpanningList().indexOf(e))>=0&&(o=i);return o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var a,n,s,l;let t=this.rowNode.getRowIndexString();if(t===null)return;let o=((n=(a=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:a.getRowCount())!=null?n:0)+((l=(s=this.beans.filterManager)==null?void 0:s.getHeaderRowCount())!=null?l:0),i=this.rowNode.rowIndex%2===0,r=this.ariaRowIndex=o+this.rowNode.rowIndex+1;this.forEachGui(e,c=>{c.rowComp.setRowIndex(t),c.rowComp.toggleCss("ag-row-even",i),c.rowComp.toggleCss("ag-row-odd",!i),ai(c.element,r)})}},T1=class extends S{constructor(){super(),this.beanName="navigation",this.onPageDown=xs(this.onPageDown,100),this.onPageUp=xs(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){let o=e.key,i=e.altKey,r=e.ctrlKey||e.metaKey,a=!!this.beans.rangeSvc&&e.shiftKey,n=Iv(this.gos,e),s=!1;switch(o){case y.PAGE_HOME:case y.PAGE_END:!r&&!i&&(this.onHomeOrEndKey(o),s=!0);break;case y.LEFT:case y.RIGHT:case y.UP:case y.DOWN:if(!n)return!1;r&&!i&&!a&&(this.onCtrlUpDownLeftRight(o,n),s=!0);break;case y.PAGE_DOWN:case y.PAGE_UP:!r&&!i&&(s=this.handlePageUpDown(o,n,t));break}return s&&e.preventDefault(),s}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===y.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:o,focusIndex:i,focusColumn:r,isAsync:a,rowPinned:n}){let{scrollFeature:s}=this.gridBodyCon;I(o)&&!o.isPinned()&&s.ensureColumnVisible(o),I(e)&&s.ensureIndexVisible(e,t),a||s.ensureIndexVisible(i);let{focusSvc:l}=this.beans;l.setFocusedCell({rowIndex:i,column:r,rowPinned:n,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:i,rowPinned:n,column:r})}onPageDown(e){let t=this.beans,o=va(t),i=this.getViewportHeight(),{pageBounds:r,rowModel:a,rowAutoHeight:n}=t,s=r.getPixelOffset(),l=o.top+i,c=a.getRowIndexAtPixel(l+s);n!=null&&n.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){let t=this.beans,o=va(t),{pageBounds:i,rowModel:r,rowAutoHeight:a}=t,n=i.getPixelOffset(),s=o.top,l=r.getRowIndexAtPixel(s+n);a!=null&&a.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){let{pageBounds:i,rowModel:r}=this.beans,a=this.getViewportHeight(),n=i.getFirstRow(),s=i.getLastRow(),l=i.getPixelOffset(),c=r.getRow(e.rowIndex),d=o?(c==null?void 0:c.rowHeight)-a-l:a-l,g=(c==null?void 0:c.rowTop)+d,u=r.getRowIndexAtPixel(g+l);if(u===e.rowIndex){let p=o?-1:1;t=u=e.rowIndex+p}let h;o?(h="bottom",us&&(u=s),t>s&&(t=s)),this.isRowTallerThanView(r.getRow(u))&&(t=u,h="top"),this.navigateTo({scrollIndex:t,scrollType:h,scrollColumn:null,focusIndex:u,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{let i=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){var c;let o=t?-1:1,i=this.getViewportHeight(),{pageBounds:r,rowModel:a}=this.beans,n=r.getLastRow(),s=0,l=e.rowIndex;for(;l>=0&&l<=n;){let d=a.getRow(l);if(d){let g=(c=d.rowHeight)!=null?c:0;if(s+g>i)break;s+=g}l+=o}return Math.max(0,Math.min(l,n))}getViewportHeight(){let e=this.beans,t=va(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth(),i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;let t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!o)return;let i=this.getNormalisedPosition(o),{rowIndex:r,rowPinned:a,column:n}=i!=null?i:o,s=n;this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:s,focusIndex:r,focusColumn:s,rowPinned:a})}onHomeOrEndKey(e){let t=e===y.PAGE_HOME,{visibleCols:o,pageBounds:i,rowModel:r}=this.beans,a=o.allCols,n=t?i.getFirstRow():i.getLastRow(),s=r.getRow(n);if(!s)return;let l=(t?a:[...a].reverse()).find(c=>!c.isSuppressNavigable(s)&&!pe(c));l&&this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:l,focusIndex:n,focusColumn:l})}onTabKeyDown(e,t){let o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),r=this.beans,{ctrlsSvc:a,pageBounds:n,focusSvc:s,gos:l}=r;if(i!==!1){i?t.preventDefault():i===null&&a.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){let{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?c===0:c===n.getFirstRow())&&(l.get("headerHeight")===0||Oe(r)?Io(r,!0,!0):(t.preventDefault(),s.focusPreviousFromFirstCell(t)))}else e instanceof Fo&&e.focusCell(!0),(s.focusOverlay(!1)||Io(r,o))&&t.preventDefault()}tabToNextCell(e,t){let o=this.beans,{focusSvc:i,rowRenderer:r}=o,a=i.getFocusedCell();if(!a)return!1;let n=po(o,a);return!n&&(n=r.getRowByPosition(a),!(n!=null&&n.isFullWidth()))?!1:!!this.tabToNextCellCommon(n,e,t,"api")}tabToNextCellCommon(e,t,o,i="ui"){var l;let{editSvc:r,focusSvc:a}=this.beans,n,s=e instanceof Fo?e:(l=e.getAllCellCtrls())==null?void 0:l[0];return r!=null&&r.isEditing()?n=r==null?void 0:r.moveToNextCell(s,t,o,i):n=this.moveToNextCellNotEditing(e,t,o),n===null?n:n||!!a.focusedHeader}moveToNextCellNotEditing(e,t,o){let i=this.beans.visibleCols.allCols,r;if(e instanceof vr){if(r={...e.getRowPosition(),column:t?i[0]:U(i)},this.gos.get("embedFullWidthRows")&&o){let n=e.findFullWidthInfoForEvent(o);n&&(r.column=n.column)}}else r=e.getFocusedCellPosition();let a=this.findNextCellToFocusOn(r,{backwards:t,startEditing:!1});if(a===!1)return null;if(a instanceof Fo)a.focusCell(!0);else if(a)return this.tryToFocusFullWidthRow(a,t);return I(a)}findNextCellToFocusOn(e,{backwards:t,startEditing:o,skipToNextEditableCell:i}){let r=e,a=this.beans,{cellNavigation:n,gos:s,focusSvc:l,rowRenderer:c}=a;for(;;){e!==r&&(e=r),t||(r=this.getLastCellOfColSpan(r)),r=n.getNextTabbedCell(r,t);let d=s.getCallback("tabToNextCell");if(I(d)){let p=d({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:r||null});if(p===!0)r=e;else{if(p===!1)return!1;r={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!r)return null;if(r.rowIndex<0){let h=Fe(a);return l.focusHeaderPosition({headerPosition:{headerRowIndex:h+r.rowIndex,column:r.column},fromCell:!0}),null}let g=s.get("editType")==="fullRow";if(o&&(!g||i)&&!this.isCellEditable(r))continue;this.ensureCellVisible(r);let u=po(a,r);if(!u){let h=c.getRowByPosition(r);if(!h||!h.isFullWidth()||o)continue;return{...h.getRowPosition(),column:r==null?void 0:r.column}}if(!n.isSuppressNavigable(u.column,u.rowNode))return u.setFocusedCellPosition(r),this.setRangeToCellIfSupported(r),u}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){let{pinnedRowModel:o,rowModel:i}=this.beans;return t==="top"?o==null?void 0:o.getPinnedTopRow(e):t==="bottom"?o==null?void 0:o.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){var g;let r=o,a=!1,n=this.beans,{cellNavigation:s,focusSvc:l,gos:c}=n;for(;r&&(r===o||!this.isValidNavigateCell(r));)c.get("enableRtl")?t===y.LEFT&&(r=this.getLastCellOfColSpan(r)):t===y.RIGHT&&(r=this.getLastCellOfColSpan(r)),r=s.getNextCellToFocus(t,r),a=Q(r);if(a&&e&&e.key===y.UP&&(r={rowIndex:-1,rowPinned:null,column:o.column}),i){let u=c.getCallback("navigateToNextCell");if(I(u)){let p=u({key:t,previousCellPosition:o,nextCellPosition:r||null,event:e});I(p)?r={rowPinned:p.rowPinned,rowIndex:p.rowIndex,column:p.column}:r=null}}if(!r)return;if(r.rowIndex<0){let u=Fe(n);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+r.rowIndex,column:(g=r.column)!=null?g:o.column},event:e||void 0,fromCell:!0});return}let d=this.getNormalisedPosition(r);d?this.focusPosition(d):this.tryToFocusFullWidthRow(r)}getNormalisedPosition(e){var i;if(!!((i=this.beans.spannedRowRenderer)!=null&&i.getCellByPosition(e)))return e;this.ensureCellVisible(e);let o=po(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){let{visibleCols:o,rowRenderer:i,focusSvc:r,eventSvc:a}=this.beans,n=o.allCols,s=i.getRowByPosition(e);if(!(s!=null&&s.isFullWidth()))return!1;let l=r.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?U(n):n[0])};this.focusPosition(c);let d=t==null?l!=null&&Mf(c,l):t;return a.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){let{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){var t;pe(e.column)||(t=this.beans.rangeSvc)==null||t.setRangeToCell(e)}isValidNavigateCell(e){return!!tt(this.beans,e)}getLastCellOfColSpan(e){let t=po(this.beans,e);if(!t)return e;let o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:U(o),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=Ic(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&(o==null?void 0:o.sticky),{scrollFeature:r}=this.gridBodyCon;!i&&Q(e.rowPinned)&&r.ensureIndexVisible(e.rowIndex),e.column.isPinned()||r.ensureColumnVisible(e.column)}ensureColumnVisible(e){let t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function va(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var A1={moduleName:"KeyboardNavigation",version:P,beans:[T1,Qb,lb],apiFunctions:{getFocusedCell:Zb,clearFocusedCell:Jb,setFocusedCell:Xb,setFocusedHeader:o1,tabToNextCell:e1,tabToPreviousCell:t1}},z1=class extends S{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){var t,o,i,r,a;this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:(t=e==null?void 0:e.animate)!=null?t:!1,newData:(o=e==null?void 0:e.newData)!=null?o:!1,newPage:(i=e==null?void 0:e.newPage)!=null?i:!1,newPageSize:(r=e==null?void 0:e.newPageSize)!=null?r:!1,keepRenderedRows:(a=e==null?void 0:e.keepRenderedRows)!=null?a:!1})}calculatePages(){let{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},L1=class extends S{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){var e,t;return(t=(e=this.topRowBounds)==null?void 0:e.rowIndex)!=null?t:-1}getLastRow(){var e,t;return(t=(e=this.bottomRowBounds)==null?void 0:e.rowIndex)!=null?t:-1}getCurrentPageHeight(){let{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){var r;let{topRowBounds:e,bottomRowBounds:t}=this,o=(r=e==null?void 0:e.rowTop)!=null?r:0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:i}}calculateBounds(e,t){let{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;let r=o.getRowBounds(t);r&&(r.rowIndex=t),this.bottomRowBounds=r,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){var t,o;let e=(o=(t=this.topRowBounds)==null?void 0:t.rowTop)!=null?o:0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},O1=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",H1=class extends S{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){let e=this.getWidth(),t=e>0;for(let o of this.elements)o&&(q(o,t),Je(o,e))}},B1=class extends S{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});let e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){let{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=se(e,"print"),r=i?0:t.getColsLeftWidth(),a=i?0:t.getDisplayedColumnsRightWidth();r!=this.leftWidth&&(this.leftWidth=r,o.dispatchEvent({type:"leftPinnedWidthChanged"})),a!=this.rightWidth&&(this.rightWidth=a,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){let e=this.gridBodyCtrl.eBodyViewport,t=si(e);if(t<=50)return;let o=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:r,hasLockedPinned:a}=o,n=r;!n.length&&!a||(i&&(n=i({columns:n,viewportWidth:t})),n!=null&&n.length&&(n=n.filter(s=>!pe(s)),this.setColsPinned(n,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new H1(e,t)}setColsPinned(e,t,o){let{colModel:i,colAnimation:r,visibleCols:a,gos:n}=this.beans;if(!i.cols||!(e!=null&&e.length))return;if(se(n,"print")){R(37);return}r==null||r.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null;let l=[];for(let c of e){if(!c)continue;let d=i.getCol(c);d&&d.getPinned()!==s&&(this.setColPinned(d,s),l.push(d))}l.length&&(a.refresh(o),Vd(this.eventSvc,l,o)),r==null||r.finish()}initCol(e){let{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){let{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;let o=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;let r=()=>{let a=o?this.leftWidth:this.rightWidth;if(a==null)return;let n=a==0,s=e.hidden!==n,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth(),g=t.verticalScrollShowing&&(l&&o||!l&&i)?a+c:a;e.comp.setPinnedContainerWidth(`${g}px`),e.comp.setDisplayed(!n),s&&(e.hidden=n,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:r,rightPinnedWidthChanged:r,scrollVisibilityChanged:r,scrollbarWidthChanged:r})}getHeaderResizeDiff(e,t){if(t.getPinned()){let{leftWidth:i,rightWidth:r}=this,a=si(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+r+e>a)if(a>i+r)e=a-i-r;else return 0}return e}getPinnedColumnsOverflowingViewport(e){var h,p;let t=(h=this.rightWidth)!=null?h:0,o=(p=this.leftWidth)!=null?p:0,i=t+o,r=!1;if(i0;){if(l0){let f=n[c++];if(f.colDef.lockPinned){r=!0;continue}u-=f.getActualWidth(),g.push(f)}}return{columns:g,hasLockedPinned:r}}},N1={moduleName:"PinnedColumn",version:P,beans:[B1],css:[O1]},V1=class extends ve{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=re(this,this.updateAnnouncement.bind(this),200)}postConstruct(){let e=this.beans,t=te(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),rc(o,"polite"),Du(o,"additions text"),Fu(o,!0),e.eRootDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}\u200B`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(ne(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},G1=class extends V1{},W1={moduleName:"Aria",version:P,beans:[G1]},q1=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",xl="ag-delay-render",_1=class extends S{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(xl)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;let{renderStatus:t,ctrlsSvc:o}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}o.getGridBodyCtrl().eGridBody.classList.remove(xl),this.alreadyRevealed=!0}},U1={moduleName:"ColumnDelayRender",version:P,beans:[_1],css:[q1]},Ir=class extends _{constructor(){super()}},j1={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},K1=class extends Ir{constructor(){super(...arguments),this.eExportingIcon=M,this.eExportingText=M}init(e){var r,a;let{beans:t}=this;this.setTemplate(j1);let o=ye("overlayExporting",t,null);o&&this.eExportingIcon.appendChild(o);let i=(a=(r=e.exporting)==null?void 0:r.overlayText)!=null?a:this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}},$1={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},Y1=class extends Ir{constructor(){super(...arguments),this.eLoadingIcon=M,this.eLoadingText=M}init(e){var r,a,n;let{beans:t,gos:o}=this,i=lt((r=o.get("overlayLoadingTemplate"))==null?void 0:r.trim());if(this.setTemplate(i!=null?i:$1),!i){let s=ye("overlayLoading",t,null);s&&this.eLoadingIcon.appendChild(s);let l=(n=(a=e.loading)==null?void 0:a.overlayText)!=null?n:this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=l,t.ariaAnnounce.announceValue(l,"overlay")}}},Q1={tag:"span",cls:"ag-overlay-no-matching-rows-center"},Z1=class extends Ir{init(e){var i,r;let{beans:t}=this;this.setTemplate(Q1);let o=(r=(i=e.noMatchingRows)==null?void 0:i.overlayText)!=null?r:this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}},J1={tag:"span",cls:"ag-overlay-no-rows-center"},X1=class extends Ir{init(e){var r,a,n;let{beans:t,gos:o}=this,i=lt((r=o.get("overlayNoRowsTemplate"))==null?void 0:r.trim());if(this.setTemplate(i!=null?i:J1),!i){let s=(n=(a=e.noRows)==null?void 0:a.overlayText)!=null?n:this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}}};function ey(e){var t;(t=e.overlays)==null||t.showLoadingOverlay()}function ty(e){var t;(t=e.overlays)==null||t.showNoRowsOverlay()}function oy(e){var t;(t=e.overlays)==null||t.hideOverlay()}var iy=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",ry={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},ug=class extends _{constructor(){super(ry),this.eOverlayWrapper=M,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(iy)}handleKeyDown(e){if(e.key!==y.TAB||e.defaultPrevented||dt(e))return;let{beans:t,eOverlayWrapper:o}=this;if(o&&so(t,o,!1,e.shiftKey))return;let r=!1;e.shiftKey?r=t.focusSvc.focusGridView({column:U(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):r=Io(t,!1),r&&e.preventDefault()}updateLayoutClasses(e,t){let o=this.eOverlayWrapper;if(!o)return;let i=o.classList,{AUTO_HEIGHT:r,NORMAL:a,PRINT:n}=He;i.toggle(r,t.autoHeight),i.toggle(a,t.normal),i.toggle(n,t.print)}postConstruct(){this.createManagedBean(new Bn(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){var o;let t=(o=this.eOverlayWrapper)==null?void 0:o.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=o,!e)return this.refreshWrapperPadding(),$.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),o&&this.isGridFocused()){let i=Y(this.beans);i&&!cn(this.beans)&&(this.elToFocusAfter=i)}return e.then(i=>{let r=this.eOverlayWrapper;if(!r){this.destroyBean(i);return}if(this.activePromise!==e){this.activeOverlay!==i&&(this.destroyBean(i),i=null);return}this.activePromise=null,i&&(this.activeOverlay!==i&&(r.appendChild(i.getGui()),this.activeOverlay=i),o&&this.isGridFocused()&&Xt(r))}),e}refreshWrapperPadding(){var o;if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}let e=!!this.activeOverlay||!!this.activePromise,t=0;e&&!this.overlayExclusive&&(t=((o=this.beans.ctrlsSvc.get("gridHeaderCtrl"))==null?void 0:o.headerHeight)||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){var i;this.activePromise=null;let e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);let o=this.eOverlayWrapper;o&&ne(o),(i=t==null?void 0:t.focus)==null||i.call(t,{preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){let e=Y(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},ay={selector:"AG-OVERLAY-WRAPPER",component:ug},ny=["refresh"],Si=e=>({name:e,optionalMethods:ny}),Gt={id:"agLoadingOverlay",overlayType:"loading",comp:Si("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{let t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},mo={id:"agNoRowsOverlay",overlayType:"noRows",comp:Si("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},Yn={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:Si("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},Cr={id:"agExportingOverlay",overlayType:"exporting",comp:Si("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},$i={id:"activeOverlay",comp:Si("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},sy=e=>{var t;return e?(t={agLoadingOverlay:Gt,agNoRowsOverlay:mo,agNoMatchingRowsOverlay:Yn,agExportingOverlay:Cr}[e])!=null?t:$i:null},ly=e=>e?{loading:Gt,noRows:mo,noMatchingRows:Yn,exporting:Cr}[e]:null,cy=class extends S{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){let e=this.gos;this.showInitialOverlay=ee(e);let t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[o,i,r,a]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),i()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=o,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],n=>{var s;return this.onPropChange(new Set((s=n.changeSet)==null?void 0:s.properties))})}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;let e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(Gt))return;let t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(Gt)}showNoRowsOverlay(){this.showInitialOverlay=!1;let e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(mo)||(this.userForcedNoRows=!0,this.doShowOverlay(mo))}async showExportOverlay(e){let{gos:t,beans:o}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(Cr)||this.userForcedNoRows&&this.currentDef===mo){e();return}let i=this.getDesiredDefWithOverride(Cr);if(!i){e();return}this.exportsInProgress++,this.focusedCell=o.focusSvc.getFocusedCell(),await this.doShowOverlay(i),await new Promise(a=>setTimeout(()=>a()));let r=Date.now();try{e()}finally{let a=Date.now()-r,n=Math.max(0,300-a),s=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),Lf(o,this.focusedCell),this.focusedCell=null)};n>0?setTimeout(()=>s(),n):s()}}hideOverlay(){let e=this.gos;this.showInitialOverlay=!1;let t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){R(99);return}if(e.get("activeOverlay")){R(296);return}if(this.currentDef===Yn){R(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==mo&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return ay}getOverlayWrapperCompClass(){return ug}onPropChange(e){var r,a,n;let t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;let o=this.currentDef,i=(r=this.eWrapper)==null?void 0:r.activeOverlay;if(i&&o){let s=e.has("activeOverlayParams");if(o===$i)s&&((a=i.refresh)==null||a.call(i,this.makeCompParams(!0)));else{let l=o.paramsKey;(e.has("overlayComponentParams")||l&&e.has(l))&&((n=i.refresh)==null||n.call(i,this.makeCompParams(!1,l,o.overlayType)))}}}updateOverlay(e){let t=this.eWrapper;if(!t)return this.currentDef=null,!1;let o=this.getDesiredDefWithOverride(),i=this.currentDef,r=o===$i&&e;return o!==i?o?(this.doShowOverlay(o),!0):(this.disableInitialOverlay(),this.doHideOverlay()):r&&o?(t.hideOverlay(),this.doShowOverlay(o),!0):(o||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){let{gos:t}=this,o=sy(t.get("activeOverlay"));return o||(o=e!=null?e:this.getOverlayDef(),o&&this.isDisabled(o)&&(o=null)),o}getOverlayDef(){let{gos:e,beans:t}=this,{rowModel:o}=t,i=e.get("loading");if(i!==void 0){if(this.disableInitialOverlay(),i)return Gt}else if(this.showInitialOverlay){if(!this.isDisabled(Gt)&&(!e.get("columnDefs")||!e.get("rowData")))return Gt;this.disableInitialOverlay()}else this.disableInitialOverlay();let a=o.getOverlayType();return ly(a)}disableInitialOverlay(){var e;this.showInitialOverlay=!1,(e=this.newColumnsLoadedCleanup)==null||e.call(this),this.newColumnsLoadedCleanup=null}doShowOverlay(e){var d,g;let{gos:t,beans:o}=this,{userCompFactory:i}=o;this.currentDef=e;let r=e!==$i,a=!!e.exclusive;this.exclusive=a;let n;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(n=e.paramsKey);let s;r&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(s=i.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),s!=null||(s=i.getCompDetailsFromGridOptions(e.comp,r?e.id:void 0,this.makeCompParams(!r,n,e.overlayType),!1));let l=(d=s==null?void 0:s.newAgStackInstance())!=null?d:null,c=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,a):$.resolve();return(g=this.eWrapper)==null||g.refreshWrapperPadding(),this.setExclusive(a),c}makeCompParams(e,t,o){let{gos:i}=this,r=e?i.get("activeOverlayParams"):{...i.get("overlayComponentParams"),...t&&i.get(t)||null,overlayType:o};return O(i,r!=null?r:{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;let t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){var o,i;let{gos:t}=this;return e.overlayType&&((o=t.get("suppressOverlays"))==null?void 0:o.includes(e.overlayType))||((i=e.isSuppressed)==null?void 0:i.call(e,t))===!0}},dy={moduleName:"Overlay",version:P,userComponents:{agLoadingOverlay:Y1,agNoRowsOverlay:X1,agNoMatchingRowsOverlay:Z1,agExportingOverlay:K1},apiFunctions:{showLoadingOverlay:ey,showNoRowsOverlay:ty,hideOverlay:oy},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[cy]},gy=class extends S{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=Xp(),Ft(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;let e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Ft(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){let t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;let t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},uy=400,hy=class extends S{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{let e=()=>{for(let a of this.getAllCellCtrls())a.onCellSelectionChanged()},t=()=>{for(let a of this.getAllCellCtrls())a.updateRangeBordersIfRangeCount()},o=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},i=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{gt(this.gos)?o():i()}),gt(this.gos)&&o()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:r})=>{(!r&&i||r&&!i)&&this.redrawRows()});let{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{let i=o.columns;i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{let i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=se(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let e=this.getKeepDetailRowsCount(),t=e!=null?e:3;this.cachedRowCtrls=new py(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){var e,t;return(t=(e=this.stickyRowFeature)==null?void 0:e.stickyTopRowCtrls)!=null?t:[]}getStickyBottomRowCtrls(){var e,t;return(t=(e=this.stickyRowFeature)==null?void 0:e.stickyBottomRowCtrls)!=null?t:[]}updateAllRowCtrls(){var i,r;let e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=(r=(i=this.cachedRowCtrls)==null?void 0:i.getEntries())!=null?r:[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){var r;let o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!((r=this.beans.spannedRowRenderer)==null?void 0:r.getCellByPosition({rowIndex:e,column:t,rowPinned:null}))||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){for(let t of this.getAllCellCtrls())t.onCellFocused(e);for(let t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){var t;if((e==null?void 0:e.rowIndex)!=null&&!e.rowPinned){let o=(t=this.beans.colModel.getCol(e.column))!=null?t:void 0;this.isCellBeingRendered(e.rowIndex,o)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(let t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(let t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{let{cellFlashSvc:t}=this.beans;if(t)for(let o of this.getAllCellCtrls())t.onFlashCells(o,e)},columnHoverChanged:()=>{for(let e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(let e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(let e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(let e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();let e=this.colModel.getCols();for(let t of e){let o=l=>{for(let c of this.getAllCellCtrls())c.column===t&&l(c)},i=()=>{o(l=>l.onLeftChanged())},r=()=>{o(l=>l.onWidthChanged())},a=()=>{o(l=>l.onFirstRightPinnedChanged())},n=()=>{o(l=>l.onLastLeftPinnedChanged())},s=()=>{o(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",r),t.__addEventListener("firstRightPinnedChanged",a),t.__addEventListener("lastLeftPinnedChanged",n),t.__addEventListener("colDefChanged",s),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",r),t.__removeEventListener("firstRightPinnedChanged",a),t.__removeEventListener("lastLeftPinnedChanged",n),t.__removeEventListener("colDefChanged",s)})}}onDomLayoutChanged(){let e=se(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){let t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){var o;let t=[];for(let i of this.getAllRowCtrls()){let r=(o=i.getCellCtrl(e,!0))==null?void 0:o.eGui;r&&t.push(r)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,o){var l;let{pinnedRowModel:i,beans:r,printLayout:a}=this,n=Object.fromEntries(e.map(c=>[c.rowNode.id,c]));i==null||i.forEachPinnedRow(t,(c,d)=>{let g=e[d];g&&i.getPinnedRowById(g.rowNode.id,t)===void 0&&(g.destroyFirstPass(),g.destroySecondPass()),c.id in n&&o?(e[d]=n[c.id],delete n[c.id]):e[d]=new vr(c,r,!1,!1,a)});let s=(l=t==="top"?i==null?void 0:i.getPinnedTopRowCount():i==null?void 0:i.getPinnedBottomRowCount())!=null?l:0;e.length=s}onPinnedRowDataChanged(){let e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var o,i;if(e.sticky)(o=this.stickyRowFeature)==null||o.refreshStickyNode(e);else if((i=this.cachedRowCtrls)!=null&&i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{let r=a=>{let n=a[e.rowIndex];n&&n.rowNode===e&&(n.destroyFirstPass(),n.destroySecondPass(),a[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":r(this.topRowCtrls);break;case"bottom":r(this.bottomRowCtrls);break;default:r(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){let{editSvc:t}=this.beans;if(t!=null&&t.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(let i of e!=null?e:[])this.redrawRow(i,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){var s;this.getLockOnRefresh();let t=(s=this.beans.focusSvc)==null?void 0:s.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);let o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&yo(this.gos),r=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();let{stickyRowFeature:a,gos:n}=this;if(a){a.checkStickyRows();let l=a.extraTopHeight+a.extraBottomHeight;l&&this.updateContainerHeights(l)}this.recycleRows(r,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(n.get("enableRowPinning")?o:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){var i;let t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),(i=this.stickyRowFeature)==null||i.resetOffsets())}updateContainerHeights(e=0){let{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){var e,t;if(this.refreshInProgress)throw new Error(Xe(252));this.refreshInProgress=!0,(t=(e=this.beans.frameworkOverrides).getLockOnRefresh)==null||t.call(e)}releaseLockOnRefresh(){var e,t;this.refreshInProgress=!1,(t=(e=this.beans.frameworkOverrides).releaseLockOnRefresh)==null||t.call(e)}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;let t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:Fe(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(O(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){let{pagination:t,pageBounds:o}=this.beans,i=e;for(i.rowPinned==null&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(i.rowPinned==null&&o)if(i.rowIndexo.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});let r=this.getRowByPosition(i);if(r!=null&&r.isAlive())return{...r.getRowPosition(),column:e.column};i=cr(this.beans,i)}return null}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i{let r=i.rowNode;return $a(r,t)})}getCellCtrls(e,t){let o;I(t)&&(o={},t.forEach(r=>{let a=this.colModel.getCol(r);I(a)&&(o[a.getId()]=!0)}));let i=[];for(let r of this.getRowCtrls(e))for(let a of r.getAllCellCtrls()){let n=a.column.getId();o&&!o[n]||i.push(a)}return i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){var o;let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),(o=this.stickyRowFeature)==null||o.destroyStickyCtrls()}getRowsToRecycle(){let e=[];for(let o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);let t={};for(let o of Object.values(this.rowCtrlsByRowIndex)){let i=o.rowNode;t[i.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(let o of e){let i=this.rowCtrlsByRowIndex[o];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){let{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e,r,a=this.stickyRowFeature;a&&(r=(t==null?void 0:t.getFocusCellToUseAfterRefresh())||void 0);let n=this.firstRenderedRow,s=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(a){l=a.checkStickyRows();let d=a.extraTopHeight+a.extraBottomHeight;d&&this.updateContainerHeights(d)}let c=this.firstRenderedRow!==n||this.lastRenderedRow!==s;if(!(i&&!l&&!c)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),r!=null)){let d=t==null?void 0:t.getFocusCellToUseAfterRefresh();r!=null&&d==null&&(o==null||o.flushAllFrames(),this.restoreFocusedCell(r))}}removeRowCompsNotToDraw(e,t){let o={};for(let a of e)o[a]=!0;let r=Object.keys(this.rowCtrlsByRowIndex).filter(a=>!o[a]);this.removeRowCtrls(r,t)}calculateIndexesToDraw(e){var n,s;let t=[];for(let l=this.firstRenderedRow;l<=this.lastRenderedRow;l++)t.push(l);let o=this.beans.pagination,i=(s=(n=this.beans.focusSvc)==null?void 0:n.getFocusedCell())==null?void 0:s.rowIndex;i!=null&&(ithis.lastRenderedRow)&&(!o||o.isRowInPage(i))&&i{let c=l.rowNode.rowIndex;c==null||c===i||(cthis.lastRenderedRow)&&this.doNotUnVirtualiseRow(l)&&t.push(c)};for(let l of Object.values(this.rowCtrlsByRowIndex))r(l);if(e)for(let l of Object.values(e))r(l);t.sort((l,c)=>l-c);let a=[];for(let l=0;l{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){let{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){let e=[];for(let t of this.getFullWidthRowCtrls()){let o=t.rowNode.rowIndex;e.push(o.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=Ka(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;let i=o.rowNode;return!(t!=null&&!$a(i,t))})}createOrUpdateRowCtrl(e,t,o,i){let r,a=this.rowCtrlsByRowIndex[e];if(a||(r=this.rowModel.getRow(e),I(r)&&I(t)&&t[r.id]&&r.alreadyRendered&&(a=t[r.id],t[r.id]=null)),!a)if(r||(r=this.rowModel.getRow(e)),I(r))a=this.createRowCon(r,o,i);else return;r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=a}destroyRowCtrls(e,t){let o=[];if(e){for(let i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){let r=i.instanceId;this.zombieRowCtrls[r]=i,o.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[r]})}else i.destroySecondPass()}}t&&(o.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(let i of o)i()},uy))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){let e=this.getRowBuffer(),t=jt(this.beans);return e*t}workOutFirstAndLastRowsToRender(){let{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let i,r;if(!o.isRowsToRender())i=0,r=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),r=t.getLastRow();else{let d=this.getRowBufferInPixels(),g=this.ctrlsSvc.getScrollFeature(),u=this.gos.get("suppressRowVirtualisation"),h=!1,p,f;do{let b=t.getPixelOffset(),{pageFirstPixel:x,pageLastPixel:E}=t.getCurrentPagePixelRange(),D=e.divStretchOffset,T=g.getVScrollPosition(),k=T.top,F=T.bottom;u?(p=x+D,f=E+D):(p=Math.max(k+b-d,x)+D,f=Math.min(F+b+d,E)+D),this.firstVisibleVPixel=Math.max(k+b,x)+D,this.lastVisibleVPixel=Math.min(F+b,E)+D,h=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(h);let m=o.getRowIndexAtPixel(p),v=o.getRowIndexAtPixel(f),C=t.getFirstRow(),w=t.getLastRow();mw&&(v=w),i=m,r=v}let a=se(this.gos,"normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),s=Math.max(this.getRowBuffer(),500);a&&!n&&r-i>s&&(r=i+s);let l=i!==this.firstRenderedRow,c=r!==this.lastRenderedRow;(l||c)&&(this.firstRenderedRow=i,this.lastRenderedRow=r,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:r}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,pt(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){var s,l;let o=(s=this.pinnedRowModel)==null?void 0:s.ensureRowHeightsValid(),i=(l=this.stickyRowFeature)==null?void 0:l.ensureRowHeightsValid(),{pageBounds:r,rowModel:a}=this,n=a.ensureRowHeightsValid(e,t,r.getFirstRow(),r.getLastRow());return(n||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||n||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){var c;let i=e.rowNode,r=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),a=(c=this.editSvc)==null?void 0:c.isEditing(e),n=i.detail;return r||a||n?!!this.isRowPresent(i):!1}isRowPresent(e){var t,o;return this.rowModel.isRowPresent(e)?(o=(t=this.beans.pagination)==null?void 0:t.isRowInPage(e.rowIndex))!=null?o:!0:!1}createRowCon(e,t,o){var n,s,l;let i=(s=(n=this.cachedRowCtrls)==null?void 0:n.getRow(e))!=null?s:null;if(i)return i;let r=o&&!this.printLayout&&!!((l=this.beans.animationFrameSvc)!=null&&l.active);return new vr(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){let e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),o=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t,{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;let i=e>this.lastRenderedRow;return!(tthis.maxCount){let t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if((e==null?void 0:e.id)==null)return null;let t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){let t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],et(this.entriesList,o)}removeFromCache(e){let t=e.rowNode.id;delete this.entriesMap[t],et(this.entriesList,e)}getEntries(){return this.entriesList}};function Ka(e){if(!e)return;let t={top:{},bottom:{},normal:{}};for(let o of e){let i=o.id;switch(o.rowPinned){case"top":t.top[i]=o;break;case"bottom":t.bottom[i]=o;break;default:t.normal[i]=o;break}}return t}function $a(e,t){let o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var fy=class extends S{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=ee(this.gos)?ur:my,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));let e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=st(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((o,i)=>this.compareRowNodes(t,o,i))}compareRowNodes(e,t,o){if(t===o)return 0;let i=this.accentedSort;for(let r=0,a=e.length;r{if(e.data)return e;let t=e.childrenAfterGroup;for(;t!=null&&t.length;){let o=t[0];if(o.data)return o;t=o.childrenAfterGroup}},kl=e=>{if(!e)return e;if(typeof e=="bigint")return e({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),Cy={tag:"span",cls:"ag-sort-indicator-container",children:[Bt("Order","order"),Bt("Asc","ascending-icon"),Bt("Desc","descending-icon"),Bt("Mixed","mixed-icon"),Bt("AbsoluteAsc","absolute-ascending-icon"),Bt("AbsoluteDesc","absolute-descending-icon"),Bt("None","none-icon")]},Qn=class extends _{constructor(e){super(),this.eSortOrder=M,this.eSortAsc=M,this.eSortDesc=M,this.eSortMixed=M,this.eSortNone=M,this.eSortAbsoluteAsc=M,this.eSortAbsoluteDesc=M,e||this.setTemplate(Cy)}attachCustomElements(e,t,o,i,r,a,n){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=r,this.eSortAbsoluteAsc=a,this.eSortAbsoluteDesc=n}setupSort(e,t=!1,o){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=o,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);let i=this.updateIcons.bind(this),r=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:r,columnRowGroupChanged:r}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;let i=ye(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:o,eSortAbsoluteDesc:i,eSortNone:r,column:a,gos:n,beans:s}=this,l=Kh(a,s,this.getSortDefOverride),c=l.isDefaultSortAllowed,d=l.isAbsoluteSortAllowed,{isAbsoluteSort:g,isDefaultSort:u,isAscending:h,isDescending:p,direction:f}=l;if(e&&q(e,h&&u&&c,{skipAriaHidden:!0}),t&&q(t,p&&u&&c,{skipAriaHidden:!0}),r){let m=!a.getColDef().unSortIcon&&!n.get("unSortIcon");q(r,!m&&!f,{skipAriaHidden:!0})}o&&q(o,h&&g&&d,{skipAriaHidden:!0}),i&&q(i,p&&g&&d,{skipAriaHidden:!0})}setupMultiSortIndicator(){let{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);let i=t.getColDef().showRowGroup;st(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){var i;let{eSortMixed:e,beans:t,column:o}=this;if(e){let r=((i=t.sortSvc.getDisplaySortForColumn(o))==null?void 0:i.direction)==="mixed";q(e,r,{skipAriaHidden:!0})}}updateSortOrder(){var s;let{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;let i=o.getColumnsWithSortingOrdered(),r=(s=o.getDisplaySortIndexForColumn(t))!=null?s:-1,a=i.some(l=>{var c;return(c=o.getDisplaySortIndexForColumn(l))!=null?c:!1}),n=r>=0&&a;q(e,n,{skipAriaHidden:!0}),r>=0?e.textContent=(r+1).toString():ne(e)}refresh(){this.onSortChanged()}},wy={selector:"AG-SORT-INDICATOR",component:Qn},by=class extends S{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){let i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){let i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,o,i){var d;let{gos:r,showRowGroupCols:a}=this.beans,n=st(r),s=[e];if(n&&e.getColDef().showRowGroup){let g=(d=a==null?void 0:a.getSourceColumnsForGroupColumn)==null?void 0:d.call(a,e),u=g==null?void 0:g.filter(h=>h.isSortable());u&&(s=[e,...u])}for(let g of s)this.setColSort(g,t,i);let l=(o||r.get("alwaysMultiSort"))&&!r.get("suppressMultiSort"),c=[];if(!l){let g=this.clearSortBarTheseColumns(s,i);c.push(...g)}this.updateSortIndex(e),c.push(...s),this.dispatchSortChangedEvents(i,c)}updateSortIndex(e){let{gos:t,colModel:o,showRowGroupCols:i}=this.beans,r=st(t),a=i==null?void 0:i.getShowRowGroupCol(e.getId()),n=r&&a||e,s=this.getColumnsWithSortingOrdered();o.forAllCols(d=>this.setColSortIndex(d,null));let l=s.filter(d=>r&&d.getColDef().showRowGroup?!1:d!==n);(n.getSortDef()?[...l,n]:l).forEach((d,g)=>this.setColSortIndex(d,g))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){let o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){let o=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSortDef()&&o.push(i),this.setColSort(i,void 0,t))}),o}getNextSortDirection(e,t){let o=e.getSortingOrder(),i=t===void 0?e.getSortDef():Me(t),a=o.findIndex(n=>Wi(n,i))+1;return a>=o.length&&(a=0),Me(o[a])}getIndexedSortMap(){var c;let{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans,r=[];if(t.forAllCols(d=>{d.getSortDef()&&r.push(d)}),t.isPivotMode()){let d=st(e);r=r.filter(g=>{let u=!!g.getAggFunc(),h=!g.isPrimary(),p=d?o==null?void 0:o.getShowRowGroupCol(g.getId()):g.getColDef().showRowGroup;return u||h||p})}let a=(c=i==null?void 0:i.columns.filter(d=>!!d.getSortDef()))!=null?c:[],n={};r.forEach((d,g)=>n[d.getId()]=g),r.sort((d,g)=>{let u=d.getSortIndex(),h=g.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){let p=n[d.getId()],f=n[g.getId()];return p>f?1:-1}else return h==null?-1:1});let s=st(e)&&!!a.length;s&&(r=[...new Set(r.map(d=>{var g;return(g=o==null?void 0:o.getShowRowGroupCol(d.getId()))!=null?g:d}))]);let l=new Map;if(r.forEach((d,g)=>l.set(d,g)),s)for(let d of a){let g=o.getShowRowGroupCol(d.getId());l.set(d,l.get(g))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){var i,r;let t=[],o=this.getColumnsWithSortingOrdered();for(let a of o){let n=(i=a.getSortDef())==null?void 0:i.direction;if(!n)continue;let s=ut((r=a.getSortDef())==null?void 0:r.type),l={sort:n,type:s};e?l.colId=a.getId():l.column=a,t.push(l)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){let t=st(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){var n,s;let t=(n=this.beans.showRowGroupCols)==null?void 0:n.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSortDef();let i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,r=i[0].getSortDef();return i.every(l=>Wi(l.getSortDef(),r))?r:{type:ut((s=e.getSortDef())==null?void 0:s.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){let o=()=>{var a;let{type:i,direction:r}=Me(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",r==="asc"),e.toggleCss("ag-header-cell-sorted-desc",r==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",i==="absolute"&&r==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",i==="absolute"&&r==="desc"),e.toggleCss("ag-header-cell-sorted-none",!r),t.getColDef().showRowGroup){let n=(a=this.beans.showRowGroupCols)==null?void 0:a.getSourceColumnsForGroupColumn(t),l=!(n==null?void 0:n.every(c=>{var d;return r==((d=c.getSortDef())==null?void 0:d.direction)}));e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:o,columnPinned:o,columnRowGroupChanged:o,displayedColumnsChanged:o})}initCol(e){let{sortIndex:t,initialSortIndex:o}=e.colDef,i=qc(e.colDef);i&&e.setSortDef(i,!0),t!==void 0?t!==null&&(e.sortIndex=t):o!==null&&(e.sortIndex=o)}updateColSort(e,t,o){t!==void 0&&this.setColSort(e,Me(t),o)}setColSort(e,t,o){Wi(e.getSortDef(),t)||(e.setSortDef(Me(t),t===void 0),e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Qn(e)}getSortIndicatorSelector(){return wy}},hg={moduleName:"Sort",version:P,beans:[by,fy],apiFunctions:{onSortChanged:vy},userComponents:{agSortIndicator:Qn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},yy=class extends S{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{let e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){let{colModel:t,rowModel:o}=this.beans;t.setColumnDefs(e!=null?e:[],"gridInitializing"),o.start()}gridReady(){let{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Ft(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){let t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Ro(e.source))}}};function Sy(e){var t;(t=e.valueCache)==null||t.expire()}function xy(e,t){var l,c;let{colKey:o,rowNode:i,useFormatter:r,from:a="edit"}=t,n=(l=e.colModel.getColDefCol(o))!=null?l:e.colModel.getCol(o);if(!n)return null;let s=e.valueSvc.getValueForDisplay({column:n,node:i,includeValueFormatted:r,from:a});return r?(c=s.valueFormatted)!=null?c:Lo(s.value):s.value}var ky="paste",Ry=class extends S{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=it(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){var i;if(this.deferredDepth===0||--this.deferredDepth>0)return;let e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&((i=this.csrm)==null||i.doAggregate(e));let{rowRenderer:o}=this.beans;if(t)for(let r of t)Rl(o,r);if(e){let r=e.getSortedRows();for(let a=0,n=r.length;a{let{sibling:o,pinnedSibling:i}=t;e.refreshRowByNode(t),e.refreshRowByNode(o),e.refreshRowByNode(i),e.refreshRowByNode(o==null?void 0:o.pinnedSibling),e.refreshRowByNode(i==null?void 0:i.sibling)},Ey=class extends S{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);W(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(o){return W(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){let t=this.cache;if(t[e])return t[e];let o=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=i,i}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},Fy=class extends S{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){let e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,o){if(this.active){let i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=o}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},Dy={moduleName:"ValueCache",version:P,beans:[Fy],apiFunctions:{expireValueCache:Sy}},My={moduleName:"Expression",version:P,beans:[Ey]},Py={moduleName:"ChangeDetection",version:P,beans:[Ry]},Iy={moduleName:"CellApi",version:P,apiFunctions:{getCellValue:xy}},Ty=class extends S{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){let{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=vi(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;let o=i=>this.callColumnCellValueChangedHandler(i);this.eventSvc.addListener("cellValueChanged",o,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",o,!0)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue)}getValueForDisplay(e){let t=this.beans,o=e.column,i=e.node,r=t.showRowGroupColValueSvc,a=!o&&i.group,n=o==null?void 0:o.colDef.showRowGroup,s=!this.isTreeData||i.footer;if(r&&s&&(a||n)){let u=r.getGroupValue(i,o,this.displayIgnoresAggData(i));return u==null?{value:null,valueFormatted:null}:{value:u.value,valueFormatted:e.includeValueFormatted?r.formatAndPrefixGroupColValue(u,o,e.exporting):null}}if(!o)return{value:i.key,valueFormatted:null};let l=this.getValue(o,i,e.from,this.displayIgnoresAggData(i)),c=l,d=t.formula;o.isAllowFormula()&&(d!=null&&d.isFormula(l))&&(e.useRawFormula?(l=d.normaliseFormula(l,!0),c=d.resolveValue(o,i)):(l=d.resolveValue(o,i),c=l));let g=e.includeValueFormatted&&!(e.exporting&&o.colDef.useValueFormatterForExport===!1);return{value:l,valueFormatted:g?this.formatValue(o,i,c):null}}getValue(e,t,o,i=!1){var l,c;if(this.initialised||this.init(),!t)return;let r=e.colDef,a=t.group;if(!a){let d=r.pivotValueColumn;d&&(e=d)}let n=(l=this.editSvc)==null?void 0:l.getPendingEditValue(t,e,o);if(n!==void 0)return n;let s=this.resolveValue(e,t,i,a);if(s===void 0){if(a){let d=r.showRowGroup;if(typeof d=="string"){let g=(c=this.rowGroupColsSvc)==null?void 0:c.getColumnIndex(d);if(g!=null&&g>t.level)return null}}return}if(this.cellExpressions&&bs(s)){let d=s.substring(1);s=this.executeValueGetter(d,t.data,e,t)}return s}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get("groupSuppressBlankHeader")||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,o,i){let r=e.colDef,a=e.colId,n=!i&&this.formulaDataSvc;if(n&&n.hasDataSource()&&r.allowFormula===!0){let C=n.getFormula({column:e,rowNode:t});if(bs(C))return C}let s=i&&!o?t.aggData:void 0,l=this.isTreeData;if(l&&(s==null?void 0:s[a])!==void 0)return s[a];let c=t.data,d=r.field,g=r.valueGetter;if(l){if(g)return this.executeValueGetter(g,c,e,t);if(d&&c)return ei(c,d,e.isFieldContainsDots())}let u=t.groupData;if(u&&a in u)return u[a];if((s==null?void 0:s[a])!==void 0)return s[a];let h=r.showRowGroup,p=typeof h!="string"||!i,f=this.isSsrm,m=f&&o&&!!r.aggFunc;if(g&&!m)return p?this.executeValueGetter(g,c,e,t):void 0;if(f&&t.footer&&t.field&&(h===!0||h===t.field))return ei(c,t.field,e.isFieldContainsDots());if(d&&c&&!m)return p?ei(c,d,e.isFieldContainsDots()):void 0}parseValue(e,t,o,i){var n,s;let r=e.getColDef();if(r.allowFormula&&((n=this.beans.formula)!=null&&n.isFormula(o)))return o;let a=r.valueParser;if(I(a)){let l=O(this.gos,{node:t,data:t==null?void 0:t.data,oldValue:i,newValue:o,colDef:r,column:e});return typeof a=="function"?a(l):(s=this.expressionSvc)==null?void 0:s.evaluate(a,l)}return o}getDeleteValue(e,t){var o;return I(e.getColDef().valueParser)&&(o=this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value))!=null?o:null}formatValue(e,t,o,i,r=!0){let{expressionSvc:a}=this.beans,n=null,s,l=e.getColDef();if(i?s=i:r&&(s=l.valueFormatter),s){let c=t?t.data:null,d=O(this.gos,{value:o,node:t,data:c,colDef:l,column:e});typeof s=="function"?n=s(d):n=a?a.evaluate(s,d):null}else if(l.refData)return l.refData[o]||"";return n==null&&Array.isArray(o)&&(n=o.join(", ")),n}setValue(e,t,o,i){var c;let r=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,r)&&(e.data={}),!this.isSetValueSupported(t,e,o,r))return!1;let a=this.getValue(t,e,"data"),n=O(this.gos,{node:e,data:e.data,oldValue:a,newValue:o,colDef:r,column:t}),s=!1;if(e.data){let d=this.handleExternalFormulaChange({column:t,eventSource:i,newValue:o,setterParams:n,rowNode:e});if(d!==null)return d;let g=this.computeValueChange({column:t,rowNode:e,newValue:o,params:n,rowData:e.data,valueSetter:r.valueSetter,field:r.field});s=g!=null?g:!0}let l=this.beans.changeDetectionSvc;l==null||l.beginDeferred();try{if(e.group){let d=(c=this.beans.rowGroupingEditValueSvc)==null?void 0:c.setGroupDataValue(e,t,o,a,i,s||o!==a);if(d!==void 0)return!s&&!d?!1:this.finishValueChange(e,t,n,i,o)}return s?this.finishValueChange(e,t,n,i):!1}finally{l==null||l.endDeferred()}}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,o,i,r){var n;e.resetQuickFilterAggregateText(),(n=this.valueCache)==null||n.onDataChanged();let a=r===void 0?this.getValue(t,e,"data"):r;return this.dispatchCellValueChangedEvent(e,o,a,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,o,a,i),!0}isSetValueSupported(e,t,o,i){var c;let{field:r,valueSetter:a}=i,n=this.beans.formula,s=e.isAllowFormula()&&(n==null?void 0:n.isFormula(o)),l=!!((c=this.formulaDataSvc)!=null&&c.hasDataSource());return Q(r)&&Q(a)&&!(l&&s)?t.group&&(i.groupRowValueSetter||i.groupRowEditable)?!0:(R(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,o)?(R(135),!1):!0}handleExternalFormulaChange(e){let{column:t,rowNode:o,newValue:i,eventSource:r,setterParams:a}=e,n=this.beans.formula,s=this.formulaDataSvc;if(!(s!=null&&s.hasDataSource())||!t.isAllowFormula())return null;let l=n==null?void 0:n.isFormula(i),c=s.getFormula({column:t,rowNode:o});if(l){if(!(c!==i))return!1;s.setFormula({column:t,rowNode:o,formula:i});let g=n==null?void 0:n.resolveValue(t,o),u=t.getColDef();if(I(u.valueSetter)||!Q(u.field)){let h={...a,newValue:g};this.computeValueChange({column:t,rowNode:o,newValue:g,params:h,rowData:o.data,valueSetter:u.valueSetter,field:u.field})}return this.finishValueChange(o,t,a,r)}return c!==void 0&&s.setFormula({column:t,rowNode:o,formula:void 0}),null}computeValueChange(e){var s;let{valueSetter:t,params:o,rowData:i,field:r,column:a,newValue:n}=e;return I(t)?typeof t=="function"?t(o):(s=this.expressionSvc)==null?void 0:s.evaluate(t,o):!!i&&this.setValueUsingField(i,r,n,a.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,o,i){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:o,newRawValue:t.newValue,value:o,source:i})}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,o,i){if(!t)return!1;let r=!1;if(!i)r=e[t]===o,r||(e[t]=o);else{let a=t.split("."),n=e;for(;a.length>0&&n;){let s=a.shift();a.length===0?(r=n[s]===o,r||(n[s]=o)):n=n[s]}}return!r}executeValueGetterWithValueCache(e,t,o,i){let r=o.getColId(),a=this.valueCache.getValue(i,r);if(a!==void 0)return a;let n=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,r,n),n}executeValueGetterWithoutValueCache(e,t,o,i){var n;let r=O(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:s=>this.getValueCallback(i,s)}),a;return typeof e=="function"?a=e(r):a=(n=this.expressionSvc)==null?void 0:n.evaluate(e,r),a}getValueCallback(e,t){let o=this.colModel.getColDefCol(t);return o?this.getValue(o,e,"data"):null}getKeyForNode(e,t){let o=this.getValue(e,t,"data"),i=e.getColDef().keyCreator,r=o;if(i){let a=O(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});r=i(a)}return typeof r=="string"||r==null||(r=String(r),r==="[object Object]"&&R(121)),r}},Ay={moduleName:"CommunityCore",version:P,beans:[hb,iv,Gw,wp,gy,AC,sb,zb,VC,L1,z1,hy,Ty,gb,ab,ub,qw,yy,zw,Lw,jb],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:rv,destroy:av,isDestroyed:nv,getGridOption:sv,setGridOption:lv,updateGridOptions:Md,isModuleRegistered:cv},dependsOn:[Tw,cC,CC,hg,Wb,LC,qb,dy,Py,Ub,A1,N1,W1,Yb,Bw,Aw,My,QC,U1]};function Ya(e){let{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:r}=e,a=(o!=null?o:[]).map((l,c)=>({value:l,relevance:zy(t,l),idx:c}));if(a.sort((l,c)=>l.relevance-c.relevance),i&&(a=a.filter(l=>l.relevance0&&r&&r>0){let c=a[0].relevance*r;a=a.filter(d=>c-d.relevance<0)}let n=[],s=[];for(let l of a)n.push(l.value),s.push(l.idx);return{values:n,indices:s}}function zy(e,t){let o=e.length,i=t.length;if(i===0)return o||0;let r=e.toLocaleLowerCase(),a=t.toLocaleLowerCase(),n;e.length1&&p>1){let v=e[g-2],C=r[g-2],w=t[p-2],b=a[p-2];C===b&&(c++,v===w&&c++)}g`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule: import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community'; ModuleRegistry.registerModules([ AllCommunityModule ]); - `,zy=e=>{let t=e.map(i=>`import { ${ei(i)} } from '${hg[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; + `,By=e=>{let t=e.map(i=>`import { ${ti(i)} } from '${pg[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; ${t.join(` `)} -ModuleRegistry.registerModules([ ${e.map(i=>ei(i,!0)).join(", ")} ]); +ModuleRegistry.registerModules([ ${e.map(i=>ti(i,!0)).join(", ")} ]); -For more info see: ${wo}/modules/`};function ei(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function Ly(e,t){let o=t.filter(a=>a==="IntegratedCharts"||a==="Sparklines"),i="";return!(globalThis==null?void 0:globalThis.agCharts)&&o.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise. -`:t.some(a=>hg[a])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included. -`),i}function fg({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var Rl=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:i,rowModelType:r,additionalText:a,isUmd:n})=>{let s=Ay(t,r),l=typeof e=="string"?e:Vy[e];if(n)return Ly(l,s);let c=s.filter(u=>u==="IntegratedCharts"||u==="Sparklines"),d=c.length>0?`${c.map(u=>ei(u)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${s.length>1?"one of "+s.map(u=>ei(u)).join(", "):ei(s[0])} is not registered${o?" for gridId: "+i:""}. ${d} Check if you have registered the module: +For more info see: ${bo}/modules/`};function ti(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function Ny(e,t){let o=t.filter(a=>a==="IntegratedCharts"||a==="Sparklines"),i="";return!(globalThis==null?void 0:globalThis.agCharts)&&o.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise. +`:t.some(a=>pg[a])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included. +`),i}function mg({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var El=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:i,rowModelType:r,additionalText:a,isUmd:n})=>{let s=Hy(t,r),l=typeof e=="string"?e:qy[e];if(n)return Ny(l,s);let c=s.filter(u=>u==="IntegratedCharts"||u==="Sparklines"),d=c.length>0?`${c.map(u=>ti(u)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${s.length>1?"one of "+s.map(u=>ti(u)).join(", "):ti(s[0])} is not registered${o?" for gridId: "+i:""}. ${d} Check if you have registered the module: `} -${zy(s)}`+(a?` +${By(s)}`+(a?` -${a}`:"")},El=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'. +${a}`:"")},Fl=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'. import { AgChartsEnterpriseModule } from 'ag-charts-enterprise'; import { ModuleRegistry } from 'ag-grid-community'; import { ${e} } from 'ag-grid-enterprise'; ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]); - `,Oy=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,Hy={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e==null?void 0:e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e==null?void 0:e.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:o})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",o],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions: + `,Vy=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,Gy={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e==null?void 0:e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e==null?void 0:e.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:o})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",o],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions: "alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed. Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid. To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e} -${Oy(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e,inferred:t,colId:o})=>{let i=t?" (inferred)":"",r=o?` for column "${o}"`:"";return`Cell data type is "object"${i} but no Value ${e} has been provided${r}. Please either provide an object data type definition with a Value ${e}, or set: +${Vy(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e,inferred:t,colId:o})=>{let i=t?" (inferred)":"",r=o?` for column "${o}"`:"";return`Cell data type is "object"${i} but no Value ${e} has been provided${r}. Please either provide an object data type definition with a Value ${e}, or set: - "colDef.value${e}"${t&&e==="Parser"?` - - "colDef.cellDataType = 'object'"`:""}`},49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:o,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${o?"":" the default"} paginationPageSizeSelector=[${i==null?void 0:i.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})=>{let r=[],a=[...Object.keys(o!=null?o:[]).filter(s=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(s)),...Object.keys(i!=null?i:[]).filter(s=>!!i[s])],n=$a({inputValue:t,allSuggestions:a,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return r.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components. + - "colDef.cellDataType = 'object'"`:""}`},49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:o,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${o?"":" the default"} paginationPageSizeSelector=[${i==null?void 0:i.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})=>{let r=[],a=[...Object.keys(o!=null?o:[]).filter(s=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(s)),...Object.keys(i!=null?i:[]).filter(s=>!!i[s])],n=Ya({inputValue:t,allSuggestions:a,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return r.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components. `),n.length>0&&r.push(` Did you mean: [${n.slice(0,3)}]? -`),r.push("If using a custom component check it has been registered correctly."),r},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${wo}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{let o=$a({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,o.length>0?` Did you mean: [${o.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(` +`),r.push("If using a custom component check it has been registered correctly."),r},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${bo}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{let o=Ya({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,o.length>0?` Did you mean: [${o.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(` `)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables. - Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o!=null?o:[]],187:({rowId:e,firstData:t,secondData:o})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",o],188:e=>`getRowId callback must be provided for Server Side Row Model ${(e==null?void 0:e.feature)||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Rl,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${wo}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t!=null?t:{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. + Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o!=null?o:[]],187:({rowId:e,firstData:t,secondData:o})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",o],188:e=>`getRowId callback must be provided for Server Side Row Model ${(e==null?void 0:e.feature)||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:El,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${bo}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t!=null?t:{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). -To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e==null?void 0:e.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>El("IntegratedChartsModule"),258:()=>El("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:i,rowModelType:r})=>Rl({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ro[t],gridId:i,gridScoped:o,rowModelType:r}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${wo}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>pg(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:fg,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function By(e,t){let o=Hy[e];if(!o)return[`Missing error text for error id ${e}!`];let i=o(t),a=` -See ${Ec(e,t)}`;return Array.isArray(i)?i.concat(a):[i,a]}var Vy={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Ny=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Cc}/${this.frameworkName}-data-grid`,vh(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},Fl=new WeakMap,Dl=new WeakMap;function mg(e,t,o){if(!t)return W(11),{};let i=o,r;if(!(i!=null&&i.setThemeOnGridDiv)){let n=oe({tag:"div"});n.style.height="100%",e.appendChild(n),e=n,r=()=>e.remove()}return new Wy().create(e,t,n=>{let s=new Zm(e);n.createBean(s)},void 0,o,r)}var Gy=1,Wy=class{create(e,t,o,i,r,a){var f;let n=Cn.applyGlobalGridOptions(t),s=(f=n.gridId)!=null?f:String(Gy++),l=this.getRegisteredModules(r,s,n.rowModelType),c=this.createBeansList(n.rowModelType,l,s),d=this.createProvidedBeans(e,n,r);if(!c)return;let u={providedBeanInstances:d,beanClasses:c,id:s,beanInitComparator:Sf,beanDestroyComparator:xf,derivedBeans:[bf],destroyCallback:()=>{Dl.delete(p),Fl.delete(e),uh(s),a==null||a()}},h=new wf(u);this.registerModuleFeatures(h,l),o(h),h.getBean("syncSvc").start(),i==null||i(h);let p=h.getBean("gridApi");return Fl.set(e,p),Dl.set(p,e),p}getRegisteredModules(e,t,o){var i;return ci(My,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(r=>ci(r,t)),hh(t,Ml(o))}registerModuleFeatures(e,t){let o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(let r of t){o.registerModule(r);let a=r.apiFunctions;if(a){let n=Object.keys(a);for(let s of n)i==null||i.addFunction(s,a[s])}}}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;Q(i)&&(i=new Ny);let r={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i,withinStudio:o==null?void 0:o.withinStudio};return o!=null&&o.providedBeanInstances&&Object.assign(r,o.providedBeanInstances),r}createBeansList(e,t,o){var s;let i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},r=Ml(e),a=i[r];if(!a){_o(201,{rowModelType:r},`Unknown rowModelType ${r}.`);return}if(!fh()){_o(272,void 0,pg());return}if(!e){let l=Object.entries(i).filter(([c,d])=>Ea(d,o,c));if(l.length==1){let[c,d]=l[0];if(c!==r){let g={moduleName:d,rowModelType:c};_o(275,g,fg(g));return}}}if(!Ea(a,o,r)){let l=bn(),c=`rowModelType = '${r}'`,d=l?`Unable to use ${c} as that requires the ag-grid-enterprise script to be included. -`:`Missing module ${a}Module for rowModelType ${r}.`;_o(200,{reasonOrId:c,moduleName:a,gridScoped:wn(),gridId:o,rowModelType:r,isUmd:l},d);return}let n=new Set;for(let l of t)for(let c of(s=l.beans)!=null?s:[])n.add(c);return Array.from(n)}};function Ml(e){return e!=null?e:"clientSide"}function qy(e,t=!1){let o=[],i=[],r=[],a=[],n=[],s=[],l=[],c=[],d=[],g=0;for(let u=0;ut!=null)}function _y(e){let t=[];for(let{groupId:o,open:i}of e)i&&t.push(o);return t.length?{openColumnGroupIds:t}:void 0}var Uy=class extends S{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){var i;let e=(i=this.gos.get("alignedGrids"))!=null?i:[],t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(r=>{var n;if(!r){W(18),t||W(20);return}if(this.isGridApi(r))return r;let a=r;return"current"in a?(n=a.current)==null?void 0:n.api:(a.api||W(19),a.api)}).filter(r=>!!r&&!r.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){let e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(let t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){let o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":k(21);break}})}processGroupOpenedEvent(e){let{colGroupSvc:t}=this.beans;if(t)for(let o of e.columnGroups){let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){var d;let t=e.column,o=null,i=this.beans,{colResize:r,ctrlsSvc:a,colModel:n}=i;if(t&&(o=n.getColDefCol(t.getColId())),t&&!o)return;let s=this.getMasterColumns(e);switch(e.type){case"columnMoved":{let u=e.api.getColumnState().map(h=>({colId:h.colId}));Ve(i,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{let u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Ve(i,{state:u},"alignedGridChanged")}break;case"columnPinned":{let u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Ve(i,{state:u},"alignedGridChanged")}break;case"columnResized":{let g=e,u={};for(let h of s)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(let h of(d=g.flexColumns)!=null?d:[])u[h.getId()]&&delete u[h.getId()];r==null||r.setColumnWidths(Object.values(u),!1,g.finished,"alignedGridChanged");break}}let c=a.getGridBodyCtrl().isVerticalScrollShowing();for(let g of this.getAlignedGridApis())g.setGridOption("alwaysShowVerticalScroll",c)}},jy={moduleName:"AlignedGrids",version:D,beans:[Uy],dependsOn:[_d]};function Ky(e,t={}){let o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function vg(e,t,o,i,r){t&&(i&&t.parent&&t.parent.level!==-1&&vg(e,t.parent,o,i,r),t.setExpanded(o,void 0,r))}function $y(e,t){return e.rowModel.getRowNode(t)}function Yy(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function Qy(e){return e.rowRenderer.getRenderedNodes()}function Zy(e,t,o){e.rowModel.forEachNode(t,o)}function Jy(e){return e.rowRenderer.firstRenderedRow}function Xy(e){return e.rowRenderer.lastRenderedRow}function e3(e,t){return e.rowModel.getRow(t)}function t3(e){return e.rowModel.getRowCount()}function o3(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function i3(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Cg(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function wg(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function r3(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}var a3={moduleName:"RowApi",version:D,apiFunctions:{redrawRows:Ky,setRowNodeExpanded:vg,getRowNode:$y,addRenderedRowListener:Yy,getRenderedNodes:Qy,forEachNode:Zy,getFirstDisplayedRowIndex:Jy,getLastDisplayedRowIndex:Xy,getDisplayedRowAtIndex:e3,getDisplayedRowCount:t3}},n3={moduleName:"ScrollApi",version:D,apiFunctions:{getVerticalPixelRange:o3,getHorizontalPixelRange:i3,ensureColumnVisible:Cg,ensureIndexVisible:wg,ensureNodeVisible:r3}};function s3(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function l3(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function bg(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function yg(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){k(3);return}(o=e.rowModel)==null||o.resetRowHeights()}function c3(e){var t;(t=e.expansionSvc)==null||t.resetExpansion()}function d3(e,t,o){var r,a;let i=of(e);if(i){if(((r=e.rowGroupColsSvc)==null?void 0:r.columns.length)===0){if(t<0){W(238);return}i.setRowCount(t,o);return}W(28);return}(a=Fr(e))==null||a.setRowCount(t,o)}function g3(e){var t,o;return mi(e.gos)?e.rowModel.getBlockStates():(o=(t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())!=null?o:{}}function u3(e){return e.rowModel.isLastRowIndexKnown()}var h3={moduleName:"CsrmSsrmSharedApi",version:D,apiFunctions:{expandAll:s3,collapseAll:l3,resetRowGroupExpansion:c3}},p3={moduleName:"RowModelSharedApi",version:D,apiFunctions:{onRowHeightChanged:bg,resetRowHeights:yg}},f3={moduleName:"SsrmInfiniteSharedApi",version:D,apiFunctions:{setRowCount:d3,getCacheBlockState:g3,isLastRowIndexKnown:u3}},Sg=(e,t)=>{for(let o=0,i=e.length;o{if(o!=null){let a=o.getSortedRows();for(let n=0,s=a.length;n{let d=l.level+1;for(let g=0,u=c.length;g{if(!g&&g!==void 0){let x=w.sourceRowIndex;g=x<=u,u=x}w.data!==y&&(w.updateData(y),n.has(w)||s.add(w),!w.selectable&&w.isSelected()&&c.push(w))},f=(w,y,x)=>{for(let R=0,F=y.length;R0;if(m){let w=(C=o._leafs)!=null?C:o._leafs=[];g===void 0?y3(w,l,a):b3(w,l)&&(a.reordered=!0)}(m||h||s.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},o,i){let r=this.rootNode._leafs;for(let a=0,n=r.length;a0}updateRowData(e,t,o){var l;if(this.dispatchRowDataUpdateStarted(e.add),(l=this.beans.groupStage)!=null&&l.getNestedDataGetter())return k(268),{remove:[],update:[],add:[]};let i=[],r=Do(this.gos),a=this.executeRemove(r,e,t,i,o),n=this.executeUpdate(r,e,t,i),s=this.executeAdd(e,t);return this.deselect(i),{remove:a,update:n,add:s}}executeRemove(e,{remove:t},{adds:o,updates:i,removals:r},a,n){let s=this.rootNode._leafs,l=s==null?void 0:s.length,c=t==null?void 0:t.length;if(!c||!l)return[];let d=0,g=l,u=0,h=new Array(c);for(let p=0;pu&&(u=m),h[d++]=f,this.destroyNode(f,n)&&(f.isSelected()&&a.push(f),o.delete(f)||(i.delete(f),r.push(f)))}return h.length=d,d&&w3(s,g,u),h}executeUpdate(e,{update:t},{adds:o,updates:i},r){let a=t==null?void 0:t.length;if(!a)return[];let n=new Array(a),s=0;for(let l=0;l=l;--u){let p=i[u];p.sourceRowIndex=h,i[h--]=p}t.reordered=!0}i.length=s;let c=new Array(n),d=t.adds;for(let u=0;u=o||Number.isNaN(t))return o;t=Math.ceil(t);let i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=v3(e,t)),t}},v3=(e,t)=>{for(let o=0,i=e.length;o{var n;e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",((n=e._leafs)==null?void 0:n.length)!==0&&(e._leafs=[]);let t=[],o=[],i=[],r=[];e.childrenAfterGroup=t,e.childrenAfterSort=o,e.childrenAfterAggFilter=i,e.childrenAfterFilter=r;let a=e.sibling;return a&&(a.childrenAfterGroup=t,a.childrenAfterSort=o,a.childrenAfterAggFilter=i,a.childrenAfterFilter=r,a.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},C3=(e,t)=>{if(e)for(let o=0,i=e.length;o{t=Math.max(0,t);for(let i=t,r=e.length;i{let o=t.size;e.length=o;let i=0,r=!1,a=!1;for(let n of t){let s=n.sourceRowIndex;s===i?a||(a=r):(s>=0?a=!0:r=!0,n.sourceRowIndex=i,e[i]=n),++i}return a},y3=(e,t,{adds:o})=>{let i=e.length,r=t.size;r>i&&(e.length=r);let a=0;for(let n=0;n{i.hasChildren()&&e&&!r?i.childrenAfterFilter=i.childrenAfterGroup.filter(a=>{let n=a.childrenAfterFilter&&a.childrenAfterFilter.length>0,s=a.data&&this.filterManager.doesRowPassFilter({rowNode:a});return n||s}):i.childrenAfterFilter=i.childrenAfterGroup,Ya(i)};if(this.doingTreeDataFiltering()){let i=(r,a)=>{if(r.childrenAfterGroup)for(let n=0;no(r,!1);io(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,i)}}softFilter(e,t){let o=r=>{if(r.childrenAfterFilter=r.childrenAfterGroup,r.hasChildren())for(let a of r.childrenAfterGroup)a.softFiltered=e&&!(a.data&&this.filterManager.doesRowPassFilter({rowNode:a}));Ya(r)},i=this.beans.rowModel;io(i.rootNode,i.hierarchical,t,o)}doingTreeDataFiltering(){var t;let{gos:e}=this;return!!((t=this.beans.groupStage)!=null&&t.treeData)&&!e.get("excludeChildrenWhenTreeDataFiltering")}},x3=4,k3=(e,t,o,i,r)=>{let a=t.childrenAfterSort,n=t.childrenAfterAggFilter;if(!n)return a&&a.length>0?a:[];let s=n.length;if(s<=1)return(a==null?void 0:a.length)===s&&(s===0||a[0]===n[0])?a:n.slice();if(!a||s<=x3)return e.doFullSortInPlace(n.slice(),r);let l=new Map,{updates:c,adds:d}=o,g=[];for(let h=0;he.compareRowNodes(r,h,p)||~l.get(h)-~l.get(p)),u===s?g:R3(e,r,g,a,l,s))},R3=(e,t,o,i,r,a)=>{var f;let n=new Array(a),s=0,l=o[s],c,d=-1,g=0,u=0,h=o.length,p=i.length;for(;;){if(d<0){if(g>=p)break;if(c=i[g++],d=(f=r.get(c))!=null?f:-1,d<0)continue}if((e.compareRowNodes(t,l,c)||~r.get(l)-d)<0){if(n[u++]=l,++s>=h)break;l=o[s]}else n[u++]=c,d=-1}for(;s=0&&(n[u++]=m)}return n},E3=(e,t,o)=>{let i=0;o.length=t.size;for(let r=0,a=e.length;r{let t=e.childrenAfterSort,o=e.sibling;if(o&&(o.childrenAfterSort=t),!!t)for(let i=0,r=t.length-1;i<=r;i++){let a=t[i],n=i===0,s=i===r;a.firstChild!==n&&(a.firstChild=n,a.dispatchRowEvent("firstChildChanged")),a.lastChild!==s&&(a.lastChild=s,a.dispatchRowEvent("lastChildChanged")),a.childIndex!==i&&(a.childIndex=i,a.dispatchRowEvent("childIndexChanged"))}},F3=class extends S{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){let o=this.beans.sortSvc.getSortOptions(),i=o.length>0&&!!t&&this.gos.get("deltaSort"),{gos:r,colModel:a,rowGroupColsSvc:n,rowNodeSorter:s,rowRenderer:l,showRowGroupCols:c}=this.beans,d=r.get("groupMaintainOrder"),g=a.getCols().some(C=>C.isRowGroupActive()),u=n==null?void 0:n.columns,h=a.isPivotMode(),p=r.getCallback("postSortRows"),f=!1,m,v=C=>{var R,F,P;let w=h&&C.leafGroup,y=d&&g&&!C.leafGroup;y&&(m!=null||(m=this.shouldSortContainsGroupCols(o)),y&&(y=!m));let x=null;if(y){let T=!1;if(u){let I=C.level+1;I{let t=e.childrenAfterSort,o=e.childrenAfterAggFilter,i=t==null?void 0:t.length,r=o==null?void 0:o.length;if(!i||!r)return null;let a=new Array(r),n=new Set;for(let l=0;l{var i;(i=this.beans.groupStage)==null||i.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){let{beans:e,stagesRefreshProps:t}=this,o=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=o;for(let i=o.length-1;i>=0;--i){let r=o[i];for(let a of r.refreshProps)t.set(a,i)}this.addManagedPropertyListeners([...t.keys(),"rowData"],i=>{var a;let r=(a=i.changeSet)==null?void 0:a.properties;r&&this.onPropChange(r)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,o,i){let r,a=!1;do{r=!1;let n=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),l=Math.max(n,o),c=Math.min(s,i);for(let d=l;d<=c;d++){let g=this.getRow(d);if(g.rowHeightEstimated){let u=Ft(this.beans,g);g.setRowHeight(u.height),r=!0,a=!0}}r&&this.setRowTopAndRowIndex()}while(r);return a}onPropChange(e){let{nodeManager:t,gos:o,beans:i}=this,r=i.groupStage;if(!t)return;let a=new Set(e),n=r==null?void 0:r.onPropChange(a),s;a.has("rowData")?s=o.get("rowData"):n&&(s=r==null?void 0:r.extractData()),s&&!Array.isArray(s)&&(s=null,k(1));let l={step:"nothing",changedProps:a};if(s){let d=!n&&!this.isEmpty()&&s.length>0&&o.exists("getRowId")&&!o.get("resetRowDataOnUpdate");this.refreshingData=!0,d?(l.keepRenderedRows=!0,l.animate=!o.get("suppressAnimationFrame"),l.changedRowNodes=new _i,t.setImmutableRowData(l,s)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(s),this.rowNodesCountReady=!0)}let c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){var a;let{stages:t,stagesRefreshProps:o}=this;if(!t)return null;let i=t.length,r=i;for(let n=0,s=e.length;n{(a==null?void 0:a.id)!=null&&!t.has(a.id)&&a.clearRowTopAndRowIndex()},i=a=>{o(a),o(a.detailNode),o(a.sibling);let n=a.childrenAfterGroup;if(!(!a.hasChildren()||!n)&&!(e&&a.level!==-1&&!a.expanded))for(let s=0,l=n.length;s{let c=a[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},s=t.footerSvc;return s?s==null?void 0:s.getTopDisplayIndex(i,e,a,n):n(e)}getTopLevelIndexFromDisplayedIndex(e){var s,l;let{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;let r=this.getRow(e);r.footer&&(r=r.sibling);let a=r.parent;for(;a&&a!==t;)r=a,a=r.parent;let n=(l=(s=t.childrenAfterSort)==null?void 0:s.indexOf(r))!=null?l:-1;return n>=0?n:e}getRowBounds(e){let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:bo(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){let i=t.length===0||t.some(r=>r.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:bo(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:bo(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;let{changedRowNodes:t,newData:o,rowDataUpdated:i}=e;return!(!t||o||!i||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){let{nodeManager:t,eventSvc:o,started:i}=this;if(!t)return;let r=!!e.rowDataUpdated;if(i&&r&&o.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let a=!1;this.refreshingModel=!0;try{this.executeRefresh(e,r),a=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,a||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){var n,s,l;let{beans:o,rootNode:i}=this;(n=o.masterDetailSvc)==null||n.refreshModel(e),t&&e.step!=="group"&&((s=o.colFilter)==null||s.refreshModel());let r=e.changedPath;switch(r==null||r.addRow(i),e.step==="group"&&(this.doGrouping(i,e),r!=null||(r=e.changedPath)),r!=null||(r=(l=o.changedPathFactory)==null?void 0:l.ensureRowsPath(e,i)),e.step){case"group":case"filter":this.doFilter(r);case"pivot":this.doPivot(r)&&(r=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(r);case"filter_aggregates":this.doFilterAggregates(r);case"sort":this.doSort(r,e.changedRowNodes);case"map":this.doRowsToDisplay()}let a=new Set;this.setRowTopAndRowIndex(a),this.clearRowTopAndRowIndex(r,a),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){var e,t,o;return!((t=(e=this.rootNode)==null?void 0:e._leafs)!=null&&t.length)||!((o=this.beans.colModel)!=null&&o.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){var o,i,r,a,n;let{beans:e,gos:t}=this;if((i=(o=this.rootNode)==null?void 0:o._leafs)!=null&&i.length){if((r=e.filterManager)!=null&&r.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||((n=(a=t.get("rowData"))==null?void 0:a.length)!=null?n:0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let o=!1,i=!1,r=[],a=gi(this.gos);return this.forEachNodeAfterFilterAndSort(n=>{if(i)return;if(o&&(n===t||n===e)&&(i=!0,a&&n.group)){kg(r,n);return}if(!o){if(n!==t&&n!==e)return;o=!0,t===e&&(i=!0)}(!n.group||!a)&&r.push(n)}),r}getTopLevelNodes(){var e,t;return(t=(e=this.rootNode)==null?void 0:e.childrenAfterGroup)!=null?t:null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){let t=this.rowsToDisplay,o=t.length;if(this.isEmpty()||o===0)return-1;let i=0,r=o-1;if(e<=0)return 0;if(t[r].rowTop<=e)return r;let n=-1,s=-1;for(;;){let l=Math.floor((i+r)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTope&&(r=l-1),n===i&&s===r))return l;n=i,s=r}}isRowInPixel(e,t){let o=e.rowTop,i=o+e.rowHeight;return o<=t&&i>t}forEachLeafNode(e){var o;let t=(o=this.rootNode)==null?void 0:o._leafs;if(t)for(let i=0,r=t.length;io.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterSort)}forEachPivotNode(e,t,o){let{colModel:i,rowGroupColsSvc:r}=this.beans;if(!i.isPivotMode())return;if(!(r!=null&&r.columns.length)){e(this.rootNode,0);return}let a=o?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,n=>n.leafGroup?null:n[a])}depthFirstSearchRowNodes(e,t=!1,o=a=>a.childrenAfterGroup,i=this.rootNode,r=0){var s,l;let a=r;if(!i)return a;let n=i===this.rootNode;if(n||e(i,a++),i.hasChildren()&&!i.footer){let c=n||this.hierarchical?o(i):null;if(c){let d=this.beans.footerSvc;a=(s=d==null?void 0:d.addTotalRows(a,i,e,t,n,"top"))!=null?s:a;for(let g of c)a=this.depthFirstSearchRowNodes(e,t,o,g,a);return(l=d==null?void 0:d.addTotalRows(a,i,e,t,n,"bottom"))!=null?l:a}}return a}doAggregate(e){var o;this.rootNode&&((o=this.beans.aggStage)==null||o.execute(e))}doFilterAggregates(e){let t=this.rootNode,o=this.beans.filterAggStage;if(o&&this.hierarchical){o.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;let i=t.sibling;i&&(i.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){let o=this.beans.sortStage;if(o){o.execute(e,t);return}io(this.rootNode,this.hierarchical,e,i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),xg(i)})}doGrouping(e,t){var r;let o=this.beans.groupStage,i=o==null?void 0:o.execute(t);if(i===void 0){let a=e._leafs;e.childrenAfterGroup=a,e.updateHasChildren();let n=e.sibling;n&&(n.childrenAfterGroup=a)}(i||t.rowDataUpdated)&&((r=this.beans.colFilter)==null||r.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){let t=this.beans.filterStage;if(t){t.execute(e);return}io(this.rootNode,this.hierarchical,e,o=>{o.childrenAfterFilter=o.childrenAfterGroup,Ya(o)})}doPivot(e){var t,o;return(o=(t=this.beans.pivotStage)==null?void 0:t.execute(e))!=null?o:!1}getRowNode(e){var o,i;let t=(o=this.nodeManager)==null?void 0:o.getRowNode(e);return typeof t=="object"?t:(i=this.beans.groupStage)==null?void 0:i.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];let o=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),o)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){let e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var l;let{nodeManager:e,beans:t,eventSvc:o,asyncTransactions:i}=this;if(!e)return;(l=t.valueCache)==null||l.onDataChanged();let r=[],a=[],n=new _i,s=!this.gos.get("suppressAnimationFrame");for(let{rowDataTransaction:c,callback:d}of i!=null?i:[]){this.rowNodesCountReady=!0,this.refreshingData=!0;let g=e.updateRowData(c,n,s);r.push(g),d&&a.push(d.bind(null,g))}this.commitTransactions(n,s),a.length>0&&setTimeout(()=>{for(let c=0,d=a.length;c0&&o.dispatchEvent({type:"asyncTransactionsFlushed",results:r}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){var a;let t=this.nodeManager;if(!t)return null;(a=this.beans.valueCache)==null||a.onDataChanged(),this.rowNodesCountReady=!0;let o=new _i,i=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;let r=t.updateRowData(e,o,i);return this.commitTransactions(o,i),r}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){var r,a,n;let{rootNode:e,beans:t}=this;if((r=t.formula)!=null&&r.active){let s=(a=e==null?void 0:e.childrenAfterSort)!=null?a:[];this.formulaRows=s,this.rowsToDisplay=s.filter(l=>!l.softFiltered);for(let l of this.rowsToDisplay)l.setUiLevel(0);return}let o=t.flattenStage;if(o){this.rowsToDisplay=o.execute();return}let i=(n=this.rootNode.childrenAfterSort)!=null?n:[];for(let s of i)s.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){let e=this.rootNode;if(!e)return;let t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);let o=e.sibling;o==null||o.setRowHeight(o.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let o=t.detailNode;o==null||o.setRowHeight(o.rowHeight,!0);let i=t.sibling;i==null||i.setRowHeight(i.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){var t;e.rowHeightChanged&&!((t=this.beans.rowAutoHeight)!=null&&t.active)&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},kg=(e,t)=>{let o=t.childrenAfterGroup;if(o)for(let i=0,r=o.length;i{var o;return(o=ot(e))==null?void 0:o.updateRowData(t)})}function H3(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=ot(e))==null?void 0:i.batchUpdateRowData(t,o)})}function B3(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=ot(e))==null?void 0:t.flushAsyncTransactions()})}function V3(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var N3={moduleName:"ClientSideRowModel",version:D,rowModels:["clientSide"],beans:[M3,F3],dependsOn:[ug]},G3={moduleName:"ClientSideRowModelApi",version:D,apiFunctions:{onGroupExpandedOrCollapsed:P3,refreshClientSideRowModel:I3,isRowDataEmpty:T3,forEachLeafNode:A3,forEachNodeAfterFilter:z3,forEachNodeAfterFilterAndSort:L3,applyTransaction:O3,applyTransactionAsync:H3,flushAsyncTransactions:B3,getBestCostNodeSelection:V3,resetRowHeights:yg,onRowHeightChanged:bg},dependsOn:[h3,p3]},W3=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function q3(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Rg({colAutosize:e,visibleCols:t},o,i){var r;Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({...o,colKeys:(r=o.colIds)!=null?r:t.allCols,source:"api"})}function _3(e,t){var o;t&&typeof t=="object"?Rg(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var U3=class extends S{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var o;let{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1,r=t.type;if(r==="fitGridWidth"||r==="fitProvidedWidth")i=!0;else if(r==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});let a=e.get("rowData");i=a!=null&&a.length>0&&ee(e)}i&&((o=this.beans.colDelayRenderSvc)==null||o.hideColumns(r))}}autoSizeCols(e){let{eventSvc:t,visibleCols:o,colModel:i}=this.beans;Wo(this.beans,!0),this.innerAutoSizeCols(e).then(r=>{var d;let a=g=>Io(t,Array.from(g),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return Wo(this.beans,!1),a(r);let n=Il(this.beans),s=g=>o.leftCols.some(u=>Zo(u,g)),l=g=>o.rightCols.some(u=>Zo(u,g)),c=e.colKeys.filter(g=>{var h;return!((h=i.getCol(g))!=null&&h.getColDef().suppressAutoSize)&&!pe(g)&&!s(g)&&!l(g)});this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(d=e.columnLimits)==null?void 0:d.map(g=>({...g,key:g.colId})),colKeys:c,onlyScaleUp:!0,animate:!1}),Wo(this.beans,!1),a(r)})}innerAutoSizeCols(e){return new Promise((t,o)=>{var x,R,F;if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,o));let{colKeys:i,skipHeader:r,skipHeaderGroups:a,stopAtGroup:n,defaultMaxWidth:s,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:g,renderStatus:u,colModel:h,autoWidthCalc:p,visibleCols:f}=this.beans;if(g==null||g.flushAllFrames(),this.timesDelayed<5&&u&&(!u.areHeaderCellsRendered()||!u.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,o)});return}this.timesDelayed=0;let m=new Set,v=-1,C=Object.fromEntries(c.map(({colId:P,...T})=>[P,T])),w=r!=null?r:this.gos.get("skipHeaderOnAutoSize"),y=a!=null?a:w;for(;v!==0;){v=0;let P=[];for(let T of i){if(!T||tp(T))continue;let I=h.getCol(T);if(!I||m.has(I)||I.getColDef().suppressAutoSize)continue;let z=p.getPreferredWidthForColumn(I,w);if(z>0){let L=(x=C[I.colId])!=null?x:{};(R=L.minWidth)!=null||(L.minWidth=l),(F=L.maxWidth)!=null||(L.maxWidth=s);let N=j3(I,z,L);I.setActualWidth(N,d),m.add(I),v++}P.push(I)}P.length&&f.refresh(d)}y||this.autoSizeColumnGroupsByColumns(i,d,n),t(m)})}autoSizeColumn(e,t,o){this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){let{colModel:i,ctrlsSvc:r}=this.beans,a=new Set,n=i.getColsForKeys(e);for(let l of n){let c=l.getParent();for(;c&&c!=o;)c.isPadding()||a.add(c),c=c.getParent()}let s;for(let l of a){for(let c of r.getHeaderRowContainerCtrls())if(s=c.getHeaderCtrlForColumn(l),s)break;s==null||s.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){let o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);let r=new Vt(e);return r.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),r.destroy()}}addColumnGroupResize(e,t,o){let i=this.gos.get("skipHeaderOnAutoSize"),r=()=>{let a=[],n=t.getDisplayedLeafColumns();for(let s of n)s.getColDef().suppressAutoSize||a.push(s.getColId());a.length>0&&this.autoSizeCols({colKeys:a,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",r),()=>e.removeEventListener("dblclick",r)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let o=Il(this.beans);if(o>0){this.sizeColumnsToFit(o,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):k(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var v,C,w,y,x,R,F,P,T,I,z,L,N,j;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}let{beans:r}=this,a=(v=i==null?void 0:i.animate)!=null?v:!0;a&&Wo(r,!0);let n={};for(let{key:A,...H}of(C=i==null?void 0:i.columnLimits)!=null?C:[])n[typeof A=="string"?A:A.getColId()]=H;let s=r.visibleCols.allCols;if(e<=0||!s.length)return;let l=at(s);if(i!=null&&i.onlyScaleUp&&l>e||e===l&&s.every(H=>{var We,le;if(H.colDef.suppressSizeToFit)return!0;let V=n==null?void 0:n[H.getId()],Z=(We=V==null?void 0:V.minWidth)!=null?We:i==null?void 0:i.defaultMinWidth,K=(le=V==null?void 0:V.maxWidth)!=null?le:i==null?void 0:i.defaultMaxWidth,ge=H.getActualWidth();return(Z==null||ge>=Z)&&(K==null||ge<=K)}))return;let d=[],g=[];for(let A of s){let H=(y=(w=i==null?void 0:i.colKeys)==null?void 0:w.some(V=>Zo(A,V)))!=null?y:!0;A.getColDef().suppressSizeToFit||!H?g.push(A):d.push(A)}let u=d.slice(0),h=!1,p=A=>{Xe(d,A),g.push(A)},f={};for(let A of d){i!=null&&i.onlyScaleUp&&(f[A.getColId()]=A.getActualWidth()),A.resetActualWidth(t);let H=n==null?void 0:n[A.getId()],V=(R=(x=H==null?void 0:H.minWidth)!=null?x:i==null?void 0:i.defaultMinWidth)!=null?R:-1/0,Z=(P=(F=H==null?void 0:H.maxWidth)!=null?F:i==null?void 0:i.defaultMaxWidth)!=null?P:1/0,K=A.getActualWidth(),ge=Math.max(Math.min(K,Z),V);ge!=K&&A.setActualWidth(ge,t,!0)}for(;!h;){h=!0;let A=e-at(g);if(A<=0)for(let H of d){let V=(z=(I=(T=n==null?void 0:n[H.getId()])==null?void 0:T.minWidth)!=null?I:i==null?void 0:i.defaultMinWidth)!=null?z:H.minWidth;H.setActualWidth(V,t,!0)}else{let H=A/at(d),V=A;for(let Z=d.length-1;Z>=0;Z--){let K=d[Z],ge=K.getColId(),We=f[ge],le=n==null?void 0:n[ge],it=(N=(L=le==null?void 0:le.minWidth)!=null?L:i==null?void 0:i.defaultMinWidth)!=null?N:We,so=(j=le==null?void 0:le.maxWidth)!=null?j:i==null?void 0:i.defaultMaxWidth,Oo=Math.max(it!=null?it:-1/0,K.getMinWidth()),Ho=Math.min(so!=null?so:1/0,K.getMaxWidth()),J=Math.round(K.getActualWidth()*H);JHo?(J=Ho,p(K),h=!1):Z===0&&(J=V),K.setActualWidth(J,t,!0),V-=J}}}for(let A of u)A.fireColumnWidthChangedEvent(t);let m=r.visibleCols;m.setLeftValues(t),m.updateBodyWidths(),!o&&(Io(this.eventSvc,u,!0,t),a&&Wo(r,!1))}applyAutosizeStrategy(){let{gos:e,colDelayRenderSvc:t}=this.beans,o=e.get("autoSizeStrategy");(o==null?void 0:o.type)!=="fitGridWidth"&&(o==null?void 0:o.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;let i=o.type;if(i==="fitGridWidth"){let{columnLimits:r,defaultMinWidth:a,defaultMaxWidth:n}=o,s=r==null?void 0:r.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:a,defaultMaxWidth:n,columnLimits:s})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(o.width,"sizeColumnsToFit");t==null||t.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var i;if(!this.isAlive())return;let o="autosizeColumns";e?this.autoSizeCols({...t,source:o,colKeys:e}):this.autoSizeAllColumns({...t,source:o}),(i=this.beans.colDelayRenderSvc)==null||i.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(let e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function j3(e,t,o={}){var a,n;let i=(a=o.minWidth)!=null?a:e.getMinWidth();tr&&(t=r),t}function Il({ctrlsSvc:e,scrollVisibleSvc:t}){let o=e.getGridBodyCtrl(),r=o.isVerticalScrollShowing()?t.getScrollbarWidth():0;return ni(o.eGridBody)-r}var Tl="ag-animate-autosize";function Wo({ctrlsSvc:e,gos:t},o){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;let i=e.getGridBodyCtrl().eGridBody.classList;o?i.add(Tl):i.remove(Tl)}var K3={moduleName:"ColumnAutoSize",version:D,beans:[U3],apiFunctions:{sizeColumnsToFit:q3,autoSizeColumns:Rg,autoSizeAllColumns:_3},dependsOn:[Hd],css:[W3]};function $3(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var Y3=class extends S{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{let{beans:i,gos:r,element:a,columns:n}=this,s=i.colHover;if(o!=null?o:!!r.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(a,{mouseover:s.setMouseOver.bind(s,n),mouseout:s.clearMouseOver.bind(s)});else{for(let c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},Q3="ag-column-hover",Z3=class extends S{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;let t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){let i=()=>{let r=this.isHovered(o);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;let o=this.isHovered(e);t.toggleCss(Q3,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);let r=()=>{let a=this.isHovered(o);t.toggleCss("ag-column-hover",a)};e.addManagedEventListeners({columnHoverChanged:r}),r()}createHoverFeature(e,t,o){e.createManagedBean(new Y3(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},J3={moduleName:"ColumnHover",version:D,beans:[Z3],apiFunctions:{isColumnHovered:$3}},X3=class extends S{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){let{allColumns:o,columnKeys:i,skipRowGroups:r,exportRowNumbers:a}=t,n=this.getColumnsToExport({allColumns:o,skipRowGroups:r,columnKeys:i,exportRowNumbers:a});return[this.prepareSession(n),this.prependContent(t),this.exportColumnGroups(t,n),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t)].reduce((s,l)=>l(s),e).parse()}processRow(e,t,o,i){var p;let r=t.shouldRowBeSkipped||(()=>!1),n=t.rowPositions!=null||!!t.onlySelected,s=this.gos.get("groupHideOpenParents")&&!n,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,c=!!i.footer,d=i.allChildrenCount===1&&((p=i.childrenAfterGroup)==null?void 0:p.length)===1&&Dh(this.gos,i);if(!l&&!c&&(t.skipRowGroups||d||s)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.stub||i.level===-1&&!l&&!c||r(O(this.gos,{node:i})))return;let h=e.onNewBodyRow(i);if(o.forEach((f,m)=>{h.onColumn(f,m,i)}),t.getCustomContentBelowRow){let f=t.getCustomContentBelowRow(O(this.gos,{node:i}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{let o=e.appendContent;return o&&t.addCustomContent(o),t}}prependContent(e){return t=>{let o=e.prependContent;return o&&t.addCustomContent(o),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return o=>{if(!e.skipColumnGroupHeaders){let i=new Nd,{colGroupSvc:r}=this.beans,a=r?r.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(a,o,e.processGroupHeaderCallback)}return o}}exportHeaders(e,t){return o=>{if(!e.skipColumnHeaders){let i=o.onNewHeaderRow();t.forEach((r,a)=>{i.onColumn(r,a,void 0)})}return o}}processPinnedTopRows(e,t){return o=>{var r,a;let i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="top").sort((n,s)=>n.rowIndex-s.rowIndex).map(n=>{var s;return(s=this.pinnedRowModel)==null?void 0:s.getPinnedTopRow(n.rowIndex)}).forEach(i):(r=this.pinnedRowModel)!=null&&r.isManual()||(a=this.pinnedRowModel)==null||a.forEachPinnedRow("top",i),o}}processRows(e,t){return o=>{var c,d;let i=this.rowModel,r=ee(this.gos,i),a=mi(this.gos,i),n=!r&&e.onlySelected,s=this.processRow.bind(this,o,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(g=>g.rowPinned==null).sort((g,u)=>g.rowIndex-u.rowIndex).map(g=>i.getRow(g.rowIndex)).forEach(s);else if(this.colModel.isPivotMode())r?i.forEachPivotNode(s,!0,l==="filteredAndSorted"):a?i.forEachNodeAfterFilterAndSort(s,!0):i.forEachNode(s);else if(e.onlySelectedAllPages||n){let g=(d=(c=this.beans.selectionSvc)==null?void 0:c.getSelectedNodes())!=null?d:[];this.replicateSortedOrder(g),g.forEach(s)}else l==="all"?i.forEachNode(s):r||a?i.forEachNodeAfterFilterAndSort(s,!0):i.forEachNode(s);return o}}replicateSortedOrder(e){let{sortSvc:t,rowNodeSorter:o}=this.beans;if(!t||!o)return;let i=t.getSortOptions(),r=(a,n)=>{var s,l,c,d;return a.rowIndex!=null&&n.rowIndex!=null?a.rowIndex-n.rowIndex:a.level===n.level?((s=a.parent)==null?void 0:s.id)===((l=n.parent)==null?void 0:l.id)?o.compareRowNodes(i,a,n)||((c=a.rowIndex)!=null?c:-1)-((d=n.rowIndex)!=null?d:-1):r(a.parent,n.parent):a.level>n.level?r(a.parent,n):r(a,n.parent)};e.sort(r)}processPinnedBottomRows(e,t){return o=>{var r,a;let i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="bottom").sort((n,s)=>n.rowIndex-s.rowIndex).map(n=>{var s;return(s=this.pinnedRowModel)==null?void 0:s.getPinnedBottomRow(n.rowIndex)}).forEach(i):(r=this.pinnedRowModel)!=null&&r.isManual()||(a=this.pinnedRowModel)==null||a.forEachPinnedRow("bottom",i),o}}getColumnsToExport(e){let{allColumns:t=!1,skipRowGroups:o=!1,exportRowNumbers:i=!1,columnKeys:r}=e,{colModel:a,gos:n,visibleCols:s}=this,l=a.isPivotMode(),c=u=>At(u)?!1:!pe(u)||i;if(r!=null&&r.length)return a.getColsForKeys(r).filter(c);let d=n.get("treeData"),g=[];return t&&!l?g=a.getCols():g=s.allCols,g=g.filter(u=>c(u)&&(o&&!d?!xn(u):!0)),g}recursivelyAddHeaderGroups(e,t,o){var r;let i=[];for(let a of e){let n=a;if(n.getChildren)for(let s of(r=n.getChildren())!=null?r:[])i.push(s)}e.length>0&&X(e[0])&&this.doAddHeaderHeader(t,e,o),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,o)}doAddHeaderHeader(e,t,o){let i=e.onNewHeaderGroupingRow(),r=0;for(let a of t){let n=a,s;o?s=o(O(this.gos,{columnGroup:n})):s=this.beans.colNames.getDisplayNameForColumnGroup(n,"header");let c=(n.isExpandable()?n.getLeafColumns():[]).reduce((d,g,u,h)=>{let p=U(d);return g.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[u],d.push(p)):p&&p[1]==null&&(p[1]=u-1),u===h.length-1&&p&&p[1]==null&&(p[1]=u),d},[]);i.onColumn(n,s||"",r++,n.getLeafColumns().length-1,c)}}},eS={moduleName:"SharedExport",version:D,beans:[X3]},tS=class extends S{getFileName(e){let t=this.getDefaultFileExtension();return e!=null&&e.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function oS(e,t){let o=document.defaultView||window;if(!o){k(52);return}let i=document.createElement("a"),r=o.URL.createObjectURL(t);i.setAttribute("href",r),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),i.remove(),o.setTimeout(()=>{o.URL.revokeObjectURL(r)},0)}var iS=class{constructor(e){this.valueFrom="data";let{colModel:t,rowGroupColsSvc:o,colNames:i,valueSvc:r,gos:a,processCellCallback:n,processHeaderCallback:s,processGroupHeaderCallback:l,processRowGroupCallback:c,valueFrom:d}=e;this.colModel=t,this.rowGroupColsSvc=o,this.colNames=i,this.valueSvc=r,this.gos=a,this.processCellCallback=n,this.processHeaderCallback=s,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c,d&&(this.valueFrom=d)}prepare(e){}extractHeaderValue(e){let t=this.getHeaderName(this.processHeaderCallback,e);return t!=null?t:""}extractRowCellValue(e){var p,f,m,v,C;let{column:t,node:o,currentColumnIndex:i,accumulatedRowIndex:r,type:a,useRawFormula:n}=e,s=i===0&&Ac(this.gos,o,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||o.group)&&(t.isRowGroupDisplayed((f=(p=o.rowGroupColumn)==null?void 0:p.getColId())!=null?f:"")||s))return{value:(m=this.processRowGroupCallback(O(this.gos,{column:t,node:o})))!=null?m:""};if(this.processCellCallback)return{value:(v=this.processCellCallback(O(this.gos,{accumulatedRowIndex:r,column:t,node:o,value:this.valueSvc.getValueForDisplay({column:t,node:o,from:this.valueFrom}).value,type:a,parseValue:w=>this.valueSvc.parseValue(t,o,w,this.valueSvc.getValue(t,o,this.valueFrom)),formatValue:w=>{var y;return(y=this.valueSvc.formatValue(t,o,w))!=null?y:w}})))!=null?v:""};let l=this.gos.get("treeData"),c=this.valueSvc,d=o.level===-1&&o.footer,g=t.colDef.showRowGroup===!0&&(o.group||l);if(!d&&(s||g)){let w="",y=o;for(;y&&y.level!==-1;){let{value:x,valueFormatted:R}=c.getValueForDisplay({column:s?void 0:t,node:y,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});w=` -> ${(C=R!=null?R:x)!=null?C:""}${w}`,y=y.parent}return{value:w,valueFormatted:w}}let{value:u,valueFormatted:h}=c.getValueForDisplay({column:t,node:o,includeValueFormatted:!0,exporting:!0,useRawFormula:n,from:this.valueFrom});return{value:u!=null?u:"",valueFormatted:h}}getHeaderName(e,t){return e?e(O(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},Al=`\r -`,rS=class extends iS{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";let{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,Al),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((o,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(o.data.value||""),o.mergeAcross&&this.appendEmptyCells(o.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,i){o!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){var r;t!=0&&(this.result+=this.columnSeparator);let i=this.extractRowCellValue({column:e,node:o,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes((r=i.valueFormatted)!=null?r:i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(k(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Al),this.isFirstLine=!1}},aS=class extends tS{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){let t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){k(51);return}let t=()=>{let i=this.getMergedParams(e),r=this.getData(i),a=new Blob(["\uFEFF",r],{type:"text/plain"}),n=i.fileName,s=typeof n=="function"?n(O(this.gos,{})):n;oS(this.getFileName(s),a)},{overlays:o}=this.beans;o?o.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){let{colModel:t,colNames:o,rowGroupColsSvc:i,valueSvc:r,gos:a}=this.beans,{processCellCallback:n,processHeaderCallback:s,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:g,valueFrom:u}=e;return new rS({colModel:t,colNames:o,valueSvc:r,gos:a,processCellCallback:n||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:g||",",rowGroupColsSvc:i,valueFrom:u})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function nS(e,t){var o;return(o=e.csvCreator)==null?void 0:o.getDataAsCsv(t)}function sS(e,t){var o;(o=e.csvCreator)==null||o.exportDataAsCsv(t)}var lS={moduleName:"CsvExport",version:D,beans:[aS],apiFunctions:{getDataAsCsv:nS,exportDataAsCsv:sS},dependsOn:[eS]},Eg=class extends ve{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){let o="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(o,e):i.removeAttribute(o))}updateTooltipText(){let{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){let e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){var e;(e=this.tooltipManager)==null||e.prepareToShowTooltip()}attemptToHideTooltip(){var e;(e=this.tooltipManager)==null||e.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()}},cS=1e3,dS=1e3,zl=100,Ll,Ai=!1,gS=class extends ve{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");let 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){let t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,o,i;return(i=(o=(t=this.tooltipCtrl)[`getTooltip${e}DelayOverride`])==null?void 0:o.call(t))!=null?i:this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!jt()&&(Ai?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},zl):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){var r;let t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=(r=this.tooltipComp)==null?void 0:r.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&(i!=null&&i.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Ai)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()-Llthis.hideTooltip(!0),...(n=t.getAdditionalParams)==null?void 0:n.call(t)});this.state=2,this.tooltipInstanceCount++;let i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(o,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Ll=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var n;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}let i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");let r=this.getLocaleTextFunc(),a=(n=this.popupSvc)==null?void 0:n.addPopup({eChild:i,ariaLabel:r("ariaLabelTooltip","Tooltip")});if(a&&(this.tooltipPopupDestroyFunc=a.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){let s=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:s}),this.setEventHandlers(s)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(te(this.beans),{keydown:s=>{i.contains(s==null?void 0:s.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var o;let e=(o=this.tooltipComp)==null?void 0:o.getGui(),t=Y(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){let t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,o;let e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(o=this.popupSvc)==null||o.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?dS:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(let e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Ai=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},zl)}unlockService(){Ai=!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()}},uS=class extends Eg{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()}},hS=class extends Fn{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){let{value:t}=e,o=this.getGui();o.textContent=zo(t);let i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},pS=".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}}",zi=0,fS=200,mS=class extends ve{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){let e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:r}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){let t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){let{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:r,eventSource:a,alignSide:n="left",position:s="over",type:l}=e,c=a.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(a,t);let g=()=>{let u=c.left-d.left;n==="right"&&(u-=t.offsetWidth-c.width);let h;return s==="over"?(h=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?h=c.top-d.top+c.height:h=c.top-t.offsetHeight-(i||0)*2-d.top),{x:u,y:h}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:r,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,a,null)})}positionPopupForMenu(e){let{eventSource:t,ePopup:o,event:i}=e,r=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,o);let n=!1,s=()=>{let l=this.keepXYWithinBounds(o,r.top-a.top,0),c=o.clientWidth>0?o.clientWidth:200;n||(o.style.minWidth=`${c}px`,n=!0);let g=a.right-a.left-c,u;return this.gos.get("enableRtl")?(u=p(),u<0&&(u=h(),this.setAlignedStyles(o,"left")),u>g&&(u=0,this.setAlignedStyles(o,"right"))):(u=h(),u>g&&(u=p(),this.setAlignedStyles(o,"right")),u<0&&(u=0,this.setAlignedStyles(o,"left"))),{x:u,y:l};function h(){return r.right-a.left-2}function p(){return r.left-a.left-c}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:s,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",o,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,o,i){let r=o.bottom-t.bottom,a=t.top-o.top,n=e.offsetHeight+i;return r>n?"under":a>n||a>r?"above":"under"}setAlignedStyles(e,t){let o=this.getPopupIndex(e);if(o===-1)return;let i=this.popupList[o],{alignedToElement:r}=i;if(!r)return;let a=["right","left","over","above","under"];for(let n of a)r.classList.remove(`ag-has-popup-positioned-${n}`),e.classList.remove(`ag-popup-positioned-${n}`);t&&(r.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){let o=this.getPopupIndex(t);if(o!==-1){let i=this.popupList[o];i.alignedToElement=e}}positionPopup(e){let{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:r,skipObserver:a,updatePosition:n}=e,s={width:0,height:0},l=(c=!1)=>{let{x:d,y:g}=n();c&&t.clientWidth===s.width&&t.clientHeight===s.height||(s.width=t.clientWidth,s.height=t.clientHeight,i&&(d+=i),r&&(g+=r),o&&(d=this.keepXYWithinBounds(t,d,1),g=this.keepXYWithinBounds(t,g,0)),t.style.left=`${d}px`,t.style.top=`${g}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!a){let c=Tt(this.beans,t,()=>l(!0));setTimeout(()=>c(),fS)}}getParentRect(){let e=te(this.beans),t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),cc(t)}keepXYWithinBounds(e,t,o){let i=o===0,r=i?"clientHeight":"clientWidth",a=i?"top":"left",n=i?"height":"width",s=i?"scrollTop":"scrollLeft",l=te(this.beans),c=l.documentElement,d=this.getPopupParent(),g=e.getBoundingClientRect(),u=d.getBoundingClientRect(),h=l.documentElement.getBoundingClientRect(),p=d===l.body,f=Math.ceil(g[n]),v=p?(i?lc:$i)(c)+c[s]:d[r];p&&(v-=Math.abs(h[a]-u[a]));let C=v-f;return Math.min(Math.max(t,0),Math.max(C,0))}addPopup(e){let{eChild:t,ariaLabel:o,ariaOwns:i,alwaysOnTop:r,positionCallback:a,anchorToElement:n}=e,s=this.getPopupIndex(t);if(s!==-1)return{hideFunc:this.popupList[s].hideFunc};this.initialisePopupPosition(t);let l=this.createPopupWrapper(t,!!r,o,i),c=this.addEventListenersToPopup({...e,wrapperEl:l});return a&&a(),this.addPopupToPopupList(t,l,c,n),{hideFunc:c}}initialisePopupPosition(e){let o=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${o.top*-1}px`),M(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){let r=this.getPopupParent(),{environment:a,gos:n}=this.beans,s=Qt({tag:"div"});return a.applyThemeClasses(s),s.classList.add("ag-popup"),e.classList.add(n.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Rt(e,"dialog"),o?Fo(e,o):i&&(e.id||(e.id=`popup-component-${zi}`),bs(i,e.id)),s.appendChild(e),r.appendChild(s),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),s}addEventListenersToPopup(e){let t=this.beans,o=te(t),{wrapperEl:i,eChild:r,closedCallback:a,afterGuiAttached:n,closeOnEsc:s,modal:l,ariaOwns:c}=e,d=!1,g=f=>{if(!i.contains(Y(t)))return;f.key===b.ESCAPE&&!this.isStopPropagation(f)&&p({keyboardEvent:f})},u=f=>p({mouseEvent:f}),h=f=>p({touchEvent:f}),p=(f={})=>{let{mouseEvent:m,touchEvent:v,keyboardEvent:C,forceHide:w}=f;!w&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:v},r)||d)||(d=!0,i.remove(),o.removeEventListener("keydown",g),o.removeEventListener("mousedown",u),o.removeEventListener("touchstart",h),o.removeEventListener("contextmenu",u),this.eventSvc.removeListener("dragStarted",u),a&&a(m||v||C),this.removePopupFromPopupList(r,c))};return n&&n({hidePopup:p}),window.setTimeout(()=>{s&&o.addEventListener("keydown",g),l&&(o.addEventListener("mousedown",u),this.eventSvc.addListener("dragStarted",u),o.addEventListener("touchstart",h),o.addEventListener("contextmenu",u))},0),p}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:zi,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),zi=zi+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let o=this.getPopupIndex(e);if(o===-1)return;let i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(a=>a&&a()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;let r=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=r,i.isAnchored=!0,r}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&bs(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:r}=e,a=i.getBoundingClientRect(),n=g=>Number.parseInt(g.substring(0,g.length-1),10),s=(g,u)=>{let h=o[g]-a[g],p=n(r.style[g]);return{initialDiff:h,lastDiff:h,initial:p,last:p,direction:u}},l=s("top",0),c=s("left",1),d=this.beans.frameworkOverrides;return new $(g=>{d.wrapIncoming(()=>{up(()=>{let u=t.getBoundingClientRect(),h=i.getBoundingClientRect();if(h.top==0&&h.left==0&&h.height==0&&h.width==0){e.hidePopup();return}let f=(m,v)=>{let C=n(r.style[v]);m.last!==C&&(m.initial=C,m.last=C);let w=u[v]-h[v];if(w!=m.lastDiff){let y=this.keepXYWithinBounds(r,m.initial+m.initialDiff-w,m.direction);r.style[v]=`${y}px`,m.last=y}m.lastDiff=w};f(l,"top"),f(c,"left")},200).then(u=>{g(()=>{u!=null&&window.clearInterval(u)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){let{mouseEvent:o,touchEvent:i}=e,r=o||i;if(!r)return!1;let a=this.getPopupIndex(t);if(a===-1)return!1;for(let n=a;ne.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return ct(e)}},Ir={moduleName:"Popup",version:D,beans:[vS]};function Qa(e){return e.get("tooltipShowMode")==="whenTruncated"}var CS=(e,t)=>{let o=e;return typeof o.getTranslatedMessage=="function"?o.getTranslatedMessage(t):e.message},Za=(e,t,o)=>{var s,l,c;let{editModelSvc:i}=e,r=(l=(s=i==null?void 0:i.getCellValidationModel())==null?void 0:s.getCellValidation(t))==null?void 0:l.errorMessages,a=(c=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:c.errorMessages,n=r||a;return n!=null&&n.length?n.join(o("tooltipValidationErrorSeparator",". ")):void 0},wS=(e,t)=>{if(Qa(e.gos)){if(t.isCellRenderer()){let i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?si(()=>{let a=t.eGui;return a.querySelector(".ag-group-value")||a.querySelector(".ag-cell-value")||a}):void 0}return si(()=>{let i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},bS=(e,t,o)=>{let{editSvc:i}=e,{column:r}=t,a=wS(e,t),n=()=>i!=null&&i.isEditing(t)?!1:a?r.isTooltipEnabled()?a():!1:!0;return{shouldDisplayDefault:n,shouldDisplayColumnTooltip:n,shouldDisplayCustomTooltip:o!=null?o:n}},yS=({beans:e,ctrl:t,value:o,displayFunctions:i,translate:r})=>{let{editSvc:a,formula:n,gos:s}=e,{column:l,rowNode:c}=t;if(n!=null&&n.active&&l.isAllowFormula()){let m=n.getFormulaError(l,c);if(m)return{value:CS(m,r),location:"cellFormula",shouldDisplay:()=>!!(n!=null&&n.getFormulaError(l,c))}}if(!!!(a!=null&&a.isEditing(t))){let m=Za(e,t,r);if(m)return{value:m,location:"cellEditor",shouldDisplay:()=>!(a!=null&&a.isEditing(t))&&!!Za(e,t,r)}}let{shouldDisplayCustomTooltip:g,shouldDisplayColumnTooltip:u}=i;if(o!=null)return{value:o,location:"cell",shouldDisplay:g};let h=l.getColDef(),p=c.data;if(h.tooltipField&&M(p))return{value:Xo(p,h.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:u};let f=h.tooltipValueGetter;return f?{value:f(O(s,{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:u}:null},SS=class extends S{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);let r=this.gos,a=Qa(r),{column:n,eGui:s}=t,l=n.getColDef();!i&&a&&!l.headerComponent&&(i=si(()=>s.querySelector(".ag-header-cell-text")));let c="header",g=this.beans.colNames.getDisplayNameForColumn(n,"header",!0),u=o!=null?o:g,h={getGui:()=>s,getLocation:()=>c,getTooltipValue:()=>{var f,m;return(m=o!=null?o:(f=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:f.call(l,O(r,{location:c,colDef:l,column:n,value:u,valueFormatted:g})))!=null?m:l==null?void 0:l.headerTooltip},shouldDisplayTooltip:i,getAdditionalParams:()=>({column:n,colDef:n.getColDef()})},p=this.createTooltipFeature(h);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);let r=this.gos,a=Qa(r),{column:n,eGui:s}=t,l=n.getColGroupDef();!i&&a&&!(l!=null&&l.headerGroupComponent)&&(i=si(()=>s.querySelector(".ag-header-group-text")));let c="headerGroup",g=this.beans.colNames.getDisplayNameForColumnGroup(n,"header"),u=o!=null?o:g,h={getGui:()=>s,getLocation:()=>c,getTooltipValue:()=>{var f,m;return(m=o!=null?o:(f=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:f.call(l,O(r,{location:c,colDef:l,column:n,value:u,valueFormatted:g})))!=null?m:l==null?void 0:l.headerTooltip},shouldDisplayTooltip:i,getAdditionalParams:()=>{let f={column:n};return l&&(f.colDef=l),f}},p=this.createTooltipFeature(h);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,o){let{beans:i}=this,{column:r,rowNode:a}=e,n=bS(i,e,o),s=this.getLocaleTextFunc(),l=null,c=()=>(l=yS({beans:i,ctrl:e,value:t,displayFunctions:n,translate:s}),l),g={getGui:()=>e.eGui,getLocation:()=>{var u;return(u=l==null?void 0:l.location)!=null?u:"cell"},getTooltipValue:()=>{var u;return(u=c())==null?void 0:u.value},shouldDisplayTooltip:()=>{let u=l!=null?l:c();return u?u.shouldDisplay?u.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(g,i)}setupFullWidthRowTooltip(e,t,o,i){let r={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},a=this.beans,n=a.context;e&&t.destroyBean(e,n);let s=this.createTooltipFeature(r,a);if(s)return t.createBean(s,n)}setupCellEditorTooltip(e,t){var s,l;let{beans:o}=this,{context:i}=o,r=((s=t.getValidationElement)==null?void 0:s.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!r)return;let a={getGui:()=>r,getTooltipValue:()=>Za(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;let{editModelSvc:c}=o,d=(p=c==null?void 0:c.getRowValidationModel())==null?void 0:p.getRowValidationMap(),g=(f=c==null?void 0:c.getCellValidationModel())==null?void 0:f.getCellValidationMap(),u=!!d&&d.size>0,h=!!g&&g.size>0;return u||h}},n=this.createTooltipFeature(a,o);if(n)return e.createBean(n,i)}initCol(e){let{colDef:t}=e;e.tooltipEnabled=M(t.tooltipField)||M(t.tooltipValueGetter)||M(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},xS=class extends gS{createTooltipComp(e,t){let o=Wp(this.beans.userCompFactory,e);o==null||o.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){var e;(e=this.onColumnMovedEventCallback)==null||e.call(this),this.onColumnMovedEventCallback=void 0}},Fg={moduleName:"Tooltip",version:D,beans:[SS],dynamicBeans:{tooltipFeature:Eg,highlightTooltipFeature:uS,tooltipStateManager:xS},userComponents:{agTooltipComponent:hS},dependsOn:[Ir],css:[pS]},uo=class{constructor(e){this.cellValueChanges=e}},wa=class extends uo{constructor(e,t,o,i){super(e),this.initialRange=t,this.finalRange=o,this.ranges=i}},kS=10,Ol=class{constructor(e){this.actionStack=[],this.maxStackSize=e||kS,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}},RS=class extends S{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=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},o=this.activeCellEdit!==null&&Pn(this.activeCellEdit,t),i=this.activeRowEdit!==null&&Ef(this.activeRowEdit,t);if(!(o||i||this.isPasting||this.isRangeInAction))return;let{rowPinned:a,rowIndex:n,column:s,oldValue:l,value:c}=e,d={rowPinned:a,rowIndex:n,columnId:s.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){let{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;let o=e.get("undoRedoCellEditingLimit");if(o<=0)return;this.undoStack=new Ol(o),this.redoStack=new Ol(o),this.addListeners();let i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:r=>{r.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,r=>{this.gridBodyCtrl=r.gridBodyCtrl})}getCurrentUndoStackSize(){var e,t;return(t=(e=this.undoStack)==null?void 0:e.getCurrentStackSize())!=null?t:0}getCurrentRedoStackSize(){var e,t;return(t=(e=this.redoStack)==null?void 0:e.getCurrentStackSize())!=null?t:0}undo(e){let{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});let r=this.undoRedo(o,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:r})}redo(e){let{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});let r=this.undoRedo(i,o,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:r})}undoRedo(e,t,o,i,r){if(!e)return!1;let a=e.pop();return a!=null&&a.cellValueChanges?(this.processAction(a,n=>n[i],r),a instanceof wa?this.processRange(a.ranges||[a[o]]):this.processCell(a.cellValueChanges),t.push(a),!0):!1}processAction(e,t,o){let{changeDetectionSvc:i}=this.beans;i==null||i.beginDeferred();try{for(let r of e.cellValueChanges){let{rowIndex:a,rowPinned:n,columnId:s}=r,l={rowIndex:a,rowPinned:n},c=et(this.beans,l);c!=null&&c.displayed&&c.setDataValue(s,t(r),o)}}finally{i==null||i.endDeferred()}}processRange(e){let t,o=this.beans.rangeSvc;o.removeAllCellRanges(!0),e.forEach((i,r)=>{if(!i)return;let a=i.startRow,n=i.endRow;r===e.length-1&&(t={rowPinned:a.rowPinned,rowIndex:a.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));let s={rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:i.startColumn,columns:i.columns};o.addCellRange(s)})}processCell(e){let t=e[0],{rowIndex:o,rowPinned:i}=t,r={rowIndex:o,rowPinned:i},a=et(this.beans,r),n={rowPinned:t.rowPinned,rowIndex:a.rowIndex,columnId:t.columnId};this.setLastFocusedCell(n)}setLastFocusedCell(e){let{rowIndex:t,columnId:o,rowPinned:i}=e,{colModel:r,focusSvc:a,rangeSvc:n}=this.beans,s=r.getCol(o);if(!s)return;let{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(s);let c={rowIndex:t,column:s,rowPinned:i};a.setFocusedCell({...c,forceBrowserFocus:!0}),n==null||n.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new uo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){let o=new uo(this.cellValueChanges);this.pushActionsToUndoStack(o)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new uo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new wa(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e,{rangeSvc:t,gos:o}=this.beans;t&&dt(o)?e=new wa(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new uo(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==null?void 0:t.length)===0))return;let o=new uo(t!=null?t:[]);this.pushActionsToUndoStack(o),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},ES=".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}",FS={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},DS=class extends Er{constructor(){super(FS,[Nn]),this.eEditor=E}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;let t=e!=null?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){let t=this.getLocaleTextFunc(),o=yr(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},ut=class extends Gt{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){let o=this.eInput;return o.value!==e&&(o.value=M(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){let t=this.eInput,o=e.length>0;t.setCustomValidity(e),o&&t.reportValidity(),gn(t,o)}preventDisallowedCharacters(){let e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{Cd(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{var r;let i=(r=o.clipboardData)==null?void 0:r.getData("text");i!=null&&i.split("").some(a=>!e.test(a))&&o.preventDefault()}})}},Tr={selector:"AG-INPUT-TEXT-FIELD",component:ut},MS=class extends ut{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();let e=zt();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}setMin(e){var o;let t=e instanceof Date?(o=fe(e!=null?e:null,!!this.includeTime))!=null?o:void 0:e;return this.min===t?this:(this.min=t,we(this.eInput,"min",t),this)}setMax(e){var o;let t=e instanceof Date?(o=fe(e!=null?e:null,!!this.includeTime))!=null?o:void 0:e;return this.max===t?this:(this.max=t,we(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,we(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(){var e;if(this.eInput.validity.valid)return(e=me(this.getValue()))!=null?e:void 0}setDate(e,t){this.setValue(fe(e!=null?e:null,this.includeTime),t)}},Dg={selector:"AG-INPUT-DATE-FIELD",component:MS},Ar=class extends Er{constructor(e){super(),this.cellEditorInput=e,this.eEditor=E}initialiseEditor(e){let{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());let{eEditor:o}=this,{cellStartedEdit:i,eventKey:r,suppressPreventDefault:a}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let n,s=!0;i?(this.focusAfterAttached=!0,r===b.BACKSPACE||r===b.DELETE?n="":r&&r.length===1?a?s=!1:n=r:(n=t.getStartValue(),r!==b.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,n=t.getStartValue()),s&&n!=null&&o.setStartValue(n),this.addGuiEventListener("keydown",l=>{let{key:c}=l;(c===b.PAGE_UP||c===b.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var i,r;let e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;zt()||t.getFocusableElement().focus();let o=t.getInputElement();this.highlightAllOnFocus?o.select():(r=(i=this.cellEditorInput).setCaret)==null||r.call(i)}focusIn(){let{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;let t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t!=null?t:null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},PS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},IS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return PS}getAgComponents(){return[Dg]}init(e,t){var n,s,l;this.eEditor=e,this.params=t;let{min:o,max:i,step:r,colDef:a}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),r!=null&&e.setStep(r),this.includeTime=(l=t.includeTime)!=null?l:(s=(n=this.getDataTypeService())==null?void 0:n.getDateIncludesTimeFlag)==null?void 0:s.call(n,a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:r,getValidationErrors:a}=o,n=[],s=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){let l=i instanceof Date?i:new Date(i);if(tl){let c=l.toLocaleDateString();n.push(s("maxDateValidation",`Date must be before ${c}`,[c]))}}}return n.length||(n=null),a?a({value:t,cellEditorParams:o,internalErrors:n}):n}getValue(){let{eEditor:e,params:t}=this,o=e.getDate();return!M(o)&&!M(t.value)?t.value:o!=null?o:null}getStartValue(){var t;let{value:e}=this.params;if(e instanceof Date)return fe(e,(t=this.includeTime)!=null?t:!1)}},TS=class extends Ar{constructor(){super(new IS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},AS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},zS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return AS}getAgComponents(){return[Dg]}init(e,t){var n,s,l;this.eEditor=e,this.params=t;let{min:o,max:i,step:r,colDef:a}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),r!=null&&e.setStep(r),this.includeTime=(l=t.includeTime)!=null?l:(s=(n=this.getDataTypeService())==null?void 0:n.getDateIncludesTimeFlag)==null?void 0:s.call(n,a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o!=null?o:void 0)),{min:r,max:a,getValidationErrors:n}=t,s=[];if(i){let l=new Date(i),c=this.getLocaleTextFunc();if(r){let d=new Date(r);if(ld){let g=d.toLocaleDateString();s.push(c("maxDateValidation",`Date must be before ${g}`,[g]))}}}return s.length||(s=null),n?n({value:this.getValue(),cellEditorParams:t,internalErrors:s}):s}getValue(){let{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!M(o)&&!M(e.value)?e.value:e.parseValue(o!=null?o:"")}getStartValue(){var e,t,o;return fe((t=this.parseDate((e=this.params.value)!=null?e:void 0))!=null?t:null,(o=this.includeTime)!=null?o:!1)}parseDate(e){var o;let t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):(o=me(e))!=null?o:void 0}formatDate(e){var o,i;let t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):(i=fe(e!=null?e:null,(o=this.includeTime)!=null?o:!1))!=null?i:void 0}},LS=class extends Ar{constructor(){super(new zS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},OS=class extends Gt{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){let 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}},HS={selector:"AG-INPUT-TEXT-AREA",component:OS},BS={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},VS=class extends Er{constructor(){super(BS,[HS]),this.eEditor=E}initialiseEditor(e){let{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,maxLength:r,cols:a,rows:n}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(r||200).setCols(a||60).setRows(n||10);let s;o?(this.focusAfterAttached=!0,i===b.BACKSPACE||i===b.DELETE?s="":i&&i.length===1?s=i:(s=this.getStartValue(e),i!==b.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=this.getStartValue(e)),s!=null&&t.setValue(s,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){var o;let{value:t}=e;return(o=t==null?void 0:t.toString())!=null?o:t}agSetEditValue(e){this.params.value=e;let t=this.getStartValue(this.params);this.eEditor.setValue(t!=null?t:"",!0)}onKeyDown(e){let t=e.key;(t===b.LEFT||t===b.UP||t===b.RIGHT||t===b.DOWN||e.shiftKey&&t===b.ENTER)&&e.stopPropagation()}afterGuiAttached(){let{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){let{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!M(i)&&!M(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),r=this.getValue(),a=[];return typeof r=="string"&&t!=null&&r.length>t&&a.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),o?o({value:r,internalErrors:a,cellEditorParams:e}):a}},Qn=class extends ut{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();let e=this.eInput;this.addManagedListeners(e,{blur:()=>{let a=Number.parseFloat(e.value),n=isNaN(a)?"":this.normalizeValue(a.toString());this.value!==n&&this.setValue(n)},wheel:this.onWheel.bind(this)}),e.step="any";let{precision:t,min:o,max:i,step:r}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof i=="number"&&this.setMax(i),typeof r=="number"&&this.setStep(r)}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){let o=this.precision;if(o==null)return e;if(t){let r=Number.parseFloat(e).toFixed(o);return Number.parseFloat(r).toString()}let i=String(e).split(".");if(i.length>1){if(i[1].length<=o)return e;if(o>0)return`${i[0]}.${i[1].slice(0,o)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,we(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,we(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,we(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(M(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);let r=this.normalizeValue(o);i=o!=r}if(i)return t(o)}return e(o)}getValue(e=!1){let t=this.eInput;if(!t.validity.valid&&!e)return;let o=t.value;return this.isScientificNotation(o)?this.adjustPrecision(o,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},NS={selector:"AG-INPUT-NUMBER-FIELD",component:Qn},GS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},WS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return GS}getAgComponents(){return[NS]}init(e,t){this.eEditor=e,this.params=t;let{max:o,min:i,precision:r,step:a}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),r!=null&&e.setPrecision(r),a!=null&&e.setStep(a);let n=e.getInputElement();t.preventStepping?e.addManagedElementListeners(n,{keydown:this.preventStepping}):t.showStepperButtons&&n.classList.add("ag-number-field-input-stepper")}getValidationErrors(){let{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,a=this.eEditor.getInputElement().valueAsNumber,n=this.getLocaleTextFunc(),s=[];return typeof a=="number"&&(t!=null&&ao&&s.push(n("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),s.length||(s=null),i?i({value:a,cellEditorParams:e,internalErrors:s}):s}preventStepping(e){(e.key===b.UP||e.key===b.DOWN)&&e.preventDefault()}getValue(){let{eEditor:e,params:t}=this,o=e.getValue();if(!M(o)&&!M(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){zt()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},qS=class extends Ar{constructor(){super(new WS(()=>this.getLocaleTextFunc()))}},_S=".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)}}",US="ag-active-item",jS=(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}]}),KS=class extends Lo{constructor(e,t,o){super(jS(e,t)),this.label=t,this.value=o,this.eText=E}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){let t=this.getGui();t.classList.toggle(US,e),nc(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){let o=this.getGui();Fu(o,e),Eu(o,t)}createTooltip(){let e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>hc(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){let e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},$S=class extends Lo{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(_S)}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){let t=e.key;switch(t){case b.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{let o=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(o)}break;case b.DOWN:case b.UP:e.preventDefault(),this.navigate(t);break;case b.PAGE_DOWN:case b.PAGE_UP:case b.PAGE_HOME:case b.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){let{value:t,text:o}=e,i=o!=null?o:t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(let e of this.listItems)e.destroy();ne(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){let 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;let o=this.options.findIndex(i=>i.value===e);if(o!==-1){let i=this.options[o];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();let e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){let t=e.getGui();if(!Ie(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;let o=this.getGui(),{scrollTop:i,clientHeight:r}=o,{offsetTop:a,offsetHeight:n}=t;(a+n>i+r||a{o.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},YS=".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}",QS={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"}}]}]},ZS=class extends qd{constructor(e){if(super(e,(e==null?void 0:e.template)||QS,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=E,this.eWrapper=E,this.eDisplayField=E,this.eIcon=E,this.registerCSS(YS),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:r,maxPickerWidth:a}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),r!=null&&this.setPickerMinWidth(r),a!=null&&this.setPickerMaxWidth(a)}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);let t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});let{pickerIcon:o,inputWidth:i}=this.config;if(o){let r=this.beans.iconSvc.createIconNoSpan(o);r&&this.eIcon.appendChild(r)}i!=null&&this.setInputWidth(i)}setupAria(){let e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),xa(e,!1),this.ariaRole&&Rt(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case b.UP:case b.DOWN:case b.ENTER:case b.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case b.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());let e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:i,modalPicker:r=!0},maxPickerHeight:a,minPickerWidth:n,maxPickerWidth:s,variableWidth:l,beans:c,eWrapper:d}=this,g={modal:r,eChild:e,closeOnEsc:!0,closedCallback:()=>{let f=ln(c);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:d};e.style.position="absolute";let u=c.popupSvc,h=u.addPopup(g);l?(n&&(e.style.minWidth=n),e.style.width=pn($i(d)),s&&(e.style.maxWidth=s)):Zi(e,s!=null?s:$i(d));let p=a!=null?a:`${un(u.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),h.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:i},eWrapper:r,pickerComponent:a}=this,n=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:r,ePopup:a.getGui(),position:"under",alignSide:n,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);let e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;let t=this.getAriaElement();xa(t,e);let o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Zi(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==null?void 0:e,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e==null?void 0:e,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e==null?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}},JS=".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}",Zn=class extends ZS{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(JS)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:si(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{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(){let e=this.createBean(new $S("select"));this.listComponent=e,e.setParentComponent(this);let t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Ou(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var o;let{key:t}=e;switch(t===b.TAB&&this.hidePicker(),t){case b.ENTER:case b.UP:case b.DOWN:case b.PAGE_UP:case b.PAGE_DOWN:case b.PAGE_HOME:case b.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(o=this.listComponent)==null||o.handleKeyDown(e):super.onKeyDown(e);break;case b.ESCAPE:super.onKeyDown(e);break;case b.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){let e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){var t;return(t=this.listComponent)!=null&&t.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,o){let{listComponent:i,config:{placeholder:r},eDisplayField:a,tooltipFeature:n}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&r&&(l=r),a.textContent=l,n==null||n.setTooltipAndRefresh(l!=null?l:null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},XS={selector:"AG-SELECT",component:Zn},e2={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},t2=class extends Er{constructor(){super(e2,[XS]),this.eEditor=E,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){var g;this.focusAfterAttached=e.cellStartedEdit;let{eEditor:t,valueSvc:o,gos:i}=this,{values:r,value:a,eventKey:n}=e;if(Q(r)){k(58);return}this.startedByEnter=n!=null?n===b.ENTER:!1;let s=!1;r.forEach(u=>{let h={value:u},p=o.formatValue(e.column,null,u),f=p!=null;h.text=f?p:u,t.addOption(h),s=s||a===u}),s?t.setValue((g=e.value)!=null?g:void 0,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e!=null?e:void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){let{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue(),r=[];if(t&&i!=null&&!t.includes(i)){let a=this.getLocaleTextFunc();r.push(a("invalidSelectionValidation","Invalid selection."))}else r=null;return o?o({value:i,internalErrors:r,cellEditorParams:e}):r}},o2={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},i2=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return o2}getAgComponents(){return[Tr]}init(e,t){this.eEditor=e,this.params=t;let o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),r=this.getLocaleTextFunc(),a=[];return t!=null&&typeof i=="string"&&i.length>t&&a.push(r("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),o?o({value:i,cellEditorParams:e,internalErrors:a}):a}getValue(){let{eEditor:e,params:t}=this,o=e.getValue();return!M(o)&&!M(t.value)?t.value:t.parseValue(o)}getStartValue(){let e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){zt()&&this.eEditor.getInputElement().focus({preventScroll:!0});let e=this.eEditor,t=e.getValue(),o=M(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Hl=class extends Ar{constructor(){super(new i2(()=>this.getLocaleTextFunc()))}};function r2(e){var t;(t=e.undoRedo)==null||t.undo("api")}function a2(e){var t;(t=e.undoRedo)==null||t.redo("api")}function n2(e,t){var o;return(o=e.editModelSvc)==null?void 0:o.getEditRowDataValue(t,{checkSiblings:!0})}function s2(e){var i;let t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((r,a)=>{let{rowIndex:n,rowPinned:s}=a;r.forEach((l,c)=>{let{editorValue:d,pendingValue:g,sourceValue:u,state:h}=l,p=Be(l),f=d!=null?d:g;f===ae&&(f=void 0);let m={newValue:f,oldValue:u,state:h,column:c,colId:c.getColId(),colKey:c.getColId(),rowIndex:n,rowPinned:s},v=h==="editing";(v||!v&&p)&&o.push(m)})}),o}function l2(e,t=!1){var i,r;let{editSvc:o}=e;if(o!=null&&o.isBatchEditing()){if(t)for(let a of(r=(i=e.editModelSvc)==null?void 0:i.getEditPositions())!=null?r:[])a.state==="editing"&&o.revertSingleCellEdit(a);else St(e,{persist:!0});bt(e,void 0,{cancel:t})}else o==null||o.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function c2(e,t){var i;let o=G(e,t);return!!((i=e.editSvc)!=null&&i.isEditing(o))}function d2(e,t){let{key:o,colKey:i,rowIndex:r,rowPinned:a}=t,{editSvc:n,colModel:s}=e,l=s.getCol(i);if(!l){k(12,{colKey:i});return}let d=et(e,{rowIndex:r,rowPinned:a||null,column:l});if(!d){k(290,{rowIndex:r,rowPinned:a});return}if(!(n!=null&&n.isCellEditable({rowNode:d,column:l},"api")))return;a==null&&wg(e,r),Cg(e,i),n==null||n.startEditing({rowNode:d,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api",editable:!0})}function g2(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function u2(e){var t,o;return(o=(t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())!=null?o:0}function h2(e){var t,o;return(o=(t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())!=null?o:0}var p2={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},f2=class extends Fn{constructor(e){super(p2),this.params=e}postConstruct(){Zt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params,o=i=>{Ba(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}};function m2(e,{column:t},o,i,r="ui"){var c;if(o instanceof KeyboardEvent&&(o.key===b.TAB||o.key===b.ENTER||o.key===b.F2||o.key===b.BACKSPACE&&i))return!0;if((o==null?void 0:o.shiftKey)&&((c=e.rangeSvc)==null?void 0:c.getCellRanges().length)!=0)return!1;let n=t==null?void 0:t.getColDef(),s=v2(e.gos,n),l=o==null?void 0:o.type;return l==="click"&&(o==null?void 0:o.detail)===1&&s===1||l==="dblclick"&&(o==null?void 0:o.detail)===2&&s===2?!0:r==="api"?!!i:!1}function v2(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function ba(e,t){var o,i;return(i=(o=e.editModelSvc)==null?void 0:o.hasEdits(t,{withOpenEditor:!0}))!=null?i:!1}function Ja(e,t){var n;let o=t.column,i=t.rowNode,r=o.getColDef();if(!i)return ba(e,t);let a=r.editable;return i.group&&r.groupRowEditable!=null?(n=e.rowGroupingEditValueSvc)!=null&&n.isGroupCellEditable(i,o)?!0:ba(e,t):o.isColumnFunc(i,a)?!0:ba(e,t)}function C2(e,t,o="ui"){let i=Ja(e,t);if(i||o==="ui")return i;let{rowNode:r,column:a}=t;for(let n of e.colModel.getCols())if(n!==a&&Ja(e,{rowNode:r,column:n}))return!0;return!1}var Cr=(e,t=!1)=>{if(e!==void 0)return Be(e)||t&&e.state==="editing"};function Mg(e,t,o=!1){var i;return Cr((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}var Pg=(e,t,o)=>{if(e)for(let i=0,r=e.length;i{let c={rowNode:i,column:l};return Mg(o,c,!0)||Ig(o,c)||Tg(o,c)});this.applyStyle(a,s);return}this.applyStyle(a)}applyStyle(e=!1,t=!1){var r,a;let o=!!((r=this.editSvc)!=null&&r.isBatchEditing()),i=this.gos.get("editType")==="fullRow";(a=this.rowCtrl)==null||a.forEachGui(void 0,({rowComp:n})=>{n.toggleCss("ag-row-editing",i&&t),n.toggleCss("ag-row-batch-edit",i&&t&&o),n.toggleCss("ag-row-inline-editing",t),n.toggleCss("ag-row-not-inline-editing",!t),n.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},y2=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{let r=new Set;e.forEachNode(a=>i.has(a)&&r.add(a)),t==null||t.forEachPinnedRow("top",a=>i.has(a)&&r.add(a)),t==null||t.forEachPinnedRow("bottom",a=>i.has(a)&&r.add(a));for(let a of i)r.has(a)||o.removeEdits({rowNode:a});return r},S2=({editModelSvc:e},t,o)=>{var i;for(let r of t)(i=e==null?void 0:e.getEditRow(r))==null||i.forEach((a,n)=>!o.has(n)&&e.removeEdits({rowNode:r,column:n}))},x2=e=>()=>{let t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());S2(e,y2(e,i),t)},k2=new Set(["undo","redo","paste","bulk","rangeSvc"]),R2=new Set(["ui","api"]),Ag={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},E2=new Set(Object.keys(Ag)),F2=new Set(["paste","rangeSvc","cellClear","redo","undo"]),ya={cancel:!0,source:"api"},D2={cancel:!1,source:"api"},Bt={checkSiblings:!0},vt={force:!0,suppressFlash:!0},M2={force:!0},P2=class extends S{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){let{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,ya),this.createStrategy(i)});let t=x2(e),o=()=>{let i=this.model.getCellValidationModel().getCellValidationMap().size>0,r=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||r?this.stopEditing(void 0,ya):this.isEditing()&&(this.batch?bt(e,this.model.getEditPositions()):this.stopEditing(void 0,D2)),!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,ya))}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){let{beans:t,gos:o,strategy:i}=this,r=Bl(o,e);if(i){if(i.beanName===r)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(r,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){var a;let r=m2(this.beans,e,t,o,i);return r&&((a=this.strategy)!=null||(this.strategy=this.createStrategy())),r}shouldStopEditing(e,t,o="ui"){var i,r;return(r=(i=this.strategy)==null?void 0:i.shouldStop(e,t,o))!=null?r:null}shouldCancelEditing(e,t,o="ui"){var i,r;return(r=(i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))!=null?r:null}validateEdit(){return g1(this.beans)}isEditing(e,t){return this.model.hasEdits(e!=null?e:void 0,t!=null?t:Bt)}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){var d,g;let{startedEdit:o=!0,event:i=null,source:r="ui",ignoreEventKey:a=!1,silent:n}=t;if((d=this.strategy)!=null||(this.strategy=this.createStrategy()),!((g=t.editable)!=null?g:this.isCellEditable(e,"api")))return;let l=G(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}let c=this.shouldStartEditing(e,i,o,r);if(c===!1&&r!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,r)&&!t.continueEditing&&this.stopEditing(void 0,{source:r}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:r,ignoreEventKey:a,startedEdit:o,silent:n})}stopEditing(e,t){let o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let i=!1,{edits:r}=o;try{let a=this.processStopRequest(o);return i||(i=a.res),r=a.edits,this.finishStopEditing({...o,edits:r,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){let{event:o=null,cancel:i=!1,source:r="ui",forceCancel:a=!1,forceStop:n=!1,commit:s=!1}=t||{};if(E2.has(r)&&this.batch)return e!=null&&e.rowNode&&(e!=null&&e.column)&&this.bulkRefreshCell(e),null;let l=this.committing?Ag[r]:r;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Bt))||!this.strategy||this.stopping)return null;let d=G(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);let g=!i&&(!!this.shouldStopEditing(e,o,l)||(this.committing||r==="paste")&&!this.batch)||n,u=i&&!!this.shouldCancelEditing(e,o,l)||a;return{cancel:i,cellCtrl:d,edits:this.model.getEditMap(!0),event:o!=null?o:null,forceCancel:a,forceStop:n,commit:s,position:e,source:r,treatAsSource:l,willCancel:u,willStop:g}}processStopRequest(e){var a;let{event:t,position:o,willCancel:i,willStop:r}=e;return r||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,o)?{res:!1,edits:this.handleMidBatchKey(t,o,e)}:(St(this.beans,{persist:!0}),this.batch&&((a=this.strategy)==null||a.cleanupEditors(o)),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){var p,f;let{beans:t,model:o}=this,{cancel:i,commit:r,edits:a,event:n,source:s,willCancel:l,willStop:c}=e,d=!this.batch||!l;St(t,{persist:d,isCancelling:l||i,isStopping:c});let g=o.getEditMap(),h=!l&&(!this.batch||r)?this.processEdits(g,s):[];i?(p=this.strategy)==null||p.stopCancelled(e.forceCancel):(f=this.strategy)==null||f.stopCommitted(n,r),this.clearValidationIfNoOpenEditors();for(let m of h)o.clearEditValue(m);this.bulkRefreshMap(a);for(let m of o.getEditPositions(g)){let v=G(t,m),C=Be(m);v==null||v.refreshCell({force:!0,suppressFlash:!C})}return{res:c,edits:g}}shouldHandleMidBatchKey(e,t){var o;return e instanceof KeyboardEvent&&this.batch&&!!((o=this.strategy)!=null&&o.midBatchInputsAllowed(t))&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,o){var g,u;let{beans:i,model:r}=this,{cellCtrl:a,edits:n}=o,{key:s}=e,l=s===b.ENTER,c=s===b.ESCAPE,d=s===b.TAB;if(l||d||c){if(l||d)St(i,{persist:!0});else if(c&&a){let{rowNode:h,column:p}=a;if(this.batch&&h&&p){let f={rowNode:h,column:p};bt(i,[f],{silent:!0}),this.model.stop(f,!0,!0),(g=G(i,f))==null||g.refreshCell(vt)}else this.revertSingleCellEdit(a)}return this.batch?(u=this.strategy)==null||u.cleanupEditors():bt(i,r.getEditPositions(),{event:e,cancel:c}),e.preventDefault(),this.bulkRefreshMap(n,{suppressFlash:!0}),r.getEditMap()}return n}finishStopEditing({cellCtrl:e,edits:t,params:o,position:i,res:r,commit:a,forceCancel:n,willCancel:s,willStop:l}){let c=this.beans;r&&i&&(!this.batch||a)&&this.model.removeEdits(i),this.navigateAfterEdit(o,e==null?void 0:e.cellPosition),jo(c),this.clearValidationIfNoOpenEditors();let{rowRenderer:d,formula:g}=c;if(s&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){g?g.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});let u=l&&a;(u||s&&n)&&this.dispatchBatchStopped(t,u)}}dispatchBatchStopped(e,t){let o;t&&(o=i1(e),o.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",o!=null?o:new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){var c;if(!e||!t)return;let{event:o,suppressNavigateAfterEdit:i}=e;if(!(o instanceof KeyboardEvent)||i)return;let{key:a,shiftKey:n}=o,s=this.gos.get("enterNavigatesVerticallyAfterEdit");if(a!==b.ENTER||!s)return;let l=n?b.UP:b.DOWN;(c=this.beans.navigation)==null||c.navigateToNextCell(null,l,t,!1)}processEdits(e,t){let o=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,r=[],{changeDetectionSvc:a}=this.beans;a==null||a.beginDeferred();try{for(let n of o){let s=e.get(n);for(let l of s.keys()){let c=s.get(l),d={rowNode:n,column:l};if(Be(c)&&!i){let g=G(this.beans,d);this.setNodeDataValue(n,l,c.pendingValue,g,t)||r.push(d)}}}}finally{a==null||a.endDeferred()}return r}setNodeDataValue(e,t,o,i,r="edit"){let a=R2.has(r)?"edit":r;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,o,a)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){var i;let o=this.model.getEdit(e);o&&o.state!=="editing"&&(t?(i=this.beans.editModelSvc)==null||i.setEdit(e,{sourceValue:o.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){var i,r;(i=this.strategy)!=null||(this.strategy=this.createStrategy()),(r=this.strategy)==null||r.setEditMap(e,t),this.bulkRefreshMap(e);let o=vt;t!=null&&t.forceRefreshOfEditCellsOnly&&(o={...I2(e),...vt}),this.beans.rowRenderer.refreshCells(o)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;let{pendingValue:i,sourceValue:r}=o,{rowIndex:a,rowPinned:n,data:s}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:a,rowPinned:n,column:t,source:"api",data:s,newValue:i,oldValue:r,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){ee(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){ee(this.gos,this.beans.rowModel)&&e.forEach((o,i)=>{for(let r of o.keys())this.refCell({rowNode:i,column:r},o.get(r),t)})}refCell({rowNode:e,column:t},o,i={}){var g,u,h,p;let{beans:r,gos:a}=this,n=new Set([e]),s=new Set,l=e.pinnedSibling;l&&n.add(l);let c=e.sibling;c&&s.add(c);let d=e.parent;for(;d;)(g=d.sibling)!=null&&g.footer&&a.get("groupTotalRow")||!d.parent&&d.sibling&&a.get("grandTotalRow")?s.add(d.sibling):s.add(d),d=d.parent;for(let f of n)this.dispatchEditValuesChanged({rowNode:f,column:t},o);for(let f of n)(u=G(r,{rowNode:f,column:t}))==null||u.refreshCell(i);for(let f of s){let m=G(r,{rowNode:f,column:t});m&&(m.refreshCell(i),!i.force&&this.batch&&((p=(h=m.editStyleFeature)==null?void 0:h.applyCellStyles)==null||p.call(h)))}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var n;let{gos:o,beans:i}=this,r=e.rowNode;if(r.group&&e.column.getColDef().groupRowEditable==null){if(o.get("treeData")){if(!r.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}let a=Bl(o)==="fullRow"?C2(i,e,t):Ja(i,e);return a&&((n=this.strategy)!=null||(this.strategy=this.createStrategy())),a}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,r,a,n;if(this.hasValidationErrors(e)){let s=G(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(s&&!s.hasBrowserFocus()&&s.focusCell(),(n=(a=(r=s==null?void 0:s.comp)==null?void 0:r.getCellEditor())==null?void 0:a.focusIn)==null||n.call(a)),"block-stop"):(s&&this.revertSingleCellEdit(s),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,r,a,n;let o=G(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(bt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),oo(this.beans,e,{silent:!0}),kt(this.beans),o==null||o.refreshCell(vt),t&&(o==null||o.focusCell(),(n=(a=(r=o==null?void 0:o.comp)==null?void 0:r.getCellEditor())==null?void 0:a.focusIn)==null||n.call(a)))}hasValidationErrors(e){var i;kt(this.beans);let t=G(this.beans,e);t&&(t.refreshCell(vt),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var s;let r,a=this.isEditing(),n=a&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Eo&&a&&(r=(s=this.strategy)==null?void 0:s.moveToNextEditingCell(e,t,o,i,n)),r===null||(r=r||!!this.beans.focusSvc.focusedHeader,r===!1&&!n&&this.stopEditing()),r}getPendingEditValue(e,t,o){var a;if(o==="data"||o==="batch"&&!this.batch)return;let i=this.model.getEdit({rowNode:e,column:t},Bt);if(!i||this.stopping&&!this.batch&&!((a=i.editorState)!=null&&a.cellStartedEditing))return;if(o==="edit"){let n=i.editorValue;if(n!=null&&n!==ae)return n}let r=i.pendingValue;if(r!==ae)return r}getCellDataValue(e){let t=this.model.getEdit(e,Bt);if(t){let o=t.pendingValue;if(o!==ae)return o;let i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){e1(this,this.beans,e)}createPopupEditorWrapper(e){return new f2(e)}batchResetToSourceValue(e){var a,n;if(!this.batch)return!1;let t=this.model.getEdit(e);if(!t)return!1;let{pendingValue:o,sourceValue:i,state:r}=t;return o===i||r==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),(a=this.beans.editModelSvc)==null||a.removeEdits(e),(n=G(this.beans,e))==null||n.refreshCell(vt),!0)}setDataValue(e,t,o){var i;try{let r=this.batch,a=this.isEditing(r?void 0:e);if((!a||this.committing)&&!r&&!F2.has(o)||!a&&!r&&o==="paste"||o==="batch"&&!r)return;if(o==="edit"){if(a&&this.applyEditorValue(e,t))return!0;if(!r)return}if((i=this.strategy)!=null||(this.strategy=this.createStrategy()),o==="batch"||o==="edit")return this.applyDirectValue(e,t,o);let n=this.beans,s;if(r?s="ui":this.committing?s=o!=null?o:"api":s="api",!o||k2.has(o))return this.applyDirectValue(e,t,o);let l=this.applyExistingEdit(e,t,o,s);return l!==void 0?l:(go(n,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,o,i){var a;let r=this.model.getEdit(e);if(r)return r.pendingValue===t?!1:r.sourceValue!==t?(go(this.beans,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):((a=this.beans.editModelSvc)==null||a.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...r,pendingValue:t}),!0)}applyEditorValue(e,t){var n,s,l,c;let o=this.beans,i=G(o,e),r=(n=i==null?void 0:i.comp)==null?void 0:n.getCellEditor();return!i||!r?!1:(go(o,e,t,"edit",void 0,{persist:!0}),(l=(s=i.editStyleFeature)==null?void 0:s.applyCellStyles)==null||l.call(s),"agSetEditValue"in r?(r.agSetEditValue(t),!0):r.refresh&&i.editCompDetails?(r.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{var g,u,h;let d=G(this.beans,e);d==null||d.focusCell(!0),(h=(u=(g=d==null?void 0:d.comp)==null?void 0:g.getCellEditor())==null?void 0:u.focusIn)==null||h.call(u)}),bt(o,[e],{silent:!0,cancel:!0}),oo(o,e,{silent:!0}),kt(o),(c=G(o,e))==null||c.refreshCell(vt),!0))}applyDirectValue(e,t,o){var n,s,l;let i=this.beans;if(this.batch){if(o==="batch"&&((s=(n=G(i,e))==null?void 0:n.comp)!=null&&s.getCellEditor())){let{editModelSvc:c,valueSvc:d}=i,{rowNode:g,column:u}=e,h=c==null?void 0:c.getEdit(e);(h==null?void 0:h.sourceValue)===void 0&&(c==null||c.setEdit(e,{sourceValue:d.getValue(u,g,"data")})),c==null||c.setEdit(e,{pendingValue:t})}else go(i,e,t,o,void 0,{persist:!0}),o!=="batch"&&this.cleanupEditors();return jo(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}go(i,e,t,o,void 0,{persist:!0});let r=G(i,e),a=this.setNodeDataValue(e.rowNode,e.column,t,r,o);return this.syncEditAfterCommit(e,a),jo(i),(l=G(i,e))==null||l.refreshCell(a?M2:vt),a}handleColDefChanged(e){a1(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){let{model:o}=this;if(!this.batch||!o.hasRowEdits(e.rowNode,Bt))return;let{rowNode:r}=e,{compDetails:a,valueToDisplay:n}=t;if(a){let{params:s}=a;return s.data=o.getEditRowDataValue(r,Bt),{compDetails:a}}return{valueToDisplay:n}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var r;(r=this.strategy)==null||r.dispatchCellEvent(e,t,o,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return O(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){var u,h,p;if(!o||o.length===0)return;let{beans:i,rangeSvc:r,valueSvc:a}=this,{formula:n}=i;St(i,{persist:!0});let s=this.model.getEditMap(!0),l=(h=(u=s.get(e))==null?void 0:u.get(t))==null?void 0:h.pendingValue,c=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),c=!0);let d=(p=n==null?void 0:n.isFormula(l))!=null?p:!1;o.forEach(f=>{let m=f.columns.some(v=>v==null?void 0:v.isAllowFormula());if(r==null||r.forEachRowInRange(f,v=>{var x;let C=et(i,v);if(C===void 0)return;let w=(x=s.get(C))!=null?x:new Map,y=l;for(let R of f.columns){if(!R)continue;let F=!!d&&R.isAllowFormula();if(this.isCellEditable({rowNode:C,column:R},"api")){let P=a.getValue(R,C,"data",!0),T=a.parseValue(R,C!=null?C:null,y,P);Number.isNaN(T)&&(T=null),w.set(R,{editorValue:void 0,pendingValue:T,sourceValue:P,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}F&&(y=n==null?void 0:n.updateFormulaByOffset({value:y,columnDelta:1}))}w.size>0&&s.set(C,w),d&&m&&(l=n==null?void 0:n.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(s),this.batch){this.cleanupEditors(),jo(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,c&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(s)})}});let g=G(i,{rowNode:e,column:t});g&&g.focusCell(!0)}createCellStyleFeature(e){return new w2(e,this.beans)}createRowStyleFeature(e){return new b2(e,this.beans)}setEditingCells(e,t){let{beans:o}=this,{colModel:i,valueSvc:r}=o,a=new Map;for(let{colId:n,column:s,colKey:l,rowIndex:c,rowPinned:d,newValue:g,state:u}of e){let h=n?i.getCol(n):l?i.getCol(l):s;if(!h)continue;let p=et(o,{rowIndex:c,rowPinned:d});if(!p)continue;let f=r.getValue(h,p,"data",!0);if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!Be({pendingValue:g,sourceValue:f})&&u!=="editing")continue;let m=a.get(p);m||(m=new Map,a.set(p,m)),g===void 0&&(g=ae),m.set(h,{editorValue:void 0,pendingValue:g,sourceValue:f,state:u!=null?u:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(a,t)}onCellFocused(e){var a;let t=G(this.beans,e);if(!t||!this.isEditing(t,Bt))return;let o=this.model.getEdit(t);if(!o||!Be(o))return;let r=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(a=this.beans.ariaAnnounce)==null||a.announceValue(r,"pendingChange")}allowedFocusTargetOnValidation(e){return G(this.beans,e)}};function I2(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 Bl(e,t){var o;return(o=t!=null?t:e.get("editType"))!=null?o:"singleCell"}var zg=class extends S{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t,o=e.previousParams,{editSvc:i,beans:r}=this,a=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=G(r,o));let{gos:n,editModelSvc:s}=r,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){let{column:c,rowIndex:d,rowPinned:g}=e,u={column:c,rowNode:et(r,{rowIndex:d,rowPinned:g})},h=n.get("invalidEditValueMode")==="block";if(h)return;let p=!h,f=!!(s!=null&&s.getCellValidationModel().hasCellValidation(u)),m=p&&f;(o||l?i.stopEditing(void 0,{cancel:m,source:l&&p?"api":void 0,event:a}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){let t=this.editSvc.isBatchEditing()&&!e;for(let o of this.model.getEditPositions())pi(this.beans,o,{cancel:!0},G(this.beans,o)),this.model.stop(o,t,!0);return!0}stopCommitted(e,t){var n,s,l;let o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(let c of o)i.all.push(c),((l=(s=(n=this.model.getCellValidationModel().getCellValidation(c))==null?void 0:n.errorMessages)==null?void 0:s.length)!=null?l:0)>0?i.fail.push(c):i.pass.push(c);let r=this.processValidationResults(i),a=this.editSvc.isBatchEditing()&&!t;for(let c of r.destroy)pi(this.beans,c,{event:e},G(this.beans,c)),this.model.stop(c,a,!1);for(let c of r.keep){let d=G(this.beans,c);!this.editSvc.cellEditingInvalidCommitBlocks()&&d&&this.editSvc.revertSingleCellEdit(d)}return!0}cleanupEditors({rowNode:e}={},t){St(this.beans,{persist:!1});let o=this.model.getEditPositions(),i=[];if(e)for(let r of o)r.rowNode!==e&&i.push(r);else for(let r of o)i.push(r);bt(this.beans,i),jo(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){let t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{let i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var r,a;return(a=(r=t==null?void 0:t.getCellEditor())==null?void 0:r.focusIn)==null?void 0:a.call(r)})}}setupEditors(e){let{event:t,ignoreEventKey:o=!1,startedEdit:i,position:r,cells:a=this.model.getEditPositions()}=e,n=t instanceof KeyboardEvent&&!o&&t.key||void 0;o1(this.beans,a,r,n,t,i)}dispatchCellEvent(e,t,o,i){let r=G(this.beans,e);r&&this.eventSvc.dispatchEvent({...r.createEvent(t!=null?t:null,o),...i})}dispatchRowEvent(e,t,o){if(o)return;let i=fr(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,o="ui"){let i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&(o==="ui"||o==="edit")?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===b.ENTER:null}shouldCancel(e,t,o="ui"){let i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===b.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});let o=[];if(e.forEach((r,a)=>{r.forEach((n,s)=>{n.state==="editing"&&o.push({...n,rowNode:a,column:s})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){let r=o.at(-1),a=r.pendingValue===ae?void 0:r.pendingValue;this.start({position:r,event:new KeyboardEvent("keydown",{key:a}),source:"api"});let n=G(this.beans,r);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},T2=class extends zg{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,o="ui"){let{rowNode:i,beans:r}=this,{rowNode:a}=e||{};if(!fr(r,{rowNode:i}))return!0;let s=super.shouldStop({rowNode:i},t,o);return s!==null?s:i?a!==i:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){let{position:t,silent:o,startedEdit:i,event:r,ignoreEventKey:a}=e,{rowNode:n}=t,{beans:s,model:l,startedRows:c}=this;this.rowNode!==n&&super.cleanupEditors(t);let d=s.visibleCols.allCols,g=[],u=[];for(let h of d)h.isCellEditable(n)&&u.push(h);if(u.length!=0){c.has(n)||(this.dispatchRowEvent({rowNode:n},"rowEditingStarted",o),c.add(n));for(let h of u){let p={rowNode:n,column:h};g.push(p),l.start(p)}this.rowNode=n,this.setupEditors({cells:g,position:t,startedEdit:i,event:r,ignoreEventKey:a})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){let{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){let{rowNode:o,beans:i,model:r,editSvc:a}=this;if(o&&!r.hasRowEdits(o))return!1;let n=[];if(r.getEditMap().forEach((s,l)=>{if(!(!s||s.size===0)){for(let c of s.values())if(Be(c)){n.push(l);break}}}),kt(i),a.checkNavWithValidation({rowNode:o})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!a.isBatchEditing())for(let s of n)this.dispatchRowEvent({rowNode:s},"rowValueChanged");return this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){var l;let{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;let{beans:i,gos:r,model:a}=this;if((l=i.editSvc)!=null&&l.isRangeSelectionEnabledWhileEditing())return;let n=G(i,o);r.get("invalidEditValueMode")==="block"&&n&&(a.getCellValidationModel().getCellValidation(n)||a.getRowValidationModel().getRowValidation(n))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);let{startedRows:o}=this;for(let i of o)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);o.clear()}destroyEditorsForRow(e){var i;let t=fr(this.beans,{rowNode:e});if(!t)return;let o={};for(let r of t.getAllCellCtrls())(i=r.comp)!=null&&i.getCellEditor()&&pi(this.beans,r,o,r)}moveToNextEditingCell(e,t,o,i="ui",r=!1){var m,v,C;let{beans:a,model:n,gos:s,editSvc:l}=this,c=e.cellPosition,d;n.suspend(!0);try{d=(m=a.navigation)==null?void 0:m.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{n.suspend(!1)}if(d===!1)return null;if(d==null)return!1;let g=d.cellPosition,u=e.isCellEditable(),h=d.isCellEditable(),p=g&&c.rowIndex===g.rowIndex&&c.rowPinned===g.rowPinned;u&&this.setFocusOutOnEditor(e),this.restoreEditors();let f=s.get("suppressStartEditOnTab");return h&&!r?f?d.focusCell(!0,o):((v=d.comp)!=null&&v.getCellEditor()||oo(a,d,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(d),d.focusCell(!1,o)):(h&&r&&this.setFocusInOnEditor(d),d.focusCell(!0,o)),!p&&!r&&(l==null||l.stopEditing({rowNode:e.rowNode},{event:o,forceStop:!0}),l!=null&&l.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(d,!0),f?d.focusCell(!0,o):l.startEditing(d,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:h||void 0})),(C=e.rowCtrl)==null||C.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){let{beans:e,model:t}=this;t.getEditMap().forEach((o,i)=>o.forEach(({state:r},a)=>{var s;if(r!=="editing")return;let n=G(e,{rowNode:i,column:a});n&&!((s=n.comp)!=null&&s.getCellEditor())&&oo(e,n,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},A2=class extends zg{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){let i=super.shouldStop(e,t,o);if(i!==null)return i;let r=e==null?void 0:e.rowNode,a=e==null?void 0:e.column,n=this.rowNode,s=this.column;return(!n||!s)&&r&&a?null:n!==r||s!==a?!0:!n&&!s?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){let{position:t,startedEdit:o,event:i,ignoreEventKey:r}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:o,event:i,ignoreEventKey:r})}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){let{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:r,rowPinned:a}=e,n=et(this.beans,{rowIndex:i,rowPinned:a}),s=Ua(r),l=t.getCol(s),c=e.previousParams;if(c){let d=Ua(c.column);if((c==null?void 0:c.rowIndex)===i&&d===s&&(c==null?void 0:c.rowPinned)===a)return}e.type=="cellFocused"&&(o!=null&&o.isRangeSelectionEnabledWhileEditing()||o!=null&&o.isEditing({rowNode:n,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",r=!1){var f,m,v,C,w,y,x;let a=this.beans.focusSvc.getFocusedCell();a&&(e=(f=ho(this.beans,a))!=null?f:e);let n=e.cellPosition,s,l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),r||(e.eGui.focus(),(v=this.editSvc)==null||v.stopEditing(e,{source:(m=this.editSvc)!=null&&m.isBatchEditing()?"ui":"api",event:o}));try{s=(C=this.beans.navigation)==null?void 0:C.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(s===!1)return null;if(s==null)return!1;let c=s.cellPosition,d=e.isCellEditable(),g=s.isCellEditable(),u=c&&n.rowIndex===c.rowIndex&&n.rowPinned===c.rowPinned;d&&!r&&this.setFocusOutOnEditor(e);let h=this.gos.get("suppressStartEditOnTab"),p=!1;if(!u&&!r&&(super.cleanupEditors(s,!0),h?s.focusCell(!0,o):(p=!0,this.editSvc.startEditing(s,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:g}))),g&&!r){if(s.focusCell(!1,o),h)s.focusCell(!0,o);else if(!((w=s.comp)!=null&&w.getCellEditor())){if(!p){let R=(y=this.editSvc)==null?void 0:y.isEditing(s,{withOpenEditor:!0});oo(this.beans,s,{event:o,cellStartedEdit:!0,silent:R})}this.setFocusInOnEditor(s),this.cleanupEditors(s)}}else g&&r&&this.setFocusInOnEditor(s),s.focusCell(!0,o);return(x=e.rowCtrl)==null||x.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},Ot={moduleName:"EditCore",version:D,beans:[Xb,P2],apiFunctions:{getEditingCells:s2,getEditRowValues:n2,getCellEditorInstances:t1,startEditingCell:d2,stopEditing:l2,isEditing:c2,validateEdit:g2},dynamicBeans:{singleCell:A2,fullRow:T2},dependsOn:[Ir,Fg],css:[ES]},z2={moduleName:"UndoRedoEdit",version:D,beans:[RS],apiFunctions:{undoCellEditing:r2,redoCellEditing:a2,getCurrentUndoSize:u2,getCurrentRedoSize:h2},dependsOn:[Ot]},L2={moduleName:"TextEditor",version:D,userComponents:{agCellEditor:Hl,agTextCellEditor:Hl},dependsOn:[Ot]},O2={moduleName:"NumberEditor",version:D,userComponents:{agNumberCellEditor:{classImp:qS}},dependsOn:[Ot]},H2={moduleName:"DateEditor",version:D,userComponents:{agDateCellEditor:TS,agDateStringCellEditor:LS},dependsOn:[Ot]},B2={moduleName:"CheckboxEditor",version:D,userComponents:{agCheckboxCellEditor:DS},dependsOn:[Ot]},V2={moduleName:"SelectEditor",version:D,userComponents:{agSelectCellEditor:t2},dependsOn:[Ot]},N2={moduleName:"LargeTextEditor",version:D,userComponents:{agLargeTextCellEditor:VS},dependsOn:[Ot]},G2={moduleName:"CustomEditor",version:D,dependsOn:[Ot]},Lg={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},W2=new Set(Object.values(Lg));function Ct(e,t){let o=e.filterUi;if(!o)return null;if(o.created)return o.promise;if(t)return null;let i=o.create(o.refreshed),r=o;return r.created=!0,r.promise=i,i}function q2(e,t,o,i,r,a,n){var s;return(s=t.refresh)==null||s.call(t,{...o,model:i,source:a,additionalEventAttributes:n}),e().then(l=>{if(l){let{filter:c,filterParams:d}=l;Og(c,d,i,r,a,n)}})}function Og(e,t,o,i,r,a){var n;(n=e==null?void 0:e.refresh)==null||n.call(e,{...t,model:o,state:i,source:r,additionalEventAttributes:a})}function Hg(e,t,o,i){let r=e();r!=null&&r.created&&r.promise.then(a=>{var s;let n=t();Og(a,r.filterParams,n,(s=o())!=null?s:{model:n},"ui",i)})}function Vl(e){var u,h;let t,o=!1,i,{action:r,filterParams:a,getFilterUi:n,getModel:s,getState:l,updateState:c,updateModel:d,processModelToApply:g}=e;switch(r){case"apply":{let p=l();i=(u=p==null?void 0:p.model)!=null?u:null,g&&(i=g(i)),t={state:p==null?void 0:p.state,model:i},o=!0;break}case"clear":{t={model:null},(h=a==null?void 0:a.buttons)!=null&&h.includes("apply")||(o=!0,i=null);break}case"reset":{t={model:null},o=!0,i=null;break}case"cancel":{t={model:s()};break}}c(t),o?d(i):Hg(n,s,l,{fromAction:r})}function ie(e,t){var o;return(o=e[t])!=null?o:null}var _2=class extends On{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,o,i,r){this.comp=e;let a=wi(this,this.beans.context,r);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setGui(t,a),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(a),this.setupLeft(a),this.setupHover(a),this.setupFocus(a),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(a),this.setupUi(),a.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(a);let n=()=>this.onColDefChanged(a);a.addManagedListeners(this.column,{colDefChanged:n}),a.addManagedEventListeners({filterSwitched:({column:s})=>{s===this.column&&n()}}),a.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.colDef;return O(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){let 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;let e=ye("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new vi(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.getLocaleTextFunc();Fo(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){var n;let{beans:t}=this;if(Y(t)===this.eGui)return;let r=no(t,this.eGui,null,e.shiftKey);if(r){(n=t.headerNavigation)==null||n.scrollToColumn(this.column),e.preventDefault(),r.focus();return}let a=this.findNextColumnWithFloatingFilter(e.shiftKey);a&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:a},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleCols,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);let t=this.getWrapperHasFocus();switch(e.key){case b.UP:case b.DOWN:case b.LEFT:case b.RIGHT:if(t)return;Xt(e);case b.ENTER:t&&Jt(this.eGui)&&e.preventDefault();break;case b.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&qt(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){let r=this.lastFocusEvent,a=!!(r&&r.key===b.TAB);if(r&&a){let n=r.shiftKey;Jt(this.eGui,n)}}this.focusThis()}setupHover(e){var t;(t=this.beans.colHover)==null||t.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){let t=new Ln(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){var e;this.suppressFilterButton=!((e=this.beans.menuSvc)!=null&&e.isFloatingFilterButtonEnabled(this.column)),this.highlightFilterButtonWhenActive=!be(this.gos)}setupUserComp(){var t;if(!this.active)return;let e=(t=this.beans.colFilter)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){var t;let e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;(t=this.beans.menuSvc)==null||t.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;let{beans:{colFilter:t},column:o,gos:i}=this,r=a=>{if((a==null?void 0:a.source)==="filterDestroyed"&&(!this.isAlive()||!(t!=null&&t.isAlive())))return;let n=this.comp.getFloatingFilterComp();n&&n.then(s=>{var l;if(s){if(i.get("enableFilterHandlers")){let g=a,u="filter";g!=null&&g.afterFloatingFilter?u="ui":g!=null&&g.afterDataChange?u="dataChanged":(a==null?void 0:a.source)==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}let c=t==null?void 0:t.getCurrentFloatingFilterParentModel(o),d=a?{...a,columns:(l=a.columns)!=null?l:[],source:a.source==="api"?"api":"columnFilter"}:null;s.onParentModelChanged(c,d)}})};[this.destroySyncListener]=e.addManagedListeners(o,{filterChanged:r}),t!=null&&t.isFilterActive(o)&&r(null)}setupWidth(e){let t=()=>{let 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(){var e;if(!this.suppressFilterButton&&this.comp){let t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){let t=this.active;this.setupActive();let o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let i=this.beans.colFilter,r=this.active?i==null?void 0:i.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,a=this.comp.getFloatingFilterComp();!a||!r?this.updateCompDetails(e,r,o):a.then(n=>{var s;!n||i!=null&&i.areFilterCompsDifferent((s=this.userCompDetails)!=null?s:null,r)?this.updateCompDetails(e,r,o):this.updateFloatingFilterParams(r,"colDef")})}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){var i;if(!e)return;let o=e.params;(i=this.comp.getFloatingFilterComp())==null||i.then(r=>{var a,n;typeof(r==null?void 0:r.refresh)=="function"&&(this.gos.get("enableFilterHandlers")&&(o={...o,model:ie((n=(a=this.beans.colFilter)==null?void 0:a.model)!=null?n:{},this.column.getColId()),source:t}),r.refresh(o))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function U2(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}(i=e.menuSvc)==null||i.showColumnMenu({column:o,positionBy:"auto"})}function j2(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var K2=class extends S{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){let{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e!=null?e:t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Gl(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,o){var i;(i=this.activeMenuFactory)==null||i.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){var e,t;(e=this.beans.contextMenuSvc)==null||e.hideActiveMenu(),(t=this.activeMenuFactory)==null||t.hideActiveMenu()}hideFilterMenu(){var e;(e=Gl(this.beans))==null||e.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){var o;let{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!((o=this.activeMenuFactory)!=null&&o.isMenuEnabled(e))&&(be(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){var t;return!e.getColDef().suppressHeaderFilterButton&&!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))}isHeaderContextMenuEnabled(e){let t=e&&Dt(e)?e.getColDef():e==null?void 0:e.getColGroupDef();return!(t!=null&&t.suppressHeaderContextMenu)&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(jt()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!be(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))&&!be(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){let e=this.gos,t=e.get("suppressMenuHide");return be(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,o,i){let{positionBy:r,onClosedCallback:a}=t,n=t.column;if(r==="button"){let{buttonElement:s}=t;e==null||e.showMenuAfterButtonClick(n,s,o,a,i)}else if(r==="mouse"){let{mouseEvent:s}=t;e==null||e.showMenuAfterMouseEvent(n,s,o,a,i)}else if(n){let s=this.beans,l=s.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(n,"auto"),ht(s,()=>{var d;let c=(d=l.getHeaderRowContainerCtrl(n.getPinned()))==null?void 0:d.getHeaderCtrlForColumn(n);c&&(e==null||e.showMenuAfterButtonClick(n,c.getAnchorElementForMenu(i),o,a,i))})}}};function Nl(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}function Gl(e){let{enterpriseMenuFactory:t,filterMenuFactory:o,gos:i}=e;return t&&be(i)?t:o}var $2={moduleName:"SharedMenu",version:D,beans:[K2],apiFunctions:{showColumnMenu:U2,hidePopupMenu:j2}},Y2=".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 Q2(e){let t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function Z2(e,t){var o,i;return(i=(o=e.filterManager)==null?void 0:o.getColumnFilterInstance(t))!=null?i:Promise.resolve(void 0)}function J2(e,t){var i;let o=e.colModel.getColDefCol(t);if(o)return(i=e.colFilter)==null?void 0:i.destroyFilter(o,"api")}function X2(e,t){e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=e.filterManager)==null?void 0:o.setFilterModel(t)})}function ex(e){var t,o;return(o=(t=e.filterManager)==null?void 0:t.getFilterModel())!=null?o:{}}function tx(e,t,o){var s;let{gos:i,colModel:r,colFilter:a}=e;o&&!i.get("enableFilterHandlers")&&(k(288),o=!1);let n=r.getColDefCol(t);return n&&(s=a==null?void 0:a.getModelForColumn(n,o))!=null?s:null}function ox(e,t,o){var i,r;return(r=(i=e.filterManager)==null?void 0:i.setColumnFilterModel(t,o))!=null?r:Promise.resolve()}function ix(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}(i=e.menuSvc)==null||i.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"})}function rx(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function ax(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}return(i=e.colFilter)==null?void 0:i.getHandler(o,!0)}function nx(e,t){let{colModel:o,colFilter:i,gos:r}=e;if(!r.get("enableFilterHandlers")){k(287);return}let{colId:a,action:n}=t;if(a){let s=o.getColById(a);s&&(i==null||i.updateModel(s,n))}else i==null||i.updateAllModels(n)}var Wl={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},ql=["january","february","march","april","may","june","july","august","september","october","november","december"];function sx(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function lx(e,t){if(e==null)return-1;if(t==null)return 1;let o=Se(e),i=Se(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:String(e).localeCompare(String(t))}function _l(e){return e instanceof Date&&!isNaN(e.getTime())}var Xa={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:_l}),dateString:({dataTypeDefinition:e})=>({comparator:(t,o)=>{let i=e.dateParser(o);return o==null||it?1:0},isValidDate:t=>typeof t=="string"&&_l(e.dateParser(t))}),dateTime:e=>Xa.date(e),dateTimeString:e=>Xa.dateString(e),object:()=>{},text:()=>{}},en={number:()=>({comparator:sx}),bigint:()=>({comparator:lx}),boolean:({t:e})=>({valueFormatter:t=>M(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:o=>{let i=e(o);return M(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(o,i)=>{if(o==="NaN")return t("invalidDate","Invalid Date");if(i===1&&o!=null){let r=ql[Number(o)-1];return t(r,Wl[r])}return o!=null?o:t("blanks","(Blanks)")},treeListPathGetter:o=>Ti(o,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:o})=>({valueFormatter:i=>{let r=e(i);return M(r)?r:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>Ti(t.dateParser(i!=null?i:void 0),!1),treeListFormatter:(i,r)=>{if(r===1&&i!=null){let a=ql[Number(i)-1];return o(a,Wl[a])}return i!=null?i:o("blanks","(Blanks)")}}),dateTime:e=>{let t=en.date(e);return t.treeListPathGetter=Ti,t},dateTimeString(e){let t=e.dataTypeDefinition.dateParser,o=en.dateString(e);return o.treeListPathGetter=i=>Ti(t(i!=null?i:void 0)),o},object:({formatValue:e,t})=>({valueFormatter:o=>{let i=e(o);return M(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function cx(e,t,o,i,r,a,n){let s=t,l=o,c=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!c&&(l=({column:h,node:p})=>r({column:h,node:p,value:a.valueSvc.getValue(h,p,"data")}));let g=(c?en:Xa)[i.baseDataType],u=g({dataTypeDefinition:i,formatValue:r,t:n});return s=typeof t=="object"?{...u,...t}:u,{filterParams:s,filterValueGetter:l}}var dx={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},gx={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function ux(e,t=!1){return(t?gx:dx)[e!=null?e:"text"]}function hx(e,t,o){if(t==null)return null;let i=null,{compName:r,jsComp:a,fwComp:n}=$c(e,t);return r?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[r]:a==null&&n==null&&t.filter===!0&&(i=o()),i}var px={filterHandler:()=>({doesFilterPass:()=>!0})};function Ul(e,t,o,i){if(!e.isPrimary())return!0;let a=!o;return!e.isValueActive()||!a?!1:t?!0:i}var fx=class extends S{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={...Lg},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){var o,i,r;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));let e=this.gos,t={...(r=(i=(o=e.get("initialState"))==null?void 0:o.filter)==null?void 0:i.filterModel)!=null?r:{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",o){let{colModel:i,dataTypeSvc:r,filterManager:a}=this.beans;if(r!=null&&r.isPendingInference){this.modelUpdates.push({model:e,source:t});return}let n=[],s=this.getModel(!0);if(e){let l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{let g=e[d];n.push(this.setModelOnFilterWrapper(c,g)),l.delete(d)}),l.forEach(c=>{let d=i.getColDefCol(c)||i.getCol(c);if(!d){k(62,{colId:c});return}if(!d.isFilterAllowed()){k(63,{colId:c});return}let g=this.getOrCreateFilterWrapper(d,!0);if(!g){k(64,{colId:c});return}n.push(this.setModelOnFilterWrapper(g,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{n.push(this.setModelOnFilterWrapper(l,null))});$.all(n).then(()=>{let l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,g)=>{let u=s?s[g]:null,h=l?l[g]:null;oi(u,h)||c.push(d.column)}),c.length>0?a==null||a.onFilterChanged({columns:c,source:t}):o&&this.updateActive("filterChanged")})}getModel(e){var a;let t={},{allColumnFilters:o,initialModel:i,beans:{colModel:r}}=this;if(o.forEach((n,s)=>{let l=this.getModelFromFilterWrapper(n);M(l)&&(t[s]=l)}),!e)for(let n of Object.keys(i)){let s=i[n];M(s)&&!o.has(n)&&((a=r.getCol(n))!=null&&a.isFilterAllowed())&&(t[n]=s)}return t}setState(e,t,o="api"){if(this.state.clear(),t)for(let i of Object.keys(t)){let r=t[i];this.state.set(i,{model:ie(this.model,i),state:r})}this.setModel(e,o,!0)}getState(){let e=this.state;if(!e.size)return;let t={},o=!1;return e.forEach((i,r)=>{let a=i.state;a!=null&&(o=!0,t[r]=a)}),o?t:void 0}getModelFromFilterWrapper(e){let o=e.column.getColId();if(e.isHandler)return ie(this.model,o);let i=e.filter;return i?typeof i.getModel!="function"?(k(66),null):i.getModel():ie(this.initialModel,o)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};let{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){let e=l=>l?l.isFilterActive?l.isFilterActive():(k(67),!1):!1,{colModel:t,gos:o}=this.beans,i=!!er(o),r=[],a=[],n=(l,c,d)=>{c&&(Ul(l,t.isPivotMode(),t.isPivotActive(),i)?r.push(d):a.push(d))},s=[];return this.allColumnFilters.forEach(l=>{let c=l.column,d=c.getColId();if(l.isHandler)s.push($.resolve().then(()=>{n(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{let g=Ct(l);g&&s.push(g.then(u=>{n(c,e(u),{colId:d,isHandler:!1,comp:u})}))}}),$.all(s).then(()=>{this.activeAggregateFilters=r,this.activeColumnFilters=a})}updateFilterFlagInColumns(e,t){var i;let o=[];return this.allColumnFilters.forEach(r=>{let a=r.column;if(r.isHandler)o.push($.resolve().then(()=>{this.setColFilterActive(a,this.isHandlerActive(a),e,t)}));else{let n=Ct(r);n&&o.push(n.then(s=>{this.setColFilterActive(a,s.isFilterActive(),e,t)}))}}),(i=this.beans.groupFilter)==null||i.updateFilterFlags(e,t),$.all(o)}doFiltersPass(e,t,o){let{data:i,aggData:r}=e,a=o?this.activeAggregateFilters:this.activeColumnFilters,n=o?r:i,s=this.model;for(let l=0;l{this.isAlive()&&(o==null||o.onFilterChanged(e))};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){let{column:t,additionalEventAttributes:o}=e,i=t==null?void 0:t.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(r=>{var s,l,c;let{column:a,isHandler:n}=r;i!==a.getColId()&&(n&&((l=(s=r.handler).onAnyFilterChanged)==null||l.call(s)),(c=Ct(r,n))==null||c.then(d=>{typeof(d==null?void 0:d.onAnyFilterChanged)=="function"&&d.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var t;return!((t=this.gos.get("allowShowChangeAfterFilter"))!=null?t:!1)&&this.processingFilterChange}onNewRowsLoaded(e){let t=[];this.allColumnFilters.forEach(o=>{var a,n;let i=o.isHandler;i&&((n=(a=o.handler).onNewRowsLoaded)==null||n.call(a));let r=Ct(o,i);r&&t.push(r.then(s=>{var l;(l=s.onNewRowsLoaded)==null||l.call(s)}))}),$.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){let{filterValueSvc:o,colModel:i}=this.beans;return(r,a)=>{let n=a?i.getCol(a):e;return n?o.getValue(n,r,t):void 0}}isFilterActive(e){let t=this.cachedFilter(e);if(t!=null&&t.isHandler)return this.isHandlerActive(e);let o=t==null?void 0:t.filter;return o?o.isFilterActive():ie(this.initialModel,e.getColId())!=null}isHandlerActive(e){let t=M(ie(this.model,e.getColId()));if(t)return t;let o=this.beans.groupFilter;return o!=null&&o.isGroupFilter(e)?o.isFilterActive(e):!1}getOrCreateFilterUi(e){let t=this.getOrCreateFilterWrapper(e,!0);return t?Ct(t):null}getFilterUiForDisplay(e){let t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;let o=Ct(t);return o?o.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){let o=this.getOrCreateFilterWrapper(e,t);return o!=null&&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(()=>{var o;return(o=this.beans.dataTypeSvc)==null?void 0:o.getBaseDataType(e)},t)}getDefaultFilterFromDataType(e,t=!1){return Lh(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":ux(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,o,i,r,a){let n=()=>{let c=this.createFilterCompParams(e,r,a),d=i(c,r);return Np(this.beans.userCompFactory,t,d,o)},s=n();return s?{compDetails:s,createFilterUi:c=>(c?n():s).newAgStackInstance()}:null}createFilterInstance(e,t,o,i){var g,u,h;let r=this.beans.selectableFilter;r!=null&&r.isSelectable(t)&&(t=r.getFilterDef(e,t));let{handler:a,handlerParams:n,handlerGenerator:s}=(g=this.createHandler(e,t,o))!=null?g:{},l=this.createFilterComp(e,t,o,i,!!a,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:a,handlerGenerator:s,handlerParams:n};let{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&((h=(u=c.params)==null?void 0:u.buttons)!=null&&h.length||k(281,{colId:e.getColId()})),{compDetails:c,handler:a,handlerGenerator:s,handlerParams:n,createFilterUi:d}}createBaseFilterParams(e,t){let{filterManager:o,rowModel:i}=this.beans;return O(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:r=>{var a;return(a=o==null?void 0:o.doesRowPassOtherFilters(e.getColId(),r))!=null?a:!0},rowModel:i})}createFilterCompParams(e,t,o,i){var n;let r=this.filterChangedCallbackFactory(e),a=this.createBaseFilterParams(e,i);if(a.filterChangedCallback=r,a.filterModifiedCallback=i?()=>{}:s=>this.filterModified(e,s),t){let s=a,l=e.getColId(),c=ie(this.model,l);s.model=c,s.state=(n=this.state.get(l))!=null?n:{model:c},s.onModelChange=(d,g)=>{this.updateStoredModel(l,d),this.refreshHandlerAndUi(e,d,"ui",!1,g).then(()=>{r({...g,source:"columnFilter"})})},s.onStateChange=d=>{this.updateState(e,d),this.updateOrRefreshFilterUi(e)},s.onAction=(d,g,u)=>{this.updateModel(e,d,g),this.dispatchLocalEvent({type:"filterAction",column:e,action:d,event:u})},s.getHandler=()=>this.getHandler(e,!0),s.onUiChange=d=>this.filterUiChanged(e,d),s.source=o}return a}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,o){let i=t(),r={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(o),r}createFilterWrapper(e){var s;let{compDetails:t,handler:o,handlerGenerator:i,handlerParams:r,createFilterUi:a}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),n=e.getColId();if(o)return delete this.initialModel[n],(s=o.init)==null||s.call(o,{...r,source:"init",model:ie(this.model,n)}),{column:e,isHandler:!0,handler:o,handlerGenerator:i,handlerParams:r,filterUi:this.createFilterUiForHandler(t,a)};if(a){let l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,a,c=>{l.filter=c!=null?c:void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,o){var h;let{gos:i,frameworkOverrides:r,registry:a}=this.beans,n,s=p=>{let f=p.filter;if(Uc(f)){let m=f.handler;return m||(n=f.doesFilterPass,n?()=>({doesFilterPass:n}):void 0)}return typeof f=="string"?f:void 0},l=i.get("enableFilterHandlers"),c=l?s(t):void 0,d=p=>()=>this.createBean(a.createDynamicBean(p,!0)),g,u;if(typeof c=="string"){let p=(h=i.get("filterHandlers"))==null?void 0:h[c];p!=null?g=p:W2.has(c)&&(g=d(c),u=c)}else g=c;if(!g){let p,{compName:f,jsComp:m,fwComp:v}=$c(r,t);f?p=f:m==null&&v==null&&t.filter===!0&&(p=o),u=this.handlerMap[p],u&&(g=d(u))}return g?{filterHandler:g,handlerNameOrCallback:n!=null?n:u}:l?(ee(i)&&k(277,{colId:e.getColId()}),px):void 0}createHandler(e,t,o){let i=this.createHandlerFunc(e,t,o);if(!i)return;let r=qr(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:a,filterHandler:n}=i,{handler:s,handlerParams:l}=this.createHandlerFromFunc(e,n,r);return{handler:s,handlerParams:l,handlerGenerator:a!=null?a:n}}createHandlerFromFunc(e,t,o){let i=e.getColDef(),r=t(O(this.gos,{column:e,colDef:i})),a=this.createHandlerParams(e,o);return{handler:r,handlerParams:a}}createHandlerParams(e,t){let o=e.getColDef(),i=e.getColId(),r=this.filterChangedCallbackFactory(e);return O(this.gos,{colDef:o,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:a=>{var n,s;return(s=(n=this.beans.filterManager)==null?void 0:n.doesRowPassOtherFilters(i,a))!=null?s:!0},onModelChange:(a,n)=>{this.updateStoredModel(i,a),this.refreshHandlerAndUi(e,a,"handler",!1,n).then(()=>{r({...n,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){let e=[],{colModel:t,filterManager:o,groupFilter:i}=this.beans;this.allColumnFilters.forEach((a,n)=>{let s;a.column.isPrimary()?s=t.getColDefCol(n):s=t.getCol(n),!(s&&s===a.column)&&(e.push(a.column),this.disposeFilterWrapper(a,"columnChanged"),this.disposeColumnListener(n))});let r=i&&e.every(a=>i.isGroupFilter(a));e.length>0&&!r&&(o==null||o.onFilterChanged({columns:e,source:"api"}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;let o=this.beans.groupFilter;return o!=null&&o.isGroupFilter(e)?o.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){var h;let{userCompFactory:o,frameworkOverrides:i,selectableFilter:r,gos:a}=this.beans,n=p=>{let f=this.getOrCreateFilterUi(e);f==null||f.then(m=>{p(to(m))})},s=e.getColDef(),l=r!=null&&r.isSelectable(s)?r.getFilterDef(e,s):s,c=(h=hx(i,l,()=>this.getDefaultFloatingFilter(e)))!=null?h:"agReadOnlyFloatingFilter",d=a.get("enableFilterHandlers"),g=qr(o,l,this.createFilterCompParams(e,d,"init",!0)),u=O(a,{column:e,filterParams:g,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(d){let p=u,f=e.getColId(),m=this.filterChangedCallbackFactory(e);p.onUiChange=v=>this.floatingFilterUiChanged(e,v),p.model=ie(this.model,f),p.onModelChange=(v,C)=>{this.updateStoredModel(f,v),this.refreshHandlerAndUi(e,v,"floating",!0,C).then(()=>{m({...C,source:"columnFilter"})})},p.getHandler=()=>this.getHandler(e,!0),p.source="init"}return qp(o,s,u,c)}getCurrentFloatingFilterParentModel(e){var t;return this.getModelFromFilterWrapper((t=this.cachedFilter(e))!=null?t:{column:e})}destroyFilterUi(e,t,o,i){let r="paramsUpdated";if(e.isHandler){let a=t.getColId();delete this.initialModel[a],this.state.delete(a);let n=e.filterUi,s=this.createFilterUiForHandler(o,i);e.filterUi=s;let l=this.eventSvc;n!=null&&n.created?n.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:r,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:r,column:t})}else this.destroyFilter(t,r)}destroyFilter(e,t="api"){let o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialModel[o],i&&this.disposeFilterWrapper(i,t).then(r=>{var a;r&&this.isAlive()&&((a=this.beans.filterManager)==null||a.onFilterChanged({columns:[e],source:"api"}))})}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let o=!1,{column:i,isHandler:r,filterUi:a}=e,n=i.getColId();r&&(o=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[n],this.state.delete(n));let s=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(n),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(a){if(a.created)return a.promise.then(l=>(o=r?o:!!(l!=null&&l.isFilterActive()),this.destroyBean(l),s(),o));s()}return $.resolve(o)}filterChangedCallbackFactory(e){return t=>{var o;this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:(o=t==null?void 0:t.source)!=null?o:"columnFilter"})}}filterParamsChanged(e,t="api"){var m,v,C,w,y,x,R,F,P,T;let o=this.allColumnFilters.get(e);if(!o)return;let i=this.beans,r=o.column,a=r.getColDef(),n=r.isFilterAllowed(),s=this.getDefaultFilter(r),l=i.selectableFilter,c=l!=null&&l.isSelectable(a)?l.getFilterDef(r,a):a,d=n?this.createHandlerFunc(r,c,this.getDefaultFilter(r)):void 0,g=!!d,u=o.isHandler;if(u!=g){this.destroyFilter(r,"paramsUpdated");return}let{compDetails:h,createFilterUi:p}=(m=n?this.createFilterComp(r,c,s,I=>I,g,"colDef"):null)!=null?m:{compDetails:null,createFilterUi:null},f=(v=h==null?void 0:h.params)!=null?v:qr(i.userCompFactory,c,this.createFilterCompParams(r,g,"colDef"));if(u){let I=(C=d==null?void 0:d.handlerNameOrCallback)!=null?C:d==null?void 0:d.filterHandler,z=ie(this.model,e);if(o.handlerGenerator!=I){let L=o.handler,{handler:N,handlerParams:j}=this.createHandlerFromFunc(r,d.filterHandler,f);o.handler=N,o.handlerParams=j,o.handlerGenerator=I,delete this.model[e],(w=N.init)==null||w.call(N,{...j,source:"init",model:null}),this.destroyBean(L),z!=null&&((y=this.beans.filterManager)==null||y.onFilterChanged({columns:[r],source:t}))}else{let L=this.createHandlerParams(r,h==null?void 0:h.params);o.handlerParams=L,(R=(x=o.handler).refresh)==null||R.call(x,{...L,source:"colDef",model:z})}}if(this.areFilterCompsDifferent((P=(F=o.filterUi)==null?void 0:F.compDetails)!=null?P:null,h)||!o.filterUi||!h){this.destroyFilterUi(o,r,h,p);return}o.filterUi.filterParams=f,(T=Ct(o,u))==null||T.then(I=>{(I!=null&&I.refresh?I.refresh(f):!0)===!1?this.destroyFilterUi(o,r,h,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:r,params:f})})}refreshHandlerAndUi(e,t,o,i,r){var c;let a=this.cachedFilter(e);if(!a)return i&&this.getOrCreateFilterWrapper(e,!0),$.resolve();if(!a.isHandler)return $.resolve();let{filterUi:n,handler:s,handlerParams:l}=a;return q2(()=>{if(n){let{created:d,filterParams:g}=n;if(d)return n.promise.then(u=>u?{filter:u,filterParams:g}:void 0);n.refreshed=!0}return $.resolve(void 0)},s,l,t,(c=this.state.get(e.getColId()))!=null?c:{model:t},o,r)}setColumnFilterWrapper(e,t){let 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;let{componentClass:o}=e,{componentClass:i}=t;return!(o===i||(o==null?void 0:o.render)&&(i==null?void 0:i.render)&&o.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){let t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);let o=this.getOrCreateFilterUi(t);return o?new Promise(i=>{o.then(r=>{i(to(r))})}):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){var i;if(t){let{state:r,model:a}=this,n=e.getColId(),s=r.get(n);return s?(i=s.model)!=null?i:null:ie(a,n)}let o=this.cachedFilter(e);return o?this.getModelFromFilterWrapper(o):null}setModelForColumn(e,t){var o;if((o=this.beans.dataTypeSvc)!=null&&o.isPendingInference){let i=()=>{},r=new Promise(a=>{i=a});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),r}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(r=>i(r))})}getStateForColumn(e){var t;return(t=this.state.get(e))!=null?t:{model:ie(this.model,e)}}setModelForColumnLegacy(e,t){let o=this.beans.colModel.getColDefCol(e),i=o?this.getOrCreateFilterWrapper(o,!0):null;return i?this.setModelOnFilterWrapper(i,t):$.resolve()}setColDefPropsForDataType(e,t,o){var d,g;let i=e.filter,r=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof r!="string")return;let a,n,s=this.beans,{filterParams:l,filterValueGetter:c}=e;r==="agMultiColumnFilter"?{filterParams:a,filterValueGetter:n}=(g=(d=s.multiFilter)==null?void 0:d.getParamsForDataType(l,c,t,o))!=null?g:{}:{filterParams:a,filterValueGetter:n}=cx(r,l,c,t,o,s,this.getLocaleTextFunc()),e.filterParams=a,n&&(e.filterValueGetter=n)}setColFilterActive(e,t,o,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,i)}setModelOnFilterWrapper(e,t,o){return new $(i=>{if(e.isHandler){let a=e.column,n=a.getColId(),s=this.model[n];if(this.updateStoredModel(n,t),o&&t===s){i();return}this.refreshHandlerAndUi(a,t,"api").then(()=>i());return}let r=Ct(e);if(r){r.then(a=>{if(typeof(a==null?void 0:a.setModel)!="function"){k(65),i();return}(a.setModel(t)||$.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){M(t)?this.model[e]=t:delete this.model[e];let o=this.state.get(e),i={model:t,state:o==null?void 0:o.state};this.state.set(e,i)}filterModified(e,t){var o;(o=this.getOrCreateFilterUi(e))==null||o.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,o){var n,s;let i=e.getColId(),r=this.cachedFilter(e),a=()=>r==null?void 0:r.filterUi;Vl({action:t,filterParams:(n=r==null?void 0:r.filterUi)==null?void 0:n.filterParams,getFilterUi:a,getModel:()=>ie(this.model,i),getState:()=>this.state.get(i),updateState:l=>this.updateState(e,l),updateModel:l=>{var c,d;return(d=(c=a())==null?void 0:c.filterParams)==null?void 0:d.onModelChange(l,{...o,fromAction:t})},processModelToApply:r!=null&&r.isHandler?(s=r.handler.processModelToApply)==null?void 0:s.bind(r.handler):void 0})}updateAllModels(e,t){let o=[];this.allColumnFilters.forEach((i,r)=>{var n,s;let a=this.beans.colModel.getColDefCol(r);a&&Vl({action:e,filterParams:(n=i.filterUi)==null?void 0:n.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>ie(this.model,r),getState:()=>this.state.get(r),updateState:l=>this.updateState(a,l),updateModel:l=>{this.updateStoredModel(r,l),this.dispatchLocalEvent({type:"filterAction",column:a,action:e}),o.push(this.refreshHandlerAndUi(a,l,"ui"))},processModelToApply:i!=null&&i.isHandler?(s=i.handler.processModelToApply)==null?void 0:s.bind(i.handler):void 0})}),o.length&&$.all(o).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){let t=e.getColId();Hg(()=>{var o;return(o=this.cachedFilter(e))==null?void 0:o.filterUi},()=>ie(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(){var r;let{state:e,model:t,activeFilterComps:o}=this;for(let a of o)if(a.source==="COLUMN_MENU")return!1;let i=!1;for(let a of e.keys()){let n=e.get(a);if(n.valid===!1)return!1;((r=n.model)!=null?r:null)!==ie(t,a)&&(i=!0)}return i}hasUnappliedModel(e){var i,r;let{model:t,state:o}=this;return((r=(i=o.get(e))==null?void 0:i.model)!=null?r:null)!==ie(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;let o=this.beans.filterPanelSvc;return o!=null&&o.isActive?!!o.getState(e.getColId()):!1}onPivotModeChanged(e){let{colModel:t,pivotColsSvc:o}=this.beans,i=!!er(this.gos),r=e.currentValue,a=r?this.activeColumnFilters:this.activeAggregateFilters,n=r?this.activeAggregateFilters:this.activeColumnFilters,s=[];for(let l of a){let c=t.getColById(l.colId),d=r&&!!(o!=null&&o.columns.length);c&&r===Ul(c,r,d,i)&&(n.push(l),s.push(l))}pu(a,s)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function mx(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function vx(e,t="api"){var o;(o=e.filterManager)==null||o.onFilterChanged({source:t})}var Cx=class extends S{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){let e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});let{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){let e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){let t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,o="api"){var i;this.isAdvFilterEnabled()||(i=this.colFilter)==null||i.setState(e,t,o)}setFilterModel(e,t="api",o){var i;if(this.isAdvFilterEnabled()){o||this.warnAdvFilters();return}(i=this.colFilter)==null||i.setModel(e,t)}getFilterModel(){var e,t;return(t=(e=this.colFilter)==null?void 0:e.getModel())!=null?t:{}}getFilterState(){var e;return(e=this.colFilter)==null?void 0:e.getState()}isColumnFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.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){var t,o;e?(t=this.colFilter)!=null&&t.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):(o=this.advancedFilter)!=null&&o.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){var e;return!!((e=this.advancedFilter)!=null&&e.isEnabled())}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){er(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:o,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):$.resolve()).then(()=>{var a;let r={source:t,type:"filterChanged",columns:i};o&&he(r,o),this.eventSvc.dispatchEvent(r),(a=this.colFilter)==null||a.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.colFilter)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilter)!=null&&e.isFilterPresent())}updateAggFiltering(){this.aggFiltering=!!er(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){var o;let{rowNode:t}=e;return(o=this.alwaysPassFilter)!=null&&o.call(this,t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){var o;let{rowNode:t}=e;return(o=this.alwaysPassFilter)!=null&&o.call(this,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){var t;return this.isAdvFilterEnabled()?!1:!!((t=this.colFilter)!=null&&t.isFilterAllowed(e))}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){var o;if(this.isAdvFilterEnabled()){if((o=this.beans.dataTypeSvc)!=null&&o.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e!=null?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(){var e;return this.isAdvFilterEnabled()?!1:!!((e=this.colFilter)!=null&&e.hasFloatingFilters())}getColumnFilterInstance(e){var t,o;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):(o=(t=this.colFilter)==null?void 0:t.getFilterInstance(e))!=null?o:Promise.resolve(void 0)}warnAdvFilters(){k(68)}setupAdvFilterHeaderComp(e){var t;(t=this.advancedFilter)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(let e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){var o,i;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):(i=(o=this.colFilter)==null?void 0:o.setModelForColumn(e,t))!=null?i:Promise.resolve()}};function wx(e){return{tag:"div",cls:e}}var bx=class extends _{constructor(e){let{className:t="ag-filter-apply-panel"}=e!=null?e:{};super(wx(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){let o=this.buttons;if(this.buttons=e,o===e)return;let i=this.getGui();ne(i);let r;this.destroyListeners();let a=document.createDocumentFragment(),n=this.className,s=({type:c,label:d})=>{let g=v=>{this.dispatchLocalEvent({type:c,event:v})};["apply","clear","reset","cancel"].includes(c)||k(75);let u=c==="apply",p=oe({tag:"button",attrs:{type:u&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${n}-button${u?" "+n+"-apply-button":""}`,children:d});this.activateTabIndex([p]),u&&(r=p);let f=v=>{v.key===b.ENTER&&(v.preventDefault(),g(v))},m=this.listeners;p.addEventListener("click",g),m.push(()=>p.removeEventListener("click",g)),p.addEventListener("keydown",f),m.push(()=>p.removeEventListener("keydown",f)),a.append(p)};for(let c of e)s(c);this.eApply=r;let l=this.validationTooltipFeature;r&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!r&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(a)}getApplyButton(){return this.eApply}updateValidity(e,t=null){var i;let o=this.eApply;o&&(ai(o,!e),this.validationMessage=t,(i=this.validationTooltipFeature)==null||i.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(let e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}};var yx=class extends _{constructor(e,t,o,i,r,a){super(),this.column=e,this.wrapper=t,this.eventParent=o,this.updateModel=i,this.isGlobalButtons=r,this.enableGlobalButtonCheck=a,this.hidePopup=null,this.applyActive=!1}postConstruct(){let{comp:e,params:t}=this.wrapper,o=t,i=o.useForm,r=i?"form":"div";this.setTemplate({tag:r,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:a=>{a==null||a.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=o,this.resetButtonsPanel(o),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:a,params:n})=>{a===this.column&&this.resetButtonsPanel(n,this.params)},filterStateChanged:({column:a,state:n})=>{var s;a===this.column&&((s=this.eButtons)==null||s.updateValidity(n.valid!==!1))},filterAction:({column:a,action:n,event:s})=>{a===this.column&&this.afterAction(n,s)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:a})=>{if(a!==this.isGlobalButtons){this.isGlobalButtons=a;let n=this.params;this.resetButtonsPanel(n,n,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,o){let{buttons:i,readOnly:r}=t!=null?t:{},{buttons:a,readOnly:n,useForm:s}=e;if(!o&&r===n&&oi(i,a))return;let l=a&&a.length>0&&!e.readOnly&&!this.isGlobalButtons,c=this.eButtons;if(l){let d=a.map(g=>{let u=`${g}Filter`;return{type:g,label:He(this,u)}});if(this.applyActive=Rr(this.params),!c){c=this.createBean(new bx),this.appendChild(c.getGui());let g=this.column,u=h=>({event:p})=>{this.updateModel(g,h,{fromButtons:!0}),this.afterAction(h,p)};c==null||c.addManagedListeners(c,{apply:u("apply"),clear:u("clear"),reset:u("reset"),cancel:u("cancel")}),this.eButtons=c}c.updateButtons(d,s)}else this.applyActive=!1,c&&(De(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){let t=this.hidePopup;if(!t)return;let o=e,i=o==null?void 0:o.key,r;(i===b.ENTER||i===b.SPACE)&&(r={keyboardEvent:o}),t(r),this.hidePopup=null}afterAction(e,t){let{params:o,applyActive:i}=this,r=o==null?void 0:o.closeOnApply;switch(e){case"apply":{t==null||t.preventDefault(),r&&i&&this.close(t);break}case"reset":{r&&i&&this.close();break}case"cancel":{r&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===b.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},Sx=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",xx={tag:"div",cls:"ag-filter"},kx=class extends _{constructor(e,t,o){super(xx),this.column=e,this.source=t,this.enableGlobalButtonCheck=o,this.wrapper=null}postConstruct(){var e;(e=this.beans.colFilter)==null||e.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){var e,t;return(t=(e=this.wrapper)==null?void 0:e.then(o=>o.comp))!=null?t:null}afterInit(){var e,t;return(t=(e=this.wrapper)==null?void 0:e.then(()=>{}))!=null?t:$.resolve()}afterGuiAttached(e){var t;this.afterGuiAttachedParams=e,(t=this.wrapper)==null||t.then(o=>{var i,r,a;(i=this.comp)==null||i.afterGuiAttached(e),(a=(r=o==null?void 0:o.comp)==null?void 0:r.afterGuiAttached)==null||a.call(r,e)})}afterGuiDetached(){var e;(e=this.wrapper)==null||e.then(t=>{var o,i;(i=(o=t==null?void 0:t.comp)==null?void 0:o.afterGuiDetached)==null||i.call(o)})}createFilter(e){var a;let{column:t,source:o,beans:{colFilter:i}}=this,r=(a=i.getFilterUiForDisplay(t))!=null?a:null;this.wrapper=r,r==null||r.then(n=>{var d;if(!n)return;let{isHandler:s,comp:l}=n,c;if(s){let g=!!this.enableGlobalButtonCheck,u=this.createBean(new yx(t,n,i,i.updateModel.bind(i),g&&i.isGlobalButtons,g));this.comp=u,c=u.getGui()}else this.registerCSS(Sx),c=l.getGui(),M(c)||k(69,{guiFromFilter:c});this.appendChild(c),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()}):(d=l.afterGuiAttached)==null||d.call(l,this.afterGuiAttachedParams)})}onFilterDestroyed(e){let{source:t,column:o}=e;(t==="api"||t==="paramsUpdated")&&o.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(ne(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){var e;(e=this.beans.colFilter)==null||e.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()}},Rx=class extends S{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){var e;(e=this.hidePopup)==null||e.call(this)}showMenuAfterMouseEvent(e,t,o,i){e&&!e.isColumn||this.showPopup(e,r=>{var a;(a=this.popupSvc)==null||a.positionPopupUnderMouseEvent({additionalParams:{column:e},type:o,mouseEvent:t,ePopup:r})},o,t.target,be(this.gos),i)}showMenuAfterButtonClick(e,t,o,i){if(e&&!e.isColumn)return;let r=-1,a="left",n=be(this.gos);!n&&this.gos.get("enableRtl")&&(r=1,a="right");let s=n?void 0:4*r,l=n?void 0:4;this.showPopup(e,c=>{var d;(d=this.popupSvc)==null||d.positionPopupByComponent({type:o,eventSource:t,ePopup:c,nudgeX:s,nudgeY:l,alignSide:a,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},o,t,n,i)}showPopup(e,t,o,i,r,a){var f;let n=e?this.createBean(new kx(e,"COLUMN_MENU")):void 0;if(this.activeMenu=n,!(n!=null&&n.hasFilter())||!e){W(57);return}let s=oe({tag:"div",cls:`ag-menu${r?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(s,{keydown:m=>this.trapFocusWithin(m,s)}),s.appendChild(n==null?void 0:n.getGui());let l,c=()=>n==null?void 0:n.afterGuiDetached(),d=Oh(this.gos)?i!=null?i:this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,g=m=>{Nl(e,!1,"contextMenu");let v=m instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),v&&i&&Ie(i)){let C=od(i);C==null||C.focus({preventScroll:!0})}c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),a==null||a()},u=this.getLocaleTextFunc(),h=r&&o!=="columnFilter"?u("ariaLabelColumnMenu","Column Menu"):u("ariaLabelColumnFilter","Column Filter"),p=(f=this.popupSvc)==null?void 0:f.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:g,positionCallback:()=>t(s),anchorToElement:d,ariaLabel:h});p&&(this.hidePopup=l=p.hideFunc),n.afterInit().then(()=>{t(s),n.afterGuiAttached({container:o,hidePopup:l})}),Nl(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==b.TAB||e.defaultPrevented||no(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Jt(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o!=null?o:null,columnGroup:null})}isMenuEnabled(e){var t;return e.isFilterAllowed()&&((t=e.getColDef().menuTabs)!=null?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},Ex=class extends S{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,o){var c;if(!t)return;let i=e.getColDef(),{selectableFilter:r,valueSvc:a,formula:n}=this.beans,s=(c=o!=null?o:r==null?void 0:r.getFilterValueGetter(e.getColId()))!=null?c:i.filterValueGetter;if(s)return this.executeFilterValueGetter(s,t.data,e,t,i);let l=a.getValue(e,t,"data");return e.isAllowFormula()&&(n!=null&&n.isFormula(l))?n.resolveValue(e,t):l}executeFilterValueGetter(e,t,o,i,r){let{expressionSvc:a,valueSvc:n}=this.beans,s=O(this.gos,{data:t,node:i,column:o,colDef:r,getValue:n.getValueCallback.bind(n,i)});return typeof e=="function"?e(s):a==null?void 0:a.evaluate(e,s)}},Fx={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},Dx=class extends _{constructor(){super(Fx,[Tr]),this.eFloatingFilterText=E}init(e){this.params=e;let 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")){let o=e,i=o.getHandler();if(i.getModelAsString){let r=i.getModelAsString(o.model);this.eFloatingFilterText.setValue(r)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){let o=t.getModelAsString(e);this.eFloatingFilterText.setValue(o)}})}refresh(e){this.init(e)}},Mx=class extends Vn{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){let t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}};var Jn=class{constructor(){this.customFilterOptions={}}init(e,t){var o;this.filterOptions=(o=e.filterOptions)!=null?o:t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){var i;let o=(i=e.filterOptions)!=null?i:t;this.filterOptions!==o&&(this.filterOptions=o,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){let{filterOptions:e}=this;if(e)for(let t of e){if(typeof t=="string")continue;let o=[["displayKey"],["displayName"],["predicate","test"]],i=r=>r.some(a=>t[a]!=null)?!0:(k(72,{keys:r}),!1);if(!o.every(i)){this.filterOptions=e.filter(r=>r===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){let{filterOptions:t}=this;if(e)return e;if(t.length>=1){let o=t[0];if(typeof o=="string")return o;if(o.displayKey)return o.displayKey;k(73)}else k(74)}getCustomOption(e){return this.customFilterOptions[e]}};function ti(e,t,o){return o==null?e.splice(t):e.splice(t,o)}function wr(e){return e==null||typeof e=="string"&&e.trim().length===0}function Px(e){return e==="AND"||e==="OR"?e:"AND"}function Ix(e,t,o){if(e==null)return;let{predicate:i}=e;if(i!=null&&!t.some(r=>r==null))return i(t,o)}function Tx(e,t){let o=e.length;return o>t&&(e.splice(t),k(78),o=t),o}var Ax=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 Pt(e,t){let o=t.getCustomOption(e);if(o){let{numberOfInputs:i}=o;return i!=null?i:1}return e&&Ax.has(e)?0:e==="inRange"?2:1}var zr=class extends tf{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);let t=new Jn;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=Px(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),we(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)=>{let i=o===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){let 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(){let{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){let o=!e.operator,i=!t.operator;if(!o&&i||o&&!i)return!1;let a;if(o){let n=e,s=t;a=this.areSimpleModelsEqual(n,s)}else{let n=e,s=t;a=n.operator===s.operator&&It(n.conditions,s.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return a}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),$.resolve();if(e.operator){let i=e,r=i.conditions;r==null&&(r=[],k(77));let a=Tx(r,this.maxNumConditions),n=this.getNumConditions();if(an)for(let l=n;ll.setValue(!s,!0)),this.eJoinOrs.forEach(l=>l.setValue(s,!0)),r.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{let i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),$.resolve()}setNumConditions(e){var i,r;let t=(i=e.maxNumConditions)!=null?i:2;t<1&&(k(79),t=1),this.maxNumConditions=t;let o=(r=e.numAlwaysVisibleConditions)!=null?r:1;o<1&&(k(80),o=1),o>t&&(k(81),o=t),this.numAlwaysVisibleConditions=o}createOption(){let e=this.getGui(),t=this.createManagedBean(new Zn);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());let o=this.createEValue();this.eConditionBodies.push(o),e.appendChild(o),this.putOptionsIntoDropdown(t),this.resetType(t);let i=this.getNumConditions()-1;this.forEachPositionInput(i,r=>this.resetInput(r)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){let e=oe({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);let t=this.createJoinOperator(this.eJoinAnds,e,"and"),o=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);let i=this.eJoinPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,r),this.resetJoinOperatorOr(o,i,r),this.isReadOnly()||(t.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(e,t,o){let i=this.createManagedBean(new Mx);e.push(i);let r="ag-filter-condition-operator";return i.addCss(r),i.addCss(`${r}-${o}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){let{filterListOptions:t}=this;for(let o of t)e.addOption(o);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{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(){let e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){var o;let e=-1,t=!0;for(let i=0;i0&&this.removeConditionsAndOperators(r,a),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,r)=>{let a=this.isConditionDisabled(r,e);i.setDisabled(a||this.filterListOptions.length<=1),r===1&&(ai(this.eJoinPanels[0],a),this.eJoinAnds[0].setDisabled(a),this.eJoinOrs[0].setDisabled(a))}),this.eConditionBodies.forEach((i,r)=>{q(i,this.isConditionBodyVisible(r))});let o=(t!=null?t:this.getJoinOperator())==="OR";for(let i of this.eJoinAnds)i.setValue(!o,!0);for(let i of this.eJoinOrs)i.setValue(o,!0);this.forEachInput((i,r,a,n)=>{this.setElementDisplayed(i,r=this.getNumConditions())return;let{eTypes:o,eConditionBodies:i,eJoinPanels:r,eJoinAnds:a,eJoinOrs:n}=this;this.removeComponents(o,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);let s=Math.max(e-1,0);this.removeElements(r,s,t),this.removeComponents(a,s,t),this.removeComponents(n,s,t)}removeElements(e,t,o){let i=ti(e,t,o);for(let r of i)De(r)}removeComponents(e,t,o){let i=ti(e,t,o);for(let r of i)De(r.getGui()),this.destroyBean(r)}afterGuiAttached(e){var t;if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus)){let o;if(!this.isReadOnly()){let i=this.getInputs(0)[0];i instanceof Gt&&this.isConditionBodyVisible(0)?o=i.getInputElement():o=(t=this.eTypes[0])==null?void 0:t.getFocusableElement()}(o!=null?o:this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){var n;super.afterGuiDetached();let e=this.params;if((n=this.beans.colFilter)!=null&&n.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,o=-1,i=!1,r=this.getJoinOperator();for(let s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))t===-1&&(t=s,o=s);else{let l=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),c=s{if(!(i instanceof Gt))return;let s=r===0&&n>1?"inRangeStart":r===0?"filterOoo":"inRangeEnd",l=r===0&&n>1?e("ariaFilterFromValue","Filter from value"):r===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),c=o[a].getValue(),d=nd(this,t,s,c);i.setInputPlaceholder(d),i.setInputAriaLabel(l)})}setElementValue(e,t,o){e instanceof Gt&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Ps(e)&&q(e.getGui(),t)}setElementDisabled(e,t){Ps(e)&&ai(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Gt&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,o)=>{this.forEachPositionTypeInput(o,t,e)})}forEachPositionInput(e,t){let o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,t)}forEachPositionTypeInput(e,t,o){let i=Pt(t,this.optionsFactory),r=this.getInputs(e);for(let a=0;at+1}isConditionBodyVisible(e){let t=this.getConditionType(e);return Pt(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(){let e=[];for(let t=0;tthis.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){let o=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(o).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),o)}resetJoinOperatorOr(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),o)}resetJoinOperator(e,t,o,i,r){this.updateJoinOperatorDisabled(e.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(i),t)}updateJoinOperatorsDisabled(){let 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){let o=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,r,a)=>{a===t&&this.setElementValue(i,o[r]!=null?o[r]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,o,i)=>{this.setElementValue(t,o===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,o=>{this.attachElementOnChange(o,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},Xn=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function tn(e){var t;return(t=e==null?void 0:e.allowedCharPattern)!=null?t:null}function Bg(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[Se(o),Se(i)].slice(0,Pt(r,t))}var zx=class extends zr{constructor(){super("bigintFilter",Bg,Xn),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Mo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e0&&this.beans.ariaAnnounce.announceValue(u,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}refresh(e){let t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,r=this.state,a=i==null?void 0:i.fromAction;return(a&&a!="apply"||o.model!==r.model||!this.areStatesEqual(o.state,r.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){super.setElementValue(e,t,o),t===null&&e.setCustomValidity("")}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:o}=this,i=tn(e),r=oe({tag:"div",cls:"ag-filter-body",role:"presentation"}),a=this.createFromToElement(r,t,"from",i),n=this.createFromToElement(r,o,"to",i),s=(d,g,u)=>()=>this.refreshInputPairValidation(d,g,u),l=s(a,n,!0);a.onValueChange(l),a.addGuiEventListener("focusin",l);let c=s(a,n,!1);return n.onValueChange(c),n.addGuiEventListener("focusin",c),r}createFromToElement(e,t,o,i){let r=this.createManagedBean(i?new ut({allowedCharPattern:i}):new ut);return r.addCss(`ag-filter-${o}`),r.addCss("ag-filter-filter"),t.push(r),e.appendChild(r.getGui()),r}removeEValues(e,t){let o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{var n;i0&&(o.filter=String(i[0])),i.length>1&&(o.filterTo=String(i[1])),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{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){let o=e.getValue();return o==null||typeof o=="string"&&o.trim()===""?null:t?t(o):Se(o)}isInvalidValue(e,t){let o=e.getValue();return o!=null&&String(o).trim()!==""&&t===null}};function Lx(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Vg=class extends S{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){let t=e.filterParams,o=new Jn;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"){let 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){var n;let t=e.model;if(t==null)return!0;let{operator:o}=t,i=[];if(o){let s=t;i.push(...(n=s.conditions)!=null?n:[])}else i.push(t);let r=o&&o==="OR"?"some":"every",a=this.params.getValue(e.node);return i[r](s=>this.individualConditionPasses(e,s,a))}getModelAsString(e,t){var o;return(o=this.filterModelFormatter.getModelAsString(e,t))!=null?o:""}validateModel(e){var d;let{model:t,filterParams:{filterOptions:o,maxNumConditions:i}}=e;if(t==null)return;let a=Yc(t)?t.conditions:[t],n=(d=o==null?void 0:o.map(g=>typeof g=="string"?g:g.displayKey))!=null?d:this.defaultOptions;if(!(!a||a.every(g=>n.find(u=>u===g.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1,c=this.filterType;if((a&&!a.every(g=>g.filterType===c)||t.filterType!==c)&&(a=a.map(g=>({...g,filterType:c})),l=!0),typeof i=="number"&&a&&a.length>i&&(a=a.slice(0,i),l=!0),l){let g=a.length>1?{...t,filterType:c,conditions:a}:{...a[0],filterType:c};this.params={...e,model:g},e.onModelChange(g)}}individualConditionPasses(e,t,o){let i=this.optionsFactory,r=this.mapValuesFromModel(t,i),a=i.getCustomOption(t.type),n=Ix(a,r,o);return n!=null?n:o==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(r,o,t,e)}},es=class extends Vg{evaluateNullValue(e){let{includeBlanksInEquals:t,includeBlanksInNotEqual:o,includeBlanksInGreaterThan:i,includeBlanksInLessThan:r,includeBlanksInRange:a}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(o)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(r)return!0;break;case"inRange":if(a)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,o){let i=o.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";let r=this.comparator(),a=e[0]!=null?r(e[0],t):0;switch(i){case"equals":return a===0;case"notEqual":return a!==0;case"greaterThan":return a>0;case"greaterThanOrEqual":return a>=0;case"lessThan":return a<0;case"lessThanOrEqual":return a<=0;case"inRange":{let n=r(e[1],t);return this.params.filterParams.inRangeInclusive?a>=0&&n<=0:a>0&&n<0}case"blank":return wr(t);case"notBlank":return!wr(t);default:return k(76,{filterModelType:i}),!0}}},ts={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},Ox={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Lr=class extends S{constructor(e,t,o){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=o}getModelAsString(e,t){var a;let o=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?He(this,"filterSummaryInactive"):null;if(e.operator!=null){let n=e,l=((a=n.conditions)!=null?a:[]).map(d=>this.getModelAsString(d,t)),c=n.operator==="AND"?"andCondition":"orCondition";return l.join(` ${He(this,c)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?He(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):o(e.type,e.type);{let n=e,s=this.optionsFactory.getCustomOption(n.type),{displayKey:l,displayName:c,numberOfInputs:d}=s||{};return l&&c&&d===0?o(l,c):this.conditionToString(n,i,n.type==="inRange"||d===2,l,c)}}}updateParams(e){let{optionsFactory:t,filterParams:o}=e;this.optionsFactory=t,this.filterParams=o}conditionForToolPanel(e,t,o,i,r,a){let n,s=this.getTypeKey(e);return s&&(n=He(this,s)),r&&a&&(n=this.getLocaleTextFunc()(r,a)),n!=null?t?`${n} ${He(this,"filterSummaryInRangeValues",[o(),i()])}`:`${n} ${o()}`:null}getTypeKey(e){let t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){var o;let t=this.valueFormatter;return t?(o=t(e!=null?e:null))!=null?o:"":String(e)}},Ng=class extends Lr{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=ts}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e,l=this.formatValue.bind(this),c=Se(a),d=Se(n);if(t){let g=this.conditionForToolPanel(s,o,()=>l(c),()=>l(d),i,r);if(g!=null)return g}return o?`${l(c)}-${l(d)}`:a!=null?l(c):`${s}`}},Hx=class extends es{constructor(){super(Bg,Xn),this.filterType="bigint",this.FilterModelFormatterClass=Ng}comparator(){return(e,t)=>e===t?0:e{}}setupGui(e){var i;this.eInput=this.createManagedBean(new ut((i=this.params)==null?void 0:i.config));let t=this.eInput.getGui();e.appendChild(t);let o=r=>this.onValueChanged(r);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}){let{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!o),i.setInputPlaceholder(o)}};function on(e){let t=e==null?void 0:e.trim();return t===""?e:t}function Gg(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[o||null,i||null].slice(0,Pt(r,t))}var Wg=class extends _{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}let t=e.operator,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;let o=e;return this.isTypeEditable(o.type)}init(e){this.params=e;let t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){let o=e;this.onModelUpdated(o.model)}}setParams(e){let t=new Jn;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){let o=this.optionsFactory.defaultOption;t||(this.lastType=o),this.readOnly=!!e.filterParams.readOnly;let i=this.isTypeEditable(o);this.setEditable(i)}refresh(e){this.params=e;let t=e,o=this.reactive;if((!o||t.source==="colDef")&&this.updateParams(e),o){let{source:i,model:r}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(r)}}updateParams(e){let t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t!=null&&t.afterFloatingFilter||t!=null&&t.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&Pt(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},Bx={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},is=class extends Wg{constructor(){super(...arguments),this.eFloatingFilterInputContainer=E,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Bx)}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){var g;let{inputSvc:t,defaultDebounceMs:o,readOnly:i}=this,{filterPlaceholder:r,column:a,browserAutoComplete:n,filterParams:s}=e,l=(g=this.lastType)!=null?g:this.optionsFactory.defaultOption,c=e.filterParams.filterPlaceholder,d=r===!0?nd(this,c,"filterOoo",l):r||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(a),autoComplete:n!=null?n:!1,placeholder:d}),this.applyActive=Rr(s),!i){let u=En(s,o);t.setValueChangedListener(re(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let{inputSvc:t}=this,o=t.getValue();ne(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(o,!0)}syncUpWithParentFilter(e){let t=e.key===b.ENTER,o=this.reactive;if(o&&this.params.onUiChange(),this.applyActive&&!t)return;let{inputSvc:i,params:r,lastType:a}=this,n=i.getValue();if(r.filterParams.trimInput&&(n=on(n),i.setValue(n,!0)),o){let s=r,l=s.model,c=this.convertValue(n),d=c==null?null:{...l!=null?l:{filterType:this.filterType,type:a!=null?a:this.optionsFactory.defaultOption},filter:c};s.onModelChange(d,{afterFloatingFilter:!0})}else r.parentFilterInstance(s=>{s==null||s.onFloatingFilterChanged(a||null,n||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},Vx=class extends is{constructor(){super(...arguments),this.FilterModelFormatterClass=Ng,this.filterType="bigint",this.defaultOptions=Xn}updateParams(e){let t=e.filterParams;tn(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t==null?void 0:t.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){let t=e.filterParams;this.allowedCharPattern=tn(t),this.bigintParser=t==null?void 0:t.bigintParser;let o=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new os({config:o}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):Se(e)}},jl=".ag-input-field-input",qg=class{constructor(e,t,o,i,r,a){this.context=e,this.eParent=r,this.alive=!0,this.debouncedReport=re({isAlive:()=>this.alive},Kl,500),this.timeoutHandle=null;let n=Gp(t,o,i);n==null||n.newAgStackInstance().then(s=>{var d,g;if(!this.alive){e.destroyBean(s);return}if(this.dateComp=s,!s)return;r.appendChild(s.getGui()),(d=s==null?void 0:s.afterGuiAttached)==null||d.call(s);let{tempValue:l,disabled:c}=this;l&&s.setDate(l),c!=null&&((g=s.setDisabled)==null||g.call(s,c)),a==null||a(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){let t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){var o;let t=this.dateComp;t?(o=t.setDisabled)==null||o.call(t,e):this.disabled=e}setDisplayed(e){q(this.eParent,e)}setInputPlaceholder(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.setInputPlaceholder)==null||o.call(t,e)}setInputAriaLabel(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.setInputAriaLabel)==null||o.call(t,e)}afterGuiAttached(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.afterGuiAttached)==null||o.call(t,e)}updateParams(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.refresh)==null||o.call(t,e)}setCustomValidity(e,t=!1){var i;let o=(i=this.dateComp)==null?void 0:i.getGui().querySelector(jl);if(o&&"setCustomValidity"in o){let r=e.length>0;o.setCustomValidity(e),r?t?this.timeoutHandle=this.debouncedReport(o):Kl(o):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),gn(o,r)}}getValidity(){var e,t;return(t=(e=this.dateComp)==null?void 0:e.getGui().querySelector(jl))==null?void 0:t.validity}};function Kl(e){e.reportValidity()}var rs=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function _g(e,t){let{dateFrom:o,dateTo:i,type:r}=e||{};return[o&&me(o,void 0,!0)||null,i&&me(i,void 0,!0)||null].slice(0,Pt(r,t))}var $l=1e3,Yl=1/0,Nx=class extends zr{constructor(){super("dateFilter",_g,rs),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=$l,this.maxValidYear=Yl,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Mo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);let t=(l,c)=>{let d=e[l];if(d!=null)if(isNaN(d))k(82,{param:l});else return d==null?c:Number(d);return c},o=t("minValidYear",$l),i=t("maxValidYear",Yl);this.minValidYear=o,this.maxValidYear=i,o>i&&k(83);let{minValidDate:r,maxValidDate:a}=e,n=r instanceof Date?r:me(r);this.minValidDate=n;let s=a instanceof Date?a:me(a);this.maxValidDate=s,n&&s&&n>s&&k(84)}refreshInputValidation(){for(let e=0;e=2?Gx(c,d,t):null,u=g?this.translate(g,[String(t?d:c)]):"",h=!Mo()&&!o;(t?n:s).setCustomValidity(u,h),(t?s:n).setCustomValidity("",h),u.length>0&&a.ariaAnnounce.announceValue(u,"dateFilter")}createDateCompWrapper(e,t,o){let{beans:{userCompFactory:i,context:r,gos:a},params:n}=this,s=o==="from",l=new qg(r,i,n.colDef,O(a,{onDateChanged:()=>{this.refreshInputPairValidation(t,s),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,s),filterParams:n,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){let e=oe({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,o,i){let r=oe({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(r),e.appendChild(r),o.push(this.createDateCompWrapper(r,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),ti(this.eConditionPanelsFrom,e,t),ti(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,o){let i=ti(e,t,o);for(let r of i)r.destroy()}isValidDateValue(e){if(e===null)return!1;let{minValidDate:t,maxValidDate:o,minValidYear:i,maxValidYear:r}=this;if(t){if(eo)return!1}else if(e.getUTCFullYear()>r)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{var o,i;return e||(e=t.getDate()!=null&&!((i=(o=t.getValidity())==null?void 0:o.valid)==null||i))}),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>{var i,r;return t||(t=!((r=(i=o.getValidity())==null?void 0:i.valid)==null||r))}),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(o,i,r,a)=>{!t||i>=a||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){let t=this.getConditionType(e),o={},{params:i,filterType:r}=this,a=this.getValues(e),n=i.useIsoSeparator?"T":" ";return a.length>0&&(o.dateFrom=fe(a[0],!0,n)),a.length>1&&(o.dateTo=fe(a[1],!0,n)),{dateFrom:null,dateTo:null,filterType:r,type:t,...o}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){let e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(o)})}getInputs(e){let{dateConditionFromComps:t,dateConditionToComps:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{i=t?`${o?"max":"min"}DateValidation`:null}var Ug=class extends Lr{constructor(e,t){super(e,t,o=>{let{dataTypeSvc:i,valueSvc:r}=this.beans,a=t.column,n=i==null?void 0:i.getDateFormatterFunction(a),s=n?n(o!=null?o:void 0):o;return r.formatValue(a,null,s)}),this.filterTypeKeys=ts}conditionToString(e,t,o,i,r){let{type:a}=e,n=me(e.dateFrom),s=me(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):u=>Cw(u,l),d=()=>n!==null?c(n):"null",g=()=>s!==null?c(s):"null";if(n==null&&s==null)return He(this,a);if(t){let u=this.conditionForToolPanel(a,o,d,g,i,r);if(u!=null)return u}return o?`${d()}-${g()}`:n!=null?c(n):`${a}`}};function Wx(e,t){let o=t;return oe?1:0}var qx=class extends es{constructor(){super(_g,rs),this.filterType="date",this.FilterModelFormatterClass=Ug,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){let{filterTypeToRangeCache:o}=this,i=Date.now(),r=o.get(e);if(r&&r.expires=0&&r(l,t)<0}return super.evaluateNonNullValue(e,t,o)}},_x=1,Li=null,Ux=()=>{var o,i,r,a;if(Li!=null)return Li;let e,t=typeof navigator=="undefined"?void 0:(i=(o=navigator.languages)==null?void 0:o[0])!=null?i:navigator.language;if(t&&typeof Intl!="undefined"&&typeof Intl.Locale=="function")try{let n=(a=(r=new Intl.Locale(t)).getWeekInfo)==null?void 0:a.call(r);e=n==null?void 0:n.firstDay}catch{e=void 0}return Li=e==null?_x:e%7,Li},xe=e=>(e.setHours(0,0,0,0),e),Or=e=>{let t=e.getDay(),o=Ux(),i=(t-o+7)%7;return e.setDate(e.getDate()-i),xe(e)},Hr=(e,t=1)=>(e.setDate(e.getDate()-t),e),Ae=e=>(e.setDate(e.getDate()+1),xe(e)),jg=e=>(Or(e),e.setDate(e.getDate()+6),Ae(e)),Br=e=>(e.setDate(1),xe(e)),as=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),xe(e)),ns=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Br(e)},Kg=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),as(e)},ss=e=>(e.setMonth(0,1),xe(e)),$g=e=>(e.setMonth(12,0),Ae(e)),Ao=e=>Hr(e),rn=e=>Ao(Or(e)),an=e=>Ao(Br(e)),nn=e=>Ao(ns(e)),ls=(e,t)=>[xe(e),Ae(t)],jx=(e,t)=>ls(Ao(e),Ao(t)),cs=(e,t)=>[Or(e),jg(t)],Kx=(e,t)=>cs(rn(e),rn(t)),ds=(e,t)=>[Br(e),as(t)],$x=(e,t)=>ds(an(e),an(t)),gs=(e,t)=>[ns(e),Kg(t)],Yx=(e,t)=>gs(nn(e),nn(t)),us=(e,t)=>[ss(e),$g(t)],Qx=(e,t)=>[ss(e),Ae(t)],Zx=(e,t)=>[xe(Hr(e,7)),Ae(t)],Jx=(e,t)=>[xe(Hr(e,30)),Ae(t)],Xx=(e,t)=>[xe(Hr(e,90)),Ae(t)],ek=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[xe(e),Ae(t)]),tk=(e,t)=>(e.setFullYear(e.getFullYear()-1),[xe(e),Ae(t)]),ok=(e,t)=>(e.setFullYear(e.getFullYear()-2),[xe(e),Ae(t)]),ik=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),us(e,t)),rk=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),us(e,t)),ak=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),gs(e,t)),nk=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),ds(e,t)),sk=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),cs(e,t)),lk=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),ls(e,t)),ck={today:ls,yesterday:jx,tomorrow:lk,thisWeek:cs,lastWeek:Kx,nextWeek:sk,thisMonth:ds,lastMonth:$x,nextMonth:nk,thisQuarter:gs,lastQuarter:Yx,nextQuarter:ak,thisYear:us,lastYear:ik,nextYear:rk,yearToDate:Qx,last7Days:Zx,last30Days:Jx,last90Days:Xx,last6Months:ek,last12Months:tk,last24Months:ok,setStartOfDay:xe,setStartOfWeek:Or,setStartOfNextDay:Ae,setStartOfNextWeek:jg,setStartOfMonth:Br,setStartOfNextMonth:as,setStartOfQuarter:ns,setStartOfNextQuarter:Kg,setStartOfYear:ss,setStartOfNextYear:$g,setPreviousDay:Ao,setPreviousWeek:rn,setPreviousMonth:an,setPreviousQuarter:nn},dk={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"}]},gk=class extends Wg{constructor(){super(dk,[Tr]),this.eReadOnlyText=E,this.eDateWrapper=E,this.FilterModelFormatterClass=Ug,this.filterType="date",this.defaultOptions=rs}setParams(e){super.setParams(e),this.createDateComponent();let 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){let t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){let o=e?me(e.dateFrom):null;this.dateComp.setDate(o),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){q(this.eDateWrapper,e),q(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){var t;let e=this.dateComp.getDate();if(this.reactive){let o=this.params;o.onUiChange();let i=o.model,r=fe(e),a=r==null?null:{...i!=null?i:{filterType:this.filterType,type:(t=this.lastType)!=null?t:this.optionsFactory.defaultOption},dateFrom:r};o.onModelChange(a,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(o=>{o==null||o.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){let{filterParams:e}=this.params,t=En(e,this.defaultDebounceMs);return O(this.gos,{onDateChanged:re(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){let{beans:{context:e,userCompFactory:t},eDateWrapper:o,params:{column:i}}=this;this.dateComp=new qg(e,t,i.getColDef(),this.getDateComponentParams(),o,r=>{r.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},uk={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},hk=class extends _{constructor(){super(uk,[Tr]),this.eDateInput=E,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);let 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(){var e,t;(t=(e=this.params).onFocusIn)==null||t.call(e)}setParams(e){var p,f;let t=this.eDateInput.getInputElement(),o=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=o&&zt();let{minValidYear:i,maxValidYear:r,minValidDate:a,maxValidDate:n,buttons:s,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,g=(f=l!=null?l:(p=d==null?void 0:d.getDateIncludesTimeFlag)==null?void 0:p.call(d,c.cellDataType))!=null?f:!1;o?g?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";let u=Ql(a,i,!0),h=Ql(n,r,!1);u&&h&&u.getTime()>h.getTime()&&k(87),u&&(t.min=fe(u,g)),h&&(t.max=fe(h,g)),this.isApply=e.location==="floatingFilter"&&!!(s!=null&&s.includes("apply"))}refresh(e){this.params=e,this.setParams(e)}getDate(){return me(this.eDateInput.getValue())}setDate(e){var i,r;let t=this.params.filterParams.colDef.cellDataType,o=(r=(i=this.beans.dataTypeSvc)==null?void 0:i.getDateIncludesTimeFlag(t))!=null?r:!1;this.eDateInput.setValue(fe(e,o))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e!=null&&e.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){var t,o;return(o=(t=e==null?void 0:e.filterParams)==null?void 0:t.browserDatePicker)!=null?o:!0}};function Ql(e,t,o){return e&&t&&k(o?85:86),e instanceof Date?e:e?me(e):t?me(`${t}-${o?"01-01":"12-31"}`):null}var hs=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function sn(e){var t;return(t=e==null?void 0:e.allowedCharPattern)!=null?t:null}function br(e){return e==null||isNaN(e)?null:e}function Yg(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[br(o),br(i)].slice(0,Pt(r,t))}var pk=class extends zr{constructor(){super("numberFilter",Yg,hs),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Mo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e0&&this.beans.ariaAnnounce.announceValue(s,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}refresh(e){let t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,r=this.state,a=i==null?void 0:i.fromAction;return(a&&a!="apply"||o.model!==r.model||!this.areStatesEqual(o.state,r.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){let{numberFormatter:i}=this.params,r=!o&&i?i(t!=null?t:null):t;super.setElementValue(e,r),r===null&&e.setCustomValidity("")}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:o}=this,i=sn(e),r=oe({tag:"div",cls:"ag-filter-body",role:"presentation"}),a=this.createFromToElement(r,t,"from",i),n=this.createFromToElement(r,o,"to",i),s=(d,g,u)=>()=>this.refreshInputPairValidation(d,g,u),l=s(a,n,!0);a.onValueChange(l),a.addGuiEventListener("focusin",l);let c=s(a,n,!1);return n.onValueChange(c),n.addGuiEventListener("focusin",c),r}createFromToElement(e,t,o,i){let r=this.createManagedBean(i?new ut({allowedCharPattern:i}):new Qn);return r.addCss(`ag-filter-${o}`),r.addCss("ag-filter-filter"),t.push(r),e.appendChild(r.getGui()),r}removeEValues(e,t){let o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{i0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{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 Qg(e,t){if(typeof t=="number")return t;let o=st(t);return o!=null&&o.trim()===""&&(o=null),e?e(o):o==null||o.trim()==="-"?null:Number.parseFloat(o)}function Zl(e,t){return br(Qg(e,t.getValue(!0)))}function fk(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Zg=class extends Lr{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=ts}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e,l=this.formatValue.bind(this);if(t){let c=this.conditionForToolPanel(s,o,()=>l(a),()=>l(n),i,r);if(c!=null)return c}return o?`${l(a)}-${l(n)}`:a!=null?l(a):`${s}`}},mk=class extends es{constructor(){super(Yg,hs),this.filterType="number",this.FilterModelFormatterClass=Zg}comparator(){return(e,t)=>e===t?0:e{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new Qn),this.eTextInput=this.createManagedBean(new ut),this.eTextInput.setDisabled(!0);let t=this.eNumberInput.getGui(),o=this.eTextInput.getGui();e.appendChild(t),e.appendChild(o),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(o,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:o}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,o),this.setPlaceholder(this.eTextInput,o)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},Ck=class extends is{constructor(){super(...arguments),this.FilterModelFormatterClass=Zg,this.filterType="number",this.defaultOptions=hs}updateParams(e){sn(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=sn(e.filterParams),this.allowedCharPattern?this.createManagedBean(new os({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new vk)}convertValue(e){return e?Number(e):null}},ps=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],wk=class extends zr{constructor(){super("textFilter",Gg,ps),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){let t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){let{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{ithis.removeComponents(a,e,t),{eValuesFrom:i,eValuesTo:r}=this;o(i),o(r)}},Jg=class extends Lr{constructor(){super(...arguments),this.filterTypeKeys=Ox}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e;if(t){let l=d=>()=>He(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(s,o,l(a),l(n),i,r);if(c!=null)return c}return o?`${a}-${n}`:a!=null?`${a}`:`${s}`}},bk=({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":{let i=t.lastIndexOf(o);return i>=0&&i===t.length-o.length}default:return!1}},yk=e=>e,Sk=e=>e==null?null:e.toString().toLowerCase(),xk=class extends Vg{constructor(){super(Gg,ps),this.filterType="text",this.FilterModelFormatterClass=Jg}updateParams(e){var o,i;super.updateParams(e);let t=e.filterParams;this.matcher=(o=t.textMatcher)!=null?o:bk,this.formatter=(i=t.textFormatter)!=null?i:t.caseSensitive?yk:Sk}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,o,i){let r=e.map(u=>this.formatter(u))||[],a=this.formatter(t),{api:n,colDef:s,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(o.type==="blank")return wr(t);if(o.type==="notBlank")return!wr(t);let g={api:n,colDef:s,column:l,context:c,node:i.node,data:i.data,filterOption:o.type,value:a,textFormatter:d};return r.some(u=>this.matcher({...g,filterText:u}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){let t=o=>{var n,s;let i={...o},{filter:r,filterTo:a}=o;return r&&(i.filter=(n=on(r))!=null?n:null),a&&(i.filterTo=(s=on(a))!=null?s:null),i};return Yc(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},kk=class extends is{constructor(){super(...arguments),this.FilterModelFormatterClass=Jg,this.filterType="text",this.defaultOptions=ps}createFloatingFilterInputService(){return this.createManagedBean(new os)}};function Rk(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function Ek(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function Fk(e){var t;(t=e.quickFilter)==null||t.resetCache()}var Dk=class extends S{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){let 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(){var l,c;let{autoColSvc:e,colModel:t,gos:o,pivotResultCols:i}=this.beans,r=t.isPivotMode(),a=e==null?void 0:e.getColumns(),n=t.getColDefCols(),s=(c=r&&!o.get("applyQuickFilterBeforePivotOrAgg")?(l=i==null?void 0:i.getPivotResultCols())==null?void 0:l.list:n)!=null?c:[];a&&(s=s.concat(a)),this.colsToUse=o.get("includeHiddenColumnsInQuickFilter")?s:s.filter(d=>d.isVisible()||d.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){let 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(){let{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return M(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){k(70,{newFilter:e});return}let t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){let 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=>{let i=this.getTextForColumn(o,e);return M(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let o;e?(this.checkGenerateAggText(t),o=t.quickFilterAggregateText):o=this.getAggText(t);let{quickFilterParts:i,matcher:r}=this;return r(i,o)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let o=this.beans.filterValueSvc.getValue(e,t),i=e.getColDef();if(i.getQuickFilterText){let r=O(this.gos,{value:o,node:t,data:t.data,column:e,colDef:i});o=i.getQuickFilterText(r)}return M(o)?o.toString().toUpperCase():null}getAggText(e){let t=[];for(let o of this.colsToUse){let i=this.getTextForColumn(o,e);M(i)&&t.push(i)}return t.join(` -`)}},Mk={moduleName:"ClientSideRowModelFilter",version:D,rowModels:["clientSide"],beans:[S3]},fs={moduleName:"FilterCore",version:D,beans:[Cx],apiFunctions:{isAnyFilterPresent:mx,onFilterChanged:vx},css:[Y2],dependsOn:[Mk]},Xg={moduleName:"FilterValue",version:D,beans:[Ex]},Si={moduleName:"ColumnFilter",version:D,beans:[fx,Rx],dynamicBeans:{headerFilterCellCtrl:_2},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Q2,getColumnFilterInstance:Z2,destroyFilter:J2,setFilterModel:X2,getFilterModel:ex,getColumnFilterModel:tx,setColumnFilterModel:ox,showColumnFilter:ix,hideColumnFilter:rx,getColumnFilterHandler:ax,doFilterAction:nx},dependsOn:[fs,Ir,Xg,$2]},Pk={moduleName:"CustomFilter",version:D,userComponents:{agReadOnlyFloatingFilter:Dx},dependsOn:[Si]},Ik={moduleName:"TextFilter",version:D,dependsOn:[Si],userComponents:{agTextColumnFilter:{classImp:wk,params:{useForm:!0}},agTextColumnFloatingFilter:kk},dynamicBeans:{agTextColumnFilterHandler:xk}},Tk={moduleName:"NumberFilter",version:D,dependsOn:[Si],userComponents:{agNumberColumnFilter:{classImp:pk,params:{useForm:!0}},agNumberColumnFloatingFilter:Ck},dynamicBeans:{agNumberColumnFilterHandler:mk}},Ak={moduleName:"BigIntFilter",version:D,dependsOn:[Si],userComponents:{agBigIntColumnFilter:{classImp:zx,params:{useForm:!0}},agBigIntColumnFloatingFilter:Vx},dynamicBeans:{agBigIntColumnFilterHandler:Hx}},zk={moduleName:"DateFilter",version:D,dependsOn:[Si],userComponents:{agDateColumnFilter:{classImp:Nx,params:{useForm:!0}},agDateInput:hk,agDateColumnFloatingFilter:gk},dynamicBeans:{agDateColumnFilterHandler:qx}},Lk={moduleName:"QuickFilterCore",version:D,rowModels:["clientSide"],beans:[Dk],dependsOn:[fs,Xg]},Ok={moduleName:"QuickFilter",version:D,apiFunctions:{isQuickFilterPresent:Rk,getQuickFilter:Ek,resetQuickFilter:Fk},dependsOn:[Lk]},Hk={moduleName:"ExternalFilter",version:D,dependsOn:[fs]},Bk=class extends S{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){let 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=[];let{params:{blockSize:e,rowHeight:t},startRow:o,beans:i,rowNodes:r}=this;for(let a=0;a{this.params.datasource.getRows(e)},0)}createLoadParams(){let{startRow:e,endRow:t,version:o,params:{sortModel:i,filterModel:r},gos:a}=this;return O(a,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,o),failCallback:this.pageLoadFailed.bind(this,o),sortModel:i,filterModel:r})}forEachNode(e,t,o){this.rowNodes.forEach((i,r)=>{this.startRow+r{let n=e.rowData?e.rowData[a]:void 0;!r.id&&r.alreadyRendered&&n&&(t[a]=new Mt(o),t[a].setRowIndex(r.rowIndex),t[a].setRowTop(r.rowTop),t[a].setRowHeight(r.rowHeight),r._destroy(!0)),this.setDataAndId(t[a],n,this.startRow+a)});let i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){let e=this.rowNodes;for(let t=0,o=e.length;tn!=e),o=(n,s)=>s.lastAccessed-n.lastAccessed;t.sort(o);let i=this.params.maxBlocksInCache>0,r=i?this.params.maxBlocksInCache-1:null,a=Vk-1;t.forEach((n,s)=>{let l=n.state==="needsLoading"&&s>=a,c=i?s>=r:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(n)||this.isBlockFocused(n))return;this.removeBlockFromCache(n)}})}isBlockFocused(e){let t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;let{startRow:o,endRow:i}=e;return t.rowIndex>=o&&t.rowIndex=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let{blockSize:o,overflowSize:i}=this.params,a=(e.id+1)*o+i;this.rowCounto.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){let e=[];for(let t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(let t of e)this.destroyBlock(t)}purgeCache(){for(let e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let o=[],i=-1,r=!1,a={value:0},n=!1;for(let l of this.getBlocksInOrder())if(!n){if(r&&i+1!==l.id){n=!0;continue}i=l.id,l.forEachNode(c=>{let d=c===e||c===t;(r||d)&&o.push(c),d&&(r=!r)},a,this.rowCount)}return n||r?[]:o}},Gk=class extends S{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;let e=this.beans,t=new Mt(e);this.rootNode=t,t.level=-1,this.rowHeight=Ut(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=Ut(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t,o;let e;this.cacheParams?e=!oi(this.cacheParams.sortModel,(o=(t=this.beans.sortSvc)==null?void 0:t.getSortModel())!=null?o:[]):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(){var t;let e=this.infiniteCache;return(e==null?void 0:e.getRowCount())===0?(t=this.beans.filterManager)!=null&&t.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){var o,i;return(i=(o=this.infiniteCache)==null?void 0:o.getRowNodesInRange(e,t))!=null?i:[]}reset(){var o;if(!this.datasource)return;Do(this.gos)!=null||(o=this.beans.selectionSvc)==null||o.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){var n,s;this.destroyCache();let e=this.beans,{filterManager:t,sortSvc:o,rowNodeBlockLoader:i,eventSvc:r,gos:a}=e;this.cacheParams={datasource:this.datasource,filterModel:(n=t==null?void 0:t.getFilterModel())!=null?n:{},sortModel:(s=o==null?void 0:o.getSortModel())!=null?s:[],rowNodeBlockLoader:i,initialRowCount:a.get("infiniteInitialRowCount"),maxBlocksInCache:a.get("maxBlocksInCache"),rowHeight:Ut(e),overflowSize:a.get("cacheOverflowSize"),blockSize:a.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new Nk(this.cacheParams)),r.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){let 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){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){let 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(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e,t;return(t=(e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())!=null?t:!1}setRowCount(e,t){var o;(o=this.infiniteCache)==null||o.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function Wk(e){var t;(t=Fr(e))==null||t.refreshCache()}function qk(e){var t;(t=Fr(e))==null||t.purgeCache()}function _k(e){var t;return(t=Fr(e))==null?void 0:t.getRowCount()}var Uk=class extends S{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Mh(this.gos);let e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=re(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Xe(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){Et(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}let 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(let o of t)o.load();this.printCacheStatus()}getBlockState(){let e={};return this.blocks.forEach(t=>{let{id:o,state:i}=t.getBlockStateJson();e[o]=i}),e}printCacheStatus(){Et(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},jk={moduleName:"InfiniteRowModelCore",version:D,rowModels:["infinite"],beans:[Gk,Uk]},Kk={moduleName:"InfiniteRowModel",version:D,apiFunctions:{refreshInfiniteCache:Wk,purgeInfiniteCache:qk,getInfiniteRowCount:_k},dependsOn:[jk,f3]},$k=class extends S{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var a,n;let o=(n=(a=this.wrapSvc)==null?void 0:a.wrap(e,t))!=null?n:t,i=!ji.has(e),r=i?this.asyncListeners:this.syncListeners;r.has(e)||r.set(e,new Set),r.get(e).add(o),this.eventSvc.addListener(e,o,i)}removeListener(e,t){var a,n,s;let o=(n=(a=this.wrapSvc)==null?void 0:a.unwrap(e,t))!=null?n:t,i=this.asyncListeners.get(e),r=!!(i!=null&&i.delete(o));r||(s=this.syncListeners.get(e))==null||s.delete(o),this.eventSvc.removeListener(e,o,r)}addGlobalListener(e){var a,n;let t=(n=(a=this.wrapSvc)==null?void 0:a.wrapGlobal(e))!=null?n:e,o=(s,l)=>{ji.has(s)&&t(s,l)},i=(s,l)=>{ji.has(s)||t(s,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});let r=this.eventSvc;r.addGlobalListener(o,!1),r.addGlobalListener(i,!0)}removeGlobalListener(e){var n;let{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,r=(n=o==null?void 0:o.unwrapGlobal(e))!=null?n:e;if(i.has(r)){let{syncListener:s,asyncListener:l}=i.get(r);t.removeGlobalListener(s,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(r),t.removeGlobalListener(r,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(r=>this.eventSvc.removeListener(i,r,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){for(let 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);let{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Yk(e,t,o){var i;(i=e.apiEventSvc)==null||i.addListener(t,o)}function Qk(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeListener(t,o)}function Zk(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function Jk(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var Xk={moduleName:"EventApi",version:D,apiFunctions:{addEventListener:Yk,addGlobalListener:Zk,removeEventListener:Qk,removeGlobalListener:Jk},beans:[$k]},eR=class extends S{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){let e=this.gos,t=e.getCallback("getLocaleText");return t?Ju(t):Xu(e.get("localeText"))}},tR={moduleName:"Locale",version:D,beans:[eR]};function oR(e){var t,o;return(o=(t=e.stateSvc)==null?void 0:t.getState())!=null?o:{}}function iR(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function Jl(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=rR(e)),e.version=D,e}function rR(e){return e.cellSelection=aR(e,"rangeSelection"),e}function aR(e,t){if(e&&typeof e=="object")return e[t]}var nR=class extends S{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=re(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=re(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=re(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var c;let{gos:e,ctrlsSvc:t,colDelayRenderSvc:o}=this.beans;this.isClientSideRowModel=ee(e);let i=Jl((c=e.get("initialState"))!=null?c:{}),r=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;let a=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>a(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&(o==null||o.hideColumns("columnState"));let[n,s,l]=this.addManagedEventListeners({newColumnsLoaded:({source:d})=>{d==="gridInitializing"&&(n(),a(()=>{this.setupStateOnColumnsInitialised(i,!!r),o==null||o.revealColumns("columnState")}))},rowCountReady:()=>{s==null||s(),a(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l==null||l(),a(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){let o=Jl(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();let i="api",r=t?new Set(t):void 0;this.setGridReadyState(o,i,r),this.setColumnsInitialisedState(o,i,!!r,r),this.setRowCountState(o,i,r),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,r),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,r;t==="api"&&!(o!=null&&o.has("sideBar"))&&((r=(i=this.beans.sideBar)==null?void 0:i.comp)==null||r.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");let t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);let o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){let{filter:i,rowGroupExpansion:r,ssrmRowGroupExpansion:a,rowSelection:n,pagination:s,rowPinning:l}=e,c=(g,u)=>!(o!=null&&o.has(g))&&(u||t==="api");c("filter",i)&&this.setFilterState(i),(c("rowGroupExpansion",r)||c("ssrmRowGroupExpansion",a))&&this.setRowGroupExpansionState(a,r,t),c("rowSelection",n)&&this.setRowSelectionState(n,t),c("pagination",s)&&this.setPaginationState(s,t),c("rowPinning",l)&&this.setRowPinningState(l);let 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");let t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:r,colFilter:a,selectableFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(r.get("groupDefaultExpanded")!==0||r.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:s=>{(s.newPage||s.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),a&&this.addManagedListeners(a,{filterStateChanged:i}),n&&this.addManagedListeners(n,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,o){let{scroll:i,cellSelection:r,focusedCell:a,columnOrder:n}=e,s=(d,g)=>!(o!=null&&o.has(d))&&(g||t==="api");s("focusedCell",a)&&this.setFocusedCellState(a),s("cellSelection",r)&&this.setCellSelectionState(r),s("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!(n!=null&&n.orderedColIds),t);let l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());let c=this.getRangeSelectionState();l("rangeSelection",c),l("cellSelection",c),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");let t=this.updateCachedState.bind(this),o=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:o,cellFocusCleared:o,cellSelectionChanged:i=>{if(i.finished){let r=this.getRangeSelectionState();t("rangeSelection",r),t("cellSelection",r)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){let e=this.beans;return qy(ur(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){var z,L,N,j;let{sort:r,rowGroup:a,aggregation:n,pivot:s,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:g}=e,u=!1,h=(A,H)=>{let V=!(i!=null&&i.has(A))&&!!(H||t==="api");return u||(u=V),V},p={},f=A=>{let H=p[A];return H||(H={colId:A},p[A]=H,H)},m={},v=h("sort",r);v&&(r==null||r.sortModel.forEach(({colId:A,sort:H,type:V},Z)=>{let K=f(A);K.sort=H,K.sortIndex=Z,K.sortType=V})),(v||!o)&&(m.sort=null,m.sortIndex=null);let C=h("rowGroup",a);C&&(a==null||a.groupColIds.forEach((A,H)=>{let V=f(A);V.rowGroup=!0,V.rowGroupIndex=H})),(C||!o)&&(m.rowGroup=null,m.rowGroupIndex=null);let w=h("aggregation",n);w&&(n==null||n.aggregationModel.forEach(({colId:A,aggFunc:H})=>{f(A).aggFunc=H})),(w||!o)&&(m.aggFunc=null);let y=h("pivot",s);y&&(s==null||s.pivotColIds.forEach((A,H)=>{let V=f(A);V.pivot=!0,V.pivotIndex=H}),this.gos.updateGridOptions({options:{pivotMode:!!(s!=null&&s.pivotMode)},source:t})),(y||!o)&&(m.pivot=null,m.pivotIndex=null);let x=h("columnPinning",l);if(x){for(let A of(z=l==null?void 0:l.leftColIds)!=null?z:[])f(A).pinned="left";for(let A of(L=l==null?void 0:l.rightColIds)!=null?L:[])f(A).pinned="right"}(x||!o)&&(m.pinned=null);let R=h("columnVisibility",c);if(R)for(let A of(N=c==null?void 0:c.hiddenColIds)!=null?N:[])f(A).hide=!0;(R||!o)&&(m.hide=null);let F=h("columnSizing",d);if(F)for(let{colId:A,flex:H,width:V}of(j=d==null?void 0:d.columnSizingModel)!=null?j:[]){let Z=f(A);Z.flex=H!=null?H:null,Z.width=V}(F||!o)&&(m.flex=null);let P=g==null?void 0:g.orderedColIds,T=!!(P!=null&&P.length)&&!(i!=null&&i.has("columnOrder")),I=T?P.map(A=>f(A)):Object.values(p);(I.length||u)&&(this.columnStates=I,Ve(this.beans,{state:I,applyOrder:T,defaultState:m},t))}setColumnPivotState(e,t){let o=this.columnStates;this.columnStates=void 0;let i=this.columnGroupStates;this.columnGroupStates=void 0;let r=this.beans,{pivotResultCols:a,colGroupSvc:n}=r;if(a!=null&&a.isPivotResultColsPresent()){if(o){let s=[];for(let l of o)a.getPivotResultCol(l.colId)&&s.push(l);Ve(r,{state:s,applyOrder:e},t)}i&&(n==null||n.setColumnGroupState(i,t))}}getColumnGroupState(){let e=this.beans.colGroupSvc;if(!e)return;let t=e.getColumnGroupState();return _y(t)}setColumnGroupState(e,t,o){var s;let i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;let r=new Set((s=e.columnGroup)==null?void 0:s.openColumnGroupIds),n=i.getColumnGroupState().map(({groupId:l})=>{let c=r.has(l);return c&&r.delete(l),{groupId:l,open:c}});for(let l of r)n.push({groupId:l,open:!0});n.length&&(this.columnGroupStates=n),i.setColumnGroupState(n,t)}getFilterState(){var n;let{filterManager:e,selectableFilter:t}=this.beans,o=e==null?void 0:e.getFilterModel();o&&Object.keys(o).length===0&&(o=void 0);let i=e==null?void 0:e.getFilterState(),r=(n=e==null?void 0:e.getAdvFilterModel())!=null?n:void 0,a=t==null?void 0:t.getState();return o||r||i||a?{filterModel:o,columnFilterState:i,advancedFilterModel:r,selectableFilters:a}:void 0}setFilterState(e){let{filterManager:t,selectableFilter:o}=this.beans,{filterModel:i,columnFilterState:r,advancedFilterModel:a,selectableFilters:n}=e!=null?e:{filterModel:null,columnFilterState:null,advancedFilterModel:null};n!==void 0&&(o==null||o.setState(n!=null?n:{})),(i!==void 0||r!==void 0)&&(t==null||t.setFilterState(i!=null?i:null,r!=null?r:null,"columnFilter")),a!==void 0&&(t==null||t.setAdvFilterModel(a!=null?a:null,"advancedFilter"))}getRangeSelectionState(){var t;let e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{let{id:i,type:r,startRow:a,endRow:n,columns:s,startColumn:l}=o;return{id:i,type:r,startRow:a,endRow:n,colIds:s.map(c=>c.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){var n;let{gos:t,rangeSvc:o,colModel:i,visibleCols:r}=this.beans;if(!dt(t)||!o)return;let a=[];for(let s of(n=e==null?void 0:e.cellRanges)!=null?n:[]){let l=[];for(let d of s.colIds){let g=i.getCol(d);g&&l.push(g)}if(!l.length)continue;let c=i.getCol(s.startColId);if(!c){let d=r.allCols,g=new Set(l);c=d.find(u=>g.has(u))}a.push({...s,columns:l,startColumn:c})}o.setCellRanges(a)}getScrollState(){var i,r;if(!this.isClientSideRowModel)return;let e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(i=e==null?void 0:e.getHScrollPosition())!=null?i:{left:0},{top:o}=(r=e==null?void 0:e.getVScrollPosition())!=null?r:{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;let{top:t,left:o}=e!=null?e:{top:0,left:0},{frameworkOverrides:i,rowRenderer:r,animationFrameSvc:a,ctrlsSvc:n}=this.beans;i.wrapIncoming(()=>{var s;n.get("center").setCenterViewportScrollLeft(o),(s=n.getScrollFeature())==null||s.setVerticalScrollPosition(t),r.redraw({afterScroll:!0}),a==null||a.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.beans.focusSvc.getFocusedCell();if(e){let{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}let{colId:i,rowIndex:r,rowPinned:a}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:r,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let{pagination:e,gos:t}=this.beans;if(!e)return;let o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){let{pagination:o,gos:i}=this.beans;if(!o)return;let{pageSize:r,page:a}=e!=null?e:{page:0,pageSize:i.get("paginationPageSize")},n=t==="gridInitializing";r&&!i.get("paginationAutoPageSize")&&o.setPageSize(r,n?"initialState":"pageSizeSelector"),typeof a=="number"&&(n?o.setPage(a):o.goToPage(a))}getRowSelectionState(){var i;let e=this.beans.selectionSvc;if(!e)return;let t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){let{expansionSvc:e,gos:t}=this.beans,o=e==null?void 0:e.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?o:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:o)}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){let t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,o){var r,a;let i=(r=e!=null?e:t)!=null?r:{expandedRowGroupIds:[],collapsedRowGroupIds:[]};(a=this.beans.expansionSvc)==null||a.setExpansionState(i,o)}updateColumnState(e){let t=this.getColumnState(),o=!1,i=this.cachedState;for(let r of Object.keys(t)){let a=t[r];oi(a,i[r])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let o=this.cachedState[e];this.setCachedStateValue(e,t),oi(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){let e=this.staleStateKeys;for(let t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(let t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){let e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},sR={moduleName:"GridState",version:D,beans:[nR],apiFunctions:{getState:oR,setState:iR}};function lR(e){return e.rowModel.isLastRowIndexKnown()}function cR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getPageSize())!=null?o:100}function dR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getCurrentPage())!=null?o:0}function gR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getTotalPages())!=null?o:1}function uR(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function hR(e){var t;(t=e.pagination)==null||t.goToNextPage()}function pR(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function fR(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function mR(e){var t;(t=e.pagination)==null||t.goToLastPage()}function vR(e,t){var o;(o=e.pagination)==null||o.goToPage(t)}var CR=class extends S{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;let t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;let e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){let t=this.beans,o=()=>{let i=Math.max(Ut(t),1),r=Math.floor(e/i);t.pagination.setPageSize(r,"autoCalculated")};this.isBodyRendered?re(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function wR(e,t){if(typeof e!="number")return"";let o=t(),i=o("thousandSeparator",","),r=o("decimalSeparator",".");return e.toString().replace(".",r).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var qo="paginationPageSizeSelector",bR={tag:"span",cls:"ag-paging-page-size"},yR=class extends _{constructor(){super(bR),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let t=Number(e);isNaN(t)||t<1||t===this.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(qo,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;let 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(){ne(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(qo)!==!1}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){let r=this.gos.exists("paginationPageSize"),a=this.gos.get(qo)!==!0;k(94,{pageSizeSet:r,pageSizesSet:a,pageSizeOptions:e,paginationPageSizeOption:t}),a||k(95,{paginationPageSizeOption:t,paginationPageSizeSelector:qo}),e.unshift("")}let i=String(o?"":t);this.selectPageSizeComp?(It(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){let o=this.getLocaleTextFunc(),i=o("pageSizeSelectorLabel","Page Size:"),r=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Zn).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(r).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=[20,50,100],t=this.gos.get(qo);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((o,i)=>o-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},SR={selector:"AG-PAGE-SIZE-SELECTOR",component:yR},xR=".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}",kR=class extends Ed{constructor(){super(),this.btFirst=E,this.btPrevious=E,this.btNext=E,this.btLast=E,this.lbRecordCount=E,this.lbFirstRowOnPage=E,this.lbLastRowOnPage=E,this.lbCurrent=E,this.lbTotal=E,this.pageSizeComp=E,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(xR)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){let e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[SR]);let{btFirst:t,btPrevious:o,btNext:i,btLast:r}=this;this.activateTabIndex([t,o,i,r]),t.insertAdjacentElement("afterbegin",ye(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",ye(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",ye(e?"previous":"next",this.beans)),r.insertAdjacentElement("afterbegin",ye(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:a=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(a):Pf(this.beans,a),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){let 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(let 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)}]){let{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:i=>{(i.key===b.ENTER||i.key===b.SPACE)&&(i.preventDefault(),o())}})}Mf(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):wR(e,this.getLocaleTextFunc.bind(this))}getTemplate(){let 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(){let 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);let i=this.isZeroPagesToDisplay(),r=e===o-1;this.nextButtonDisabled=r||i,this.lastButtonDisabled=!t||i||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Ru(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),i=e?o:null,r=this.pagination.getCurrentPage(),a=this.pagination.getPageSize(),n,s;this.isZeroPagesToDisplay()?n=s=0:(n=a*r+1,s=n+a-1,e&&s>i&&(s=i));let l=n+a-1,c=!e&&o0?r+1:0,f=this.formatNumber(p);this.lbCurrent.textContent=f;let m,v;if(e)m=this.formatNumber(t),v=this.formatNumber(i);else{let C=u("more","more");m=C,v=C}this.lbTotal.textContent=m,this.lbRecordCount.textContent=v,this.announceAriaStatus(d,g,v,f,m)}announceAriaStatus(e,t,o,i,r){var g,u;let a=this.getLocaleTextFunc(),n=a("page","Page"),s=a("to","to"),l=a("of","of"),c=`${e} ${s} ${t} ${l} ${o}`,d=`${n} ${i} ${l} ${r}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,(g=this.ariaAnnounce)==null||g.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,(u=this.ariaAnnounce)==null||u.announceValue(d,"paginationPage"))}},RR={selector:"AG-PAGINATION",component:kR},ER=100,FR=class extends S{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){let 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 RR}isPaginateChildRows(){let 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){let t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;let{editSvc:o}=this.beans;o!=null&&o.isEditing()&&(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var o,i,r;if(!this.active)return;let t=e;this.paginateChildRows||(t=(r=(i=(o=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:i.call(o,e))!=null?r: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(){let 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 M(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:M(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:M(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:M(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:ER}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;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let 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(){let e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);let t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){let e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}let o=this.pageSize,i=t-1;this.totalPages=Math.floor(i/o)+1,this.adjustCurrentPageIfInvalid();let r=this.currentPage,a=o*r,n=o*(r+1)-1;if(n>i&&(n=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(a),n===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{let s=e.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=s-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){let e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}let{pageSize:t,currentPage:o}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){let{keepRenderedRows:t=!1,newPage:o=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:i,keepRenderedRows:t})}},DR={moduleName:"Pagination",version:D,beans:[FR,CR],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:lR,paginationGetPageSize:cR,paginationGetCurrentPage:dR,paginationGetTotalPages:gR,paginationGetRowCount:uR,paginationGoToNextPage:hR,paginationGoToPreviousPage:pR,paginationGoToFirstPage:fR,paginationGoToLastPage:mR,paginationGoToPage:vR},dependsOn:[Ir]},MR=".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 PR(e){var t,o;return(o=(t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())!=null?o:0}function IR(e){var t,o;return(o=(t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())!=null?o:0}function TR(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function AR(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function zR(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var LR={moduleName:"PinnedRow",version:D,beans:[pf],css:[MR],apiFunctions:{getPinnedTopRowCount:PR,getPinnedBottomRowCount:IR,getPinnedTopRow:TR,getPinnedBottomRow:AR,forEachPinnedRow:zR},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},OR="\u2191",HR="\u2193",BR={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},VR=class extends _{constructor(){super(BR),this.eValue=E,this.eDelta=E,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){let o=Math.abs(t),i=e.formatValue(o),r=M(i)?i:o,a=t>=0,n=this.eDelta;a?n.textContent=OR+r:n.textContent=HR+r,n.classList.toggle("ag-value-change-delta-up",a),n.classList.toggle("ag-value-change-delta-down",!a)}setTimerToRemoveDelta(){this.refreshCount++;let 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"),ne(this.eDelta)}refresh(e,t=!1){var c;let{value:o,valueFormatted:i}=e,{eValue:r,lastValue:a,beans:n}=this;if(o===a||(M(i)?r.textContent=i:M(o)?r.textContent=o:ne(r),(c=n.filterManager)!=null&&c.isSuppressFlashingCellsBecauseFiltering()))return!1;let s=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,l=a&&typeof a=="object"&&"toNumber"in a?a.toNumber():a;if(s===l)return!1;if(typeof s=="number"&&typeof l=="number"){let d=s-l;this.showDelta(e,d)}return a&&r.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},NR=".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}",GR={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},WR=class extends _{constructor(){super(GR),this.eCurrent=E,this.refreshCount=0,this.registerCSS(NR)}init(e){this.refresh(e,!0)}addSlideAnimation(){var r;this.refreshCount++;let e=this.refreshCount;(r=this.ePrevious)==null||r.remove();let{beans:t,eCurrent:o}=this,i=oe({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var a;e===this.refreshCount&&((a=this.ePrevious)==null||a.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var r;let o=e.value;if(Q(o)&&(o=""),o===this.lastValue||(r=this.beans.filterManager)!=null&&r.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;let i=this.eCurrent;return M(e.valueFormatted)?i.textContent=e.valueFormatted:M(e.value)?i.textContent=o:ne(i),!0}},qR=class extends S{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){let r=this.animations[t];r.delete(e);let a=Date.now(),n=a+o,s=a+o+i,l={phase:"flash",flashEndTime:n,fadeEndTime:s};r.set(e,l);let c=`ag-cell-${t}`,d=`${c}-animation`,{comp:g,eGui:{style:u}}=e;g.toggleCss(c,!0),g.toggleCss(d,!1),u.removeProperty("transition"),u.removeProperty("transition-delay"),this.nextAnimationTime&&n+15{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=n)}advanceAnimations(){let e=Date.now(),t=null;for(let o of Object.keys(this.animations)){let i=this.animations[o],r=`ag-cell-${o}`,a=`${r}-animation`;for(let[n,s]of i){if(!n.isAlive()||!n.comp){i.delete(n);continue}let{phase:l,flashEndTime:c,fadeEndTime:d}=s,g=l==="flash"?c:d;if(!(e+15>=g)){t=Math.min(g,t!=null?t:1/0);continue}let{comp:h,eGui:{style:p}}=n;switch(l){case"flash":h.toggleCss(r,!1),h.toggleCss(a,!0),p.transition=`background-color ${d-c}ms`,p.transitionDelay=`${c-e}ms`,t=Math.min(d,t!=null?t:1/0),s.phase="fade";break;case"fade":h.toggleCss(r,!1),h.toggleCss(a,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(n);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;let o=kf(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(let e of Object.keys(this.animations))this.animations[e].clear()}};function _R(e,t={}){let{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{for(let i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))o.flashCell(i,t)})}var UR={moduleName:"HighlightChanges",version:D,beans:[qR],userComponents:{agAnimateShowChangeCellRenderer:VR,agAnimateSlideCellRenderer:WR},apiFunctions:{flashCells:_R}};function jR(e,t,o){if(!t)return;let i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,r=`aria-${t}`;o===null?i.removeAttribute(r):i.setAttribute(r,o)}function KR(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function $R(e){e.frameworkOverrides.wrapIncoming(()=>{for(let t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function YR(e){var t,o;return(o=(t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())!=null?o:!0}function QR(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ZR(e){return{rowHeight:Ut(e),headerHeight:Ci(e)}}function JR(e,t={}){var a;let o=[];for(let n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){let s=n.getCellRenderer();s!=null&&o.push(to(s))}if((a=t.columns)!=null&&a.length)return o;let i=[],r=ja(t.rowNodes);for(let n of e.rowRenderer.getAllRowCtrls()){if(r&&!Ka(n.rowNode,r)||!n.isFullWidth())continue;let s=n.getFullWidthCellRenderers();for(let l=0;l{var p;let u=g.__autoHeights,h=Ft(this.beans,g).height;for(let f of r){let m=u==null?void 0:u[f.getColId()],v=o==null?void 0:o.getCellSpan(f,g);if(v){if(v.getLastNode()!==g)continue;if(m=(p=o==null?void 0:o.getCellSpan(f,g))==null?void 0:p.getLastNodeAutoHeight(),!m)return}if(m==null){if(this.colSpanSkipCell(f,g))continue;return}h=Math.max(m,h)}h!==g.rowHeight&&(g.setRowHeight(h),a=!0)};(s=i==null?void 0:i.forEachPinnedRow)==null||s.call(i,"top",n),(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"bottom",n),(c=t.forEachDisplayedNode)==null||c.call(t,n),a&&((d=t.onRowHeightChanged)==null||d.call(t))}setRowAutoHeight(e,t,o){var r;if((r=e.__autoHeights)!=null||(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}let i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){let{colModel:o,colViewport:i,visibleCols:r}=this.beans;if(!o.colSpanActive)return!1;let a=[];switch(e.getPinned()){case"left":a=r.getLeftColsForRow(t);break;case"right":a=r.getRightColsForRow(t);break;case null:a=i.getColsWithinViewport(t);break}return!a.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;let i=t.parentElement,{rowNode:r,column:a}=e,n=this.beans,s=d=>{var C;if((C=this.beans.editSvc)!=null&&C.isEditing(e)||!e.isAlive()||!o.isAlive())return;let{paddingTop:g,paddingBottom:u,borderBottomWidth:h,borderTopWidth:p}=ro(i),f=g+u+h+p,v=t.offsetHeight+f;if(d<5){let w=te(n),y=!(w!=null&&w.contains(t)),x=v==0;if(y||x){window.setTimeout(()=>s(d+1),0);return}}this.setRowAutoHeight(r,v,a)},l=()=>s(0);l();let c=Tt(n,t,l);return o.addDestroyFunc(()=>{c(),this.setRowAutoHeight(r,void 0,a)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;let e=this.beans.rowRenderer.getAllRowCtrls(),t=null;for(let{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(r=>r.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(let i of t){let r=o.__autoHeights[i.getColId()];if(!r||o.rowHeight{p=y,f=null,m=x},C=y=>{let x=!y.isExpandable()&&!y.group&&!y.detail&&(d?!d({rowNode:y}):!0);if(y.rowIndex==null||!x){v(null,null);return}if(p==null||y.level!==p.level||y.footer||f&&y.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){v(y,a.getValue(t,y,"data"));return}let R=a.getValue(t,y,"data");if(h){let F=O(o,{valueA:m,nodeA:p,valueB:R,nodeB:y,column:t,colDef:s});if(!u(F)){v(y,R);return}}else if(g?!g(m,R):m!==R){v(y,R);return}if(!f){let F=l==null?void 0:l.get(p);(F==null?void 0:F.firstNode)===p?(F.reset(),f=F):f=new oE(t,p),c.set(p,f)}f.addSpannedNode(y),c.set(y,f)};switch(e){case"center":(w=r.forEachDisplayedNode)==null||w.call(r,y=>{(!n||n.isRowInPage(y.rowIndex))&&C(y)}),this.centerValueNodeMap=c;break;case"top":i==null||i.forEachPinnedRow("top",C),this.topValueNodeMap=c;break;case"bottom":i==null||i.forEachPinnedRow("bottom",C),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}}},rE=class extends S{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=re(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=re(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){let e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){let{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;let o=this.createManagedBean(new iE(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}){let{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||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){let o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){let{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,r=e.rowIndex,a=this.spanningColumns.get(i);if(!a)return;let n;switch(e.rowPinned){case"top":n=t==null?void 0:t.getPinnedTopRow(r);break;case"bottom":n=t==null?void 0:t.getPinnedBottomRow(r);break;default:n=o.getRow(r)}if(n)return a.getCellSpan(n)}getCellStart(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){let o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(let[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){let r=i.getCellSpan(e);t(o,r)}}destroy(){super.destroy(),this.spanningColumns.clear()}},aE=class extends Eo{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,r,a,n){this.eWrapper=o,super.setComp(e,t,o,i,r,a,n),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){let{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||ri(e,t.rowIndex)}setAriaRowSpan(){Pu(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){var e;return(e=this.focusedCellPosition)!=null?e:this.cellPosition}checkCellFocused(){let 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){let{beans:t}=this;if(hi(t)){this.focusedCellPosition=void 0;return}let 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}},nE=class extends mr{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;let t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new aE(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;let t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},sE=class extends S{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){let{rowSpanSvc:t}=this.beans,o=this.getCtrlsMap(e),i=o.size,r=this.getAllRelevantRowControls(e),a=new Map,n=!1;for(let l of r)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(c,d)=>{if(a.has(d.firstNode))return;let g=o.get(d.firstNode);if(g){a.set(d.firstNode,g),o.delete(d.firstNode);return}n=!0;let u=new nE(d.firstNode,this.beans,!1,!1,!1);a.set(d.firstNode,u)}));this.setCtrlsMap(e,a);let s=a.size===i;if(!(!n&&s)){for(let l of o.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){let{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){let{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;let i=this.getCtrlsMap(e.rowPinned).get(o.firstNode);if(i)return i.getAllCellCtrls().find(r=>r.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(let 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")}},lE={moduleName:"CellSpan",version:D,beans:[rE,sE]},cE=class extends S{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,ko(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){let t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),ip(e))}createColumns(e,t){var u,h,p,f,m,v;let o=()=>{var C;rr(this.beans,(C=this.columns)==null?void 0:C.tree),this.columns=null},i=e.treeDepth,a=((h=(u=this.columns)==null?void 0:u.treeDepth)!=null?h:-1)==i,n=this.generateSelectionCols();if(op(n,(f=(p=this.columns)==null?void 0:p.list)!=null?f:[])&&a)return;o();let{colGroupSvc:l}=this.beans,c=(m=l==null?void 0:l.findDepth(e.tree))!=null?m:0,d=(v=l==null?void 0:l.balanceTreeForAutoCols(n,c))!=null?v:[];this.columns={list:n,tree:d,treeDepth:c,map:{}},t(C=>{if(!C)return null;let w=C.filter(y=>!At(y));return[...n,...w]})}updateColumns(e){var i,r;let t=ko(e.source),{beans:o}=this;for(let a of(r=(i=this.columns)==null?void 0:i.list)!=null?r:[]){let n=this.createSelectionColDef(e.currentValue);a.setColDef(n,null,t),Ve(o,{state:[ap(n,a.colId)]},t)}}getColumn(e){var t,o;return(o=(t=this.columns)==null?void 0:t.list.find(i=>Zo(i,e)))!=null?o:null}getColumns(){var e,t;return(t=(e=this.columns)==null?void 0:e.list)!=null?t:null}isSelectionColumnEnabled(){var n,s,l;let{gos:e,beans:t}=this,o=e.get("rowSelection");if(typeof o!="object"||!_t(e))return!1;let i=((l=(s=(n=t.autoColSvc)==null?void 0:n.getColumns())==null?void 0:s.length)!=null?l:0)>0;if(o.checkboxLocation==="autoGroupColumn"&&i)return!1;let r=!!yo(o),a=Ni(o);return r||a}createSelectionColDef(e){let{gos:t}=this,o=e!=null?e:t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:r,spanRows:a,...n}=o!=null?o:{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(s,l,c,d){let g=c.isSelected(),u=d.isSelected();return g===u?0:g?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...n,colId:Vc,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];let e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);let o=new ao(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){let i=t&&typeof t!="string"?yo(t):void 0,r=e&&typeof e!="string"?yo(e):void 0,a=i!==r,n=t&&typeof t!="string"?Ni(t):void 0,s=e&&typeof e!="string"?Ni(e):void 0,l=n!==s,c=tr(e),d=tr(t);(a||l||c!==d)&&this.beans.colModel.refreshAll(o)}destroy(){var e;rr(this.beans,(e=this.columns)==null?void 0:e.tree),super.destroy()}refreshVisibility(e,t,o){var l,c;if(!((l=this.columns)!=null&&l.list.length))return;let i=e.length+t.length+o.length;if(i===0)return;let r=this.columns.list[0];if(!r.isVisible())return;let a=()=>{let d;switch(r.pinned){case"left":case!0:d=e;break;case"right":d=o;break;default:d=t}d&&Xe(d,r)};(((c=this.beans.rowNumbersSvc)==null?void 0:c.getColumn(Nc))?2:1)===i&&a()}},dE=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function gE(e,t){var n;if(!t.nodes.every(s=>s.rowPinned&&!Mr(s)?(k(59),!1):s.id===void 0?(k(60),!1):!0))return;let{nodes:i,source:r,newValue:a}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:i,source:r!=null?r:"api",newValue:a})}function uE(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function hE(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function pE(e,t="apiSelectAllFiltered"){var o;(o=e.selectionSvc)==null||o.selectAllRowNodes({source:t,selectAll:"filtered"})}function fE(e,t="apiSelectAllFiltered"){var o;(o=e.selectionSvc)==null||o.deselectAllRowNodes({source:t,selectAll:"filtered"})}function mE(e,t="apiSelectAllCurrentPage"){var o;(o=e.selectionSvc)==null||o.selectAllRowNodes({source:t,selectAll:"currentPage"})}function vE(e,t="apiSelectAllCurrentPage"){var o;(o=e.selectionSvc)==null||o.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function CE(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedNodes())!=null?o:[]}function wE(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedRows())!=null?o:[]}var bE={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},yE=class extends _{constructor(){super(bE,[Nn]),this.eCheckbox=E}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,i=t.isSelected(),r=yr(e,i),[a,n]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],s=e(a,n);o.setValue(i,!0),o.setInputAriaLabel(`${s} (${r})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:Xt,click:i=>{var r;Xt(i),!this.eCheckbox.isDisabled()&&((r=this.beans.selectionSvc)==null||r.handleSelectionEvent(i,this.rowNode,"checkboxSelected"))}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:r})=>{let a=typeof i=="object"?Wr(i):void 0,n=typeof r=="object"?Wr(r):void 0;a!==n&&this.onSelectableChanged()}),Ma(this.gos)||typeof this.getIsVisible()=="function"){let i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){let{column:e,rowNode:t,overrides:o,gos:i}=this,r=t.selectable,a=this.getIsVisible(),n;if(typeof a=="function"){let g=o==null?void 0:o.callbackParams;if(!e)n=a({...g,node:t,data:t.data});else{let u=e.createColumnFunctionCallbackParams(t);n=a({...g,...u})}}else n=a!=null?a:!1;let s=r&&!n||!r&&n,l=r||n,c=i.get("rowSelection"),d=c&&typeof c!="string"?!Wr(c):!!(e!=null&&e.getColDef().showDisabledCheckboxes);this.setVisible(l&&(s?d:!0)),this.setDisplayed(l&&(s?d:!0)),l&&this.eCheckbox.setDisabled(s),o!=null&&o.removeHidden&&this.setDisplayed(l)}getIsVisible(){var o,i;let e=this.overrides;if(e)return e.isVisible;let t=this.gos.get("rowSelection");return t&&typeof t!="string"?yo(t):(i=(o=this.column)==null?void 0:o.getColDef())==null?void 0:i.checkboxSelection}},SE=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(){var e;if(this.cachedRange.length===0){let t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=(e=this.getNodesInRange(t,o))!=null?e:[]}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,{rowModel:o,pinnedRowModel:i}=this;return t!=null||(t=o.getRowNode(e)),i!=null&&i.isManual()&&(t!=null||(t=i.getPinnedRowById(e,"top")),t!=null||(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){let t=this.getRange();if(t.length===0)return{keep:[],discard:[]};let o=t[0].id===this.rootId,i=t.findIndex(r=>r.id===e.id);if(i>-1){let r=t.slice(0,i),a=t.slice(i+1);return this.setEndRange(e),o?{keep:r,discard:a}:{keep:a,discard:r}}else return{keep:t,discard:[]}}extend(e,t=!1){let o=this.getRoot();if(o==null){let r=this.getRange().slice();return t&&e.depthFirstSearch(a=>!a.group&&r.push(a)),r.push(e),this.setRoot(e),{keep:r,discard:[]}}let i=this.getNodesInRange(o,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(r=>r.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let r=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:r}}}getNodesInRange(e,t){var r,a,n,s,l,c;let{pinnedRowModel:o,rowModel:i}=this;if(!(o!=null&&o.isManual()))return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Re(o,"top",e,void 0).concat((r=i.getNodesInRangeForSelection(i.getRow(0),t))!=null?r:[]);if(e.rowPinned==="bottom"&&!t.rowPinned){let d=Re(o,"bottom",void 0,e),g=i.getRowCount(),u=i.getRow(g-1);return((a=i.getNodesInRangeForSelection(t,u))!=null?a:[]).concat(d)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Re(o,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){let d=Re(o,"top",t,void 0),g=Re(o,"bottom",void 0,e),u=i.getRow(0),h=i.getRow(i.getRowCount()-1);return d.concat((n=i.getNodesInRangeForSelection(u,h))!=null?n:[]).concat(g)}if(!e.rowPinned&&t.rowPinned==="top")return Re(o,"top",t,void 0).concat((s=i.getNodesInRangeForSelection(i.getRow(0),e))!=null?s:[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){let d=Re(o,"top",e,void 0),g=Re(o,"bottom",void 0,t),u=i.getRow(0),h=i.getRow(i.getRowCount()-1);return d.concat((l=i.getNodesInRangeForSelection(u,h))!=null?l:[]).concat(g)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Re(o,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){let d=Re(o,"bottom",void 0,t),g=i.getRow(i.getRowCount());return((c=i.getNodesInRangeForSelection(e,g))!=null?c:[]).concat(d)}return null}},xE=class extends S{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){let t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Y(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;let t=this.createManagedBean(new Vn);this.cbSelectAll=t,t.addCss("ag-header-select-all"),Rt(t.getGui(),"presentation"),this.showOrHideSelectAll();let o=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:o,paginationChanged:o,modelUpdated:o}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:r})=>{let a=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;a(i)!==a(r)&&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){let 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;let e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,i=t.getSelectAllState(e);o.setValue(i);let r=t.hasNodesToSelect(e);o.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){let t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:i,cbSelectAllVisible:r}=this,a=i.getValue(),n=yr(t,a),s=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",r?`${s} (${n})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return di(this.gos)?!0:(k(128,{feature:e}),!1)}checkRightRowModelType(e){let{gos:t,rowModel:o}=this.beans;return ee(t)||mi(t)?!0:(k(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.getSelectAllMode(),o="uiSelectAll";t==="currentPage"?o="uiSelectAllCurrentPage":t==="filtered"&&(o="uiSelectAllFiltered");let i={source:o,selectAll:t},r=this.beans.selectionSvc;e?r.selectAllRowNodes(i):r.deselectAllRowNodes(i)}isCheckboxSelection(){let{column:e,gos:t,beans:o}=this,a=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return eu(o,e)&&this.checkRightRowModelType(a)&&this.checkSelectionType(a)}getSelectAllMode(){let e=Lc(this.gos,!1);if(e)return e;let{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 eu({gos:e,selectionColSvc:t},o){let i=e.get("rowSelection"),r=o.getColDef(),{headerCheckboxSelection:a}=r,n=!1;if(typeof i=="object"){let l=At(o),c=xn(o);(tr(i)==="autoGroupColumn"&&c||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(n=Ni(i))}else typeof a=="function"?n=a(O(e,{column:o,colDef:r})):n=!!a;return n}var kE=class extends S{postConstruct(){let{gos:e,beans:t}=this;this.selectionCtx=new SE(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{let o=Ma(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=Ma(e),this.addManagedEventListeners({cellValueChanged:o=>this.updateRowSelectable(o.node),rowNodeDataChanged:o=>this.updateRowSelectable(o.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new yE}createSelectAllFeature(e){if(eu(this.beans,e))return new xE(e)}isMultiSelect(){return di(this.gos)}onRowCtrlSelected(e,t,o){let i=!!e.rowNode.isSelected();e.forEachGui(o,r=>{r.rowComp.toggleCss("ag-row-selected",i);let a=r.element;nc(a,i),a.contains(Y(this.beans))&&t(r)})}announceAriaRowSelection(e){var a,n;if(this.isRowSelectionBlocked(e))return;let t=e.isSelected(),o=(a=this.beans.editSvc)==null?void 0:a.isEditing({rowNode:e});if(!e.selectable||o)return;let r=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(r,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Mr(e)||!_t(this.gos)}updateRowSelectable(e,t){var i,r;let o=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:(r=(i=this.isRowSelectable)==null?void 0:i.call(this,e))!=null?r:!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(gi(this.gos)){let r=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:r!=null?r:!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){var i;let t=!1,o=!1;if(!((i=e.childrenAfterGroup)!=null&&i.length))return e.selectable?e.__selected:null;for(let r=0;r{let t=gi(e),o=or(e),i=ir(e)==="filteredDescendants";this.masterSelectsDetail=Es(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||o!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=o)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,o){if(this.isRowSelectionBlocked(t))return 0;let i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,o),this.selectRange(i.select,!0,o);{let r=i.checkFilteredNodes?ou(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:r,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:o})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:o,nodes:i,event:r,source:a,keepDescendants:n=!1}){var c;if(i.length===0)return 0;let{gos:s}=this;if(!_t(s)&&e)return k(132),0;if(i.length>1&&!this.isMultiSelect())return k(130),0;let l=0;for(let d=0;d0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),l}selectRange(e,t,o){let i=0;return e.forEach(r=>{let a=r.primaryRow;if(a.group&&this.groupSelectsDescendants)return;this.selectRowNode(a,t,void 0,o)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o)),i}selectChildren(e,t,o){let i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:o,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((o,i)=>{e(o)&&t.set(i,o)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;let{gos:o,rowModel:i}=this.beans;if(!ee(o,i))return!1;let r=i.rootNode;if(!r)return!1;let a=!1,n=s=>{if(s!==r){let l=this.calculateSelectedFromChildren(s);a=this.selectRowNode(s,l===null?!1:l,void 0,e)||a}};return io(r,this.beans.rowModel.hierarchical,t,n),a}clearOtherNodes(e,t,o){let i=new Map,r=0;return this.selectedNodes.forEach(a=>{let n=a.id==e.id;if((t?!FE(e,a):!0)&&!n){let l=this.selectedNodes.get(a.id);r+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:o}),this.groupSelectsDescendants&&a.parent&&i.set(a.parent.id,a.parent)}}),i.forEach(a=>{let n=this.calculateSelectedFromChildren(a);this.selectRowNode(a,n===null?!1:n,void 0,o)}),r}onRowSelected(e){let 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;let t=new Mt(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){let t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){let{gos:e,rowModel:t}=this.beans;if(!ee(e,t))return;let o=t.getTopLevelNodes();if(o===null)return;let i=[];function r(a){for(let n=0,s=a.length;n{let n=this.selectRowNode(a.primaryRow,!1,void 0,e);i||(i=n)};if(t==="currentPage"||t==="filtered"){if(!o){W(102);return}this.getNodesToSelect(t).forEach(r)}else this.selectedNodes.forEach(r),this.reset(e);if(this.selectionCtx.selectAll=!1,o&&this.groupSelectsDescendants){let a=this.updateGroupsFromChildrenSelections(e);i||(i=a)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,o=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&o++)}),{selectedCount:t,notSelectedCount:o}}getSelectAllState(e){var i;let{selectedCount:t,notSelectedCount:o}=this.getSelectedCounts(e);return(i=tu(t,o))!=null?i:null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];let t=[],o=r=>t.push(r);if(e==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){o(r);return}if(!r.footer&&!r.expanded){let a=n=>{o(n);let s=n.childrenAfterFilter;if(s)for(let l=0,c=s.length;l{let s=this.selectRowNode(n.primaryRow,!0,void 0,i);a||(a=s)}),o.selectAll=!0,ee(t)&&this.groupSelectsDescendants){let n=this.updateGroupsFromChildrenSelections(i);a||(a=n)}a&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,o){if(e||(e=[]),!Array.isArray(e)){W(103);return}let i=new Set(e),r=[];this.beans.rowModel.forEachNode(a=>{i.has(a.id)&&r.push(a)}),o&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:t})}canSelectAll(){return ee(this.beans.gos)}updateSelectable(e){var n;let{gos:t,rowModel:o}=this.beans;if(!_t(t))return;let i="selectableChanged",r=ee(t)&&this.groupSelectsDescendants,a=[];if(r){let s=o.rootNode;s&&io(s,o.hierarchical,e,l=>{let c=!1;for(let d of l.childrenAfterGroup)c||(c=d.selectable),!d.group&&!this.updateRowSelectable(d,!0)&&d.isSelected()&&a.push(d);this.setRowSelectable(l,c,!0)})}else o.forEachNode(s=>{!this.updateRowSelectable(s,!0)&&s.isSelected()&&a.push(s)});a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:i}),!e&&r&&((n=this.updateGroupsFromChildrenSelections)==null||n.call(this,i))}updateSelectableAfterGrouping(e){var t;this.updateSelectable(e),this.groupSelectsDescendants&&((t=this.updateGroupsFromChildrenSelections)!=null&&t.call(this,"rowGroupChanged",e))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){var a,n;if(!this.masterSelectsDetail)return;let o=(n=(a=e.detailNode)==null?void 0:a.detailGridInfo)==null?void 0:n.api;if(!o)return;let i=EE(o);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(o.getSelectedNodes().map(s=>s.id)))}setDetailSelectionState(e,t,o){if(this.masterSelectsDetail){if(!di(t)){k(269);return}switch(e.isSelected()){case!0:{o.selectAll();break}case!1:{o.deselectAll();break}case void 0:{let i=this.detailSelection.get(e.id);if(i){let r=[];for(let a of i){let n=o.getRowNode(a);n&&r.push(n)}o.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}default:break}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function EE(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),tu(t,o)}function tu(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function FE(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}function ou(e){var i,r;let t=e.isSelected()===!1,o=(r=(i=e.childrenAfterFilter)==null?void 0:i.some(ou))!=null?r:!1;return t||o}var DE={moduleName:"SharedRowSelection",version:D,beans:[cE],css:[dE],apiFunctions:{setNodesSelected:gE,selectAll:uE,deselectAll:hE,selectAllFiltered:pE,deselectAllFiltered:fE,selectAllOnCurrentPage:mE,deselectAllOnCurrentPage:vE,getSelectedNodes:CE,getSelectedRows:wE}},ME={moduleName:"RowSelection",version:D,rowModels:["clientSide","infinite","viewport"],beans:[RE],dependsOn:[DE]},PE=class extends S{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(){let{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,r=this.getCellClassParams(e,o);Kn(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,r,a=>t.toggleCss(a,!0),a=>t.toggleCss(a,!1)),this.cellClassRules=i}applyUserStyles(){let e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){let r=this.getCellClassParams(e,t);i=o(r)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){let{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);for(let a of this.staticClasses)t.toggleCss(a,!1);let r=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=r;for(let a of r)t.toggleCss(a,!0)}getCellClassParams(e,t){let{value:o,rowNode:i}=this.cellCtrl;return O(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},IE=class extends S{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Kn(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){let{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new PE(e,this.beans)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(r=>{o(r)})}},TE={moduleName:"CellStyle",version:D,beans:[IE]},AE={moduleName:"RowStyle",version:D,beans:[E1]},zE={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},Ce="clientSide",ce="serverSide",co="infinite",LE={onGroupExpandedOrCollapsed:[Ce],refreshClientSideRowModel:[Ce],isRowDataEmpty:[Ce],forEachLeafNode:[Ce],forEachNodeAfterFilter:[Ce],forEachNodeAfterFilterAndSort:[Ce],resetRowHeights:[Ce,ce],applyTransaction:[Ce],applyTransactionAsync:[Ce],flushAsyncTransactions:[Ce],getBestCostNodeSelection:[Ce],getServerSideSelectionState:[ce],setServerSideSelectionState:[ce],applyServerSideTransaction:[ce],applyServerSideTransactionAsync:[ce],applyServerSideRowData:[ce],retryServerSideLoads:[ce],flushServerSideAsyncTransactions:[ce],refreshServerSide:[ce],getServerSideGroupLevelState:[ce],refreshInfiniteCache:[co],purgeInfiniteCache:[co],getInfiniteRowCount:[co],isLastRowIndexKnown:[co,ce],expandAll:[Ce,ce],collapseAll:[Ce,ce],onRowHeightChanged:[Ce,ce],setRowCount:[co,ce],getCacheBlockState:[co,ce]},OE={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 HE(e,t,o){let i=OE[e];if(i){let{version:a,new:n,old:s,message:l}=i,c=s!=null?s:e;return(...d)=>{let g=n?`Please use ${n} instead. `:"";return Qo(`Since ${a} api.${c} is deprecated. ${g}${l!=null?l:""}`),t.apply(t,d)}}let r=LE[e];return r?(...a)=>{let n=o.rowModel.getType();if(!r.includes(n)){vo(`api.${e} can only be called when gridOptions.rowModelType is ${r.join(" or ")}`);return}return t.apply(t,a)}:t}var BE={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"},VE={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},NE={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"},GE=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),WE=class extends S{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,mh(By)}warnOnInitialPropertyUpdate(e,t){e==="api"&&zE[t]&&k(22,{key:t})}processGridOptions(e){this.processOptions(e,Fb())}validateApiFunction(e,t){return HE(e,t,this.beans)}missingUserComponent(e,t,o,i){let r=Ro[t];r?this.gos.assertModuleRegistered(r,`AG Grid '${e}' component: ${t}`):k(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){let t=BE[e];return t?Je(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){_E.has(e)&&k(10,{eventType:e})}validateIcon(e){if(GE.has(e)&&k(43,{iconName:e}),VE[e])return;let t=NE[e];if(t){W(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:wn(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}k(134,{iconName:e})}isProvidedUserComp(e){return!!Ro[e]}validateColDef(e){this.processOptions(e,mb())}processOptions(e,t){let{validations:o,deprecations:i,allProperties:r,propertyExceptions:a,objectName:n,docsUrl:s}=t;r&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...a!=null?a:[],...Object.keys(i)],r,n,s);let l=new Set;if(Object.keys(e).forEach(d=>{var C;let g=i[d];if(g){let{message:w,version:y}=g;l.add(`As of v${y}, ${String(d)} is deprecated. ${w!=null?w:""}`)}let u=e[d];if(u==null||u===!1)return;let h=o[d];if(!h)return;let{dependencies:p,validate:f,supportedRowModels:m,expectedType:v}=h;if(v){let w=typeof u;if(w!==v){l.add(`${String(d)} should be of type '${v}' but received '${w}' (${u}).`);return}}if(m){let w=(C=this.gridOptions.rowModelType)!=null?C:"clientSide";if(!m.includes(w)){l.add(`${String(d)} is not supported with the '${w}' row model. It is only valid with: ${m.join(", ")}.`);return}}if(p){let w=this.checkForRequiredDependencies(d,p,e);if(w){l.add(w);return}}if(f){let w=f(e,this.gridOptions,this.beans);if(w){l.add(w);return}}}),l.size>0)for(let d of l)Qo(d)}checkForRequiredDependencies(e,t,o){let r=Object.entries(t).filter(([a,n])=>{let s=o[a];return!n.required.includes(s)});return r.length===0?null:r.map(([a,n])=>{var s;return`'${String(e)}' requires '${a}' to be one of [${n.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${(s=n.reason)!=null?s:""}`}).join(` - `)}checkProperties(e,t,o,i,r){let a=["__ob__","__v_skip","__metadata__"],n=qE(Object.getOwnPropertyNames(e),[...a,...t,...o],o),s=Object.keys(n);for(let l of s){let c=n[l],d=`invalid ${i} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;o.includes("context")&&(d+=` -If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Qo(d)}if(s.length>0&&r){let l=this.beans.frameworkOverrides.getDocLink(r);Qo(`to see all the valid ${i} properties please check: ${l}`)}}};function qE(e,t,o){let i={},r=e.filter(a=>!t.some(n=>n===a));if(r.length>0)for(let a of r)i[a]=$a({inputValue:a,allSuggestions:o}).values;return i}var _E=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),UE={moduleName:"Validation",version:D,beans:[WE]},iu={moduleName:"AllCommunity",version:D,dependsOn:[N3,lS,Kk,UE,L2,O2,H2,B2,V2,N2,G2,z2,Ik,Tk,Ak,zk,Pk,Ok,Hk,sR,jy,DR,_d,a3,n3,XR,K3,Ov,LR,ME,ky,TE,J3,AE,Xk,Fy,UR,Fg,tR,tE,Lv,G3,lE]};xc.registerModules([iu]);var jE="[data-portfolio-list-panel]",au=5;function nu(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function ru(e){let t=nu(e);return t?new Intl.DateTimeFormat("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit"}).format(t):""}function KE(e){let t=nu(e);if(!t)return"";let o=Date.now()-t.getTime();if(o<0)return ru(e);let i=Math.floor(o/6e4);if(i<1)return"\uBC29\uAE08 \uC804";if(i<60)return`${i}\uBD84 \uC804`;let r=Math.floor(i/60);return r<24?`${r}\uC2DC\uAC04 \uC804`:ru(e)}function $E(e){return`/portfolio/${encodeURIComponent(e)}`}function YE(e){let t=document.createElement("a");return t.className="portfolio-post-title-link",t.href=$E(e.data.portfolioIdntfNo),t.textContent=e.value||"",t.title=e.value||"",t}function ms(e,t={}){let o=document.createElement("button");return o.type="button",o.className="portfolio-post-page-button",o.textContent=e,t.active&&(o.classList.add("is-active"),o.setAttribute("aria-current","page")),t.disabled&&(o.disabled=!0),typeof t.onClick=="function"&&o.addEventListener("click",t.onClick),o}function xi(e,t){if(!e||!t)return;let o=e.paginationGetTotalPages(),i=e.paginationGetCurrentPage();if(t.replaceChildren(),o<=0)return;let r=10,n=Math.floor(i/r)*r,s=Math.min(n+r,o);n>0&&t.appendChild(ms("\uC774\uC804",{onClick:()=>e.paginationGoToPage(n-1)}));for(let l=n;le.paginationGoToPage(l)}));s",{onClick:()=>e.paginationGoToPage(s)}))}function QE(e,t,o){return{rowData:e,columnDefs:[{field:"title",headerName:"\uAE00 \uC81C\uBAA9",flex:1,minWidth:260,cellRenderer:YE},{field:"viewCount",headerName:"\uC870\uD68C\uC218",width:96,type:"numericColumn",headerClass:"portfolio-post-number-header",cellClass:"portfolio-post-number-cell"},{field:"registeredAt",headerName:"\uC791\uC131\uC77C",width:132,valueFormatter:i=>KE(i.value),headerClass:"portfolio-post-date-header",cellClass:"portfolio-post-date-cell"}],defaultColDef:{sortable:!0,resizable:!1,suppressMovable:!0},domLayout:"autoHeight",headerHeight:34,rowHeight:40,pagination:!0,paginationPageSize:au,suppressPaginationPanel:!0,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,suppressHorizontalScroll:!0,getRowId:i=>i.data.portfolioIdntfNo,getRowClass:i=>i.data.portfolioIdntfNo===t?"ag-row-current-post":"",onGridReady:i=>xi(i.api,o),onPaginationChanged:i=>xi(i.api,o),localeText:{page:"\uD398\uC774\uC9C0",more:"\uB354 \uBCF4\uAE30",to:"-",of:"/",next:"\uB2E4\uC74C",last:"\uB9C8\uC9C0\uB9C9",first:"\uCC98\uC74C",previous:"\uC774\uC804",loadingOoo:"\uBD88\uB7EC\uC624\uB294 \uC911...",noRowsToShow:"\uB4F1\uB85D\uB41C \uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pageSizeSelectorLabel:"\uC904 \uBCF4\uAE30"}}}async function ZE(e){let t=await fetch(e,{headers:{Accept:"application/json"},credentials:"same-origin"});if(!t.ok)throw new Error("\uD3EC\uD2B8\uD3F4\uB9AC\uC624 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.");let o=await t.json();return Array.isArray(o)?o:[]}function su(e=jE){let t=document.querySelector(e);if(!t)return null;let o=t.querySelector("[data-portfolio-list-toggle]"),i=t.querySelector("[data-portfolio-list-body]"),r=t.querySelector("[data-portfolio-list-grid]"),a=t.querySelector("[data-portfolio-pagination]"),n=t.querySelector("[data-portfolio-page-size]"),s=t.querySelector(".portfolio-post-list-summary span"),l=t.dataset.listUrl,c=t.dataset.currentId||"",d=t.dataset.initialOpen==="true";if(!o||!i||!r||!a||!l)return null;let g=!1,u=null,h=null,p=()=>(u||(u=ZE(l)),u),f=async()=>{let v=await p();if(s&&(s.textContent=`${v.length}\uAC1C\uC758 \uAE00`),!h){h=mg(r,QE(v,c,a)),xi(h,a);return}h.setGridOption("rowData",v),xi(h,a)},m=async v=>{if(g=v,o.textContent=g?"\uBAA9\uB85D\uB2EB\uAE30":"\uBAA9\uB85D\uC5F4\uAE30",o.setAttribute("aria-expanded",String(g)),i.hidden=!g,!!g){o.disabled=!0;try{await f()}catch(C){window.alert(C.message||"\uD3EC\uD2B8\uD3F4\uB9AC\uC624 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."),m(!1)}finally{o.disabled=!1}}};return o.addEventListener("click",()=>{m(!g)}),n==null||n.addEventListener("change",()=>{h&&(h.setGridOption("paginationPageSize",Number.parseInt(n.value,10)||au),h.paginationGoToPage(0),xi(h,a))}),m(d),{open:()=>m(!0),close:()=>m(!1),reload:async()=>{u=null,await f()}}}document.addEventListener("DOMContentLoaded",()=>{su()});return hu(JE);})(); +To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e==null?void 0:e.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Fl("IntegratedChartsModule"),258:()=>Fl("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:i,rowModelType:r})=>El({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Eo[t],gridId:i,gridScoped:o,rowModelType:r}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${bo}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>fg(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:mg,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function Wy(e,t){let o=Gy[e];if(!o)return[`Missing error text for error id ${e}!`];let i=o(t),a=` +See ${Fc(e,t)}`;return Array.isArray(i)?i.concat(a):[i,a]}var qy={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},_y=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${wc}/${this.frameworkName}-data-grid`,yh(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},Dl=new WeakMap,Ml=new WeakMap;function vg(e,t,o){if(!t)return W(11),{};let i=o,r;if(!(i!=null&&i.setThemeOnGridDiv)){let n=oe({tag:"div"});n.style.height="100%",e.appendChild(n),e=n,r=()=>e.remove()}return new jy().create(e,t,n=>{let s=new tv(e);n.createBean(s)},void 0,o,r)}var Uy=1,jy=class{create(e,t,o,i,r,a){var f;let n=wn.applyGlobalGridOptions(t),s=(f=n.gridId)!=null?f:String(Uy++),l=this.getRegisteredModules(r,s,n.rowModelType),c=this.createBeansList(n.rowModelType,l,s),d=this.createProvidedBeans(e,n,r);if(!c)return;let u={providedBeanInstances:d,beanClasses:c,id:s,beanInitComparator:Ef,beanDestroyComparator:Ff,derivedBeans:[kf],destroyCallback:()=>{Ml.delete(p),Dl.delete(e),mh(s),a==null||a()}},h=new xf(u);this.registerModuleFeatures(h,l),o(h),h.getBean("syncSvc").start(),i==null||i(h);let p=h.getBean("gridApi");return Dl.set(e,p),Ml.set(p,e),p}getRegisteredModules(e,t,o){var i;return di(Ay,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(r=>di(r,t)),vh(t,Pl(o))}registerModuleFeatures(e,t){let o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(let r of t){o.registerModule(r);let a=r.apiFunctions;if(a){let n=Object.keys(a);for(let s of n)i==null||i.addFunction(s,a[s])}}}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;Q(i)&&(i=new _y);let r={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i,withinStudio:o==null?void 0:o.withinStudio};return o!=null&&o.providedBeanInstances&&Object.assign(r,o.providedBeanInstances),r}createBeansList(e,t,o){var s;let i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},r=Pl(e),a=i[r];if(!a){Uo(201,{rowModelType:r},`Unknown rowModelType ${r}.`);return}if(!wh()){Uo(272,void 0,fg());return}if(!e){let l=Object.entries(i).filter(([c,d])=>Fa(d,o,c));if(l.length==1){let[c,d]=l[0];if(c!==r){let g={moduleName:d,rowModelType:c};Uo(275,g,mg(g));return}}}if(!Fa(a,o,r)){let l=yn(),c=`rowModelType = '${r}'`,d=l?`Unable to use ${c} as that requires the ag-grid-enterprise script to be included. +`:`Missing module ${a}Module for rowModelType ${r}.`;Uo(200,{reasonOrId:c,moduleName:a,gridScoped:bn(),gridId:o,rowModelType:r,isUmd:l},d);return}let n=new Set;for(let l of t)for(let c of(s=l.beans)!=null?s:[])n.add(c);return Array.from(n)}};function Pl(e){return e!=null?e:"clientSide"}function Ky(e,t=!1){let o=[],i=[],r=[],a=[],n=[],s=[],l=[],c=[],d=[],g=0;for(let u=0;ut!=null)}function $y(e){let t=[];for(let{groupId:o,open:i}of e)i&&t.push(o);return t.length?{openColumnGroupIds:t}:void 0}var Yy=class extends S{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){var i;let e=(i=this.gos.get("alignedGrids"))!=null?i:[],t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(r=>{var n;if(!r){W(18),t||W(20);return}if(this.isGridApi(r))return r;let a=r;return"current"in a?(n=a.current)==null?void 0:n.api:(a.api||W(19),a.api)}).filter(r=>!!r&&!r.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){let e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(let t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){let o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":R(21);break}})}processGroupOpenedEvent(e){let{colGroupSvc:t}=this.beans;if(t)for(let o of e.columnGroups){let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){var d;let t=e.column,o=null,i=this.beans,{colResize:r,ctrlsSvc:a,colModel:n}=i;if(t&&(o=n.getColDefCol(t.getColId())),t&&!o)return;let s=this.getMasterColumns(e);switch(e.type){case"columnMoved":{let u=e.api.getColumnState().map(h=>({colId:h.colId}));Ve(i,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{let u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Ve(i,{state:u},"alignedGridChanged")}break;case"columnPinned":{let u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Ve(i,{state:u},"alignedGridChanged")}break;case"columnResized":{let g=e,u={};for(let h of s)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(let h of(d=g.flexColumns)!=null?d:[])u[h.getId()]&&delete u[h.getId()];r==null||r.setColumnWidths(Object.values(u),!1,g.finished,"alignedGridChanged");break}}let c=a.getGridBodyCtrl().isVerticalScrollShowing();for(let g of this.getAlignedGridApis())g.setGridOption("alwaysShowVerticalScroll",c)}},Qy={moduleName:"AlignedGrids",version:P,beans:[Yy],dependsOn:[Ud]};function Zy(e,t={}){let o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Cg(e,t,o,i,r){t&&(i&&t.parent&&t.parent.level!==-1&&Cg(e,t.parent,o,i,r),t.setExpanded(o,void 0,r))}function Jy(e,t){return e.rowModel.getRowNode(t)}function Xy(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function e3(e){return e.rowRenderer.getRenderedNodes()}function t3(e,t,o){e.rowModel.forEachNode(t,o)}function o3(e){return e.rowRenderer.firstRenderedRow}function i3(e){return e.rowRenderer.lastRenderedRow}function r3(e,t){return e.rowModel.getRow(t)}function a3(e){return e.rowModel.getRowCount()}function n3(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function s3(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function wg(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function bg(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function l3(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}var c3={moduleName:"RowApi",version:P,apiFunctions:{redrawRows:Zy,setRowNodeExpanded:Cg,getRowNode:Jy,addRenderedRowListener:Xy,getRenderedNodes:e3,forEachNode:t3,getFirstDisplayedRowIndex:o3,getLastDisplayedRowIndex:i3,getDisplayedRowAtIndex:r3,getDisplayedRowCount:a3}},d3={moduleName:"ScrollApi",version:P,apiFunctions:{getVerticalPixelRange:n3,getHorizontalPixelRange:s3,ensureColumnVisible:wg,ensureIndexVisible:bg,ensureNodeVisible:l3}};function g3(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function u3(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function yg(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function Sg(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){R(3);return}(o=e.rowModel)==null||o.resetRowHeights()}function h3(e){var t;(t=e.expansionSvc)==null||t.resetExpansion()}function p3(e,t,o){var r,a;let i=sf(e);if(i){if(((r=e.rowGroupColsSvc)==null?void 0:r.columns.length)===0){if(t<0){W(238);return}i.setRowCount(t,o);return}W(28);return}(a=Dr(e))==null||a.setRowCount(t,o)}function f3(e){var t,o;return vi(e.gos)?e.rowModel.getBlockStates():(o=(t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())!=null?o:{}}function m3(e){return e.rowModel.isLastRowIndexKnown()}var v3={moduleName:"CsrmSsrmSharedApi",version:P,apiFunctions:{expandAll:g3,collapseAll:u3,resetRowGroupExpansion:h3}},C3={moduleName:"RowModelSharedApi",version:P,apiFunctions:{onRowHeightChanged:yg,resetRowHeights:Sg}},w3={moduleName:"SsrmInfiniteSharedApi",version:P,apiFunctions:{setRowCount:p3,getCacheBlockState:f3,isLastRowIndexKnown:m3}},xg=(e,t)=>{for(let o=0,i=e.length;o{if(o!=null){let a=o.getSortedRows();for(let n=0,s=a.length;n{let d=l.level+1;for(let g=0,u=c.length;g{if(!g&&g!==void 0){let x=w.sourceRowIndex;g=x<=u,u=x}w.data!==b&&(w.updateData(b),n.has(w)||s.add(w),!w.selectable&&w.isSelected()&&c.push(w))},f=(w,b,x)=>{for(let E=0,D=b.length;E0;if(m){let w=(C=o._leafs)!=null?C:o._leafs=[];g===void 0?R3(w,l,a):k3(w,l)&&(a.reordered=!0)}(m||h||s.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},o,i){let r=this.rootNode._leafs;for(let a=0,n=r.length;a0}updateRowData(e,t,o){var l;if(this.dispatchRowDataUpdateStarted(e.add),(l=this.beans.groupStage)!=null&&l.getNestedDataGetter())return R(268),{remove:[],update:[],add:[]};let i=[],r=Mo(this.gos),a=this.executeRemove(r,e,t,i,o),n=this.executeUpdate(r,e,t,i),s=this.executeAdd(e,t);return this.deselect(i),{remove:a,update:n,add:s}}executeRemove(e,{remove:t},{adds:o,updates:i,removals:r},a,n){let s=this.rootNode._leafs,l=s==null?void 0:s.length,c=t==null?void 0:t.length;if(!c||!l)return[];let d=0,g=l,u=0,h=new Array(c);for(let p=0;pu&&(u=m),h[d++]=f,this.destroyNode(f,n)&&(f.isSelected()&&a.push(f),o.delete(f)||(i.delete(f),r.push(f)))}return h.length=d,d&&x3(s,g,u),h}executeUpdate(e,{update:t},{adds:o,updates:i},r){let a=t==null?void 0:t.length;if(!a)return[];let n=new Array(a),s=0;for(let l=0;l=l;--u){let p=i[u];p.sourceRowIndex=h,i[h--]=p}t.reordered=!0}i.length=s;let c=new Array(n),d=t.adds;for(let u=0;u=o||Number.isNaN(t))return o;t=Math.ceil(t);let i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=y3(e,t)),t}},y3=(e,t)=>{for(let o=0,i=e.length;o{var n;e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",((n=e._leafs)==null?void 0:n.length)!==0&&(e._leafs=[]);let t=[],o=[],i=[],r=[];e.childrenAfterGroup=t,e.childrenAfterSort=o,e.childrenAfterAggFilter=i,e.childrenAfterFilter=r;let a=e.sibling;return a&&(a.childrenAfterGroup=t,a.childrenAfterSort=o,a.childrenAfterAggFilter=i,a.childrenAfterFilter=r,a.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},S3=(e,t)=>{if(e)for(let o=0,i=e.length;o{t=Math.max(0,t);for(let i=t,r=e.length;i{let o=t.size;e.length=o;let i=0,r=!1,a=!1;for(let n of t){let s=n.sourceRowIndex;s===i?a||(a=r):(s>=0?a=!0:r=!0,n.sourceRowIndex=i,e[i]=n),++i}return a},R3=(e,t,{adds:o})=>{let i=e.length,r=t.size;r>i&&(e.length=r);let a=0;for(let n=0;n{i.hasChildren()&&e&&!r?i.childrenAfterFilter=i.childrenAfterGroup.filter(a=>{let n=a.childrenAfterFilter&&a.childrenAfterFilter.length>0,s=a.data&&this.filterManager.doesRowPassFilter({rowNode:a});return n||s}):i.childrenAfterFilter=i.childrenAfterGroup,Qa(i)};if(this.doingTreeDataFiltering()){let i=(r,a)=>{if(r.childrenAfterGroup)for(let n=0;no(r,!1);ro(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,i)}}softFilter(e,t){let o=r=>{if(r.childrenAfterFilter=r.childrenAfterGroup,r.hasChildren())for(let a of r.childrenAfterGroup)a.softFiltered=e&&!(a.data&&this.filterManager.doesRowPassFilter({rowNode:a}));Qa(r)},i=this.beans.rowModel;ro(i.rootNode,i.hierarchical,t,o)}doingTreeDataFiltering(){var t;let{gos:e}=this;return!!((t=this.beans.groupStage)!=null&&t.treeData)&&!e.get("excludeChildrenWhenTreeDataFiltering")}},F3=4,D3=(e,t,o,i,r)=>{let a=t.childrenAfterSort,n=t.childrenAfterAggFilter;if(!n)return a&&a.length>0?a:[];let s=n.length;if(s<=1)return(a==null?void 0:a.length)===s&&(s===0||a[0]===n[0])?a:n.slice();if(!a||s<=F3)return e.doFullSortInPlace(n.slice(),r);let l=new Map,{updates:c,adds:d}=o,g=[];for(let h=0;he.compareRowNodes(r,h,p)||~l.get(h)-~l.get(p)),u===s?g:M3(e,r,g,a,l,s))},M3=(e,t,o,i,r,a)=>{var f;let n=new Array(a),s=0,l=o[s],c,d=-1,g=0,u=0,h=o.length,p=i.length;for(;;){if(d<0){if(g>=p)break;if(c=i[g++],d=(f=r.get(c))!=null?f:-1,d<0)continue}if((e.compareRowNodes(t,l,c)||~r.get(l)-d)<0){if(n[u++]=l,++s>=h)break;l=o[s]}else n[u++]=c,d=-1}for(;s=0&&(n[u++]=m)}return n},P3=(e,t,o)=>{let i=0;o.length=t.size;for(let r=0,a=e.length;r{let t=e.childrenAfterSort,o=e.sibling;if(o&&(o.childrenAfterSort=t),!!t)for(let i=0,r=t.length-1;i<=r;i++){let a=t[i],n=i===0,s=i===r;a.firstChild!==n&&(a.firstChild=n,a.dispatchRowEvent("firstChildChanged")),a.lastChild!==s&&(a.lastChild=s,a.dispatchRowEvent("lastChildChanged")),a.childIndex!==i&&(a.childIndex=i,a.dispatchRowEvent("childIndexChanged"))}},I3=class extends S{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){let o=this.beans.sortSvc.getSortOptions(),i=o.length>0&&!!t&&this.gos.get("deltaSort"),{gos:r,colModel:a,rowGroupColsSvc:n,rowNodeSorter:s,rowRenderer:l,showRowGroupCols:c}=this.beans,d=r.get("groupMaintainOrder"),g=a.getCols().some(C=>C.isRowGroupActive()),u=n==null?void 0:n.columns,h=a.isPivotMode(),p=r.getCallback("postSortRows"),f=!1,m,v=C=>{var E,D,T;let w=h&&C.leafGroup,b=d&&g&&!C.leafGroup;b&&(m!=null||(m=this.shouldSortContainsGroupCols(o)),b&&(b=!m));let x=null;if(b){let k=!1;if(u){let F=C.level+1;F{let t=e.childrenAfterSort,o=e.childrenAfterAggFilter,i=t==null?void 0:t.length,r=o==null?void 0:o.length;if(!i||!r)return null;let a=new Array(r),n=new Set;for(let l=0;l{var i;(i=this.beans.groupStage)==null||i.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){let{beans:e,stagesRefreshProps:t}=this,o=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=o;for(let i=o.length-1;i>=0;--i){let r=o[i];for(let a of r.refreshProps)t.set(a,i)}this.addManagedPropertyListeners([...t.keys(),"rowData"],i=>{var a;let r=(a=i.changeSet)==null?void 0:a.properties;r&&this.onPropChange(r)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,o,i){let r,a=!1;do{r=!1;let n=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),l=Math.max(n,o),c=Math.min(s,i);for(let d=l;d<=c;d++){let g=this.getRow(d);if(g.rowHeightEstimated){let u=Dt(this.beans,g);g.setRowHeight(u.height),r=!0,a=!0}}r&&this.setRowTopAndRowIndex()}while(r);return a}onPropChange(e){let{nodeManager:t,gos:o,beans:i}=this,r=i.groupStage;if(!t)return;let a=new Set(e),n=r==null?void 0:r.onPropChange(a),s;a.has("rowData")?s=o.get("rowData"):n&&(s=r==null?void 0:r.extractData()),s&&!Array.isArray(s)&&(s=null,R(1));let l={step:"nothing",changedProps:a};if(s){let d=!n&&!this.isEmpty()&&s.length>0&&o.exists("getRowId")&&!o.get("resetRowDataOnUpdate");this.refreshingData=!0,d?(l.keepRenderedRows=!0,l.animate=!o.get("suppressAnimationFrame"),l.changedRowNodes=new Ui,t.setImmutableRowData(l,s)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(s),this.rowNodesCountReady=!0)}let c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){var a;let{stages:t,stagesRefreshProps:o}=this;if(!t)return null;let i=t.length,r=i;for(let n=0,s=e.length;n{(a==null?void 0:a.id)!=null&&!t.has(a.id)&&a.clearRowTopAndRowIndex()},i=a=>{o(a),o(a.detailNode),o(a.sibling);let n=a.childrenAfterGroup;if(!(!a.hasChildren()||!n)&&!(e&&a.level!==-1&&!a.expanded))for(let s=0,l=n.length;s{let c=a[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},s=t.footerSvc;return s?s==null?void 0:s.getTopDisplayIndex(i,e,a,n):n(e)}getTopLevelIndexFromDisplayedIndex(e){var s,l;let{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;let r=this.getRow(e);r.footer&&(r=r.sibling);let a=r.parent;for(;a&&a!==t;)r=a,a=r.parent;let n=(l=(s=t.childrenAfterSort)==null?void 0:s.indexOf(r))!=null?l:-1;return n>=0?n:e}getRowBounds(e){let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:yo(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){let i=t.length===0||t.some(r=>r.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:yo(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:yo(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;let{changedRowNodes:t,newData:o,rowDataUpdated:i}=e;return!(!t||o||!i||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){let{nodeManager:t,eventSvc:o,started:i}=this;if(!t)return;let r=!!e.rowDataUpdated;if(i&&r&&o.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let a=!1;this.refreshingModel=!0;try{this.executeRefresh(e,r),a=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,a||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){var n,s,l;let{beans:o,rootNode:i}=this;(n=o.masterDetailSvc)==null||n.refreshModel(e),t&&e.step!=="group"&&((s=o.colFilter)==null||s.refreshModel());let r=e.changedPath;switch(r==null||r.addRow(i),e.step==="group"&&(this.doGrouping(i,e),r!=null||(r=e.changedPath)),r!=null||(r=(l=o.changedPathFactory)==null?void 0:l.ensureRowsPath(e,i)),e.step){case"group":case"filter":this.doFilter(r);case"pivot":this.doPivot(r)&&(r=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(r);case"filter_aggregates":this.doFilterAggregates(r);case"sort":this.doSort(r,e.changedRowNodes);case"map":this.doRowsToDisplay()}let a=new Set;this.setRowTopAndRowIndex(a),this.clearRowTopAndRowIndex(r,a),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){var e,t,o;return!((t=(e=this.rootNode)==null?void 0:e._leafs)!=null&&t.length)||!((o=this.beans.colModel)!=null&&o.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){var o,i,r,a,n;let{beans:e,gos:t}=this;if((i=(o=this.rootNode)==null?void 0:o._leafs)!=null&&i.length){if((r=e.filterManager)!=null&&r.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||((n=(a=t.get("rowData"))==null?void 0:a.length)!=null?n:0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let o=!1,i=!1,r=[],a=ui(this.gos);return this.forEachNodeAfterFilterAndSort(n=>{if(i)return;if(o&&(n===t||n===e)&&(i=!0,a&&n.group)){Rg(r,n);return}if(!o){if(n!==t&&n!==e)return;o=!0,t===e&&(i=!0)}(!n.group||!a)&&r.push(n)}),r}getTopLevelNodes(){var e,t;return(t=(e=this.rootNode)==null?void 0:e.childrenAfterGroup)!=null?t:null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){let t=this.rowsToDisplay,o=t.length;if(this.isEmpty()||o===0)return-1;let i=0,r=o-1;if(e<=0)return 0;if(t[r].rowTop<=e)return r;let n=-1,s=-1;for(;;){let l=Math.floor((i+r)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTope&&(r=l-1),n===i&&s===r))return l;n=i,s=r}}isRowInPixel(e,t){let o=e.rowTop,i=o+e.rowHeight;return o<=t&&i>t}forEachLeafNode(e){var o;let t=(o=this.rootNode)==null?void 0:o._leafs;if(t)for(let i=0,r=t.length;io.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterSort)}forEachPivotNode(e,t,o){let{colModel:i,rowGroupColsSvc:r}=this.beans;if(!i.isPivotMode())return;if(!(r!=null&&r.columns.length)){e(this.rootNode,0);return}let a=o?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,n=>n.leafGroup?null:n[a])}depthFirstSearchRowNodes(e,t=!1,o=a=>a.childrenAfterGroup,i=this.rootNode,r=0){var s,l;let a=r;if(!i)return a;let n=i===this.rootNode;if(n||e(i,a++),i.hasChildren()&&!i.footer){let c=n||this.hierarchical?o(i):null;if(c){let d=this.beans.footerSvc;a=(s=d==null?void 0:d.addTotalRows(a,i,e,t,n,"top"))!=null?s:a;for(let g of c)a=this.depthFirstSearchRowNodes(e,t,o,g,a);return(l=d==null?void 0:d.addTotalRows(a,i,e,t,n,"bottom"))!=null?l:a}}return a}doAggregate(e){var o;this.rootNode&&((o=this.beans.aggStage)==null||o.execute(e))}doFilterAggregates(e){let t=this.rootNode,o=this.beans.filterAggStage;if(o&&this.hierarchical){o.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;let i=t.sibling;i&&(i.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){let o=this.beans.sortStage;if(o){o.execute(e,t);return}ro(this.rootNode,this.hierarchical,e,i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),kg(i)})}doGrouping(e,t){var r;let o=this.beans.groupStage,i=o==null?void 0:o.execute(t);if(i===void 0){let a=e._leafs;e.childrenAfterGroup=a,e.updateHasChildren();let n=e.sibling;n&&(n.childrenAfterGroup=a)}(i||t.rowDataUpdated)&&((r=this.beans.colFilter)==null||r.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){let t=this.beans.filterStage;if(t){t.execute(e);return}ro(this.rootNode,this.hierarchical,e,o=>{o.childrenAfterFilter=o.childrenAfterGroup,Qa(o)})}doPivot(e){var t,o;return(o=(t=this.beans.pivotStage)==null?void 0:t.execute(e))!=null?o:!1}getRowNode(e){var o,i;let t=(o=this.nodeManager)==null?void 0:o.getRowNode(e);return typeof t=="object"?t:(i=this.beans.groupStage)==null?void 0:i.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];let o=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),o)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){let e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var l;let{nodeManager:e,beans:t,eventSvc:o,asyncTransactions:i}=this;if(!e)return;(l=t.valueCache)==null||l.onDataChanged();let r=[],a=[],n=new Ui,s=!this.gos.get("suppressAnimationFrame");for(let{rowDataTransaction:c,callback:d}of i!=null?i:[]){this.rowNodesCountReady=!0,this.refreshingData=!0;let g=e.updateRowData(c,n,s);r.push(g),d&&a.push(d.bind(null,g))}this.commitTransactions(n,s),a.length>0&&setTimeout(()=>{for(let c=0,d=a.length;c0&&o.dispatchEvent({type:"asyncTransactionsFlushed",results:r}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){var a;let t=this.nodeManager;if(!t)return null;(a=this.beans.valueCache)==null||a.onDataChanged(),this.rowNodesCountReady=!0;let o=new Ui,i=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;let r=t.updateRowData(e,o,i);return this.commitTransactions(o,i),r}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){var r,a,n;let{rootNode:e,beans:t}=this;if((r=t.formula)!=null&&r.active){let s=(a=e==null?void 0:e.childrenAfterSort)!=null?a:[];this.formulaRows=s,this.rowsToDisplay=s.filter(l=>!l.softFiltered);for(let l of this.rowsToDisplay)l.setUiLevel(0);return}let o=t.flattenStage;if(o){this.rowsToDisplay=o.execute();return}let i=(n=this.rootNode.childrenAfterSort)!=null?n:[];for(let s of i)s.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){let e=this.rootNode;if(!e)return;let t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);let o=e.sibling;o==null||o.setRowHeight(o.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let o=t.detailNode;o==null||o.setRowHeight(o.rowHeight,!0);let i=t.sibling;i==null||i.setRowHeight(i.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){var t;e.rowHeightChanged&&!((t=this.beans.rowAutoHeight)!=null&&t.active)&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},Rg=(e,t)=>{let o=t.childrenAfterGroup;if(o)for(let i=0,r=o.length;i{var o;return(o=it(e))==null?void 0:o.updateRowData(t)})}function G3(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=it(e))==null?void 0:i.batchUpdateRowData(t,o)})}function W3(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=it(e))==null?void 0:t.flushAsyncTransactions()})}function q3(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var _3={moduleName:"ClientSideRowModel",version:P,rowModels:["clientSide"],beans:[A3,I3],dependsOn:[hg]},U3={moduleName:"ClientSideRowModelApi",version:P,apiFunctions:{onGroupExpandedOrCollapsed:z3,refreshClientSideRowModel:L3,isRowDataEmpty:O3,forEachLeafNode:H3,forEachNodeAfterFilter:B3,forEachNodeAfterFilterAndSort:N3,applyTransaction:V3,applyTransactionAsync:G3,flushAsyncTransactions:W3,getBestCostNodeSelection:q3,resetRowHeights:Sg,onRowHeightChanged:yg},dependsOn:[v3,C3]},j3=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function K3(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Eg({colAutosize:e,visibleCols:t},o,i){var r;Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({...o,colKeys:(r=o.colIds)!=null?r:t.allCols,source:"api"})}function $3(e,t){var o;t&&typeof t=="object"?Eg(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var Y3=class extends S{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var o;let{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1,r=t.type;if(r==="fitGridWidth"||r==="fitProvidedWidth")i=!0;else if(r==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});let a=e.get("rowData");i=a!=null&&a.length>0&&ee(e)}i&&((o=this.beans.colDelayRenderSvc)==null||o.hideColumns(r))}}autoSizeCols(e){let{eventSvc:t,visibleCols:o,colModel:i}=this.beans;qo(this.beans,!0),this.innerAutoSizeCols(e).then(r=>{var d;let a=g=>To(t,Array.from(g),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return qo(this.beans,!1),a(r);let n=Tl(this.beans),s=g=>o.leftCols.some(u=>Jo(u,g)),l=g=>o.rightCols.some(u=>Jo(u,g)),c=e.colKeys.filter(g=>{var h;return!((h=i.getCol(g))!=null&&h.getColDef().suppressAutoSize)&&!pe(g)&&!s(g)&&!l(g)});this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(d=e.columnLimits)==null?void 0:d.map(g=>({...g,key:g.colId})),colKeys:c,onlyScaleUp:!0,animate:!1}),qo(this.beans,!1),a(r)})}innerAutoSizeCols(e){return new Promise((t,o)=>{var x,E,D;if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,o));let{colKeys:i,skipHeader:r,skipHeaderGroups:a,stopAtGroup:n,defaultMaxWidth:s,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:g,renderStatus:u,colModel:h,autoWidthCalc:p,visibleCols:f}=this.beans;if(g==null||g.flushAllFrames(),this.timesDelayed<5&&u&&(!u.areHeaderCellsRendered()||!u.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,o)});return}this.timesDelayed=0;let m=new Set,v=-1,C=Object.fromEntries(c.map(({colId:T,...k})=>[T,k])),w=r!=null?r:this.gos.get("skipHeaderOnAutoSize"),b=a!=null?a:w;for(;v!==0;){v=0;let T=[];for(let k of i){if(!k||ap(k))continue;let F=h.getCol(k);if(!F||m.has(F)||F.getColDef().suppressAutoSize)continue;let z=p.getPreferredWidthForColumn(F,w);if(z>0){let L=(x=C[F.colId])!=null?x:{};(E=L.minWidth)!=null||(L.minWidth=l),(D=L.maxWidth)!=null||(L.maxWidth=s);let H=Q3(F,z,L);F.setActualWidth(H,d),m.add(F),v++}T.push(F)}T.length&&f.refresh(d)}b||this.autoSizeColumnGroupsByColumns(i,d,n),t(m)})}autoSizeColumn(e,t,o){this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){let{colModel:i,ctrlsSvc:r}=this.beans,a=new Set,n=i.getColsForKeys(e);for(let l of n){let c=l.getParent();for(;c&&c!=o;)c.isPadding()||a.add(c),c=c.getParent()}let s;for(let l of a){for(let c of r.getHeaderRowContainerCtrls())if(s=c.getHeaderCtrlForColumn(l),s)break;s==null||s.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){let o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);let r=new Vt(e);return r.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),r.destroy()}}addColumnGroupResize(e,t,o){let i=this.gos.get("skipHeaderOnAutoSize"),r=()=>{let a=[],n=t.getDisplayedLeafColumns();for(let s of n)s.getColDef().suppressAutoSize||a.push(s.getColId());a.length>0&&this.autoSizeCols({colKeys:a,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",r),()=>e.removeEventListener("dblclick",r)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let o=Tl(this.beans);if(o>0){this.sizeColumnsToFit(o,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):R(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var v,C,w,b,x,E,D,T,k,F,z,L,H,j;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}let{beans:r}=this,a=(v=i==null?void 0:i.animate)!=null?v:!0;a&&qo(r,!0);let n={};for(let{key:A,...B}of(C=i==null?void 0:i.columnLimits)!=null?C:[])n[typeof A=="string"?A:A.getColId()]=B;let s=r.visibleCols.allCols;if(e<=0||!s.length)return;let l=nt(s);if(i!=null&&i.onlyScaleUp&&l>e||e===l&&s.every(B=>{var qe,le;if(B.colDef.suppressSizeToFit)return!0;let V=n==null?void 0:n[B.getId()],Z=(qe=V==null?void 0:V.minWidth)!=null?qe:i==null?void 0:i.defaultMinWidth,K=(le=V==null?void 0:V.maxWidth)!=null?le:i==null?void 0:i.defaultMaxWidth,ge=B.getActualWidth();return(Z==null||ge>=Z)&&(K==null||ge<=K)}))return;let d=[],g=[];for(let A of s){let B=(b=(w=i==null?void 0:i.colKeys)==null?void 0:w.some(V=>Jo(A,V)))!=null?b:!0;A.getColDef().suppressSizeToFit||!B?g.push(A):d.push(A)}let u=d.slice(0),h=!1,p=A=>{et(d,A),g.push(A)},f={};for(let A of d){i!=null&&i.onlyScaleUp&&(f[A.getColId()]=A.getActualWidth()),A.resetActualWidth(t);let B=n==null?void 0:n[A.getId()],V=(E=(x=B==null?void 0:B.minWidth)!=null?x:i==null?void 0:i.defaultMinWidth)!=null?E:-1/0,Z=(T=(D=B==null?void 0:B.maxWidth)!=null?D:i==null?void 0:i.defaultMaxWidth)!=null?T:1/0,K=A.getActualWidth(),ge=Math.max(Math.min(K,Z),V);ge!=K&&A.setActualWidth(ge,t,!0)}for(;!h;){h=!0;let A=e-nt(g);if(A<=0)for(let B of d){let V=(z=(F=(k=n==null?void 0:n[B.getId()])==null?void 0:k.minWidth)!=null?F:i==null?void 0:i.defaultMinWidth)!=null?z:B.minWidth;B.setActualWidth(V,t,!0)}else{let B=A/nt(d),V=A;for(let Z=d.length-1;Z>=0;Z--){let K=d[Z],ge=K.getColId(),qe=f[ge],le=n==null?void 0:n[ge],rt=(H=(L=le==null?void 0:le.minWidth)!=null?L:i==null?void 0:i.defaultMinWidth)!=null?H:qe,lo=(j=le==null?void 0:le.maxWidth)!=null?j:i==null?void 0:i.defaultMaxWidth,Ho=Math.max(rt!=null?rt:-1/0,K.getMinWidth()),Bo=Math.min(lo!=null?lo:1/0,K.getMaxWidth()),J=Math.round(K.getActualWidth()*B);JBo?(J=Bo,p(K),h=!1):Z===0&&(J=V),K.setActualWidth(J,t,!0),V-=J}}}for(let A of u)A.fireColumnWidthChangedEvent(t);let m=r.visibleCols;m.setLeftValues(t),m.updateBodyWidths(),!o&&(To(this.eventSvc,u,!0,t),a&&qo(r,!1))}applyAutosizeStrategy(){let{gos:e,colDelayRenderSvc:t}=this.beans,o=e.get("autoSizeStrategy");(o==null?void 0:o.type)!=="fitGridWidth"&&(o==null?void 0:o.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;let i=o.type;if(i==="fitGridWidth"){let{columnLimits:r,defaultMinWidth:a,defaultMaxWidth:n}=o,s=r==null?void 0:r.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:a,defaultMaxWidth:n,columnLimits:s})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(o.width,"sizeColumnsToFit");t==null||t.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var i;if(!this.isAlive())return;let o="autosizeColumns";e?this.autoSizeCols({...t,source:o,colKeys:e}):this.autoSizeAllColumns({...t,source:o}),(i=this.beans.colDelayRenderSvc)==null||i.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(let e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Q3(e,t,o={}){var a,n;let i=(a=o.minWidth)!=null?a:e.getMinWidth();tr&&(t=r),t}function Tl({ctrlsSvc:e,scrollVisibleSvc:t}){let o=e.getGridBodyCtrl(),r=o.isVerticalScrollShowing()?t.getScrollbarWidth():0;return si(o.eGridBody)-r}var Al="ag-animate-autosize";function qo({ctrlsSvc:e,gos:t},o){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;let i=e.getGridBodyCtrl().eGridBody.classList;o?i.add(Al):i.remove(Al)}var Z3={moduleName:"ColumnAutoSize",version:P,beans:[Y3],apiFunctions:{sizeColumnsToFit:K3,autoSizeColumns:Eg,autoSizeAllColumns:$3},dependsOn:[Bd],css:[j3]};function J3(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var X3=class extends S{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{let{beans:i,gos:r,element:a,columns:n}=this,s=i.colHover;if(o!=null?o:!!r.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(a,{mouseover:s.setMouseOver.bind(s,n),mouseout:s.clearMouseOver.bind(s)});else{for(let c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},eS="ag-column-hover",tS=class extends S{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;let t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){let i=()=>{let r=this.isHovered(o);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;let o=this.isHovered(e);t.toggleCss(eS,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);let r=()=>{let a=this.isHovered(o);t.toggleCss("ag-column-hover",a)};e.addManagedEventListeners({columnHoverChanged:r}),r()}createHoverFeature(e,t,o){e.createManagedBean(new X3(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},oS={moduleName:"ColumnHover",version:P,beans:[tS],apiFunctions:{isColumnHovered:J3}},iS=class extends S{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){let{allColumns:o,columnKeys:i,skipRowGroups:r,exportRowNumbers:a}=t,n=this.getColumnsToExport({allColumns:o,skipRowGroups:r,columnKeys:i,exportRowNumbers:a});return[this.prepareSession(n),this.prependContent(t),this.exportColumnGroups(t,n),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t)].reduce((s,l)=>l(s),e).parse()}processRow(e,t,o,i){var p;let r=t.shouldRowBeSkipped||(()=>!1),n=t.rowPositions!=null||!!t.onlySelected,s=this.gos.get("groupHideOpenParents")&&!n,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,c=!!i.footer,d=i.allChildrenCount===1&&((p=i.childrenAfterGroup)==null?void 0:p.length)===1&&Th(this.gos,i);if(!l&&!c&&(t.skipRowGroups||d||s)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.stub||i.level===-1&&!l&&!c||r(O(this.gos,{node:i})))return;let h=e.onNewBodyRow(i);if(o.forEach((f,m)=>{h.onColumn(f,m,i)}),t.getCustomContentBelowRow){let f=t.getCustomContentBelowRow(O(this.gos,{node:i}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{let o=e.appendContent;return o&&t.addCustomContent(o),t}}prependContent(e){return t=>{let o=e.prependContent;return o&&t.addCustomContent(o),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return o=>{if(!e.skipColumnGroupHeaders){let i=new Gd,{colGroupSvc:r}=this.beans,a=r?r.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(a,o,e.processGroupHeaderCallback)}return o}}exportHeaders(e,t){return o=>{if(!e.skipColumnHeaders){let i=o.onNewHeaderRow();t.forEach((r,a)=>{i.onColumn(r,a,void 0)})}return o}}processPinnedTopRows(e,t){return o=>{var r,a;let i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="top").sort((n,s)=>n.rowIndex-s.rowIndex).map(n=>{var s;return(s=this.pinnedRowModel)==null?void 0:s.getPinnedTopRow(n.rowIndex)}).forEach(i):(r=this.pinnedRowModel)!=null&&r.isManual()||(a=this.pinnedRowModel)==null||a.forEachPinnedRow("top",i),o}}processRows(e,t){return o=>{var c,d;let i=this.rowModel,r=ee(this.gos,i),a=vi(this.gos,i),n=!r&&e.onlySelected,s=this.processRow.bind(this,o,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(g=>g.rowPinned==null).sort((g,u)=>g.rowIndex-u.rowIndex).map(g=>i.getRow(g.rowIndex)).forEach(s);else if(this.colModel.isPivotMode())r?i.forEachPivotNode(s,!0,l==="filteredAndSorted"):a?i.forEachNodeAfterFilterAndSort(s,!0):i.forEachNode(s);else if(e.onlySelectedAllPages||n){let g=(d=(c=this.beans.selectionSvc)==null?void 0:c.getSelectedNodes())!=null?d:[];this.replicateSortedOrder(g),g.forEach(s)}else l==="all"?i.forEachNode(s):r||a?i.forEachNodeAfterFilterAndSort(s,!0):i.forEachNode(s);return o}}replicateSortedOrder(e){let{sortSvc:t,rowNodeSorter:o}=this.beans;if(!t||!o)return;let i=t.getSortOptions(),r=(a,n)=>{var s,l,c,d;return a.rowIndex!=null&&n.rowIndex!=null?a.rowIndex-n.rowIndex:a.level===n.level?((s=a.parent)==null?void 0:s.id)===((l=n.parent)==null?void 0:l.id)?o.compareRowNodes(i,a,n)||((c=a.rowIndex)!=null?c:-1)-((d=n.rowIndex)!=null?d:-1):r(a.parent,n.parent):a.level>n.level?r(a.parent,n):r(a,n.parent)};e.sort(r)}processPinnedBottomRows(e,t){return o=>{var r,a;let i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="bottom").sort((n,s)=>n.rowIndex-s.rowIndex).map(n=>{var s;return(s=this.pinnedRowModel)==null?void 0:s.getPinnedBottomRow(n.rowIndex)}).forEach(i):(r=this.pinnedRowModel)!=null&&r.isManual()||(a=this.pinnedRowModel)==null||a.forEachPinnedRow("bottom",i),o}}getColumnsToExport(e){let{allColumns:t=!1,skipRowGroups:o=!1,exportRowNumbers:i=!1,columnKeys:r}=e,{colModel:a,gos:n,visibleCols:s}=this,l=a.isPivotMode(),c=u=>zt(u)?!1:!pe(u)||i;if(r!=null&&r.length)return a.getColsForKeys(r).filter(c);let d=n.get("treeData"),g=[];return t&&!l?g=a.getCols():g=s.allCols,g=g.filter(u=>c(u)&&(o&&!d?!kn(u):!0)),g}recursivelyAddHeaderGroups(e,t,o){var r;let i=[];for(let a of e){let n=a;if(n.getChildren)for(let s of(r=n.getChildren())!=null?r:[])i.push(s)}e.length>0&&X(e[0])&&this.doAddHeaderHeader(t,e,o),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,o)}doAddHeaderHeader(e,t,o){let i=e.onNewHeaderGroupingRow(),r=0;for(let a of t){let n=a,s;o?s=o(O(this.gos,{columnGroup:n})):s=this.beans.colNames.getDisplayNameForColumnGroup(n,"header");let c=(n.isExpandable()?n.getLeafColumns():[]).reduce((d,g,u,h)=>{let p=U(d);return g.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[u],d.push(p)):p&&p[1]==null&&(p[1]=u-1),u===h.length-1&&p&&p[1]==null&&(p[1]=u),d},[]);i.onColumn(n,s||"",r++,n.getLeafColumns().length-1,c)}}},rS={moduleName:"SharedExport",version:P,beans:[iS]},aS=class extends S{getFileName(e){let t=this.getDefaultFileExtension();return e!=null&&e.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function nS(e,t){let o=document.defaultView||window;if(!o){R(52);return}let i=document.createElement("a"),r=o.URL.createObjectURL(t);i.setAttribute("href",r),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),i.remove(),o.setTimeout(()=>{o.URL.revokeObjectURL(r)},0)}var sS=class{constructor(e){this.valueFrom="data";let{colModel:t,rowGroupColsSvc:o,colNames:i,valueSvc:r,gos:a,processCellCallback:n,processHeaderCallback:s,processGroupHeaderCallback:l,processRowGroupCallback:c,valueFrom:d}=e;this.colModel=t,this.rowGroupColsSvc=o,this.colNames=i,this.valueSvc=r,this.gos=a,this.processCellCallback=n,this.processHeaderCallback=s,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c,d&&(this.valueFrom=d)}prepare(e){}extractHeaderValue(e){let t=this.getHeaderName(this.processHeaderCallback,e);return t!=null?t:""}extractRowCellValue(e){var p,f,m,v,C;let{column:t,node:o,currentColumnIndex:i,accumulatedRowIndex:r,type:a,useRawFormula:n}=e,s=i===0&&zc(this.gos,o,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||o.group)&&(t.isRowGroupDisplayed((f=(p=o.rowGroupColumn)==null?void 0:p.getColId())!=null?f:"")||s))return{value:(m=this.processRowGroupCallback(O(this.gos,{column:t,node:o})))!=null?m:""};if(this.processCellCallback)return{value:(v=this.processCellCallback(O(this.gos,{accumulatedRowIndex:r,column:t,node:o,value:this.valueSvc.getValueForDisplay({column:t,node:o,from:this.valueFrom}).value,type:a,parseValue:w=>this.valueSvc.parseValue(t,o,w,this.valueSvc.getValue(t,o,this.valueFrom)),formatValue:w=>{var b;return(b=this.valueSvc.formatValue(t,o,w))!=null?b:w}})))!=null?v:""};let l=this.gos.get("treeData"),c=this.valueSvc,d=o.level===-1&&o.footer,g=t.colDef.showRowGroup===!0&&(o.group||l);if(!d&&(s||g)){let w="",b=o;for(;b&&b.level!==-1;){let{value:x,valueFormatted:E}=c.getValueForDisplay({column:s?void 0:t,node:b,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});w=` -> ${(C=E!=null?E:x)!=null?C:""}${w}`,b=b.parent}return{value:w,valueFormatted:w}}let{value:u,valueFormatted:h}=c.getValueForDisplay({column:t,node:o,includeValueFormatted:!0,exporting:!0,useRawFormula:n,from:this.valueFrom});return{value:u!=null?u:"",valueFormatted:h}}getHeaderName(e,t){return e?e(O(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},zl=`\r +`,lS=class extends sS{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";let{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,zl),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((o,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(o.data.value||""),o.mergeAcross&&this.appendEmptyCells(o.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,i){o!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){var r;t!=0&&(this.result+=this.columnSeparator);let i=this.extractRowCellValue({column:e,node:o,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes((r=i.valueFormatted)!=null?r:i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(R(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=zl),this.isFirstLine=!1}},cS=class extends aS{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){let t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){R(51);return}let t=()=>{let i=this.getMergedParams(e),r=this.getData(i),a=new Blob(["\uFEFF",r],{type:"text/plain"}),n=i.fileName,s=typeof n=="function"?n(O(this.gos,{})):n;nS(this.getFileName(s),a)},{overlays:o}=this.beans;o?o.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){let{colModel:t,colNames:o,rowGroupColsSvc:i,valueSvc:r,gos:a}=this.beans,{processCellCallback:n,processHeaderCallback:s,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:g,valueFrom:u}=e;return new lS({colModel:t,colNames:o,valueSvc:r,gos:a,processCellCallback:n||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:g||",",rowGroupColsSvc:i,valueFrom:u})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function dS(e,t){var o;return(o=e.csvCreator)==null?void 0:o.getDataAsCsv(t)}function gS(e,t){var o;(o=e.csvCreator)==null||o.exportDataAsCsv(t)}var uS={moduleName:"CsvExport",version:P,beans:[cS],apiFunctions:{getDataAsCsv:dS,exportDataAsCsv:gS},dependsOn:[rS]},Fg=class extends ve{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){let o="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(o,e):i.removeAttribute(o))}updateTooltipText(){let{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){let e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){var e;(e=this.tooltipManager)==null||e.prepareToShowTooltip()}attemptToHideTooltip(){var e;(e=this.tooltipManager)==null||e.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()}},hS=1e3,pS=1e3,Ll=100,Ol,zi=!1,fS=class extends ve{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");let 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){let t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,o,i;return(i=(o=(t=this.tooltipCtrl)[`getTooltip${e}DelayOverride`])==null?void 0:o.call(t))!=null?i:this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Kt()&&(zi?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Ll):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){var r;let t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=(r=this.tooltipComp)==null?void 0:r.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&(i!=null&&i.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||zi)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()-Olthis.hideTooltip(!0),...(n=t.getAdditionalParams)==null?void 0:n.call(t)});this.state=2,this.tooltipInstanceCount++;let i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(o,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Ol=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var n;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}let i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");let r=this.getLocaleTextFunc(),a=(n=this.popupSvc)==null?void 0:n.addPopup({eChild:i,ariaLabel:r("ariaLabelTooltip","Tooltip")});if(a&&(this.tooltipPopupDestroyFunc=a.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){let s=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:s}),this.setEventHandlers(s)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(te(this.beans),{keydown:s=>{i.contains(s==null?void 0:s.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var o;let e=(o=this.tooltipComp)==null?void 0:o.getGui(),t=Y(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){let t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,o;let e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(o=this.popupSvc)==null||o.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?pS:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(let e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){zi=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Ll)}unlockService(){zi=!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()}},mS=class extends Fg{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()}},vS=class extends Dn{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){let{value:t}=e,o=this.getGui();o.textContent=Lo(t);let i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},CS=".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}}",Li=0,wS=200,bS=class extends ve{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){let e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:r}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){let t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){let{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:r,eventSource:a,alignSide:n="left",position:s="over",type:l}=e,c=a.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(a,t);let g=()=>{let u=c.left-d.left;n==="right"&&(u-=t.offsetWidth-c.width);let h;return s==="over"?(h=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?h=c.top-d.top+c.height:h=c.top-t.offsetHeight-(i||0)*2-d.top),{x:u,y:h}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:r,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,a,null)})}positionPopupForMenu(e){let{eventSource:t,ePopup:o,event:i}=e,r=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,o);let n=!1,s=()=>{let l=this.keepXYWithinBounds(o,r.top-a.top,0),c=o.clientWidth>0?o.clientWidth:200;n||(o.style.minWidth=`${c}px`,n=!0);let g=a.right-a.left-c,u;return this.gos.get("enableRtl")?(u=p(),u<0&&(u=h(),this.setAlignedStyles(o,"left")),u>g&&(u=0,this.setAlignedStyles(o,"right"))):(u=h(),u>g&&(u=p(),this.setAlignedStyles(o,"right")),u<0&&(u=0,this.setAlignedStyles(o,"left"))),{x:u,y:l};function h(){return r.right-a.left-2}function p(){return r.left-a.left-c}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:s,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",o,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,o,i){let r=o.bottom-t.bottom,a=t.top-o.top,n=e.offsetHeight+i;return r>n?"under":a>n||a>r?"above":"under"}setAlignedStyles(e,t){let o=this.getPopupIndex(e);if(o===-1)return;let i=this.popupList[o],{alignedToElement:r}=i;if(!r)return;let a=["right","left","over","above","under"];for(let n of a)r.classList.remove(`ag-has-popup-positioned-${n}`),e.classList.remove(`ag-popup-positioned-${n}`);t&&(r.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){let o=this.getPopupIndex(t);if(o!==-1){let i=this.popupList[o];i.alignedToElement=e}}positionPopup(e){let{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:r,skipObserver:a,updatePosition:n}=e,s={width:0,height:0},l=(c=!1)=>{let{x:d,y:g}=n();c&&t.clientWidth===s.width&&t.clientHeight===s.height||(s.width=t.clientWidth,s.height=t.clientHeight,i&&(d+=i),r&&(g+=r),o&&(d=this.keepXYWithinBounds(t,d,1),g=this.keepXYWithinBounds(t,g,0)),t.style.left=`${d}px`,t.style.top=`${g}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!a){let c=At(this.beans,t,()=>l(!0));setTimeout(()=>c(),wS)}}getParentRect(){let e=te(this.beans),t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),dc(t)}keepXYWithinBounds(e,t,o){let i=o===0,r=i?"clientHeight":"clientWidth",a=i?"top":"left",n=i?"height":"width",s=i?"scrollTop":"scrollLeft",l=te(this.beans),c=l.documentElement,d=this.getPopupParent(),g=e.getBoundingClientRect(),u=d.getBoundingClientRect(),h=l.documentElement.getBoundingClientRect(),p=d===l.body,f=Math.ceil(g[n]),v=p?(i?cc:Yi)(c)+c[s]:d[r];p&&(v-=Math.abs(h[a]-u[a]));let C=v-f;return Math.min(Math.max(t,0),Math.max(C,0))}addPopup(e){let{eChild:t,ariaLabel:o,ariaOwns:i,alwaysOnTop:r,positionCallback:a,anchorToElement:n}=e,s=this.getPopupIndex(t);if(s!==-1)return{hideFunc:this.popupList[s].hideFunc};this.initialisePopupPosition(t);let l=this.createPopupWrapper(t,!!r,o,i),c=this.addEventListenersToPopup({...e,wrapperEl:l});return a&&a(),this.addPopupToPopupList(t,l,c,n),{hideFunc:c}}initialisePopupPosition(e){let o=this.getPopupParent().getBoundingClientRect();I(e.style.top)||(e.style.top=`${o.top*-1}px`),I(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){let r=this.getPopupParent(),{environment:a,gos:n}=this.beans,s=Zt({tag:"div"});return a.applyThemeClasses(s),s.classList.add("ag-popup"),e.classList.add(n.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Et(e,"dialog"),o?Do(e,o):i&&(e.id||(e.id=`popup-component-${Li}`),ys(i,e.id)),s.appendChild(e),r.appendChild(s),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),s}addEventListenersToPopup(e){let t=this.beans,o=te(t),{wrapperEl:i,eChild:r,closedCallback:a,afterGuiAttached:n,closeOnEsc:s,modal:l,ariaOwns:c}=e,d=!1,g=f=>{if(!i.contains(Y(t)))return;f.key===y.ESCAPE&&!this.isStopPropagation(f)&&p({keyboardEvent:f})},u=f=>p({mouseEvent:f}),h=f=>p({touchEvent:f}),p=(f={})=>{let{mouseEvent:m,touchEvent:v,keyboardEvent:C,forceHide:w}=f;!w&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:v},r)||d)||(d=!0,i.remove(),o.removeEventListener("keydown",g),o.removeEventListener("mousedown",u),o.removeEventListener("touchstart",h),o.removeEventListener("contextmenu",u),this.eventSvc.removeListener("dragStarted",u),a&&a(m||v||C),this.removePopupFromPopupList(r,c))};return n&&n({hidePopup:p}),window.setTimeout(()=>{s&&o.addEventListener("keydown",g),l&&(o.addEventListener("mousedown",u),this.eventSvc.addListener("dragStarted",u),o.addEventListener("touchstart",h),o.addEventListener("contextmenu",u))},0),p}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Li,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Li=Li+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let o=this.getPopupIndex(e);if(o===-1)return;let i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(a=>a&&a()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;let r=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=r,i.isAnchored=!0,r}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&ys(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:r}=e,a=i.getBoundingClientRect(),n=g=>Number.parseInt(g.substring(0,g.length-1),10),s=(g,u)=>{let h=o[g]-a[g],p=n(r.style[g]);return{initialDiff:h,lastDiff:h,initial:p,last:p,direction:u}},l=s("top",0),c=s("left",1),d=this.beans.frameworkOverrides;return new $(g=>{d.wrapIncoming(()=>{mp(()=>{let u=t.getBoundingClientRect(),h=i.getBoundingClientRect();if(h.top==0&&h.left==0&&h.height==0&&h.width==0){e.hidePopup();return}let f=(m,v)=>{let C=n(r.style[v]);m.last!==C&&(m.initial=C,m.last=C);let w=u[v]-h[v];if(w!=m.lastDiff){let b=this.keepXYWithinBounds(r,m.initial+m.initialDiff-w,m.direction);r.style[v]=`${b}px`,m.last=b}m.lastDiff=w};f(l,"top"),f(c,"left")},200).then(u=>{g(()=>{u!=null&&window.clearInterval(u)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){let{mouseEvent:o,touchEvent:i}=e,r=o||i;if(!r)return!1;let a=this.getPopupIndex(t);if(a===-1)return!1;for(let n=a;ne.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return dt(e)}},Tr={moduleName:"Popup",version:P,beans:[yS]};function Za(e){return e.get("tooltipShowMode")==="whenTruncated"}var SS=(e,t)=>{let o=e;return typeof o.getTranslatedMessage=="function"?o.getTranslatedMessage(t):e.message},Ja=(e,t,o)=>{var s,l,c;let{editModelSvc:i}=e,r=(l=(s=i==null?void 0:i.getCellValidationModel())==null?void 0:s.getCellValidation(t))==null?void 0:l.errorMessages,a=(c=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:c.errorMessages,n=r||a;return n!=null&&n.length?n.join(o("tooltipValidationErrorSeparator",". ")):void 0},xS=(e,t)=>{if(Za(e.gos)){if(t.isCellRenderer()){let i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?li(()=>{let a=t.eGui;return a.querySelector(".ag-group-value")||a.querySelector(".ag-cell-value")||a}):void 0}return li(()=>{let i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},kS=(e,t,o)=>{let{editSvc:i}=e,{column:r}=t,a=xS(e,t),n=()=>i!=null&&i.isEditing(t)?!1:a?r.isTooltipEnabled()?a():!1:!0;return{shouldDisplayDefault:n,shouldDisplayColumnTooltip:n,shouldDisplayCustomTooltip:o!=null?o:n}},RS=({beans:e,ctrl:t,value:o,displayFunctions:i,translate:r})=>{let{editSvc:a,formula:n,gos:s}=e,{column:l,rowNode:c}=t;if(n!=null&&n.active&&l.isAllowFormula()){let m=n.getFormulaError(l,c);if(m)return{value:SS(m,r),location:"cellFormula",shouldDisplay:()=>!!(n!=null&&n.getFormulaError(l,c))}}if(!!!(a!=null&&a.isEditing(t))){let m=Ja(e,t,r);if(m)return{value:m,location:"cellEditor",shouldDisplay:()=>!(a!=null&&a.isEditing(t))&&!!Ja(e,t,r)}}let{shouldDisplayCustomTooltip:g,shouldDisplayColumnTooltip:u}=i;if(o!=null)return{value:o,location:"cell",shouldDisplay:g};let h=l.getColDef(),p=c.data;if(h.tooltipField&&I(p))return{value:ei(p,h.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:u};let f=h.tooltipValueGetter;return f?{value:f(O(s,{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:u}:null},ES=class extends S{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);let r=this.gos,a=Za(r),{column:n,eGui:s}=t,l=n.getColDef();!i&&a&&!l.headerComponent&&(i=li(()=>s.querySelector(".ag-header-cell-text")));let c="header",g=this.beans.colNames.getDisplayNameForColumn(n,"header",!0),u=o!=null?o:g,h={getGui:()=>s,getLocation:()=>c,getTooltipValue:()=>{var f,m;return(m=o!=null?o:(f=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:f.call(l,O(r,{location:c,colDef:l,column:n,value:u,valueFormatted:g})))!=null?m:l==null?void 0:l.headerTooltip},shouldDisplayTooltip:i,getAdditionalParams:()=>({column:n,colDef:n.getColDef()})},p=this.createTooltipFeature(h);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);let r=this.gos,a=Za(r),{column:n,eGui:s}=t,l=n.getColGroupDef();!i&&a&&!(l!=null&&l.headerGroupComponent)&&(i=li(()=>s.querySelector(".ag-header-group-text")));let c="headerGroup",g=this.beans.colNames.getDisplayNameForColumnGroup(n,"header"),u=o!=null?o:g,h={getGui:()=>s,getLocation:()=>c,getTooltipValue:()=>{var f,m;return(m=o!=null?o:(f=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:f.call(l,O(r,{location:c,colDef:l,column:n,value:u,valueFormatted:g})))!=null?m:l==null?void 0:l.headerTooltip},shouldDisplayTooltip:i,getAdditionalParams:()=>{let f={column:n};return l&&(f.colDef=l),f}},p=this.createTooltipFeature(h);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,o){let{beans:i}=this,{column:r,rowNode:a}=e,n=kS(i,e,o),s=this.getLocaleTextFunc(),l=null,c=()=>(l=RS({beans:i,ctrl:e,value:t,displayFunctions:n,translate:s}),l),g={getGui:()=>e.eGui,getLocation:()=>{var u;return(u=l==null?void 0:l.location)!=null?u:"cell"},getTooltipValue:()=>{var u;return(u=c())==null?void 0:u.value},shouldDisplayTooltip:()=>{let u=l!=null?l:c();return u?u.shouldDisplay?u.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(g,i)}setupFullWidthRowTooltip(e,t,o,i){let r={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},a=this.beans,n=a.context;e&&t.destroyBean(e,n);let s=this.createTooltipFeature(r,a);if(s)return t.createBean(s,n)}setupCellEditorTooltip(e,t){var s,l;let{beans:o}=this,{context:i}=o,r=((s=t.getValidationElement)==null?void 0:s.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!r)return;let a={getGui:()=>r,getTooltipValue:()=>Ja(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;let{editModelSvc:c}=o,d=(p=c==null?void 0:c.getRowValidationModel())==null?void 0:p.getRowValidationMap(),g=(f=c==null?void 0:c.getCellValidationModel())==null?void 0:f.getCellValidationMap(),u=!!d&&d.size>0,h=!!g&&g.size>0;return u||h}},n=this.createTooltipFeature(a,o);if(n)return e.createBean(n,i)}initCol(e){let{colDef:t}=e;e.tooltipEnabled=I(t.tooltipField)||I(t.tooltipValueGetter)||I(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},FS=class extends fS{createTooltipComp(e,t){let o=jp(this.beans.userCompFactory,e);o==null||o.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){var e;(e=this.onColumnMovedEventCallback)==null||e.call(this),this.onColumnMovedEventCallback=void 0}},Dg={moduleName:"Tooltip",version:P,beans:[ES],dynamicBeans:{tooltipFeature:Fg,highlightTooltipFeature:mS,tooltipStateManager:FS},userComponents:{agTooltipComponent:vS},dependsOn:[Tr],css:[CS]},ho=class{constructor(e){this.cellValueChanges=e}},ba=class extends ho{constructor(e,t,o,i){super(e),this.initialRange=t,this.finalRange=o,this.ranges=i}},DS=10,Hl=class{constructor(e){this.actionStack=[],this.maxStackSize=e||DS,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}},MS=class extends S{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=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},o=this.activeCellEdit!==null&&In(this.activeCellEdit,t),i=this.activeRowEdit!==null&&Pf(this.activeRowEdit,t);if(!(o||i||this.isPasting||this.isRangeInAction))return;let{rowPinned:a,rowIndex:n,column:s,oldValue:l,value:c}=e,d={rowPinned:a,rowIndex:n,columnId:s.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){let{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;let o=e.get("undoRedoCellEditingLimit");if(o<=0)return;this.undoStack=new Hl(o),this.redoStack=new Hl(o),this.addListeners();let i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:r=>{r.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,r=>{this.gridBodyCtrl=r.gridBodyCtrl})}getCurrentUndoStackSize(){var e,t;return(t=(e=this.undoStack)==null?void 0:e.getCurrentStackSize())!=null?t:0}getCurrentRedoStackSize(){var e,t;return(t=(e=this.redoStack)==null?void 0:e.getCurrentStackSize())!=null?t:0}undo(e){let{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});let r=this.undoRedo(o,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:r})}redo(e){let{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});let r=this.undoRedo(i,o,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:r})}undoRedo(e,t,o,i,r){if(!e)return!1;let a=e.pop();return a!=null&&a.cellValueChanges?(this.processAction(a,n=>n[i],r),a instanceof ba?this.processRange(a.ranges||[a[o]]):this.processCell(a.cellValueChanges),t.push(a),!0):!1}processAction(e,t,o){let{changeDetectionSvc:i}=this.beans;i==null||i.beginDeferred();try{for(let r of e.cellValueChanges){let{rowIndex:a,rowPinned:n,columnId:s}=r,l={rowIndex:a,rowPinned:n},c=tt(this.beans,l);c!=null&&c.displayed&&c.setDataValue(s,t(r),o)}}finally{i==null||i.endDeferred()}}processRange(e){let t,o=this.beans.rangeSvc;o.removeAllCellRanges(!0),e.forEach((i,r)=>{if(!i)return;let a=i.startRow,n=i.endRow;r===e.length-1&&(t={rowPinned:a.rowPinned,rowIndex:a.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));let s={rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:i.startColumn,columns:i.columns};o.addCellRange(s)})}processCell(e){let t=e[0],{rowIndex:o,rowPinned:i}=t,r={rowIndex:o,rowPinned:i},a=tt(this.beans,r),n={rowPinned:t.rowPinned,rowIndex:a.rowIndex,columnId:t.columnId};this.setLastFocusedCell(n)}setLastFocusedCell(e){let{rowIndex:t,columnId:o,rowPinned:i}=e,{colModel:r,focusSvc:a,rangeSvc:n}=this.beans,s=r.getCol(o);if(!s)return;let{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(s);let c={rowIndex:t,column:s,rowPinned:i};a.setFocusedCell({...c,forceBrowserFocus:!0}),n==null||n.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new ho(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){let o=new ho(this.cellValueChanges);this.pushActionsToUndoStack(o)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new ho(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new ba(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e,{rangeSvc:t,gos:o}=this.beans;t&>(o)?e=new ba(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new ho(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==null?void 0:t.length)===0))return;let o=new ho(t!=null?t:[]);this.pushActionsToUndoStack(o),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},PS=".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}",IS={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},TS=class extends Fr{constructor(){super(IS,[Gn]),this.eEditor=M}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;let t=e!=null?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){let t=this.getLocaleTextFunc(),o=Sr(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},ht=class extends Wt{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){let o=this.eInput;return o.value!==e&&(o.value=I(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){let t=this.eInput,o=e.length>0;t.setCustomValidity(e),o&&t.reportValidity(),un(t,o)}preventDisallowedCharacters(){let e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{wd(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{var r;let i=(r=o.clipboardData)==null?void 0:r.getData("text");i!=null&&i.split("").some(a=>!e.test(a))&&o.preventDefault()}})}},Ar={selector:"AG-INPUT-TEXT-FIELD",component:ht},AS=class extends ht{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();let e=Lt();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}setMin(e){var o;let t=e instanceof Date?(o=fe(e!=null?e:null,!!this.includeTime))!=null?o:void 0:e;return this.min===t?this:(this.min=t,we(this.eInput,"min",t),this)}setMax(e){var o;let t=e instanceof Date?(o=fe(e!=null?e:null,!!this.includeTime))!=null?o:void 0:e;return this.max===t?this:(this.max=t,we(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,we(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(){var e;if(this.eInput.validity.valid)return(e=me(this.getValue()))!=null?e:void 0}setDate(e,t){this.setValue(fe(e!=null?e:null,this.includeTime),t)}},Mg={selector:"AG-INPUT-DATE-FIELD",component:AS},zr=class extends Fr{constructor(e){super(),this.cellEditorInput=e,this.eEditor=M}initialiseEditor(e){let{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());let{eEditor:o}=this,{cellStartedEdit:i,eventKey:r,suppressPreventDefault:a}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let n,s=!0;i?(this.focusAfterAttached=!0,r===y.BACKSPACE||r===y.DELETE?n="":r&&r.length===1?a?s=!1:n=r:(n=t.getStartValue(),r!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,n=t.getStartValue()),s&&n!=null&&o.setStartValue(n),this.addGuiEventListener("keydown",l=>{let{key:c}=l;(c===y.PAGE_UP||c===y.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var i,r;let e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Lt()||t.getFocusableElement().focus();let o=t.getInputElement();this.highlightAllOnFocus?o.select():(r=(i=this.cellEditorInput).setCaret)==null||r.call(i)}focusIn(){let{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;let t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t!=null?t:null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},zS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},LS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return zS}getAgComponents(){return[Mg]}init(e,t){var n,s,l;this.eEditor=e,this.params=t;let{min:o,max:i,step:r,colDef:a}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),r!=null&&e.setStep(r),this.includeTime=(l=t.includeTime)!=null?l:(s=(n=this.getDataTypeService())==null?void 0:n.getDateIncludesTimeFlag)==null?void 0:s.call(n,a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:r,getValidationErrors:a}=o,n=[],s=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){let l=i instanceof Date?i:new Date(i);if(tl){let c=l.toLocaleDateString();n.push(s("maxDateValidation",`Date must be before ${c}`,[c]))}}}return n.length||(n=null),a?a({value:t,cellEditorParams:o,internalErrors:n}):n}getValue(){let{eEditor:e,params:t}=this,o=e.getDate();return!I(o)&&!I(t.value)?t.value:o!=null?o:null}getStartValue(){var t;let{value:e}=this.params;if(e instanceof Date)return fe(e,(t=this.includeTime)!=null?t:!1)}},OS=class extends zr{constructor(){super(new LS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},HS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},BS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return HS}getAgComponents(){return[Mg]}init(e,t){var n,s,l;this.eEditor=e,this.params=t;let{min:o,max:i,step:r,colDef:a}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),r!=null&&e.setStep(r),this.includeTime=(l=t.includeTime)!=null?l:(s=(n=this.getDataTypeService())==null?void 0:n.getDateIncludesTimeFlag)==null?void 0:s.call(n,a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o!=null?o:void 0)),{min:r,max:a,getValidationErrors:n}=t,s=[];if(i){let l=new Date(i),c=this.getLocaleTextFunc();if(r){let d=new Date(r);if(ld){let g=d.toLocaleDateString();s.push(c("maxDateValidation",`Date must be before ${g}`,[g]))}}}return s.length||(s=null),n?n({value:this.getValue(),cellEditorParams:t,internalErrors:s}):s}getValue(){let{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!I(o)&&!I(e.value)?e.value:e.parseValue(o!=null?o:"")}getStartValue(){var e,t,o;return fe((t=this.parseDate((e=this.params.value)!=null?e:void 0))!=null?t:null,(o=this.includeTime)!=null?o:!1)}parseDate(e){var o;let t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):(o=me(e))!=null?o:void 0}formatDate(e){var o,i;let t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):(i=fe(e!=null?e:null,(o=this.includeTime)!=null?o:!1))!=null?i:void 0}},NS=class extends zr{constructor(){super(new BS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},VS=class extends Wt{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){let 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}},GS={selector:"AG-INPUT-TEXT-AREA",component:VS},WS={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},qS=class extends Fr{constructor(){super(WS,[GS]),this.eEditor=M}initialiseEditor(e){let{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,maxLength:r,cols:a,rows:n}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(r||200).setCols(a||60).setRows(n||10);let s;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?s="":i&&i.length===1?s=i:(s=this.getStartValue(e),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=this.getStartValue(e)),s!=null&&t.setValue(s,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){var o;let{value:t}=e;return(o=t==null?void 0:t.toString())!=null?o:t}agSetEditValue(e){this.params.value=e;let t=this.getStartValue(this.params);this.eEditor.setValue(t!=null?t:"",!0)}onKeyDown(e){let t=e.key;(t===y.LEFT||t===y.UP||t===y.RIGHT||t===y.DOWN||e.shiftKey&&t===y.ENTER)&&e.stopPropagation()}afterGuiAttached(){let{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){let{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!I(i)&&!I(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),r=this.getValue(),a=[];return typeof r=="string"&&t!=null&&r.length>t&&a.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),o?o({value:r,internalErrors:a,cellEditorParams:e}):a}},Zn=class extends ht{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();let e=this.eInput;this.addManagedListeners(e,{blur:()=>{let a=Number.parseFloat(e.value),n=isNaN(a)?"":this.normalizeValue(a.toString());this.value!==n&&this.setValue(n)},wheel:this.onWheel.bind(this)}),e.step="any";let{precision:t,min:o,max:i,step:r}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof i=="number"&&this.setMax(i),typeof r=="number"&&this.setStep(r)}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){let o=this.precision;if(o==null)return e;if(t){let r=Number.parseFloat(e).toFixed(o);return Number.parseFloat(r).toString()}let i=String(e).split(".");if(i.length>1){if(i[1].length<=o)return e;if(o>0)return`${i[0]}.${i[1].slice(0,o)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,we(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,we(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,we(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(I(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);let r=this.normalizeValue(o);i=o!=r}if(i)return t(o)}return e(o)}getValue(e=!1){let t=this.eInput;if(!t.validity.valid&&!e)return;let o=t.value;return this.isScientificNotation(o)?this.adjustPrecision(o,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},_S={selector:"AG-INPUT-NUMBER-FIELD",component:Zn},US={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},jS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return US}getAgComponents(){return[_S]}init(e,t){this.eEditor=e,this.params=t;let{max:o,min:i,precision:r,step:a}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),r!=null&&e.setPrecision(r),a!=null&&e.setStep(a);let n=e.getInputElement();t.preventStepping?e.addManagedElementListeners(n,{keydown:this.preventStepping}):t.showStepperButtons&&n.classList.add("ag-number-field-input-stepper")}getValidationErrors(){let{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,a=this.eEditor.getInputElement().valueAsNumber,n=this.getLocaleTextFunc(),s=[];return typeof a=="number"&&(t!=null&&ao&&s.push(n("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),s.length||(s=null),i?i({value:a,cellEditorParams:e,internalErrors:s}):s}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){let{eEditor:e,params:t}=this,o=e.getValue();if(!I(o)&&!I(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){Lt()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},KS=class extends zr{constructor(){super(new jS(()=>this.getLocaleTextFunc()))}},$S=".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)}}",YS="ag-active-item",QS=(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}]}),ZS=class extends Oo{constructor(e,t,o){super(QS(e,t)),this.label=t,this.value=o,this.eText=M}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){let t=this.getGui();t.classList.toggle(YS,e),sc(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){let o=this.getGui();Iu(o,e),Pu(o,t)}createTooltip(){let e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>pc(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){let e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},JS=class extends Oo{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS($S)}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){let t=e.key;switch(t){case y.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{let o=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(o)}break;case y.DOWN:case y.UP:e.preventDefault(),this.navigate(t);break;case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){let{value:t,text:o}=e,i=o!=null?o:t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(let e of this.listItems)e.destroy();ne(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){let 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;let o=this.options.findIndex(i=>i.value===e);if(o!==-1){let i=this.options[o];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();let e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){let t=e.getGui();if(!Ie(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;let o=this.getGui(),{scrollTop:i,clientHeight:r}=o,{offsetTop:a,offsetHeight:n}=t;(a+n>i+r||a{o.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},XS=".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}",e2={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"}}]}]},t2=class extends _d{constructor(e){if(super(e,(e==null?void 0:e.template)||e2,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=M,this.eWrapper=M,this.eDisplayField=M,this.eIcon=M,this.registerCSS(XS),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:r,maxPickerWidth:a}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),r!=null&&this.setPickerMinWidth(r),a!=null&&this.setPickerMaxWidth(a)}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);let t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});let{pickerIcon:o,inputWidth:i}=this.config;if(o){let r=this.beans.iconSvc.createIconNoSpan(o);r&&this.eIcon.appendChild(r)}i!=null&&this.setInputWidth(i)}setupAria(){let e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),ka(e,!1),this.ariaRole&&Et(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case y.UP:case y.DOWN:case y.ENTER:case y.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case y.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());let e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:i,modalPicker:r=!0},maxPickerHeight:a,minPickerWidth:n,maxPickerWidth:s,variableWidth:l,beans:c,eWrapper:d}=this,g={modal:r,eChild:e,closeOnEsc:!0,closedCallback:()=>{let f=cn(c);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:d};e.style.position="absolute";let u=c.popupSvc,h=u.addPopup(g);l?(n&&(e.style.minWidth=n),e.style.width=fn(Yi(d)),s&&(e.style.maxWidth=s)):Ji(e,s!=null?s:Yi(d));let p=a!=null?a:`${hn(u.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),h.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:i},eWrapper:r,pickerComponent:a}=this,n=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:r,ePopup:a.getGui(),position:"under",alignSide:n,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);let e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;let t=this.getAriaElement();ka(t,e);let o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Ji(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==null?void 0:e,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e==null?void 0:e,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e==null?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}},o2=".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}",Jn=class extends t2{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(o2)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:li(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{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(){let e=this.createBean(new JS("select"));this.listComponent=e,e.setParentComponent(this);let t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Vu(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var o;let{key:t}=e;switch(t===y.TAB&&this.hidePicker(),t){case y.ENTER:case y.UP:case y.DOWN:case y.PAGE_UP:case y.PAGE_DOWN:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(o=this.listComponent)==null||o.handleKeyDown(e):super.onKeyDown(e);break;case y.ESCAPE:super.onKeyDown(e);break;case y.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){let e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){var t;return(t=this.listComponent)!=null&&t.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,o){let{listComponent:i,config:{placeholder:r},eDisplayField:a,tooltipFeature:n}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&r&&(l=r),a.textContent=l,n==null||n.setTooltipAndRefresh(l!=null?l:null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},i2={selector:"AG-SELECT",component:Jn},r2={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},a2=class extends Fr{constructor(){super(r2,[i2]),this.eEditor=M,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){var g;this.focusAfterAttached=e.cellStartedEdit;let{eEditor:t,valueSvc:o,gos:i}=this,{values:r,value:a,eventKey:n}=e;if(Q(r)){R(58);return}this.startedByEnter=n!=null?n===y.ENTER:!1;let s=!1;r.forEach(u=>{let h={value:u},p=o.formatValue(e.column,null,u),f=p!=null;h.text=f?p:u,t.addOption(h),s=s||a===u}),s?t.setValue((g=e.value)!=null?g:void 0,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e!=null?e:void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){let{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue(),r=[];if(t&&i!=null&&!t.includes(i)){let a=this.getLocaleTextFunc();r.push(a("invalidSelectionValidation","Invalid selection."))}else r=null;return o?o({value:i,internalErrors:r,cellEditorParams:e}):r}},n2={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},s2=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return n2}getAgComponents(){return[Ar]}init(e,t){this.eEditor=e,this.params=t;let o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),r=this.getLocaleTextFunc(),a=[];return t!=null&&typeof i=="string"&&i.length>t&&a.push(r("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),o?o({value:i,cellEditorParams:e,internalErrors:a}):a}getValue(){let{eEditor:e,params:t}=this,o=e.getValue();return!I(o)&&!I(t.value)?t.value:t.parseValue(o)}getStartValue(){let e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Lt()&&this.eEditor.getInputElement().focus({preventScroll:!0});let e=this.eEditor,t=e.getValue(),o=I(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Bl=class extends zr{constructor(){super(new s2(()=>this.getLocaleTextFunc()))}};function l2(e){var t;(t=e.undoRedo)==null||t.undo("api")}function c2(e){var t;(t=e.undoRedo)==null||t.redo("api")}function d2(e,t){var o;return(o=e.editModelSvc)==null?void 0:o.getEditRowDataValue(t,{checkSiblings:!0})}function g2(e){var i;let t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((r,a)=>{let{rowIndex:n,rowPinned:s}=a;r.forEach((l,c)=>{let{editorValue:d,pendingValue:g,sourceValue:u,state:h}=l,p=Ne(l),f=d!=null?d:g;f===ae&&(f=void 0);let m={newValue:f,oldValue:u,state:h,column:c,colId:c.getColId(),colKey:c.getColId(),rowIndex:n,rowPinned:s},v=h==="editing";(v||!v&&p)&&o.push(m)})}),o}function u2(e,t=!1){var i,r;let{editSvc:o}=e;if(o!=null&&o.isBatchEditing()){if(t)for(let a of(r=(i=e.editModelSvc)==null?void 0:i.getEditPositions())!=null?r:[])a.state==="editing"&&o.revertSingleCellEdit(a);else xt(e,{persist:!0});yt(e,void 0,{cancel:t})}else o==null||o.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function h2(e,t){var i;let o=G(e,t);return!!((i=e.editSvc)!=null&&i.isEditing(o))}function p2(e,t){let{key:o,colKey:i,rowIndex:r,rowPinned:a}=t,{editSvc:n,colModel:s}=e,l=s.getCol(i);if(!l){R(12,{colKey:i});return}let d=tt(e,{rowIndex:r,rowPinned:a||null,column:l});if(!d){R(290,{rowIndex:r,rowPinned:a});return}if(!(n!=null&&n.isCellEditable({rowNode:d,column:l},"api")))return;a==null&&bg(e,r),wg(e,i),n==null||n.startEditing({rowNode:d,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api",editable:!0})}function f2(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function m2(e){var t,o;return(o=(t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())!=null?o:0}function v2(e){var t,o;return(o=(t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())!=null?o:0}var C2={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},w2=class extends Dn{constructor(e){super(C2),this.params=e}postConstruct(){Jt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params,o=i=>{Na(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}};function b2(e,{column:t},o,i,r="ui"){var c;if(o instanceof KeyboardEvent&&(o.key===y.TAB||o.key===y.ENTER||o.key===y.F2||o.key===y.BACKSPACE&&i))return!0;if((o==null?void 0:o.shiftKey)&&((c=e.rangeSvc)==null?void 0:c.getCellRanges().length)!=0)return!1;let n=t==null?void 0:t.getColDef(),s=y2(e.gos,n),l=o==null?void 0:o.type;return l==="click"&&(o==null?void 0:o.detail)===1&&s===1||l==="dblclick"&&(o==null?void 0:o.detail)===2&&s===2?!0:r==="api"?!!i:!1}function y2(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function ya(e,t){var o,i;return(i=(o=e.editModelSvc)==null?void 0:o.hasEdits(t,{withOpenEditor:!0}))!=null?i:!1}function Xa(e,t){var n;let o=t.column,i=t.rowNode,r=o.getColDef();if(!i)return ya(e,t);let a=r.editable;return i.group&&r.groupRowEditable!=null?(n=e.rowGroupingEditValueSvc)!=null&&n.isGroupCellEditable(i,o)?!0:ya(e,t):o.isColumnFunc(i,a)?!0:ya(e,t)}function S2(e,t,o="ui"){let i=Xa(e,t);if(i||o==="ui")return i;let{rowNode:r,column:a}=t;for(let n of e.colModel.getCols())if(n!==a&&Xa(e,{rowNode:r,column:n}))return!0;return!1}var wr=(e,t=!1)=>{if(e!==void 0)return Ne(e)||t&&e.state==="editing"};function Pg(e,t,o=!1){var i;return wr((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}var Ig=(e,t,o)=>{if(e)for(let i=0,r=e.length;i{let c={rowNode:i,column:l};return Pg(o,c,!0)||Tg(o,c)||Ag(o,c)});this.applyStyle(a,s);return}this.applyStyle(a)}applyStyle(e=!1,t=!1){var r,a;let o=!!((r=this.editSvc)!=null&&r.isBatchEditing()),i=this.gos.get("editType")==="fullRow";(a=this.rowCtrl)==null||a.forEachGui(void 0,({rowComp:n})=>{n.toggleCss("ag-row-editing",i&&t),n.toggleCss("ag-row-batch-edit",i&&t&&o),n.toggleCss("ag-row-inline-editing",t),n.toggleCss("ag-row-not-inline-editing",!t),n.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},R2=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{let r=new Set;e.forEachNode(a=>i.has(a)&&r.add(a)),t==null||t.forEachPinnedRow("top",a=>i.has(a)&&r.add(a)),t==null||t.forEachPinnedRow("bottom",a=>i.has(a)&&r.add(a));for(let a of i)r.has(a)||o.removeEdits({rowNode:a});return r},E2=({editModelSvc:e},t,o)=>{var i;for(let r of t)(i=e==null?void 0:e.getEditRow(r))==null||i.forEach((a,n)=>!o.has(n)&&e.removeEdits({rowNode:r,column:n}))},F2=e=>()=>{let t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());E2(e,R2(e,i),t)},D2=new Set(["undo","redo","paste","bulk","rangeSvc"]),M2=new Set(["ui","api"]),zg={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},P2=new Set(Object.keys(zg)),I2=new Set(["paste","rangeSvc","cellClear","redo","undo"]),Sa={cancel:!0,source:"api"},T2={cancel:!1,source:"api"},Nt={checkSiblings:!0},Ct={force:!0,suppressFlash:!0},A2={force:!0},z2=class extends S{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){let{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Sa),this.createStrategy(i)});let t=F2(e),o=()=>{let i=this.model.getCellValidationModel().getCellValidationMap().size>0,r=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||r?this.stopEditing(void 0,Sa):this.isEditing()&&(this.batch?yt(e,this.model.getEditPositions()):this.stopEditing(void 0,T2)),!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,Sa))}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){let{beans:t,gos:o,strategy:i}=this,r=Nl(o,e);if(i){if(i.beanName===r)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(r,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){var a;let r=b2(this.beans,e,t,o,i);return r&&((a=this.strategy)!=null||(this.strategy=this.createStrategy())),r}shouldStopEditing(e,t,o="ui"){var i,r;return(r=(i=this.strategy)==null?void 0:i.shouldStop(e,t,o))!=null?r:null}shouldCancelEditing(e,t,o="ui"){var i,r;return(r=(i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))!=null?r:null}validateEdit(){return f1(this.beans)}isEditing(e,t){return this.model.hasEdits(e!=null?e:void 0,t!=null?t:Nt)}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){var d,g;let{startedEdit:o=!0,event:i=null,source:r="ui",ignoreEventKey:a=!1,silent:n}=t;if((d=this.strategy)!=null||(this.strategy=this.createStrategy()),!((g=t.editable)!=null?g:this.isCellEditable(e,"api")))return;let l=G(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}let c=this.shouldStartEditing(e,i,o,r);if(c===!1&&r!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,r)&&!t.continueEditing&&this.stopEditing(void 0,{source:r}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:r,ignoreEventKey:a,startedEdit:o,silent:n})}stopEditing(e,t){let o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let i=!1,{edits:r}=o;try{let a=this.processStopRequest(o);return i||(i=a.res),r=a.edits,this.finishStopEditing({...o,edits:r,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){let{event:o=null,cancel:i=!1,source:r="ui",forceCancel:a=!1,forceStop:n=!1,commit:s=!1}=t||{};if(P2.has(r)&&this.batch)return e!=null&&e.rowNode&&(e!=null&&e.column)&&this.bulkRefreshCell(e),null;let l=this.committing?zg[r]:r;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Nt))||!this.strategy||this.stopping)return null;let d=G(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);let g=!i&&(!!this.shouldStopEditing(e,o,l)||(this.committing||r==="paste")&&!this.batch)||n,u=i&&!!this.shouldCancelEditing(e,o,l)||a;return{cancel:i,cellCtrl:d,edits:this.model.getEditMap(!0),event:o!=null?o:null,forceCancel:a,forceStop:n,commit:s,position:e,source:r,treatAsSource:l,willCancel:u,willStop:g}}processStopRequest(e){var a;let{event:t,position:o,willCancel:i,willStop:r}=e;return r||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,o)?{res:!1,edits:this.handleMidBatchKey(t,o,e)}:(xt(this.beans,{persist:!0}),this.batch&&((a=this.strategy)==null||a.cleanupEditors(o)),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){var p,f;let{beans:t,model:o}=this,{cancel:i,commit:r,edits:a,event:n,source:s,willCancel:l,willStop:c}=e,d=!this.batch||!l;xt(t,{persist:d,isCancelling:l||i,isStopping:c});let g=o.getEditMap(),h=!l&&(!this.batch||r)?this.processEdits(g,s):[];i?(p=this.strategy)==null||p.stopCancelled(e.forceCancel):(f=this.strategy)==null||f.stopCommitted(n,r),this.clearValidationIfNoOpenEditors();for(let m of h)o.clearEditValue(m);this.bulkRefreshMap(a);for(let m of o.getEditPositions(g)){let v=G(t,m),C=Ne(m);v==null||v.refreshCell({force:!0,suppressFlash:!C})}return{res:c,edits:g}}shouldHandleMidBatchKey(e,t){var o;return e instanceof KeyboardEvent&&this.batch&&!!((o=this.strategy)!=null&&o.midBatchInputsAllowed(t))&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,o){var g,u;let{beans:i,model:r}=this,{cellCtrl:a,edits:n}=o,{key:s}=e,l=s===y.ENTER,c=s===y.ESCAPE,d=s===y.TAB;if(l||d||c){if(l||d)xt(i,{persist:!0});else if(c&&a){let{rowNode:h,column:p}=a;if(this.batch&&h&&p){let f={rowNode:h,column:p};yt(i,[f],{silent:!0}),this.model.stop(f,!0,!0),(g=G(i,f))==null||g.refreshCell(Ct)}else this.revertSingleCellEdit(a)}return this.batch?(u=this.strategy)==null||u.cleanupEditors():yt(i,r.getEditPositions(),{event:e,cancel:c}),e.preventDefault(),this.bulkRefreshMap(n,{suppressFlash:!0}),r.getEditMap()}return n}finishStopEditing({cellCtrl:e,edits:t,params:o,position:i,res:r,commit:a,forceCancel:n,willCancel:s,willStop:l}){let c=this.beans;r&&i&&(!this.batch||a)&&this.model.removeEdits(i),this.navigateAfterEdit(o,e==null?void 0:e.cellPosition),Ko(c),this.clearValidationIfNoOpenEditors();let{rowRenderer:d,formula:g}=c;if(s&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){g?g.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});let u=l&&a;(u||s&&n)&&this.dispatchBatchStopped(t,u)}}dispatchBatchStopped(e,t){let o;t&&(o=s1(e),o.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",o!=null?o:new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){var c;if(!e||!t)return;let{event:o,suppressNavigateAfterEdit:i}=e;if(!(o instanceof KeyboardEvent)||i)return;let{key:a,shiftKey:n}=o,s=this.gos.get("enterNavigatesVerticallyAfterEdit");if(a!==y.ENTER||!s)return;let l=n?y.UP:y.DOWN;(c=this.beans.navigation)==null||c.navigateToNextCell(null,l,t,!1)}processEdits(e,t){let o=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,r=[],{changeDetectionSvc:a}=this.beans;a==null||a.beginDeferred();try{for(let n of o){let s=e.get(n);for(let l of s.keys()){let c=s.get(l),d={rowNode:n,column:l};if(Ne(c)&&!i){let g=G(this.beans,d);this.setNodeDataValue(n,l,c.pendingValue,g,t)||r.push(d)}}}}finally{a==null||a.endDeferred()}return r}setNodeDataValue(e,t,o,i,r="edit"){let a=M2.has(r)?"edit":r;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,o,a)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){var i;let o=this.model.getEdit(e);o&&o.state!=="editing"&&(t?(i=this.beans.editModelSvc)==null||i.setEdit(e,{sourceValue:o.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){var i,r;(i=this.strategy)!=null||(this.strategy=this.createStrategy()),(r=this.strategy)==null||r.setEditMap(e,t),this.bulkRefreshMap(e);let o=Ct;t!=null&&t.forceRefreshOfEditCellsOnly&&(o={...L2(e),...Ct}),this.beans.rowRenderer.refreshCells(o)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;let{pendingValue:i,sourceValue:r}=o,{rowIndex:a,rowPinned:n,data:s}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:a,rowPinned:n,column:t,source:"api",data:s,newValue:i,oldValue:r,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){ee(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){ee(this.gos,this.beans.rowModel)&&e.forEach((o,i)=>{for(let r of o.keys())this.refCell({rowNode:i,column:r},o.get(r),t)})}refCell({rowNode:e,column:t},o,i={}){var g,u,h,p;let{beans:r,gos:a}=this,n=new Set([e]),s=new Set,l=e.pinnedSibling;l&&n.add(l);let c=e.sibling;c&&s.add(c);let d=e.parent;for(;d;)(g=d.sibling)!=null&&g.footer&&a.get("groupTotalRow")||!d.parent&&d.sibling&&a.get("grandTotalRow")?s.add(d.sibling):s.add(d),d=d.parent;for(let f of n)this.dispatchEditValuesChanged({rowNode:f,column:t},o);for(let f of n)(u=G(r,{rowNode:f,column:t}))==null||u.refreshCell(i);for(let f of s){let m=G(r,{rowNode:f,column:t});m&&(m.refreshCell(i),!i.force&&this.batch&&((p=(h=m.editStyleFeature)==null?void 0:h.applyCellStyles)==null||p.call(h)))}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var n;let{gos:o,beans:i}=this,r=e.rowNode;if(r.group&&e.column.getColDef().groupRowEditable==null){if(o.get("treeData")){if(!r.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}let a=Nl(o)==="fullRow"?S2(i,e,t):Xa(i,e);return a&&((n=this.strategy)!=null||(this.strategy=this.createStrategy())),a}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,r,a,n;if(this.hasValidationErrors(e)){let s=G(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(s&&!s.hasBrowserFocus()&&s.focusCell(),(n=(a=(r=s==null?void 0:s.comp)==null?void 0:r.getCellEditor())==null?void 0:a.focusIn)==null||n.call(a)),"block-stop"):(s&&this.revertSingleCellEdit(s),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,r,a,n;let o=G(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(yt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),io(this.beans,e,{silent:!0}),Rt(this.beans),o==null||o.refreshCell(Ct),t&&(o==null||o.focusCell(),(n=(a=(r=o==null?void 0:o.comp)==null?void 0:r.getCellEditor())==null?void 0:a.focusIn)==null||n.call(a)))}hasValidationErrors(e){var i;Rt(this.beans);let t=G(this.beans,e);t&&(t.refreshCell(Ct),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var s;let r,a=this.isEditing(),n=a&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Fo&&a&&(r=(s=this.strategy)==null?void 0:s.moveToNextEditingCell(e,t,o,i,n)),r===null||(r=r||!!this.beans.focusSvc.focusedHeader,r===!1&&!n&&this.stopEditing()),r}getPendingEditValue(e,t,o){var a;if(o==="data"||o==="batch"&&!this.batch)return;let i=this.model.getEdit({rowNode:e,column:t},Nt);if(!i||this.stopping&&!this.batch&&!((a=i.editorState)!=null&&a.cellStartedEditing))return;if(o==="edit"){let n=i.editorValue;if(n!=null&&n!==ae)return n}let r=i.pendingValue;if(r!==ae)return r}getCellDataValue(e){let t=this.model.getEdit(e,Nt);if(t){let o=t.pendingValue;if(o!==ae)return o;let i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){r1(this,this.beans,e)}createPopupEditorWrapper(e){return new w2(e)}batchResetToSourceValue(e){var a,n;if(!this.batch)return!1;let t=this.model.getEdit(e);if(!t)return!1;let{pendingValue:o,sourceValue:i,state:r}=t;return o===i||r==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),(a=this.beans.editModelSvc)==null||a.removeEdits(e),(n=G(this.beans,e))==null||n.refreshCell(Ct),!0)}setDataValue(e,t,o){var i;try{let r=this.batch,a=this.isEditing(r?void 0:e);if((!a||this.committing)&&!r&&!I2.has(o)||!a&&!r&&o==="paste"||o==="batch"&&!r)return;if(o==="edit"){if(a&&this.applyEditorValue(e,t))return!0;if(!r)return}if((i=this.strategy)!=null||(this.strategy=this.createStrategy()),o==="batch"||o==="edit")return this.applyDirectValue(e,t,o);let n=this.beans,s;if(r?s="ui":this.committing?s=o!=null?o:"api":s="api",!o||D2.has(o))return this.applyDirectValue(e,t,o);let l=this.applyExistingEdit(e,t,o,s);return l!==void 0?l:(uo(n,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,o,i){var a;let r=this.model.getEdit(e);if(r)return r.pendingValue===t?!1:r.sourceValue!==t?(uo(this.beans,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):((a=this.beans.editModelSvc)==null||a.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...r,pendingValue:t}),!0)}applyEditorValue(e,t){var n,s,l,c;let o=this.beans,i=G(o,e),r=(n=i==null?void 0:i.comp)==null?void 0:n.getCellEditor();return!i||!r?!1:(uo(o,e,t,"edit",void 0,{persist:!0}),(l=(s=i.editStyleFeature)==null?void 0:s.applyCellStyles)==null||l.call(s),"agSetEditValue"in r?(r.agSetEditValue(t),!0):r.refresh&&i.editCompDetails?(r.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{var g,u,h;let d=G(this.beans,e);d==null||d.focusCell(!0),(h=(u=(g=d==null?void 0:d.comp)==null?void 0:g.getCellEditor())==null?void 0:u.focusIn)==null||h.call(u)}),yt(o,[e],{silent:!0,cancel:!0}),io(o,e,{silent:!0}),Rt(o),(c=G(o,e))==null||c.refreshCell(Ct),!0))}applyDirectValue(e,t,o){var n,s,l;let i=this.beans;if(this.batch){if(o==="batch"&&((s=(n=G(i,e))==null?void 0:n.comp)!=null&&s.getCellEditor())){let{editModelSvc:c,valueSvc:d}=i,{rowNode:g,column:u}=e,h=c==null?void 0:c.getEdit(e);(h==null?void 0:h.sourceValue)===void 0&&(c==null||c.setEdit(e,{sourceValue:d.getValue(u,g,"data")})),c==null||c.setEdit(e,{pendingValue:t})}else uo(i,e,t,o,void 0,{persist:!0}),o!=="batch"&&this.cleanupEditors();return Ko(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}uo(i,e,t,o,void 0,{persist:!0});let r=G(i,e),a=this.setNodeDataValue(e.rowNode,e.column,t,r,o);return this.syncEditAfterCommit(e,a),Ko(i),(l=G(i,e))==null||l.refreshCell(a?A2:Ct),a}handleColDefChanged(e){c1(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){let{model:o}=this;if(!this.batch||!o.hasRowEdits(e.rowNode,Nt))return;let{rowNode:r}=e,{compDetails:a,valueToDisplay:n}=t;if(a){let{params:s}=a;return s.data=o.getEditRowDataValue(r,Nt),{compDetails:a}}return{valueToDisplay:n}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var r;(r=this.strategy)==null||r.dispatchCellEvent(e,t,o,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return O(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){var u,h,p;if(!o||o.length===0)return;let{beans:i,rangeSvc:r,valueSvc:a}=this,{formula:n}=i;xt(i,{persist:!0});let s=this.model.getEditMap(!0),l=(h=(u=s.get(e))==null?void 0:u.get(t))==null?void 0:h.pendingValue,c=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),c=!0);let d=(p=n==null?void 0:n.isFormula(l))!=null?p:!1;o.forEach(f=>{let m=f.columns.some(v=>v==null?void 0:v.isAllowFormula());if(r==null||r.forEachRowInRange(f,v=>{var x;let C=tt(i,v);if(C===void 0)return;let w=(x=s.get(C))!=null?x:new Map,b=l;for(let E of f.columns){if(!E)continue;let D=!!d&&E.isAllowFormula();if(this.isCellEditable({rowNode:C,column:E},"api")){let T=a.getValue(E,C,"data",!0),k=a.parseValue(E,C!=null?C:null,b,T);Number.isNaN(k)&&(k=null),w.set(E,{editorValue:void 0,pendingValue:k,sourceValue:T,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}D&&(b=n==null?void 0:n.updateFormulaByOffset({value:b,columnDelta:1}))}w.size>0&&s.set(C,w),d&&m&&(l=n==null?void 0:n.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(s),this.batch){this.cleanupEditors(),Ko(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,c&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(s)})}});let g=G(i,{rowNode:e,column:t});g&&g.focusCell(!0)}createCellStyleFeature(e){return new x2(e,this.beans)}createRowStyleFeature(e){return new k2(e,this.beans)}setEditingCells(e,t){let{beans:o}=this,{colModel:i,valueSvc:r}=o,a=new Map;for(let{colId:n,column:s,colKey:l,rowIndex:c,rowPinned:d,newValue:g,state:u}of e){let h=n?i.getCol(n):l?i.getCol(l):s;if(!h)continue;let p=tt(o,{rowIndex:c,rowPinned:d});if(!p)continue;let f=r.getValue(h,p,"data",!0);if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!Ne({pendingValue:g,sourceValue:f})&&u!=="editing")continue;let m=a.get(p);m||(m=new Map,a.set(p,m)),g===void 0&&(g=ae),m.set(h,{editorValue:void 0,pendingValue:g,sourceValue:f,state:u!=null?u:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(a,t)}onCellFocused(e){var a;let t=G(this.beans,e);if(!t||!this.isEditing(t,Nt))return;let o=this.model.getEdit(t);if(!o||!Ne(o))return;let r=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(a=this.beans.ariaAnnounce)==null||a.announceValue(r,"pendingChange")}allowedFocusTargetOnValidation(e){return G(this.beans,e)}};function L2(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 Nl(e,t){var o;return(o=t!=null?t:e.get("editType"))!=null?o:"singleCell"}var Lg=class extends S{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t,o=e.previousParams,{editSvc:i,beans:r}=this,a=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=G(r,o));let{gos:n,editModelSvc:s}=r,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){let{column:c,rowIndex:d,rowPinned:g}=e,u={column:c,rowNode:tt(r,{rowIndex:d,rowPinned:g})},h=n.get("invalidEditValueMode")==="block";if(h)return;let p=!h,f=!!(s!=null&&s.getCellValidationModel().hasCellValidation(u)),m=p&&f;(o||l?i.stopEditing(void 0,{cancel:m,source:l&&p?"api":void 0,event:a}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){let t=this.editSvc.isBatchEditing()&&!e;for(let o of this.model.getEditPositions())fi(this.beans,o,{cancel:!0},G(this.beans,o)),this.model.stop(o,t,!0);return!0}stopCommitted(e,t){var n,s,l;let o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(let c of o)i.all.push(c),((l=(s=(n=this.model.getCellValidationModel().getCellValidation(c))==null?void 0:n.errorMessages)==null?void 0:s.length)!=null?l:0)>0?i.fail.push(c):i.pass.push(c);let r=this.processValidationResults(i),a=this.editSvc.isBatchEditing()&&!t;for(let c of r.destroy)fi(this.beans,c,{event:e},G(this.beans,c)),this.model.stop(c,a,!1);for(let c of r.keep){let d=G(this.beans,c);!this.editSvc.cellEditingInvalidCommitBlocks()&&d&&this.editSvc.revertSingleCellEdit(d)}return!0}cleanupEditors({rowNode:e}={},t){xt(this.beans,{persist:!1});let o=this.model.getEditPositions(),i=[];if(e)for(let r of o)r.rowNode!==e&&i.push(r);else for(let r of o)i.push(r);yt(this.beans,i),Ko(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){let t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{let i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var r,a;return(a=(r=t==null?void 0:t.getCellEditor())==null?void 0:r.focusIn)==null?void 0:a.call(r)})}}setupEditors(e){let{event:t,ignoreEventKey:o=!1,startedEdit:i,position:r,cells:a=this.model.getEditPositions()}=e,n=t instanceof KeyboardEvent&&!o&&t.key||void 0;n1(this.beans,a,r,n,t,i)}dispatchCellEvent(e,t,o,i){let r=G(this.beans,e);r&&this.eventSvc.dispatchEvent({...r.createEvent(t!=null?t:null,o),...i})}dispatchRowEvent(e,t,o){if(o)return;let i=mr(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,o="ui"){let i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&(o==="ui"||o==="edit")?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===y.ENTER:null}shouldCancel(e,t,o="ui"){let i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===y.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});let o=[];if(e.forEach((r,a)=>{r.forEach((n,s)=>{n.state==="editing"&&o.push({...n,rowNode:a,column:s})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){let r=o.at(-1),a=r.pendingValue===ae?void 0:r.pendingValue;this.start({position:r,event:new KeyboardEvent("keydown",{key:a}),source:"api"});let n=G(this.beans,r);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},O2=class extends Lg{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,o="ui"){let{rowNode:i,beans:r}=this,{rowNode:a}=e||{};if(!mr(r,{rowNode:i}))return!0;let s=super.shouldStop({rowNode:i},t,o);return s!==null?s:i?a!==i:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){let{position:t,silent:o,startedEdit:i,event:r,ignoreEventKey:a}=e,{rowNode:n}=t,{beans:s,model:l,startedRows:c}=this;this.rowNode!==n&&super.cleanupEditors(t);let d=s.visibleCols.allCols,g=[],u=[];for(let h of d)h.isCellEditable(n)&&u.push(h);if(u.length!=0){c.has(n)||(this.dispatchRowEvent({rowNode:n},"rowEditingStarted",o),c.add(n));for(let h of u){let p={rowNode:n,column:h};g.push(p),l.start(p)}this.rowNode=n,this.setupEditors({cells:g,position:t,startedEdit:i,event:r,ignoreEventKey:a})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){let{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){let{rowNode:o,beans:i,model:r,editSvc:a}=this;if(o&&!r.hasRowEdits(o))return!1;let n=[];if(r.getEditMap().forEach((s,l)=>{if(!(!s||s.size===0)){for(let c of s.values())if(Ne(c)){n.push(l);break}}}),Rt(i),a.checkNavWithValidation({rowNode:o})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!a.isBatchEditing())for(let s of n)this.dispatchRowEvent({rowNode:s},"rowValueChanged");return this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){var l;let{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;let{beans:i,gos:r,model:a}=this;if((l=i.editSvc)!=null&&l.isRangeSelectionEnabledWhileEditing())return;let n=G(i,o);r.get("invalidEditValueMode")==="block"&&n&&(a.getCellValidationModel().getCellValidation(n)||a.getRowValidationModel().getRowValidation(n))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);let{startedRows:o}=this;for(let i of o)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);o.clear()}destroyEditorsForRow(e){var i;let t=mr(this.beans,{rowNode:e});if(!t)return;let o={};for(let r of t.getAllCellCtrls())(i=r.comp)!=null&&i.getCellEditor()&&fi(this.beans,r,o,r)}moveToNextEditingCell(e,t,o,i="ui",r=!1){var m,v,C;let{beans:a,model:n,gos:s,editSvc:l}=this,c=e.cellPosition,d;n.suspend(!0);try{d=(m=a.navigation)==null?void 0:m.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{n.suspend(!1)}if(d===!1)return null;if(d==null)return!1;let g=d.cellPosition,u=e.isCellEditable(),h=d.isCellEditable(),p=g&&c.rowIndex===g.rowIndex&&c.rowPinned===g.rowPinned;u&&this.setFocusOutOnEditor(e),this.restoreEditors();let f=s.get("suppressStartEditOnTab");return h&&!r?f?d.focusCell(!0,o):((v=d.comp)!=null&&v.getCellEditor()||io(a,d,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(d),d.focusCell(!1,o)):(h&&r&&this.setFocusInOnEditor(d),d.focusCell(!0,o)),!p&&!r&&(l==null||l.stopEditing({rowNode:e.rowNode},{event:o,forceStop:!0}),l!=null&&l.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(d,!0),f?d.focusCell(!0,o):l.startEditing(d,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:h||void 0})),(C=e.rowCtrl)==null||C.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){let{beans:e,model:t}=this;t.getEditMap().forEach((o,i)=>o.forEach(({state:r},a)=>{var s;if(r!=="editing")return;let n=G(e,{rowNode:i,column:a});n&&!((s=n.comp)!=null&&s.getCellEditor())&&io(e,n,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},H2=class extends Lg{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){let i=super.shouldStop(e,t,o);if(i!==null)return i;let r=e==null?void 0:e.rowNode,a=e==null?void 0:e.column,n=this.rowNode,s=this.column;return(!n||!s)&&r&&a?null:n!==r||s!==a?!0:!n&&!s?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){let{position:t,startedEdit:o,event:i,ignoreEventKey:r}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:o,event:i,ignoreEventKey:r})}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){let{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:r,rowPinned:a}=e,n=tt(this.beans,{rowIndex:i,rowPinned:a}),s=ja(r),l=t.getCol(s),c=e.previousParams;if(c){let d=ja(c.column);if((c==null?void 0:c.rowIndex)===i&&d===s&&(c==null?void 0:c.rowPinned)===a)return}e.type=="cellFocused"&&(o!=null&&o.isRangeSelectionEnabledWhileEditing()||o!=null&&o.isEditing({rowNode:n,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",r=!1){var f,m,v,C,w,b,x;let a=this.beans.focusSvc.getFocusedCell();a&&(e=(f=po(this.beans,a))!=null?f:e);let n=e.cellPosition,s,l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),r||(e.eGui.focus(),(v=this.editSvc)==null||v.stopEditing(e,{source:(m=this.editSvc)!=null&&m.isBatchEditing()?"ui":"api",event:o}));try{s=(C=this.beans.navigation)==null?void 0:C.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(s===!1)return null;if(s==null)return!1;let c=s.cellPosition,d=e.isCellEditable(),g=s.isCellEditable(),u=c&&n.rowIndex===c.rowIndex&&n.rowPinned===c.rowPinned;d&&!r&&this.setFocusOutOnEditor(e);let h=this.gos.get("suppressStartEditOnTab"),p=!1;if(!u&&!r&&(super.cleanupEditors(s,!0),h?s.focusCell(!0,o):(p=!0,this.editSvc.startEditing(s,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:g}))),g&&!r){if(s.focusCell(!1,o),h)s.focusCell(!0,o);else if(!((w=s.comp)!=null&&w.getCellEditor())){if(!p){let E=(b=this.editSvc)==null?void 0:b.isEditing(s,{withOpenEditor:!0});io(this.beans,s,{event:o,cellStartedEdit:!0,silent:E})}this.setFocusInOnEditor(s),this.cleanupEditors(s)}}else g&&r&&this.setFocusInOnEditor(s),s.focusCell(!0,o);return(x=e.rowCtrl)==null||x.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},Ht={moduleName:"EditCore",version:P,beans:[i1,z2],apiFunctions:{getEditingCells:g2,getEditRowValues:d2,getCellEditorInstances:a1,startEditingCell:p2,stopEditing:u2,isEditing:h2,validateEdit:f2},dynamicBeans:{singleCell:H2,fullRow:O2},dependsOn:[Tr,Dg],css:[PS]},B2={moduleName:"UndoRedoEdit",version:P,beans:[MS],apiFunctions:{undoCellEditing:l2,redoCellEditing:c2,getCurrentUndoSize:m2,getCurrentRedoSize:v2},dependsOn:[Ht]},N2={moduleName:"TextEditor",version:P,userComponents:{agCellEditor:Bl,agTextCellEditor:Bl},dependsOn:[Ht]},V2={moduleName:"NumberEditor",version:P,userComponents:{agNumberCellEditor:{classImp:KS}},dependsOn:[Ht]},G2={moduleName:"DateEditor",version:P,userComponents:{agDateCellEditor:OS,agDateStringCellEditor:NS},dependsOn:[Ht]},W2={moduleName:"CheckboxEditor",version:P,userComponents:{agCheckboxCellEditor:TS},dependsOn:[Ht]},q2={moduleName:"SelectEditor",version:P,userComponents:{agSelectCellEditor:a2},dependsOn:[Ht]},_2={moduleName:"LargeTextEditor",version:P,userComponents:{agLargeTextCellEditor:qS},dependsOn:[Ht]},U2={moduleName:"CustomEditor",version:P,dependsOn:[Ht]},Og={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},j2=new Set(Object.values(Og));function wt(e,t){let o=e.filterUi;if(!o)return null;if(o.created)return o.promise;if(t)return null;let i=o.create(o.refreshed),r=o;return r.created=!0,r.promise=i,i}function K2(e,t,o,i,r,a,n){var s;return(s=t.refresh)==null||s.call(t,{...o,model:i,source:a,additionalEventAttributes:n}),e().then(l=>{if(l){let{filter:c,filterParams:d}=l;Hg(c,d,i,r,a,n)}})}function Hg(e,t,o,i,r,a){var n;(n=e==null?void 0:e.refresh)==null||n.call(e,{...t,model:o,state:i,source:r,additionalEventAttributes:a})}function Bg(e,t,o,i){let r=e();r!=null&&r.created&&r.promise.then(a=>{var s;let n=t();Hg(a,r.filterParams,n,(s=o())!=null?s:{model:n},"ui",i)})}function Vl(e){var u,h;let t,o=!1,i,{action:r,filterParams:a,getFilterUi:n,getModel:s,getState:l,updateState:c,updateModel:d,processModelToApply:g}=e;switch(r){case"apply":{let p=l();i=(u=p==null?void 0:p.model)!=null?u:null,g&&(i=g(i)),t={state:p==null?void 0:p.state,model:i},o=!0;break}case"clear":{t={model:null},(h=a==null?void 0:a.buttons)!=null&&h.includes("apply")||(o=!0,i=null);break}case"reset":{t={model:null},o=!0,i=null;break}case"cancel":{t={model:s()};break}}c(t),o?d(i):Bg(n,s,l,{fromAction:r})}function ie(e,t){var o;return(o=e[t])!=null?o:null}var $2=class extends Hn{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,o,i,r){this.comp=e;let a=bi(this,this.beans.context,r);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setGui(t,a),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(a),this.setupLeft(a),this.setupHover(a),this.setupFocus(a),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(a),this.setupUi(),a.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(a);let n=()=>this.onColDefChanged(a);a.addManagedListeners(this.column,{colDefChanged:n}),a.addManagedEventListeners({filterSwitched:({column:s})=>{s===this.column&&n()}}),a.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.colDef;return O(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){let 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;let e=ye("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Ci(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.getLocaleTextFunc();Do(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){var n;let{beans:t}=this;if(Y(t)===this.eGui)return;let r=so(t,this.eGui,null,e.shiftKey);if(r){(n=t.headerNavigation)==null||n.scrollToColumn(this.column),e.preventDefault(),r.focus();return}let a=this.findNextColumnWithFloatingFilter(e.shiftKey);a&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:a},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleCols,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);let t=this.getWrapperHasFocus();switch(e.key){case y.UP:case y.DOWN:case y.LEFT:case y.RIGHT:if(t)return;eo(e);case y.ENTER:t&&Xt(this.eGui)&&e.preventDefault();break;case y.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&_t(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){let r=this.lastFocusEvent,a=!!(r&&r.key===y.TAB);if(r&&a){let n=r.shiftKey;Xt(this.eGui,n)}}this.focusThis()}setupHover(e){var t;(t=this.beans.colHover)==null||t.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){let t=new On(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){var e;this.suppressFilterButton=!((e=this.beans.menuSvc)!=null&&e.isFloatingFilterButtonEnabled(this.column)),this.highlightFilterButtonWhenActive=!be(this.gos)}setupUserComp(){var t;if(!this.active)return;let e=(t=this.beans.colFilter)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){var t;let e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;(t=this.beans.menuSvc)==null||t.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;let{beans:{colFilter:t},column:o,gos:i}=this,r=a=>{if((a==null?void 0:a.source)==="filterDestroyed"&&(!this.isAlive()||!(t!=null&&t.isAlive())))return;let n=this.comp.getFloatingFilterComp();n&&n.then(s=>{var l;if(s){if(i.get("enableFilterHandlers")){let g=a,u="filter";g!=null&&g.afterFloatingFilter?u="ui":g!=null&&g.afterDataChange?u="dataChanged":(a==null?void 0:a.source)==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}let c=t==null?void 0:t.getCurrentFloatingFilterParentModel(o),d=a?{...a,columns:(l=a.columns)!=null?l:[],source:a.source==="api"?"api":"columnFilter"}:null;s.onParentModelChanged(c,d)}})};[this.destroySyncListener]=e.addManagedListeners(o,{filterChanged:r}),t!=null&&t.isFilterActive(o)&&r(null)}setupWidth(e){let t=()=>{let 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(){var e;if(!this.suppressFilterButton&&this.comp){let t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){let t=this.active;this.setupActive();let o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let i=this.beans.colFilter,r=this.active?i==null?void 0:i.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,a=this.comp.getFloatingFilterComp();!a||!r?this.updateCompDetails(e,r,o):a.then(n=>{var s;!n||i!=null&&i.areFilterCompsDifferent((s=this.userCompDetails)!=null?s:null,r)?this.updateCompDetails(e,r,o):this.updateFloatingFilterParams(r,"colDef")})}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){var i;if(!e)return;let o=e.params;(i=this.comp.getFloatingFilterComp())==null||i.then(r=>{var a,n;typeof(r==null?void 0:r.refresh)=="function"&&(this.gos.get("enableFilterHandlers")&&(o={...o,model:ie((n=(a=this.beans.colFilter)==null?void 0:a.model)!=null?n:{},this.column.getColId()),source:t}),r.refresh(o))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function Y2(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}(i=e.menuSvc)==null||i.showColumnMenu({column:o,positionBy:"auto"})}function Q2(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var Z2=class extends S{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){let{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e!=null?e:t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Wl(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,o){var i;(i=this.activeMenuFactory)==null||i.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){var e,t;(e=this.beans.contextMenuSvc)==null||e.hideActiveMenu(),(t=this.activeMenuFactory)==null||t.hideActiveMenu()}hideFilterMenu(){var e;(e=Wl(this.beans))==null||e.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){var o;let{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!((o=this.activeMenuFactory)!=null&&o.isMenuEnabled(e))&&(be(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){var t;return!e.getColDef().suppressHeaderFilterButton&&!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))}isHeaderContextMenuEnabled(e){let t=e&&Mt(e)?e.getColDef():e==null?void 0:e.getColGroupDef();return!(t!=null&&t.suppressHeaderContextMenu)&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(Kt()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!be(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))&&!be(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){let e=this.gos,t=e.get("suppressMenuHide");return be(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,o,i){let{positionBy:r,onClosedCallback:a}=t,n=t.column;if(r==="button"){let{buttonElement:s}=t;e==null||e.showMenuAfterButtonClick(n,s,o,a,i)}else if(r==="mouse"){let{mouseEvent:s}=t;e==null||e.showMenuAfterMouseEvent(n,s,o,a,i)}else if(n){let s=this.beans,l=s.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(n,"auto"),pt(s,()=>{var d;let c=(d=l.getHeaderRowContainerCtrl(n.getPinned()))==null?void 0:d.getHeaderCtrlForColumn(n);c&&(e==null||e.showMenuAfterButtonClick(n,c.getAnchorElementForMenu(i),o,a,i))})}}};function Gl(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}function Wl(e){let{enterpriseMenuFactory:t,filterMenuFactory:o,gos:i}=e;return t&&be(i)?t:o}var J2={moduleName:"SharedMenu",version:P,beans:[Z2],apiFunctions:{showColumnMenu:Y2,hidePopupMenu:Q2}},X2=".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 ex(e){let t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function tx(e,t){var o,i;return(i=(o=e.filterManager)==null?void 0:o.getColumnFilterInstance(t))!=null?i:Promise.resolve(void 0)}function ox(e,t){var i;let o=e.colModel.getColDefCol(t);if(o)return(i=e.colFilter)==null?void 0:i.destroyFilter(o,"api")}function ix(e,t){e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=e.filterManager)==null?void 0:o.setFilterModel(t)})}function rx(e){var t,o;return(o=(t=e.filterManager)==null?void 0:t.getFilterModel())!=null?o:{}}function ax(e,t,o){var s;let{gos:i,colModel:r,colFilter:a}=e;o&&!i.get("enableFilterHandlers")&&(R(288),o=!1);let n=r.getColDefCol(t);return n&&(s=a==null?void 0:a.getModelForColumn(n,o))!=null?s:null}function nx(e,t,o){var i,r;return(r=(i=e.filterManager)==null?void 0:i.setColumnFilterModel(t,o))!=null?r:Promise.resolve()}function sx(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}(i=e.menuSvc)==null||i.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"})}function lx(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function cx(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}return(i=e.colFilter)==null?void 0:i.getHandler(o,!0)}function dx(e,t){let{colModel:o,colFilter:i,gos:r}=e;if(!r.get("enableFilterHandlers")){R(287);return}let{colId:a,action:n}=t;if(a){let s=o.getColById(a);s&&(i==null||i.updateModel(s,n))}else i==null||i.updateAllModels(n)}var ql={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},_l=["january","february","march","april","may","june","july","august","september","october","november","december"];function gx(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function ux(e,t){if(e==null)return-1;if(t==null)return 1;let o=Se(e),i=Se(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:String(e).localeCompare(String(t))}function Ul(e){return e instanceof Date&&!isNaN(e.getTime())}var en={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:Ul}),dateString:({dataTypeDefinition:e})=>({comparator:(t,o)=>{let i=e.dateParser(o);return o==null||it?1:0},isValidDate:t=>typeof t=="string"&&Ul(e.dateParser(t))}),dateTime:e=>en.date(e),dateTimeString:e=>en.dateString(e),object:()=>{},text:()=>{}},tn={number:()=>({comparator:gx}),bigint:()=>({comparator:ux}),boolean:({t:e})=>({valueFormatter:t=>I(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:o=>{let i=e(o);return I(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(o,i)=>{if(o==="NaN")return t("invalidDate","Invalid Date");if(i===1&&o!=null){let r=_l[Number(o)-1];return t(r,ql[r])}return o!=null?o:t("blanks","(Blanks)")},treeListPathGetter:o=>Ai(o,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:o})=>({valueFormatter:i=>{let r=e(i);return I(r)?r:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>Ai(t.dateParser(i!=null?i:void 0),!1),treeListFormatter:(i,r)=>{if(r===1&&i!=null){let a=_l[Number(i)-1];return o(a,ql[a])}return i!=null?i:o("blanks","(Blanks)")}}),dateTime:e=>{let t=tn.date(e);return t.treeListPathGetter=Ai,t},dateTimeString(e){let t=e.dataTypeDefinition.dateParser,o=tn.dateString(e);return o.treeListPathGetter=i=>Ai(t(i!=null?i:void 0)),o},object:({formatValue:e,t})=>({valueFormatter:o=>{let i=e(o);return I(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function hx(e,t,o,i,r,a,n){let s=t,l=o,c=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!c&&(l=({column:h,node:p})=>r({column:h,node:p,value:a.valueSvc.getValue(h,p,"data")}));let g=(c?tn:en)[i.baseDataType],u=g({dataTypeDefinition:i,formatValue:r,t:n});return s=typeof t=="object"?{...u,...t}:u,{filterParams:s,filterValueGetter:l}}var px={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},fx={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function mx(e,t=!1){return(t?fx:px)[e!=null?e:"text"]}function vx(e,t,o){if(t==null)return null;let i=null,{compName:r,jsComp:a,fwComp:n}=Yc(e,t);return r?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[r]:a==null&&n==null&&t.filter===!0&&(i=o()),i}var Cx={filterHandler:()=>({doesFilterPass:()=>!0})};function jl(e,t,o,i){if(!e.isPrimary())return!0;let a=!o;return!e.isValueActive()||!a?!1:t?!0:i}var wx=class extends S{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={...Og},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){var o,i,r;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));let e=this.gos,t={...(r=(i=(o=e.get("initialState"))==null?void 0:o.filter)==null?void 0:i.filterModel)!=null?r:{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",o){let{colModel:i,dataTypeSvc:r,filterManager:a}=this.beans;if(r!=null&&r.isPendingInference){this.modelUpdates.push({model:e,source:t});return}let n=[],s=this.getModel(!0);if(e){let l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{let g=e[d];n.push(this.setModelOnFilterWrapper(c,g)),l.delete(d)}),l.forEach(c=>{let d=i.getColDefCol(c)||i.getCol(c);if(!d){R(62,{colId:c});return}if(!d.isFilterAllowed()){R(63,{colId:c});return}let g=this.getOrCreateFilterWrapper(d,!0);if(!g){R(64,{colId:c});return}n.push(this.setModelOnFilterWrapper(g,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{n.push(this.setModelOnFilterWrapper(l,null))});$.all(n).then(()=>{let l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,g)=>{let u=s?s[g]:null,h=l?l[g]:null;ii(u,h)||c.push(d.column)}),c.length>0?a==null||a.onFilterChanged({columns:c,source:t}):o&&this.updateActive("filterChanged")})}getModel(e){var a;let t={},{allColumnFilters:o,initialModel:i,beans:{colModel:r}}=this;if(o.forEach((n,s)=>{let l=this.getModelFromFilterWrapper(n);I(l)&&(t[s]=l)}),!e)for(let n of Object.keys(i)){let s=i[n];I(s)&&!o.has(n)&&((a=r.getCol(n))!=null&&a.isFilterAllowed())&&(t[n]=s)}return t}setState(e,t,o="api"){if(this.state.clear(),t)for(let i of Object.keys(t)){let r=t[i];this.state.set(i,{model:ie(this.model,i),state:r})}this.setModel(e,o,!0)}getState(){let e=this.state;if(!e.size)return;let t={},o=!1;return e.forEach((i,r)=>{let a=i.state;a!=null&&(o=!0,t[r]=a)}),o?t:void 0}getModelFromFilterWrapper(e){let o=e.column.getColId();if(e.isHandler)return ie(this.model,o);let i=e.filter;return i?typeof i.getModel!="function"?(R(66),null):i.getModel():ie(this.initialModel,o)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};let{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){let e=l=>l?l.isFilterActive?l.isFilterActive():(R(67),!1):!1,{colModel:t,gos:o}=this.beans,i=!!tr(o),r=[],a=[],n=(l,c,d)=>{c&&(jl(l,t.isPivotMode(),t.isPivotActive(),i)?r.push(d):a.push(d))},s=[];return this.allColumnFilters.forEach(l=>{let c=l.column,d=c.getColId();if(l.isHandler)s.push($.resolve().then(()=>{n(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{let g=wt(l);g&&s.push(g.then(u=>{n(c,e(u),{colId:d,isHandler:!1,comp:u})}))}}),$.all(s).then(()=>{this.activeAggregateFilters=r,this.activeColumnFilters=a})}updateFilterFlagInColumns(e,t){var i;let o=[];return this.allColumnFilters.forEach(r=>{let a=r.column;if(r.isHandler)o.push($.resolve().then(()=>{this.setColFilterActive(a,this.isHandlerActive(a),e,t)}));else{let n=wt(r);n&&o.push(n.then(s=>{this.setColFilterActive(a,s.isFilterActive(),e,t)}))}}),(i=this.beans.groupFilter)==null||i.updateFilterFlags(e,t),$.all(o)}doFiltersPass(e,t,o){let{data:i,aggData:r}=e,a=o?this.activeAggregateFilters:this.activeColumnFilters,n=o?r:i,s=this.model;for(let l=0;l{this.isAlive()&&(o==null||o.onFilterChanged(e))};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){let{column:t,additionalEventAttributes:o}=e,i=t==null?void 0:t.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(r=>{var s,l,c;let{column:a,isHandler:n}=r;i!==a.getColId()&&(n&&((l=(s=r.handler).onAnyFilterChanged)==null||l.call(s)),(c=wt(r,n))==null||c.then(d=>{typeof(d==null?void 0:d.onAnyFilterChanged)=="function"&&d.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var t;return!((t=this.gos.get("allowShowChangeAfterFilter"))!=null?t:!1)&&this.processingFilterChange}onNewRowsLoaded(e){let t=[];this.allColumnFilters.forEach(o=>{var a,n;let i=o.isHandler;i&&((n=(a=o.handler).onNewRowsLoaded)==null||n.call(a));let r=wt(o,i);r&&t.push(r.then(s=>{var l;(l=s.onNewRowsLoaded)==null||l.call(s)}))}),$.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){let{filterValueSvc:o,colModel:i}=this.beans;return(r,a)=>{let n=a?i.getCol(a):e;return n?o.getValue(n,r,t):void 0}}isFilterActive(e){let t=this.cachedFilter(e);if(t!=null&&t.isHandler)return this.isHandlerActive(e);let o=t==null?void 0:t.filter;return o?o.isFilterActive():ie(this.initialModel,e.getColId())!=null}isHandlerActive(e){let t=I(ie(this.model,e.getColId()));if(t)return t;let o=this.beans.groupFilter;return o!=null&&o.isGroupFilter(e)?o.isFilterActive(e):!1}getOrCreateFilterUi(e){let t=this.getOrCreateFilterWrapper(e,!0);return t?wt(t):null}getFilterUiForDisplay(e){let t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;let o=wt(t);return o?o.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){let o=this.getOrCreateFilterWrapper(e,t);return o!=null&&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(()=>{var o;return(o=this.beans.dataTypeSvc)==null?void 0:o.getBaseDataType(e)},t)}getDefaultFilterFromDataType(e,t=!1){return Nh(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":mx(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,o,i,r,a){let n=()=>{let c=this.createFilterCompParams(e,r,a),d=i(c,r);return _p(this.beans.userCompFactory,t,d,o)},s=n();return s?{compDetails:s,createFilterUi:c=>(c?n():s).newAgStackInstance()}:null}createFilterInstance(e,t,o,i){var g,u,h;let r=this.beans.selectableFilter;r!=null&&r.isSelectable(t)&&(t=r.getFilterDef(e,t));let{handler:a,handlerParams:n,handlerGenerator:s}=(g=this.createHandler(e,t,o))!=null?g:{},l=this.createFilterComp(e,t,o,i,!!a,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:a,handlerGenerator:s,handlerParams:n};let{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&((h=(u=c.params)==null?void 0:u.buttons)!=null&&h.length||R(281,{colId:e.getColId()})),{compDetails:c,handler:a,handlerGenerator:s,handlerParams:n,createFilterUi:d}}createBaseFilterParams(e,t){let{filterManager:o,rowModel:i}=this.beans;return O(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:r=>{var a;return(a=o==null?void 0:o.doesRowPassOtherFilters(e.getColId(),r))!=null?a:!0},rowModel:i})}createFilterCompParams(e,t,o,i){var n;let r=this.filterChangedCallbackFactory(e),a=this.createBaseFilterParams(e,i);if(a.filterChangedCallback=r,a.filterModifiedCallback=i?()=>{}:s=>this.filterModified(e,s),t){let s=a,l=e.getColId(),c=ie(this.model,l);s.model=c,s.state=(n=this.state.get(l))!=null?n:{model:c},s.onModelChange=(d,g)=>{this.updateStoredModel(l,d),this.refreshHandlerAndUi(e,d,"ui",!1,g).then(()=>{r({...g,source:"columnFilter"})})},s.onStateChange=d=>{this.updateState(e,d),this.updateOrRefreshFilterUi(e)},s.onAction=(d,g,u)=>{this.updateModel(e,d,g),this.dispatchLocalEvent({type:"filterAction",column:e,action:d,event:u})},s.getHandler=()=>this.getHandler(e,!0),s.onUiChange=d=>this.filterUiChanged(e,d),s.source=o}return a}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,o){let i=t(),r={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(o),r}createFilterWrapper(e){var s;let{compDetails:t,handler:o,handlerGenerator:i,handlerParams:r,createFilterUi:a}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),n=e.getColId();if(o)return delete this.initialModel[n],(s=o.init)==null||s.call(o,{...r,source:"init",model:ie(this.model,n)}),{column:e,isHandler:!0,handler:o,handlerGenerator:i,handlerParams:r,filterUi:this.createFilterUiForHandler(t,a)};if(a){let l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,a,c=>{l.filter=c!=null?c:void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,o){var h;let{gos:i,frameworkOverrides:r,registry:a}=this.beans,n,s=p=>{let f=p.filter;if(jc(f)){let m=f.handler;return m||(n=f.doesFilterPass,n?()=>({doesFilterPass:n}):void 0)}return typeof f=="string"?f:void 0},l=i.get("enableFilterHandlers"),c=l?s(t):void 0,d=p=>()=>this.createBean(a.createDynamicBean(p,!0)),g,u;if(typeof c=="string"){let p=(h=i.get("filterHandlers"))==null?void 0:h[c];p!=null?g=p:j2.has(c)&&(g=d(c),u=c)}else g=c;if(!g){let p,{compName:f,jsComp:m,fwComp:v}=Yc(r,t);f?p=f:m==null&&v==null&&t.filter===!0&&(p=o),u=this.handlerMap[p],u&&(g=d(u))}return g?{filterHandler:g,handlerNameOrCallback:n!=null?n:u}:l?(ee(i)&&R(277,{colId:e.getColId()}),Cx):void 0}createHandler(e,t,o){let i=this.createHandlerFunc(e,t,o);if(!i)return;let r=_r(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:a,filterHandler:n}=i,{handler:s,handlerParams:l}=this.createHandlerFromFunc(e,n,r);return{handler:s,handlerParams:l,handlerGenerator:a!=null?a:n}}createHandlerFromFunc(e,t,o){let i=e.getColDef(),r=t(O(this.gos,{column:e,colDef:i})),a=this.createHandlerParams(e,o);return{handler:r,handlerParams:a}}createHandlerParams(e,t){let o=e.getColDef(),i=e.getColId(),r=this.filterChangedCallbackFactory(e);return O(this.gos,{colDef:o,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:a=>{var n,s;return(s=(n=this.beans.filterManager)==null?void 0:n.doesRowPassOtherFilters(i,a))!=null?s:!0},onModelChange:(a,n)=>{this.updateStoredModel(i,a),this.refreshHandlerAndUi(e,a,"handler",!1,n).then(()=>{r({...n,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){let e=[],{colModel:t,filterManager:o,groupFilter:i}=this.beans;this.allColumnFilters.forEach((a,n)=>{let s;a.column.isPrimary()?s=t.getColDefCol(n):s=t.getCol(n),!(s&&s===a.column)&&(e.push(a.column),this.disposeFilterWrapper(a,"columnChanged"),this.disposeColumnListener(n))});let r=i&&e.every(a=>i.isGroupFilter(a));e.length>0&&!r&&(o==null||o.onFilterChanged({columns:e,source:"api"}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;let o=this.beans.groupFilter;return o!=null&&o.isGroupFilter(e)?o.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){var h;let{userCompFactory:o,frameworkOverrides:i,selectableFilter:r,gos:a}=this.beans,n=p=>{let f=this.getOrCreateFilterUi(e);f==null||f.then(m=>{p(oo(m))})},s=e.getColDef(),l=r!=null&&r.isSelectable(s)?r.getFilterDef(e,s):s,c=(h=vx(i,l,()=>this.getDefaultFloatingFilter(e)))!=null?h:"agReadOnlyFloatingFilter",d=a.get("enableFilterHandlers"),g=_r(o,l,this.createFilterCompParams(e,d,"init",!0)),u=O(a,{column:e,filterParams:g,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(d){let p=u,f=e.getColId(),m=this.filterChangedCallbackFactory(e);p.onUiChange=v=>this.floatingFilterUiChanged(e,v),p.model=ie(this.model,f),p.onModelChange=(v,C)=>{this.updateStoredModel(f,v),this.refreshHandlerAndUi(e,v,"floating",!0,C).then(()=>{m({...C,source:"columnFilter"})})},p.getHandler=()=>this.getHandler(e,!0),p.source="init"}return Kp(o,s,u,c)}getCurrentFloatingFilterParentModel(e){var t;return this.getModelFromFilterWrapper((t=this.cachedFilter(e))!=null?t:{column:e})}destroyFilterUi(e,t,o,i){let r="paramsUpdated";if(e.isHandler){let a=t.getColId();delete this.initialModel[a],this.state.delete(a);let n=e.filterUi,s=this.createFilterUiForHandler(o,i);e.filterUi=s;let l=this.eventSvc;n!=null&&n.created?n.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:r,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:r,column:t})}else this.destroyFilter(t,r)}destroyFilter(e,t="api"){let o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialModel[o],i&&this.disposeFilterWrapper(i,t).then(r=>{var a;r&&this.isAlive()&&((a=this.beans.filterManager)==null||a.onFilterChanged({columns:[e],source:"api"}))})}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let o=!1,{column:i,isHandler:r,filterUi:a}=e,n=i.getColId();r&&(o=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[n],this.state.delete(n));let s=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(n),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(a){if(a.created)return a.promise.then(l=>(o=r?o:!!(l!=null&&l.isFilterActive()),this.destroyBean(l),s(),o));s()}return $.resolve(o)}filterChangedCallbackFactory(e){return t=>{var o;this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:(o=t==null?void 0:t.source)!=null?o:"columnFilter"})}}filterParamsChanged(e,t="api"){var m,v,C,w,b,x,E,D,T,k;let o=this.allColumnFilters.get(e);if(!o)return;let i=this.beans,r=o.column,a=r.getColDef(),n=r.isFilterAllowed(),s=this.getDefaultFilter(r),l=i.selectableFilter,c=l!=null&&l.isSelectable(a)?l.getFilterDef(r,a):a,d=n?this.createHandlerFunc(r,c,this.getDefaultFilter(r)):void 0,g=!!d,u=o.isHandler;if(u!=g){this.destroyFilter(r,"paramsUpdated");return}let{compDetails:h,createFilterUi:p}=(m=n?this.createFilterComp(r,c,s,F=>F,g,"colDef"):null)!=null?m:{compDetails:null,createFilterUi:null},f=(v=h==null?void 0:h.params)!=null?v:_r(i.userCompFactory,c,this.createFilterCompParams(r,g,"colDef"));if(u){let F=(C=d==null?void 0:d.handlerNameOrCallback)!=null?C:d==null?void 0:d.filterHandler,z=ie(this.model,e);if(o.handlerGenerator!=F){let L=o.handler,{handler:H,handlerParams:j}=this.createHandlerFromFunc(r,d.filterHandler,f);o.handler=H,o.handlerParams=j,o.handlerGenerator=F,delete this.model[e],(w=H.init)==null||w.call(H,{...j,source:"init",model:null}),this.destroyBean(L),z!=null&&((b=this.beans.filterManager)==null||b.onFilterChanged({columns:[r],source:t}))}else{let L=this.createHandlerParams(r,h==null?void 0:h.params);o.handlerParams=L,(E=(x=o.handler).refresh)==null||E.call(x,{...L,source:"colDef",model:z})}}if(this.areFilterCompsDifferent((T=(D=o.filterUi)==null?void 0:D.compDetails)!=null?T:null,h)||!o.filterUi||!h){this.destroyFilterUi(o,r,h,p);return}o.filterUi.filterParams=f,(k=wt(o,u))==null||k.then(F=>{(F!=null&&F.refresh?F.refresh(f):!0)===!1?this.destroyFilterUi(o,r,h,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:r,params:f})})}refreshHandlerAndUi(e,t,o,i,r){var c;let a=this.cachedFilter(e);if(!a)return i&&this.getOrCreateFilterWrapper(e,!0),$.resolve();if(!a.isHandler)return $.resolve();let{filterUi:n,handler:s,handlerParams:l}=a;return K2(()=>{if(n){let{created:d,filterParams:g}=n;if(d)return n.promise.then(u=>u?{filter:u,filterParams:g}:void 0);n.refreshed=!0}return $.resolve(void 0)},s,l,t,(c=this.state.get(e.getColId()))!=null?c:{model:t},o,r)}setColumnFilterWrapper(e,t){let 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;let{componentClass:o}=e,{componentClass:i}=t;return!(o===i||(o==null?void 0:o.render)&&(i==null?void 0:i.render)&&o.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){let t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);let o=this.getOrCreateFilterUi(t);return o?new Promise(i=>{o.then(r=>{i(oo(r))})}):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){var i;if(t){let{state:r,model:a}=this,n=e.getColId(),s=r.get(n);return s?(i=s.model)!=null?i:null:ie(a,n)}let o=this.cachedFilter(e);return o?this.getModelFromFilterWrapper(o):null}setModelForColumn(e,t){var o;if((o=this.beans.dataTypeSvc)!=null&&o.isPendingInference){let i=()=>{},r=new Promise(a=>{i=a});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),r}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(r=>i(r))})}getStateForColumn(e){var t;return(t=this.state.get(e))!=null?t:{model:ie(this.model,e)}}setModelForColumnLegacy(e,t){let o=this.beans.colModel.getColDefCol(e),i=o?this.getOrCreateFilterWrapper(o,!0):null;return i?this.setModelOnFilterWrapper(i,t):$.resolve()}setColDefPropsForDataType(e,t,o){var d,g;let i=e.filter,r=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof r!="string")return;let a,n,s=this.beans,{filterParams:l,filterValueGetter:c}=e;r==="agMultiColumnFilter"?{filterParams:a,filterValueGetter:n}=(g=(d=s.multiFilter)==null?void 0:d.getParamsForDataType(l,c,t,o))!=null?g:{}:{filterParams:a,filterValueGetter:n}=hx(r,l,c,t,o,s,this.getLocaleTextFunc()),e.filterParams=a,n&&(e.filterValueGetter=n)}setColFilterActive(e,t,o,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,i)}setModelOnFilterWrapper(e,t,o){return new $(i=>{if(e.isHandler){let a=e.column,n=a.getColId(),s=this.model[n];if(this.updateStoredModel(n,t),o&&t===s){i();return}this.refreshHandlerAndUi(a,t,"api").then(()=>i());return}let r=wt(e);if(r){r.then(a=>{if(typeof(a==null?void 0:a.setModel)!="function"){R(65),i();return}(a.setModel(t)||$.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){I(t)?this.model[e]=t:delete this.model[e];let o=this.state.get(e),i={model:t,state:o==null?void 0:o.state};this.state.set(e,i)}filterModified(e,t){var o;(o=this.getOrCreateFilterUi(e))==null||o.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,o){var n,s;let i=e.getColId(),r=this.cachedFilter(e),a=()=>r==null?void 0:r.filterUi;Vl({action:t,filterParams:(n=r==null?void 0:r.filterUi)==null?void 0:n.filterParams,getFilterUi:a,getModel:()=>ie(this.model,i),getState:()=>this.state.get(i),updateState:l=>this.updateState(e,l),updateModel:l=>{var c,d;return(d=(c=a())==null?void 0:c.filterParams)==null?void 0:d.onModelChange(l,{...o,fromAction:t})},processModelToApply:r!=null&&r.isHandler?(s=r.handler.processModelToApply)==null?void 0:s.bind(r.handler):void 0})}updateAllModels(e,t){let o=[];this.allColumnFilters.forEach((i,r)=>{var n,s;let a=this.beans.colModel.getColDefCol(r);a&&Vl({action:e,filterParams:(n=i.filterUi)==null?void 0:n.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>ie(this.model,r),getState:()=>this.state.get(r),updateState:l=>this.updateState(a,l),updateModel:l=>{this.updateStoredModel(r,l),this.dispatchLocalEvent({type:"filterAction",column:a,action:e}),o.push(this.refreshHandlerAndUi(a,l,"ui"))},processModelToApply:i!=null&&i.isHandler?(s=i.handler.processModelToApply)==null?void 0:s.bind(i.handler):void 0})}),o.length&&$.all(o).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){let t=e.getColId();Bg(()=>{var o;return(o=this.cachedFilter(e))==null?void 0:o.filterUi},()=>ie(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(){var r;let{state:e,model:t,activeFilterComps:o}=this;for(let a of o)if(a.source==="COLUMN_MENU")return!1;let i=!1;for(let a of e.keys()){let n=e.get(a);if(n.valid===!1)return!1;((r=n.model)!=null?r:null)!==ie(t,a)&&(i=!0)}return i}hasUnappliedModel(e){var i,r;let{model:t,state:o}=this;return((r=(i=o.get(e))==null?void 0:i.model)!=null?r:null)!==ie(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;let o=this.beans.filterPanelSvc;return o!=null&&o.isActive?!!o.getState(e.getColId()):!1}onPivotModeChanged(e){let{colModel:t,pivotColsSvc:o}=this.beans,i=!!tr(this.gos),r=e.currentValue,a=r?this.activeColumnFilters:this.activeAggregateFilters,n=r?this.activeAggregateFilters:this.activeColumnFilters,s=[];for(let l of a){let c=t.getColById(l.colId),d=r&&!!(o!=null&&o.columns.length);c&&r===jl(c,r,d,i)&&(n.push(l),s.push(l))}Cu(a,s)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function bx(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function yx(e,t="api"){var o;(o=e.filterManager)==null||o.onFilterChanged({source:t})}var Sx=class extends S{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){let e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});let{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){let e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){let t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,o="api"){var i;this.isAdvFilterEnabled()||(i=this.colFilter)==null||i.setState(e,t,o)}setFilterModel(e,t="api",o){var i;if(this.isAdvFilterEnabled()){o||this.warnAdvFilters();return}(i=this.colFilter)==null||i.setModel(e,t)}getFilterModel(){var e,t;return(t=(e=this.colFilter)==null?void 0:e.getModel())!=null?t:{}}getFilterState(){var e;return(e=this.colFilter)==null?void 0:e.getState()}isColumnFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.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){var t,o;e?(t=this.colFilter)!=null&&t.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):(o=this.advancedFilter)!=null&&o.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){var e;return!!((e=this.advancedFilter)!=null&&e.isEnabled())}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){tr(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:o,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):$.resolve()).then(()=>{var a;let r={source:t,type:"filterChanged",columns:i};o&&he(r,o),this.eventSvc.dispatchEvent(r),(a=this.colFilter)==null||a.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.colFilter)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilter)!=null&&e.isFilterPresent())}updateAggFiltering(){this.aggFiltering=!!tr(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){var o;let{rowNode:t}=e;return(o=this.alwaysPassFilter)!=null&&o.call(this,t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){var o;let{rowNode:t}=e;return(o=this.alwaysPassFilter)!=null&&o.call(this,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){var t;return this.isAdvFilterEnabled()?!1:!!((t=this.colFilter)!=null&&t.isFilterAllowed(e))}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){var o;if(this.isAdvFilterEnabled()){if((o=this.beans.dataTypeSvc)!=null&&o.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e!=null?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(){var e;return this.isAdvFilterEnabled()?!1:!!((e=this.colFilter)!=null&&e.hasFloatingFilters())}getColumnFilterInstance(e){var t,o;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):(o=(t=this.colFilter)==null?void 0:t.getFilterInstance(e))!=null?o:Promise.resolve(void 0)}warnAdvFilters(){R(68)}setupAdvFilterHeaderComp(e){var t;(t=this.advancedFilter)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(let e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){var o,i;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):(i=(o=this.colFilter)==null?void 0:o.setModelForColumn(e,t))!=null?i:Promise.resolve()}};function xx(e){return{tag:"div",cls:e}}var kx=class extends _{constructor(e){let{className:t="ag-filter-apply-panel"}=e!=null?e:{};super(xx(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){let o=this.buttons;if(this.buttons=e,o===e)return;let i=this.getGui();ne(i);let r;this.destroyListeners();let a=document.createDocumentFragment(),n=this.className,s=({type:c,label:d})=>{let g=v=>{this.dispatchLocalEvent({type:c,event:v})};["apply","clear","reset","cancel"].includes(c)||R(75);let u=c==="apply",p=oe({tag:"button",attrs:{type:u&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${n}-button${u?" "+n+"-apply-button":""}`,children:d});this.activateTabIndex([p]),u&&(r=p);let f=v=>{v.key===y.ENTER&&(v.preventDefault(),g(v))},m=this.listeners;p.addEventListener("click",g),m.push(()=>p.removeEventListener("click",g)),p.addEventListener("keydown",f),m.push(()=>p.removeEventListener("keydown",f)),a.append(p)};for(let c of e)s(c);this.eApply=r;let l=this.validationTooltipFeature;r&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!r&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(a)}getApplyButton(){return this.eApply}updateValidity(e,t=null){var i;let o=this.eApply;o&&(ni(o,!e),this.validationMessage=t,(i=this.validationTooltipFeature)==null||i.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(let e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}};var Rx=class extends _{constructor(e,t,o,i,r,a){super(),this.column=e,this.wrapper=t,this.eventParent=o,this.updateModel=i,this.isGlobalButtons=r,this.enableGlobalButtonCheck=a,this.hidePopup=null,this.applyActive=!1}postConstruct(){let{comp:e,params:t}=this.wrapper,o=t,i=o.useForm,r=i?"form":"div";this.setTemplate({tag:r,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:a=>{a==null||a.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=o,this.resetButtonsPanel(o),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:a,params:n})=>{a===this.column&&this.resetButtonsPanel(n,this.params)},filterStateChanged:({column:a,state:n})=>{var s;a===this.column&&((s=this.eButtons)==null||s.updateValidity(n.valid!==!1))},filterAction:({column:a,action:n,event:s})=>{a===this.column&&this.afterAction(n,s)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:a})=>{if(a!==this.isGlobalButtons){this.isGlobalButtons=a;let n=this.params;this.resetButtonsPanel(n,n,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,o){let{buttons:i,readOnly:r}=t!=null?t:{},{buttons:a,readOnly:n,useForm:s}=e;if(!o&&r===n&&ii(i,a))return;let l=a&&a.length>0&&!e.readOnly&&!this.isGlobalButtons,c=this.eButtons;if(l){let d=a.map(g=>{let u=`${g}Filter`;return{type:g,label:Be(this,u)}});if(this.applyActive=Er(this.params),!c){c=this.createBean(new kx),this.appendChild(c.getGui());let g=this.column,u=h=>({event:p})=>{this.updateModel(g,h,{fromButtons:!0}),this.afterAction(h,p)};c==null||c.addManagedListeners(c,{apply:u("apply"),clear:u("clear"),reset:u("reset"),cancel:u("cancel")}),this.eButtons=c}c.updateButtons(d,s)}else this.applyActive=!1,c&&(De(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){let t=this.hidePopup;if(!t)return;let o=e,i=o==null?void 0:o.key,r;(i===y.ENTER||i===y.SPACE)&&(r={keyboardEvent:o}),t(r),this.hidePopup=null}afterAction(e,t){let{params:o,applyActive:i}=this,r=o==null?void 0:o.closeOnApply;switch(e){case"apply":{t==null||t.preventDefault(),r&&i&&this.close(t);break}case"reset":{r&&i&&this.close();break}case"cancel":{r&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===y.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},Ex=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",Fx={tag:"div",cls:"ag-filter"},Dx=class extends _{constructor(e,t,o){super(Fx),this.column=e,this.source=t,this.enableGlobalButtonCheck=o,this.wrapper=null}postConstruct(){var e;(e=this.beans.colFilter)==null||e.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){var e,t;return(t=(e=this.wrapper)==null?void 0:e.then(o=>o.comp))!=null?t:null}afterInit(){var e,t;return(t=(e=this.wrapper)==null?void 0:e.then(()=>{}))!=null?t:$.resolve()}afterGuiAttached(e){var t;this.afterGuiAttachedParams=e,(t=this.wrapper)==null||t.then(o=>{var i,r,a;(i=this.comp)==null||i.afterGuiAttached(e),(a=(r=o==null?void 0:o.comp)==null?void 0:r.afterGuiAttached)==null||a.call(r,e)})}afterGuiDetached(){var e;(e=this.wrapper)==null||e.then(t=>{var o,i;(i=(o=t==null?void 0:t.comp)==null?void 0:o.afterGuiDetached)==null||i.call(o)})}createFilter(e){var a;let{column:t,source:o,beans:{colFilter:i}}=this,r=(a=i.getFilterUiForDisplay(t))!=null?a:null;this.wrapper=r,r==null||r.then(n=>{var d;if(!n)return;let{isHandler:s,comp:l}=n,c;if(s){let g=!!this.enableGlobalButtonCheck,u=this.createBean(new Rx(t,n,i,i.updateModel.bind(i),g&&i.isGlobalButtons,g));this.comp=u,c=u.getGui()}else this.registerCSS(Ex),c=l.getGui(),I(c)||R(69,{guiFromFilter:c});this.appendChild(c),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()}):(d=l.afterGuiAttached)==null||d.call(l,this.afterGuiAttachedParams)})}onFilterDestroyed(e){let{source:t,column:o}=e;(t==="api"||t==="paramsUpdated")&&o.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(ne(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){var e;(e=this.beans.colFilter)==null||e.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()}},Mx=class extends S{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){var e;(e=this.hidePopup)==null||e.call(this)}showMenuAfterMouseEvent(e,t,o,i){e&&!e.isColumn||this.showPopup(e,r=>{var a;(a=this.popupSvc)==null||a.positionPopupUnderMouseEvent({additionalParams:{column:e},type:o,mouseEvent:t,ePopup:r})},o,t.target,be(this.gos),i)}showMenuAfterButtonClick(e,t,o,i){if(e&&!e.isColumn)return;let r=-1,a="left",n=be(this.gos);!n&&this.gos.get("enableRtl")&&(r=1,a="right");let s=n?void 0:4*r,l=n?void 0:4;this.showPopup(e,c=>{var d;(d=this.popupSvc)==null||d.positionPopupByComponent({type:o,eventSource:t,ePopup:c,nudgeX:s,nudgeY:l,alignSide:a,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},o,t,n,i)}showPopup(e,t,o,i,r,a){var f;let n=e?this.createBean(new Dx(e,"COLUMN_MENU")):void 0;if(this.activeMenu=n,!(n!=null&&n.hasFilter())||!e){W(57);return}let s=oe({tag:"div",cls:`ag-menu${r?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(s,{keydown:m=>this.trapFocusWithin(m,s)}),s.appendChild(n==null?void 0:n.getGui());let l,c=()=>n==null?void 0:n.afterGuiDetached(),d=Vh(this.gos)?i!=null?i:this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,g=m=>{Gl(e,!1,"contextMenu");let v=m instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),v&&i&&Ie(i)){let C=id(i);C==null||C.focus({preventScroll:!0})}c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),a==null||a()},u=this.getLocaleTextFunc(),h=r&&o!=="columnFilter"?u("ariaLabelColumnMenu","Column Menu"):u("ariaLabelColumnFilter","Column Filter"),p=(f=this.popupSvc)==null?void 0:f.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:g,positionCallback:()=>t(s),anchorToElement:d,ariaLabel:h});p&&(this.hidePopup=l=p.hideFunc),n.afterInit().then(()=>{t(s),n.afterGuiAttached({container:o,hidePopup:l})}),Gl(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==y.TAB||e.defaultPrevented||so(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Xt(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o!=null?o:null,columnGroup:null})}isMenuEnabled(e){var t;return e.isFilterAllowed()&&((t=e.getColDef().menuTabs)!=null?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},Px=class extends S{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,o){var c;if(!t)return;let i=e.getColDef(),{selectableFilter:r,valueSvc:a,formula:n}=this.beans,s=(c=o!=null?o:r==null?void 0:r.getFilterValueGetter(e.getColId()))!=null?c:i.filterValueGetter;if(s)return this.executeFilterValueGetter(s,t.data,e,t,i);let l=a.getValue(e,t,"data");return e.isAllowFormula()&&(n!=null&&n.isFormula(l))?n.resolveValue(e,t):l}executeFilterValueGetter(e,t,o,i,r){let{expressionSvc:a,valueSvc:n}=this.beans,s=O(this.gos,{data:t,node:i,column:o,colDef:r,getValue:n.getValueCallback.bind(n,i)});return typeof e=="function"?e(s):a==null?void 0:a.evaluate(e,s)}},Ix={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},Tx=class extends _{constructor(){super(Ix,[Ar]),this.eFloatingFilterText=M}init(e){this.params=e;let 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")){let o=e,i=o.getHandler();if(i.getModelAsString){let r=i.getModelAsString(o.model);this.eFloatingFilterText.setValue(r)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){let o=t.getModelAsString(e);this.eFloatingFilterText.setValue(o)}})}refresh(e){this.init(e)}},Ax=class extends Vn{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){let t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}};var Xn=class{constructor(){this.customFilterOptions={}}init(e,t){var o;this.filterOptions=(o=e.filterOptions)!=null?o:t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){var i;let o=(i=e.filterOptions)!=null?i:t;this.filterOptions!==o&&(this.filterOptions=o,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){let{filterOptions:e}=this;if(e)for(let t of e){if(typeof t=="string")continue;let o=[["displayKey"],["displayName"],["predicate","test"]],i=r=>r.some(a=>t[a]!=null)?!0:(R(72,{keys:r}),!1);if(!o.every(i)){this.filterOptions=e.filter(r=>r===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){let{filterOptions:t}=this;if(e)return e;if(t.length>=1){let o=t[0];if(typeof o=="string")return o;if(o.displayKey)return o.displayKey;R(73)}else R(74)}getCustomOption(e){return this.customFilterOptions[e]}};function oi(e,t,o){return o==null?e.splice(t):e.splice(t,o)}function br(e){return e==null||typeof e=="string"&&e.trim().length===0}function zx(e){return e==="AND"||e==="OR"?e:"AND"}function Lx(e,t,o){if(e==null)return;let{predicate:i}=e;if(i!=null&&!t.some(r=>r==null))return i(t,o)}function Ox(e,t){let o=e.length;return o>t&&(e.splice(t),R(78),o=t),o}var Hx=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 It(e,t){let o=t.getCustomOption(e);if(o){let{numberOfInputs:i}=o;return i!=null?i:1}return e&&Hx.has(e)?0:e==="inRange"?2:1}var Lr=class extends nf{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);let t=new Xn;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=zx(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),we(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)=>{let i=o===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){let 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(){let{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){let o=!e.operator,i=!t.operator;if(!o&&i||o&&!i)return!1;let a;if(o){let n=e,s=t;a=this.areSimpleModelsEqual(n,s)}else{let n=e,s=t;a=n.operator===s.operator&&Tt(n.conditions,s.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return a}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),$.resolve();if(e.operator){let i=e,r=i.conditions;r==null&&(r=[],R(77));let a=Ox(r,this.maxNumConditions),n=this.getNumConditions();if(an)for(let l=n;ll.setValue(!s,!0)),this.eJoinOrs.forEach(l=>l.setValue(s,!0)),r.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{let i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),$.resolve()}setNumConditions(e){var i,r;let t=(i=e.maxNumConditions)!=null?i:2;t<1&&(R(79),t=1),this.maxNumConditions=t;let o=(r=e.numAlwaysVisibleConditions)!=null?r:1;o<1&&(R(80),o=1),o>t&&(R(81),o=t),this.numAlwaysVisibleConditions=o}createOption(){let e=this.getGui(),t=this.createManagedBean(new Jn);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());let o=this.createEValue();this.eConditionBodies.push(o),e.appendChild(o),this.putOptionsIntoDropdown(t),this.resetType(t);let i=this.getNumConditions()-1;this.forEachPositionInput(i,r=>this.resetInput(r)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){let e=oe({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);let t=this.createJoinOperator(this.eJoinAnds,e,"and"),o=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);let i=this.eJoinPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,r),this.resetJoinOperatorOr(o,i,r),this.isReadOnly()||(t.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(e,t,o){let i=this.createManagedBean(new Ax);e.push(i);let r="ag-filter-condition-operator";return i.addCss(r),i.addCss(`${r}-${o}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){let{filterListOptions:t}=this;for(let o of t)e.addOption(o);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{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(){let e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){var o;let e=-1,t=!0;for(let i=0;i0&&this.removeConditionsAndOperators(r,a),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,r)=>{let a=this.isConditionDisabled(r,e);i.setDisabled(a||this.filterListOptions.length<=1),r===1&&(ni(this.eJoinPanels[0],a),this.eJoinAnds[0].setDisabled(a),this.eJoinOrs[0].setDisabled(a))}),this.eConditionBodies.forEach((i,r)=>{q(i,this.isConditionBodyVisible(r))});let o=(t!=null?t:this.getJoinOperator())==="OR";for(let i of this.eJoinAnds)i.setValue(!o,!0);for(let i of this.eJoinOrs)i.setValue(o,!0);this.forEachInput((i,r,a,n)=>{this.setElementDisplayed(i,r=this.getNumConditions())return;let{eTypes:o,eConditionBodies:i,eJoinPanels:r,eJoinAnds:a,eJoinOrs:n}=this;this.removeComponents(o,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);let s=Math.max(e-1,0);this.removeElements(r,s,t),this.removeComponents(a,s,t),this.removeComponents(n,s,t)}removeElements(e,t,o){let i=oi(e,t,o);for(let r of i)De(r)}removeComponents(e,t,o){let i=oi(e,t,o);for(let r of i)De(r.getGui()),this.destroyBean(r)}afterGuiAttached(e){var t;if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus)){let o;if(!this.isReadOnly()){let i=this.getInputs(0)[0];i instanceof Wt&&this.isConditionBodyVisible(0)?o=i.getInputElement():o=(t=this.eTypes[0])==null?void 0:t.getFocusableElement()}(o!=null?o:this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){var n;super.afterGuiDetached();let e=this.params;if((n=this.beans.colFilter)!=null&&n.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,o=-1,i=!1,r=this.getJoinOperator();for(let s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))t===-1&&(t=s,o=s);else{let l=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),c=s{if(!(i instanceof Wt))return;let s=r===0&&n>1?"inRangeStart":r===0?"filterOoo":"inRangeEnd",l=r===0&&n>1?e("ariaFilterFromValue","Filter from value"):r===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),c=o[a].getValue(),d=sd(this,t,s,c);i.setInputPlaceholder(d),i.setInputAriaLabel(l)})}setElementValue(e,t,o){e instanceof Wt&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Is(e)&&q(e.getGui(),t)}setElementDisabled(e,t){Is(e)&&ni(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Wt&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,o)=>{this.forEachPositionTypeInput(o,t,e)})}forEachPositionInput(e,t){let o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,t)}forEachPositionTypeInput(e,t,o){let i=It(t,this.optionsFactory),r=this.getInputs(e);for(let a=0;at+1}isConditionBodyVisible(e){let t=this.getConditionType(e);return It(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(){let e=[];for(let t=0;tthis.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){let o=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(o).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),o)}resetJoinOperatorOr(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),o)}resetJoinOperator(e,t,o,i,r){this.updateJoinOperatorDisabled(e.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(i),t)}updateJoinOperatorsDisabled(){let 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){let o=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,r,a)=>{a===t&&this.setElementValue(i,o[r]!=null?o[r]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,o,i)=>{this.setElementValue(t,o===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,o=>{this.attachElementOnChange(o,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},es=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function on(e){var t;return(t=e==null?void 0:e.allowedCharPattern)!=null?t:null}function Ng(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[Se(o),Se(i)].slice(0,It(r,t))}var Bx=class extends Lr{constructor(){super("bigintFilter",Ng,es),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Po()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e0&&this.beans.ariaAnnounce.announceValue(u,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}refresh(e){let t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,r=this.state,a=i==null?void 0:i.fromAction;return(a&&a!="apply"||o.model!==r.model||!this.areStatesEqual(o.state,r.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){super.setElementValue(e,t,o),t===null&&e.setCustomValidity("")}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:o}=this,i=on(e),r=oe({tag:"div",cls:"ag-filter-body",role:"presentation"}),a=this.createFromToElement(r,t,"from",i),n=this.createFromToElement(r,o,"to",i),s=(d,g,u)=>()=>this.refreshInputPairValidation(d,g,u),l=s(a,n,!0);a.onValueChange(l),a.addGuiEventListener("focusin",l);let c=s(a,n,!1);return n.onValueChange(c),n.addGuiEventListener("focusin",c),r}createFromToElement(e,t,o,i){let r=this.createManagedBean(i?new ht({allowedCharPattern:i}):new ht);return r.addCss(`ag-filter-${o}`),r.addCss("ag-filter-filter"),t.push(r),e.appendChild(r.getGui()),r}removeEValues(e,t){let o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{var n;i0&&(o.filter=String(i[0])),i.length>1&&(o.filterTo=String(i[1])),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{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){let o=e.getValue();return o==null||typeof o=="string"&&o.trim()===""?null:t?t(o):Se(o)}isInvalidValue(e,t){let o=e.getValue();return o!=null&&String(o).trim()!==""&&t===null}};function Nx(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Vg=class extends S{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){let t=e.filterParams,o=new Xn;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"){let 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){var n;let t=e.model;if(t==null)return!0;let{operator:o}=t,i=[];if(o){let s=t;i.push(...(n=s.conditions)!=null?n:[])}else i.push(t);let r=o&&o==="OR"?"some":"every",a=this.params.getValue(e.node);return i[r](s=>this.individualConditionPasses(e,s,a))}getModelAsString(e,t){var o;return(o=this.filterModelFormatter.getModelAsString(e,t))!=null?o:""}validateModel(e){var d;let{model:t,filterParams:{filterOptions:o,maxNumConditions:i}}=e;if(t==null)return;let a=Qc(t)?t.conditions:[t],n=(d=o==null?void 0:o.map(g=>typeof g=="string"?g:g.displayKey))!=null?d:this.defaultOptions;if(!(!a||a.every(g=>n.find(u=>u===g.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1,c=this.filterType;if((a&&!a.every(g=>g.filterType===c)||t.filterType!==c)&&(a=a.map(g=>({...g,filterType:c})),l=!0),typeof i=="number"&&a&&a.length>i&&(a=a.slice(0,i),l=!0),l){let g=a.length>1?{...t,filterType:c,conditions:a}:{...a[0],filterType:c};this.params={...e,model:g},e.onModelChange(g)}}individualConditionPasses(e,t,o){let i=this.optionsFactory,r=this.mapValuesFromModel(t,i),a=i.getCustomOption(t.type),n=Lx(a,r,o);return n!=null?n:o==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(r,o,t,e)}},ts=class extends Vg{evaluateNullValue(e){let{includeBlanksInEquals:t,includeBlanksInNotEqual:o,includeBlanksInGreaterThan:i,includeBlanksInLessThan:r,includeBlanksInRange:a}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(o)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(r)return!0;break;case"inRange":if(a)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,o){let i=o.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";let r=this.comparator(),a=e[0]!=null?r(e[0],t):0;switch(i){case"equals":return a===0;case"notEqual":return a!==0;case"greaterThan":return a>0;case"greaterThanOrEqual":return a>=0;case"lessThan":return a<0;case"lessThanOrEqual":return a<=0;case"inRange":{let n=r(e[1],t);return this.params.filterParams.inRangeInclusive?a>=0&&n<=0:a>0&&n<0}case"blank":return br(t);case"notBlank":return!br(t);default:return R(76,{filterModelType:i}),!0}}},os={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},Vx={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Or=class extends S{constructor(e,t,o){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=o}getModelAsString(e,t){var a;let o=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?Be(this,"filterSummaryInactive"):null;if(e.operator!=null){let n=e,l=((a=n.conditions)!=null?a:[]).map(d=>this.getModelAsString(d,t)),c=n.operator==="AND"?"andCondition":"orCondition";return l.join(` ${Be(this,c)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?Be(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):o(e.type,e.type);{let n=e,s=this.optionsFactory.getCustomOption(n.type),{displayKey:l,displayName:c,numberOfInputs:d}=s||{};return l&&c&&d===0?o(l,c):this.conditionToString(n,i,n.type==="inRange"||d===2,l,c)}}}updateParams(e){let{optionsFactory:t,filterParams:o}=e;this.optionsFactory=t,this.filterParams=o}conditionForToolPanel(e,t,o,i,r,a){let n,s=this.getTypeKey(e);return s&&(n=Be(this,s)),r&&a&&(n=this.getLocaleTextFunc()(r,a)),n!=null?t?`${n} ${Be(this,"filterSummaryInRangeValues",[o(),i()])}`:`${n} ${o()}`:null}getTypeKey(e){let t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){var o;let t=this.valueFormatter;return t?(o=t(e!=null?e:null))!=null?o:"":String(e)}},Gg=class extends Or{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=os}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e,l=this.formatValue.bind(this),c=Se(a),d=Se(n);if(t){let g=this.conditionForToolPanel(s,o,()=>l(c),()=>l(d),i,r);if(g!=null)return g}return o?`${l(c)}-${l(d)}`:a!=null?l(c):`${s}`}},Gx=class extends ts{constructor(){super(Ng,es),this.filterType="bigint",this.FilterModelFormatterClass=Gg}comparator(){return(e,t)=>e===t?0:e{}}setupGui(e){var i;this.eInput=this.createManagedBean(new ht((i=this.params)==null?void 0:i.config));let t=this.eInput.getGui();e.appendChild(t);let o=r=>this.onValueChanged(r);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}){let{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!o),i.setInputPlaceholder(o)}};function rn(e){let t=e==null?void 0:e.trim();return t===""?e:t}function Wg(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[o||null,i||null].slice(0,It(r,t))}var qg=class extends _{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}let t=e.operator,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;let o=e;return this.isTypeEditable(o.type)}init(e){this.params=e;let t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){let o=e;this.onModelUpdated(o.model)}}setParams(e){let t=new Xn;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){let o=this.optionsFactory.defaultOption;t||(this.lastType=o),this.readOnly=!!e.filterParams.readOnly;let i=this.isTypeEditable(o);this.setEditable(i)}refresh(e){this.params=e;let t=e,o=this.reactive;if((!o||t.source==="colDef")&&this.updateParams(e),o){let{source:i,model:r}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(r)}}updateParams(e){let t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t!=null&&t.afterFloatingFilter||t!=null&&t.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&It(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},Wx={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},rs=class extends qg{constructor(){super(...arguments),this.eFloatingFilterInputContainer=M,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Wx)}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){var g;let{inputSvc:t,defaultDebounceMs:o,readOnly:i}=this,{filterPlaceholder:r,column:a,browserAutoComplete:n,filterParams:s}=e,l=(g=this.lastType)!=null?g:this.optionsFactory.defaultOption,c=e.filterParams.filterPlaceholder,d=r===!0?sd(this,c,"filterOoo",l):r||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(a),autoComplete:n!=null?n:!1,placeholder:d}),this.applyActive=Er(s),!i){let u=Fn(s,o);t.setValueChangedListener(re(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let{inputSvc:t}=this,o=t.getValue();ne(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(o,!0)}syncUpWithParentFilter(e){let t=e.key===y.ENTER,o=this.reactive;if(o&&this.params.onUiChange(),this.applyActive&&!t)return;let{inputSvc:i,params:r,lastType:a}=this,n=i.getValue();if(r.filterParams.trimInput&&(n=rn(n),i.setValue(n,!0)),o){let s=r,l=s.model,c=this.convertValue(n),d=c==null?null:{...l!=null?l:{filterType:this.filterType,type:a!=null?a:this.optionsFactory.defaultOption},filter:c};s.onModelChange(d,{afterFloatingFilter:!0})}else r.parentFilterInstance(s=>{s==null||s.onFloatingFilterChanged(a||null,n||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},qx=class extends rs{constructor(){super(...arguments),this.FilterModelFormatterClass=Gg,this.filterType="bigint",this.defaultOptions=es}updateParams(e){let t=e.filterParams;on(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t==null?void 0:t.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){let t=e.filterParams;this.allowedCharPattern=on(t),this.bigintParser=t==null?void 0:t.bigintParser;let o=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new is({config:o}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):Se(e)}},Kl=".ag-input-field-input",_g=class{constructor(e,t,o,i,r,a){this.context=e,this.eParent=r,this.alive=!0,this.debouncedReport=re({isAlive:()=>this.alive},$l,500),this.timeoutHandle=null;let n=Up(t,o,i);n==null||n.newAgStackInstance().then(s=>{var d,g;if(!this.alive){e.destroyBean(s);return}if(this.dateComp=s,!s)return;r.appendChild(s.getGui()),(d=s==null?void 0:s.afterGuiAttached)==null||d.call(s);let{tempValue:l,disabled:c}=this;l&&s.setDate(l),c!=null&&((g=s.setDisabled)==null||g.call(s,c)),a==null||a(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){let t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){var o;let t=this.dateComp;t?(o=t.setDisabled)==null||o.call(t,e):this.disabled=e}setDisplayed(e){q(this.eParent,e)}setInputPlaceholder(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.setInputPlaceholder)==null||o.call(t,e)}setInputAriaLabel(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.setInputAriaLabel)==null||o.call(t,e)}afterGuiAttached(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.afterGuiAttached)==null||o.call(t,e)}updateParams(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.refresh)==null||o.call(t,e)}setCustomValidity(e,t=!1){var i;let o=(i=this.dateComp)==null?void 0:i.getGui().querySelector(Kl);if(o&&"setCustomValidity"in o){let r=e.length>0;o.setCustomValidity(e),r?t?this.timeoutHandle=this.debouncedReport(o):$l(o):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),un(o,r)}}getValidity(){var e,t;return(t=(e=this.dateComp)==null?void 0:e.getGui().querySelector(Kl))==null?void 0:t.validity}};function $l(e){e.reportValidity()}var as=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Ug(e,t){let{dateFrom:o,dateTo:i,type:r}=e||{};return[o&&me(o,void 0,!0)||null,i&&me(i,void 0,!0)||null].slice(0,It(r,t))}var Yl=1e3,Ql=1/0,_x=class extends Lr{constructor(){super("dateFilter",Ug,as),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=Yl,this.maxValidYear=Ql,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Po()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);let t=(l,c)=>{let d=e[l];if(d!=null)if(isNaN(d))R(82,{param:l});else return d==null?c:Number(d);return c},o=t("minValidYear",Yl),i=t("maxValidYear",Ql);this.minValidYear=o,this.maxValidYear=i,o>i&&R(83);let{minValidDate:r,maxValidDate:a}=e,n=r instanceof Date?r:me(r);this.minValidDate=n;let s=a instanceof Date?a:me(a);this.maxValidDate=s,n&&s&&n>s&&R(84)}refreshInputValidation(){for(let e=0;e=2?Ux(c,d,t):null,u=g?this.translate(g,[String(t?d:c)]):"",h=!Po()&&!o;(t?n:s).setCustomValidity(u,h),(t?s:n).setCustomValidity("",h),u.length>0&&a.ariaAnnounce.announceValue(u,"dateFilter")}createDateCompWrapper(e,t,o){let{beans:{userCompFactory:i,context:r,gos:a},params:n}=this,s=o==="from",l=new _g(r,i,n.colDef,O(a,{onDateChanged:()=>{this.refreshInputPairValidation(t,s),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,s),filterParams:n,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){let e=oe({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,o,i){let r=oe({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(r),e.appendChild(r),o.push(this.createDateCompWrapper(r,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),oi(this.eConditionPanelsFrom,e,t),oi(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,o){let i=oi(e,t,o);for(let r of i)r.destroy()}isValidDateValue(e){if(e===null)return!1;let{minValidDate:t,maxValidDate:o,minValidYear:i,maxValidYear:r}=this;if(t){if(eo)return!1}else if(e.getUTCFullYear()>r)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{var o,i;return e||(e=t.getDate()!=null&&!((i=(o=t.getValidity())==null?void 0:o.valid)==null||i))}),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>{var i,r;return t||(t=!((r=(i=o.getValidity())==null?void 0:i.valid)==null||r))}),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(o,i,r,a)=>{!t||i>=a||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){let t=this.getConditionType(e),o={},{params:i,filterType:r}=this,a=this.getValues(e),n=i.useIsoSeparator?"T":" ";return a.length>0&&(o.dateFrom=fe(a[0],!0,n)),a.length>1&&(o.dateTo=fe(a[1],!0,n)),{dateFrom:null,dateTo:null,filterType:r,type:t,...o}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){let e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(o)})}getInputs(e){let{dateConditionFromComps:t,dateConditionToComps:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{i=t?`${o?"max":"min"}DateValidation`:null}var jg=class extends Or{constructor(e,t){super(e,t,o=>{let{dataTypeSvc:i,valueSvc:r}=this.beans,a=t.column,n=i==null?void 0:i.getDateFormatterFunction(a),s=n?n(o!=null?o:void 0):o;return r.formatValue(a,null,s)}),this.filterTypeKeys=os}conditionToString(e,t,o,i,r){let{type:a}=e,n=me(e.dateFrom),s=me(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):u=>Sw(u,l),d=()=>n!==null?c(n):"null",g=()=>s!==null?c(s):"null";if(n==null&&s==null)return Be(this,a);if(t){let u=this.conditionForToolPanel(a,o,d,g,i,r);if(u!=null)return u}return o?`${d()}-${g()}`:n!=null?c(n):`${a}`}};function jx(e,t){let o=t;return oe?1:0}var Kx=class extends ts{constructor(){super(Ug,as),this.filterType="date",this.FilterModelFormatterClass=jg,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){let{filterTypeToRangeCache:o}=this,i=Date.now(),r=o.get(e);if(r&&r.expires=0&&r(l,t)<0}return super.evaluateNonNullValue(e,t,o)}},$x=1,Oi=null,Yx=()=>{var o,i,r,a;if(Oi!=null)return Oi;let e,t=typeof navigator=="undefined"?void 0:(i=(o=navigator.languages)==null?void 0:o[0])!=null?i:navigator.language;if(t&&typeof Intl!="undefined"&&typeof Intl.Locale=="function")try{let n=(a=(r=new Intl.Locale(t)).getWeekInfo)==null?void 0:a.call(r);e=n==null?void 0:n.firstDay}catch{e=void 0}return Oi=e==null?$x:e%7,Oi},xe=e=>(e.setHours(0,0,0,0),e),Hr=e=>{let t=e.getDay(),o=Yx(),i=(t-o+7)%7;return e.setDate(e.getDate()-i),xe(e)},Br=(e,t=1)=>(e.setDate(e.getDate()-t),e),Ae=e=>(e.setDate(e.getDate()+1),xe(e)),Kg=e=>(Hr(e),e.setDate(e.getDate()+6),Ae(e)),Nr=e=>(e.setDate(1),xe(e)),ns=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),xe(e)),ss=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Nr(e)},$g=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),ns(e)},ls=e=>(e.setMonth(0,1),xe(e)),Yg=e=>(e.setMonth(12,0),Ae(e)),zo=e=>Br(e),an=e=>zo(Hr(e)),nn=e=>zo(Nr(e)),sn=e=>zo(ss(e)),cs=(e,t)=>[xe(e),Ae(t)],Qx=(e,t)=>cs(zo(e),zo(t)),ds=(e,t)=>[Hr(e),Kg(t)],Zx=(e,t)=>ds(an(e),an(t)),gs=(e,t)=>[Nr(e),ns(t)],Jx=(e,t)=>gs(nn(e),nn(t)),us=(e,t)=>[ss(e),$g(t)],Xx=(e,t)=>us(sn(e),sn(t)),hs=(e,t)=>[ls(e),Yg(t)],ek=(e,t)=>[ls(e),Ae(t)],tk=(e,t)=>[xe(Br(e,7)),Ae(t)],ok=(e,t)=>[xe(Br(e,30)),Ae(t)],ik=(e,t)=>[xe(Br(e,90)),Ae(t)],rk=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[xe(e),Ae(t)]),ak=(e,t)=>(e.setFullYear(e.getFullYear()-1),[xe(e),Ae(t)]),nk=(e,t)=>(e.setFullYear(e.getFullYear()-2),[xe(e),Ae(t)]),sk=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),hs(e,t)),lk=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),hs(e,t)),ck=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),us(e,t)),dk=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),gs(e,t)),gk=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),ds(e,t)),uk=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),cs(e,t)),hk={today:cs,yesterday:Qx,tomorrow:uk,thisWeek:ds,lastWeek:Zx,nextWeek:gk,thisMonth:gs,lastMonth:Jx,nextMonth:dk,thisQuarter:us,lastQuarter:Xx,nextQuarter:ck,thisYear:hs,lastYear:sk,nextYear:lk,yearToDate:ek,last7Days:tk,last30Days:ok,last90Days:ik,last6Months:rk,last12Months:ak,last24Months:nk,setStartOfDay:xe,setStartOfWeek:Hr,setStartOfNextDay:Ae,setStartOfNextWeek:Kg,setStartOfMonth:Nr,setStartOfNextMonth:ns,setStartOfQuarter:ss,setStartOfNextQuarter:$g,setStartOfYear:ls,setStartOfNextYear:Yg,setPreviousDay:zo,setPreviousWeek:an,setPreviousMonth:nn,setPreviousQuarter:sn},pk={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"}]},fk=class extends qg{constructor(){super(pk,[Ar]),this.eReadOnlyText=M,this.eDateWrapper=M,this.FilterModelFormatterClass=jg,this.filterType="date",this.defaultOptions=as}setParams(e){super.setParams(e),this.createDateComponent();let 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){let t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){let o=e?me(e.dateFrom):null;this.dateComp.setDate(o),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){q(this.eDateWrapper,e),q(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){var t;let e=this.dateComp.getDate();if(this.reactive){let o=this.params;o.onUiChange();let i=o.model,r=fe(e),a=r==null?null:{...i!=null?i:{filterType:this.filterType,type:(t=this.lastType)!=null?t:this.optionsFactory.defaultOption},dateFrom:r};o.onModelChange(a,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(o=>{o==null||o.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){let{filterParams:e}=this.params,t=Fn(e,this.defaultDebounceMs);return O(this.gos,{onDateChanged:re(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){let{beans:{context:e,userCompFactory:t},eDateWrapper:o,params:{column:i}}=this;this.dateComp=new _g(e,t,i.getColDef(),this.getDateComponentParams(),o,r=>{r.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},mk={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},vk=class extends _{constructor(){super(mk,[Ar]),this.eDateInput=M,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);let 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(){var e,t;(t=(e=this.params).onFocusIn)==null||t.call(e)}setParams(e){var p,f;let t=this.eDateInput.getInputElement(),o=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=o&&Lt();let{minValidYear:i,maxValidYear:r,minValidDate:a,maxValidDate:n,buttons:s,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,g=(f=l!=null?l:(p=d==null?void 0:d.getDateIncludesTimeFlag)==null?void 0:p.call(d,c.cellDataType))!=null?f:!1;o?g?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";let u=Zl(a,i,!0),h=Zl(n,r,!1);u&&h&&u.getTime()>h.getTime()&&R(87),u&&(t.min=fe(u,g)),h&&(t.max=fe(h,g)),this.isApply=e.location==="floatingFilter"&&!!(s!=null&&s.includes("apply"))}refresh(e){this.params=e,this.setParams(e)}getDate(){return me(this.eDateInput.getValue())}setDate(e){var i,r;let t=this.params.filterParams.colDef.cellDataType,o=(r=(i=this.beans.dataTypeSvc)==null?void 0:i.getDateIncludesTimeFlag(t))!=null?r:!1;this.eDateInput.setValue(fe(e,o))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e!=null&&e.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){var t,o;return(o=(t=e==null?void 0:e.filterParams)==null?void 0:t.browserDatePicker)!=null?o:!0}};function Zl(e,t,o){return e&&t&&R(o?85:86),e instanceof Date?e:e?me(e):t?me(`${t}-${o?"01-01":"12-31"}`):null}var ps=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function ln(e){var t;return(t=e==null?void 0:e.allowedCharPattern)!=null?t:null}function yr(e){return e==null||isNaN(e)?null:e}function Qg(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[yr(o),yr(i)].slice(0,It(r,t))}var Ck=class extends Lr{constructor(){super("numberFilter",Qg,ps),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Po()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e0&&this.beans.ariaAnnounce.announceValue(s,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}refresh(e){let t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,r=this.state,a=i==null?void 0:i.fromAction;return(a&&a!="apply"||o.model!==r.model||!this.areStatesEqual(o.state,r.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){let{numberFormatter:i}=this.params,r=!o&&i?i(t!=null?t:null):t;super.setElementValue(e,r),r===null&&e.setCustomValidity("")}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:o}=this,i=ln(e),r=oe({tag:"div",cls:"ag-filter-body",role:"presentation"}),a=this.createFromToElement(r,t,"from",i),n=this.createFromToElement(r,o,"to",i),s=(d,g,u)=>()=>this.refreshInputPairValidation(d,g,u),l=s(a,n,!0);a.onValueChange(l),a.addGuiEventListener("focusin",l);let c=s(a,n,!1);return n.onValueChange(c),n.addGuiEventListener("focusin",c),r}createFromToElement(e,t,o,i){let r=this.createManagedBean(i?new ht({allowedCharPattern:i}):new Zn);return r.addCss(`ag-filter-${o}`),r.addCss("ag-filter-filter"),t.push(r),e.appendChild(r.getGui()),r}removeEValues(e,t){let o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{i0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{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 Zg(e,t){if(typeof t=="number")return t;let o=lt(t);return o!=null&&o.trim()===""&&(o=null),e?e(o):o==null||o.trim()==="-"?null:Number.parseFloat(o)}function Jl(e,t){return yr(Zg(e,t.getValue(!0)))}function wk(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Jg=class extends Or{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=os}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e,l=this.formatValue.bind(this);if(t){let c=this.conditionForToolPanel(s,o,()=>l(a),()=>l(n),i,r);if(c!=null)return c}return o?`${l(a)}-${l(n)}`:a!=null?l(a):`${s}`}},bk=class extends ts{constructor(){super(Qg,ps),this.filterType="number",this.FilterModelFormatterClass=Jg}comparator(){return(e,t)=>e===t?0:e{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new Zn),this.eTextInput=this.createManagedBean(new ht),this.eTextInput.setDisabled(!0);let t=this.eNumberInput.getGui(),o=this.eTextInput.getGui();e.appendChild(t),e.appendChild(o),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(o,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:o}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,o),this.setPlaceholder(this.eTextInput,o)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},Sk=class extends rs{constructor(){super(...arguments),this.FilterModelFormatterClass=Jg,this.filterType="number",this.defaultOptions=ps}updateParams(e){ln(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=ln(e.filterParams),this.allowedCharPattern?this.createManagedBean(new is({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new yk)}convertValue(e){return e?Number(e):null}},fs=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],xk=class extends Lr{constructor(){super("textFilter",Wg,fs),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){let t=this.getConditionType(e),o={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){let{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{ithis.removeComponents(a,e,t),{eValuesFrom:i,eValuesTo:r}=this;o(i),o(r)}},Xg=class extends Or{constructor(){super(...arguments),this.filterTypeKeys=Vx}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e;if(t){let l=d=>()=>Be(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(s,o,l(a),l(n),i,r);if(c!=null)return c}return o?`${a}-${n}`:a!=null?`${a}`:`${s}`}},kk=({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":{let i=t.lastIndexOf(o);return i>=0&&i===t.length-o.length}default:return!1}},Rk=e=>e,Ek=e=>e==null?null:e.toString().toLowerCase(),Fk=class extends Vg{constructor(){super(Wg,fs),this.filterType="text",this.FilterModelFormatterClass=Xg}updateParams(e){var o,i;super.updateParams(e);let t=e.filterParams;this.matcher=(o=t.textMatcher)!=null?o:kk,this.formatter=(i=t.textFormatter)!=null?i:t.caseSensitive?Rk:Ek}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,o,i){let r=e.map(u=>this.formatter(u))||[],a=this.formatter(t),{api:n,colDef:s,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(o.type==="blank")return br(t);if(o.type==="notBlank")return!br(t);let g={api:n,colDef:s,column:l,context:c,node:i.node,data:i.data,filterOption:o.type,value:a,textFormatter:d};return r.some(u=>this.matcher({...g,filterText:u}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){let t=o=>{var n,s;let i={...o},{filter:r,filterTo:a}=o;return r&&(i.filter=(n=rn(r))!=null?n:null),a&&(i.filterTo=(s=rn(a))!=null?s:null),i};return Qc(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},Dk=class extends rs{constructor(){super(...arguments),this.FilterModelFormatterClass=Xg,this.filterType="text",this.defaultOptions=fs}createFloatingFilterInputService(){return this.createManagedBean(new is)}};function Mk(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function Pk(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function Ik(e){var t;(t=e.quickFilter)==null||t.resetCache()}var Tk=class extends S{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){let 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(){var l,c;let{autoColSvc:e,colModel:t,gos:o,pivotResultCols:i}=this.beans,r=t.isPivotMode(),a=e==null?void 0:e.getColumns(),n=t.getColDefCols(),s=(c=r&&!o.get("applyQuickFilterBeforePivotOrAgg")?(l=i==null?void 0:i.getPivotResultCols())==null?void 0:l.list:n)!=null?c:[];a&&(s=s.concat(a)),this.colsToUse=o.get("includeHiddenColumnsInQuickFilter")?s:s.filter(d=>d.isVisible()||d.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){let 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(){let{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return I(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){R(70,{newFilter:e});return}let t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){let 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=>{let i=this.getTextForColumn(o,e);return I(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let o;e?(this.checkGenerateAggText(t),o=t.quickFilterAggregateText):o=this.getAggText(t);let{quickFilterParts:i,matcher:r}=this;return r(i,o)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let o=this.beans.filterValueSvc.getValue(e,t),i=e.getColDef();if(i.getQuickFilterText){let r=O(this.gos,{value:o,node:t,data:t.data,column:e,colDef:i});o=i.getQuickFilterText(r)}return I(o)?o.toString().toUpperCase():null}getAggText(e){let t=[];for(let o of this.colsToUse){let i=this.getTextForColumn(o,e);I(i)&&t.push(i)}return t.join(` +`)}},Ak={moduleName:"ClientSideRowModelFilter",version:P,rowModels:["clientSide"],beans:[E3]},ms={moduleName:"FilterCore",version:P,beans:[Sx],apiFunctions:{isAnyFilterPresent:bx,onFilterChanged:yx},css:[X2],dependsOn:[Ak]},eu={moduleName:"FilterValue",version:P,beans:[Px]},xi={moduleName:"ColumnFilter",version:P,beans:[wx,Mx],dynamicBeans:{headerFilterCellCtrl:$2},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:ex,getColumnFilterInstance:tx,destroyFilter:ox,setFilterModel:ix,getFilterModel:rx,getColumnFilterModel:ax,setColumnFilterModel:nx,showColumnFilter:sx,hideColumnFilter:lx,getColumnFilterHandler:cx,doFilterAction:dx},dependsOn:[ms,Tr,eu,J2]},zk={moduleName:"CustomFilter",version:P,userComponents:{agReadOnlyFloatingFilter:Tx},dependsOn:[xi]},Lk={moduleName:"TextFilter",version:P,dependsOn:[xi],userComponents:{agTextColumnFilter:{classImp:xk,params:{useForm:!0}},agTextColumnFloatingFilter:Dk},dynamicBeans:{agTextColumnFilterHandler:Fk}},Ok={moduleName:"NumberFilter",version:P,dependsOn:[xi],userComponents:{agNumberColumnFilter:{classImp:Ck,params:{useForm:!0}},agNumberColumnFloatingFilter:Sk},dynamicBeans:{agNumberColumnFilterHandler:bk}},Hk={moduleName:"BigIntFilter",version:P,dependsOn:[xi],userComponents:{agBigIntColumnFilter:{classImp:Bx,params:{useForm:!0}},agBigIntColumnFloatingFilter:qx},dynamicBeans:{agBigIntColumnFilterHandler:Gx}},Bk={moduleName:"DateFilter",version:P,dependsOn:[xi],userComponents:{agDateColumnFilter:{classImp:_x,params:{useForm:!0}},agDateInput:vk,agDateColumnFloatingFilter:fk},dynamicBeans:{agDateColumnFilterHandler:Kx}},Nk={moduleName:"QuickFilterCore",version:P,rowModels:["clientSide"],beans:[Tk],dependsOn:[ms,eu]},Vk={moduleName:"QuickFilter",version:P,apiFunctions:{isQuickFilterPresent:Mk,getQuickFilter:Pk,resetQuickFilter:Ik},dependsOn:[Nk]},Gk={moduleName:"ExternalFilter",version:P,dependsOn:[ms]},Wk=class extends S{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){let 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=[];let{params:{blockSize:e,rowHeight:t},startRow:o,beans:i,rowNodes:r}=this;for(let a=0;a{this.params.datasource.getRows(e)},0)}createLoadParams(){let{startRow:e,endRow:t,version:o,params:{sortModel:i,filterModel:r},gos:a}=this;return O(a,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,o),failCallback:this.pageLoadFailed.bind(this,o),sortModel:i,filterModel:r})}forEachNode(e,t,o){this.rowNodes.forEach((i,r)=>{this.startRow+r{let n=e.rowData?e.rowData[a]:void 0;!r.id&&r.alreadyRendered&&n&&(t[a]=new Pt(o),t[a].setRowIndex(r.rowIndex),t[a].setRowTop(r.rowTop),t[a].setRowHeight(r.rowHeight),r._destroy(!0)),this.setDataAndId(t[a],n,this.startRow+a)});let i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){let e=this.rowNodes;for(let t=0,o=e.length;tn!=e),o=(n,s)=>s.lastAccessed-n.lastAccessed;t.sort(o);let i=this.params.maxBlocksInCache>0,r=i?this.params.maxBlocksInCache-1:null,a=qk-1;t.forEach((n,s)=>{let l=n.state==="needsLoading"&&s>=a,c=i?s>=r:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(n)||this.isBlockFocused(n))return;this.removeBlockFromCache(n)}})}isBlockFocused(e){let t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;let{startRow:o,endRow:i}=e;return t.rowIndex>=o&&t.rowIndex=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let{blockSize:o,overflowSize:i}=this.params,a=(e.id+1)*o+i;this.rowCounto.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){let e=[];for(let t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(let t of e)this.destroyBlock(t)}purgeCache(){for(let e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let o=[],i=-1,r=!1,a={value:0},n=!1;for(let l of this.getBlocksInOrder())if(!n){if(r&&i+1!==l.id){n=!0;continue}i=l.id,l.forEachNode(c=>{let d=c===e||c===t;(r||d)&&o.push(c),d&&(r=!r)},a,this.rowCount)}return n||r?[]:o}},Uk=class extends S{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;let e=this.beans,t=new Pt(e);this.rootNode=t,t.level=-1,this.rowHeight=jt(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=jt(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t,o;let e;this.cacheParams?e=!ii(this.cacheParams.sortModel,(o=(t=this.beans.sortSvc)==null?void 0:t.getSortModel())!=null?o:[]):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(){var t;let e=this.infiniteCache;return(e==null?void 0:e.getRowCount())===0?(t=this.beans.filterManager)!=null&&t.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){var o,i;return(i=(o=this.infiniteCache)==null?void 0:o.getRowNodesInRange(e,t))!=null?i:[]}reset(){var o;if(!this.datasource)return;Mo(this.gos)!=null||(o=this.beans.selectionSvc)==null||o.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){var n,s;this.destroyCache();let e=this.beans,{filterManager:t,sortSvc:o,rowNodeBlockLoader:i,eventSvc:r,gos:a}=e;this.cacheParams={datasource:this.datasource,filterModel:(n=t==null?void 0:t.getFilterModel())!=null?n:{},sortModel:(s=o==null?void 0:o.getSortModel())!=null?s:[],rowNodeBlockLoader:i,initialRowCount:a.get("infiniteInitialRowCount"),maxBlocksInCache:a.get("maxBlocksInCache"),rowHeight:jt(e),overflowSize:a.get("cacheOverflowSize"),blockSize:a.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new _k(this.cacheParams)),r.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){let 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){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){let 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(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e,t;return(t=(e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())!=null?t:!1}setRowCount(e,t){var o;(o=this.infiniteCache)==null||o.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function jk(e){var t;(t=Dr(e))==null||t.refreshCache()}function Kk(e){var t;(t=Dr(e))==null||t.purgeCache()}function $k(e){var t;return(t=Dr(e))==null?void 0:t.getRowCount()}var Yk=class extends S{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Ah(this.gos);let e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=re(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){et(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){Ft(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}let 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(let o of t)o.load();this.printCacheStatus()}getBlockState(){let e={};return this.blocks.forEach(t=>{let{id:o,state:i}=t.getBlockStateJson();e[o]=i}),e}printCacheStatus(){Ft(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},Qk={moduleName:"InfiniteRowModelCore",version:P,rowModels:["infinite"],beans:[Uk,Yk]},Zk={moduleName:"InfiniteRowModel",version:P,apiFunctions:{refreshInfiniteCache:jk,purgeInfiniteCache:Kk,getInfiniteRowCount:$k},dependsOn:[Qk,w3]},Jk=class extends S{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var a,n;let o=(n=(a=this.wrapSvc)==null?void 0:a.wrap(e,t))!=null?n:t,i=!Ki.has(e),r=i?this.asyncListeners:this.syncListeners;r.has(e)||r.set(e,new Set),r.get(e).add(o),this.eventSvc.addListener(e,o,i)}removeListener(e,t){var a,n,s;let o=(n=(a=this.wrapSvc)==null?void 0:a.unwrap(e,t))!=null?n:t,i=this.asyncListeners.get(e),r=!!(i!=null&&i.delete(o));r||(s=this.syncListeners.get(e))==null||s.delete(o),this.eventSvc.removeListener(e,o,r)}addGlobalListener(e){var a,n;let t=(n=(a=this.wrapSvc)==null?void 0:a.wrapGlobal(e))!=null?n:e,o=(s,l)=>{Ki.has(s)&&t(s,l)},i=(s,l)=>{Ki.has(s)||t(s,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});let r=this.eventSvc;r.addGlobalListener(o,!1),r.addGlobalListener(i,!0)}removeGlobalListener(e){var n;let{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,r=(n=o==null?void 0:o.unwrapGlobal(e))!=null?n:e;if(i.has(r)){let{syncListener:s,asyncListener:l}=i.get(r);t.removeGlobalListener(s,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(r),t.removeGlobalListener(r,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(r=>this.eventSvc.removeListener(i,r,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){for(let 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);let{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Xk(e,t,o){var i;(i=e.apiEventSvc)==null||i.addListener(t,o)}function eR(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeListener(t,o)}function tR(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function oR(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var iR={moduleName:"EventApi",version:P,apiFunctions:{addEventListener:Xk,addGlobalListener:tR,removeEventListener:eR,removeGlobalListener:oR},beans:[Jk]},rR=class extends S{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){let e=this.gos,t=e.getCallback("getLocaleText");return t?oh(t):ih(e.get("localeText"))}},aR={moduleName:"Locale",version:P,beans:[rR]};function nR(e){var t,o;return(o=(t=e.stateSvc)==null?void 0:t.getState())!=null?o:{}}function sR(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function Xl(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=lR(e)),e.version=P,e}function lR(e){return e.cellSelection=cR(e,"rangeSelection"),e}function cR(e,t){if(e&&typeof e=="object")return e[t]}var dR=class extends S{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=re(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=re(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=re(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var c;let{gos:e,ctrlsSvc:t,colDelayRenderSvc:o}=this.beans;this.isClientSideRowModel=ee(e);let i=Xl((c=e.get("initialState"))!=null?c:{}),r=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;let a=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>a(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&(o==null||o.hideColumns("columnState"));let[n,s,l]=this.addManagedEventListeners({newColumnsLoaded:({source:d})=>{d==="gridInitializing"&&(n(),a(()=>{this.setupStateOnColumnsInitialised(i,!!r),o==null||o.revealColumns("columnState")}))},rowCountReady:()=>{s==null||s(),a(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l==null||l(),a(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){let o=Xl(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();let i="api",r=t?new Set(t):void 0;this.setGridReadyState(o,i,r),this.setColumnsInitialisedState(o,i,!!r,r),this.setRowCountState(o,i,r),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,r),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,r;t==="api"&&!(o!=null&&o.has("sideBar"))&&((r=(i=this.beans.sideBar)==null?void 0:i.comp)==null||r.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");let t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);let o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){let{filter:i,rowGroupExpansion:r,ssrmRowGroupExpansion:a,rowSelection:n,pagination:s,rowPinning:l}=e,c=(g,u)=>!(o!=null&&o.has(g))&&(u||t==="api");c("filter",i)&&this.setFilterState(i),(c("rowGroupExpansion",r)||c("ssrmRowGroupExpansion",a))&&this.setRowGroupExpansionState(a,r,t),c("rowSelection",n)&&this.setRowSelectionState(n,t),c("pagination",s)&&this.setPaginationState(s,t),c("rowPinning",l)&&this.setRowPinningState(l);let 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");let t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:r,colFilter:a,selectableFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(r.get("groupDefaultExpanded")!==0||r.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:s=>{(s.newPage||s.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),a&&this.addManagedListeners(a,{filterStateChanged:i}),n&&this.addManagedListeners(n,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,o){let{scroll:i,cellSelection:r,focusedCell:a,columnOrder:n}=e,s=(d,g)=>!(o!=null&&o.has(d))&&(g||t==="api");s("focusedCell",a)&&this.setFocusedCellState(a),s("cellSelection",r)&&this.setCellSelectionState(r),s("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!(n!=null&&n.orderedColIds),t);let l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());let c=this.getRangeSelectionState();l("rangeSelection",c),l("cellSelection",c),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");let t=this.updateCachedState.bind(this),o=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:o,cellFocusCleared:o,cellSelectionChanged:i=>{if(i.finished){let r=this.getRangeSelectionState();t("rangeSelection",r),t("cellSelection",r)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){let e=this.beans;return Ky(hr(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){var z,L,H,j;let{sort:r,rowGroup:a,aggregation:n,pivot:s,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:g}=e,u=!1,h=(A,B)=>{let V=!(i!=null&&i.has(A))&&!!(B||t==="api");return u||(u=V),V},p={},f=A=>{let B=p[A];return B||(B={colId:A},p[A]=B,B)},m={},v=h("sort",r);v&&(r==null||r.sortModel.forEach(({colId:A,sort:B,type:V},Z)=>{let K=f(A);K.sort=B,K.sortIndex=Z,K.sortType=V})),(v||!o)&&(m.sort=null,m.sortIndex=null);let C=h("rowGroup",a);C&&(a==null||a.groupColIds.forEach((A,B)=>{let V=f(A);V.rowGroup=!0,V.rowGroupIndex=B})),(C||!o)&&(m.rowGroup=null,m.rowGroupIndex=null);let w=h("aggregation",n);w&&(n==null||n.aggregationModel.forEach(({colId:A,aggFunc:B})=>{f(A).aggFunc=B})),(w||!o)&&(m.aggFunc=null);let b=h("pivot",s);b&&(s==null||s.pivotColIds.forEach((A,B)=>{let V=f(A);V.pivot=!0,V.pivotIndex=B}),this.gos.updateGridOptions({options:{pivotMode:!!(s!=null&&s.pivotMode)},source:t})),(b||!o)&&(m.pivot=null,m.pivotIndex=null);let x=h("columnPinning",l);if(x){for(let A of(z=l==null?void 0:l.leftColIds)!=null?z:[])f(A).pinned="left";for(let A of(L=l==null?void 0:l.rightColIds)!=null?L:[])f(A).pinned="right"}(x||!o)&&(m.pinned=null);let E=h("columnVisibility",c);if(E)for(let A of(H=c==null?void 0:c.hiddenColIds)!=null?H:[])f(A).hide=!0;(E||!o)&&(m.hide=null);let D=h("columnSizing",d);if(D)for(let{colId:A,flex:B,width:V}of(j=d==null?void 0:d.columnSizingModel)!=null?j:[]){let Z=f(A);Z.flex=B!=null?B:null,Z.width=V}(D||!o)&&(m.flex=null);let T=g==null?void 0:g.orderedColIds,k=!!(T!=null&&T.length)&&!(i!=null&&i.has("columnOrder")),F=k?T.map(A=>f(A)):Object.values(p);(F.length||u)&&(this.columnStates=F,Ve(this.beans,{state:F,applyOrder:k,defaultState:m},t))}setColumnPivotState(e,t){let o=this.columnStates;this.columnStates=void 0;let i=this.columnGroupStates;this.columnGroupStates=void 0;let r=this.beans,{pivotResultCols:a,colGroupSvc:n}=r;if(a!=null&&a.isPivotResultColsPresent()){if(o){let s=[];for(let l of o)a.getPivotResultCol(l.colId)&&s.push(l);Ve(r,{state:s,applyOrder:e},t)}i&&(n==null||n.setColumnGroupState(i,t))}}getColumnGroupState(){let e=this.beans.colGroupSvc;if(!e)return;let t=e.getColumnGroupState();return $y(t)}setColumnGroupState(e,t,o){var s;let i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;let r=new Set((s=e.columnGroup)==null?void 0:s.openColumnGroupIds),n=i.getColumnGroupState().map(({groupId:l})=>{let c=r.has(l);return c&&r.delete(l),{groupId:l,open:c}});for(let l of r)n.push({groupId:l,open:!0});n.length&&(this.columnGroupStates=n),i.setColumnGroupState(n,t)}getFilterState(){var n;let{filterManager:e,selectableFilter:t}=this.beans,o=e==null?void 0:e.getFilterModel();o&&Object.keys(o).length===0&&(o=void 0);let i=e==null?void 0:e.getFilterState(),r=(n=e==null?void 0:e.getAdvFilterModel())!=null?n:void 0,a=t==null?void 0:t.getState();return o||r||i||a?{filterModel:o,columnFilterState:i,advancedFilterModel:r,selectableFilters:a}:void 0}setFilterState(e){let{filterManager:t,selectableFilter:o}=this.beans,{filterModel:i,columnFilterState:r,advancedFilterModel:a,selectableFilters:n}=e!=null?e:{filterModel:null,columnFilterState:null,advancedFilterModel:null};n!==void 0&&(o==null||o.setState(n!=null?n:{})),(i!==void 0||r!==void 0)&&(t==null||t.setFilterState(i!=null?i:null,r!=null?r:null,"columnFilter")),a!==void 0&&(t==null||t.setAdvFilterModel(a!=null?a:null,"advancedFilter"))}getRangeSelectionState(){var t;let e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{let{id:i,type:r,startRow:a,endRow:n,columns:s,startColumn:l}=o;return{id:i,type:r,startRow:a,endRow:n,colIds:s.map(c=>c.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){var n;let{gos:t,rangeSvc:o,colModel:i,visibleCols:r}=this.beans;if(!gt(t)||!o)return;let a=[];for(let s of(n=e==null?void 0:e.cellRanges)!=null?n:[]){let l=[];for(let d of s.colIds){let g=i.getCol(d);g&&l.push(g)}if(!l.length)continue;let c=i.getCol(s.startColId);if(!c){let d=r.allCols,g=new Set(l);c=d.find(u=>g.has(u))}a.push({...s,columns:l,startColumn:c})}o.setCellRanges(a)}getScrollState(){var i,r;if(!this.isClientSideRowModel)return;let e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(i=e==null?void 0:e.getHScrollPosition())!=null?i:{left:0},{top:o}=(r=e==null?void 0:e.getVScrollPosition())!=null?r:{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;let{top:t,left:o}=e!=null?e:{top:0,left:0},{frameworkOverrides:i,rowRenderer:r,animationFrameSvc:a,ctrlsSvc:n}=this.beans;i.wrapIncoming(()=>{var s;n.get("center").setCenterViewportScrollLeft(o),(s=n.getScrollFeature())==null||s.setVerticalScrollPosition(t),r.redraw({afterScroll:!0}),a==null||a.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.beans.focusSvc.getFocusedCell();if(e){let{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}let{colId:i,rowIndex:r,rowPinned:a}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:r,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let{pagination:e,gos:t}=this.beans;if(!e)return;let o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){let{pagination:o,gos:i}=this.beans;if(!o)return;let{pageSize:r,page:a}=e!=null?e:{page:0,pageSize:i.get("paginationPageSize")},n=t==="gridInitializing";r&&!i.get("paginationAutoPageSize")&&o.setPageSize(r,n?"initialState":"pageSizeSelector"),typeof a=="number"&&(n?o.setPage(a):o.goToPage(a))}getRowSelectionState(){var i;let e=this.beans.selectionSvc;if(!e)return;let t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){let{expansionSvc:e,gos:t}=this.beans,o=e==null?void 0:e.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?o:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:o)}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){let t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,o){var r,a;let i=(r=e!=null?e:t)!=null?r:{expandedRowGroupIds:[],collapsedRowGroupIds:[]};(a=this.beans.expansionSvc)==null||a.setExpansionState(i,o)}updateColumnState(e){let t=this.getColumnState(),o=!1,i=this.cachedState;for(let r of Object.keys(t)){let a=t[r];ii(a,i[r])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let o=this.cachedState[e];this.setCachedStateValue(e,t),ii(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){let e=this.staleStateKeys;for(let t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(let t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){let e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},gR={moduleName:"GridState",version:P,beans:[dR],apiFunctions:{getState:nR,setState:sR}};function uR(e){return e.rowModel.isLastRowIndexKnown()}function hR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getPageSize())!=null?o:100}function pR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getCurrentPage())!=null?o:0}function fR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getTotalPages())!=null?o:1}function mR(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function vR(e){var t;(t=e.pagination)==null||t.goToNextPage()}function CR(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function wR(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function bR(e){var t;(t=e.pagination)==null||t.goToLastPage()}function yR(e,t){var o;(o=e.pagination)==null||o.goToPage(t)}var SR=class extends S{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;let t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;let e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){let t=this.beans,o=()=>{let i=Math.max(jt(t),1),r=Math.floor(e/i);t.pagination.setPageSize(r,"autoCalculated")};this.isBodyRendered?re(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function xR(e,t){if(typeof e!="number")return"";let o=t(),i=o("thousandSeparator",","),r=o("decimalSeparator",".");return e.toString().replace(".",r).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var _o="paginationPageSizeSelector",kR={tag:"span",cls:"ag-paging-page-size"},RR=class extends _{constructor(){super(kR),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let t=Number(e);isNaN(t)||t<1||t===this.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(_o,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;let 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(){ne(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(_o)!==!1}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){let r=this.gos.exists("paginationPageSize"),a=this.gos.get(_o)!==!0;R(94,{pageSizeSet:r,pageSizesSet:a,pageSizeOptions:e,paginationPageSizeOption:t}),a||R(95,{paginationPageSizeOption:t,paginationPageSizeSelector:_o}),e.unshift("")}let i=String(o?"":t);this.selectPageSizeComp?(Tt(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){let o=this.getLocaleTextFunc(),i=o("pageSizeSelectorLabel","Page Size:"),r=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Jn).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(r).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=[20,50,100],t=this.gos.get(_o);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((o,i)=>o-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},ER={selector:"AG-PAGE-SIZE-SELECTOR",component:RR},FR=".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}",DR=class extends Fd{constructor(){super(),this.btFirst=M,this.btPrevious=M,this.btNext=M,this.btLast=M,this.lbRecordCount=M,this.lbFirstRowOnPage=M,this.lbLastRowOnPage=M,this.lbCurrent=M,this.lbTotal=M,this.pageSizeComp=M,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(FR)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){let e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[ER]);let{btFirst:t,btPrevious:o,btNext:i,btLast:r}=this;this.activateTabIndex([t,o,i,r]),t.insertAdjacentElement("afterbegin",ye(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",ye(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",ye(e?"previous":"next",this.beans)),r.insertAdjacentElement("afterbegin",ye(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:a=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(a):zf(this.beans,a),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){let 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(let 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)}]){let{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:i=>{(i.key===y.ENTER||i.key===y.SPACE)&&(i.preventDefault(),o())}})}Af(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):xR(e,this.getLocaleTextFunc.bind(this))}getTemplate(){let 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(){let 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);let i=this.isZeroPagesToDisplay(),r=e===o-1;this.nextButtonDisabled=r||i,this.lastButtonDisabled=!t||i||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Mu(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),i=e?o:null,r=this.pagination.getCurrentPage(),a=this.pagination.getPageSize(),n,s;this.isZeroPagesToDisplay()?n=s=0:(n=a*r+1,s=n+a-1,e&&s>i&&(s=i));let l=n+a-1,c=!e&&o0?r+1:0,f=this.formatNumber(p);this.lbCurrent.textContent=f;let m,v;if(e)m=this.formatNumber(t),v=this.formatNumber(i);else{let C=u("more","more");m=C,v=C}this.lbTotal.textContent=m,this.lbRecordCount.textContent=v,this.announceAriaStatus(d,g,v,f,m)}announceAriaStatus(e,t,o,i,r){var g,u;let a=this.getLocaleTextFunc(),n=a("page","Page"),s=a("to","to"),l=a("of","of"),c=`${e} ${s} ${t} ${l} ${o}`,d=`${n} ${i} ${l} ${r}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,(g=this.ariaAnnounce)==null||g.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,(u=this.ariaAnnounce)==null||u.announceValue(d,"paginationPage"))}},MR={selector:"AG-PAGINATION",component:DR},PR=100,IR=class extends S{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){let 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 MR}isPaginateChildRows(){let 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){let t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;let{editSvc:o}=this.beans;o!=null&&o.isEditing()&&(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var o,i,r;if(!this.active)return;let t=e;this.paginateChildRows||(t=(r=(i=(o=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:i.call(o,e))!=null?r: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(){let 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 I(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:I(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:I(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:I(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:PR}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;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let 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(){let e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);let t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){let e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}let o=this.pageSize,i=t-1;this.totalPages=Math.floor(i/o)+1,this.adjustCurrentPageIfInvalid();let r=this.currentPage,a=o*r,n=o*(r+1)-1;if(n>i&&(n=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(a),n===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{let s=e.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=s-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){let e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}let{pageSize:t,currentPage:o}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){let{keepRenderedRows:t=!1,newPage:o=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:i,keepRenderedRows:t})}},TR={moduleName:"Pagination",version:P,beans:[IR,SR],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:uR,paginationGetPageSize:hR,paginationGetCurrentPage:pR,paginationGetTotalPages:fR,paginationGetRowCount:mR,paginationGoToNextPage:vR,paginationGoToPreviousPage:CR,paginationGoToFirstPage:wR,paginationGoToLastPage:bR,paginationGoToPage:yR},dependsOn:[Tr]},AR=".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 zR(e){var t,o;return(o=(t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())!=null?o:0}function LR(e){var t,o;return(o=(t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())!=null?o:0}function OR(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function HR(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function BR(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var NR={moduleName:"PinnedRow",version:P,beans:[Cf],css:[AR],apiFunctions:{getPinnedTopRowCount:zR,getPinnedBottomRowCount:LR,getPinnedTopRow:OR,getPinnedBottomRow:HR,forEachPinnedRow:BR},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},VR="\u2191",GR="\u2193",WR={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},qR=class extends _{constructor(){super(WR),this.eValue=M,this.eDelta=M,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){let o=Math.abs(t),i=e.formatValue(o),r=I(i)?i:o,a=t>=0,n=this.eDelta;a?n.textContent=VR+r:n.textContent=GR+r,n.classList.toggle("ag-value-change-delta-up",a),n.classList.toggle("ag-value-change-delta-down",!a)}setTimerToRemoveDelta(){this.refreshCount++;let 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"),ne(this.eDelta)}refresh(e,t=!1){var c;let{value:o,valueFormatted:i}=e,{eValue:r,lastValue:a,beans:n}=this;if(o===a||(I(i)?r.textContent=i:I(o)?r.textContent=o:ne(r),(c=n.filterManager)!=null&&c.isSuppressFlashingCellsBecauseFiltering()))return!1;let s=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,l=a&&typeof a=="object"&&"toNumber"in a?a.toNumber():a;if(s===l)return!1;if(typeof s=="number"&&typeof l=="number"){let d=s-l;this.showDelta(e,d)}return a&&r.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},_R=".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}",UR={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},jR=class extends _{constructor(){super(UR),this.eCurrent=M,this.refreshCount=0,this.registerCSS(_R)}init(e){this.refresh(e,!0)}addSlideAnimation(){var r;this.refreshCount++;let e=this.refreshCount;(r=this.ePrevious)==null||r.remove();let{beans:t,eCurrent:o}=this,i=oe({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var a;e===this.refreshCount&&((a=this.ePrevious)==null||a.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var r;let o=e.value;if(Q(o)&&(o=""),o===this.lastValue||(r=this.beans.filterManager)!=null&&r.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;let i=this.eCurrent;return I(e.valueFormatted)?i.textContent=e.valueFormatted:I(e.value)?i.textContent=o:ne(i),!0}},KR=class extends S{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){let r=this.animations[t];r.delete(e);let a=Date.now(),n=a+o,s=a+o+i,l={phase:"flash",flashEndTime:n,fadeEndTime:s};r.set(e,l);let c=`ag-cell-${t}`,d=`${c}-animation`,{comp:g,eGui:{style:u}}=e;g.toggleCss(c,!0),g.toggleCss(d,!1),u.removeProperty("transition"),u.removeProperty("transition-delay"),this.nextAnimationTime&&n+15{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=n)}advanceAnimations(){let e=Date.now(),t=null;for(let o of Object.keys(this.animations)){let i=this.animations[o],r=`ag-cell-${o}`,a=`${r}-animation`;for(let[n,s]of i){if(!n.isAlive()||!n.comp){i.delete(n);continue}let{phase:l,flashEndTime:c,fadeEndTime:d}=s,g=l==="flash"?c:d;if(!(e+15>=g)){t=Math.min(g,t!=null?t:1/0);continue}let{comp:h,eGui:{style:p}}=n;switch(l){case"flash":h.toggleCss(r,!1),h.toggleCss(a,!0),p.transition=`background-color ${d-c}ms`,p.transitionDelay=`${c-e}ms`,t=Math.min(d,t!=null?t:1/0),s.phase="fade";break;case"fade":h.toggleCss(r,!1),h.toggleCss(a,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(n);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;let o=Df(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(let e of Object.keys(this.animations))this.animations[e].clear()}};function $R(e,t={}){let{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{for(let i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))o.flashCell(i,t)})}var YR={moduleName:"HighlightChanges",version:P,beans:[KR],userComponents:{agAnimateShowChangeCellRenderer:qR,agAnimateSlideCellRenderer:jR},apiFunctions:{flashCells:$R}};function QR(e,t,o){if(!t)return;let i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,r=`aria-${t}`;o===null?i.removeAttribute(r):i.setAttribute(r,o)}function ZR(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function JR(e){e.frameworkOverrides.wrapIncoming(()=>{for(let t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function XR(e){var t,o;return(o=(t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())!=null?o:!0}function eE(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function tE(e){return{rowHeight:jt(e),headerHeight:wi(e)}}function oE(e,t={}){var a;let o=[];for(let n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){let s=n.getCellRenderer();s!=null&&o.push(oo(s))}if((a=t.columns)!=null&&a.length)return o;let i=[],r=Ka(t.rowNodes);for(let n of e.rowRenderer.getAllRowCtrls()){if(r&&!$a(n.rowNode,r)||!n.isFullWidth())continue;let s=n.getFullWidthCellRenderers();for(let l=0;l{var p;let u=g.__autoHeights,h=Dt(this.beans,g).height;for(let f of r){let m=u==null?void 0:u[f.getColId()],v=o==null?void 0:o.getCellSpan(f,g);if(v){if(v.getLastNode()!==g)continue;if(m=(p=o==null?void 0:o.getCellSpan(f,g))==null?void 0:p.getLastNodeAutoHeight(),!m)return}if(m==null){if(this.colSpanSkipCell(f,g))continue;return}h=Math.max(m,h)}h!==g.rowHeight&&(g.setRowHeight(h),a=!0)};(s=i==null?void 0:i.forEachPinnedRow)==null||s.call(i,"top",n),(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"bottom",n),(c=t.forEachDisplayedNode)==null||c.call(t,n),a&&((d=t.onRowHeightChanged)==null||d.call(t))}setRowAutoHeight(e,t,o){var r;if((r=e.__autoHeights)!=null||(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}let i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){let{colModel:o,colViewport:i,visibleCols:r}=this.beans;if(!o.colSpanActive)return!1;let a=[];switch(e.getPinned()){case"left":a=r.getLeftColsForRow(t);break;case"right":a=r.getRightColsForRow(t);break;case null:a=i.getColsWithinViewport(t);break}return!a.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;let i=t.parentElement,{rowNode:r,column:a}=e,n=this.beans,s=d=>{var C;if((C=this.beans.editSvc)!=null&&C.isEditing(e)||!e.isAlive()||!o.isAlive())return;let{paddingTop:g,paddingBottom:u,borderBottomWidth:h,borderTopWidth:p}=ao(i),f=g+u+h+p,v=t.offsetHeight+f;if(d<5){let w=te(n),b=!(w!=null&&w.contains(t)),x=v==0;if(b||x){window.setTimeout(()=>s(d+1),0);return}}this.setRowAutoHeight(r,v,a)},l=()=>s(0);l();let c=At(n,t,l);return o.addDestroyFunc(()=>{c(),this.setRowAutoHeight(r,void 0,a)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;let e=this.beans.rowRenderer.getAllRowCtrls(),t=null;for(let{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(r=>r.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(let i of t){let r=o.__autoHeights[i.getColId()];if(!r||o.rowHeight{p=b,f=null,m=x},C=b=>{let x=!b.isExpandable()&&!b.group&&!b.detail&&(d?!d({rowNode:b}):!0);if(b.rowIndex==null||!x){v(null,null);return}if(p==null||b.level!==p.level||b.footer||f&&b.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){v(b,a.getValue(t,b,"data"));return}let E=a.getValue(t,b,"data");if(h){let D=O(o,{valueA:m,nodeA:p,valueB:E,nodeB:b,column:t,colDef:s});if(!u(D)){v(b,E);return}}else if(g?!g(m,E):m!==E){v(b,E);return}if(!f){let D=l==null?void 0:l.get(p);(D==null?void 0:D.firstNode)===p?(D.reset(),f=D):f=new nE(t,p),c.set(p,f)}f.addSpannedNode(b),c.set(b,f)};switch(e){case"center":(w=r.forEachDisplayedNode)==null||w.call(r,b=>{(!n||n.isRowInPage(b.rowIndex))&&C(b)}),this.centerValueNodeMap=c;break;case"top":i==null||i.forEachPinnedRow("top",C),this.topValueNodeMap=c;break;case"bottom":i==null||i.forEachPinnedRow("bottom",C),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}}},lE=class extends S{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=re(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=re(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){let e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){let{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;let o=this.createManagedBean(new sE(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}){let{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||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){let o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){let{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,r=e.rowIndex,a=this.spanningColumns.get(i);if(!a)return;let n;switch(e.rowPinned){case"top":n=t==null?void 0:t.getPinnedTopRow(r);break;case"bottom":n=t==null?void 0:t.getPinnedBottomRow(r);break;default:n=o.getRow(r)}if(n)return a.getCellSpan(n)}getCellStart(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){let o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(let[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){let r=i.getCellSpan(e);t(o,r)}}destroy(){super.destroy(),this.spanningColumns.clear()}},cE=class extends Fo{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,r,a,n){this.eWrapper=o,super.setComp(e,t,o,i,r,a,n),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){let{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||ai(e,t.rowIndex)}setAriaRowSpan(){zu(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){var e;return(e=this.focusedCellPosition)!=null?e:this.cellPosition}checkCellFocused(){let 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){let{beans:t}=this;if(pi(t)){this.focusedCellPosition=void 0;return}let 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}},dE=class extends vr{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;let t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new cE(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;let t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},gE=class extends S{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){let{rowSpanSvc:t}=this.beans,o=this.getCtrlsMap(e),i=o.size,r=this.getAllRelevantRowControls(e),a=new Map,n=!1;for(let l of r)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(c,d)=>{if(a.has(d.firstNode))return;let g=o.get(d.firstNode);if(g){a.set(d.firstNode,g),o.delete(d.firstNode);return}n=!0;let u=new dE(d.firstNode,this.beans,!1,!1,!1);a.set(d.firstNode,u)}));this.setCtrlsMap(e,a);let s=a.size===i;if(!(!n&&s)){for(let l of o.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){let{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){let{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;let i=this.getCtrlsMap(e.rowPinned).get(o.firstNode);if(i)return i.getAllCellCtrls().find(r=>r.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(let 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")}},uE={moduleName:"CellSpan",version:P,beans:[lE,gE]},hE=class extends S{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Ro(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){let t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),sp(e))}createColumns(e,t){var u,h,p,f,m,v;let o=()=>{var C;ar(this.beans,(C=this.columns)==null?void 0:C.tree),this.columns=null},i=e.treeDepth,a=((h=(u=this.columns)==null?void 0:u.treeDepth)!=null?h:-1)==i,n=this.generateSelectionCols();if(np(n,(f=(p=this.columns)==null?void 0:p.list)!=null?f:[])&&a)return;o();let{colGroupSvc:l}=this.beans,c=(m=l==null?void 0:l.findDepth(e.tree))!=null?m:0,d=(v=l==null?void 0:l.balanceTreeForAutoCols(n,c))!=null?v:[];this.columns={list:n,tree:d,treeDepth:c,map:{}},t(C=>{if(!C)return null;let w=C.filter(b=>!zt(b));return[...n,...w]})}updateColumns(e){var i,r;let t=Ro(e.source),{beans:o}=this;for(let a of(r=(i=this.columns)==null?void 0:i.list)!=null?r:[]){let n=this.createSelectionColDef(e.currentValue);a.setColDef(n,null,t),Ve(o,{state:[cp(n,a.colId)]},t)}}getColumn(e){var t,o;return(o=(t=this.columns)==null?void 0:t.list.find(i=>Jo(i,e)))!=null?o:null}getColumns(){var e,t;return(t=(e=this.columns)==null?void 0:e.list)!=null?t:null}isSelectionColumnEnabled(){var n,s,l;let{gos:e,beans:t}=this,o=e.get("rowSelection");if(typeof o!="object"||!Ut(e))return!1;let i=((l=(s=(n=t.autoColSvc)==null?void 0:n.getColumns())==null?void 0:s.length)!=null?l:0)>0;if(o.checkboxLocation==="autoGroupColumn"&&i)return!1;let r=!!So(o),a=Gi(o);return r||a}createSelectionColDef(e){let{gos:t}=this,o=e!=null?e:t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:r,spanRows:a,...n}=o!=null?o:{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(s,l,c,d){let g=c.isSelected(),u=d.isSelected();return g===u?0:g?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...n,colId:Vc,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];let e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);let o=new no(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){let i=t&&typeof t!="string"?So(t):void 0,r=e&&typeof e!="string"?So(e):void 0,a=i!==r,n=t&&typeof t!="string"?Gi(t):void 0,s=e&&typeof e!="string"?Gi(e):void 0,l=n!==s,c=or(e),d=or(t);(a||l||c!==d)&&this.beans.colModel.refreshAll(o)}destroy(){var e;ar(this.beans,(e=this.columns)==null?void 0:e.tree),super.destroy()}refreshVisibility(e,t,o){var l,c;if(!((l=this.columns)!=null&&l.list.length))return;let i=e.length+t.length+o.length;if(i===0)return;let r=this.columns.list[0];if(!r.isVisible())return;let a=()=>{let d;switch(r.pinned){case"left":case!0:d=e;break;case"right":d=o;break;default:d=t}d&&et(d,r)};(((c=this.beans.rowNumbersSvc)==null?void 0:c.getColumn(Gc))?2:1)===i&&a()}},pE=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function fE(e,t){var n;if(!t.nodes.every(s=>s.rowPinned&&!Pr(s)?(R(59),!1):s.id===void 0?(R(60),!1):!0))return;let{nodes:i,source:r,newValue:a}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:i,source:r!=null?r:"api",newValue:a})}function mE(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function vE(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function CE(e,t="apiSelectAllFiltered"){var o;(o=e.selectionSvc)==null||o.selectAllRowNodes({source:t,selectAll:"filtered"})}function wE(e,t="apiSelectAllFiltered"){var o;(o=e.selectionSvc)==null||o.deselectAllRowNodes({source:t,selectAll:"filtered"})}function bE(e,t="apiSelectAllCurrentPage"){var o;(o=e.selectionSvc)==null||o.selectAllRowNodes({source:t,selectAll:"currentPage"})}function yE(e,t="apiSelectAllCurrentPage"){var o;(o=e.selectionSvc)==null||o.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function SE(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedNodes())!=null?o:[]}function xE(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedRows())!=null?o:[]}var kE={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},RE=class extends _{constructor(){super(kE,[Gn]),this.eCheckbox=M}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,i=t.isSelected(),r=Sr(e,i),[a,n]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],s=e(a,n);o.setValue(i,!0),o.setInputAriaLabel(`${s} (${r})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:eo,click:i=>{var r;eo(i),!this.eCheckbox.isDisabled()&&((r=this.beans.selectionSvc)==null||r.handleSelectionEvent(i,this.rowNode,"checkboxSelected"))}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:r})=>{let a=typeof i=="object"?qr(i):void 0,n=typeof r=="object"?qr(r):void 0;a!==n&&this.onSelectableChanged()}),Pa(this.gos)||typeof this.getIsVisible()=="function"){let i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){let{column:e,rowNode:t,overrides:o,gos:i}=this,r=t.selectable,a=this.getIsVisible(),n;if(typeof a=="function"){let g=o==null?void 0:o.callbackParams;if(!e)n=a({...g,node:t,data:t.data});else{let u=e.createColumnFunctionCallbackParams(t);n=a({...g,...u})}}else n=a!=null?a:!1;let s=r&&!n||!r&&n,l=r||n,c=i.get("rowSelection"),d=c&&typeof c!="string"?!qr(c):!!(e!=null&&e.getColDef().showDisabledCheckboxes);this.setVisible(l&&(s?d:!0)),this.setDisplayed(l&&(s?d:!0)),l&&this.eCheckbox.setDisabled(s),o!=null&&o.removeHidden&&this.setDisplayed(l)}getIsVisible(){var o,i;let e=this.overrides;if(e)return e.isVisible;let t=this.gos.get("rowSelection");return t&&typeof t!="string"?So(t):(i=(o=this.column)==null?void 0:o.getColDef())==null?void 0:i.checkboxSelection}},EE=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(){var e;if(this.cachedRange.length===0){let t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=(e=this.getNodesInRange(t,o))!=null?e:[]}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,{rowModel:o,pinnedRowModel:i}=this;return t!=null||(t=o.getRowNode(e)),i!=null&&i.isManual()&&(t!=null||(t=i.getPinnedRowById(e,"top")),t!=null||(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){let t=this.getRange();if(t.length===0)return{keep:[],discard:[]};let o=t[0].id===this.rootId,i=t.findIndex(r=>r.id===e.id);if(i>-1){let r=t.slice(0,i),a=t.slice(i+1);return this.setEndRange(e),o?{keep:r,discard:a}:{keep:a,discard:r}}else return{keep:t,discard:[]}}extend(e,t=!1){let o=this.getRoot();if(o==null){let r=this.getRange().slice();return t&&e.depthFirstSearch(a=>!a.group&&r.push(a)),r.push(e),this.setRoot(e),{keep:r,discard:[]}}let i=this.getNodesInRange(o,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(r=>r.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let r=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:r}}}getNodesInRange(e,t){var r,a,n,s,l,c;let{pinnedRowModel:o,rowModel:i}=this;if(!(o!=null&&o.isManual()))return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Re(o,"top",e,void 0).concat((r=i.getNodesInRangeForSelection(i.getRow(0),t))!=null?r:[]);if(e.rowPinned==="bottom"&&!t.rowPinned){let d=Re(o,"bottom",void 0,e),g=i.getRowCount(),u=i.getRow(g-1);return((a=i.getNodesInRangeForSelection(t,u))!=null?a:[]).concat(d)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Re(o,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){let d=Re(o,"top",t,void 0),g=Re(o,"bottom",void 0,e),u=i.getRow(0),h=i.getRow(i.getRowCount()-1);return d.concat((n=i.getNodesInRangeForSelection(u,h))!=null?n:[]).concat(g)}if(!e.rowPinned&&t.rowPinned==="top")return Re(o,"top",t,void 0).concat((s=i.getNodesInRangeForSelection(i.getRow(0),e))!=null?s:[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){let d=Re(o,"top",e,void 0),g=Re(o,"bottom",void 0,t),u=i.getRow(0),h=i.getRow(i.getRowCount()-1);return d.concat((l=i.getNodesInRangeForSelection(u,h))!=null?l:[]).concat(g)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Re(o,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){let d=Re(o,"bottom",void 0,t),g=i.getRow(i.getRowCount());return((c=i.getNodesInRangeForSelection(e,g))!=null?c:[]).concat(d)}return null}},FE=class extends S{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){let t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Y(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;let t=this.createManagedBean(new Vn);this.cbSelectAll=t,t.addCss("ag-header-select-all"),Et(t.getGui(),"presentation"),this.showOrHideSelectAll();let o=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:o,paginationChanged:o,modelUpdated:o}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:r})=>{let a=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;a(i)!==a(r)&&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){let 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;let e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,i=t.getSelectAllState(e);o.setValue(i);let r=t.hasNodesToSelect(e);o.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){let t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:i,cbSelectAllVisible:r}=this,a=i.getValue(),n=Sr(t,a),s=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",r?`${s} (${n})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return gi(this.gos)?!0:(R(128,{feature:e}),!1)}checkRightRowModelType(e){let{gos:t,rowModel:o}=this.beans;return ee(t)||vi(t)?!0:(R(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.getSelectAllMode(),o="uiSelectAll";t==="currentPage"?o="uiSelectAllCurrentPage":t==="filtered"&&(o="uiSelectAllFiltered");let i={source:o,selectAll:t},r=this.beans.selectionSvc;e?r.selectAllRowNodes(i):r.deselectAllRowNodes(i)}isCheckboxSelection(){let{column:e,gos:t,beans:o}=this,a=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return tu(o,e)&&this.checkRightRowModelType(a)&&this.checkSelectionType(a)}getSelectAllMode(){let e=Oc(this.gos,!1);if(e)return e;let{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 tu({gos:e,selectionColSvc:t},o){let i=e.get("rowSelection"),r=o.getColDef(),{headerCheckboxSelection:a}=r,n=!1;if(typeof i=="object"){let l=zt(o),c=kn(o);(or(i)==="autoGroupColumn"&&c||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(n=Gi(i))}else typeof a=="function"?n=a(O(e,{column:o,colDef:r})):n=!!a;return n}var DE=class extends S{postConstruct(){let{gos:e,beans:t}=this;this.selectionCtx=new EE(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{let o=Pa(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=Pa(e),this.addManagedEventListeners({cellValueChanged:o=>this.updateRowSelectable(o.node),rowNodeDataChanged:o=>this.updateRowSelectable(o.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new RE}createSelectAllFeature(e){if(tu(this.beans,e))return new FE(e)}isMultiSelect(){return gi(this.gos)}onRowCtrlSelected(e,t,o){let i=!!e.rowNode.isSelected();e.forEachGui(o,r=>{r.rowComp.toggleCss("ag-row-selected",i);let a=r.element;sc(a,i),a.contains(Y(this.beans))&&t(r)})}announceAriaRowSelection(e){var a,n;if(this.isRowSelectionBlocked(e))return;let t=e.isSelected(),o=(a=this.beans.editSvc)==null?void 0:a.isEditing({rowNode:e});if(!e.selectable||o)return;let r=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(r,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Pr(e)||!Ut(this.gos)}updateRowSelectable(e,t){var i,r;let o=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:(r=(i=this.isRowSelectable)==null?void 0:i.call(this,e))!=null?r:!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(ui(this.gos)){let r=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:r!=null?r:!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){var i;let t=!1,o=!1;if(!((i=e.childrenAfterGroup)!=null&&i.length))return e.selectable?e.__selected:null;for(let r=0;r{let t=ui(e),o=ir(e),i=rr(e)==="filteredDescendants";this.masterSelectsDetail=Fs(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||o!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=o)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,o){if(this.isRowSelectionBlocked(t))return 0;let i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,o),this.selectRange(i.select,!0,o);{let r=i.checkFilteredNodes?iu(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:r,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:o})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:o,nodes:i,event:r,source:a,keepDescendants:n=!1}){var c;if(i.length===0)return 0;let{gos:s}=this;if(!Ut(s)&&e)return R(132),0;if(i.length>1&&!this.isMultiSelect())return R(130),0;let l=0;for(let d=0;d0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),l}selectRange(e,t,o){let i=0;return e.forEach(r=>{let a=r.primaryRow;if(a.group&&this.groupSelectsDescendants)return;this.selectRowNode(a,t,void 0,o)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o)),i}selectChildren(e,t,o){let i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:o,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((o,i)=>{e(o)&&t.set(i,o)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;let{gos:o,rowModel:i}=this.beans;if(!ee(o,i))return!1;let r=i.rootNode;if(!r)return!1;let a=!1,n=s=>{if(s!==r){let l=this.calculateSelectedFromChildren(s);a=this.selectRowNode(s,l===null?!1:l,void 0,e)||a}};return ro(r,this.beans.rowModel.hierarchical,t,n),a}clearOtherNodes(e,t,o){let i=new Map,r=0;return this.selectedNodes.forEach(a=>{let n=a.id==e.id;if((t?!IE(e,a):!0)&&!n){let l=this.selectedNodes.get(a.id);r+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:o}),this.groupSelectsDescendants&&a.parent&&i.set(a.parent.id,a.parent)}}),i.forEach(a=>{let n=this.calculateSelectedFromChildren(a);this.selectRowNode(a,n===null?!1:n,void 0,o)}),r}onRowSelected(e){let 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;let t=new Pt(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){let t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){let{gos:e,rowModel:t}=this.beans;if(!ee(e,t))return;let o=t.getTopLevelNodes();if(o===null)return;let i=[];function r(a){for(let n=0,s=a.length;n{let n=this.selectRowNode(a.primaryRow,!1,void 0,e);i||(i=n)};if(t==="currentPage"||t==="filtered"){if(!o){W(102);return}this.getNodesToSelect(t).forEach(r)}else this.selectedNodes.forEach(r),this.reset(e);if(this.selectionCtx.selectAll=!1,o&&this.groupSelectsDescendants){let a=this.updateGroupsFromChildrenSelections(e);i||(i=a)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,o=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&o++)}),{selectedCount:t,notSelectedCount:o}}getSelectAllState(e){var i;let{selectedCount:t,notSelectedCount:o}=this.getSelectedCounts(e);return(i=ou(t,o))!=null?i:null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];let t=[],o=r=>t.push(r);if(e==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){o(r);return}if(!r.footer&&!r.expanded){let a=n=>{o(n);let s=n.childrenAfterFilter;if(s)for(let l=0,c=s.length;l{let s=this.selectRowNode(n.primaryRow,!0,void 0,i);a||(a=s)}),o.selectAll=!0,ee(t)&&this.groupSelectsDescendants){let n=this.updateGroupsFromChildrenSelections(i);a||(a=n)}a&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,o){if(e||(e=[]),!Array.isArray(e)){W(103);return}let i=new Set(e),r=[];this.beans.rowModel.forEachNode(a=>{i.has(a.id)&&r.push(a)}),o&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:t})}canSelectAll(){return ee(this.beans.gos)}updateSelectable(e){var n;let{gos:t,rowModel:o}=this.beans;if(!Ut(t))return;let i="selectableChanged",r=ee(t)&&this.groupSelectsDescendants,a=[];if(r){let s=o.rootNode;s&&ro(s,o.hierarchical,e,l=>{let c=!1;for(let d of l.childrenAfterGroup)c||(c=d.selectable),!d.group&&!this.updateRowSelectable(d,!0)&&d.isSelected()&&a.push(d);this.setRowSelectable(l,c,!0)})}else o.forEachNode(s=>{!this.updateRowSelectable(s,!0)&&s.isSelected()&&a.push(s)});a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:i}),!e&&r&&((n=this.updateGroupsFromChildrenSelections)==null||n.call(this,i))}updateSelectableAfterGrouping(e){var t;this.updateSelectable(e),this.groupSelectsDescendants&&((t=this.updateGroupsFromChildrenSelections)!=null&&t.call(this,"rowGroupChanged",e))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){var a,n;if(!this.masterSelectsDetail)return;let o=(n=(a=e.detailNode)==null?void 0:a.detailGridInfo)==null?void 0:n.api;if(!o)return;let i=PE(o);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(o.getSelectedNodes().map(s=>s.id)))}setDetailSelectionState(e,t,o){if(this.masterSelectsDetail){if(!gi(t)){R(269);return}switch(e.isSelected()){case!0:{o.selectAll();break}case!1:{o.deselectAll();break}case void 0:{let i=this.detailSelection.get(e.id);if(i){let r=[];for(let a of i){let n=o.getRowNode(a);n&&r.push(n)}o.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}default:break}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function PE(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),ou(t,o)}function ou(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function IE(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}function iu(e){var i,r;let t=e.isSelected()===!1,o=(r=(i=e.childrenAfterFilter)==null?void 0:i.some(iu))!=null?r:!1;return t||o}var TE={moduleName:"SharedRowSelection",version:P,beans:[hE],css:[pE],apiFunctions:{setNodesSelected:fE,selectAll:mE,deselectAll:vE,selectAllFiltered:CE,deselectAllFiltered:wE,selectAllOnCurrentPage:bE,deselectAllOnCurrentPage:yE,getSelectedNodes:SE,getSelectedRows:xE}},AE={moduleName:"RowSelection",version:P,rowModels:["clientSide","infinite","viewport"],beans:[ME],dependsOn:[TE]},zE=class extends S{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(){let{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,r=this.getCellClassParams(e,o);$n(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,r,a=>t.toggleCss(a,!0),a=>t.toggleCss(a,!1)),this.cellClassRules=i}applyUserStyles(){let e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){let r=this.getCellClassParams(e,t);i=o(r)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){let{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);for(let a of this.staticClasses)t.toggleCss(a,!1);let r=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=r;for(let a of r)t.toggleCss(a,!0)}getCellClassParams(e,t){let{value:o,rowNode:i}=this.cellCtrl;return O(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},LE=class extends S{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){$n(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){let{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new zE(e,this.beans)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(r=>{o(r)})}},OE={moduleName:"CellStyle",version:P,beans:[LE]},HE={moduleName:"RowStyle",version:P,beans:[P1]},BE={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},Ce="clientSide",ce="serverSide",go="infinite",NE={onGroupExpandedOrCollapsed:[Ce],refreshClientSideRowModel:[Ce],isRowDataEmpty:[Ce],forEachLeafNode:[Ce],forEachNodeAfterFilter:[Ce],forEachNodeAfterFilterAndSort:[Ce],resetRowHeights:[Ce,ce],applyTransaction:[Ce],applyTransactionAsync:[Ce],flushAsyncTransactions:[Ce],getBestCostNodeSelection:[Ce],getServerSideSelectionState:[ce],setServerSideSelectionState:[ce],applyServerSideTransaction:[ce],applyServerSideTransactionAsync:[ce],applyServerSideRowData:[ce],retryServerSideLoads:[ce],flushServerSideAsyncTransactions:[ce],refreshServerSide:[ce],getServerSideGroupLevelState:[ce],refreshInfiniteCache:[go],purgeInfiniteCache:[go],getInfiniteRowCount:[go],isLastRowIndexKnown:[go,ce],expandAll:[Ce,ce],collapseAll:[Ce,ce],onRowHeightChanged:[Ce,ce],setRowCount:[go,ce],getCacheBlockState:[go,ce]},VE={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 GE(e,t,o){let i=VE[e];if(i){let{version:a,new:n,old:s,message:l}=i,c=s!=null?s:e;return(...d)=>{let g=n?`Please use ${n} instead. `:"";return Zo(`Since ${a} api.${c} is deprecated. ${g}${l!=null?l:""}`),t.apply(t,d)}}let r=NE[e];return r?(...a)=>{let n=o.rowModel.getType();if(!r.includes(n)){Co(`api.${e} can only be called when gridOptions.rowModelType is ${r.join(" or ")}`);return}return t.apply(t,a)}:t}var WE={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"},qE={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},_E={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"},UE=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),jE=class extends S{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,bh(Wy)}warnOnInitialPropertyUpdate(e,t){e==="api"&&BE[t]&&R(22,{key:t})}processGridOptions(e){this.processOptions(e,Ib())}validateApiFunction(e,t){return GE(e,t,this.beans)}missingUserComponent(e,t,o,i){let r=Eo[t];r?this.gos.assertModuleRegistered(r,`AG Grid '${e}' component: ${t}`):R(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){let t=WE[e];return t?Xe(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){$E.has(e)&&R(10,{eventType:e})}validateIcon(e){if(UE.has(e)&&R(43,{iconName:e}),qE[e])return;let t=_E[e];if(t){W(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:bn(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}R(134,{iconName:e})}isProvidedUserComp(e){return!!Eo[e]}validateColDef(e){this.processOptions(e,bb())}processOptions(e,t){let{validations:o,deprecations:i,allProperties:r,propertyExceptions:a,objectName:n,docsUrl:s}=t;r&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...a!=null?a:[],...Object.keys(i)],r,n,s);let l=new Set;if(Object.keys(e).forEach(d=>{var C;let g=i[d];if(g){let{message:w,version:b}=g;l.add(`As of v${b}, ${String(d)} is deprecated. ${w!=null?w:""}`)}let u=e[d];if(u==null||u===!1)return;let h=o[d];if(!h)return;let{dependencies:p,validate:f,supportedRowModels:m,expectedType:v}=h;if(v){let w=typeof u;if(w!==v){l.add(`${String(d)} should be of type '${v}' but received '${w}' (${u}).`);return}}if(m){let w=(C=this.gridOptions.rowModelType)!=null?C:"clientSide";if(!m.includes(w)){l.add(`${String(d)} is not supported with the '${w}' row model. It is only valid with: ${m.join(", ")}.`);return}}if(p){let w=this.checkForRequiredDependencies(d,p,e);if(w){l.add(w);return}}if(f){let w=f(e,this.gridOptions,this.beans);if(w){l.add(w);return}}}),l.size>0)for(let d of l)Zo(d)}checkForRequiredDependencies(e,t,o){let r=Object.entries(t).filter(([a,n])=>{let s=o[a];return!n.required.includes(s)});return r.length===0?null:r.map(([a,n])=>{var s;return`'${String(e)}' requires '${a}' to be one of [${n.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${(s=n.reason)!=null?s:""}`}).join(` + `)}checkProperties(e,t,o,i,r){let a=["__ob__","__v_skip","__metadata__"],n=KE(Object.getOwnPropertyNames(e),[...a,...t,...o],o),s=Object.keys(n);for(let l of s){let c=n[l],d=`invalid ${i} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;o.includes("context")&&(d+=` +If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Zo(d)}if(s.length>0&&r){let l=this.beans.frameworkOverrides.getDocLink(r);Zo(`to see all the valid ${i} properties please check: ${l}`)}}};function KE(e,t,o){let i={},r=e.filter(a=>!t.some(n=>n===a));if(r.length>0)for(let a of r)i[a]=Ya({inputValue:a,allSuggestions:o}).values;return i}var $E=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),YE={moduleName:"Validation",version:P,beans:[jE]},ru={moduleName:"AllCommunity",version:P,dependsOn:[_3,uS,Zk,YE,N2,V2,G2,W2,q2,_2,U2,B2,Lk,Ok,Hk,Bk,zk,Vk,Gk,gR,Qy,TR,Ud,c3,d3,iE,Z3,Vv,NR,AE,Dy,OE,oS,HE,iR,Iy,YR,Dg,aR,aE,Nv,U3,uE]};kc.registerModules([ru]);var QE="[data-portfolio-list-panel]",ZE=".portfolio-content",lu=5,ze=1,au=6,JE=.0015;function cu(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function nu(e){let t=cu(e);return t?new Intl.DateTimeFormat("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit"}).format(t):""}function XE(e){let t=cu(e);if(!t)return"";let o=Date.now()-t.getTime();if(o<0)return nu(e);let i=Math.floor(o/6e4);if(i<1)return"\uBC29\uAE08 \uC804";if(i<60)return`${i}\uBD84 \uC804`;let r=Math.floor(i/60);return r<24?`${r}\uC2DC\uAC04 \uC804`:nu(e)}function eF(e){return`/portfolio/${encodeURIComponent(e)}`}function tF(e){let t=document.createElement("a");return t.className="portfolio-post-title-link",t.href=eF(e.data.portfolioIdntfNo),t.textContent=e.value||"",t.title=e.value||"",t}function vs(e,t={}){let o=document.createElement("button");return o.type="button",o.className="portfolio-post-page-button",o.textContent=e,t.active&&(o.classList.add("is-active"),o.setAttribute("aria-current","page")),t.disabled&&(o.disabled=!0),typeof t.onClick=="function"&&o.addEventListener("click",t.onClick),o}function ki(e,t){if(!e||!t)return;let o=e.paginationGetTotalPages(),i=e.paginationGetCurrentPage();if(t.replaceChildren(),o<=0)return;let r=10,n=Math.floor(i/r)*r,s=Math.min(n+r,o);n>0&&t.appendChild(vs("\uC774\uC804",{onClick:()=>e.paginationGoToPage(n-1)}));for(let l=n;le.paginationGoToPage(l)}));s",{onClick:()=>e.paginationGoToPage(s)}))}function oF(e,t,o){return{rowData:e,columnDefs:[{field:"title",headerName:"\uAE00 \uC81C\uBAA9",flex:1,minWidth:260,cellRenderer:tF},{field:"viewCount",headerName:"\uC870\uD68C\uC218",width:96,type:"numericColumn",headerClass:"portfolio-post-number-header",cellClass:"portfolio-post-number-cell"},{field:"registeredAt",headerName:"\uC791\uC131\uC77C",width:132,valueFormatter:i=>XE(i.value),headerClass:"portfolio-post-date-header",cellClass:"portfolio-post-date-cell"}],defaultColDef:{sortable:!0,resizable:!1,suppressMovable:!0},domLayout:"autoHeight",headerHeight:34,rowHeight:40,pagination:!0,paginationPageSize:lu,suppressPaginationPanel:!0,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,suppressHorizontalScroll:!0,getRowId:i=>i.data.portfolioIdntfNo,getRowClass:i=>i.data.portfolioIdntfNo===t?"ag-row-current-post":"",onGridReady:i=>ki(i.api,o),onPaginationChanged:i=>ki(i.api,o),localeText:{page:"\uD398\uC774\uC9C0",more:"\uB354 \uBCF4\uAE30",to:"-",of:"/",next:"\uB2E4\uC74C",last:"\uB9C8\uC9C0\uB9C9",first:"\uCC98\uC74C",previous:"\uC774\uC804",loadingOoo:"\uBD88\uB7EC\uC624\uB294 \uC911...",noRowsToShow:"\uB4F1\uB85D\uB41C \uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pageSizeSelectorLabel:"\uC904 \uBCF4\uAE30"}}}async function iF(e){let t=await fetch(e,{headers:{Accept:"application/json"},credentials:"same-origin"});if(!t.ok)throw new Error("\uD3EC\uD2B8\uD3F4\uB9AC\uC624 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.");let o=await t.json();return Array.isArray(o)?o:[]}function du(e=QE){let t=document.querySelector(e);if(!t)return null;let o=t.querySelector("[data-portfolio-list-toggle]"),i=t.querySelector("[data-portfolio-list-body]"),r=t.querySelector("[data-portfolio-list-grid]"),a=t.querySelector("[data-portfolio-pagination]"),n=t.querySelector("[data-portfolio-page-size]"),s=t.querySelector(".portfolio-post-list-summary span"),l=t.dataset.listUrl,c=t.dataset.currentId||"",d=t.dataset.initialOpen==="true";if(!o||!i||!r||!a||!l)return null;let g=!1,u=null,h=null,p=()=>(u||(u=iF(l)),u),f=async()=>{let v=await p();if(s&&(s.textContent=`${v.length}\uAC1C\uC758 \uAE00`),!h){h=vg(r,oF(v,c,a)),ki(h,a);return}h.setGridOption("rowData",v),ki(h,a)},m=async v=>{if(g=v,o.textContent=g?"\uBAA9\uB85D\uB2EB\uAE30":"\uBAA9\uB85D\uC5F4\uAE30",o.setAttribute("aria-expanded",String(g)),i.hidden=!g,!!g){o.disabled=!0;try{await f()}catch(C){window.alert(C.message||"\uD3EC\uD2B8\uD3F4\uB9AC\uC624 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."),m(!1)}finally{o.disabled=!1}}};return o.addEventListener("click",()=>{m(!g)}),n==null||n.addEventListener("change",()=>{h&&(h.setGridOption("paginationPageSize",Number.parseInt(n.value,10)||lu),h.paginationGoToPage(0),ki(h,a))}),m(d),{open:()=>m(!0),close:()=>m(!1),reload:async()=>{u=null,await f()}}}function rF(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function aF(e,t){return{x:(e.clientX+t.clientX)/2,y:(e.clientY+t.clientY)/2}}function su(e,t,o){return Math.min(Math.max(e,t),o)}function gu(e=ZE){let t=document.querySelector(e);if(!t)return null;let o=Array.from(t.querySelectorAll("img")).filter(k=>k.getAttribute("src"));if(!o.length)return null;let i=document.createElement("div");i.className="portfolio-image-zoom",i.hidden=!0,i.setAttribute("aria-hidden","true");let r=document.createElement("div");r.className="portfolio-image-zoom-stage";let a=document.createElement("img");a.className="portfolio-image-zoom-img",a.alt="",a.draggable=!1;let n=document.createElement("button");n.type="button",n.className="portfolio-image-zoom-close",n.setAttribute("aria-label","\uC774\uBBF8\uC9C0 \uD655\uB300 \uB2EB\uAE30"),n.textContent="X",r.appendChild(a),i.append(r,n),document.body.appendChild(i);let s=new Map,l=null,c=ze,d=0,g=0,u=0,h=ze,p=null,f=0,m=0,v=null,C=()=>{a.style.transform=`translate3d(${d}px, ${g}px, 0) scale(${c})`,i.classList.toggle("is-zoomed",c>ze)},w=()=>{c=ze,d=0,g=0,u=0,h=ze,p=null,f=0,m=0,v=null,s.clear(),C()},b=()=>{i.hidden=!0,i.setAttribute("aria-hidden","true"),document.body.classList.remove("portfolio-image-zoom-open"),w(),l&&typeof l.focus=="function"&&l.focus({preventScroll:!0})},x=k=>{l=document.activeElement,a.src=k.currentSrc||k.src,a.alt=k.alt||"",i.hidden=!1,i.setAttribute("aria-hidden","false"),document.body.classList.add("portfolio-image-zoom-open"),w(),n.focus({preventScroll:!0})},E=()=>{let k=Array.from(s.values());if(k.length>=2){let[F,z]=k,L=rF(F,z),H=aF(F,z);(!u||!p)&&(u=L,h=c,p=H,f=d,m=g),c=su(h*(L/u),ze,au),c<=ze?(d=0,g=0):(d=f+H.x-p.x,g=m+H.y-p.y),v=null,C();return}if(u=0,p=null,k.length===1&&c>ze){let[F]=k;v&&(d+=F.clientX-v.clientX,g+=F.clientY-v.clientY),v={clientX:F.clientX,clientY:F.clientY},C();return}v=null},D=(k,F,z)=>{let L=c,H=a.getBoundingClientRect(),j=H.left+H.width/2,A=H.top+H.height/2;if(c=su(k,ze,au),c<=ze){d=0,g=0,C();return}let B=c/L;d+=(1-B)*(F-j),g+=(1-B)*(z-A),C()};o.forEach(k=>{k.classList.add("portfolio-zoomable-image"),k.setAttribute("tabindex","0"),k.setAttribute("role","button"),k.setAttribute("aria-label","\uC774\uBBF8\uC9C0 \uC6D0\uBCF8 \uD655\uB300 \uBCF4\uAE30"),k.addEventListener("click",F=>{F.preventDefault(),x(k)}),k.addEventListener("keydown",F=>{F.key!=="Enter"&&F.key!==" "||(F.preventDefault(),x(k))})}),i.addEventListener("click",k=>{(k.target===i||k.target===r)&&b()}),n.addEventListener("click",b),i.addEventListener("pointerdown",k=>{var F;k.target!==a&&k.target!==r||k.pointerType==="mouse"&&k.button!==0||(s.set(k.pointerId,k),(F=i.setPointerCapture)==null||F.call(i,k.pointerId),E())}),i.addEventListener("pointermove",k=>{s.has(k.pointerId)&&(s.set(k.pointerId,k),E())});let T=k=>{var F;s.delete(k.pointerId),(F=i.releasePointerCapture)==null||F.call(i,k.pointerId),u=0,p=null,v=null};return i.addEventListener("pointerup",T),i.addEventListener("pointercancel",T),i.addEventListener("wheel",k=>{if(i.hidden)return;k.preventDefault();let F=c*(1-k.deltaY*JE);D(F,k.clientX,k.clientY)},{passive:!1}),a.addEventListener("dblclick",k=>{k.preventDefault(),D(c>ze?ze:2.5,k.clientX,k.clientY)}),document.addEventListener("keydown",k=>{i.hidden||k.key!=="Escape"||b()}),{open:x,close:b}}document.addEventListener("DOMContentLoaded",()=>{du(),gu()});return vu(nF);})(); diff --git a/src/main/resources/templates/kr/iotdoor/cmty/portfolio/detail.html b/src/main/resources/templates/kr/iotdoor/cmty/portfolio/detail.html index 657b70c..a7ada9f 100644 --- a/src/main/resources/templates/kr/iotdoor/cmty/portfolio/detail.html +++ b/src/main/resources/templates/kr/iotdoor/cmty/portfolio/detail.html @@ -6,8 +6,8 @@ layout:decorate="~{kr/iotdoor/comn/site/layout/cmmnSiteLayout.html}"> - - + + @@ -72,6 +72,6 @@ - + diff --git a/src/main/resources/templates/kr/iotdoor/cmty/portfolio/portfolio.html b/src/main/resources/templates/kr/iotdoor/cmty/portfolio/portfolio.html index 5a9c9b5..7b7be69 100644 --- a/src/main/resources/templates/kr/iotdoor/cmty/portfolio/portfolio.html +++ b/src/main/resources/templates/kr/iotdoor/cmty/portfolio/portfolio.html @@ -6,8 +6,8 @@ layout:decorate="~{kr/iotdoor/comn/site/layout/cmmnSiteLayout.html}"> - - + + @@ -91,6 +91,6 @@ - +