ag-grid-community 33.2.0 → 33.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  var _e=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const s=(a,l)=>a.forEach(d=>{if(!l.has(d))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(c):c()}),o=this.getListeners(i,t,!1)??new Set,n=new Set(o);n.size>0&&s(n,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(i,e)):()=>a(i,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function Eu(e,t){return t}function _s(e){return e?.getLocaleTextFunc()??Eu}function ce(e,t,i){i==null||typeof i=="string"&&i==""?Us(e,t):ue(e,t,i)}function ue(e,t,i){e.setAttribute(qn(t),i.toString())}function Us(e,t){e.removeAttribute(qn(t))}function qn(e){return`aria-${e}`}function Ee(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Du(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Pu(e){return parseInt(e.getAttribute("aria-posinset"),10)}function Mu(e){return e.getAttribute("aria-label")}function $t(e,t){ce(e,"label",t)}function Hi(e,t){ce(e,"labelledby",t)}function Au(e,t){ce(e,"describedby",t)}function Yn(e,t){ce(e,"live",t)}function Tu(e,t){ce(e,"atomic",t)}function ku(e,t){ce(e,"relevant",t)}function Iu(e,t){ce(e,"level",t)}function Qn(e,t){ce(e,"disabled",t)}function $s(e,t){ce(e,"hidden",t)}function Lu(e,t){ce(e,"activedescendant",t)}function Bi(e,t){ue(e,"expanded",t)}function Ou(e){Us(e,"expanded")}function Zn(e,t){ue(e,"setsize",t)}function Xn(e,t){ue(e,"posinset",t)}function Gu(e,t){ue(e,"multiselectable",t)}function Jn(e,t){ue(e,"rowcount",t)}function Vi(e,t){ue(e,"rowindex",t)}function Hu(e,t){ue(e,"rowspan",t)}function er(e,t){ue(e,"colcount",t)}function Ks(e,t){ue(e,"colindex",t)}function tr(e,t){ue(e,"colspan",t)}function ir(e,t){ue(e,"sort",t)}function sr(e){Us(e,"sort")}function Ni(e,t){ce(e,"selected",t)}function Bu(e,t){ue(e,"checked",t===void 0?"mixed":t)}function or(e,t){ce(e,"controls",t.id),Hi(t,e.id)}function Vu(e,t){ce(e,"haspopup",t===!1?null:t)}function js(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var qs,Ys,Qs,Zs,Xs,Js,eo,to;function Ge(){return qs===void 0&&(qs=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),qs}function nr(){if(Ys===void 0){const e=window;Ys=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Ys}function io(){return Qs===void 0&&(Qs=/(firefox)/i.test(navigator.userAgent)),Qs}function rr(){return Zs===void 0&&(Zs=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Zs}function Ue(){return Xs===void 0&&(Xs=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Xs}function so(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!io())?null:t.toString()}function Nu(){if(to!==void 0)return to;if(!document.body)return-1;let e=1e6;const t=io()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),to=e,e}function zu(){return eo==null&&ar(),eo}function ar(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(eo=i,Js=i===0)}function lr(){return Js==null&&ar(),Js}var zi;function Wu(e,t,i){const s=e.parentElement;let o=s&&s.firstChild;for(;o;)t&&o.classList.toggle(t,o===e),i&&o.classList.toggle(i,o!==e),o=o.nextSibling}var _u="[tabindex], input, select, button, textarea, [href]",dr="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function oo(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,dr),n=ve(e);return s&&!o&&n}function N(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||$s(e,!t)}function cr(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||$s(e,!t)}function Mt(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e);const o=e.querySelectorAll("input")??[];for(const n of o)s(n)}function it(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function st(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:f}}function Wi(e){const t=st(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function At(e){const t=st(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function no(e){const{height:t,marginBottom:i,marginTop:s}=st(e);return Math.floor(t+i+s)}function Kt(e){const{width:t,marginLeft:i,marginRight:s}=st(e);return Math.floor(t+i+s)}function ur(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=st(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function _i(){if(typeof zi=="boolean")return zi;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 2px">
2
2
  <span style="display: inline-block; width: 1px"></span>
3
3
  <span style="display: inline-block; width: 1px"></span>
4
- </div>`,document.body.appendChild(e),e.scrollLeft=1,zi=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),zi}function Ui(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),nr()&&!_i()&&(i=e.scrollWidth-e.getBoundingClientRect().width-i)),i}function $i(e,t,i){i&&(_i()?t*=-1:(Ge()||nr())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function X(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function he(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function hr(e){return!!e.offsetParent}function ve(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!hr(e)||window.getComputedStyle(e).visibility!=="visible")}function jt(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function gr(e,t,i){i&&i.nextSibling===t||(e.firstChild?i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function pr(e,t){for(let i=0;i<t.length;i++){const s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}function Uu(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function qt(e,t){if(t)for(const i of Object.keys(t)){const s=t[i];if(!i||!i.length||s==null)continue;const o=Uu(i),n=s.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(o,r,a)}}function $u(e){return e.clientWidth<e.scrollWidth}function Ku(e){return e.clientHeight<e.scrollHeight}function Ki(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Se(e,t)}function Se(e,t){t=ro(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Yt(e,t){t=ro(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function ro(e){return typeof e=="number"?`${e}px`:e}function ji(e){return e instanceof Node||e instanceof HTMLElement}function we(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function He(e,t,i){const o=Tr(e).ResizeObserver,n=o?new o(i):null;return n?.observe(t),()=>n?.disconnect()}function ju(e){const t=dt(e),i="getSelection"in t?t.getSelection():null,s=[];for(let o=0;o<(i?.rangeCount??0);o++){const n=i?.getRangeAt(o);n&&s.push(n)}return{selection:i,ranges:s}}function qu(e,t){if(!e.gos.get("enableCellTextSelection")||!io()&&!Ge())return t();const{selection:s,ranges:o}=ju(e);t(),s?.removeAllRanges();for(const n of o)s?.addRange(n)}function De(e,t){const i=Tr(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var fr="data-ref",ao;function mr(){return ao??(ao=document.createTextNode(" ")),ao.cloneNode()}function _(e){const{attrs:t,children:i,cls:s,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),o&&a.setAttribute(fr,o),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if(typeof i=="string")a.textContent=i;else{let l=!0;for(const d of i)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(mr()),l=!1),a.append(_(d)),a.appendChild(mr())))}return a}function Pe(e){return e==null||e===""?null:e}function x(e){return e!=null&&e!==""}function B(e){return!x(e)}function qi(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Tt(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function Cr(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var vr="https://www.ag-grid.com",wr={};function lo(e,t){wr[t]||(e(),wr[t]=!0)}function $e(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function ot(e,...t){lo(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function kt(e,...t){lo(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Yu={pending:!1,funcs:[]},Qu={pending:!1,funcs:[]};function Yi(e,t="setTimeout",i){const s=t==="raf"?Qu:Yu;if(s.funcs.push(e),s.pending)return;s.pending=!0;const o=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1,n.forEach(r=>r())};t==="raf"?De(i,o):window.setTimeout(o,0)}function Q(e,t,i){let s;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},i)}}function br(e,t){let i=0;return function(...s){const o=this,n=Date.now();n-i<t||(i=n,e.apply(o,s))}}function Sr(e,t,i=100,s){const o=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-o>i;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&s&&ot(s))};a(),r||(n=window.setInterval(a,10))}var D="33.2.0",yr=2e3,Rr=100,xr="_version_",Fr=null,Zu=!1,nt=`${vr}/javascript-data-grid`;function Xu(e){Fr=e}function Ju(e){nt=e}function Er(e,t,i){return Fr?.getConsoleMessage(e,t)??[sh(e,t,i)]}function co(e,t,i,s){Zu||e(`error #${t}`,...Er(t,i,s))}function eh(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))typeof e[i]!="object"&&typeof e[i]!="function"&&(t[i]=e[i]);return JSON.stringify(t)}function th(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=eh(e)),t}function Qi(e){return e===void 0?"undefined":e===null?"null":e}function uo(e,t){return`${e}?${t.toString()}`}function ih(e,t,i){const s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=uo(e,t);for(const[n,r]of s){if(n===xr)continue;const a=o.length-i;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>Rr?r.slice(0,r.length-d)+l:r.slice(0,Rr)+l;t.set(n,c),o=uo(e,t)}return o}function Dr(e,t){const i=new URLSearchParams;if(i.append(xr,D),t)for(const n of Object.keys(t))i.append(n,th(t[n]));const s=`${nt}/errors/${e}`,o=uo(s,i);return o.length<=yr?o:ih(s,i,yr)}var sh=(e,t,i)=>{const s=Dr(e,t);return`${i?i+`
4
+ </div>`,document.body.appendChild(e),e.scrollLeft=1,zi=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),zi}function Ui(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),nr()&&!_i()&&(i=e.scrollWidth-e.getBoundingClientRect().width-i)),i}function $i(e,t,i){i&&(_i()?t*=-1:(Ge()||nr())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function X(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function he(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function hr(e){return!!e.offsetParent}function ve(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!hr(e)||window.getComputedStyle(e).visibility!=="visible")}function jt(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function gr(e,t,i){i&&i.nextSibling===t||(e.firstChild?i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function pr(e,t){for(let i=0;i<t.length;i++){const s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}function Uu(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function qt(e,t){if(t)for(const i of Object.keys(t)){const s=t[i];if(!i||!i.length||s==null)continue;const o=Uu(i),n=s.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(o,r,a)}}function $u(e){return e.clientWidth<e.scrollWidth}function Ku(e){return e.clientHeight<e.scrollHeight}function Ki(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Se(e,t)}function Se(e,t){t=ro(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Yt(e,t){t=ro(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function ro(e){return typeof e=="number"?`${e}px`:e}function ji(e){return e instanceof Node||e instanceof HTMLElement}function we(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function He(e,t,i){const o=Tr(e).ResizeObserver,n=o?new o(i):null;return n?.observe(t),()=>n?.disconnect()}function ju(e){const t=dt(e),i="getSelection"in t?t.getSelection():null,s=[];for(let o=0;o<(i?.rangeCount??0);o++){const n=i?.getRangeAt(o);n&&s.push(n)}return{selection:i,ranges:s}}function qu(e,t){if(!e.gos.get("enableCellTextSelection")||!io()&&!Ge())return t();const{selection:s,ranges:o}=ju(e);t(),s?.removeAllRanges();for(const n of o)s?.addRange(n)}function De(e,t){const i=Tr(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var fr="data-ref",ao;function mr(){return ao??(ao=document.createTextNode(" ")),ao.cloneNode()}function _(e){const{attrs:t,children:i,cls:s,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),o&&a.setAttribute(fr,o),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if(typeof i=="string")a.textContent=i;else{let l=!0;for(const d of i)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(mr()),l=!1),a.append(_(d)),a.appendChild(mr())))}return a}function Pe(e){return e==null||e===""?null:e}function x(e){return e!=null&&e!==""}function B(e){return!x(e)}function qi(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Tt(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function Cr(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var vr="https://www.ag-grid.com",wr={};function lo(e,t){wr[t]||(e(),wr[t]=!0)}function $e(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function ot(e,...t){lo(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function kt(e,...t){lo(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Yu={pending:!1,funcs:[]},Qu={pending:!1,funcs:[]};function Yi(e,t="setTimeout",i){const s=t==="raf"?Qu:Yu;if(s.funcs.push(e),s.pending)return;s.pending=!0;const o=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1,n.forEach(r=>r())};t==="raf"?De(i,o):window.setTimeout(o,0)}function Q(e,t,i){let s;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},i)}}function br(e,t){let i=0;return function(...s){const o=this,n=Date.now();n-i<t||(i=n,e.apply(o,s))}}function Sr(e,t,i=100,s){const o=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-o>i;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&s&&ot(s))};a(),r||(n=window.setInterval(a,10))}var D="33.2.1",yr=2e3,Rr=100,xr="_version_",Fr=null,Zu=!1,nt=`${vr}/javascript-data-grid`;function Xu(e){Fr=e}function Ju(e){nt=e}function Er(e,t,i){return Fr?.getConsoleMessage(e,t)??[sh(e,t,i)]}function co(e,t,i,s){Zu||e(`error #${t}`,...Er(t,i,s))}function eh(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))typeof e[i]!="object"&&typeof e[i]!="function"&&(t[i]=e[i]);return JSON.stringify(t)}function th(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=eh(e)),t}function Qi(e){return e===void 0?"undefined":e===null?"null":e}function uo(e,t){return`${e}?${t.toString()}`}function ih(e,t,i){const s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=uo(e,t);for(const[n,r]of s){if(n===xr)continue;const a=o.length-i;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>Rr?r.slice(0,r.length-d)+l:r.slice(0,Rr)+l;t.set(n,c),o=uo(e,t)}return o}function Dr(e,t){const i=new URLSearchParams;if(i.append(xr,D),t)for(const n of Object.keys(t))i.append(n,th(t[n]));const s=`${nt}/errors/${e}`,o=uo(s,i);return o.length<=yr?o:ih(s,i,yr)}var sh=(e,t,i)=>{const s=Dr(e,t);return`${i?i+`
5
5
  `:""}Visit ${s}${i?"":`
6
6
  Alternatively register the ValidationModule to see the full message in the console.`}`};function R(...e){co(ot,e[0],e[1])}function O(...e){co(kt,e[0],e[1])}function ho(e,t,i){co(kt,e,t,i)}function Pr(e,t){const i=t[0];return`error #${i} `+Er(i,t[1],e).join(" ")}function Be(...e){return Pr(void 0,e)}function oh(...e){return Pr(`
7
7
  `,e)}function Mr(e,t){return e.get("rowModelType")===t}function J(e,t){return Mr(e,"clientSide")}function rt(e,t){return Mr(e,"serverSide")}function Z(e,t){return e.get("domLayout")===t}function Ke(e){return Xt(e)!==void 0}function go(e){return typeof e.get("getRowHeight")=="function"}function nh(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function at(e,t,i=!1,s){const{gos:o,environment:n}=e;if(s==null&&(s=n.getDefaultRowHeight()),go(o)){if(i)return{height:s,estimated:!0};const l={node:t,data:t.data},d=o.getCallback("getRowHeight")(l);if(po(d))return d===0&&R(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&o.get("masterDetail"))return rh(o);const r=o.get("rowHeight");return{height:r&&po(r)?r:s,estimated:!1}}function rh(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return po(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function je(e){const{environment:t,gos:i}=e,s=i.get("rowHeight");if(!s||B(s))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:(R(24),t.getDefaultRowHeight())}function po(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Ar(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function lt(e,t,i,s){const o=e.getDomDataKey();let n=t[o];B(n)&&(n={},t[o]=n),n[i]=s}function $(e){const{gos:t,eGridDiv:i}=e;let s=null;const o=t.get("getDocument");return o&&x(o)?s=o():i&&(s=i.ownerDocument),s&&x(s)?s:document}function Tr(e){return $(e).defaultView||window}function dt(e){return e.eGridDiv.getRootNode()}function z(e){return dt(e).activeElement}function Zi(e){let t=null,i=null;try{t=$(e).fullscreenElement}catch{}finally{t||(t=dt(e));const s=t.querySelector("body");s?i=s:t instanceof ShadowRoot?i=t:t instanceof Document?i=t?.documentElement:i=t}return i}function ah(e){return Zi(e)?.clientWidth??(window.innerHeight||-1)}function lh(e){return Zi(e)?.clientHeight??(window.innerHeight||-1)}function kr(e,t,i){const o=e.getBoundingClientRect().height,n=ah(i)-2,r=lh(i)-2;if(!e.offsetParent)return;const l=ur(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-o/2,h=c-l.left-10;const g=$(i),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,m=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+m&&(h=n+m-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function fo(e){const t=$(e),i=z(e);return i===null||i===t.body}function ct(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function mo(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Z(e,"print"))}function ye(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Xi(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function dh(e){return e.get("grandTotalRow")}function ch(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function Ir(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Ji(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function ut(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(R(25,{id:s}),s=String(s)),s}}function Lr(e,t){const i=e.get("groupHideParentOfSingleChild");return!!(i===!0||i==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Or(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function uh(e,t){const i=e.get("suppressGroupChangesColumnVisibility");if(i===!0||t&&i==="suppressHideOnGroup"||!t&&i==="suppressShowOnUngroup")return!1;const s=e.get("suppressRowGroupHidesColumns");if(t&&s===!0)return!1;const o=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&o===!0)}function ht(e){return e?.checkboxes??!0}function Qt(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Zt(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Co(e){return e?.hideDisabledCheckboxes??!1}function Gr(e){return typeof e.get("rowSelection")!="string"}function hh(e){return e.get("cellSelection")!==void 0}function gh(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function Me(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function ph(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&t.handle?.mode==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function Hr(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return i&&s?!1:i?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function fh(e){const t=Hr(e);return t===!0||t==="enableSelection"}function mh(e){const t=Hr(e);return t===!0||t==="enableDeselection"}function es(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Xt(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function It(e){return Xt(e)==="multiRow"}function Ch(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Jt(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Br(e,t=!0){const i=e.get("rowSelection");return typeof i!="object"?t?"all":void 0:i.mode==="multiRow"?i.selectAll:"all"}function Lt(e){const t=Jt(e);return t==="descendants"||t==="filteredDescendants"}function Vr(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function vo(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function ae(e){return e.get("columnMenu")==="legacy"}function Nr(e){return!ae(e)}function wo(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function vh(e,t,i){typeof e!="object"&&(e={});const s={...e};return i.forEach(o=>{const n=t[o];typeof n<"u"&&(s[o]=n)}),s}function wh(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).forEach(r=>{i[r]=e[r],s=!0}),!s)return;const o={type:"gridOptionsChanged",options:i};t.dispatchEvent(o);const n={type:"componentStateChanged",...i};t.dispatchEvent(n)}function T(e,t){return e.addGridCommonParams(t)}function zr(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var Wr="__ag_Grid_Stop_Propagation",bh=["touchstart","touchend","touchmove","touchcancel","scroll"],Sh=["wheel"],bo={};function gt(e){e[Wr]=!0}function Ae(e){return e[Wr]===!0}var _r=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof bo[i]=="boolean")return bo[i];const s=document.createElement(e[i]||"div");return i="on"+i,bo[i]=i in s}})();function Ur(e,t,i){let s=t;for(;s;){const o=Ar(e,s,i);if(o)return o;s=s.parentElement}return null}function $r(e,t){return!t||!e?!1:Rh(t).indexOf(e)>=0}function yh(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function Rh(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():yh(t)}function xh(e,t,i,s){const o=Kr(i);let n;o!=null&&(n={passive:o}),e&&e.addEventListener&&e.addEventListener(t,i,s,n)}var Kr=e=>{const t=bh.includes(e),i=Sh.includes(e);if(t)return!0;if(i)return!1},S=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new _e),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService?.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s of Object.keys(t)){const o=t[s];o&&i.push(this._setupListener(e,s,o))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;let s;return Fh(e)?(e.__addEventListener(t,i),s=()=>(e.__removeEventListener(t,i),null)):(e instanceof HTMLElement?xh(this.beans.frameworkOverrides,e,t,i):e.addEventListener(t,i),s=()=>(e.removeEventListener(t,i),null)),this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}setupGridOptionListener(e,t){const{gos:i}=this;i.addPropertyEventListener(e,t);const s=()=>(i.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=o.changeSet.id}const n={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(n)};e.forEach(o=>this.setupGridOptionListener(o,s))}getLocaleTextFunc(){return _s(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function Fh(e){return e.__addEventListener!==void 0}var jr=new Set(["__proto__","constructor","prototype"]);function Eh(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(const i of Object.keys(e))t(i,e[i])}}function ee(e,t,i=!0,s=!1){x(t)&&Eh(t,(o,n)=>{if(jr.has(o))return;let r=e[o];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),qr(n)&&qr(r)&&!Array.isArray(r)?ee(r,n,i,s):(i||n!==void 0)&&(e[o]=n))})}function ei(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let n=0;n<s.length;n++){if(o==null)return;o=o[s[n]]}return o}function qr(e){return typeof e=="object"&&e!==null}var Dh=/[&<>"']/g,Ph={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Te(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(Dh,s=>Ph[s])}var Mh={resizable:!0,sortable:!0},Ah=0;function Yr(){return Ah++}function Ve(e){return e instanceof ts}var ts=class extends S{constructor(e,t,i,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.isColumn=!0,this.instanceId=Yr(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new _e,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Te(i)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:s}}=this;t?.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,i?.initCol(this),s?.initCol(this)}setColDef(e,t,i){const s=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),s&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",i)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:i}}=this,s=e.get("suppressFieldDotNotation");this.fieldContainsDots=x(t)&&t.indexOf(".")>=0&&!s,this.tooltipFieldContainsDots=x(i)&&i.indexOf(".")>=0&&!s}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=e.width,s=e.initialWidth;return i!=null?t=i:s!=null?t=s:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const i=this.frameworkEventListenerService?.wrap(t)??t;this.colEventSvc.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(t)??t;this.colEventSvc.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return T(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable(this,e)??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Mh[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}createColumnEvent(e,t){return T(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return B(this.sort)}isSorting(){return x(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return R(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return T(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(B(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(B(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||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}dispatchColEvent(e,t,i){const s=this.createColumnEvent(e,t);i&&ee(s,i),this.colEventSvc.dispatchEvent(s)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function te(e){return e instanceof ti}var ti=class extends S{constructor(e,t,i,s){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=s,this.isColumn=!1,this.expandable=!1,this.instanceId=Yr(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{Ve(t)?e.push(t):te(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.__addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.__removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let n=0,r=s.length;n<r;n++){const a=s[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,i=!0):l==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const o=e&&t&&i;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{te(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Th={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},Qr=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=qi(e);let i=0;for(;;){let s=e??t;if(s?i!==0&&(s+="_"+i):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},So=Object.freeze([]);function G(e){if(e?.length)return e[e.length-1]}function qe(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s)}function is(e,t){if(e)for(const i of e)t(i)}function ge(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Zr(e,t,i){for(let s=0;s<t.length;s++)ge(e,t[s]);for(let s=t.length-1;s>=0;s--)e.splice(i,0,t[s])}function kh(e){return[].concat.apply([],e)}var ii="ag-Grid-AutoColumn",yo="ag-Grid-SelectionColumn",Xr="ag-Grid-RowNumbersColumn";function Ro(e){const t=[],i=s=>{for(let o=0;o<s.length;o++){const n=s[o];Ve(n)?t.push(n):te(n)&&i(n.getChildren())}};return i(e),t}function Ne(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function si(e,t,i){const s={};if(!t)return;ze(null,t,n=>{s[n.getInstanceId()]=n}),i&&ze(null,i,n=>{s[n.getInstanceId()]=null});const o=Object.values(s).filter(n=>n!=null);e.context.destroyBeans(o)}function ss(e){return e.getId().startsWith(ii)}function ke(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(yo)??!1}function pt(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Xr)??!1}function os(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Jr(e,t){return qe(e,t,(i,s)=>i.getColId()===s.getColId())}function ea(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function ft(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function xo(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}var Ih=(e,t)=>(i,s)=>{const o={value1:void 0,value2:void 0};let n=!1;return e&&(e[i]!==void 0&&(o.value1=e[i],n=!0),x(s)&&e[s]!==void 0&&(o.value2=e[s],n=!0)),!n&&t&&(t[i]!==void 0&&(o.value1=t[i]),x(s)&&t[s]!==void 0&&(o.value2=t[s])),o};function ta(e,t=null,i,s,o){const n=new Qr,{existingCols:r,existingGroups:a,existingColKeys:l}=Lh(s);n.addExistingKeys(l);const d=ia(e,t,0,i,r,n,a,o),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return ze(null,h,(p,f)=>{te(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDept:u}}function Lh(e){const t=[],i=[],s=[];return e&&ze(null,e,o=>{if(te(o)){const n=o;i.push(n)}else{const n=o;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}function ia(e,t,i,s,o,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];l&&Vh(u)?d[c]=l.createProvidedColumnGroup(s,u,i,o,n,r,a):d[c]=Oh(e,s,u,o,n,a)}return d}function Oh(e,t,i,s,o,n){const r=Gh(i,s);r&&s?.splice(r.idx,1);let a=r?.column;if(a){const l=ns(e,i,a.getColId());a.setColDef(l,i,n),oa(e,a,l,n)}else{const l=o.getUniqueKey(i.colId,i.field),d=ns(e,i,l);a=new ts(d,i,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function sa(e,t,i,s,o,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;i!==void 0&&t.setVisible(!i,a),l&&(l.updateColSort(t,s,a),o!==void 0&&l.setColSortIndex(t,o)),n!==void 0&&d?.setColPinned(t,n),r!==void 0&&c?.setColFlex(t,r)}function oa(e,t,i,s){sa(e,t,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,s);const o=t.getFlex();if(!(o!=null&&o>0))if(i.width!=null)t.setActualWidth(i.width,s);else{const n=t.getActualWidth();t.setActualWidth(n,s)}}function Gh(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}function ns(e,t,i,s){const{gos:o,dataTypeSvc:n,validation:r}=e,a={},l=o.get("defaultColDef");ee(a,l,!1,!0);const d=Hh(e,a,t,i);d&&Bh(e,d,a),ee(a,t,!1,!0);const c=o.get("autoGroupColumnDef"),u=ye(o);return t.rowGroup&&c&&u&&ee(a,{sort:c.sort,initialSort:c.initialSort},!1,!0),n?.validateColDef(a),r?.validateColDef(a,i,s),a}function Hh(e,t,i,s){const o=e.dataTypeSvc?.updateColDefAndGetColumnType(t,i,s),n=i.type??o??t.type;return t.type=n,n?os(n):void 0}function Bh(e,t,i){if(!t.length)return;const s=Object.assign({},Th),o=e.gos.get("columnTypes")||{};for(const n of Object.keys(o)){const r=o[n];n in s?R(34,{key:n}):(r.type&&R(35),s[n]=r)}t.forEach(n=>{const r=s[n.trim()];r?ee(i,r,!1,!0):R(36,{t:n})})}function Vh(e){return e.children!==void 0}function ze(e,t,i){if(t)for(let s=0;s<t.length;s++){const o=t[s];te(o)&&ze(o,o.getChildren(),i),i(o,e)}}function na(e,t){const i=[],s=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?i.push(r):s.push(r)}),t.get("enableRtl")?[...o,...s,...i]:[...i,...s,...o]}function ra(e,t){let i=!0;return ze(null,t,s=>{if(!te(s))return;const o=s,n=o.getColGroupDef();if(!(n&&n.marryChildren))return;const a=[];o.getLeafColumns().forEach(h=>{const g=e.indexOf(h);a.push(g)});const l=Math.max.apply(Math,a),d=Math.min.apply(Math,a),c=l-d,u=o.getLeafColumns().length-1;c>u&&(i=!1)}),i}function aa(e,t){if(!e||e.length==0)return;const i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}function la(e,t,i){if(!t.length)return;const s=t.length===1?t[0]:null,o=aa(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:s,source:i})}function Nh(e,t,i){if(!t.length)return;const s=t.length===1?t[0]:null,o=aa(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:s,source:i})}function da(e,t,i,s){e.dispatchEvent({type:t,columns:i,column:i&&i.length==1?i[0]:null,source:s})}function Ot(e,t,i,s,o=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:i,source:s})}function le(e,t,i){const{colModel:s,rowGroupColsSvc:o,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=s.getColDefCols()||[];if(!f?.length)return!1;if(t?.state&&!t.state.forEach)return R(32),!1;const m=(y,P,E,A,I)=>{if(!y)return;const M=Ih(P,t.defaultState),V=M("flex").value1;if(sa(e,y,M("hide").value1,M("sort").value1,M("sortIndex").value1,M("pinned").value1,V,i),V==null){const j=M("width").value1;if(j!=null){const Ce=y.getColDef().minWidth??u.getDefaultColumnMinWidth();Ce!=null&&j>=Ce&&y.setActualWidth(j,i)}}I||!y.isPrimary()||(h?.syncColumnWithState(y,i,M),o?.syncColumnWithState(y,i,M,E),n?.syncColumnWithState(y,i,M,A))},C=(y,P,E)=>{const A=ua(e,i),I=P.slice(),M={},V={},j=[],Ce=[],Fe=[];let re=0;const Gi=o?.columns.slice()??[],Fu=n?.columns.slice()??[];y.forEach(se=>{const Ut=se.colId;if(Ut.startsWith(ii)){j.push(se),Fe.push(se);return}if(ke(Ut)){Ce.push(se),Fe.push(se);return}const Pt=E(Ut);Pt?(m(Pt,se,M,V,!1),ge(I,Pt)):(Fe.push(se),re+=1)});const $n=se=>m(se,null,M,V,!1);I.forEach($n),o?.sortColumns(ga.bind(o,M,Gi)),n?.sortColumns(ga.bind(n,V,Fu)),s.refreshCols(!1);const Kn=(se,Ut,Ws=[])=>{Ut.forEach(Pt=>{const jn=se(Pt.colId);ge(Ws,jn),m(jn,Pt,null,null,!0)}),Ws.forEach($n)};return Kn(se=>r?.getColumn(se)??null,j,r?.getColumns()?.slice()),Kn(se=>a?.getColumn(se)??null,Ce,a?.getColumns()?.slice()),zh(t,s,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),A(),{unmatchedAndAutoStates:Fe,unmatchedCount:re}};l?.start();let{unmatchedAndAutoStates:w,unmatchedCount:v}=C(t.state||[],f,y=>s.getColDefCol(y));if(w.length>0||x(t.defaultState)){const y=c?.getPivotResultCols()?.list??[];v=C(w,y,P=>c?.getPivotResultCol(P)??null).unmatchedCount}return l?.finish(),v===0}function ca(e,t){const{colModel:i,autoColSvc:s,selectionColSvc:o}=e,n=i.getColDefCols();if(!n?.length)return;const r=i.getColDefColTree(),a=Ro(r),l=[];let d=1e3,c=1e3;const u=m=>{const C=ha(m);B(C.rowGroupIndex)&&C.rowGroup&&(C.rowGroupIndex=d++),B(C.pivotIndex)&&C.pivot&&(C.pivotIndex=c++),l.push(C)};s?.getColumns()?.forEach(u),o?.getColumns()?.forEach(u),a?.forEach(u),le(e,{state:l},t);const h=s?.getColumns()??[],f=[...o?.getColumns()??[],...h,...n].map(m=>({colId:m.colId}));le(e,{state:f,applyOrder:!0},t)}function ua(e,t){const{rowGroupColsSvc:i,pivotColsSvc:s,valueColsSvc:o,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:i?.columns.slice()??[],pivotColumns:s?.columns.slice()??[],valueColumns:o?.columns.slice()??[]},d=Gt(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(E,A,I,M)=>{const V=A.map(M),j=I.map(M);if(qe(V,j))return;const Fe=new Set(A);I.forEach(Gi=>{Fe.delete(Gi)||Fe.add(Gi)});const re=[...Fe];a.dispatchEvent({type:E,columns:re,column:re.length===1?re[0]:null,source:t})},h=E=>{const A=[];return n.forAllCols(I=>{const M=c[I.getColId()];M&&E(M,I)&&A.push(I)}),A},g=E=>E.getColId();u("columnRowGroupChanged",l.rowGroupColumns,i?.columns??[],g),u("columnPivotChanged",l.pivotColumns,s?.columns??[],g);const f=h((E,A)=>{const I=E.aggFunc!=null,M=I!=A.isValueActive(),V=I&&E.aggFunc!=A.getAggFunc();return M||V});f.length>0&&da(a,"columnValueChanged",f,t),Ot(a,h((E,A)=>E.width!=A.getActualWidth()),!0,t),la(a,h((E,A)=>E.pinned!=A.getPinned()),t),Nh(a,h((E,A)=>E.hide==A.isVisible()),t);const y=h((E,A)=>E.sort!=A.getSort()||E.sortIndex!=A.getSortIndex());y.length>0&&r?.dispatchSortChangedEvents(t,y);const P=Gt(e);_h(d,P,t,n,a)}}function Gt(e){const{colModel:t,rowGroupColsSvc:i,pivotColsSvc:s}=e,o=t.getColDefCols();if(B(o)||!t.isAlive())return[];const n=i?.columns,r=s?.columns,a=[],l=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,f=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:f,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),a}function ha(e){const t=(p,f)=>p??f??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),n=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex);let d=t(i.rowGroupIndex,i.initialRowGroupIndex),c=t(i.rowGroup,i.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:n,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function zh(e,t,i){if(!e.applyOrder||!e.state)return;const s=[];e.state.forEach(o=>{o.colId!=null&&s.push(o.colId)}),Wh(t.cols,s,t,i)}function Wh(e,t,i,s){if(e==null)return;let o=[];const n={};t.forEach(a=>{if(n[a])return;const l=e.map[a];l&&(o.push(l),n[a]=!0)});let r=0;if(e.list.forEach(a=>{const l=a.getColId();if(n[l]!=null)return;l.startsWith(ii)?o.splice(r++,0,a):o.push(a)}),o=na(o,s),!ra(o,i.getColTree())){R(39);return}e.list=o}function _h(e,t,i,s,o){const n={};t.forEach(c=>n[c.colId]=c);const r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),d=[];l.forEach((c,u)=>{const h=a&&a[u];if(h&&h.colId!==c.colId){const g=s.getCol(h.colId);g&&d.push(g)}}),d.length&&o.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:i})}var ga=(e,t,i,s)=>{const o=e[i.getId()],n=e[s.getId()],r=o!=null,a=n!=null;if(r&&a)return o-n;if(r)return-1;if(a)return 1;const l=t.indexOf(i),d=t.indexOf(s),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},Uh=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"],e=>this.refreshAll(ft(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),ft(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:i,colAutosize:s,rowGroupColsSvc:o,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,colViewport:l,eventSvc:d}=t,c=this.colDefs?ua(t,e):void 0;i?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=ta(t,this.colDefs,!0,h,e);si(t,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,f=g.treeDept,m=Ro(p),C={};m.forEach(w=>C[w.getId()]=w),this.colDefCols={tree:p,treeDepth:f,list:m,map:C},o?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),d.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&s?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:o,quickFilter:n,pivotResultCols:r,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([i,s,o],h);const g=nh(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),a?.refresh(),n?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(h),d.clear(),c.clear(),!qe(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)}),i.addColumns(t))}selectCols(e,t){const i=e?.getPivotResultCols()??null;this.showingPivotResult=i!=null;const{map:s,list:o,tree:n,treeDepth:r}=i??t;return this.cols={list:o.slice(),map:{...s},tree:n.slice(),treeDepth:r},i&&(i.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=this.beans.valueColsSvc?.columns;return this.cols.list.filter(s=>{const o=ss(s);if(e){const n=t?.includes(s);return o||n}else return o||s.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,i){le(this.beans,{state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const i=new Map(t.map((d,c)=>[d,c]));if(!e.list.some(d=>i.has(d)))return;const o=new Map(e.list.map(d=>[d,!0])),n=t.filter(d=>o.has(d)),r=new Map(n.map(d=>[d,!0])),a=e.list.filter(d=>!r.has(d)),l=n.slice();a.forEach(d=>{let c=d.getOriginalParent();if(!c){l.push(d);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(f=>{const m=l.indexOf(f)>=0,C=u.indexOf(f)<0;m&&C&&u.push(f)}),c=c.getOriginalParent();if(!u.length){l.push(d);return}const h=u.map(p=>l.indexOf(p)),g=Math.max(...h);l.splice(g+1,0,d)}),e.list=l}positionLockedCols(e){e.list=na(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(){return this.colDefCols?this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[]):void 0}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:i,eventSvc:s}=this.beans;i.refresh(t),s.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=ft(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){si(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:i,selectionColSvc:s}=this.beans;is(this.colDefCols?.list,e),is(i?.columns?.list,e),is(s?.columns?.list,e),is(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let o=0;o<s.length;o++)if(xo(s[o],e))return s[o];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}},$h=class extends S{constructor(){super(...arguments),this.dispatchColumnChangedEvent=da,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((e,t)=>this.columnIndexMap[e.getId()]=t)}}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols}sortColumns(e){this.columns.sort(e),this.updateIndexMap()}setColumns(e,t){this.setColList(e,this.columns,this.eventName,!0,!0,this.columnProcessors.set,t)}addColumns(e,t){this.updateColList(e,this.columns,!0,!0,this.columnProcessors.add,this.eventName,t)}removeColumns(e,t){this.updateColList(e,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,t)}getColumnIndex(e){return this.columnIndexMap[e]}setColList(e=[],t,i,s,o,n,r){const a=this.colModel.getCols();if(!a||a.length===0)return;const l=new Map;t.forEach((c,u)=>l.set(c,u)),t.length=0,x(e)&&e.forEach(c=>{const u=this.colModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const h=l.get(c);if(h===void 0){l.set(c,0);return}s&&h!==u||l.delete(c)}),this.updateIndexMap(),(this.colModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;n(c,u,r)}),o&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r),this.dispatchColumnChangedEvent(this.eventSvc,i,[...l.keys()],r)}updateColList(e=[],t,i,s,o,n,r){if(!e||e.length===0)return;let a=!1;const l=new Set;if(e.forEach(c=>{if(!c)return;const u=this.colModel.getColDefCol(c);if(u){if(l.add(u),i){if(t.indexOf(u)>=0)return;t.push(u)}else{const h=t.indexOf(u);if(h<0)return;for(let g=h+1;g<t.length;g++)l.add(t[g]);ge(t,u)}o(u,i,r),a=!0}}),!a)return;this.updateIndexMap(),s&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r);const d=Array.from(l);this.eventSvc.dispatchEvent({type:n,columns:d,column:d.length===1?d[0]:null,source:r})}extractCols(e,t=[]){const i=this.columns,s=[],o=[],{setFlagFunc:n,getIndexFunc:r,getInitialIndexFunc:a,getValueFunc:l,getInitialValueFunc:d}=this.columnExtractors;(this.colModel.getColDefCols()||[]).forEach(g=>{const p=t.indexOf(g)<0,f=g.getColDef(),m=l(f),C=d(f),w=r(f),v=a(f);let y;m!==void 0?y=m:w!==void 0?w===null?y=!1:y=w>=0:p?C!==void 0?y=C:v!==void 0?y=v!=null&&v>=0:y=!1:y=i.indexOf(g)>=0,y&&((p?w!=null||v!=null:w!=null)?s.push(g):o.push(g))});const u=g=>{const p=r(g.getColDef()),f=a(g.getColDef());return p??f};s.sort((g,p)=>{const f=u(g),m=u(p);return f===m?0:f<m?-1:1});const h=[].concat(s);return i.forEach(g=>{o.indexOf(g)>=0&&h.push(g)}),o.forEach(g=>{h.indexOf(g)<0&&h.push(g)}),i.forEach(g=>{h.indexOf(g)<0&&n(g,!1,e)}),h.forEach(g=>{i.indexOf(g)<0&&n(g,!0,e)}),this.columns=h,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const i=this.columns,s=this.colModel.getColDefCols();if(!i.length||!s)return e;const o=Object.keys(t),n=new Set(o),r=new Set(o),a=new Set(i.map(v=>{const y=v.getColId();return r.delete(y),y}).concat(o)),l=[],d={};let c=0;for(let v=0;v<s.length;v++){const y=s[v].getColId();a.has(y)&&(l.push(y),d[y]=c++)}let u=1e3,h=!1,g=0;const p=this.columnOrdering.enableProp,f=this.columnOrdering.initialEnableProp,m=this.columnOrdering.indexProp,C=this.columnOrdering.initialIndexProp,w=v=>{const y=d[v];for(let P=g;P<y;P++){const E=l[P];r.has(E)&&(t[E][m]=u++,r.delete(E))}g=y};return i.forEach(v=>{const y=v.getColId();if(n.has(y))w(y),t[y][m]=u++;else{const P=v.getColDef();(P[m]===null||P[m]===void 0&&P[C]==null)&&(h||(P[p]||P[p]===void 0&&P[f]?w(y):(r.forEach(I=>{t[I][m]=u+d[I]}),u+=l.length,h=!0)),e[y]||(e[y]={colId:y}),e[y][m]=u++)}}),e}},Fo=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},Kh=class extends S{};function oi(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var Eo=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(o=>this.addOrRemoveCssClass(o,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}},jh=0,F=null,L=class extends S{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=jh++,this.cssClassManager=new Eo(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(i=>[i.selector,i])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;this.css?.forEach(t=>this.beans.environment.addGlobalCSS(t,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(fr):null}applyElementsToComponent(e,t,i,s=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===F)this[t]=s??e;else{const n=i&&i[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){const i=[];for(const s of e.childNodes??[])i.push(s);i.forEach(s=>{if(!(s instanceof HTMLElement))return;const o=this.createComponentFromElement(s,n=>{const r=n.getGui();if(r)for(const a of s.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&s.children.length){this.createChildComponentsFromTags(s,t);const n=Array.prototype.slice.call(s.children);o.addItems(n)}this.swapComponentForNode(o,e,s)}else s.childNodes&&this.createChildComponentsFromTags(s,t)})}createComponentFromElement(e,t,i){const s=e.nodeName,o=this.getDataRefAttribute(e),n=s.indexOf("AG-")===0,r=n?this.componentSelectors.get(s):null;let a=null;if(r){const l=i&&o?i[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${s}`);return this.applyElementsToComponent(e,o,i,a),a}swapComponentForNode(e,t,i){const s=e.getGui();t.replaceChild(s,i),t.insertBefore(document.createComment(i.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(i=>i.setAttribute("tabindex",t.toString()))}setTemplate(e,t,i){let s;typeof e=="string"||e==null?s=jt(e):s=_(e),this.setTemplateFromElement(s,t,i)}setTemplateFromElement(e,t,i,s=!1){if(this.eGui=e,this.suppressDataRefValidation=s,t)for(let o=0;o<t.length;o++){const n=t[o];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let i=t;return e==null?null:(i||(i=this.eGui),ji(e)?{element:e,parent:i}:{element:e.getGui(),parent:i})}prependChild(e,t){const{element:i,parent:s}=this.getContainerAndElement(e,t)||{};!i||!s||s.insertAdjacentElement("afterbegin",i)}appendChild(e,t){const{element:i,parent:s}=this.getContainerAndElement(e,t)||{};!i||!s||s.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:i}=t;cr(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:i}=t;N(this.eGui,e,{skipAriaHidden:i});const s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}};function qh(e){return typeof e.then=="function"}var ie=class Oi{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(i=>this.onDone(i),i=>this.onReject(i))}static all(t){return t.length?new Oi(i=>{let s=t.length;const o=new Array(s);t.forEach((n,r)=>{n.then(a=>{o[r]=a,s--,s===0&&i(o)})})}):Oi.resolve()}static resolve(t=null){return new Oi(i=>i(t))}then(t){return new Oi(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(s=>i(t(s)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(i=>i(t))}onReject(t){}};function Yh(e){return e?e.prototype&&"getGui"in e.prototype:!1}function pa(e,t,i,s){const{name:o}=i;let n,r,a,l,d,c;if(t){const u=t,h=u[o+"Selector"],g=h?h(s):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?a=f:r=f)};g?(p(g.component),l=g.params,d=g.popup,c=g.popupPosition):p(u[o])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var Qh=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,i,s=!1){return this.getCompDetails(this.gridOptions,e,t,i,s)}getCompDetails(e,t,i,s,o=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=pa(this.beans.frameworkOverrides,e,t,s),g;const p=w=>{const v=this.registry.getUserComponent(n,w);v&&(l=v.componentFromFramework?void 0:v.component,d=v.componentFromFramework?v.component:void 0,g=v.params)};if(a!=null&&p(a),l==null&&d==null&&i!=null&&p(i),l&&r&&!Yh(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:w}=this.beans;o&&(a!==i||!i)?a?w?.isProvidedUserComp(a)||O(50,{compName:a}):i?w||O(260,{...this.gos.getModuleErrorParams(),propName:n,compName:i}):O(216,{name:n}):i&&!w&&O(146,{comp:i});return}const f=this.mergeParams(e,t,s,c,g),m=l==null,C=l??d;return{componentFromFramework:m,componentClass:C,params:f,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(C,m,f,t)}}newAgStackInstance(e,t,i,s){const o=!t;let n;o?n=new e:n=this.frameworkCompWrapper.wrap(e,s.mandatoryMethods,s.optionalMethods,s),this.createBean(n);const r=n.init?.(i);return r==null?ie.resolve(n):r.then(()=>n)}mergeParams(e,t,i,s=null,o){const n={...i,...o},r=e,a=r&&r[t.name+"Params"];if(typeof a=="function"){const l=a(i);ee(n,l)}else typeof a=="object"&&ee(n,a);return ee(n,s),n}},Zh={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Xh={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Jh={name:"headerComponent",optionalMethods:["refresh"]},eg={name:"innerHeaderComponent"},tg={name:"innerHeaderGroupComponent"},ig={name:"headerGroupComponent"},sg={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},og={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},ng={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"]},rg={name:"loadingCellRenderer",cellRenderer:!0},ag={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},lg={name:"loadingOverlayComponent",optionalMethods:["refresh"]},dg={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},cg={name:"tooltipComponent"},Do={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},ug={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},hg={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},gg={name:"loadingCellRenderer",cellRenderer:!0},pg={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},fg={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function mg(e,t){return e.getCompDetailsFromGridOptions(Xh,"agDragAndDropImage",t,!0)}function Cg(e,t,i){return e.getCompDetails(t,sg,void 0,i)}function vg(e,t,i){return e.getCompDetails(t,Jh,"agColumnHeader",i)}function wg(e,t,i){return e.getCompDetails(t,eg,void 0,i)}function bg(e,t){const i=t.columnGroup.getColGroupDef();return e.getCompDetails(i,ig,"agColumnGroupHeader",t)}function Sg(e,t,i){return e.getCompDetails(t,tg,void 0,i)}function yg(e,t){return e.getCompDetailsFromGridOptions(hg,void 0,t,!0)}function Rg(e,t){return e.getCompDetailsFromGridOptions(gg,"agLoadingCellRenderer",t,!0)}function xg(e,t){return e.getCompDetailsFromGridOptions(pg,"agGroupRowRenderer",t,!0)}function Fg(e,t){return e.getCompDetailsFromGridOptions(fg,"agDetailCellRenderer",t,!0)}function Po(e,t,i){return e.getCompDetails(t,og,void 0,i)}function Eg(e,t,i){return e.getCompDetails(t,ng,void 0,i)}function Dg(e,t,i){return e.getCompDetails(t,rg,"agSkeletonCellRenderer",i,!0)}function fa(e,t,i){return e.getCompDetails(t,ag,"agCellEditor",i,!0)}function ma(e,t,i,s){return e.getCompDetails(t,Do,s,i,!0)}function Pg(e,t,i){return e.getCompDetails(t,Zh,"agDateInput",i,!0)}function Mg(e,t){return e.getCompDetailsFromGridOptions(lg,"agLoadingOverlay",t,!0)}function Ag(e,t){return e.getCompDetailsFromGridOptions(dg,"agNoRowsOverlay",t,!0)}function Tg(e,t){return e.getCompDetails(t.colDef,cg,"agTooltipComponent",t,!0)}function Ca(e,t,i,s){return e.getCompDetails(t,ug,s,i)}function kg(e,t){return pa(e,t,Do)}function Ig(e,t,i){return e.mergeParams(t,Do,i)}function Ht(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var va=new Set,rs={},mt={},as,wa=!1,ba=!1;function Lg(e){const[t,i]=e.version.split(".")||[],[s,o]=as.split(".")||[];return t===s&&i===o}function Og(e){as||(as=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;if(e.version?Lg(e)||kt(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${as}.`)):kt(t(`'${e.moduleName}' is incompatible.`)),e.validate){const i=e.validate();i.isValid||kt(`${i.message}`)}}function ni(e,t){Og(e);const i=e.rowModels??["all"];va.add(e);let s;t!==void 0?(wa=!0,mt[t]===void 0&&(mt[t]={}),s=mt[t]):s=rs,i.forEach(o=>{s[o]===void 0&&(s[o]={}),s[o][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(o=>ni(o,t))}function Gg(e){delete mt[e]}function Sa(e,t,i){const s=o=>!!rs[o]?.[e]||!!mt[t]?.[o]?.[e];return s(i)||s("all")}function Mo(){return wa}function Hg(e,t){const i=mt[e]??{};return[...Object.values(rs.all??{}),...Object.values(i.all??{}),...Object.values(rs[t]??{}),...Object.values(i[t]??{})]}function Bg(){return new Set(va)}function Vg(e,t){const i=mt[e]??{};return[...Object.values(i.all??{}),...Object.values(i[t]??{})]}function Ng(){return ba}function zg(){ba=!0}var Wg=class{static register(e){ni(e,void 0)}static registerModules(e){e.forEach(t=>ni(t,void 0))}},_g=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];e.beanClasses.forEach(t=>{const i=new t;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(i)}),e.derivedBeans?.forEach(t=>{const{beanName:i,bean:s}=t(this);this.beans[i]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(i=>{i.preWireBeans?.(this.beans),i.wireBeans?.(this.beans)}),e.forEach(i=>i.preConstruct?.()),t&&e.forEach(t),e.forEach(i=>i.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},Ug=class extends _g{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),Gg(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},$g="ag-column-first",Kg="ag-column-last";function Ao(e,t,i,s){return B(e)?[]:Ra(e.headerClass,e,t,i,s)}function jg(e,t,i,s){return B(e)?[]:Ra(e.toolPanelClass,e,t,i,s)}function ya(e,t,i){e.addOrRemoveCssClass($g,i.isColAtEdge(t,"first")),e.addOrRemoveCssClass(Kg,i.isColAtEdge(t,"last"))}function qg(e,t,i,s){return T(t,{colDef:e,column:i,columnGroup:s})}function Ra(e,t,i,s,o){if(B(e))return[];let n;if(typeof e=="function"){const r=qg(t,i,s,o);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var 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"},To=!1,ls=0;function Yg(e){ls>0||(e.addEventListener("keydown",ds),e.addEventListener("mousedown",ds))}function Qg(e){ls>0||(e.removeEventListener("keydown",ds),e.removeEventListener("mousedown",ds))}function ds(e){const t=To,i=e.type==="keydown";i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(To=i)}function Zg(e){const t=$(e);return Yg(t),ls++,()=>{ls--,Qg(t)}}function xa(){return To}function Fa(e,t,i){t.addManagedElementListeners(i,{keydown:s=>{if(!s.defaultPrevented&&s.key===b.TAB){const o=s.shiftKey;Qe(e,i,!1,o)||wt(e,o)&&s.preventDefault()}}})}function Ct(e,t,i=!1){const s=_u;let o=dr;t&&(o+=", "+t),i&&(o+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(s)).filter(l=>ve(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,d)=>l.filter(c=>d.indexOf(c)===-1))(n,r):n}function Ye(e,t=!1,i=!1,s=!1){const o=Ct(e,s?".ag-tab-guard":null,i),n=t?G(o):o[0];return n?(n.focus({preventScroll:!0}),!0):!1}function Qe(e,t,i,s){const o=Ct(t,i?':not([tabindex="-1"])':null),n=z(e);let r;i?r=o.findIndex(l=>l.contains(n)):r=o.indexOf(n);const a=r+(s?-1:1);return a<0||a>=o.length?null:o[a]}function ko(e,t=5){let i=0;for(;e&&so(e)===null&&++i<=t;)e=e.parentElement;return so(e)===null?null:e}function Ea(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function vt(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function cs(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function wt(e,t,i=!1){const s=e.ctrlsSvc.get("gridCtrl");return!i&&s.focusNextInnerContainer(t)?!0:((i||!t&&!s.isDetailGrid())&&s.forceFocusOutOfContainer(t),!1)}function Xg(e,t=!1){return e===b.DELETE?!0:!t&&e===b.BACKSPACE?rr():!1}var Jg=class extends S{constructor(e,t,i,s){super(),this.cellCtrl=e,this.rowNode=i,this.rowCtrl=s,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;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){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const i=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:i}=this.beans;if(!t)return;const s=t.extendLatestRangeInDirection(e);s&&i?.ensureCellVisible(s)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:i,beans:s,rowNode:o}=this,{gos:n,rangeSvc:r,eventSvc:a}=s;if(!i.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),Xg(e,n.get("enableCellEditingOnBackspace"))){if(r&&Me(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const{column:l}=i,d=this.beans.valueSvc.getDeleteValue(l,o);o.setDataValue(l,d,"cellClear")}}else s.editSvc?.startRowOrCellEdit(i,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){const{cellCtrl:t,beans:i}=this;if(t.editing||this.rowCtrl.editing)this.beans.editSvc?.stopRowOrCellEdit(t,!1,!1,e.shiftKey);else if(i.gos.get("enterNavigatesVertically")){const s=e.shiftKey?b.UP:b.DOWN;i.navigation?.navigateToNextCell(null,s,t.cellPosition,!1)}else i.editSvc?.startRowOrCellEdit(t,b.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){const{cellCtrl:t,beans:i}=this;t.editing||i.editSvc?.startRowOrCellEdit(t,b.F2,e)}onEscapeKeyDown(e){const{cellCtrl:t,beans:i}=this;t.editing&&i.editSvc?.stopRowOrCellEdit(t,!0)}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;const s=e.key;s===b.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,s,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;!this.cellCtrl.editing&&Ke(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},ep=class extends S{constructor(e,t,i){super(),this.cellCtrl=e,this.column=i,this.beans=t}onMouseEvent(e,t){if(!Ae(t))switch(e){case"click":this.onCellClicked(t);break;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){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:i,gos:s,editSvc:o}=this.beans,n=e.ctrlKey||e.metaKey;i&&n&&i.getCellRangeCount(this.cellCtrl.cellPosition)>1&&i.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(r);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(r)})},0),(s.get("singleClickEdit")||a.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&i?.getCellRanges().length!=0)&&o?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){const{column:t,beans:i,cellCtrl:s}=this,{eventSvc:o,frameworkOverrides:n,gos:r,editSvc:a}=i,l=t.getColDef(),d=s.createEvent(e,"cellDoubleClicked");o.dispatchEvent(d),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{l.onCellDoubleClicked(d)})},0),!r.get("singleClickEdit")&&!r.get("suppressClickEdit")&&a?.startRowOrCellEdit(s,null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:s}=e,o=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:c,gos:u}=r;if(this.isRightClickInExistingRange(e))return;const h=l&&!l.isEmpty(),g=this.containsWidget(o),{cellPosition:p}=n,f=pt(p.column);if(d&&f&&!d.handleMouseDownOnCell(p,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!s||!h){const C=u.get("enableCellTextSelection")&&e.defaultPrevented,w=(Ge()||C)&&!n.editing&&!oo(o)&&!g;n.focusCell(w)}if(s&&h&&!c.isCellFocused(p)){e.preventDefault();const m=c.getFocusedCell();if(m){const{column:C,rowIndex:w,rowPinned:v}=m,P=r.rowRenderer.getRowByPosition({rowIndex:w,rowPinned:v})?.getCellCtrl(C);P?.editing&&P.stopEditing(),c.setFocusedCell({column:C,rowIndex:w,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!g){if(l)if(f&&e.preventDefault(),s)l.extendLatestRangeToCell(p);else{const m=t||i;l.setRangeToCell(p,m)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.cellPosition),s=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0}return!1}containsWidget(e){return it(e,"ag-selection-checkbox",3)||it(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),i?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),i?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s}destroy(){super.destroy()}},tp=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;const e=this.cellCtrl.getCellSpan();e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e&&(this.refreshSpanHeight(e),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:this.refreshSpanHeight.bind(this,e),recalculateRowBounds:this.refreshSpanHeight.bind(this,e)}))}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();qe(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;const 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(){const{column:e,rowNode:t}=this,i=e.getColSpan(t),s=[];if(i===1)s.push(e);else{let o=e;const n=e.getPinned();for(let r=0;o&&r<i&&(s.push(o),o=this.beans.visibleCols.getColAfter(o),!(!o||B(o)||n!==o.getPinned()));r++);}return s}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=G(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,i=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const s=t.bodyWidth;return i+s+(e||0)}return i+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const i=je(this.beans)*this.rowSpan;this.eContent.style.height=`${i}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},ip="ag-cell",sp="ag-cell-auto-height",op="ag-cell-normal-height",np="ag-cell-focus",rp="ag-cell-first-right-pinned",ap="ag-cell-last-left-pinned",lp="ag-cell-not-inline-editing",dp="ag-cell-wrap-text",us="cellCtrl";function Io(e,t){return Ur(e,t,us)}var cp=0,ri=class extends S{constructor(e,t,i,s){super(),this.column=e,this.rowNode=t,this.rowCtrl=s,this.rangeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.tooltipFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.beans=i;const{colId:o,colIdSanitised:n}=e;this.instanceId=o+"-"+cp++,this.colIdSanitised=n,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new tp(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new ep(this,e,this.column),this.keyboardListener=new Jg(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();const{rangeSvc:t}=e;t&&Me(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,i,s,o,n,r){this.comp=e,this.eGui=t,this.printLayout=o,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),n&&this.isCellEditable()?this.beans.editSvc?.startEditing(this):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(a=>a()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e,t){const{beans:i,column:s,rowNode:o,rangeFeature:n}=this,{userCompFactory:r}=i,a=this.getValueToDisplay();let l;const d=o.stub&&o.groupData?.[s.getId()]==null,c=s.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();!d||pt(s)?l=Po(r,c,u):l=Dg(r,c,u)}if(!l&&!d&&i.findSvc?.isMatch(o,s)){const u=this.createCellRendererParams();l=Po(r,{...s.getColDef(),cellRenderer:"agFindCellRenderer"},u)}this.comp.setRenderDetails(l,a,e),!t&&n&&De(i,()=>n?.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),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()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,s=Zt(t),o=ke(this.column);return i==="custom"&&s!=="selectionColumn"&&o?!1:e.checkboxSelection||o&&typeof t=="object"&&ht(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return t||i||s||o}onPopupEditorClosed(){this.editing&&this.beans.editSvc?.stopRowOrCellEdit(this)}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:i,rowNode:s,comp:o,eGui:n,beans:{valueSvc:r,gos:a}}=this;return T(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(i,s),setValue:d=>r.setValue(s,i,d),formatValue:this.formatValue.bind(this),data:s.data,node:s,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:o.getParentOfValue(),registerRowDragger:(d,c,u,h)=>this.registerRowDragger(d,c,h),setTooltip:(d,c)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,c),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),i=e!=null&&!!e.newData,s=e!=null&&!!e.suppressFlash,o=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,n=e&&e.forceRefresh||o||i,r=!!this.comp,a=this.updateAndFormatValue(r),l=n||a;if(r){if(l){this.showValue(i,!1);const d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!s&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i:!0}valuesAreEqual(e,t){const i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}addDomData(e){const t=this.eGui;lt(this.beans.gos,t,us,this),e.addDestroyFunc(()=>lt(this.beans.gos,t,us,null))}createEvent(e,t){const{rowNode:i,column:s,value:o,beans:n}=this;return T(n.gos,{type:t,node:i,data:i.data,value:o,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:e,rowIndex:i.rowIndex})}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:i}=this;ya(e,t,i.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Ks(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e})}restoreFocus(e=!1){if(!this.comp||this.editing||!this.isCellFocused()||!this.beans.focusSvc.shouldTakeFocus())return;const t=()=>{if(!this.isAlive())return;const i=this.comp.getFocusableElement();this.isCellFocused()&&i.focus({preventScroll:!0})};if(e){setTimeout(t,0);return}t()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(pt(this.column)&&(e=!0),we(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(rp,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(ap,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(cs(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const i=this.isCellFocused();if(this.comp.addOrRemoveCssClass(np,i),i&&e&&e.forceBrowserFocus){let o=this.comp.getFocusableElement();if(this.editing){const n=Ct(o,null,!0);n.length&&(o=n[0])}o.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const s=t.gos.get("editType")==="fullRow";!i&&!s&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),i&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Pe(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(ip,!0),e.addOrRemoveCssClass(lp,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(sp,t),e.addOrRemoveCssClass(op,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(dp,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu"),{beans:s}=this;s.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{s.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(z(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const s=this.createRowDragComp(e,t,i);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}))}createRowDragComp(e,t,i){const s=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(s)return this.beans.context.createBean(s),s}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},Da="__ag_grid_instance";function Pa(e,t){t[Da]=e.gridInstanceId}function ai(e,t){return Ma(e,t.target)}function Ma(e,t){let i=t;for(;i;){const s=i[Da];if(x(s))return s===e.gridInstanceId;i=i.parentElement}return!1}function Aa(e,t){return Io(e,t.target)?.getFocusedCellPosition()??null}function hs(e,t){const i=Z(e.gos,"normal"),s=t;let o,n;if(s.clientX!=null||s.clientY!=null?(o=s.clientX,n=s.clientY):(o=s.x,n=s.y),i){const r=e.ctrlsSvc.getScrollFeature(),a=r.getVScrollPosition(),l=r.getHScrollPosition();o+=l.left,n+=a.top}return{x:o,y:n}}var Ta=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(Ta||{}),up=class extends S{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragSvc.addDragSource(i)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:i}=this,s=t.find(o=>o.dragSource===e);s&&(i.removeDragSource(s.params),ge(t,s))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:i}=this;e.forEach(s=>t.removeDragSource(s.params)),e.length=0,i.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),e.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){this.dragSource?.onDragStopped?.();const{lastDropTarget:t}=this;if(t?.onDragStop){const i=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(i)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t}=this;e?.onDragCancelled?.(),t?.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){const i=this.getHorizontalDirection(e),s=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const o=this.dropTargets.filter(c=>this.isMouseOnDropTarget(e,c)),n=this.findCurrentDropTarget(e,o),{lastDropTarget:r,dragSource:a,dragAndDropImageComp:l,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,i,s,t),r!==null&&n===null&&a?.onGridExit?.(d),r===null&&n!==null&&a?.onGridEnter?.(d),this.enterDragTargetIfExists(n,e,i,s,t),n&&l){const{comp:c,promise:u}=l;c?c.setIcon(n.getIconName?n.getIconName():null,!1):u.then(h=>{h&&h.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const c=this.createDropTargetEvent(n,e,i,s,t);n.onDragging(c)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let s=!1;const o=(a,l)=>{for(const d of l){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const m=a.clientX>=h&&a.clientX<g,C=a.clientY>=p&&a.clientY<f;if(!m||!C)return!1}return!0};for(const a of i)if(o(e,a)){s=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:s&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){const i=t.length;if(i===0)return null;if(i===1)return t[0];const o=dt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of o)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return null}enterDragTargetIfExists(e,t,i,s,o){if(e&&e.onDragEnter){const n=this.createDropTargetEvent(e,t,i,s,o);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,i,s){const{lastDropTarget:o}=this;if(!o)return;if(o.onDragLeave){const r=this.createDropTargetEvent(o,e,t,i,s);o.onDragLeave(r)}const n=this.getDragAndDropImageComponent();n&&n.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(i=>i.external).find(i=>i.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const i=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:s}=e;return i.contains(s)}getHorizontalDirection(e){const t=this.eventLastTime?.clientX,i=e.clientX;return t===i?null:t>i?"left":"right"}getVerticalDirection(e){const t=this.eventLastTime?.clientY,i=e.clientY;return t===i?null:t>i?"up":"down"}createDropTargetEvent(e,t,i,s,o){const n=e.getContainer(),r=n.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return T(d,{event:t,x:c,y:u,vDirection:s,hDirection:i,dragSource:l,fromNudge:o,dragItem:a,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&kr(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;if(e){const{comp:t}=e;if(t){const i=t.getGui();this.dragAndDropImageParent?.removeChild(i),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:i}=this;if(!e)return;const s=mg(i,T(t,{dragSource:e}));if(!s)return;const o=s.newAgStackInstance();this.dragAndDropImageComp={promise:o},o.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:i}=this;if(!t)return;const s=e.getGui();s.style.setProperty("position","absolute"),s.style.setProperty("z-index","9999"),Pa(this.gos,s),i.applyThemeClasses(s),e.setIcon(null,!1);let{dragItemName:o}=t;typeof o=="function"&&(o=o()),e.setLabel(o||""),s.style.top="20px",s.style.left="20px";const n=Zi(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(s):R(54)}registerGridDropTarget(e,t){const i={getContainer:e,isInterestedIn:s=>s===1||s===0,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}},ka=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<s.left+o,this.tickRight=e.clientX>s.right-o,this.tickUp=e.clientY<s.top+o&&!i,this.tickDown=e.clientY>s.bottom-o&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}};function Ia(e){const{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${i??"null"}.${s.getId()}`}function Lo(e,t){const i=e.column===t.column,s=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return i&&s&&o}function La(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(x(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function Oa(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function hp(e){let t=0,i;const{pinnedRowModel:s,rowModel:o,pageBounds:n}=e;return s?.getPinnedTopRowCount()?i="top":o.getRowCount()?(i=null,t=n.getFirstRow()):s?.getPinnedBottomRowCount()&&(i="bottom"),i===void 0?null:{rowIndex:t,rowPinned:i}}function gp(e){let t,i=null;const{pinnedRowModel:s,pageBounds:o}=e,n=s?.getPinnedBottomRowCount(),r=s?.getPinnedTopRowCount();return n?(i="bottom",t=n-1):e.rowModel.getRowCount()?(i=null,t=o.getLastRow()):r&&(i="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:i}}function li(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function bt(e,t){const i=e.spannedRowRenderer?.getCellByPosition(t);if(i)return i;const s=e.rowRenderer.getRowByPosition(t);return s?s.getCellCtrl(t.column):null}function di(e,t){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:n,rowModel:r}=e;if(i===0)return s==="top"?null:s==="bottom"&&r.isRowsToRender()?{rowIndex:o.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const a=s?void 0:r.getRow(i);return Ga(e,a,!0)??{rowIndex:i-1,rowPinned:s}}function Oo(e,t){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:n,rowModel:r}=e;if(pp(e,t))return s==="bottom"?null:s==="top"&&r.isRowsToRender()?{rowIndex:o.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const a=s?void 0:r.getRow(i);return Ga(e,a)??{rowIndex:i+1,rowPinned:s}}function Ga(e,t,i){const{gos:s,rowRenderer:o}=e;if(!t?.sticky||!mo(s))return;const n=i?o.getStickyTopRowCtrls():o.getStickyBottomRowCtrls();let r;for(let a=0;a<n.length;a++)if(n[a].rowNode.rowIndex===t.rowIndex){r=n[a+(i?-1:1)];break}return r?{rowIndex:r.rowNode.rowIndex,rowPinned:null}:void 0}function pp(e,t){const{rowPinned:i,rowIndex:s}=t,{pinnedRowModel:o,pageBounds:n}=e;return i==="top"?(o?.getPinnedTopRowCount()??0)-1<=s:i==="bottom"?(o?.getPinnedBottomRowCount()??0)-1<=s:n.getLastRow()<=s}var fp=class extends S{constructor(e){super(),this.eContainer=e}postConstruct(){const{rowModel:e,gos:t,ctrlsSvc:i}=this.beans;J(t,e)&&(this.clientSideRowModel=e),i.whenReady(this,s=>{const o=s.gridBodyCtrl;this.autoScrollService=new ka({scrollContainer:o.eBodyViewport,scrollAxis:"y",getVerticalPosition:()=>o.scrollFeature.getVScrollPosition().top,setVerticalPosition:n=>o.scrollFeature.setVerticalScrollPosition(n),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:i}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||i?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=[...this.beans.selectionSvc?.getSelectedNodes()??[]].sort((o,n)=>o.rowIndex==null||n.rowIndex==null?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(n));if(s.indexOf(t)!==-1)return s}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;const t=hs(this.beans,e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const{dragAndDrop:i,gos:s}=this.beans,o=this.isFromThisGrid(e),n=s.get("rowDragManaged"),r=e.dragItem.rowNodes;n&&this.shouldPreventRowMove()||(s.get("suppressMoveWhenRowDragging")||!o?i.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(r[0],t):this.moveRows(r,t))}getRowIndexNumber(e){const t=e.getRowIndexString();return parseInt(G(t.split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel,i=t.getLastHighlightedRowNode(),s=i&&i.highlighted==="Below",o=hs(this.beans,e).y,n=e.dragItem.rowNodes;let r=s?1:0;if(this.isFromThisGrid(e))n.forEach(a=>{a.rowTop<o&&(r-=1)}),this.moveRows(n,o,r);else{const a=ut(this.gos);let l=t.getRowIndexAtPixel(o)+1;t.getHighlightPosition(o)==="Above"&&l--,t.updateRowData({add:n.filter(d=>!t.getRowNode(a?.({data:d.data,level:0,rowPinned:d.rowPinned})??d.data.id)).map(d=>d.data),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){const s=this.beans.focusSvc,o=s.getFocusedCell(),n=o&&bt(this.beans,o);this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(n?n.focusCell():s.clearFocusedCell())}addRowDropZone(e){if(!e.getContainer()){R(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e)){R(56);return}let i={getContainer:e.getContainer};e.fromGrid?i=e:(e.onDragEnter&&(i.onDragEnter=o=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",o))}),e.onDragLeave&&(i.onDragLeave=o=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",o))}),e.onDragging&&(i.onDragging=o=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",o))}),e.onDragStop&&(i.onDragStop=o=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",o))}),e.onDragCancel&&(i.onDragCancel=o=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",o))}));const s={isInterestedIn:o=>o===2,getIconName:()=>"move",external:!0,...i};t.addDropTarget(s),this.addDestroyFunc(()=>t.removeDropTarget(s))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),o=this.onDragging.bind(this),n=this.onDragStop.bind(this),r=this.onDragCancel.bind(this);let a;return e?a={getContainer:t,onDragEnter:e.onDragEnter?l=>{i(l),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",l))}:i,onDragLeave:e.onDragLeave?l=>{s(l),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",l))}:s,onDragging:e.onDragging?l=>{o(l),e.onDragging(this.draggingToRowDragEvent("rowDragMove",l))}:o,onDragStop:e.onDragStop?l=>{n(l),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",l))}:n,onDragCancel:e.onDragCancel?l=>{r(l),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",l))}:r,fromGrid:!0}:a={getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:o,onDragStop:n,onDragCancel:r,fromGrid:!0},a}draggingToRowDragEvent(e,t){const i=this.beans,{pageBounds:s,rowModel:o,gos:n}=i,r=hs(i,t).y,a=r>s.getCurrentPageHeight();let l=-1,d;return a||(l=o.getRowIndexAtPixel(r),d=o.getRow(l)),T(n,{type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:l,overNode:d,y:r,vDirection:t.vDirection})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e);const{dragAndDrop:t,gos:i}=this.beans;i.get("rowDragManaged")&&(i.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e);const{dragAndDrop:t,gos:i}=this.beans;i.get("rowDragManaged")&&(i.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!1)})}setRowNodeDragging(e,t){e.dragging!==t&&(e.dragging=t,e.dispatchRowEvent("draggingChanged"))}};function Ha(e,t,i){if(i===0)return!1;const s=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(s,o)<=i}var mp=class extends S{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){const s=e.touchStartListener;t.removeEventListener("touchstart",s,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,i=t.find(s=>s.dragSource===e);i&&(this.removeListener(i),ge(t,i))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:o}=e;i.addEventListener("mousedown",t);let n=null;const r=this.gos.get("suppressTouch");s&&!r&&(n=a=>{oo(a.target)||(o&&a.stopPropagation(),this.onTouchStart(e,a))},i.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!s})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const s=l=>this.onTouchMove(l,e.eElement),o=l=>this.onTouchUp(l,e.eElement),n=l=>{l.cancelable&&l.preventDefault()},r=t.target,a=[{target:dt(this.beans),type:"touchmove",listener:n,options:{passive:!1}},{target:r,type:"touchmove",listener:s,options:{passive:!0}},{target:r,type:"touchend",listener:o,options:{passive:!0}},{target:r,type:"touchcancel",listener:o,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||i._alreadyProcessedByDragService||(i._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const s=d=>this.onMouseMove(d,e.eElement),o=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===b.ESCAPE&&this.cancelDrag(e.eElement)},a=dt(this.beans),l=[{target:a,type:"mousemove",listener:s},{target:a,type:"mouseup",listener:o},{target:a,type:"contextmenu",listener:n},{target:a,type:"keydown",listener:r}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:i,type:s,listener:o,options:n}=t;i.addEventListener(s,o,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:i,type:s,listener:o,options:n}=t;i.removeEventListener(s,o,n)})})}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams,s=x(i)?i:4;return Ha(e,t,s)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:i}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){Ge()&&$(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,i=t.get("enableCellTextSelection"),s=e.type==="mousemove",o=n=>!!n.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return i&&s&&e.cancelable&&ai(t,e)&&!o(e)}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function Ba(e,t){return e+"_"+t}function W(e){return e instanceof Go}var Go=class extends S{constructor(e,t,i,s){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=s,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return Ba(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{W(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=G(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren?.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Ve(t)?e.push(t):W(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Ve(t)?e.push(t):W(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){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}this.children.forEach(i=>{if(W(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},gs="row-group-",Va="t-",Na="b-",Cp=0,St=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Cp++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:i,selectionSvc:s,eventSvc:o}=this.beans,n=this.data;this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),s?.updateRowSelectable(this),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(e,n,t);this.__localEventService?.dispatchEvent(r),o.dispatchEvent({type:"rowNodeDataChanged",node:this})}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return this.rowIndex==null?(O(13),null):this.rowPinned==="top"?Va+this.rowIndex:this.rowPinned==="bottom"?Na+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:i}=this.beans,s=i?.createDaemonNode?.(this),o=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,s));const n=this.createDataChangedEvent(e,o,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=ut(this.beans.gos);if(t)if(this.data){const i=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(gs)&&O(14,{groupPrefix:gs})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,i){this.beans.expansionSvc?.setExpanded(this,e,t,i)}setDataValue(e,t,i){const{colModel:s,valueSvc:o,gos:n,selectionSvc:r}=this.beans,a=typeof e!="string"?e:s.getCol(e)??s.getColDefCol(e);if(!a)return!1;const l=o.getValueForDisplay(a,this);if(n.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:h,rowPinned:g}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:i}),!1}const d=o.setValue(this,a,t,i);return this.dispatchCellChangedEvent(a,t,l),r?.updateRowSelectable(this),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){const s={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){this.childrenAfterGroup?.forEach(t=>t.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,i="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:i})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new _e),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e),this.__localEventService||(this.__localEventService=new _e),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);const i=this.frameworkEventListenerService?.wrap(t)??t;this.__localEventService.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(t)??t;this.removeLocalListener(e,i)}removeLocalListener(e,t){this.__localEventService?.removeEventListener(e,t),this.__localEventService?.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(R(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};function za(e,t,i){return T(t,{type:i,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var vp={tag:"div",cls:"ag-filter"},Wa=class extends L{constructor(e,t){super(vp),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??ie.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:i}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(s=>{const o=s.getGui();x(o)||R(69,{guiFromFilter:o}),this.appendChild(o),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(X(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},_a="ag-resizer-wrapper",Ze=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),wp={tag:"div",cls:_a,children:[Ze("eTopLeft","topLeft"),Ze("eTop","top"),Ze("eTopRight","topRight"),Ze("eRight","right"),Ze("eBottomRight","bottomRight"),Ze("eBottom","bottom"),Ze("eBottomLeft","bottomLeft"),Ze("eLeft","left")]},Ua=class extends S{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=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:o,height:n,x:r,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,d=0;const c=ve(this.element);if(c){const u=this.findBoundaryElement(),h=window.getComputedStyle(u);if(h.minWidth!=null){const g=u.offsetWidth-this.element.offsetWidth;d=parseInt(h.minWidth,10)-g}if(h.minHeight!=null){const g=u.offsetHeight-this.element.offsetHeight;l=parseInt(h.minHeight,10)-g}}if(this.minHeight=o||l,this.minWidth=i||d,s&&this.setWidth(s),n&&this.setHeight(n),(!s||!n)&&this.refreshSize(),e)this.center();else if(r||a)this.offsetElement(r,a);else if(c&&t){let u=this.boundaryEl,h=!0;if(u||(u=this.findBoundaryElement(),h=!1),u){const g=parseFloat(u.style.top),p=parseFloat(u.style.left);h?this.offsetElement(isNaN(p)?0:p,isNaN(g)?0:g):this.setPosition(p,g)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(i),this.moveElementDragListener=i):(this.dragSvc?.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const s=!!e[t],o=this.getResizerElement(t),n={dragStartPixels:0,eElement:o,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=s)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Yt(i,e),e=no(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?Yt(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:s.top,r=e?0:o.top;let a=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();a=c-s.bottom}}return i+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Se(t,e),e=Kt(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;o&&e+n>o&&(e=o-n)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Se(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=He(this.beans,this.popupSvc?.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:s,anywhereWithin:o,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!i,!!o,r)?0:r,d=this.shouldSkipY(t,!!s,n,a)?0:a;return{movementX:l,movementY:d}}shouldSkipX(e,t,i,s){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:o.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=s<0&&e.clientX>a+n.left||s>0&&e.clientX<a+n.left:i?l=s<0&&e.clientX>r.right||s>0&&e.clientX<a+n.left:l=s<0&&e.clientX>r.right||s>0&&e.clientX<r.right,l)}shouldSkipY(e,t,i=0,s){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:o.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=s<0&&e.clientY>a+n.top+i||s>0&&e.clientY<a+n.top:l=s<0&&e.clientY>r.bottom||s>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(_(wp)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${_a}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:s}=this.config;!i&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(i=>!i.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(let s=0;s<e.length;s++){const o=e[s],n=!!o.style.flex&&o.style.flex!=="0 0 auto";if(o===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(n){const l=window.getComputedStyle(o);l.minHeight&&(r=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else r=o.offsetHeight,a=o.offsetWidth;t+=r,i+=a}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){const o=i[s];o!==t&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(t=i[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:o,isBottom:n,isLeft:r}=this.currentResizer,a=o||r,l=n||s,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:s}),u=this.position.x,h=this.position.y;let g=0,p=0;if(a&&d){const f=r?-1:1,m=this.getWidth(),C=m+d*f;let w=!1;r&&(g=m-C,(u+g<=0||C<=this.minWidth)&&(w=!0,g=0)),w||this.setWidth(C)}if(l&&c){const f=s?-1:1,m=this.getHeight(),C=m+c*f;let w=!1;s?(p=m-C,(h+p<=0||C<=this.minHeight)&&(w=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<C&&this.getMinSizeOfSiblings().height+C>this.element.parentElement.offsetHeight&&(w=!0),w||this.setHeight(C)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&g||p)&&this.offsetElement(u+g,h+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(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:i}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:o,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+o,i+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},$a="ag-focus-managed",yt=class extends S{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;const s=Qe(this.beans,this.eFocusable,!1,i.shiftKey);s&&(s.focus(),i.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:i}}=this;e.classList.add($a),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),i&&this.addManagedElementListeners(e,{focusout:i})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Ae(t))return;const{callbacks:i}=this;if(i.shouldStopEventPropagation(t)){gt(t);return}t.key===b.TAB?i.onTabKeyDown(t):i.handleKeyDown&&i.handleKeyDown(t)}})}},Ka={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number 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"};function Ho(e,t){const{debounceMs:i}=e;return ps(e)?(i!=null&&R(71),0):i??t}function ps(e){return(e.buttons?.indexOf("apply")??-1)>=0}var ja=class extends L{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=F,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new yt(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Ua(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t?.removeEventListener("submit",this.onFormSubmit);const i={tag:"form",cls:"ag-filter-wrapper",children:[{tag:"div",ref:"eFilterBody",cls:`ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper`,children:[this.createBodyTemplate()]}]};this.setTemplate(i,this.getAgComponents(),e),t=this.getGui(),t?.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=ps(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=ps(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:i,readOnly:s}=t??{},{buttons:o,readOnly:n}=e;if(s===n&&Tt(i,o))return;const r=o&&o.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(X(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):r&&(this.eButtonsPanel=_({tag:"div",cls:"ag-filter-apply-panel"})),!r){this.eButtonsPanel&&he(this.eButtonsPanel);return}const a=document.createDocumentFragment(),l=d=>{let c;const u=d?this.translate(`${d}Filter`):void 0;switch(d){case"apply":c=p=>this.onBtApply(!1,!1,p);break;case"clear":c=()=>this.onBtClear();break;case"reset":c=()=>this.onBtReset();break;case"cancel":c=p=>{this.onBtCancel(p)};break;default:R(75);return}const g=jt(`<button
@@ -895,7 +895,7 @@ function _waitUntil(condition, callback, timeout = 100, timeoutMessage) {
895
895
  }
896
896
 
897
897
  // packages/ag-grid-community/src/version.ts
898
- var VERSION = "33.2.0";
898
+ var VERSION = "33.2.1";
899
899
 
900
900
  // packages/ag-grid-community/src/validation/logging.ts
901
901
  var MAX_URL_LENGTH = 2e3;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-grid-community",
3
- "version": "33.2.0",
3
+ "version": "33.2.1",
4
4
  "description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
5
5
  "main": "./dist/package/main.cjs.js",
6
6
  "types": "./dist/types/src/main.d.ts",
@@ -88,7 +88,7 @@
88
88
  ],
89
89
  "homepage": "https://www.ag-grid.com/",
90
90
  "dependencies": {
91
- "ag-charts-types": "11.2.0"
91
+ "ag-charts-types": "11.2.1"
92
92
  },
93
93
  "devDependencies": {
94
94
  "source-map-loader": "^5.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-grid-community",
3
- "version": "33.2.0",
3
+ "version": "33.2.1",
4
4
  "description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
5
5
  "main": "./dist/package/main.cjs.js",
6
6
  "types": "./dist/types/src/main.d.ts",
@@ -88,7 +88,7 @@
88
88
  ],
89
89
  "homepage": "https://www.ag-grid.com/",
90
90
  "dependencies": {
91
- "ag-charts-types": "11.2.0"
91
+ "ag-charts-types": "11.2.1"
92
92
  },
93
93
  "devDependencies": {
94
94
  "source-map-loader": "^5.0.0",
@@ -1 +1 @@
1
- export declare const VERSION = "33.2.0";
1
+ export declare const VERSION = "33.2.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-grid-community",
3
- "version": "33.2.0",
3
+ "version": "33.2.1",
4
4
  "description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
5
5
  "main": "./dist/package/main.cjs.js",
6
6
  "types": "./dist/types/src/main.d.ts",
@@ -88,7 +88,7 @@
88
88
  ],
89
89
  "homepage": "https://www.ag-grid.com/",
90
90
  "dependencies": {
91
- "ag-charts-types": "11.2.0"
91
+ "ag-charts-types": "11.2.1"
92
92
  },
93
93
  "devDependencies": {
94
94
  "source-map-loader": "^5.0.0",