UNPKG

ag-grid-community

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

225 lines 990 kB
var We=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,s){const i=t?this.allAsyncListeners:this.allSyncListeners;let o=i.get(e);return!o&&s&&(o=new Set,i.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,s=!1){this.getListeners(e,s,!0).add(t)}removeEventListener(e,t,s=!1){const i=this.getListeners(e,s,!1);i&&(i.delete(t),i.size===0&&(s?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 s=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const i=(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(s,t,!1)??new Set,n=new Set(o);n.size>0&&i(n,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(s,e)):()=>a(s,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 vu(e,t){return t}function Wi(e){return e?.getLocaleTextFunc()??vu}function de(e,t,s){s==null||typeof s=="string"&&s==""?_i(e,t):ce(e,t,s)}function ce(e,t,s){e.setAttribute($n(t),s.toString())}function _i(e,t){e.removeAttribute($n(t))}function $n(e){return`aria-${e}`}function X(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function wu(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function bu(e){return parseInt(e.getAttribute("aria-posinset"),10)}function Su(e){return e.getAttribute("aria-label")}function Kt(e,t){de(e,"label",t)}function Os(e,t){de(e,"labelledby",t)}function yu(e,t){de(e,"describedby",t)}function Kn(e,t){de(e,"live",t)}function Ru(e,t){de(e,"atomic",t)}function xu(e,t){de(e,"relevant",t)}function Fu(e,t){de(e,"level",t)}function jn(e,t){de(e,"disabled",t)}function Ui(e,t){de(e,"hidden",t)}function Eu(e,t){de(e,"activedescendant",t)}function Gs(e,t){ce(e,"expanded",t)}function Du(e){_i(e,"expanded")}function qn(e,t){ce(e,"setsize",t)}function Yn(e,t){ce(e,"posinset",t)}function Pu(e,t){ce(e,"multiselectable",t)}function Qn(e,t){ce(e,"rowcount",t)}function Hs(e,t){ce(e,"rowindex",t)}function Mu(e,t){ce(e,"rowspan",t)}function Zn(e,t){ce(e,"colcount",t)}function $i(e,t){ce(e,"colindex",t)}function Xn(e,t){ce(e,"colspan",t)}function Jn(e,t){ce(e,"sort",t)}function er(e){_i(e,"sort")}function Bs(e,t){de(e,"selected",t)}function Au(e,t){ce(e,"checked",t===void 0?"mixed":t)}function tr(e,t){de(e,"controls",t.id),Os(t,e.id)}function Tu(e,t){de(e,"haspopup",t===!1?null:t)}function Ki(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var ji,qi,Yi,Qi,Zi,Xi,Ji,eo;function Ie(){return ji===void 0&&(ji=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),ji}function sr(){if(qi===void 0){const e=window;qi=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return qi}function to(){return Yi===void 0&&(Yi=/(firefox)/i.test(navigator.userAgent)),Yi}function ir(){return Qi===void 0&&(Qi=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Qi}function _e(){return Zi===void 0&&(Zi=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Zi}function so(e){if(!e)return null;const t=e.tabIndex,s=e.getAttribute("tabIndex");return t===-1&&(s===null||s===""&&!to())?null:t.toString()}function ku(){if(eo!==void 0)return eo;if(!document.body)return-1;let e=1e6;const t=to()?6e6:1e9,s=document.createElement("div");for(document.body.appendChild(s);;){const i=e*2;if(s.style.height=i+"px",i>t||s.clientHeight!==i)break;e=i}return document.body.removeChild(s),eo=e,e}function Iu(){return Ji==null&&or(),Ji}function or(){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 s=t.offsetWidth-t.clientWidth;s===0&&t.clientWidth===0&&(s=null),t.parentNode&&t.parentNode.removeChild(t),s!=null&&(Ji=s,Xi=s===0)}function nr(){return Xi==null&&or(),Xi}var Vs;function Lu(e,t,s){const i=e.parentElement;let o=i&&i.firstChild;for(;o;)t&&o.classList.toggle(t,o===e),s&&o.classList.toggle(s,o!==e),o=o.nextSibling}var Ou="[tabindex], input, select, button, textarea, [href]",rr="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function io(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),o=t.call(e,rr),n=me(e);return i&&!o&&n}function N(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-hidden",!t),i||Ui(e,!t)}function ar(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-invisible",!t),i||Ui(e,!t)}function Pt(e,t){const s="disabled",i=t?o=>o.setAttribute(s,""):o=>o.removeAttribute(s);i(e),hr(e.querySelectorAll("input"),o=>i(o))}function st(e,t,s){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++i>s)break}else if(e===s)break}return!1}function it(e){const{height:t,width:s,borderTopWidth:i,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(s||"0"),borderTopWidth:parseFloat(i||"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 Ns(e){const t=it(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Mt(e){const t=it(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function oo(e){const{height:t,marginBottom:s,marginTop:i}=it(e);return Math.floor(t+s+i)}function jt(e){const{width:t,marginLeft:s,marginRight:i}=it(e);return Math.floor(t+s+i)}function lr(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:i,borderRightWidth:o,borderBottomWidth:n}=it(e);return{top:t.top+(s||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function zs(){if(typeof Vs=="boolean")return Vs;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">
            <span style="display: inline-block; width: 1px"></span>
            <span style="display: inline-block; width: 1px"></span>
        </div>`,document.body.appendChild(e),e.scrollLeft=1,Vs=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),Vs}function Ws(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s),sr()&&!zs()&&(s=e.scrollWidth-e.getBoundingClientRect().width-s)),s}function _s(e,t,s){s&&(zs()?t*=-1:(Ie()||sr())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function Z(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function ve(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function dr(e){return!!e.offsetParent}function me(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!dr(e)||window.getComputedStyle(e).visibility!=="visible")}function At(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function cr(e,t,s){s&&s.nextSibling===t||(e.firstChild?s?s.nextSibling?e.insertBefore(t,s.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function ur(e,t){for(let s=0;s<t.length;s++){const i=t[s],o=e.children[s];o!==i&&e.insertBefore(i,o)}}function Gu(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function qt(e,t){if(t)for(const s of Object.keys(t)){const i=t[s];if(!s||!s.length||i==null)continue;const o=Gu(s),n=i.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(o,r,a)}}function Hu(e){return e.clientWidth<e.scrollWidth}function Bu(e){return e.clientHeight<e.scrollHeight}function Us(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):we(e,t)}function we(e,t){t=no(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function Yt(e,t){t=no(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function no(e){return typeof e=="number"?`${e}px`:e}function $s(e){return e instanceof Node||e instanceof HTMLElement}function Vu(e){if(e==null)return[];const t=[];return hr(e,s=>t.push(s)),t}function Nu(e,t){if(e)for(let s=0;s<e.length;s++){const i=e[s];t(i.name,i.value)}}function Ce(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function hr(e,t){if(e!=null)for(let s=0;s<e.length;s++)t(e[s])}function zu(e,t){e.then(s=>{const i=s.getGui();i!=null&&(typeof i=="object"?t.appendChild(i):t.innerHTML=i)})}function Le(e,t,s){const o=Dr(e).ResizeObserver,n=o?new o(s):null;return n?.observe(t),()=>n?.disconnect()}function Wu(e){const t=dt(e),s="getSelection"in t?t.getSelection():null,i=[];for(let o=0;o<(s?.rangeCount??0);o++){const n=s?.getRangeAt(o);n&&i.push(n)}return{selection:s,ranges:i}}function _u(e,t){if(!e.gos.get("enableCellTextSelection")||!to()&&!Ie())return t();const{selection:i,ranges:o}=Wu(e);t(),i?.removeAllRanges();for(const n of o)i?.addRange(n)}function Re(e){return e==null||e===""?null:e}function x(e){return e!=null&&e!==""}function V(e){return!x(e)}function Ks(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Tt(e,t){const s=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return s===i}function gr(e,t,s=!1){const i=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),i&&o)return 0;if(i)return-1;if(o)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!s)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var pr="https://www.ag-grid.com",fr={};function ro(e,t){fr[t]||(e(),fr[t]=!0)}function Ue(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function ot(e,...t){ro(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function kt(e,...t){ro(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var ao=[],lo=!1;function mr(e){ao.push(e),!lo&&(lo=!0,window.setTimeout(()=>{const t=ao.slice();ao.length=0,lo=!1,t.forEach(s=>s())},0))}function Y(e,t,s){let i;return function(...o){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},s)}}function Cr(e,t){let s=0;return function(...i){const o=this,n=new Date().getTime();n-s<t||(s=n,e.apply(o,i))}}function vr(e,t,s=100,i){const o=new Date().getTime();let n=null,r=!1;const a=()=>{const l=new Date().getTime()-o>s;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&i&&ot(i))};a(),r||(n=window.setInterval(a,10))}var F="33.1.1",wr=2e3,br=100,Sr="_version_",yr=null,Uu=!1,nt=`${pr}/javascript-data-grid`;function $u(e){yr=e}function Ku(e){nt=e}function Rr(e,t,s){return yr?.getConsoleMessage(e,t)??[Qu(e,t,s)]}function co(e,t,s,i){Uu||e(`error #${t}`,...Rr(t,s,i))}function ju(e){if(!e)return String(e);const t={};for(const s of Object.keys(e))typeof e[s]!="object"&&typeof e[s]!="function"&&(t[s]=e[s]);return JSON.stringify(t)}function qu(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=ju(e)),t}function js(e){return e===void 0?"undefined":e===null?"null":e}function uo(e,t){return`${e}?${t.toString()}`}function Yu(e,t,s){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=uo(e,t);for(const[n,r]of i){if(n===Sr)continue;const a=o.length-s;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>br?r.slice(0,r.length-d)+l:r.slice(0,br)+l;t.set(n,c),o=uo(e,t)}return o}function xr(e,t){const s=new URLSearchParams;if(s.append(Sr,F),t)for(const n of Object.keys(t))s.append(n,qu(t[n]));const i=`${nt}/errors/${e}`,o=uo(i,s);return o.length<=wr?o:Yu(i,s,wr)}var Qu=(e,t,s)=>{const i=xr(e,t);return`${s?s+` 
`:""}Visit ${i}${s?"":` 
  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,s){co(kt,e,t,s)}function Fr(e,t){const s=t[0];return`error #${s} `+Rr(s,t[1],e).join(" ")}function Oe(...e){return Fr(void 0,e)}function Zu(...e){return Fr(`
`,e)}function Er(e,t){return e.get("rowModelType")===t}function J(e,t){return Er(e,"clientSide")}function rt(e,t){return Er(e,"serverSide")}function Q(e,t){return e.get("domLayout")===t}function $e(e){return Zt(e)!==void 0}function go(e){return typeof e.get("getRowHeight")=="function"}function Xu(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function at(e,t,s=!1,i){const{gos:o,environment:n}=e;if(i==null&&(i=n.getDefaultRowHeight()),go(o)){if(s)return{height:i,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 Ju(o);const r=o.get("rowHeight");return{height:r&&po(r)?r:i,estimated:!1}}function Ju(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 Ke(e){const{environment:t,gos:s}=e,i=s.get("rowHeight");if(!i||V(i))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 qs(e,t,s){const i=t[e.getDomDataKey()];return i?i[s]:void 0}function lt(e,t,s,i){const o=e.getDomDataKey();let n=t[o];V(n)&&(n={},t[o]=n),n[s]=i}function _(e){const{gos:t,eGridDiv:s}=e;let i=null;const o=t.get("getDocument");return o&&x(o)?i=o():s&&(i=s.ownerDocument),i&&x(i)?i:document}function Dr(e){return _(e).defaultView||window}function dt(e){return e.eGridDiv.getRootNode()}function z(e){return dt(e).activeElement}function Ys(e){let t=null,s=null;try{t=_(e).fullscreenElement}catch{}finally{t||(t=dt(e));const i=t.querySelector("body");i?s=i:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function eh(e){return Ys(e)?.clientWidth??(window.innerHeight||-1)}function th(e){return Ys(e)?.clientHeight??(window.innerHeight||-1)}function Pr(e,t,s){const o=e.getBoundingClientRect().height,n=eh(s)-2,r=th(s)-2;if(!e.offsetParent)return;const l=lr(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-o/2,h=c-l.left-10;const g=_(s),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),s=z(e);return s===null||s===t.body}function ct(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function mo(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Q(e,"print"))}function be(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Qs(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function sh(e){return e.get("grandTotalRow")}function ih(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function Mr(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function Zs(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function ut(e){const t=e.getCallback("getRowId");return t===void 0?t:s=>{let i=t(s);return typeof i!="string"&&(R(25,{id:i}),i=String(i)),i}}function Ar(e,t){const s=e.get("groupHideParentOfSingleChild");return!!(s===!0||s==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Tr(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function oh(e,t){const s=e.get("suppressGroupChangesColumnVisibility");if(s===!0||t&&s==="suppressHideOnGroup"||!t&&s==="suppressShowOnUngroup")return!1;const i=e.get("suppressRowGroupHidesColumns");if(t&&i===!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 Xs(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Co(e){return e?.hideDisabledCheckboxes??!1}function kr(e){return typeof e.get("rowSelection")!="string"}function nh(e){return e.get("cellSelection")!==void 0}function rh(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function xe(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function ah(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 Ir(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const s=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return s&&i?!1:s?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function lh(e){const t=Ir(e);return t===!0||t==="enableSelection"}function dh(e){const t=Ir(e);return t===!0||t==="enableDeselection"}function Js(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Zt(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 Zt(e)==="multiRow"}function ch(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Xt(e){const t=e.get("rowSelection");if(typeof t=="string"){const s=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return s&&i?"filteredDescendants":s?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Lr(e,t=!0){const s=e.get("rowSelection");return typeof s!="object"?t?"all":void 0:s.mode==="multiRow"?s.selectAll:"all"}function Lt(e){const t=Xt(e);return t==="descendants"||t==="filteredDescendants"}function Or(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function vo(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function re(e){return e.get("columnMenu")==="legacy"}function Gr(e){return!re(e)}function wo(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function uh(e,t,s){typeof e!="object"&&(e={});const i={...e};return s.forEach(o=>{const n=t[o];typeof n<"u"&&(i[o]=n)}),i}function hh(e,t){if(!e)return;const s={};let i=!1;if(Object.keys(e).forEach(r=>{s[r]=e[r],i=!0}),!i)return;const o={type:"gridOptionsChanged",options:s};t.dispatchEvent(o);const n={type:"componentStateChanged",...s};t.dispatchEvent(n)}function k(e,t){return e.addGridCommonParams(t)}var Hr="__ag_Grid_Stop_Propagation",gh=["touchstart","touchend","touchmove","touchcancel","scroll"],ph=["wheel"],bo={};function gt(e){e[Hr]=!0}function Fe(e){return e[Hr]===!0}var Br=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof bo[s]=="boolean")return bo[s];const i=document.createElement(e[s]||"div");return s="on"+s,bo[s]=s in i}})();function Vr(e,t,s){let i=t;for(;i;){const o=qs(e,i,s);if(o)return o;i=i.parentElement}return null}function Nr(e,t){return!t||!e?!1:mh(t).indexOf(e)>=0}function fh(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function mh(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():fh(t)}function Ch(e,t,s,i){const o=zr(s);let n;o!=null&&(n={passive:o}),e&&e.addEventListener&&e.addEventListener(t,s,i,n)}var zr=e=>{const t=gh.includes(e),s=ph.includes(e);if(t)return!0;if(s)return!1},b=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,s){this.localEventService||(this.localEventService=new We),this.localEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.localEventService?.removeEventListener(e,t,s)}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 s=[];for(const i of Object.keys(t)){const o=t[i];o&&s.push(this._setupListener(e,i,o))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let i;return vh(e)?(e.__addEventListener(t,s),i=()=>(e.__removeEventListener(t,s),null)):(e instanceof HTMLElement?Ch(this.beans.frameworkOverrides,e,t,s):e.addEventListener(t,s),i=()=>(e.removeEventListener(t,s),null)),this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}setupGridOptionListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const i=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const s=e.join("-")+this.propertyListenerId++,i=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=o.changeSet.id}const n={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(n)};e.forEach(o=>this.setupGridOptionListener(o,i))}getLocaleTextFunc(){return Wi(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 s=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),s}createBean(e,t,s){return(t||this.stubContext).createBean(e,s)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function vh(e){return e.__addEventListener!==void 0}var Wr=new Set(["__proto__","constructor","prototype"]);function wh(e,t){if(e!=null){if(Array.isArray(e)){for(let s=0;s<e.length;s++)t(s.toString(),e[s]);return}for(const s of Object.keys(e))t(s,e[s])}}function ie(e,t,s=!0,i=!1){x(t)&&wh(t,(o,n)=>{if(Wr.has(o))return;let r=e[o];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),_r(n)&&_r(r)&&!Array.isArray(r)?ie(r,n,s,i):(s||n!==void 0)&&(e[o]=n))})}function Jt(e,t,s){if(!t||!e)return;if(!s)return e[t];const i=t.split(".");let o=e;for(let n=0;n<i.length;n++){if(o==null)return;o=o[i[n]]}return o}function _r(e){return typeof e=="object"&&e!==null}var bh=/[&<>"']/g,Sh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ee(e,t){if(e==null)return null;const s=e.toString().toString();return t?s:s.replace(bh,i=>Sh[i])}var yh={resizable:!0,sortable:!0},Rh=0;function Ur(){return Rh++}function Ge(e){return e instanceof ei}var ei=class extends b{constructor(e,t,s,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=s,this.primary=i,this.isColumn=!0,this.instanceId=Ur(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new We,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Ee(s)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:s,colFlex:i}}=this;t?.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,s?.initCol(this),i?.initCol(this)}setColDef(e,t,s){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",s)}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:s}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=x(t)&&t.indexOf(".")>=0&&!i,this.tooltipFieldContainsDots=x(s)&&s.indexOf(".")>=0&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const s=e.width,i=e.initialWidth;return s!=null?t=s:i!=null?t=i: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 s=this.frameworkEventListenerService?.wrap(t)??t;this.colEventSvc.addEventListener(e,s)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(t)??t;this.colEventSvc.removeEventListener(e,s)}createColumnFunctionCallbackParams(e){return k(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable(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]??yh[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const s=this.createColumnFunctionCallbackParams(e);return t(s)}return!1}createColumnEvent(e,t){return k(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 V(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 s=e===!0;this.visible!==s&&(this.visible=s,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 s=!0;for(;e;){if(!e.isPadding()){s=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:s}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return k(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(V(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.colSpan(t);return Math.max(s,1)}getRowSpan(e){if(V(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.rowSpan(t);return Math.max(s,1)}setActualWidth(e,t,s=!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),s||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,s){const i=this.createColumnEvent(e,t);s&&ie(i,s),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ee(e){return e instanceof es}var es=class extends b{constructor(e,t,s,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=s,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=Ur(),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=>{Ge(t)?e.push(t):ee(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,s=!1;const i=this.findChildrenRemovingPadding();for(let n=0,r=i.length;n<r;n++){const a=i[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,s=!0):l==="closed"?(t=!0,s=!0):(e=!0,t=!0)}const o=e&&t&&s;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=s=>{s.forEach(i=>{ee(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},xh={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},$r=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Ks(e);let s=0;for(;;){let i=e??t;if(i?s!==0&&(i+="_"+s):i=s,!this.existingKeys[i])return this.existingKeys[i]=!0,String(i);s++}}},So=Object.freeze([]);function H(e){if(e?.length)return e[e.length-1]}function je(e,t,s){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((i,o)=>s?s(i,t[o]):t[o]===i)}function Fh(e){return e.sort((t,s)=>t-s)}function ue(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function Kr(e,t,s){for(let i=0;i<t.length;i++)ue(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(s,0,t[i])}var ts="ag-Grid-AutoColumn",yo="ag-Grid-SelectionColumn",jr="ag-Grid-RowNumbersColumn";function Ro(e){const t=[],s=i=>{for(let o=0;o<i.length;o++){const n=i[o];Ge(n)?t.push(n):ee(n)&&s(n.getChildren())}};return s(e),t}function He(e){return e.reduce((t,s)=>t+s.getActualWidth(),0)}function ss(e,t,s){const i={};if(!t)return;Be(null,t,n=>{i[n.getInstanceId()]=n}),s&&Be(null,s,n=>{i[n.getInstanceId()]=null});const o=Object.values(i).filter(n=>n!=null);e.context.destroyBeans(o)}function ti(e){return e.getId().startsWith(ts)}function De(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(yo)??!1}function Ot(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(jr)??!1}function si(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function qr(e,t){return je(e,t,(s,i)=>s.getColId()===i.getColId())}function Yr(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function pt(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function xo(e,t){const s=e===t,i=e.getColDef()===t,o=e.getColId()==t;return s||i||o}var Eh=(e,t)=>(s,i)=>{const o={value1:void 0,value2:void 0};let n=!1;return e&&(e[s]!==void 0&&(o.value1=e[s],n=!0),x(i)&&e[i]!==void 0&&(o.value2=e[i],n=!0)),!n&&t&&(t[s]!==void 0&&(o.value1=t[s]),x(i)&&t[i]!==void 0&&(o.value2=t[i])),o};function Qr(e,t=null,s,i,o){const n=new $r,{existingCols:r,existingGroups:a,existingColKeys:l}=Dh(i);n.addExistingKeys(l);const d=Zr(e,t,0,s,r,n,a,o),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return Be(null,h,(p,f)=>{ee(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDept:u}}function Dh(e){const t=[],s=[],i=[];return e&&Be(null,e,o=>{if(ee(o)){const n=o;s.push(n)}else{const n=o;i.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:s,existingColKeys:i}}function Zr(e,t,s,i,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&&kh(u)?d[c]=l.createProvidedColumnGroup(i,u,s,o,n,r,a):d[c]=Ph(e,i,u,o,n,a)}return d}function Ph(e,t,s,i,o,n){const r=Mh(s,i);r&&i?.splice(r.idx,1);let a=r?.column;if(a){const l=ii(e,s,a.getColId());a.setColDef(l,s,n),Jr(e,a,l,n)}else{const l=o.getUniqueKey(s.colId,s.field),d=ii(e,s,l);a=new ei(d,s,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Xr(e,t,s,i,o,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;s!==void 0&&t.setVisible(!s,a),l&&(l.updateColSort(t,i,a),o!==void 0&&l.setColSortIndex(t,o)),n!==void 0&&d?.setColPinned(t,n),r!==void 0&&c?.setColFlex(t,r)}function Jr(e,t,s,i){Xr(e,t,s.hide,s.sort,s.sortIndex,s.pinned,s.flex,i);const o=t.getFlex();if(!(o!=null&&o>0))if(s.width!=null)t.setActualWidth(s.width,i);else{const n=t.getActualWidth();t.setActualWidth(n,i)}}function Mh(e,t){if(t)for(let s=0;s<t.length;s++){const i=t[s].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[s].getId()===e.colId)return{idx:s,column:t[s]};continue}if(e.field!=null){if(i.field===e.field)return{idx:s,column:t[s]};continue}if(i===e)return{idx:s,column:t[s]}}}function ii(e,t,s,i){const{gos:o,dataTypeSvc:n,validation:r}=e,a={},l=o.get("defaultColDef");ie(a,l,!1,!0);const d=Ah(e,a,t,s);d&&Th(e,d,a),ie(a,t,!1,!0);const c=o.get("autoGroupColumnDef"),u=be(o);return t.rowGroup&&c&&u&&ie(a,{sort:c.sort,initialSort:c.initialSort},!1,!0),n?.validateColDef(a),r?.validateColDef(a,s,i),a}function Ah(e,t,s,i){const o=e.dataTypeSvc?.updateColDefAndGetColumnType(t,s,i),n=s.type??o??t.type;return t.type=n,n?si(n):void 0}function Th(e,t,s){if(!t.length)return;const i=Object.assign({},xh),o=e.gos.get("columnTypes")||{};for(const n of Object.keys(o)){const r=o[n];n in i?R(34,{key:n}):(r.type&&R(35),i[n]=r)}t.forEach(n=>{const r=i[n.trim()];r?ie(s,r,!1,!0):R(36,{t:n})})}function kh(e){return e.children!==void 0}function Be(e,t,s){if(t)for(let i=0;i<t.length;i++){const o=t[i];ee(o)&&Be(o,o.getChildren(),s),s(o,e)}}function ea(e,t){const s=[],i=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?s.push(r):i.push(r)}),t.get("enableRtl")?[...o,...i,...s]:[...s,...i,...o]}function ta(e,t){let s=!0;return Be(null,t,i=>{if(!ee(i))return;const o=i,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&&(s=!1)}),s}function sa(e,t){if(!e||e.length==0)return;const s=t(e[0]);for(let i=1;i<e.length;i++)if(s!==t(e[i]))return;return s}function ia(e,t,s){if(!t.length)return;const i=t.length===1?t[0]:null,o=sa(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:i,source:s})}function Ih(e,t,s){if(!t.length)return;const i=t.length===1?t[0]:null,o=sa(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:i,source:s})}function oa(e,t,s,i){e.dispatchEvent({type:t,columns:s,column:s&&s.length==1?s[0]:null,source:i})}function Gt(e,t,s,i,o=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:s,source:i})}function he(e,t,s){const{colModel:i,rowGroupColsSvc:o,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=i.getColDefCols()||[];if(!f?.length)return!1;if(t?.state&&!t.state.forEach)return R(32),!1;const m=(y,D,M,A,T)=>{if(!y)return;const P=Eh(D,t.defaultState),G=P("flex").value1;if(Xr(e,y,P("hide").value1,P("sort").value1,P("sortIndex").value1,P("pinned").value1,G,s),G==null){const $=P("width").value1;if($!=null){const ke=y.getColDef().minWidth??u.getDefaultColumnMinWidth();ke!=null&&$>=ke&&y.setActualWidth($,s)}}T||!y.isPrimary()||(h?.syncColumnWithState(y,s,P),o?.syncColumnWithState(y,s,P,M),n?.syncColumnWithState(y,s,P,A))},C=(y,D,M)=>{const A=ra(e,s),T=D.slice(),P={},G={},$=[],ke=[],tt=[];let ze=0;const le=o?.columns.slice()??[],Ls=n?.columns.slice()??[];y.forEach(se=>{const $t=se.colId;if($t.startsWith(ts)){$.push(se),tt.push(se);return}if(De($t)){ke.push(se),tt.push(se);return}const Dt=M($t);Dt?(m(Dt,se,P,G,!1),ue(T,Dt)):(tt.push(se),ze+=1)});const Wn=se=>m(se,null,P,G,!1);T.forEach(Wn),o?.sortColumns(la.bind(o,P,le)),n?.sortColumns(la.bind(n,G,Ls)),i.refreshCols(!1);const _n=(se,$t,zi=[])=>{$t.forEach(Dt=>{const Un=se(Dt.colId);ue(zi,Un),m(Un,Dt,null,null,!0)}),zi.forEach(Wn)};return _n(se=>r?.getColumn(se)??null,$,r?.getColumns()?.slice()),_n(se=>a?.getColumn(se)??null,ke,a?.getColumns()?.slice()),Lh(t,i,p),d.refresh(s),g.dispatchEvent({type:"columnEverythingChanged",source:s}),A(),{unmatchedAndAutoStates:tt,unmatchedCount:ze}};l?.start();let{unmatchedAndAutoStates:v,unmatchedCount:S}=C(t.state||[],f,y=>i.getColDefCol(y));if(v.length>0||x(t.defaultState)){const y=c?.getPivotResultCols()?.list??[];S=C(v,y,D=>c?.getPivotResultCol(D)??null).unmatchedCount}return l?.finish(),S===0}function na(e,t){const{colModel:s,autoColSvc:i}=e;if(!s.getColDefCols()?.length)return;const n=s.getColDefColTree(),r=Ro(n),a=[];let l=1e3,d=1e3,c=[];const u=i?.getColumns();u&&(c=c.concat(u)),r&&(c=c.concat(r)),c.forEach(h=>{const g=aa(h);V(g.rowGroupIndex)&&g.rowGroup&&(g.rowGroupIndex=l++),V(g.pivotIndex)&&g.pivot&&(g.pivotIndex=d++),a.push(g)}),he(e,{state:a,applyOrder:!0},t)}function ra(e,t){const{rowGroupColsSvc:s,pivotColsSvc:i,valueColsSvc:o,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:s?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:o?.columns.slice()??[]},d=Ht(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=n.getAllCols(),h=(A,T,P,G)=>{const $=T.map(G),ke=P.map(G);if(je($,ke))return;const ze=new Set(T);P.forEach(Ls=>{ze.delete(Ls)||ze.add(Ls)});const le=[...ze];a.dispatchEvent({type:A,columns:le,column:le.length===1?le[0]:null,source:t})},g=A=>{const T=[];return u.forEach(P=>{const G=c[P.getColId()];G&&A(G,P)&&T.push(P)}),T},p=A=>A.getColId();h("columnRowGroupChanged",l.rowGroupColumns,s?.columns??[],p),h("columnPivotChanged",l.pivotColumns,i?.columns??[],p);const m=g((A,T)=>{const P=A.aggFunc!=null,G=P!=T.isValueActive(),$=P&&A.aggFunc!=T.getAggFunc();return G||$});m.length>0&&oa(a,"columnValueChanged",m,t),Gt(a,g((A,T)=>A.width!=T.getActualWidth()),!0,t),ia(a,g((A,T)=>A.pinned!=T.getPinned()),t),Ih(a,g((A,T)=>A.hide==T.isVisible()),t);const D=g((A,T)=>A.sort!=T.getSort()||A.sortIndex!=T.getSortIndex());D.length>0&&r?.dispatchSortChangedEvents(t,D);const M=Ht(e);Gh(d,M,t,n,a)}}function Ht(e){const{colModel:t,rowGroupColsSvc:s,pivotColsSvc:i}=e,o=t.getColDefCols();if(V(o)||!t.isAlive())return[];const n=t.getAllCols(),r=s?.columns,a=i?.columns,l=u=>{const h=u.isRowGroupActive()&&r?r.indexOf(u):null,g=u.isPivotActive()&&a?a.indexOf(u):null,p=u.isValueActive()?u.getAggFunc():null,f=u.getSort()!=null?u.getSort():null,m=u.getSortIndex()!=null?u.getSortIndex():null;return{colId:u.getColId(),width:u.getActualWidth(),hide:!u.isVisible(),pinned:u.getPinned(),sort:f,sortIndex:m,aggFunc:p,rowGroup:u.isRowGroupActive(),rowGroupIndex:h,pivot:u.isPivotActive(),pivotIndex:g,flex:u.getFlex()??null}},d=n.map(u=>l(u)),c=new Map(t.getCols().map((u,h)=>[u.getColId(),h]));return d.sort((u,h)=>{const g=c.has(u.colId)?c.get(u.colId):-1,p=c.has(h.colId)?c.get(h.colId):-1;return g-p}),d}function aa(e){const t=(p,f)=>p??f??null,s=e.getColDef(),i=t(s.sort,s.initialSort),o=t(s.sortIndex,s.initialSortIndex),n=t(s.hide,s.initialHide),r=t(s.pinned,s.initialPinned),a=t(s.width,s.initialWidth),l=t(s.flex,s.initialFlex);let d=t(s.rowGroupIndex,s.initialRowGroupIndex),c=t(s.rowGroup,s.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(s.pivotIndex,s.initialPivotIndex),h=t(s.pivot,s.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(s.aggFunc,s.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:o,hide:n,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function Lh(e,t,s){if(!e.applyOrder||!e.state)return;const i=[];e.state.forEach(o=>{o.colId!=null&&i.push(o.colId)}),Oh(t.cols,i,t,s)}function Oh(e,t,s,i){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(ts)?o.splice(r++,0,a):o.push(a)}),o=ea(o,i),!ta(o,s.getColTree())){R(39);return}e.list=o}function Gh(e,t,s,i,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=i.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:s})}var la=(e,t,s,i)=>{const o=e[s.getId()],n=e[i.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(s),d=t.indexOf(i),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},Hh=class extends b{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(pt(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),pt(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:s,colAutosize:i,rowGroupColsSvc:o,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,colViewport:l,eventSvc:d}=t,c=this.colDefs?ra(t,e):void 0;s?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=Qr(t,this.colDefs,!0,h,e);ss(t,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,f=g.treeDept,m=Ro(p),C={};m.forEach(v=>C[v.getId()]=v),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"&&i?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:s,selectionColSvc:i,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([s,i,o],h);const g=Xu(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(),!je(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const s of e)s&&(s.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)}),s.addColumns(t))}selectCols(e,t){const s=e?.getPivotResultCols()??null;this.showingPivotResult=s!=null;const{map:i,list:o,tree:n,treeDepth:r}=s??t;return this.cols={list:o.slice(),map:{...i},tree:n.slice(),treeDepth:r},s&&(s.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(i=>{const o=ti(i);if(e){const n=t?.includes(i);return o||n}else return o||i.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,s){he(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},s)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const s=new Map(t.map((d,c)=>[d,c]));if(!e.list.some(d=>s.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=ea(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:s,eventSvc:i}=this.beans;s.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=pt(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){ss(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??[]}getAllCols(){const{pivotResultCols:e,autoColSvc:t,selectionColSvc:s}=this.beans,i=e?.getPivotResultCols()?.list;return[this.colDefCols?.list??[],t?.columns?.list??[],s?.columns?.list??[],i??[]].flat()}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:s,list:i}=t;if(typeof e=="string"&&s[e])return s[e];for(let o=0;o<i.length;o++)if(xo(i[o],e))return i[o];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}},Bh=class extends b{constructor(){super(...arguments),this.dispatchColumnChangedEvent=oa,this.columns=[]}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols}sortColumns(e){this.columns.sort(e)}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)}setColList(e=[],t,s,i,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}i&&h!==u||l.delete(c)}),(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,s,[...l.keys()],r)}updateColList(e=[],t,s,i,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),s){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]);ue(t,u)}o(u,s,r),a=!0}}),!a)return;i&&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 s=this.columns,i=[],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),v=r(f),S=a(f);let y;m!==void 0?y=m:v!==void 0?v===null?y=!1:y=v>=0:p?C!==void 0?y=C:S!==void 0?y=S!=null&&S>=0:y=!1:y=s.indexOf(g)>=0,y&&((p?v!=null||S!=null:v!=null)?i.push(g):o.push(g))});const u=g=>{const p=r(g.getColDef()),f=a(g.getColDef());return p??f};i.sort((g,p)=>{const f=u(g),m=u(p);return f===m?0:f<m?-1:1});const h=[].concat(i);return s.forEach(g=>{o.indexOf(g)>=0&&h.push(g)}),o.forEach(g=>{h.indexOf(g)<0&&h.push(g)}),s.forEach(g=>{h.indexOf(g)<0&&n(g,!1,e)}),h.forEach(g=>{s.indexOf(g)<0&&n(g,!0,e)}),this.columns=h}restoreColumnOrder(e,t){const s=this.columns,i=this.colModel.getColDefCols();if(!s.length||!i)return e;const o=Object.keys(t),n=new Set(o),r=new Set(o),a=new Set(s.map(S=>{const y=S.getColId();return r.delete(y),y}).concat(o)),l=[],d={};let c=0;for(let S=0;S<i.length;S++){const y=i[S].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,v=S=>{const y=d[S];for(let D=g;D<y;D++){const M=l[D];r.has(M)&&(t[M][m]=u++,r.delete(M))}g=y};return s.forEach(S=>{const y=S.getColId();if(n.has(y))v(y),t[y][m]=u++;else{const D=S.getColDef();(D[m]===null||D[m]===void 0&&D[C]==null)&&(h||(D[p]||D[p]===void 0&&D[f]?v(y):(r.forEach(T=>{t[T][m]=u+d[T]}),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 s;return typeof t!="number"?s=0:s=t+1,this.existingIds[e]=s,s}},Vh=class extends b{};function is(e,t,s){return s&&e.addDestroyFunc(()=>t.destroyBean(s)),s??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 i=(e||"").split(" ");if(i.length>1){i.forEach(o=>this.addOrRemoveCssClass(o,t));return}}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}},Nh=0,E=null,L=class extends b{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Nh++,this.cssClassManager=new Eo(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(s=>[s.selector,s])),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("data-ref"):null}applyElementsToComponent(e,t,s,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===E)this[t]=i??e;else{const n=s&&s[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){Vu(e.childNodes).forEach(i=>{if(!(i instanceof HTMLElement))return;const o=this.createComponentFromElement(i,n=>{n.getGui()&&this.copyAttributesFromNode(i,n.getGui())},t);if(o){if(o.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const n=Array.prototype.slice.call(i.children);o.addItems(n)}this.swapComponentForNode(o,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(e,t,s){const i=e.nodeName,o=this.getDataRefAttribute(e),n=i.indexOf("AG-")===0,r=n?this.componentSelectors.get(i):null;let a=null;if(r){const l=s&&o?s[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,o,s,a),a}copyAttributesFromNode(e,t){Nu(e.attributes,(s,i)=>t.setAttribute(s,i))}swapComponentForNode(e,t,s){const i=e.getGui();t.replaceChild(i,s),t.insertBefore(document.createComment(s.nodeName),i),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(s=>s.setAttribute("tabindex",t.toString()))}setTemplate(e,t,s){const i=At(e);this.setTemplateFromElement(i,t,s)}setTemplateFromElement(e,t,s,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let o=0;o<t.length;o++){const n=t[o];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,s)}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 s=t;return e==null?null:(s||(s=this.eGui),$s(e)?{element:e,parent:s}:{element:e.getGui(),parent:s})}prependChild(e,t){const{element:s,parent:i}=this.getContainerAndElement(e,t)||{};!s||!i||i.insertAdjacentElement("afterbegin",s)}appendChild(e,t){const{element:s,parent:i}=this.getContainerAndElement(e,t)||{};!s||!i||i.appendChild(s)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:s}=t;ar(this.eGui,e,{skipAriaHidden:s})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:s}=t;N(this.eGui,e,{skipAriaHidden:s});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,s){this.eGui.addEventListener(e,t,s),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 zh(e){return typeof e.then=="function"}var te=class Is{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(s=>this.onDone(s),s=>this.onReject(s))}static all(t){return t.length?new Is(s=>{let i=t.length;const o=new Array(i);t.forEach((n,r)=>{n.then(a=>{o[r]=a,i--,i===0&&s(o)})})}):Is.resolve()}static resolve(t=null){return new Is(s=>s(t))}then(t){return new Is(s=>{this.status===1?s(t(this.resolution)):this.waiters.push(i=>s(t(i)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(s=>s(t))}onReject(t){}};function Wh(e){return e?e.prototype&&"getGui"in e.prototype:!1}function da(e,t,s,i){const{name:o}=s;let n,r,a,l,d,c;if(t){const u=t,h=u[o+"Selector"],g=h?h(i):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 _h=class extends b{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,s,i=!1){return this.getCompDetails(this.gridOptions,e,t,s,i)}getCompDetails(e,t,s,i,o=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=da(this.beans.frameworkOverrides,e,t,i),g;const p=v=>{const S=this.registry.getUserComponent(n,v);S&&(l=S.componentFromFramework?void 0:S.component,d=S.componentFromFramework?S.component:void 0,g=S.params)};if(a!=null&&p(a),l==null&&d==null&&s!=null&&p(s),l&&r&&!Wh(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:v}=this.beans;o&&(a!==s||!s)?a?v?.isProvidedUserComp(a)||O(50,{compName:a}):s?v||O(260,{...this.gos.getModuleErrorParams(),propName:n,compName:s}):O(216,{name:n}):s&&!v&&O(146,{comp:s});return}const f=this.mergeParams(e,t,i,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,s,i){const o=!t;let n;o?n=new e:n=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(n);const r=n.init?.(s);return r==null?te.resolve(n):r.then(()=>n)}mergeParams(e,t,s,i=null,o){const n={...s,...o},r=e,a=r&&r[t.name+"Params"];if(typeof a=="function"){const l=a(s);ie(n,l)}else typeof a=="object"&&ie(n,a);return ie(n,i),n}},Uh={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},$h={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Kh={name:"headerComponent",optionalMethods:["refresh"]},jh={name:"innerHeaderComponent"},qh={name:"innerHeaderGroupComponent"},Yh={name:"headerGroupComponent"},Qh={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},Zh={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Xh={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"]},Jh={name:"loadingCellRenderer",cellRenderer:!0},eg={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},tg={name:"loadingOverlayComponent",optionalMethods:["refresh"]},sg={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},ig={name:"tooltipComponent"},Do={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},og={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},ng={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},rg={name:"loadingCellRenderer",cellRenderer:!0},ag={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},lg={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function dg(e,t){return e.getCompDetailsFromGridOptions($h,"agDragAndDropImage",t,!0)}function cg(e,t,s){return e.getCompDetails(t,Qh,void 0,s)}function ug(e,t,s){return e.getCompDetails(t,Kh,"agColumnHeader",s)}function hg(e,t,s){return e.getCompDetails(t,jh,void 0,s)}function gg(e,t){const s=t.columnGroup.getColGroupDef();return e.getCompDetails(s,Yh,"agColumnGroupHeader",t)}function pg(e,t,s){return e.getCompDetails(t,qh,void 0,s)}function fg(e,t){return e.getCompDetailsFromGridOptions(ng,void 0,t,!0)}function mg(e,t){return e.getCompDetailsFromGridOptions(rg,"agLoadingCellRenderer",t,!0)}function Cg(e,t){return e.getCompDetailsFromGridOptions(ag,"agGroupRowRenderer",t,!0)}function vg(e,t){return e.getCompDetailsFromGridOptions(lg,"agDetailCellRenderer",t,!0)}function ca(e,t,s){return e.getCompDetails(t,Zh,void 0,s)}function wg(e,t,s){return e.getCompDetails(t,Xh,void 0,s)}function bg(e,t,s){return e.getCompDetails(t,Jh,"agSkeletonCellRenderer",s,!0)}function ua(e,t,s){return e.getCompDetails(t,eg,"agCellEditor",s,!0)}function ha(e,t,s,i){return e.getCompDetails(t,Do,i,s,!0)}function Sg(e,t){return e.getCompDetailsFromGridOptions(Uh,"agDateInput",t,!0)}function yg(e,t){return e.getCompDetailsFromGridOptions(tg,"agLoadingOverlay",t,!0)}function Rg(e,t){return e.getCompDetailsFromGridOptions(sg,"agNoRowsOverlay",t,!0)}function xg(e,t){return e.getCompDetails(t.colDef,ig,"agTooltipComponent",t,!0)}function ga(e,t,s,i){return e.getCompDetails(t,og,i,s)}function Fg(e,t){return da(e,t,Do)}function Eg(e,t,s){return e.mergeParams(t,Do,s)}function Bt(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var pa=new Set,oi={},ft={},ni,fa=!1,ma=!1;function Dg(e){const[t,s]=e.version.split(".")||[],[i,o]=ni.split(".")||[];return t===i&&s===o}function Pg(e){ni||(ni=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;if(e.version?Dg(e)||kt(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${ni}.`)):kt(t(`'${e.moduleName}' is incompatible.`)),e.validate){const s=e.validate();s.isValid||kt(`${s.message}`)}}function os(e,t){Pg(e);const s=e.rowModels??["all"];pa.add(e);let i;t!==void 0?(fa=!0,ft[t]===void 0&&(ft[t]={}),i=ft[t]):i=oi,s.forEach(o=>{i[o]===void 0&&(i[o]={}),i[o][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(o=>os(o,t))}function Mg(e){delete ft[e]}function Ca(e,t,s){const i=o=>!!oi[o]?.[e]||!!ft[t]?.[o]?.[e];return i(s)||i("all")}function Po(){return fa}function Ag(e,t){const s=ft[e]??{};return[...Object.values(oi.all??{}),...Object.values(s.all??{}),...Object.values(oi[t]??{}),...Object.values(s[t]??{})]}function Tg(){return new Set(pa)}function kg(e,t){const s=ft[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function Ig(){return ma}function Lg(){ma=!0}var Og=class{static register(e){os(e,void 0)}static registerModules(e){e.forEach(t=>os(t,void 0))}},Gg=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 s=new t;s.beanName?this.beans[s.beanName]=s:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(s)}),e.derivedBeans?.forEach(t=>{const{beanName:s,bean:i}=t(this);this.beans[s]=i,this.createdBeans.push(i)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(s=>{s.preWireBeans?.(this.beans),s.wireBeans?.(this.beans)}),e.forEach(s=>s.preConstruct?.()),t&&e.forEach(t),e.forEach(s=>s.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}},Hg=class extends Gg{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),Mg(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},Bg="ag-column-first",Vg="ag-column-last";function Mo(e,t,s,i){return V(e)?[]:wa(e.headerClass,e,t,s,i)}function Ng(e,t,s,i){return V(e)?[]:wa(e.toolPanelClass,e,t,s,i)}function va(e,t,s){e.addOrRemoveCssClass(Bg,s.isColAtEdge(t,"first")),e.addOrRemoveCssClass(Vg,s.isColAtEdge(t,"last"))}function zg(e,t,s,i){return k(t,{colDef:e,column:s,columnGroup:i})}function wa(e,t,s,i,o){if(V(e))return[];let n;if(typeof e=="function"){const r=zg(t,s,i,o);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function Pe(e,t){const s=Dr(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Wg=class extends b{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}setScrollTop(e){const{gos:t,pagination:s}=this.beans,i=t.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,i&&e===0){const o=s?.getCurrentPage()??0;o!==this.lastPage&&(this.lastPage=o,this.scrollGoingDown=!0)}this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame")}verifyAnimationFrameOn(e){this.active===!1&&R(92,{methodName:e})}createTask(e,t,s){this.verifyAnimationFrameOn(s);const i={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[s],i),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((s,i)=>s.index!==i.index?t*(i.index-s.index):i.createOrder-s.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,s=t.list,i=this.createTasksP2,o=i.list,n=this.destroyTasks,r=new Date().getTime();let a=new Date().getTime()-r;const l=e<=0,d=this.beans.ctrlsSvc.getScrollFeature();for(;l||a<e;){if(!d.scrollGridIfNeeded()){let u;if(s.length)this.sortTaskList(t),u=s.pop().task;else if(o.length)this.sortTaskList(i),u=o.pop().task;else if(n.length)u=n.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(u)||u()}a=new Date().getTime()-r}s.length||o.length||n.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);Pe(this.beans,e)}isQueueEmpty(){return!this.ticking}},w={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"},Ao=!1,ri=0;function _g(e){ri>0||(e.addEventListener("keydown",ai),e.addEventListener("mousedown",ai))}function Ug(e){ri>0||(e.removeEventListener("keydown",ai),e.removeEventListener("mousedown",ai))}function ai(e){const t=Ao,s=e.type==="keydown";s&&(e.ctrlKey||e.metaKey||e.altKey)||t!==s&&(Ao=s)}function $g(e){const t=_(e);return _g(t),ri++,()=>{ri--,Ug(t)}}function ba(){return Ao}function Sa(e,t,s){t.addManagedElementListeners(s,{keydown:i=>{if(!i.defaultPrevented&&i.key===w.TAB){const o=i.shiftKey;Ye(e,s,!1,o)||vt(e,o)&&i.preventDefault()}}})}function mt(e,t,s=!1){const i=Ou;let o=rr;t&&(o+=", "+t),s&&(o+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>me(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 qe(e,t=!1,s=!1,i=!1){const o=mt(e,i?".ag-tab-guard":null,s),n=t?H(o):o[0];return n?(n.focus({preventScroll:!0}),!0):!1}function Ye(e,t,s,i){const o=mt(t,s?':not([tabindex="-1"])':null),n=z(e);let r;s?r=o.findIndex(l=>l.contains(n)):r=o.indexOf(n);const a=r+(i?-1:1);return a<0||a>=o.length?null:o[a]}function To(e,t=5){let s=0;for(;e&&so(e)===null&&++s<=t;)e=e.parentElement;return so(e)===null?null:e}function ya(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Ct(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function li(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function vt(e,t,s=!1){const i=e.ctrlsSvc.get("gridCtrl");return!s&&i.focusNextInnerContainer(t)?!0:((s||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function Kg(e,t=!1){return e===w.DELETE?!0:!t&&e===w.BACKSPACE?ir():!1}var jg=class extends b{constructor(e,t,s,i){super(),this.cellCtrl=e,this.rowNode=s,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case w.ENTER:this.onEnterKeyDown(e);break;case w.F2:this.onF2KeyDown(e);break;case w.ESCAPE:this.onEscapeKeyDown(e);break;case w.TAB:this.onTabKeyDown(e);break;case w.BACKSPACE:case w.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case w.DOWN:case w.UP:case w.RIGHT:case w.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const s=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,s,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:s}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&s?.ensureCellVisible(i)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:s,beans:i,rowNode:o}=this,{gos:n,rangeSvc:r,eventSvc:a}=i;if(!s.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),Kg(e,n.get("enableCellEditingOnBackspace"))){if(r&&xe(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const{column:l}=s,d=this.beans.valueSvc.getDeleteValue(l,o);o.setDataValue(l,d,"cellClear")}}else i.editSvc?.startRowOrCellEdit(s,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){const{cellCtrl:t,beans:s}=this;if(t.editing||this.rowCtrl.editing)t.stopEditingAndFocus(!1,e.shiftKey);else if(s.gos.get("enterNavigatesVertically")){const i=e.shiftKey?w.UP:w.DOWN;s.navigation?.navigateToNextCell(null,i,t.cellPosition,!1)}else s.editSvc?.startRowOrCellEdit(t,w.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){const{cellCtrl:t,beans:s}=this;t.editing||s.editSvc?.startRowOrCellEdit(t,w.F2,e)}onEscapeKeyDown(e){const{cellCtrl:t,beans:s}=this;t.editing&&(s.editSvc?.stopRowOrCellEdit(t,!0),t.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;const i=e.key;i===w.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,i,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;!this.cellCtrl.editing&&$e(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},qg=class extends b{constructor(e,t,s){super(),this.cellCtrl=e,this.column=s,this.beans=t}onMouseEvent(e,t){if(!Fe(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:s,gos:i,editSvc:o}=this.beans,n=e.ctrlKey||e.metaKey;s&&n&&s.getCellRangeCount(this.cellCtrl.cellPosition)>1&&s.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),(i.get("singleClickEdit")||a.singleClickEdit)&&!i.get("suppressClickEdit")&&!(e.shiftKey&&s?.getCellRanges().length!=0)&&o?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){const{column:t,beans:s,cellCtrl:i}=this,{eventSvc:o,frameworkOverrides:n,gos:r,editSvc:a}=s,l=t.getColDef(),d=i.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(i,null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:s,shiftKey:i}=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=Ot(p.column);if(d&&f&&!d.handleMouseDownOnCell(p,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!h){const C=u.get("enableCellTextSelection")&&e.defaultPrevented,v=(Ie()||C)&&!n.editing&&!io(o)&&!g;n.focusCell(v)}if(i&&h&&!c.isCellFocused(p)){e.preventDefault();const m=c.getFocusedCell();if(m){const{column:C,rowIndex:v,rowPinned:S}=m,D=r.rowRenderer.getRowByPosition({rowIndex:v,rowPinned:S})?.getCellCtrl(C);D?.editing&&D.stopEditing(),c.setFocusedCell({column:C,rowIndex:v,rowPinned:S,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!g){if(l)if(f&&e.preventDefault(),i)l.extendLatestRangeToCell(p);else{const m=t||s;l.setRangeToCell(p,m)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const s=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(s&&i)return!0}return!1}containsWidget(e){return st(e,"ag-selection-checkbox",3)||st(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),s?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),s?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,s=t.contains(e.target),i=t.contains(e.relatedTarget);return s&&i}destroy(){super.destroy()}},Yg=class extends b{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,{modelUpdated: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();je(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,s=e.getColSpan(t),i=[];if(s===1)i.push(e);else{let o=e;const n=e.getPinned();for(let r=0;o&&r<s&&(i.push(o),o=this.beans.visibleCols.getColAfter(o),!(!o||V(o)||n!==o.getPinned()));r++);}return i}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=H(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,s=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return s+i+(e||0)}return s+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const s=Ke(this.beans)*this.rowSpan;this.eContent.style.height=`${s}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Qg="ag-cell",Zg="ag-cell-auto-height",Xg="ag-cell-normal-height",Jg="ag-cell-focus",ep="ag-cell-first-right-pinned",tp="ag-cell-last-left-pinned",sp="ag-cell-not-inline-editing",ip="ag-cell-wrap-text",di="cellCtrl";function ko(e,t){return Vr(e,t,di)}var op=0,ns=class extends b{constructor(e,t,s,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,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.beans=s;const{colId:o,colIdSanitised:n}=e;this.instanceId=o+"-"+op++,this.colIdSanitised=n,this.createCellPosition(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusSvc.shouldRestoreFocus(this.cellPosition)}onFocusOut(){this.beans.focusSvc.clearRestoreFocus()}addFeatures(){const{beans:e}=this;this.positionFeature=new Yg(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new qg(this,e,this.column),this.keyboardListener=new jg(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();const{rangeSvc:t}=e;t&&xe(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,s,i,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.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,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:s,column:i,rowNode:o,rangeFeature:n}=this,{userCompFactory:r}=s,a=this.getValueToDisplay();let l;if(o.stub&&o.groupData?.[i.getId()]==null){const c=this.createCellRendererParams();l=bg(r,i.getColDef(),c)}else if(this.isCellRenderer()){const c=this.createCellRendererParams();l=ca(r,i.getColDef(),c)}this.comp.setRenderDetails(l,a,e),!t&&n&&Pe(s,()=>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}=this.beans.gridOptions;return e.checkboxSelection||De(this.column)&&t&&typeof t!="string"&&ht(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),s=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return t||s||i||o}onPopupEditorClosed(){this.editing&&this.stopEditingAndFocus()}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:s,rowNode:i,comp:o,eGui:n,beans:{valueSvc:r,gos:a}}=this;return k(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(s,i),setValue:d=>r.setValue(i,s,d),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:s.getPinned(),colDef:s.getColDef(),column:s,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(),s=e!=null&&!!e.newData,i=e!=null&&!!e.suppressFlash,o=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,n=e&&e.forceRefresh||o||s,r=!!this.comp,a=this.updateAndFormatValue(r),l=n||a;if(r){if(l){this.showValue(s,!1);const d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!i&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.applyCellClassRules()}}stopEditingAndFocus(e=!1,t=!1){this.beans.editSvc?.stopEditingAndFocus(this,e,t)}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,s=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!=s:!0}valuesAreEqual(e,t){const s=this.column.getColDef();return s.equals?s.equals(e,t):e===t}addDomData(e){const t=this.eGui;lt(this.beans.gos,t,di,this),e.addDestroyFunc(()=>lt(this.beans.gos,t,di,null))}createEvent(e,t){const{rowNode:s,column:i,value:o,beans:n}=this;return k(n.gos,{type:t,node:s,data:s.data,value:o,column:i,colDef:i.getColDef(),rowPinned:s.rowPinned,event:e,rowIndex:s.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:s}=this;va(e,t,s.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);$i(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})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.rangeFeature?.onCellSelectionChanged()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(Ot(this.column)&&(e=!0),Ce(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(ep,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(tp,e)}isCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}onCellFocused(e){const{beans:t}=this;if(li(t))return;const s=this.isCellFocused();if(!this.comp){s&&e?.forceBrowserFocus&&(this.focusEventToRestore=e);return}if(this.focusEventToRestore=void 0,this.comp.addOrRemoveCssClass(Jg,s),s&&e&&e.forceBrowserFocus){let o=this.comp.getFocusableElement();if(this.editing){const n=mt(o,null,!0);n.length&&(o=n[0])}o.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const i=t.gos.get("editType")==="fullRow";!s&&!i&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),s&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Re(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(Qg,!0),e.addOrRemoveCssClass(sp,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(Zg,t),e.addOrRemoveCssClass(Xg,!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(ip,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),s=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(s),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(s)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],super.destroy()}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,s){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,s);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}))}createRowDragComp(e,t,s){const i=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,s);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},Ra="__ag_grid_instance";function xa(e,t){t[Ra]=e.gridInstanceId}function ci(e,t){return Fa(e,t.target)}function Fa(e,t){let s=t;for(;s;){const i=s[Ra];if(x(i))return i===e.gridInstanceId;s=s.parentElement}return!1}function Ea(e,t){return ko(e,t.target)?.getFocusedCellPosition()??null}function ui(e,t){const s=Q(e.gos,"normal"),i=t;let o,n;if(i.clientX!=null||i.clientY!=null?(o=i.clientX,n=i.clientY):(o=i.x,n=i.y),s){const r=e.ctrlsSvc.getScrollFeature(),a=r.getVScrollPosition(),l=r.getHScrollPosition();o+=l.left,n+=a.top}return{x:o,y:n}}var Da=(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))(Da||{}),np=class extends b{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 s={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:s,dragSource:e}),this.dragSvc.addDragSource(s)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:s}=this,i=t.find(o=>o.dragSource===e);i&&(s.removeDragSource(i.params),ue(t,i))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:s}=this;e.forEach(i=>t.removeDragSource(i.params)),e.length=0,s.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 s=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(s)}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 s=this.getHorizontalDirection(e),i=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,s,i,t),r!==null&&n===null&&a?.onGridExit?.(d),r===null&&n!==null&&a?.onGridEnter?.(d),this.enterDragTargetIfExists(n,e,s,i,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,s,i,t);n.onDragging(c)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,s=[[e.getContainer()]];return t?s.concat(t):s}isMouseOnDropTarget(e,t){const s=this.getAllContainersFromDropTarget(t);let i=!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 s)if(o(e,a)){i=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:i&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){const s=t.length;if(s===0)return null;if(s===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,s,i,o){if(e&&e.onDragEnter){const n=this.createDropTargetEvent(e,t,s,i,o);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,s,i){const{lastDropTarget:o}=this;if(!o)return;if(o.onDragLeave){const r=this.createDropTargetEvent(o,e,t,s,i);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(s=>s.external).find(s=>s.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const s=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:i}=e;return s.contains(i)}getHorizontalDirection(e){const t=this.eventLastTime?.clientX,s=e.clientX;return t===s?null:t>s?"left":"right"}getVerticalDirection(e){const t=this.eventLastTime?.clientY,s=e.clientY;return t===s?null:t>s?"up":"down"}createDropTargetEvent(e,t,s,i,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 k(d,{event:t,x:c,y:u,vDirection:i,hDirection:s,dragSource:l,fromNudge:o,dragItem:a,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&Pr(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;if(e){const{comp:t}=e;if(t){const s=t.getGui();this.dragAndDropImageParent?.removeChild(s),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:s}=this;if(!e)return;const i=dg(s,k(t,{dragSource:e}));if(!i)return;const o=i.newAgStackInstance();this.dragAndDropImageComp={promise:o},o.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:s}=this;if(!t)return;const i=e.getGui();i.style.setProperty("position","absolute"),i.style.setProperty("z-index","9999"),xa(this.gos,i),s.applyThemeClasses(i),e.setIcon(null,!1);let{dragItemName:o}=t;typeof o=="function"&&(o=o()),e.setLabel(o||""),i.style.top="20px",i.style.left="20px";const n=Ys(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(i):R(54)}registerGridDropTarget(e,t){const s={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(s),t.addDestroyFunc(()=>this.removeDropTarget(s))}},Pa=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 s=t||this.shouldSkipVerticalScroll();if(s&&this.shouldSkipHorizontalScroll())return;const i=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<i.left+o,this.tickRight=e.clientX>i.right-o,this.tickUp=e.clientY<i.top+o&&!s,this.tickDown=e.clientY>i.bottom-o&&!s,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 Ma(e){const{rowIndex:t,rowPinned:s,column:i}=e;return`${t}.${s??"null"}.${i.getId()}`}function hi(e,t){const s=e.column===t.column,i=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return s&&i&&o}function Aa(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 Ta(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function rp(e){let t=0,s;const{pinnedRowModel:i,rowModel:o,pageBounds:n}=e;return i?.getPinnedTopRowCount()?s="top":o.getRowCount()?(s=null,t=n.getFirstRow()):i?.getPinnedBottomRowCount()&&(s="bottom"),s===void 0?null:{rowIndex:t,rowPinned:s}}function ap(e){let t,s=null;const{pinnedRowModel:i,pageBounds:o}=e,n=i?.getPinnedBottomRowCount(),r=i?.getPinnedTopRowCount();return n?(s="bottom",t=n-1):e.rowModel.getRowCount()?(s=null,t=o.getLastRow()):r&&(s="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:s}}function rs(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 wt(e,t){const s=e.spannedRowRenderer?.getCellByPosition(t);if(s)return s;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}var lp=class extends b{constructor(e){super(),this.eContainer=e}postConstruct(){const{rowModel:e,gos:t,ctrlsSvc:s}=this.beans;J(t,e)&&(this.clientSideRowModel=e),s.whenReady(this,i=>{const o=i.gridBodyCtrl;this.autoScrollService=new Pa({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:s}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||s?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const i=[...this.beans.selectionSvc?.getSelectedNodes()??[]].sort((o,n)=>o.rowIndex==null||n.rowIndex==null?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(n));if(i.indexOf(t)!==-1)return i}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=ui(this.beans,e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const{dragAndDrop:s,gos:i}=this.beans,o=this.isFromThisGrid(e),n=i.get("rowDragManaged"),r=e.dragItem.rowNodes;n&&this.shouldPreventRowMove()||(i.get("suppressMoveWhenRowDragging")||!o?s.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(r[0],t):this.moveRows(r,t))}getRowIndexNumber(e){const t=e.getRowIndexString();return parseInt(H(t.split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel,s=t.getLastHighlightedRowNode(),i=s&&s.highlighted==="Below",o=ui(this.beans,e).y,n=e.dragItem.rowNodes;let r=i?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,s=0){const i=this.beans.focusSvc,o=i.getFocusedCell(),n=o&&wt(this.beans,o);this.clientSideRowModel.ensureRowsAtPixel(e,t,s)&&(n?n.focusCell():i.clearFocusedCell())}addRowDropZone(e){if(!e.getContainer()){R(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e)){R(56);return}let s={getContainer:e.getContainer};e.fromGrid?s=e:(e.onDragEnter&&(s.onDragEnter=o=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",o))}),e.onDragLeave&&(s.onDragLeave=o=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",o))}),e.onDragging&&(s.onDragging=o=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",o))}),e.onDragStop&&(s.onDragStop=o=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",o))}),e.onDragCancel&&(s.onDragCancel=o=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",o))}));const i={isInterestedIn:o=>o===2,getIconName:()=>"move",external:!0,...s};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}getRowDropZone(e){const t=this.getContainer.bind(this),s=this.onDragEnter.bind(this),i=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=>{s(l),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",l))}:s,onDragLeave:e.onDragLeave?l=>{i(l),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",l))}:i,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:s,onDragLeave:i,onDragging:o,onDragStop:n,onDragCancel:r,fromGrid:!0},a}draggingToRowDragEvent(e,t){const s=this.beans,{pageBounds:i,rowModel:o,gos:n}=s,r=ui(s,t).y,a=r>i.getCurrentPageHeight();let l=-1,d;return a||(l=o.getRowIndexAtPixel(r),d=o.getRow(l)),k(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 s=this.draggingToRowDragEvent(e,t);this.eventSvc.dispatchEvent(s)}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:s}=this.beans;s.get("rowDragManaged")&&(s.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e);const{dragAndDrop:t,gos:s}=this.beans;s.get("rowDragManaged")&&(s.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 ka(e,t,s){if(s===0)return!1;const i=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(i,o)<=s}var dp=class extends b{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,s=e.mouseDownListener;if(t.removeEventListener("mousedown",s),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,s=t.find(i=>i.dragSource===e);s&&(this.removeListener(s),ue(t,s))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:s,includeTouch:i,stopPropagationForTouch:o}=e;s.addEventListener("mousedown",t);let n=null;const r=this.gos.get("suppressTouch");i&&!r&&(n=a=>{io(a.target)||(o&&a.stopPropagation(),this.onTouchStart(e,a))},s.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!i})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const s=t.touches[0];this.touchLastTime=s,this.touchStart=s;const i=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:i,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(s,this.touchStart,e.eElement)}onMouseDown(e,t){const s=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||s._alreadyProcessedByDragService||(s._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 i=d=>this.onMouseMove(d,e.eElement),o=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===w.ESCAPE&&this.cancelDrag(e.eElement)},a=dt(this.beans),l=[{target:a,type:"mousemove",listener:i},{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:s,type:i,listener:o,options:n}=t;s.addEventListener(i,o,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:s,type:i,listener:o,options:n}=t;s.removeEventListener(i,o,n)})})}isEventNearStartEvent(e,t){const{dragStartPixels:s}=this.currentDragParams,i=x(s)?s:4;return ka(e,t,i)}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,s){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:s}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const s=this.getFirstActiveTouch(e.touches);s&&this.onCommonMove(s,this.touchStart,t)}onMouseMove(e,t){Ie()&&_(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,s=t.get("enableCellTextSelection"),i=e.type==="mousemove",o=n=>!!n.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return s&&i&&e.cancelable&&ci(t,e)&&!o(e)}onTouchUp(e,t){let s=this.getFirstActiveTouch(e.changedTouches);s||(s=this.touchLastTime),this.onUpCommon(s,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 Ia(e,t){return e+"_"+t}function W(e){return e instanceof Io}var Io=class extends b{constructor(e,t,s,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=s,this.pinned=i,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 Ia(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=H(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=>{Ge(t)?e.push(t):W(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Ge(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(s=>{if(W(s)&&(!s.displayedChildren||!s.displayedChildren.length))return;switch(s.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(s);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(s);break;default:this.displayedChildren.push(s);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},gi="row-group-",La="t-",Oa="b-",cp=0,bt=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:s,selectionSvc:i,rowSpanSvc:o}=this.beans,n=this.data;this.data=e,s?.onDataChanged(),this.updateDataOnDetailNode(),i?.updateRowSelectable(this),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(e,n,t);this.__localEventService?.dispatchEvent(r),o?.onRowDataUpdated(this)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,s){return{type:"dataChanged",node:this,oldData:t,newData:e,update:s}}getRowIndexString(){return this.rowIndex==null?(O(13),null):this.rowPinned==="top"?La+this.rowIndex:this.rowPinned==="bottom"?Oa+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:s}=this.beans,i=s?.createDaemonNode?.(this),o=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),s&&(s.updateRowSelectable(this),s.syncInRowNode(this,i));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 s=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:s.length>0?s:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(gi)&&O(14,{groupPrefix:gi})}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,s){this.beans.expansionSvc?.setExpanded(this,e,t,s)}setDataValue(e,t,s){const{colModel:i,valueSvc:o,gos:n,selectionSvc:r,rowSpanSvc:a}=this.beans,l=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!l)return!1;const d=o.getValueForDisplay(l,this);if(n.get("readOnlyEdit")){const{beans:{eventSvc:u},data:h,rowIndex:g,rowPinned:p}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:g,rowPinned:p,column:l,colDef:l.colDef,data:h,node:this,oldValue:d,newValue:t,value:t,source:s}),!1}const c=o.setValue(this,l,t,s);return this.dispatchCellChangedEvent(l,t,d),r?.updateRowSelectable(this),a?.onRowDataUpdated(this),c}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,s){const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:s};this.__localEventService?.dispatchEvent(i)}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,s="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:s})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new We),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 We),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);const s=this.frameworkEventListenerService?.wrap(t)??t;this.__localEventService.addEventListener(e,s)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(t)??t;this.removeLocalListener(e,s)}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 Ga(e,t,s){return k(t,{type:s,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Ha=class extends L{constructor(e,t){super('<div class="ag-filter"></div>'),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(()=>{})??te.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:s}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(i=>{const o=i.getGui();x(o)||R(69,{guiFromFilter:o}),this.appendChild(o),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:s,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Z(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},Ba="ag-resizer-wrapper",Qe=(e,t)=>`<div data-ref="${e}Resizer" class="ag-resizer ag-resizer-${t}"></div>`,up=`<div class="${Ba}">
        ${Qe("eTopLeft","topLeft")}
        ${Qe("eTop","top")}
        ${Qe("eTopRight","topRight")}
        ${Qe("eRight","right")}
        ${Qe("eBottomRight","bottomRight")}
        ${Qe("eBottom","bottom")}
        ${Qe("eBottomLeft","bottomLeft")}
        ${Qe("eLeft","left")}
    </div>`,Va=class extends b{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,s=t/2-this.getWidth()/2,i=e/2-this.getHeight()/2;this.offsetElement(s,i)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:s,width:i,minHeight:o,height:n,x:r,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,d=0;const c=me(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=s||d,i&&this.setWidth(i),n&&this.setHeight(n),(!i||!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 s=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(s),this.moveElementDragListener=s):(this.dragSvc?.removeDragSource(s),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 i=!!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)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=i)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";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,s=this.element;let i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Yt(s,e),e=oo(s),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(i?(s.style.maxHeight="unset",s.style.minHeight="unset"):t?Yt(s,e):(s.style.height=`${e}px`,s.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:s}=this.offsetParent;if(!s)return null;const i=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:i.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-i.bottom}}return s+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:s}=this.config;let i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)we(t,e),e=jt(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,n=s?this.position.x:this.element.getBoundingClientRect().left;o&&e+n>o&&(e=o-n)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?we(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:s}=this.config,i=s?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const s=this.getAvailableHeight();this.element.style.setProperty("max-height",`${s}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=Le(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:s,isTop:i,anywhereWithin:o,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!s,!!o,r)?0:r,d=this.shouldSkipY(t,!!i,n,a)?0:a;return{movementX:l,movementY:d}}shouldSkipX(e,t,s,i){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=i<0&&e.clientX>a+n.left||i>0&&e.clientX<a+n.left:s?l=i<0&&e.clientX>r.right||i>0&&e.clientX<a+n.left:l=i<0&&e.clientX>r.right||i>0&&e.clientX<r.right,l)}shouldSkipY(e,t,s=0,i){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=i<0&&e.clientY>a+n.top+s||i>0&&e.clientY<a+n.top:l=i<0&&e.clientY>r.bottom||i>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[data-ref=eTopLeftResizer]")},top:{element:e.querySelector("[data-ref=eTopResizer]")},topRight:{element:e.querySelector("[data-ref=eTopRightResizer]")},right:{element:e.querySelector("[data-ref=eRightResizer]")},bottomRight:{element:e.querySelector("[data-ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[data-ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[data-ref=eBottomLeftResizer]")},left:{element:e.querySelector("[data-ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const s=new DOMParser().parseFromString(up,"text/html").body;e.appendChild(s.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${Ba}`);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:s,forcePopupParentAsOffsetParent:i}=this.config;!s&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(s=>!s.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,s=0;for(let i=0;i<e.length;i++){const o=e[i],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,s+=a}return{height:t,width:s}}applySizeToSiblings(e){let t=null;const s=this.getSiblings();if(s){for(let i=0;i<s.length;i++){const o=s[i];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=s[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:s}=this.config,{isTop:i,isRight:o,isBottom:n,isLeft:r}=this.currentResizer,a=o||r,l=n||i,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:i}),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 v=!1;r&&(g=m-C,(u+g<=0||C<=this.minWidth)&&(v=!0,g=0)),v||this.setWidth(C)}if(l&&c){const f=i?-1:1,m=this.getHeight(),C=m+c*f;let v=!1;i?(p=m-C,(h+p<=0||C<=this.minHeight)&&(v=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<C&&this.getMinSizeOfSiblings().height+C>this.element.parentElement.offsetHeight&&(v=!0),v||this.setHeight(C)}this.updateDragStartPosition(e.clientX,e.clientY),((t||s)&&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:s}=this.position;let i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:o,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+o,s+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()}},Na="ag-focus-managed",St=class extends b{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const i=Ye(this.beans,this.eFocusable,!1,s.shiftKey);i&&(i.focus(),s.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:s}}=this;e.classList.add(Na),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),s&&this.addManagedElementListeners(e,{focusout:s})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Fe(t))return;const{callbacks:s}=this;if(s.shouldStopEventPropagation(t)){gt(t);return}t.key===w.TAB?s.onTabKeyDown(t):s.handleKeyDown&&s.handleKeyDown(t)}})}},za={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 Lo(e,t){const{debounceMs:s}=e;return pi(e)?(s!=null&&R(71),0):s??t}function pi(e){return(e.buttons?.indexOf("apply")??-1)>=0}var Wa=class extends L{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=E,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new St(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Va(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&&t.removeEventListener("submit",this.onFormSubmit);const s=`
            <form class="ag-filter-wrapper">
                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" data-ref="eFilterBody">
                    ${this.createBodyTemplate()}
                </div>
            </form>`;this.setTemplate(s,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=pi(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=pi(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:s,readOnly:i}=t??{},{buttons:o,readOnly:n}=e;if(i===n&&Tt(s,o))return;const r=o&&o.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(Z(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):r&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!r){this.eButtonsPanel&&ve(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=At(`<button
                    type="${d==="apply"?"submit":"button"}"
                    data-ref="${d}FilterButton"
                    class="ag-button ag-standard-button ag-filter-apply-panel-button"
                >${u}
                </button>`);this.buttonListeners.push(...this.addManagedElementListeners(g,{click:c})),a.append(g)};o.forEach(d=>l(d)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=Lo(this.params,this.defaultDebounceMs),t=Y(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const s=()=>{this.onUiChanged(!1,"prevent"),t?.()};e!=null?this.setModelIntoUi(e).then(s):this.resetUiToDefaults().then(s)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const s=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(s,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,s){s&&s.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:i}=this.params;i&&this.applyActive&&!e&&!t&&this.close(s)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,s=t&&t.key;let i;(s==="Enter"||s==="Space")&&(i={keyboardEvent:t}),this.hidePopup(i),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const s=this.isModelValid(this.getModelFromUi()),i=this.queryForHtmlElement('[data-ref="applyFilterButton"]');i&&Pt(i,!s)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:s}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(s.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,za[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function _a(e,t,s){if(t==null)return null;let i=null;const{compName:o,jsComp:n,fwComp:r}=Fg(e,t);return o?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:n==null&&r==null&&t.filter===!0&&(i=s()),i}var Se={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Oo=class extends b{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},s=t.autoHeight?Se.AUTO_HEIGHT:t.print?Se.PRINT:Se.NORMAL;this.view.updateLayoutClasses(s,t)}},Ze="Viewport",Ua="fakeVScrollComp",$a=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Ka=100,Go=150,hp=class extends b{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.scrollTimer=0,this.needsRefreshedScrollPosition=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=Y(this,()=>this.lastScrollSource[1]=null,Go),this.resetLastVScrollDebounced=Y(this,()=>this.lastScrollSource[0]=null,Go)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.requireUpdatedScrollPosition.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,t=>{this.centerRowsCtrl=t.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}requireUpdatedScrollPosition(){this.needsRefreshedScrollPosition=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,Ze)});for(const e of $a){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),s=t?Y(this,this.onVScroll.bind(this,Ze),Ka):this.onVScroll.bind(this,Ze),i=t?Y(this,this.onVScroll.bind(this,Ua),Ka):this.onVScroll.bind(this,Ua);this.addManagedElementListeners(this.eBodyViewport,{scroll:s}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...$a,Ze]){if(this.lastScrollSource[1]===t)continue;const s=this.getViewportForSource(t);_s(s,e,this.enableRtl)}}getViewportForSource(e){return e===Ze?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:s}=t;if(this.shouldBlockScrollUpdate(1,s,!0))return;const i=Ws(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===Ze?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:s}=this;s?.setScrollTop(t),this.nextScrollTop=t,e===Ze?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,!s||this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded(!0):s.schedule(),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Go)}shouldBlockScrollUpdate(e,t,s=!1){return s&&!_e()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Ns(this.eBodyViewport),{scrollHeight:s}=this.eBodyViewport;return e<0||e+t>s}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:s}=this.centerRowsCtrl.eViewport;if(this.enableRtl&&zs()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>s}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(Ze)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.requireUpdatedScrollPosition(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl&&zs()?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),_s(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.requireUpdatedScrollPosition(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.needsRefreshedScrollPosition){const{lastOffsetHeight:s,lastScrollTop:i}=this;return{top:i,bottom:i+s}}this.needsRefreshedScrollPosition=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:s}=this.beans,i=s.getRowCount();let o=-1;for(let n=0;n<i;n++){const r=s.getRow(n);if(typeof e=="function"){if(r&&e(r)){o=n;break}}else if(e===r||e===r.data){o=n;break}}o>=0&&this.ensureIndexVisible(o,t)}ensureIndexVisible(e,t){if(Q(this.gos,"print"))return;const{rowModel:s}=this.beans,i=s.getRowCount();if(typeof e!="number"||e<0||e>=i){R(88,{index:e});return}const n=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel"),{frameworkOverrides:r,pagination:a,pageBounds:l,rowContainerHeight:d,rowRenderer:c}=this.beans;r.wrapIncoming(()=>{n||a?.goToPageWithIndex(e);const u=this.ctrlsSvc.getGridBodyCtrl(),h=u.stickyTopHeight,g=u.stickyBottomHeight,p=s.getRow(e);let f;do{const m=p.rowTop,C=p.rowHeight,v=l.getPixelOffset(),S=p.rowTop-v,y=S+p.rowHeight,D=this.getVScrollPosition(),M=d.divStretchOffset,A=D.top+M,T=D.bottom+M,P=T-A,G=d.getScrollPositionForPixel(S),$=d.getScrollPositionForPixel(y-P),ke=Math.min((G+$)/2,S),tt=A+h>S,ze=T-g<y;let le=null;t==="top"?le=G:t==="bottom"?le=$:t==="middle"?le=ke:tt?le=G-h:ze&&(le=$+g),le!==null&&(this.setVerticalScrollPosition(le),c.redraw({afterScroll:!0})),f=m!==p.rowTop||C!==p.rowHeight}while(f);this.animationFrameSvc?.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const{colModel:s,frameworkOverrides:i}=this.beans,o=s.getCol(e);if(!o||o.isPinned()||!this.visibleCols.isColDisplayed(o))return;const n=this.getPositionedHorizontalScroll(o,t);i.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:s,columnAfterEnd:i}=this.isColumnOutsideViewport(e),o=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?s:i)||o,l=r?i:s;t!=="auto"&&(a=t==="start",l=t==="end");const d=t==="middle";if(a||l||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:a?r?h:c:r?c-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:s}=this.getViewportBounds(),{colLeft:i,colRight:o}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>o:s<o,a=n?s<i:t>i;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,s=this.visibleCols.bodyWidth,i=e.getActualWidth(),o=e.getLeft(),n=t?-1:1,r=t?s-o:o,a=r+i*n,l=r+i/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),s=t,i=e+t;return{start:s,end:i,width:e}}},Ho=class extends b{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=Q(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:s}=this.beans,i=t.bodyWidth,o=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=i+o+n:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?o:n)===0&&s.verticalScrollShowing&&(r+=s.getScrollbarWidth())),this.callback(r)}},gp=class extends b{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:s}=this,i=()=>{Pe(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),s.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const s=this.centerContainerCtrl.getCenterWidth();s!==this.centerWidth&&(this.centerWidth=s,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=Ns(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function Bo(e,t,s,i,o,n){if(s==null&&t==null)return;const r={},a={},l=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(s){const d=Object.keys(s);for(let c=0;c<d.length;c++){const u=d[c],h=s[u];let g;typeof h=="string"?g=e?e.evaluate(h,i):!0:typeof h=="function"&&(g=h(i)),l(u,p=>{g?r[p]=!0:a[p]=!0})}}t&&n&&Object.keys(t).forEach(d=>l(d,c=>{r[c]||(a[c]=!0)})),n&&Object.keys(a).forEach(n),Object.keys(r).forEach(o)}function ja(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var pp=class extends b{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const s=this.gos,i=r=>{typeof r=="string"?e.push(r):Array.isArray(r)&&r.forEach(a=>e.push(a))},o=s.get("rowClass");o&&i(o);const n=s.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);i(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,s=>{e.push(s)},()=>{})}processRowClassRules(e,t,s){const{gos:i,expressionSvc:o}=this.beans,n=k(i,{data:e.data,node:e,rowIndex:e.rowIndex});Bo(o,void 0,i.get("rowClassRules"),n,t,s)}processStylesFromGridOptions(e){const t=this.gos,s=t.get("rowStyle"),i=t.getCallback("getRowStyle");let o;if(i){const n={data:e.data,node:e,rowIndex:e.rowIndex};o=i(n)}if(o||s)return Object.assign({},s,o)}},fp=0,as="renderedRow",fi=class extends b{constructor(e,t,s,i,o){super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=o,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+fp++,this.rowId=Ee(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=ja(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Ee(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,s,i){i=is(this,this.beans.context,i);const o={rowComp:e,element:t,containerType:s,compBean:i};this.allRowGuis.push(o),this.updateGui(s,o),this.initialiseRowComp(o),!(this.rowType==="FullWidthLoading"||this.rowNode.stub)&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(s=>s.element.style.display=t)}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),$e(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(o=>s.addOrRemoveCssClass(o,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Gs(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),lt(t,e.element,as,this),e.compBean.addDestroyFunc(()=>lt(t,e.element,as,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Ee(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(mr(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(mr(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const s=this.createBean(t,this.beans.context);this.rowDragComps.push(s),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(i=>i!==s),this.destroyBean(s,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),s=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(s)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:s,beans:{visibleCols:i}}=this,o=!!e||!i.isPinningLeft(),n=!!t,r=!!s||!i.isPinningRight();return o&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),s=this.gos.get("masterDetail")&&this.rowNode.detail,i=this.beans.colModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&Zs(this.gos,i);e?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":n?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:s}=this.beans;if(!s||e||this.gos.get("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(s.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new ns(e,this.rowNode,this.beans,this)}shouldRecreateCellCtrl(e){return!!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,s=null){const i={list:[],map:{}},o=(r,a,l)=>{l!=null?i.list.splice(l,0,a):i.list.push(a),i.map[r]=a},n=[];for(const r of t){const a=r.getInstanceId();let l=e.map[a];l&&this.shouldRecreateCellCtrl(l)&&(l.destroy(),l=void 0),l||(l=this.getNewCellCtrl(r)),l&&o(a,l)}for(const r of e.list){const a=r.column.getInstanceId();if(i.map[a]!=null)continue;!this.isCellEligibleToBeRemoved(r,s)?n.push([a,r]):r.destroy()}if(n.length)for(const[r,a]of n){const l=i.list.findIndex(c=>c.column.getLeft()>a.column.getLeft()),d=l===-1?void 0:Math.max(l-1,0);o(r,a,d)}return i}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const s=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(s,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const s=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,s);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const o=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(e,t){const{column:o}=e;if(o.getPinned()!=t)return!0;const{editing:n,cellPosition:r}=e,{focusSvc:a,visibleCols:l}=this.beans,d=a.isCellFocused(r);return n||d?!(l.allCols.indexOf(o)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Q(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=x(this.rowNode.oldRowTop),{visibleCols:s}=this.beans,i=s.isPinningLeft(),o=s.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=i,n.right=o}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=i,n.right=o}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),s=e(this.centerGui,null),i=e(this.leftGui,"left"),o=e(this.rightGui,"right");return t&&s&&i&&o}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...this.beans.expansionSvc?.getRowExpandedListeners(this)??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.beans.rowSpanSvc&&this.addManagedListeners(this.beans.rowSpanSvc,{spannedCellsUpdated:({pinned:e})=>{e&&!this.rowNode.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(t=>{this.addRowDraggerToRow(t)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(s=>s.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(s=>{this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const s=e==="Above",i=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",s),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",i)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}verifyCells(){this.onDisplayedColumnsChanged()}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Re(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:s,column:i}=t;if(!(s.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,d=a.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:d?.column??i};l?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Fe(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),s=t?t.element:null,i=s===e.target,o=z(this.beans);let n=!1;s&&o&&(n=s.contains(o)&&o.classList.contains("ag-cell"));let r=null;!i&&!n&&(r=Ye(this.beans,s,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>me(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(s=>{Ce(s.element,"tabindex",t)})}onFullWidthRowFocused(e){const t=this.rowNode,s=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1,i=this.fullWidthGui?this.fullWidthGui.element:this.centerGui?.element;i&&(i.classList.toggle("ag-full-width-focus",s),s&&e?.forceBrowserFocus&&i.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const s={list:[],map:{}};return e.list.forEach(i=>{i!==t&&(s.list.push(i),s.map[i.column.getInstanceId()]=i)}),s}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:s}=this;return k(this.gos,{type:e,node:s,data:s.data,rowIndex:s.rowIndex,rowPinned:s.rowPinned,event:t})}createRowEventWithSource(e,t){const s=this.createRowEvent(e,t);return s.source=this,s}onRowDblClick(e){Fe(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),s=this.getColumnForFullWidth(t);if(!(!t||!s))return{rowGui:t,column:s}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=st(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:s,focusSvc:i}=this.beans;s?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:n,column:r}=o,a=n.element,l=e.target;let d=e.defaultPrevented||Ie();a&&a.contains(l)&&io(l)&&(d=!1),i.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(Fe(e)||this.lastMouseDownOnDragger)return;const{eventSvc:s,selectionSvc:i}=this.beans;s.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:s,rowNode:i}=this,o=k(s,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,d)=>this.addFullWidthRowDragging(r,a,l,d),setTooltip:(r,a)=>{s.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return vg(n,o);case"FullWidthGroup":return Cg(n,o);case"FullWidthLoading":return mg(n,o);default:return fg(n,o)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,s="",i){const{rowDragSvc:o,context:n}=this.beans;if(!o||!this.isFullWidth())return;const r=o.createRowDragComp(()=>s,this.rowNode,void 0,e,t,i);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=ja(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,s="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass(t,!0),i.rowComp.addOrRemoveCssClass(s,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(t=>{this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass(t,!0))})}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,s=>s.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),s=this.isFullWidth(),{rowNode:i,beans:o}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&n.push("ag-row-pinned"),i.isSelected()&&n.push("ag-row-selected"),i.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),i.stub&&n.push("ag-row-loading"),s&&n.push("ag-full-width-row"),o.expansionSvc?.addExpandedCss(n,i),i.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=o;return r&&(r.processClassesFromGridOptions(n,i),r.preProcessRowClassRules(n,i)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),s&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:s}=e,{rowNode:i,beans:o,gos:n}=this;s.addManagedListeners(t,{mouseenter:()=>i.dispatchRowEvent("mouseEnter"),mouseleave:()=>i.dispatchRowEvent("mouseLeave")}),s.addManagedListeners(i,{mouseEnter:()=>{!o.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(s=>s.element);for(const s of t)s.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(s,e),i)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,s=this.beans.environment.getDefaultRowHeight(),o=go(this.gos)?at(this.beans,this.rowNode).height:void 0,n=o?`${Math.min(s,o)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&ct(this.gos)&&!t.sticky)if(t.rowTop!=null){const o=this.roundRowTopToBounds(t.rowTop);this.setRowTop(o)}else this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));t.setHovered(!1);const s=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(s),this.beans.eventSvc.dispatchEvent(s),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.beans.editSvc?.stopRowEditing(this);const e=t=>(t.list.forEach(s=>s.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,s=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);s!==this.rowFocused&&(this.rowFocused=s,this.setFocusedClasses()),!s&&this.editing&&t?.stopRowEditing(this,!1)}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const s=this.beans.pageBounds.getPixelOffset();return e+s*(t?1:-1)}setRowTop(e){if(!this.printLayout&&x(e)){const t=this.applyPaginationOffset(e),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(o)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let s;if(t.sticky)s=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,o=this.applyPaginationOffset(i);s=t.isRowPinned()?o:this.beans.rowContainerHeight.getRealPixelPosition(o)}return s+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let s=null;return this.getAllCellCtrls().forEach(i=>{i.column==e&&(s=i)}),s!=null||t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(s=i)}),s}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const s=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),i=this.rowNode.rowIndex%2===0,o=s+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.addOrRemoveCssClass("ag-row-even",i),n.rowComp.addOrRemoveCssClass("ag-row-odd",!i),Hs(n.element,o)})}};function Vo(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function No(e,t,s,i,o){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=k(e,{event:t,editing:o,column:i,node:s,data:s.data,colDef:i.getColDef()});return!!(n&&n(r))}function qa(e){const{pinnedRowModel:t,rowModel:s}=e,[i,o]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=i?null:"top";let r,a;o?(r=null,a=s.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:d}=e,c=l.allCols;!d||!c?.length||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var mp=65,Cp=67,vp=86,wp=68,bp=90,Sp=89;function yp(e){const{keyCode:t}=e;let s;switch(t){case mp:s=w.A;break;case Cp:s=w.C;break;case vp:s=w.V;break;case wp:s=w.D;break;case bp:s=w.Z;break;case Sp:s=w.Y;break;default:s=e.code}return s}var Rp=class extends b{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Br("touchstart")?"touchstart":"mousedown"].forEach(s=>{const i=this.processMouseEvent.bind(this,s);this.addManagedElementListeners(this.element,{[s]:i})})}processMouseEvent(e,t){if(!ci(this.gos,t)||Fe(t))return;const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(s?.column&&s.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,s)):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:ko(t,e),rowCtrl:Vr(t,e,as)}}processKeyboardEvent(e,t){const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(s?this.processCellKeyboardEvent(s,e,t):i&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,s){const{rowNode:i,column:o,editing:n}=e;!No(this.gos,s,i,o,n)&&t==="keydown"&&(!n&&this.beans.navigation?.handlePageScrollingKey(s)||e.onKeyDown(s),this.doGridOperations(s,e.editing),Vo(s)&&e.processCharacter(s)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(s,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,s){const{rowNode:i}=e,{focusSvc:o,navigation:n}=this.beans,r=o.getFocusedCell(),a=r&&r.column;if(!No(this.gos,s,i,a,!1)){const d=s.key;if(t==="keydown")switch(d){case w.PAGE_HOME:case w.PAGE_END:case w.PAGE_UP:case w.PAGE_DOWN:n?.handlePageScrollingKey(s,!0);break;case w.UP:case w.DOWN:e.onKeyboardNavigate(s);break;case w.TAB:e.onTabKeyDown(s);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",s))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!ci(this.gos,e))return;const s=yp(e),{clipboardSvc:i,undoRedo:o}=this.beans;if(s===w.A)return this.onCtrlAndA(e);if(s===w.C)return this.onCtrlAndC(i,e);if(s===w.D)return this.onCtrlAndD(i,e);if(s===w.V)return this.onCtrlAndV(i,e);if(s===w.X)return this.onCtrlAndX(i,e);if(s===w.Y)return this.onCtrlAndY(o);if(s===w.Z)return this.onCtrlAndZ(o,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:s,selectionSvc:i},gos:o}=this;s&&xe(o)&&t.isRowsToRender()?qa(this.beans):i&&i?.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Lr(o)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);s?.editing||i?.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);s?.editing||i?.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);s?.editing||i?.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},Ya=class extends b{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,s=t!=null?`${t}px`:"";this.eContainer.style.height=s,this.eViewport&&(this.eViewport.style.height=s)}},mi=e=>e.topRowCtrls,Ci=e=>e.getStickyTopRowCtrls(),vi=e=>e.getStickyBottomRowCtrls(),wi=e=>e.bottomRowCtrls,bi=e=>e.allRowCtrls,zo=e=>e.getCtrls("top"),Wo=e=>e.getCtrls("center"),_o=e=>e.getCtrls("bottom"),xp={center:{type:"center",name:"center-cols",getRowCtrls:bi,getSpannedRowCtrls:Wo},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:bi,getSpannedRowCtrls:Wo},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:bi,getSpannedRowCtrls:Wo},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:bi},topCenter:{type:"center",name:"floating-top",getRowCtrls:mi,getSpannedRowCtrls:zo},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:mi,getSpannedRowCtrls:zo},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:mi,getSpannedRowCtrls:zo},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:mi},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Ci},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Ci},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Ci},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Ci},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:vi},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:vi},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:vi},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:vi},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:wi,getSpannedRowCtrls:_o},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:wi,getSpannedRowCtrls:_o},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:wi,getSpannedRowCtrls:_o},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:wi}};function Uo(e){return`ag-${Vt(e).name}-viewport`}function ls(e){const t=Vt(e);return t.container??`ag-${t.name}-container`}function Qa(e){return`ag-${Vt(e).name}-spanned-cells-container`}function Vt(e){return xp[e]}var Fp=["topCenter","topLeft","topRight"],Ep=["bottomCenter","bottomLeft","bottomRight"],Dp=["center","left","right"],Pp=["center","left","right","fullWidth"],Mp=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Ap=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Tp=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Za=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Xa=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],kp=[...Za,"stickyTopFullWidth",...Xa,"stickyBottomFullWidth"],Ip=[...Fp,...Ep,...Dp,...Za,...Xa],Ja=class extends b{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=Vt(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new gp(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,s,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=s,this.eViewport=i,this.createManagedBean(new Rp(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:o,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(Ap,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(Tp,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(Pp,()=>this.createManagedBean(new Ya(this.eContainer,this.name==="center"?i:void 0))),n&&this.forContainers(Ip,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(Mp,()=>this.createManagedBean(new Ho(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans;this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:s=>this.onDisplayedRowsChanged(s.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const s=this.options.getSpannedRowCtrls(e);s&&this.comp.setSpannedRowCtrls(s,!1)}})}listenOnDomOrder(){if(kp.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const s=this.gos.get("ensureDomOrder"),i=Q(this.gos,"print");this.comp.setDomOrder(s||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=s=>{e.dragging&&s.cancelable&&s.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,s,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Mt(this.eViewport)}getCenterViewportScrollLeft(){return Ws(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Le(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return dr(this.eViewport)}getViewportScrollLeft(){return Ws(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Hu(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){_s(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const s=Q(this.gos,"print"),o=this.gos.get("embedFullWidthRows")||s,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!o&&a:o||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},el="ag-force-vertical-scroll",Lp="ag-selectable",Op="ag-column-moving",tl=class extends b{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,s,i,o,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=s,this.eTop=i,this.eBottom=o,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=s.querySelector(`.${Uo("center")}`),this.eFullWidthContainer=s.querySelector(`.${ls("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${ls("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${ls("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new Oo(this.comp)),this.scrollFeature=this.createManagedBean(new hp(this.eBodyViewport)),this.beans.rowDragSvc?.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,s,o,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const s=t&&e.getScrollbarWidth()||0,i=nr()?16:0,o=`calc(100% + ${s+i}px)`;Pe(this.beans,()=>this.comp.setBodyViewportWidth(o)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let s=this.gos.get("treeData");if(!s){const i=t.isPivotMode();s=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(s?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:s=>{const{target:i}=s,o=st(i,"ag-root",t);t.classList.toggle("ag-has-focus",!o)},focusout:s=>{const{target:i,relatedTarget:o}=s,n=t.contains(o),r=st(o,"ag-root",t);st(i,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Op,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Lp,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,s=t.isLastRowIndexKnown()?t.getRowCount():-1,i=s===-1?-1:e+s;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?el:null,s=Q(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||s&&Bu(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let s=t.sizesMeasured;const i=()=>{const o=s&&ct(this.gos)&&!e.stretching,n=o?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,o)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({gridStylesChanged:()=>{!s&&t.sizesMeasured&&(s=!0,i())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,s=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:s}),t?.mockBodyContextMenu(this,s),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:s,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(s))&&ci(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:s,shiftKey:i}=e,o=i||Math.abs(t)>Math.abs(s),n=e.target;o?(this.eStickyTopFullWidthContainer.contains(n)||this.eStickyBottomFullWidthContainer.contains(n))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(s))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:s}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||s})}onBodyViewportContextMenu(e,t,s){if(!e&&!s)return;this.gos.get("preventDefaultOnContextMenu")&&(e||s).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:s,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e}=this,t=e?.getPinnedTopTotalHeight()??0,s=e?.getPinnedBottomTotalHeight()??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(s),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(s?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),s=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let i=0;t>0&&(i+=t),s>0&&(i+=s),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:s}=this,i=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+n;s.setStickyBottomBottom(`${r}px`)}},sl=class extends L{constructor(e,t){super(),this.direction=t,this.eViewport=E,this.eContainer=E,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",ir()||_e())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=nr(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),s=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:s,touchend:s})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Pe(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;vr(()=>me(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},il=class extends sl{constructor(){super(`<div class="ag-body-horizontal-scroll" aria-hidden="true">
            <div class="ag-horizontal-left-spacer" data-ref="eLeftSpacer"></div>
            <div class="ag-body-horizontal-scroll-viewport" data-ref="eViewport">
                <div class="ag-body-horizontal-scroll-container" data-ref="eContainer"></div>
            </div>
            <div class="ag-horizontal-right-spacer" data-ref="eRightSpacer"></div>
        </div>`,"horizontal"),this.eLeftSpacer=E,this.eRightSpacer=E,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new Ho(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const s=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();s&&(t+=i),we(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let o=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(o+=i),we(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=s?0:i===0&&t?16:i,r=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Yt(this.getGui(),n),Yt(this.eViewport,n),Yt(this.eContainer,n),this.setDisplayed(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return Ws(this.eViewport,this.enableRtl)}setScrollPosition(e){me(this.eViewport)||this.attemptSettingScrollPosition(e),_s(this.eViewport,e,this.enableRtl)}},Gp={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:il},ol=class extends sl{constructor(){super(`<div class="ag-body-vertical-scroll" aria-hidden="true">
            <div class="ag-body-vertical-scroll-viewport" data-ref="eViewport">
                <div class="ag-body-vertical-scroll-container" data-ref="eContainer"></div>
            </div>
        </div>`,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Ya(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,s=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,o=i===0&&s?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",s),we(this.getGui(),o),we(this.eViewport,o),we(this.eContainer,o),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const s=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),o=s.scrollTop;i!=o&&this.setScrollPosition(o,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!me(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Hp={selector:"AG-FAKE-VERTICAL-SCROLL",component:ol};function nl(e){return e.cols?e.cols.treeDepth+1:-1}function Ve(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function $o(e){const t=[],s=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of s){if(!i)continue;const o=i.getGroupRowCount()||0;for(let n=0;n<o;n++){const r=i.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=Bp(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function Bp(e,t){const s=e.colModel.isPivotMode()?Np(e):rl(e);let i=0;const o=t.getHeaderCtrls();for(const n of o){const{column:r}=n;if(r.isAutoHeaderHeight()){const a=r.getAutoHeaderHeight();a!=null&&a>i&&(i=a)}}return Math.max(s,i)}function Ko(e){const t=e.colModel.isPivotMode()?Vp(e):ds(e),i=e.visibleCols.allCols.filter(o=>o.isAutoHeaderHeight()).map(o=>o.getAutoHeaderHeight()||0);return Math.max(t,...i)}function ds(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function jo(e){return e.gos.get("floatingFiltersHeight")??ds(e)}function rl(e){return e.gos.get("groupHeaderHeight")??ds(e)}function Vp(e){return e.gos.get("pivotHeaderHeight")??ds(e)}function Np(e){return e.gos.get("pivotGroupHeaderHeight")??rl(e)}var al=class extends b{setComp(e,t,s){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:o,touchSvc:n,ctrlsSvc:r}=i;o&&this.createManagedBean(new St(s,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Pe(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const s=$o(e).reduce((n,r)=>n+r,0),i=Ko(e);if(e.filterManager?.hasFloatingFilters()&&(t+=jo(e)),t+=s,t+=i,this.headerHeight===t)return;this.headerHeight=t;const o=`${t+1}px`;this.comp.setHeightAndMinHeight(o),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const s=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",s)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),s=e.shiftKey,i=s!==t?"LEFT":"RIGHT",{beans:o}=this,{headerNavigation:n,focusSvc:r}=o;(n.navigateHorizontally(i,!0,e)||!s&&r.focusOverlay(!1)||vt(o,s,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:s}=this.beans;switch(e.key){case w.LEFT:t="LEFT";case w.RIGHT:{x(t)||(t="RIGHT"),s.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case w.UP:t="UP";case w.DOWN:{x(t)||(t="DOWN"),s.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:s,beans:i}=this;!t&&s.contains(z(i))||s.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,s){const{menuSvc:i,ctrlsSvc:o}=this.beans;if(!e&&!s||!i?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===o.getHeaderRowContainerCtrl()?.eViewport)&&i.showHeaderContextMenu(void 0,e,s)}},qo=class extends L{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},zp=class extends qo{constructor(e){super(`<div class="ag-header-cell" role="columnheader">
            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
        </div>`,e),this.eResize=E,this.eHeaderCompWrapper=E,this.headerCompVersion=0}postConstruct(){const e=this.getGui();((o,n)=>{n!=null&&n!=""?e.setAttribute(o,n):e.removeAttribute(o)})("col-id",this.ctrl.column.getColId());const s={setWidth:o=>e.style.width=o,addOrRemoveCssClass:(o,n)=>this.addOrRemoveCssClass(o,n),setUserStyles:o=>qt(e,o),setAriaSort:o=>o?Jn(e,o):er(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(s,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const i=this.ctrl.getSelectAllGui();i&&this.eResize.insertAdjacentElement("afterend",i)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(s=>this.afterCompCreated(t,s))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},Wp=class extends qo{constructor(e){super(`<div class="ag-header-group-cell" role="columnheader">
            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
        </div>`,e),this.eResize=E,this.eHeaderCompWrapper=E}postConstruct(){const e=this.getGui(),t=(i,o)=>o!=null?e.setAttribute(i,o):e.removeAttribute(i);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const s={addOrRemoveCssClass:(i,o)=>this.addOrRemoveCssClass(i,o),setUserStyles:i=>qt(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>N(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(s,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const s=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(s)}addOrRemoveHeaderWrapperStyle(e,t){const{eHeaderCompWrapper:s}=this;t?s.style.setProperty(e,t):s.style.removeProperty(e)}},_p=class extends qo{constructor(e){super(`<div class="ag-header-cell ag-floating-filter" role="gridcell">
            <div data-ref="eFloatingFilterBody" role="presentation"></div>
            <div class="ag-floating-filter-button ag-hidden" data-ref="eButtonWrapper" role="presentation">
                <button type="button" class="ag-button ag-floating-filter-button-button" data-ref="eButtonShowMainFilter" tabindex="-1"></button>
            </div>
        </div>`,e),this.eFloatingFilterBody=E,this.eButtonWrapper=E,this.eButtonShowMainFilter=E}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(s,i)=>this.addOrRemoveCssClass(s,i),setUserStyles:s=>qt(e,s),addOrRemoveBodyCssClass:(s,i)=>this.eFloatingFilterBody.classList.toggle(s,i),setButtonWrapperDisplayed:s=>N(this.eButtonWrapper,s),setCompDetails:s=>this.setCompDetails(s),getFloatingFilterComp:()=>this.compPromise,setWidth:s=>e.style.width=s,setMenuIcon:s=>this.eButtonShowMainFilter.appendChild(s)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},Up=class extends L{constructor(e){super(),this.ctrl=e,this.headerComps={},this.setTemplate(`<div class="${this.ctrl.headerRowClass}" role="row"></div>`)}postConstruct(){Hs(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,s)=>this.setHeaderCtrls(t,s),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const s=this.headerComps;if(this.headerComps={},e.forEach(i=>{const o=i.instanceId;let n=s[o];delete s[o],n==null&&(n=this.createHeaderComp(i),this.getGui().appendChild(n.getGui())),this.headerComps[o]=n}),Object.values(s).forEach(i=>{this.getGui().removeChild(i.getGui()),this.destroyBean(i)}),t){const i=Object.values(this.headerComps);i.sort((n,r)=>{const a=n.getCtrl().column.getLeft(),l=r.getCtrl().column.getLeft();return a-l});const o=i.map(n=>n.getGui());ur(this.getGui(),o)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new Wp(e);break;case"filter":t=new _p(e);break;default:t=new zp(e);break}return this.createBean(t),t.setParentComponent(this),t}},Yo=class extends b{constructor(e,t,s,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=s}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?H(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,s=e.get("suppressColumnMoveAnimation"),i=x(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!s?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),s=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=s,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===s&&this.setLeft(s)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:s,visibleCols:i}=this.beans;if(!Q(s,"print")||e.getPinned()==="left")return t;const n=i.getColsLeftWidth();if(e.getPinned()==="right"){const r=i.bodyWidth;return n+r+t}return n+t}setLeft(e){if(x(e)&&(this.eCell.style.left=`${e}px`),W(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Xn(this.ariaEl,t.length)}}},$p=0,ll="headerCtrl",Qo=class extends b{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+$p++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:s}=this.beans.focusSvc.focusedHeader,i=s.getDefinition(),o=i&&i.suppressHeaderKeyboardEvent;if(!x(o))return!1;const n=k(this.gos,{colDef:i,column:s,headerRowIndex:t,event:e});return!!o(n)}getWrapperHasFocus(){return z(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let s;if(typeof t=="function"){const i=this.getHeaderClassParams();s=t(i)}else s=t;s&&this.comp.setUserStyles(s)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:s,compBean:i}=e,{beans:o}=this,n=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=it(this.eGui),m=h+g+p+f,v=t.offsetHeight+m;if(u<5){const S=_(o),y=!S||!S.contains(t),D=v==0;if(y||D){Pe(o,()=>n(u+1));return}}this.setColHeaderHeight(this.column,v)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=Le(this.beans,t,()=>n(0))},c=()=>{r=!1,a&&a(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>c()),i.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),s&&s(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:s,eGui:i}=this;!e||!t||!i||(va(e,t,s.visibleCols),$i(i,s.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Ct(this.beans);this.eGui&&Ce(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=z(this.beans),s=e.key===w.LEFT||e.key===w.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),!s))return;const o=e.key===w.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(o)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:s}=this.beans;return s?s.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:s}=this;let i=e.key===w.LEFT!==t.get("enableRtl");const o=s.getPinned(),n=t.get("enableRtl");return o&&n!==(o==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case w.PAGE_DOWN:case w.PAGE_UP:case w.PAGE_HOME:case w.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=ll,{eGui:s,gos:i}=this;lt(i,s,t,this),e.addDestroyFunc(()=>lt(i,s,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,s){const i=e??t,{menuSvc:o,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&i.preventDefault(),o?.isHeaderContextMenuEnabled(s)&&o.showHeaderContextMenu(s,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",s)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:s}=this;e.isColumn?s.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):s.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},Kp=class extends Qo{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,s,i,o){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,h=is(this,d,o);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,s,e,this)):N(s,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new Yo(r,t,a)),h.createManagedBean(new St(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return k(t.gos,{colDef:s,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return ug(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:s,gos:i}=this.beans;return k(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!s&&(!this.openFilterEnabled||re(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===w.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===w.ENTER&&this.onEnterKeyDown(e),e.key===w.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const s=this.comp.getUserCompInstance();dl(s)&&s.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),ba()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),s=Mo(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(s),s.forEach(o=>{i.has(o)?i.delete(o):this.comp.addOrRemoveCssClass(o,!0)}),i.forEach(o=>this.comp.addOrRemoveCssClass(o,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const s=this.column.getActualWidth();this.comp.setWidth(`${s}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const s=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",s),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,s=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",s)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:s,beans:i}=this,o=$o(this.beans),n=o.reduce((c,u)=>c+=u,0)===0;if(s.addOrRemoveCssClass("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),s.addOrRemoveCssClass("ag-header-span-height",!1),s.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();s.addOrRemoveCssClass("ag-header-span-height",r>0);const l=Ko(i);if(r===0){s.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}s.addOrRemoveCssClass("ag-header-span-total",a);let d=0;for(let c=0;c<r;c++)d+=o[o.length-1-c];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(wu(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!re(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(z(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,s)=>t==="filter"?-1:s.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=o=>this.handleMouseOverChange(o.type==="mouseenter"),s=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=o=>this.handleContextMenuMouseEvent(o,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return dl(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function dl(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var jp=0,Zo=class extends b{constructor(e,t,s){super(),this.rowIndex=e,this.pinned=t,this.type=s,this.instanceId=jp++;const i=s=="group"?"ag-header-row-column-group":s=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${i}`}postConstruct(){this.isPrintLayout=Q(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.getHeaderCellCtrls().every(e=>e.eGui!=null):!1}setComp(e,t,s=!0){this.comp=e,t=is(this,this.beans.context,t),s&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),s=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:s,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",s),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}getHeaderCellCtrl(e){if(this.headerCellCtrls){for(const t of this.headerCellCtrls.values())if(t.column===e)return t}}onDisplayedColumnsChanged(){this.isPrintLayout=Q(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],s=$o(this.beans),i=Ko(this.beans);t.push(...s),t.push(i),e?.hasFloatingFilters()&&t.push(jo(this.beans));let o=0;for(let r=0;r<this.rowIndex;r++)o+=t[r];const n=t[this.rowIndex];return{topOffset:o,rowHeight:n}}onVirtualColumnsChanged(e=!1){const t=this.getHeaderCtrls(),s=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,s,e)}getHeaderCtrls(){const e=this.headerCellCtrls;this.headerCellCtrls=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,e);const s=i=>{const{focusSvc:o,visibleCols:n}=this.beans;return o.isHeaderWrapperFocused(i)?n.isVisible(i.column):!1};if(e)for(const[i,o]of e)s(o)?this.headerCellCtrls.set(i,o):this.destroyBean(o);return this.getHeaderCellCtrls()}getHeaderCellCtrls(){return Array.from(this.headerCellCtrls?.values()??[])}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls||e.isEmptyGroup())return;const s=e.getUniqueId();let i;if(t&&(i=t.get(s),t.delete(s)),i&&i.column!=e&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case"filter":{i=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":i=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:i=this.createBean(new Kp(e,this));break}this.headerCellCtrls.set(s,i)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:s}=this.beans;return["left",null,"right"].forEach(i=>{const o=s.getHeadersToRender(i,t);e=e.concat(o)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}findHeaderCellCtrl(e){if(!this.headerCellCtrls)return;const t=this.getHeaderCellCtrls();let s;return typeof e=="function"?s=t.find(e):s=t.find(i=>i.column==e),s}focusHeader(e,t){const s=this.findHeaderCellCtrl(e);return s?s.focus(t):!1}destroy(){this.headerCellCtrls?.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}},cl=class extends b{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:s,ctrlsSvc:i,colModel:o,colMoves:n,filterManager:r}=this.beans;this.setupCenterWidth(),s?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const a=this.onDisplayedColumnsChanged.bind(this,r);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(l,this),o.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,colModel:s,filterManager:i}=this.beans;let o=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const c=nl(s)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let u=0;u<c;u++){const h=this.createBean(new Zo(o++,this.pinned,"group"));this.groupsRowCtrls.push(h)}},a=()=>{const c=o++,u=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==c);(u||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),u&&(this.columnsRowCtrl=this.createBean(new Zo(c,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;const c=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){c();return}const u=o++;if(this.filtersRowCtrl){const h=this.filtersRowCtrl.rowIndex!==u;(!e||h)&&c()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new Zo(u,this.pinned,"filter")))};r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n)}getHeaderCtrlForColumn(e){if(Ge(e))return this.columnsRowCtrl?.getHeaderCellCtrl(e);if(this.groupsRowCtrls.length!==0)for(let t=0;t<this.groupsRowCtrls.length;t++){const s=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(s)return s}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,s){const o=this.getAllCtrls()[e];return o?o.focusHeader(t,s):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const s=e?.createBodyDropTarget(this.pinned,t);s&&this.createManagedBean(s)}restoreFocusOnHeader(e,t){if(!t)return;const{column:s}=t;s.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(e){const t=!!e?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Ho(e=>this.comp.setCenterWidth(`${e}px`),!0))}},qp=class extends b{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const{enterpriseMenuFactory:t,filterMenuFactory:s}=this.beans,i=t&&re(this.gos)?t:s;this.showColumnMenuCommon(i,e,e.containerType,!0)}showHeaderContextMenu(e,t,s){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,s)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(re(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Ge(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(_e()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!re(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!re(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return re(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,s,i){const{positionBy:o,onClosedCallback:n}=t,r=t.column;if(o==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,s,n,i)}else if(o==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,s,n,i)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),Pe(a,()=>{const d=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(i),s,n,!0)})}}};function Xo(e,t,s){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",s))}var ul=class extends L{constructor(){super()}},Yp=class extends ul{init(){const e=Re(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??'<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>'),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("loadingOoo","Loading...")})}}},Qp=class extends ul{init(){const e=Re(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??'<span class="ag-overlay-no-rows-center"></span>'),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("noRowsToShow","No Rows To Show")})}}};function hl(e,t,s){const i=ge(e,t,s);if(i){const{className:n}=i;if(typeof n=="string"&&n.indexOf("ag-icon")>-1||typeof n=="object"&&n["ag-icon"])return i}const o=document.createElement("span");return o.appendChild(i),o}function ge(e,t,s){let i=null;e==="smallDown"?R(262):e==="smallLeft"?R(263):e==="smallRight"&&R(264);const o=s&&s.getColDef().icons;if(o&&(i=o[e]),t.gos&&!i){const n=t.gos.get("icons");n&&(i=n[e])}if(i){let n;if(typeof i=="function")n=i();else if(typeof i=="string")n=i;else{R(38,{iconName:e});return}if(typeof n=="string")return At(n);if($s(n))return n;R(133,{iconName:e});return}else{const n=document.createElement("span"),r=t.registry.getIcon(e);r||t.validation?.validateIcon(e);const a=r??e;return n.setAttribute("class",`ag-icon ag-icon-${a}`),n.setAttribute("unselectable","on"),X(n,"presentation"),n}}var Zp=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}",Xp=class extends L{constructor(){super(),this.dragSource=null,this.eIcon=E,this.eLabel=E,this.registerCSS(Zp)}postConstruct(){const e=t=>hl(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`<div class="ag-dnd-ghost ag-unselectable">
                <span data-ref="eIcon" class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
                <div data-ref="eLabel" class="ag-dnd-ghost-label"></div>
            </div>`)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:s,dragSource:i,dropIconMap:o,gos:n}=this;Z(s);let r=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),r=o[e],s.classList.toggle("ag-shake-left-to-right",t),!(r===o.hide&&n.get("suppressDragLeaveHidesColumns"))&&r&&s.appendChild(r)}setLabel(e){this.eLabel.textContent=e}},Jp=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",gl=class extends L{constructor(e,t,s){super(t,s),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Jp)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:s,labelAlignment:i,disabled:o}=this.config;o!=null&&this.setDisabled(o),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),s!=null&&this.setLabelWidth(s),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Z(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(N(t,!1),X(t,"presentation")):(N(t,!0),X(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const s=this.getGui().classList;return s.toggle("ag-label-align-left",e==="left"),s.toggle("ag-label-align-right",e==="right"),s.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Us(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Pt(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},pl=class extends gl{constructor(e,t,s,i){super(e,t,s),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:s}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),s!=null&&this.onValueChange(s),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),s=this.getLabel();s==null||s==""||Su(e)!==null?Os(e,""):Os(e,t??"")}setAriaLabel(e){return Kt(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return we(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}},Xe=class extends pl{constructor(e,t,s="text",i="input"){super(e,e?.template??`
            <div role="presentation">
                <div data-ref="eLabel" class="ag-input-field-label"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
                    <${i} data-ref="eInput" class="ag-input-field-input"></${i}>
                </div>
            </div>`,[],t),this.inputType=s,this.displayFieldTag=i,this.eLabel=E,this.eWrapper=E,this.eInput=E}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:s,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),s.classList.add(`${i}-input`),this.addCssClass("ag-input-field"),s.id=s.id||`ag-${this.getCompId()}-input`;const{inputName:o,inputWidth:n}=this.config;o!=null&&this.setInputName(o),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([s])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return Us(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Ce(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Kt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Pt(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Ce(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Ce(this.eInput,"autocomplete",t)}return this}},cs=class extends Xe{constructor(e,t="ag-checkbox",s="checkbox"){super(e,t,s),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const s=this.eInput;s.checked=e,s.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,s){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:s});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),s=this.selected=e.target.checked;this.refreshSelectedClass(s),this.dispatchChange(s,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Si={selector:"AG-CHECKBOX",component:cs},ef=".ag-checkbox-cell{height:100%}",tf=class extends L{constructor(){super(`
            <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[Si]),this.eCheckbox=E,this.registerCSS(ef)}init(e){this.refresh(e);const{eCheckbox:t,beans:s}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),Kn(i,"polite"),this.addManagedListeners(i,{click:o=>{if(gt(o),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:o=>{gt(o)}}),this.addManagedElementListeners(e.eGridCell,{keydown:o=>{if(o.key===w.SPACE&&!t.isDisabled()){e.eGridCell===z(s)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),o.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,s=!0;const{value:i,column:o,node:n}=e;if(n.group&&o)if(typeof i=="boolean")t=i;else{const u=o.getColId();u.startsWith(ts)?t=i==null||i===""?void 0:i==="true":n.aggData&&n.aggData[u]!==void 0?t=i??void 0:s=!1}else t=i??void 0;const{eCheckbox:r}=this;if(!s){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!o?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),d=Ki(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{eventSvc:t,params:s}=this,{column:i,node:o,value:n}=s,r={column:i,colDef:i.getColDef(),data:o.data,node:o,rowIndex:o.rowIndex,rowPinned:o.rowPinned,value:n};t.dispatchEvent({type:"cellEditingStarted",...r});const a=o.setDataValue(i,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...r,oldValue:n,newValue:e,valueChanged:a}),a||this.updateCheckbox(s)}},sf="ROOT_NODE_ID",fl=class extends b{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){return this.rootNode?.allLeafChildren?.map(e=>e.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=sf,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=e?.map((t,s)=>this.createRowNode(t,s))??[]}setImmutableRowData(e,t){const s=ut(this.gos),i=!this.gos.get("suppressMaintainUnsortedOrder"),o=e.changedRowNodes,n=new Set,r=this.rootNode,a=r.allLeafChildren,l=a.length;let d=!1,c=!1,u=!1,h=!1;for(let p=0,f=-1,m=t.length;p<m;p++){const C=t[p];let v=this.getRowNode(s({data:C,level:0}));if(!v)d=!0,v=this.createRowNode(C,-1),o.add(v);else{if(i){const S=v.sourceRowIndex;h||(h=S<=f||d),f=S}v.data!==C&&(u=!0,v.updateData(C),o.update(v))}n.add(v)}const g=[];for(let p=0;p<l;p++){const f=a[p];n.has(f)||(c=!0,f.isSelected()&&g.push(f),this.rowNodeDeleted(f),o.remove(f))}if(d||c||h){const p=new Array(n.size);let f=0;if(!i)for(let C=0;C<l;++C){const v=a[C];n.delete(v)&&(v.sourceRowIndex=f,p[f++]=v)}for(const C of n)C.sourceRowIndex=f,p[f++]=C;r.allLeafChildren=p;const m=r.sibling;m&&(m.allLeafChildren=p),e.rowNodesOrderChanged||(e.rowNodesOrderChanged=h)}(d||c||h||u)&&(this.deselectNodes(g),e.rowDataUpdated=!0)}rowNodeDeleted(e){e.clearRowTopAndRowIndex();const t=e.id,s=this.allNodesMap;s[t]===e&&delete s[t]}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const s={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},i=[],o=ut(this.gos);return this.executeRemove(o,e,s,i),this.executeUpdate(o,e,s,i),this.executeAdd(e,s),this.deselectNodes(i),s}executeAdd(e,t){const s=e.add;if(!s?.length)return;let i=this.rootNode.allLeafChildren,o=i.length;if(typeof e.addIndex=="number"&&(o=this.sanitizeAddIndex(e.addIndex),o>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let u=0;u<i.length;u++)if(i[u]?.rowIndex==o-1){o=u+1;break}}const n=s.length,r=t.changedRowNodes,a=new Array(n);for(let c=0;c<n;c++){const u=this.createRowNode(s[c],o+c);r.add(u),a[c]=u}const l=this.rootNode;if(o<i.length){const c=i.slice(0,o),u=i.slice(o,i.length),h=c.length+a.length;for(let g=0,p=u.length;g<p;++g)u[g].sourceRowIndex=h+g;i=[...c,...a,...u],t.rowsInserted=!0}else i=i.concat(a);l.allLeafChildren=i;const d=l.sibling;d&&(d.allLeafChildren=i),t.rowNodeTransaction.add=a}executeRemove(e,t,{changedRowNodes:s,rowNodeTransaction:i},o){const{remove:n}=t;if(!n?.length)return;const r={};n.forEach(d=>{const c=this.lookupRowNode(e,d);c&&(c.isSelected()&&o.push(c),c.clearRowTopAndRowIndex(),r[c.id]=!0,delete this.allNodesMap[c.id],i.remove.push(c),s.remove(c))});const a=this.rootNode;a.allLeafChildren=a.allLeafChildren?.filter(d=>!r[d.id])??null,a.allLeafChildren?.forEach((d,c)=>{d.sourceRowIndex=c});const l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:s,rowNodeTransaction:i},o){const{update:n}=t;n?.length&&n.forEach(r=>{const a=this.lookupRowNode(e,r);a&&(a.updateData(r),!a.selectable&&a.isSelected()&&o.push(a),i.update.push(a),s.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselectNodes(e){const t="rowDataChanged",s=this.beans.selectionSvc,i=e.length>0;i&&s?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),s?.updateGroupsFromChildrenSelections?.(t),i&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t})}sanitizeAddIndex(e){const t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const s=new bt(this.beans);return s.parent=this.rootNode,s.level=0,s.group=!1,s.expanded=!1,s.sourceRowIndex=t,s.setDataAndId(e,String(this.nextId)),this.allNodesMap[s.id]&&R(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(e,t){let s;if(e){const i=e({data:t,level:0});if(s=this.allNodesMap[i],!s)return O(4,{id:i}),null}else if(s=this.rootNode?.allLeafChildren?.find(i=>i.data===t),!s)return O(5,{data:t}),null;return s||null}},ml=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(ml||{}),of=class extends L{constructor(){super(`
            <div class="ag-selection-checkbox" role="presentation">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[Si]),this.eCheckbox=E}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:s}=this,i=t.isSelected(),o=Ki(e,i),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);s.setValue(i,!0),s.setInputAriaLabel(`${a} (${o})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:gt,click:i=>{gt(i),this.beans.selectionSvc?.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:o})=>{const n=typeof i=="object"?Co(i):void 0,r=typeof o=="object"?Co(o):void 0;n!==r&&this.onSelectableChanged()}),Js(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:s,gos:i}=this;let o=t.selectable;const n=this.getIsVisible();if(o)if(typeof n=="function"){const l=s?.callbackParams;if(!e)o=n({...l,node:t,data:t.data});else{const d=e.createColumnFunctionCallbackParams(t);o=n({...l,...d})}}else o=n??!1;const r=i.get("rowSelection");if(r&&typeof r!="string"?!Co(r):e?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!o),this.setVisible(!0),this.setDisplayed(!0);return}if(s?.removeHidden){this.setDisplayed(o);return}this.setVisible(o)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?ht(t):this.column?.getColDef()?.checkboxSelection}},nf=class{constructor(e){this.rowModel=e,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:e?(this.setRoot(e),e):null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const s=t[0].id===this.rootId,i=t.findIndex(o=>o.id===e.id);if(i>-1){const o=t.slice(0,i),n=t.slice(i+1);return this.setEndRange(e),s?{keep:o,discard:n}:{keep:n,discard:o}}else return{keep:t,discard:[]}}extend(e,t=!1){const s=this.getRoot();if(s==null){const o=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&o.push(n)),o.push(e),this.setRoot(e),{keep:o,discard:[]}}const i=this.rowModel.getNodesInRangeForSelection(s,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(o=>o.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const o=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:o}}}},rf=class extends b{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(z(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new cs);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),X(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:i})=>{const o=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;o(s)!==o(i)&&this.showOrHideSelectAll()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,s=this.cbSelectAll,i=t.getSelectAllState(e);s.setValue(i);const o=t.hasNodesToSelect(e);s.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:i,cbSelectAllVisible:o}=this,r=i.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",o?`${a} (${r})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||s.announceAriaDescription()}checkSelectionType(e){return It(this.gos)?!0:(R(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:s}=this.beans;return J(t)||rt(t)?!0:(R(129,{feature:e,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let s="uiSelectAll";t==="currentPage"?s="uiSelectAllCurrentPage":t==="filtered"&&(s="uiSelectAllFiltered");const i={source:s,selectAll:t},o=this.beans.selectionSvc;e?o.selectAllRowNodes(i):o.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:s}=this,i=t.get("rowSelection"),o=e.getColDef(),{headerCheckboxSelection:n}=o;let r=!1;const a=typeof i=="object";if(a){const d=De(e),c=ti(e);(Xs(i)==="autoGroupColumn"&&c||d&&s.selectionColSvc?.isSelectionColumnEnabled())&&(r=Qt(i))}else typeof n=="function"?r=n(k(t,{column:e,colDef:o})):r=!!n;const l=a?"headerCheckbox":"headerCheckboxSelection";return r&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){const e=Lr(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return t?"currentPage":s?"filtered":"all"}},Cl=class extends b{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new nf(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=Js(e);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=Js(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new of}createSelectAllFeature(e){return new rf(e)}isMultiSelect(){return It(this.gos)}onRowCtrlSelected(e,t,s){const i=!!e.rowNode.isSelected();e.forEachGui(s,o=>{o.rowComp.addOrRemoveCssClass("ag-row-selected",i);const n=o.element;Bs(n,i),n.contains(z(this.beans))&&t(o)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(!e.selectable)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e})}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!$e(this.gos)}updateRowSelectable(e,t){const s=this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,s,t),s}setRowSelectable(e,t,s){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),s)return;if(Lt(this.gos)){const o=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:o??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,s=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const o=e.childrenAfterGroup[i];let n=o.isSelected();if(!o.selectable){const r=this.calculateSelectedFromChildren(o);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:s=!0;break;default:return}}if(!(t&&s))return t?!0:s?!1:e.selectable?e.__selected:null}selectRowNode(e,t,s,i="api"){const o=!e.selectable&&t,n=e.__selected===t;if(o||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;return r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Ga(e,this.gos,"rowSelected"),event:s||null,source:i}),!0}isCellCheckboxSelection(e,t){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const i=De(e)&&ht(s);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,s,i){const{gos:o,selectionCtx:n}=this,r=e.isSelected(),a=Lt(o),l=lh(o),d=dh(o),c=this.isMultiSelect(),u=i==="rowClicked";if(u&&a&&e.group||u&&!(l||d))return null;if(t&&s&&c){const h=n.getRoot();if(h)if(h.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&c){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),p=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:p.keep,deselect:p.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else{if(s)return n.setRoot(e),u&&r&&!d?null:{node:e,newValue:!r,clearSelection:!c};{n.setRoot(e);const h=ch(o),g=Xt(o)==="filteredDescendants",p=u&&(!h||!l);if(g&&r===void 0&&J(o))return{node:e,newValue:!1,clearSelection:!c||p};if(u){const f=r?!h:l;return f===r&&!p||f&&!l||!f&&!d?null:{node:e,newValue:f,clearSelection:!c||p}}return{node:e,newValue:!r,clearSelection:!c||p}}}}},vl=class extends cs{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},af='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);opacity:0}&:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}',wl=class extends cs{constructor(e){super(e,"ag-toggle-button"),this.registerCSS(af)}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},lf={selector:"AG-TOGGLE-BUTTON",component:wl},Je=class extends Xe{constructor(e,t="ag-text-field",s="text"){super(e,t,s)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const s=this.eInput;return s.value!==e&&(s.value=x(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=s=>{Vo(s)&&s.key&&!e.test(s.key)&&s.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:s=>{const i=s.clipboardData?.getData("text");i&&i.split("").some(o=>!e.test(o))&&s.preventDefault()}})}},us={selector:"AG-INPUT-TEXT-FIELD",component:Je},bl=class extends Xe{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const s=super.setValue(e,t);return this.eInput.value=e,s}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},df={selector:"AG-INPUT-TEXT-AREA",component:bl},yi=class extends Je{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:s,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof s=="number"&&this.setMin(s),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){z(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e),{min:s,max:i}=this;return s!=null&&t<s?e=s.toString():i!=null&&t>i&&(e=i.toString()),e}adjustPrecision(e,t){const s=this.precision;if(s==null)return e;if(t){const o=parseFloat(e).toFixed(s);return parseFloat(o).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=s)return e;if(s>0)return`${i[0]}.${i[1].slice(0,s)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,Ce(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Ce(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Ce(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(s=>super.setValue(s,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,s){if(x(s)){let i=this.isScientificNotation(s);if(i&&this.eInput.validity.valid)return e(s);if(!i){s=this.adjustPrecision(s);const o=this.normalizeValue(s);i=s!=o}if(i)return t(s)}return e(s)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},Sl={selector:"AG-INPUT-NUMBER-FIELD",component:yi};function hs(e,t){return e.toString().padStart(t,"0")}function pe(e,t=!0,s="-"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>hs(o,2)).join(s);return t&&(i+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>hs(o,2)).join(":")),i}var Jo=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function gs(e,t="YYYY-MM-DD"){const s=hs(e.getFullYear(),4),i=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],n={YYYY:()=>s.slice(s.length-4,s.length),YY:()=>s.slice(s.length-2,s.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>i[e.getMonth()],MMM:()=>i[e.getMonth()].slice(0,3),MM:()=>hs(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Jo(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Jo(e.getDate())}`,DD:()=>hs(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>o[e.getDay()],ddd:()=>o[e.getDay()].slice(0,3),dd:()=>o[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Jo(e.getDay())}`,d:()=>`${e.getDay()}`},r=new RegExp(Object.keys(n).join("|"),"g");return t.replace(r,a=>a in n?n[a]():a)}function oe(e){if(!e)return null;const[t,s]=e.split(" ");if(!t)return null;const i=t.split("-").map(u=>parseInt(u,10));if(i.filter(u=>!isNaN(u)).length!==3)return null;const[o,n,r]=i,a=new Date(o,n-1,r);if(a.getFullYear()!==o||a.getMonth()!==n-1||a.getDate()!==r)return null;if(!s||s==="00:00:00")return a;const[l,d,c]=s.split(":").map(u=>parseInt(u,10));return l>=0&&l<24&&a.setHours(l),d>=0&&d<60&&a.setMinutes(d),c>=0&&c<60&&a.setSeconds(c),a}var yl=class extends Je{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ie();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){z(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?pe(e??null,!1)??void 0:e;return this.min===t?this:(this.min=t,Ce(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?pe(e??null,!1)??void 0:e;return this.max===t?this:(this.max=t,Ce(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Ce(this.eInput,"step",e),this)}getDate(){if(this.eInput.validity.valid)return oe(this.getValue())??void 0}setDate(e,t){this.setValue(pe(e??null,!1),t)}},Rl={selector:"AG-INPUT-DATE-FIELD",component:yl},cf=1e3,uf=1e3,xl=100,Fl,Ri=!1,hf=class extends b{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!_e()&&(Ri?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},xl):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,s=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||s.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Ri)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return new Date().getTime()-Fl<cf}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!x(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const s=t.getRowNode?.(),i=k(this.gos,{location:t.getLocation?.()??"UNKNOWN",colDef:t.getColDef?.(),column:t.getColumn?.(),rowIndex:t.getRowIndex?.(),node:s,data:s?.data,value:e,valueFormatted:t.getValueFormatted?.(),hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()??{}});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);xg(this.userCompFactory,i)?.newAgStackInstance().then(o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Fl=new Date().getTime()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const o=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:i,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:r,columnMoved:r})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(_(this.beans),{keydown:r=>{i.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=z(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,s=this.tooltipTrigger===0?uf:0;window.setTimeout(()=>{e(),this.destroyBean(t)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Ri=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},xl)}unlockService(){Ri=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function ps(e){return e.get("tooltipShowMode")==="whenTruncated"}function gf(e,t){return ps(e)?Nt(t):void 0}function Nt(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var El=class extends b{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){const t="title",s=this.ctrl.getGui();s&&(e!=null&&e!=""?s.setAttribute(t,e):s.removeAttribute(t))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new hf(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},pf=class extends L{constructor(e="default",t=!1){super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case w.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const s=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(s)}break;case w.DOWN:case w.UP:e.preventDefault(),this.navigate(t);break;case w.PAGE_DOWN:case w.PAGE_UP:case w.PAGE_HOME:case w.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===w.DOWN;let s;const{itemEls:i,highlightedEl:o}=this;if(!o)s=i[t?0:i.length-1];else{let r=i.indexOf(o)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),s=i[r]}this.highlightItem(s)}navigateToPage(e){const{itemEls:t,highlightedEl:s}=this;if(!s||t.length===0)return;const i=t.indexOf(s),o=this.options.length-1,n=t[0].clientHeight,r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===w.PAGE_HOME?a=0:e===w.PAGE_END?a=o:e===w.PAGE_DOWN?a=Math.min(i+r,o):e===w.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:s}=e,i=s||t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{ve(e)}),this.itemEls=[]}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,s)=>{Yn(t,s+1),qn(t,e.length)})}renderOption(e,t){const s=_(this.beans),i=s.createElement("div");X(i,"option"),i.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const o=s.createElement("span");i.appendChild(o),o.textContent=t,this.unFocusable||(i.tabIndex=-1),this.itemEls.push(i),this.addManagedListeners(i,{mouseover:()=>this.highlightItem(i),mousedown:n=>{n.preventDefault(),n.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>i,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>o.scrollWidth>o.clientWidth})),this.getGui().appendChild(i)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const s=this.options.findIndex(i=>i.value===e);if(s!==-1){const i=this.options[s];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.itemEls[s]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!me(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),Bs(e,!0);const t=this.getGui(),{scrollTop:s,clientHeight:i}=t,{offsetTop:o,offsetHeight:n}=e;(o+n>s+i||o<s)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){const e=this.highlightedEl;!e||!me(e)||(e.classList.remove(this.activeClass),Bs(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},ff=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow)}}",Dl=class extends pl{constructor(e){if(super(e,e?.template||`
            <div class="ag-picker-field" role="presentation">
                <div data-ref="eLabel"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
                    <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
                    <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
                </div>
            </div>`,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=E,this.eWrapper=E,this.eDisplayField=E,this.eIcon=E,this.registerCSS(ff),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:s,variableWidth:i,minPickerWidth:o,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,s!=null&&this.setPickerMaxHeight(s),o!=null&&this.setPickerMinWidth(o),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:s,inputWidth:i}=this.config;if(s){const o=ge(s,this.beans);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Gs(e,!1),this.ariaRole&&X(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case w.UP:case w.DOWN:case w.ENTER:case w.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case w.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:s,pickerAriaLabelValue:i,modalPicker:o=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=fo(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(s,i),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=no(jt(c)),a&&(e.style.maxWidth=a)):Us(e,a??jt(c));const p=n??`${Ns(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:s,gos:i},eWrapper:o,pickerComponent:n}=this,r=i.get("enableRtl")?"right":"left";s.positionPopupByComponent({type:t,eventSource:o,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Gs(t,e);const s=this.eWrapper.classList;s.toggle("ag-picker-expanded",e),s.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker?.()}setInputWidth(e){return Us(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},mf=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",xi=class extends Dl{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(mf)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Nt(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:s}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),s&&t==null&&(this.eDisplayField.textContent=s),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new pf("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),s=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",s),tr(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){const{key:t}=e;switch(t===w.TAB&&this.hidePicker(),t){case w.ENTER:case w.UP:case w.DOWN:case w.PAGE_UP:case w.PAGE_DOWN:case w.PAGE_HOME:case w.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case w.ESCAPE:super.onKeyDown(e);break;case w.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this}setValue(e,t,s){const{listComponent:i,config:{placeholder:o},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(s||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&o&&(l=o),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Pl={selector:"AG-SELECT",component:xi},Fi={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Ml=class extends b{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:s,eBottomGuard:i,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=s,this.eBottomGuard=i,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new St(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():mt(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=_(this.beans),s=mt(t.body,null,!0),i=s.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let o,n;e?(o=0,n=i):(o=i+1,n=s.length);const r=s.slice(o,n),a=this.gos.get("tabIndex");r.sort((l,d)=>{const c=parseInt(l.getAttribute("tabindex")||"0"),u=parseInt(d.getAttribute("tabindex")||"0");return u===a?1:c===a?-1:c===0?1:u===0?-1:c-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const s=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),s&&(s.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=mt(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Ye(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},Al=class extends b{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:s,eFocusableElement:i}=this,o=[t,s],n={setTabIndex:m=>{o.forEach(C=>m!=null?C.setAttribute("tabindex",m):C.removeAttribute("tabindex"))}};this.addTabGuards(t,s);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new Ml({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:s,eFocusableElement:i,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=_(this.beans).createElement("div"),s=e==="top"?Fi.TAB_GUARD_TOP:Fi.TAB_GUARD_BOTTOM;return t.classList.add(Fi.TAB_GUARD,s),X(t,"presentation"),t}addTabGuards(e,t){const s=this.eFocusableElement;s.insertAdjacentElement("afterbegin",e),s.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Z(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,s){$s(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,s)}destroy(){const{eFocusableElement:e,eTopGuard:t,eBottomGuard:s}=this;e.removeChild(t),e.removeChild(s),super.destroy()}},en=class extends L{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new Al(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},yt=class extends L{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Rt=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new We,this.preventMouseClick=t;const s=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);e.addEventListener("touchstart",s,{passive:!0}),e.addEventListener("touchmove",i,{passive:!0}),e.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",s,{passive:!0}),e.removeEventListener("touchmove",i,{passive:!0}),e.removeEventListener("touchend",o,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const s=this.touchStart===t;if(this.touching&&s&&!this.moved){this.moved=!0;const i={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!ka(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const s={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(s),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},Tl=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(Tl||{}),kl=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${pr}/${this.frameworkName}-data-grid`,Ku(this.baseDocLink)}setInterval(e,t){return new te(s=>{s(window.setInterval(e,t))})}addEventListener(e,t,s,i){let o={};if(typeof i=="object"?o=i:typeof i=="boolean"&&(o={capture:i}),o.passive==null){const n=zr(t);n!=null&&(o.passive=n)}e.addEventListener(t,s,o)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function Cf(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var vf=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","rowSpanSvc","pageBoundsListener","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],Il=Object.fromEntries(vf.map((e,t)=>[e,t]));function wf(e,t){const s=(e.beanName?Il[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?Il[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return s-i}function bf(e,t){return e?.beanName==="gridDestroySvc"?-1:0}var Sf='<div class="ag-pinned-left-header" role="rowgroup"></div>',yf='<div class="ag-pinned-right-header" role="rowgroup"></div>',Rf=`<div class="ag-header-viewport" role="presentation">
        <div class="ag-header-container" data-ref="eCenterContainer" role="rowgroup"></div>
    </div>`,tn=class extends L{constructor(e){super(),this.eCenterContainer=E,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:s=>this.setDisplayed(s),setCtrls:s=>this.setCtrls(s),setCenterWidth:s=>this.eCenterContainer.style.width=s,setViewportScrollLeft:s=>this.getGui().scrollLeft=s,setPinnedContainerWidth:s=>{const i=this.getGui();i.style.width=s,i.style.maxWidth=s,i.style.minWidth=s}};this.createManagedBean(new cl(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",s=e?Sf:t?yf:Rf;this.setTemplate(s),this.eRowContainer=this.eCenterContainer!==E?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let s;const i=o=>{const n=o.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),s&&cr(this.eRowContainer,n,s),s=n};e.forEach(o=>{const n=o.instanceId,r=t[n];delete t[n];const a=r||this.createBean(new Up(o));this.headerRowComps[n]=a,this.rowCompsList.push(a),i(a)}),Object.values(t).forEach(o=>this.destroyRowComp(o))}},xf=class extends L{constructor(){super('<div class="ag-header" role="presentation"/>')}postConstruct(){const e={addOrRemoveCssClass:(i,o)=>this.addOrRemoveCssClass(i,o),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new al).setComp(e,this.getGui(),this.getFocusableElement());const s=i=>{this.createManagedBean(i),this.appendChild(i)};s(new tn("left")),s(new tn(null)),s(new tn("right"))}},Ff={selector:"AG-HEADER-ROOT",component:xf},Ef=class extends L{constructor(e,t,s,i,o){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const n=document.createElement("div");n.setAttribute("comp-id",`${this.getCompId()}`),this.eCell=n;let r;t.isCellSpanning()?(r=document.createElement("div"),r.className="ag-spanned-cell-wrapper",r.appendChild(n),X(r,"presentation"),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssClassManager=new Eo(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1),X(n,t.getCellAriaRole()),n.setAttribute("col-id",t.colIdSanitised);const a={addOrRemoveCssClass:(l,d)=>this.cellCssClassManager.addOrRemoveCssClass(l,d),setUserStyles:l=>qt(n,l),getFocusableElement:()=>n,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,d,c)=>this.setRenderDetails(l,d,c),setEditDetails:(l,d,c)=>this.setEditDetails(l,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(a,n,r,this.eCellWrapper,s,o,void 0)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.eCell}setRenderDetails(e,t,s){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const o=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(s||o)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,s){e?this.createCellEditorInstance(e,t,s):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,s=t||this.forceWrapper,i=s&&this.eCellWrapper==null;if(i){const d=document.createElement("div");d.setAttribute("role","presentation"),d.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=d,this.eCell.appendChild(this.eCellWrapper)}const o=!s&&this.eCellWrapper!=null;o&&(ve(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssClassManager.addOrRemoveCssClass("ag-cell-value",!s);const n=!e&&s,r=n&&this.eCellValue==null;if(r){const d=document.createElement("span");d.setAttribute("role","presentation"),d.setAttribute("class","ag-cell-value"),this.eCellValue=d,this.eCellWrapper.appendChild(this.eCellValue)}const a=!n&&this.eCellValue!=null;a&&(ve(this.eCellValue),this.eCellValue=void 0);const l=i||o||r||a;return l&&this.removeControls(),e||t&&this.addControls(),l}addControls(){this.includeRowDrag&&this.rowDraggingComp==null&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&this.dndSourceComp==null&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.dndSourceComp&&this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.checkboxSelectionComp&&this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,t,s){const i=this.editorVersion,o=e.newAgStackInstance(),{params:n}=e;o.then(a=>this.afterCellEditorCreated(i,a,n,t,s)),V(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();Z(t);const s=e!=null?Ee(e,!0):null;s!=null&&(t.textContent=s)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),ve(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),ve(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer==null||this.cellRenderer.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const s=!this.beans.gos.get("suppressAnimationFrame")&&this.beans.animationFrameSvc,i=this.rendererVersion,{componentClass:o}=e,n=()=>{if(this.rendererVersion!==i||!this.isAlive())return;const a=e.newAgStackInstance(),l=this.afterCellRendererCreated.bind(this,i,o);a&&a.then(l)};s&&this.firstRender?this.beans.animationFrameSvc.createTask(n,this.rowNode.rowIndex,"createTasksP2"):n()}afterCellRendererCreated(e,t,s){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(s);return}if(this.cellRenderer=s,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){const o=this.getParentOfValue();Z(o),o.appendChild(this.cellRendererGui)}}afterCellEditorCreated(e,t,s,i,o){if(e!==this.editorVersion){this.beans.context.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){this.beans.context.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){R(97,{colId:this.column.getId()}),this.beans.context.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const a=i||t.isPopup!==void 0&&t.isPopup();a?this.addPopupCellEditor(s,o):this.addInCellEditor(),this.refreshEditStyles(!0,a),t.afterGuiAttached&&t.afterGuiAttached(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssClassManager:s}=this;s.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),s.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),s.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.cellCtrl.setInlineEditingCss()}addInCellEditor(){const{eCell:e}=this;e.contains(z(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){this.beans.gos.get("editType")==="fullRow"&&R(98);const s=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(this.beans.editSvc.createPopupEditorWrapper(e));const i=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&i.appendChild(this.cellEditorGui);const o=this.beans.popupSvc,n=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),r=t??s.getPopupPosition?.()??"over",a=this.beans.gos.get("enableRtl"),l={ePopup:i,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.eCell,position:r,alignSide:a?"right":"left",keepWithinBounds:!0},d=o.positionPopupByComponent.bind(o,l),c=Wi(this.beans.localeSvc),u=o.addPopup({modal:n,eChild:i,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.eCell,positionCallback:d,ariaLabel:c("ariaLabelCellEditor","Cell Editor")});u&&(this.hideEditorPopup=u.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){const{eCell:e}=this;e.contains(z(this.beans))&&e.focus({preventScroll:!0}),Z(this.getParentOfValue())}},Df=class extends L{constructor(e,t,s){super(),this.cellComps={},this.beans=t,this.rowCtrl=e;const i=document.createElement("div");i.setAttribute("comp-id",`${this.getCompId()}`),i.setAttribute("style",this.getInitialStyle(s)),this.setTemplateFromElement(i);const o=this.getGui(),n=o.style;this.domOrder=this.rowCtrl.getDomOrder(),X(o,"row");const r={setDomOrder:a=>this.domOrder=a,setCellCtrls:a=>this.setCellCtrls(a),showFullWidth:a=>this.showFullWidth(a),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(a,l)=>this.addOrRemoveCssClass(a,l),setUserStyles:a=>qt(o,a),setTop:a=>n.top=a,setTransform:a=>n.transform=a,setRowIndex:a=>o.setAttribute("row-index",a),setRowId:a=>o.setAttribute("row-id",a),setRowBusinessKey:a=>o.setAttribute("row-business-key",a),refreshFullWidth:a=>this.fullWidthCellRenderer?.refresh?.(a())??!1};e.setComp(r,this.getGui(),s,void 0),this.addDestroyFunc(()=>{e.unsetComp(s)})}getInitialStyle(e){const t=this.rowCtrl.getInitialTransform(e);return t?`transform: ${t}`:`top: ${this.rowCtrl.getInitialRowTop(e)}`}showFullWidth(e){const t=i=>{if(this.isAlive()){const o=i.getGui();this.getGui().appendChild(o),this.rowCtrl.setupDetailRowAutoHeight(o),this.setFullWidthRowComp(i)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=Object.assign({},this.cellComps);e.forEach(s=>{const i=s.instanceId;this.cellComps[i]==null?this.newCellComp(s):t[i]=null}),this.destroyCells(Object.values(t)),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];e.forEach(s=>{const i=this.cellComps[s.instanceId];i&&t.push(i.getGui())}),ur(this.getGui(),t)}newCellComp(e){const t=new Ef(this.beans,e,this.rowCtrl.printLayout,this.getGui(),this.rowCtrl.editing);this.cellComps[e.instanceId]=t,this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyCells(Object.values(this.cellComps))}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){e.forEach(t=>{if(!t)return;const s=t.cellCtrl.instanceId;this.cellComps[s]===t&&(t.detach(),t.destroy(),this.cellComps[s]=null)})}};function Pf(e,t,s){const i=!!s.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,n=`<div class="${ls(e)}" data-ref="eContainer" role="rowgroup"></div>`;if(t.type==="center"||i){const r=Qa(e),a=Uo(e),l=`<div class="ag-spanning-container ${r}" data-ref="eSpannedContainer" role="rowgroup"></div>`;return`<div class="ag-viewport ${a}" data-ref="eViewport" role="presentation">
                ${n}
                ${i?l:""}
            </div>`}return n}var Mf=class extends L{constructor(e){super(),this.eViewport=E,this.eContainer=E,this.eSpannedContainer=E,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=Vt(this.name)}postConstruct(){this.setTemplate(Pf(this.name,this.options,this.beans));const e={setHorizontalScroll:s=>this.eViewport.scrollLeft=s,setViewportHeight:s=>this.eViewport.style.height=s,setRowCtrls:({rowCtrls:s})=>this.setRowCtrls(s),setSpannedRowCtrls:s=>this.setRowCtrls(s,!0),setDomOrder:s=>{this.domOrder=s},setContainerWidth:s=>{this.eContainer.style.width=s,this.eSpannedContainer&&(this.eSpannedContainer.style.width=s)},setOffsetTop:s=>{const i=`translateY(${s})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new Ja(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:s,options:i}=this,o=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const a=[];for(const l of e){const d=l.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!l.rowNode.displayed)continue;u=new Df(l,s,i.type)}r[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(n),o),this.addRowNodes(a,o)}addRowNodes(e,t){const{domOrder:s}=this;for(const[i,o]of e){const n=i.getGui();s?this.ensureDomOrder(n,t):o&&t.appendChild(n)}}removeOldRows(e,t){for(const s of e)t.removeChild(s.getGui()),s.destroy()}ensureDomOrder(e,t){cr(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},Af={selector:"AG-ROW-CONTAINER",component:Mf};function fs(e,t){return t.map(s=>{const i=`e${s[0].toUpperCase()+s.substring(1)}RowContainer`;return e[i]={name:s},`<ag-row-container name="${s}" data-ref="${i}"></ag-row-container>`}).join("")}function Tf(e){const t={},s=`<div class="ag-root ag-unselectable" data-ref="eGridRoot">
        <ag-header-root></ag-header-root>
        <div class="ag-floating-top" data-ref="eTop" role="presentation">
            ${fs(t,["topLeft","topCenter","topRight","topFullWidth"])}
        </div>
        <div class="ag-body" data-ref="eBody" role="presentation">
            <div class="ag-body-viewport" data-ref="eBodyViewport" role="presentation">
            ${fs(t,["left","center","right","fullWidth"])}
            </div>
            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>
        </div>
        <div class="ag-sticky-top" data-ref="eStickyTop" role="presentation">
            ${fs(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])}
        </div>
        <div class="ag-sticky-bottom" data-ref="eStickyBottom" role="presentation">
            ${fs(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])}
        </div>
        <div class="ag-floating-bottom" data-ref="eBottom" role="presentation">
            ${fs(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])}
        </div>
        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
        ${e?"<ag-overlay-wrapper></ag-overlay-wrapper>":""}
    </div>`;return{paramsMap:t,template:s}}var kf=class extends L{constructor(){super(...arguments),this.eGridRoot=E,this.eBodyViewport=E,this.eStickyTop=E,this.eStickyBottom=E,this.eTop=E,this.eBottom=E,this.eBody=E}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,s=e?.getOverlayWrapperSelector(),{paramsMap:i,template:o}=Tf(!!s);this.setTemplate(o,[...s?[s]:[],Gp,Hp,Ff,Af],i);const n=(a,l)=>{const d=`${a}px`;l.style.minHeight=d,l.style.height=d},r={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>Zn(this.getGui(),a),setRowCount:a=>Qn(this.getGui(),a),setTopHeight:a=>n(a,this.eTop),setBottomHeight:a=>n(a,this.eBottom),setTopDisplay:a=>this.eTop.style.display=a,setBottomDisplay:a=>this.eBottom.style.display=a,setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.addOrRemoveCssClass(a,l),updateLayoutClasses:(a,l)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(c=>{c.toggle(Se.AUTO_HEIGHT,l.autoHeight),c.toggle(Se.NORMAL,l.normal),c.toggle(Se.PRINT,l.print)}),this.addOrRemoveCssClass(Se.AUTO_HEIGHT,l.autoHeight),this.addOrRemoveCssClass(Se.NORMAL,l.normal),this.addOrRemoveCssClass(Se.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(el,l),registerBodyViewportResizeListener:a=>{const l=Le(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(a,l))},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>X(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new tl),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&xe(this.gos)||It(this.gos))&&Pu(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const s=this.eBodyViewport.classList;s.toggle("ag-row-animation",t),s.toggle("ag-row-no-animation",!t)}},If={selector:"AG-GRID-BODY",component:kf},Ll=class extends b{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,s){this.view=e,this.eGridHostDiv=t,this.eGui=s,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:i,ctrlsSvc:o}=this.beans;i?.registerGridDropTarget(()=>this.eGui,this),xa(this.gos,t),this.createManagedBean(new Oo(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Le(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),o.register("gridCtrl",this)}isDetailGrid(){return To(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:s,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(i===0){if(s>0){const{visibleCols:o,focusSvc:n}=this.beans,r=o.allCols,a=H(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const s=this.getFocusableContainers(),{focusSvc:i,visibleCols:o}=this.beans,n=o.allCols;if(e){if(s.length>1)return this.focusContainer(H(s),e);const r=H(n);if(i.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||Ct(this.beans)){if(i.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<s.length;r++)if(qe(s[r].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:s,indexWithFocus:i}=this.getNextFocusableIndex(t,e);if(i===-1||s<0||s>=t.length)return;const o=t[s];o.setAllowFocus?.(!0),setTimeout(()=>{o.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!li(e)||!Ct(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const s=z(this.beans),i=e.findIndex(n=>n.getGui().contains(s)),o=i+(t?-1:1);return{indexWithFocus:i,nextIndex:o}}focusContainer(e,t){e.setAllowFocus?.(!0);const s=qe(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),s}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Lf=class extends en{constructor(e){super(),this.gridBody=E,this.sideBar=E,this.pagination=E,this.rootWrapperBody=E,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCssClass(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new Ll),s=t.getOptionalSelectors(),i=this.createTemplate(s),o=[If,...Object.values(s).filter(n=>!!n)];this.setTemplate(i,o),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),Ue(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const s=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:o,PRINT:n}=Se,{autoHeight:r,normal:a,print:l}=t;s.toggle(i,r),s.toggle(o,a),s.toggle(n,l),this.addOrRemoveCssClass(i,r),this.addOrRemoveCssClass(o,a),this.addOrRemoveCssClass(n,l)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",s=e.sideBarSelector?'<ag-side-bar data-ref="sideBar"></ag-side-bar>':"",i=e.statusBarSelector?"<ag-status-bar></ag-status-bar>":"",o=e.watermarkSelector?"<ag-watermark></ag-watermark>":"",n=e.paginationSelector?'<ag-pagination data-ref="pagination"></ag-pagination>':"";return`<div class="ag-root-wrapper" role="presentation">
                ${t}
                <div class="ag-root-wrapper-body" data-ref="rootWrapperBody" role="presentation">
                    <ag-grid-body data-ref="gridBody"></ag-grid-body>
                    ${s}
                </div>
                ${i}
                ${n}
                ${o}
            </div>`}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>me(t.getGui()))}},I=(e,t)=>{for(const s of Object.keys(t))t[s]=e;return t},Ol={dispatchEvent:"CommunityCore",...I("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0}),...I("GridState",{getState:0}),...I("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...I("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...I("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...I("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...I("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...I("ValueCache",{expireValueCache:0}),...I("CellApi",{getCellValue:0}),...I("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...I("Sort",{onSortChanged:0}),...I("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0}),...I("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...I("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...I("HighlightChanges",{flashCells:0}),...I("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0}),...I("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...I("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...I("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...I("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...I("ColumnResize",{setColumnWidths:0}),...I("ColumnHover",{isColumnHovered:0}),...I("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0}),...I("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...I("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...I("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0}),...I("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...I("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...I("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...I("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...I("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...I("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...I("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...I("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...I("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...I("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...I("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...I("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...I("ContextMenu",{showContextMenu:0}),...I("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...I("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...I("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...I("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...I("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...I("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...I("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...I("StatusBar",{getStatusPanel:0})},sn={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Of=(e,t)=>e.eventSvc.dispatchEvent(t),Gl=class{};Reflect.defineProperty(Gl,"name",{value:"GridApi"});var Gf=class extends b{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Gl,this.fns={...sn,dispatchEvent:Of},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Ol))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:s,beans:i}=this;s!==sn&&(s[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:s,fns:{[e]:i}}=this;return i?i(s,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:s,preDestroyLink:i}=this;if(!t)R(26,{fnName:e,preDestroyLink:i});else{const o=Ol[e];s.assertModuleRegistered(o,`api.${e}`)&&R(27,{fnName:e,module:o})}}destroy(){super.destroy(),this.fns=sn,this.beans=null}};function Hf(e){return e.context.getGridId()}function Bf(e){e.gridDestroySvc.destroy()}function Vf(e){return e.gridDestroySvc.destroyCalled}function Nf(e,t){return e.gos.get(t)}function zf(e,t,s){Hl(e,{[t]:s})}function Hl(e,t){e.gos.updateGridOptions({options:t})}var Wf=class extends L{constructor(e,t,s){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=s}postConstruct(){this.getGui().appendChild(ge("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:s,eCell:i,gos:o}=this,n=s.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),n){const a=k(o,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function _f(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function Uf(e,t){const s=e.dragAndDrop?.findExternalZone(t);s&&e.dragAndDrop?.removeDropTarget(s)}function $f(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}var Kf=class extends b{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:s}=this.beans;return s.addDragSource(t),()=>s.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const s=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(s)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},jf=class extends L{constructor(e,t,s,i,o,n){super(),this.cellValueFn=e,this.rowNode=t,this.column=s,this.customGui=i,this.dragStartPixels=o,this.suppressVisibilityChange=n,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,rowNode:t,column:s,gos:i}=this;if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(ge("rowDrag",e,null)),this.addDragSource()),!this.suppressVisibilityChange){const o=i.get("rowDragManaged")?new Yf(this,t,s):new qf(this,t,s);this.createManagedBean(o,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const s=this.beans.selectionSvc?.getSelectedNodes()??[];return s.indexOf(e)!==-1?s:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:i=>{i?.preventDefault()}})[0]);const s=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:()=>{const i=this.getDragItem(),o=i.rowNodes?.length||1,n=this.getRowDragText(this.column);return n?n(i,o):o===1?this.cellValueFn():`${o} ${s("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},Bl=class extends b{constructor(e,t,s){super(),this.parent=e,this.rowNode=t,this.column=s}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let s=!0,i=!1;const{column:o,rowNode:n,parent:r}=this;o&&(s=o.isRowDrag(n)||r.isCustomGui(),i=typeof o.getColDef().rowDrag=="function"),i?(r.setDisplayed(!0,t),r.setVisible(s,t)):(r.setDisplayed(s,t),r.setVisible(!0,t))}}},qf=class extends Bl{postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:e}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}},Yf=class extends Bl{postConstruct(){const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventSvc,{sortChanged:e,filterChanged:e,columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const{rowDragSvc:e,dragAndDrop:t,gos:s}=this.beans,i=e.rowDragFeature,o=i&&i.shouldPreventRowMove(),n=s.get("suppressRowDrag"),r=t.hasExternalDropZones(),a=o&&!r||n;this.setDisplayedOrVisible(a)}},Qf=class extends b{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const s=t.createManagedBean(new lp(e)),i=this.beans.dragAndDrop;i.addDropTarget(s),t.addDestroyFunc(()=>i.removeDropTarget(s)),this.rowDragFeature=s}createRowDragComp(e,t,s,i,o,n){return new jf(e,t,s,i,o,n)}createRowDragCompForRow(e,t){if(xe(this.gos))return;const s=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${s("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,s,i,o,n){const r=this.gos;return r.get("rowDragManaged")&&(!J(r)||r.get("pagination"))?void 0:this.createRowDragComp(s,e,t,i,o,n)}},on={moduleName:"Drag",version:F,beans:[dp]},Vl={moduleName:"DragAndDrop",version:F,dynamicBeans:{dndSourceComp:Wf},icons:{rowDrag:"grip"}},nn={moduleName:"SharedDragAndDrop",version:F,beans:[np],dependsOn:[on],userComponents:{agDragAndDropImage:Xp},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},Nl={moduleName:"RowDrag",version:F,beans:[Qf],apiFunctions:{addRowDropZone:_f,removeRowDropZone:Uf,getRowDropZoneParams:$f},dependsOn:[nn]},zl={moduleName:"HorizontalResize",version:F,beans:[Kf],dependsOn:[on]},Zf=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",Xf=class extends b{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:s,executeLaterFuncs:i}=this;if(s.length===0&&i.length===0){e(),t();return}const o=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),o(s)},0),window.setTimeout(()=>{t(),o(i)},200)})}};function Jf(e,t,s){e.colMoves?.moveColumnByIndex(t,s,"api")}function em(e,t,s){e.colMoves?.moveColumns(t,s,"api")}var tm=class extends b{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(s=>{s.isPrimary()&&(s.isAnyFunctionActive()||(s.isAllowValue()?this.columnsToAggregate.push(s):s.isAllowRowGroup()?this.columnsToGroup.push(s):s.isAllowPivot()&&this.columnsToPivot.push(s)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:s,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&s?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function sm(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,o)=>{const n=e.indexOf(i),r=e.indexOf(o);return n-r})}function Wl(e){const{isFromHeader:t,fromLeft:s,xPosition:i,fromEnter:o,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;if(t){const D=[];u.forEach(M=>{let A=null,T=M.getParent();for(;T!=null&&T.getDisplayedLeafColumns().length===1;)A=T,T=T.getParent();A!=null?(!!A.getColGroupDef()?.marryChildren?A.getProvidedColumnGroup().getLeafColumns():A.getLeafColumns()).forEach($=>{D.includes($)||D.push($)}):D.includes(M)||D.push(M)}),u=D}const h=u.slice();sm(l.getCols(),h);const g=rm({movingCols:h,draggingRight:s,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:c}),p=im(h,l);if(g.length===0)return;const f=g[0];let m=p!==null&&!o;if(t&&(m=p!==null),m&&!n&&(!s&&f>=p||s&&f<=p))return;const C=c.allCols,v=[];let S=null;for(let D=0;D<g.length;D++){const M=g[D],A=d.getProposedColumnOrder(h,M);if(!d.doesOrderPassRules(A))continue;const T=A.filter(G=>C.includes(G));if(S===null)S=T;else if(!je(T,S))break;const P=om(A);v.push({move:M,fragCount:P})}if(v.length===0)return;v.sort((D,M)=>D.fragCount-M.fragCount);const y=v[0].move;if(!(y>l.getCols().length-u.length))return{columns:u,toIndex:y}}function _l(e){const{columns:t,toIndex:s}=Wl(e)||{},{finished:i,colMoves:o}=e;return!t||s==null?null:(o.moveColumns(t,s,"uiColumnMoved",i),i?null:{columns:t,toIndex:s})}function im(e,t){const s=t.getCols(),i=Fh(e.map(l=>s.indexOf(l))),o=i[0];return H(i)-o!==i.length-1?null:o}function om(e){function t(i){const o=[];let n=i.getOriginalParent();for(;n!=null;)o.push(n),n=n.getOriginalParent();return o}let s=0;for(let i=0;i<e.length-1;i++){let o=t(e[i]),n=t(e[i+1]);[o,n]=o.length>n.length?[o,n]:[n,o],o.forEach(r=>{n.indexOf(r)===-1&&s++})}return s}function nm(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function rm(e){const{movingCols:t,draggingRight:s,xPosition:i,pinned:o,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(S=>S.getColDef().suppressMovable))return[];const d=nm(a,o),c=r.getCols(),u=d.filter(S=>t.includes(S)),h=d.filter(S=>!t.includes(S)),g=c.filter(S=>!t.includes(S));let p=0,f=i;if(s){let S=0;u.forEach(y=>S+=y.getActualWidth()),f-=S}if(f>0){for(let S=0;S<h.length;S++){const y=h[S];if(f-=y.getActualWidth(),f<0)break;p++}s&&p++}let m;if(p>0){const S=h[p-1];m=g.indexOf(S)+1}else m=g.indexOf(h[0]),m===-1&&(m=0);const C=[m],v=(S,y)=>S-y;if(s){let S=m+1;const y=c.length-1;for(;S<=y;)C.push(S),S++;C.sort(v)}else{let S=m;const y=c.length-1;let D=c[S];for(;S<=y&&d.indexOf(D)<0;)S++,C.push(S),D=c[S];S=m-1;const M=0;for(;S>=M;)C.push(S),S--;C.sort(v).reverse()}return C}function rn(e){const{pinned:t,fromKeyboard:s,gos:i,ctrlsSvc:o,useHeaderRow:n,skipScrollPadding:r}=e;let a=o.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(s&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=o.get("center").getCenterViewportScrollLeft()),l):0}function an(e,t){for(const s of e)s.moving=t,s.dispatchColEvent("movingChanged","uiColumnMoved")}var Ul=7,ln=100,Ei=ln/2,am=5,lm=100,dm=class extends b{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!x(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,s=t?.dragItem.columns??[];for(const i of s){const o=i.getPinned();if(i.getColDef().lockPinned){if(o==e)return"move";continue}if(o===e||!e)return"move";if(!o&&e)return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,s=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(s,!0,"uiColumnDragged");else{const o=t.visibleState,n=(s||[]).filter(r=>o[r.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(s,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,s=!1,i=!1){const{gos:o,ctrlsSvc:n}=this.beans,r=o.get("suppressMoveWhenColumnDragging");if(i&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&V(e.hDirection))return;const a=rn({x:e.x,pinned:this.pinned,gos:o,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,s,a,i):this.handleColumnDragWhileAllowingMovement(e,t,s,a,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,s){if(!e)return;const i=e.filter(o=>!o.getColDef().lockVisible);this.beans.colModel.setColsVisible(i,t,s)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:s}=e;this.beans.colMoves.moveColumns(t,s,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,s,i,o){const n=this.getAllMovingColumns(e,!0);if(o){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:s,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,i)}}handleColumnDragWhileAllowingMovement(e,t,s,i,o){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:s}),d=_l({...l,finished:o});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const s=e.dragSource.getDragItem();let i=null;t?(i=s.columnsInSplit,i||(i=s.columns)):i=s.columns;const o=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return i?i.filter(o):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:s,xPosition:i,fromLeft:o,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:s,fromLeft:o,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:s,colModel:i}=this.beans,o=s.get("enableRtl"),n=i.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let r=null,a=null,l=null;for(const c of n){if(a=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,o),r!=null){const u=r+a;if(r<=t&&u>=t){l=c;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let c=n.length-1;c>=0;c--){const u=n[c],h=n[c].getParent();if(!h){l=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){l=H(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,o),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let d;t-r<a/2!==o?d=0:d=1,$l(l,d),this.lastHighlightedColumn={column:l,position:d}}getNormalisedXPositionInfo(e,t){const{gos:s,visibleCols:i}=this.beans,o=s.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,o);if(!n||!r||a==null)return;const l=i.allCols,d=l.indexOf(n),c=l.indexOf(r),u=a===0!==o,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=l[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20,o);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,s){const i=this.lastHighlightedColumn||{},{firstMovingCol:o,lastMovingCol:n}=cm(e);if(!o||!n||i.column||!t)return{firstMovingCol:o,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:o,position:a?1:0,column:a!==s?o:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,s){const{gos:i,ctrlsSvc:o}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return rn({x:s?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:s,skipScrollPadding:!0,gos:i,ctrlsSvc:o})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,s=this.failedMoveAttempts>Ul;return t&&s||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:s,fromEnter:i,fakeEvent:o,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:s,fromLeft:n,fromEnter:i,fakeEvent:o}),{columns:a,toIndex:l}=Wl(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&($l(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),s=t.getCenterViewportScrollLeft(),i=s+t.getCenterWidth();let o,n;this.gos.get("enableRtl")?(o=e<s+Ei,n=e>i-Ei):(n=e<s+Ei,o=e>i-Ei),this.needToMoveRight=o,this.needToMoveLeft=n,n||o?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),lm),this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(),!1))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*am,e>ln&&(e=ln);let t=null;const s=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=s.scrollHorizontally(-e):this.needToMoveRight&&(t=s.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:i,dragAndDrop:o,gos:n}=this.beans;if(this.failedMoveAttempts<=Ul+1||!i)return;if(o.getDragAndDropImageComponent()?.setIcon("pinned",!1),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,s=!1){const i=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!i.length)return 0;s&&(t=this.getPinDirection());const{pinnedCols:o,dragAndDrop:n}=this.beans;return o?.setColsPinned(i,t,"uiColumnDragged"),s&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function $l(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function cm(e){const t=e.length;let s,i;for(let o=0;o<t;o++){if(!s){const n=e[o];n.getLeft()!=null&&(s=n)}if(!i){const n=e[t-1-o];n.getLeft()!=null&&(i=n)}if(s&&i)break}return{firstMovingCol:s,lastMovingCol:i}}var um=class extends b{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,s=this.pinned;e.whenReady(this,i=>{let o;const n=i.gridBodyCtrl.eBodyViewport;switch(s){case"left":o=[[n,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":o=[[n,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:o=[[n,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=o}),this.moveColumnFeature=this.createManagedBean(new dm(s)),this.bodyDropPivotTarget=this.createManagedBean(new tm(s)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},hm=class extends b{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,s){const i=this.beans.colModel.getCols();if(!i)return;const o=i[e];this.moveColumns([o],t,s)}moveColumns(e,t,s,i=!0){const{colModel:o,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=o.getCols();if(!l)return;if(t>l.length-e.length){R(30,{toIndex:t});return}n?.start();const d=o.getColsForKeys(e);this.doesMovePassRules(d,t)&&(Kr(o.getCols(),d,t),r.refresh(s),a.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:i,source:s})),n?.finish()}doesMovePassRules(e,t){const s=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(s)}doesOrderPassRules(e){const{colModel:t,gos:s}=this.beans;return!(!ta(e,t.getColTree())||!(o=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=s.get("enableRtl");let a=r?1:-1,l=!0;return o.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>a&&(l=!1):c<a&&(l=!1),a=c}),l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return Kr(i,e,t),i}createBodyDropTarget(e,t){return new um(e,t)}moveHeader(e,t,s,i,o){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=W(s),g=h?c.width:s.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=rn({x:p?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),m=d.focusedHeader;_l({allMovingColumns:h?s.getLeafColumns():[s],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let C;if(h){const v=s.getDisplayedLeafColumns();C=p?v[0]:H(v)}else C=s;if(n.getScrollFeature().ensureColumnVisible(C,"auto"),(!o.isAlive()||r.get("ensureDomOrder"))&&m){let v;if(h){const S=s.getGroupId(),y=s.getLeafColumns();if(!y.length)return;const D=y[0].getParent();if(!D)return;v=gm(D,S)}else v=s;v&&d.focusHeaderPosition({headerPosition:{...m,column:v}})}}setDragSourceForHeader(e,t,s){const{gos:i,colModel:o,dragAndDrop:n,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=W(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>fm(t,r.allCols):()=>pm(t),dragItemName:s,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),an(d,!0)},onDragStopped:()=>an(d,!1),onDragCancelled:()=>an(d,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:p}=h??{},f=l?C=>!p||p[C.getColId()]:()=>!0,m=g.filter(C=>!C.getColDef().lockVisible&&f(C));o.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(p=>!p.getColDef().lockVisible)||[];o.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function gm(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function pm(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}function fm(e,t){const s=e.getProvidedColumnGroup().getLeafColumns(),i={};s.forEach(a=>i[a.getId()]=a.isVisible());const o=[];t.forEach(a=>{s.indexOf(a)>=0&&(o.push(a),ue(s,a))}),s.forEach(a=>o.push(a));const n=[],r=e.getLeafColumns();for(const a of o)r.indexOf(a)!==-1&&n.push(a);return{columns:o,columnsInSplit:n,visibleState:i}}var Kl={moduleName:"ColumnMove",version:F,beans:[hm,Xf],apiFunctions:{moveColumnByIndex:Jf,moveColumns:em},dependsOn:[nn],css:[Zf]},mm=class extends b{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const s=this.getHeaderCellForColumn(e);if(!s)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(s),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const s=document.createElement("form");s.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;e.forEach(n=>this.cloneItemIntoDummy(n,s)),i.appendChild(s);const o=s.offsetWidth;return i.removeChild(s),t=t??this.gos.get("autoSizePadding"),o+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(s=>{const i=s.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}),t}cloneItemIntoDummy(e,t){const s=e.cloneNode(!0);s.style.width="",s.style.position="static",s.style.left="";const i=document.createElement("div"),o=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>s.classList.contains(a))?(o.add("ag-header","ag-header-row"),i.style.position="static"):o.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const d=r.classList[l];d!="ag-row-position-absolute"&&o.add(d)}break}r=r.parentElement}i.appendChild(s),t.appendChild(i)}},jl={moduleName:"AutoWidth",version:F,beans:[mm]};function Cm(e,t,s=!0,i="api"){e.colResize?.setColumnWidths(t,!1,s,i)}var vm=class extends b{constructor(e,t,s,i){super(),this.comp=e,this.eResize=t,this.pinned=s,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:s}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&s&&this.addDestroyFunc(s.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:s,resizeRatios:i,groupAfterColumns:o,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=s,this.resizeRatios=i,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,s="uiColumnResized"){const i=this.normaliseDragChange(t),o=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(o,s,e)}getInitialValues(e){const t=l=>l.reduce((d,c)=>d+c.getActualWidth(),0),s=(l,d)=>l.map(c=>c.getActualWidth()/d),i=this.getColumnsToResize(),o=t(i),n=s(i,o),r={columnsToResize:i,resizeStartWidth:o,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),d=r.groupAfterColumns=l.filter(u=>u.isResizable()),c=r.groupAfterStartWidth=t(d);r.groupAfterRatios=s(d,c)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),s=this.getInitialValues();t>s.resizeStartWidth&&this.resizeColumns(s,t,e,!0)}resizeColumnsFromLocalValues(e,t,s=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,s)}resizeColumns(e,t,s,i=!0){const{columnsToResize:o,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:o,ratios:r,width:t}),a){const u=t-n;c.push({columns:a,ratios:d,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:i,source:s}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},wm=class extends b{constructor(e,t,s,i,o){super(),this.pinned=e,this.column=t,this.eResize=s,this.comp=i,this.ctrl=o}postConstruct(){const e=[];let t,s;const i=()=>{if(N(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),s&&a&&e.push(a.addColumnAutosize(this.eResize,this.column))},o=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==s)&&(t=r,s=a,o(),i())};n(),this.addDestroyFunc(o),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:s,lastResizeAmount:i,resizeStartWidth:o,beans:n}=this,r=this.normaliseResizeAmount(t),a=o+r,l=[{key:s,newWidth:a}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=d?.leftWidth??0,g=d?.rightWidth??0,p=Mt(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-i)>p)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const s=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?s&&(t*=-1):i&&(t*=-1),t}},bm=class extends b{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,s,i){const o=[],{colModel:n,gos:r,visibleCols:a}=this.beans;e.forEach(l=>{const d=n.getColDefCol(l.key)||n.getCol(l.key);if(!d)return;if(o.push({width:l.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(d);if(!u)return;const h=d.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;o.push({width:g,ratios:[1],columns:[u]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:s,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:s,source:i}=e;if(!(!t||t.every(c=>Sm(c)))){if(s){const c=t&&t.length>0?t[0].columns:null;Gt(this.eventSvc,c,s,i)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:h,ratios:g}=c,p={},f={};h.forEach(v=>r.push(v));let m=!0,C=0;for(;m;){if(C++,C>1e3){O(31);break}m=!1;const v=[];let S=0,y=u;h.forEach((M,A)=>{if(f[M.getId()])y-=p[M.getId()];else{v.push(M);const P=g[A];S+=P}});const D=1/S;v.forEach((M,A)=>{const T=A===v.length-1;let P;T?P=y:(P=Math.round(g[A]*u*D),y-=P);const G=M.getMinWidth(),$=M.getMaxWidth();P<G?(P=G,f[M.getId()]=!0,m=!0):$>0&&P>$&&(P=$,f[M.getId()]=!0,m=!0),p[M.getId()]=P})}h.forEach(v=>{const S=p[v.getId()];v.getActualWidth()!==S&&(v.setActualWidth(S,i),n.push(v))})});const a=n.length>0;let l=[];if(a){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;l=c?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(l);(a||s)&&Gt(this.eventSvc,d,s,i,l)}resizeHeader(e,t,s){if(!e.isResizable())return;const i=e.getActualWidth(),o=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(i+t,o),n);this.setColumnWidths([{key:e,newWidth:r}],s,!0,"uiColumnResized")}createResizeFeature(e,t,s,i,o){return new wm(e,t,s,i,o)}createGroupResizeFeature(e,t,s,i){return new vm(e,t,s,i)}};function Sm(e){const{columns:t,width:s}=e;let i=0,o=0,n=!0;t.forEach(l=>{const d=l.getMinWidth();i+=d||0;const c=l.getMaxWidth();c>0?o+=c:n=!1});const r=s>=i,a=!n||s<=o;return r&&a}var ym={moduleName:"ColumnResize",version:F,beans:[bm],apiFunctions:{setColumnWidths:Cm},dependsOn:[zl,jl]},Rm=class extends b{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}},xm=class extends Qo{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,s,i,o){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,o=is(this,a,o),this.setGui(t,o),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(o),this.setupExpandable(o),this.setupTooltip(),this.setupAutoHeight({wrapperElement:i,compBean:o}),this.setupUserComp(),this.addHeaderMouseListeners(o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(o,g,t),c?.createRangeHighlightFeature(o,n,e),o.createManagedBean(new Yo(n,t,r)),o.createManagedBean(new Rm(e,n)),u?this.resizeFeature=o.createManagedBean(u.createGroupResizeFeature(e,s,h,n)):e.setResizableDisplayed(!1),o.createManagedBean(new St(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(o,g),o.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(o),o.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.getDefinition();return k(t.gos,{colDef:s,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,s=e.get("groupHeaderHeight");s!=null?s===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(s):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const s of t)e.addManagedListeners(s,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,s)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),s=t[0]===e,i=H(t)===e;if(!s&&!i)return;const o=e.getHighlighted(),n=!!this.rowCtrl.findHeaderCellCtrl(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),d=o===1,c=o===0;s&&(l?a=d:r=c),i&&(l?r=c:a=d)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",r),this.comp.addOrRemoveCssClass("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:s}=this;if(!s)return;const i=s.getInitialValues(t);s.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:s}=this.beans,i=k(s,{displayName:this.displayName,columnGroup:this.column,setExpanded:n=>{e.setColumnGroupOpened(this.column.getProvidedColumnGroup(),n,"gridInitializing")},setTooltip:(n,r)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}}),o=gg(t,i);o&&this.comp.setUserCompDetails(o)}addHeaderMouseListeners(e){const t=o=>this.handleMouseOverChange(o.type==="mouseenter"),s=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),i=o=>this.handleContextMenuMouseEvent(o,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:i})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const s=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:s,expandableChanged:s})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),s=Mo(t,this.gos,null,e);e.isPadding()?(s.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(o=>o.isSpanHeaderHeight())&&s.push("ag-header-span-height")):(s.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&s.push("ag-header-cell-wrap-text")),s.forEach(i=>this.comp.addOrRemoveCssClass(i,!0))}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),o=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",t.isMoving());i.forEach(n=>{e.addManagedListeners(n,{movingChanged:o})}),o()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===w.ENTER){const s=this.column,i=!s.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Fm(e,t,s){e.colGroupSvc?.setColumnGroupOpened(t,s,"api")}function Em(e,t,s){return e.colGroupSvc?.getColumnGroup(t,s)??null}function Dm(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function Pm(e,t,s){return e.colNames.getDisplayNameForColumnGroup(t,s)||""}function Mm(e){return e.colGroupSvc?.getColumnGroupState()??[]}function Am(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function Tm(e){e.colGroupSvc?.resetColumnGroupState("api")}function km(e){return e.visibleCols.treeLeft}function Im(e){return e.visibleCols.treeCenter}function Lm(e){return e.visibleCols.treeRight}function Om(e){return e.visibleCols.getAllTrees()}function Gm(e,t){for(let s=0;s<t.length;s++){const i=e.indexOf(t[s]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var Hm=class extends b{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colModel:s,colGroupSvc:i,colViewport:o}=this.beans;t||this.buildTrees(s,i),i?.updateOpenClosedVisibility();const n=dn(this.treeLeft);this.leftCols=n,this.centerCols=dn(this.treeCenter);const r=dn(this.treeRight);this.rightCols=r,this.joinColsAriaOrder(s),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),this.beans.colFlex?.refreshFlexedColumns(),this.updateBodyWidths(),o.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(s,n,r,e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(){const e=He(this.centerCols),t=He(this.leftCols),s=He(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==s)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=s,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,s,i){let o,n;this.gos.get("enableRtl")?(o=t?t[0]:null,n=s?H(s):null):(o=t?H(t):null,n=s?s[0]:null),e.getCols().forEach(r=>{r.setLastLeftPinned(r===o,i),r.setFirstRightPinned(r===n,i)})}buildTrees(e,t){const s=e.getColsToShow(),i=s.filter(l=>l.getPinned()=="left"),o=s.filter(l=>l.getPinned()=="right"),n=s.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new Fo,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:o,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),s=[],i=[],o=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?s.push(n):o.push(n):i.push(n)}this.ariaOrderColumns=s.concat(i).concat(o)}getAriaColIndex(e){let t;return W(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{W(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),o=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(n=>{if(o){let r=He(n);n.forEach(a=>{r-=a.getActualWidth(),a.setLeft(r,e)})}else{let r=0;n.forEach(a=>{a.setLeft(r,e),r+=a.getActualWidth()})}Gm(i,n)}),i.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,s,i){const o=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,d=Math.min(a.getColSpan(e),l),c=[a];if(d>1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;s?(u=!1,c.forEach(h=>{s(h)&&(u=!0)})):u=!0,u&&(o.length===0&&n&&(i&&i(a))&&o.push(n),o.push(a)),n=a}return o}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,s=t.indexOf(e);return s>0?t[s-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};xt(this.treeCenter,!1,e),xt(this.treeLeft,!1,e),xt(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let s=0;s<t.length;s++){const i=this[t[s]];if(i.length)return e?H(i):i[0]}return null}getColAfter(e){const t=this.allCols,s=t.indexOf(e);return s<t.length-1?t[s+1]:null}getColsLeftWidth(){return He(this.leftCols)}getDisplayedColumnsRightWidth(){return He(this.rightCols)}isColAtEdge(e,t){const s=this.allCols;if(!s.length)return!1;const i=t==="first";let o;if(W(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;o=i?n[0]:H(n)}else o=e;return(i?s[0]:H(s))===o}};function xt(e,t,s){if(e)for(let i=0;i<e.length;i++){const o=e[i];if(W(o)){const n=t?o.getDisplayedChildren():o.getChildren();xt(n,t,s)}s(o)}}function dn(e){const t=[];return xt(e,!0,s=>{Ge(s)&&t.push(s)}),t}var Bm=class extends b{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Be(null,t,s=>{ee(s)&&e.push({groupId:s.getGroupId(),open:s.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const s=[];Be(null,t,i=>{if(ee(i)){const o=i.getColGroupDef(),n={groupId:i.getGroupId(),open:o?o.openByDefault:void 0};s.push(n)}}),this.setColumnGroupState(s,e)}setColumnGroupState(e,t){const{colModel:s,colAnimation:i,visibleCols:o,eventSvc:n}=this.beans;if(!s.getColTree().length)return;i?.start();const a=[];e.forEach(l=>{const d=l.groupId,c=l.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),a.push(u))}),o.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i?.finish()}setColumnGroupOpened(e,t,s){let i;ee(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],s)}getProvidedColGroup(e){let t=null;return Be(null,this.beans.colModel.getColTree(),s=>{ee(s)&&s.getId()===e&&(t=s)}),t}getGroupAtDirection(e,t){const s=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),o=t==="After"?H(i):i[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](o);if(!r)return null;const a=this.getColGroupAtLevel(r,s);if(a!==e)return a}}getColGroupAtLevel(e,t){let s=e.getParent(),i,o;for(;i=s.getProvidedColumnGroup().getLevel(),o=s.getPaddingLevel(),!(i+o<=t);)s=s.getParent();return s}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();xt(e,!1,t=>{W(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(W(e))return e;const s=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let o=null;return xt(s,!1,n=>{if(W(n)){const r=n;let a;i?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(o=r)}}),o}createColumnGroups(e){const{columns:t,idCreator:s,pinned:i,oldDisplayedGroups:o,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(o),a=[];let l=t;for(;l.length;){const d=l;l=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],m=(W(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let v=g;v<h;v++)a.push(d[v]);return}const C=this.createColumnGroup(m,s,r,i,n);for(let v=g;v<h;v++)C.addChild(d[v]);l.push(C)};for(let h=1;h<d.length;h++){const g=d[h],f=(W(g)?g.getProvidedColumnGroup():g).getOriginalParent(),m=d[c],v=(W(m)?m.getProvidedColumnGroup():m).getOriginalParent();f!==v&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,s,i,o,n,r){const a=o.getUniqueKey(t.groupId||null,null),l=this.createMergedColGroupDef(t,a),d=new es(l,a,!1,s);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c?.group;u&&d.setExpanded(u.isExpanded());const h=Zr(this.beans,l.children,s+1,e,i,o,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,s,i){const o=[];for(let n=0;n<e.length;n++){const r=e[n];if(ee(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,s,i);a.setChildren(l),o.push(a)}else{let a,l;for(let d=s-1;d>=t;d--){const c=i.getUniqueKey(null,null),u=this.createMergedColGroupDef(null,c),h=new es(u,c,!0,t);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(o.push(a),e.some(c=>ee(c))){l.setChildren([r]);continue}else{l.setChildren(e);break}o.push(r)}}return o}findDepth(e){let t=0,s=e;for(;s&&s[0]&&ee(s[0]);)t++,s=s[0].getChildren();return t}findMaxDepth(e,t){let s=t;for(let i=0;i<e.length;i++){const o=e[i];if(ee(o)){const n=o,r=this.findMaxDepth(n.getChildren(),t+1);s<r&&(s=r)}}return s}balanceTreeForAutoCols(e,t){const s=[];return e.forEach(i=>{let o=i;for(let n=t-1;n>=0;n--){const r=new es(null,`FAKE_PATH_${i.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([o]),o.originalParent=r,o=r}t===0&&(i.originalParent=null),s.push(o)}),s}createMergedColGroupDef(e,t){const s={},{gos:i,validation:o}=this.beans;return Object.assign(s,i.get("defaultColGroupDef")),Object.assign(s,e),o?.validateColDef(s,t),s}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const o=t[i];if(o.getColGroupDef()&&o.getId()===e.groupId)return{idx:i,group:o}}}createColumnGroup(e,t,s,i,o){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=Ia(n,r);let l=s[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),x(l)?l.reset():(l=new Io(e,n,r,i),o||this.createBean(l)),l}mapOldGroupsById(e){const t={},s=i=>{i.forEach(o=>{if(W(o)){const n=o;t[o.getUniqueId()]=n,s(n.getChildren())}})};return e&&s(e),t}setupParentsIntoCols(e,t){e.forEach(s=>{if(s.parent=t,W(s)){const i=s;this.setupParentsIntoCols(i.getChildren(),i)}})}},ql={moduleName:"ColumnGroup",version:F,dynamicBeans:{headerGroupCellCtrl:xm},beans:[Bm],apiFunctions:{getAllDisplayedColumnGroups:Om,getCenterDisplayedColumnGroups:Im,getColumnGroup:Em,getColumnGroupState:Mm,getDisplayNameForColumnGroup:Pm,getLeftDisplayedColumnGroups:km,getProvidedColumnGroup:Dm,getRightDisplayedColumnGroups:Lm,resetColumnGroupState:Tm,setColumnGroupOpened:Fm,setColumnGroupState:Am}},Vm={moduleName:"CheckboxCellRenderer",version:F,userComponents:{agCheckboxCellRenderer:tf}};function Nm(e,t){const s=e.colModel.getColDefCol(t);return s?s.getColDef():null}function zm(e){return e.colModel.getColumnDefs()}function Wm(e,t,s){return e.colNames.getDisplayNameForColumn(t,s)||""}function _m(e,t){return e.colModel.getColDefCol(t)}function Um(e){return e.colModel.getColDefCols()}function $m(e,t){return he(e,t,"api")}function Km(e){return Ht(e)}function jm(e){na(e,"api")}function qm(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function Ym(e){return e.visibleCols.isPinningLeft()}function Qm(e){return e.visibleCols.isPinningRight()}function Zm(e,t){return e.visibleCols.getColAfter(t)}function Xm(e,t){return e.visibleCols.getColBefore(t)}function Jm(e,t,s){e.colModel.setColsVisible(t,s,"api")}function eC(e,t,s){e.pinnedCols?.setColsPinned(t,s,"api")}function tC(e){return e.colModel.getCols()}function sC(e){return e.visibleCols.leftCols}function iC(e){return e.visibleCols.centerCols}function oC(e){return e.visibleCols.rightCols}function nC(e){return e.visibleCols.allCols}function rC(e){return e.colViewport.getViewportColumns()}function cn(e,t){if(!e)return;const s=e,i={};return Object.keys(s).forEach(o=>{if(t&&t.indexOf(o)>=0||Wr.has(o))return;const n=s[o];typeof n=="object"&&n!==null&&n.constructor===Object?i[o]=cn(n):i[o]=n}),i}var aC=class extends b{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,s,i){const o=e.slice();t?o.sort((a,l)=>s.indexOf(a)-s.indexOf(l)):s&&o.sort((a,l)=>i.indexOf(a)-i.indexOf(l));const n=this.rowGroupColsSvc?.columns,r=this.pivotColsSvc?.columns;return this.buildColumnDefs(o,n,r)}buildColumnDefs(e,t=[],s=[]){const i=[],o={};return e.forEach(n=>{const r=this.createDefFromColumn(n,t,s);let a=!0,l=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=o[d.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[l],o[u.groupId]=u,l=u,d=d.getOriginalParent()),d!=null&&c===d){a=!1;break}c=d}a&&i.push(l)}),i}createDefFromGroup(e){const t=cn(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,s){const i=cn(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?s.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},lC=class extends b{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const s=this.flexViewportWidth;if(!s)return[];const{visibleCols:i}=this.beans,o=i.centerCols;let n=-1;if(e.resizingCols){const p=new Set(e.resizingCols);for(let f=o.length-1;f>=0;f--)if(p.has(o[f])){n=f;break}}let r=!1;const a=o.map((p,f)=>{const m=p.getFlex(),C=m!=null&&m>0&&f>n;return r||(r=C),{col:p,isFlex:C,flex:Math.max(0,m??0),initialSize:p.getActualWidth(),min:p.getMinWidth(),max:p.getMaxWidth(),targetSize:0}});if(!r)return[];let l=a.length,d=a.reduce((p,f)=>p+f.flex,0),c=s;const u=(p,f)=>{p.frozenSize=f,p.col.setActualWidth(f,t),c-=f,d-=p.flex,l-=1},h=p=>p.frozenSize!=null;for(const p of a)p.isFlex||u(p,p.initialSize);for(;l>0;){const p=Math.round(d<1?c*d:c);let f,m=0,C=0;for(const y of a){if(h(y))continue;f=y,C+=p*(y.flex/d);const D=C-m,M=Math.round(D);y.targetSize=M,m+=M}f&&(f.targetSize+=p-m);let v=0;for(const y of a){if(h(y))continue;const D=y.targetSize,M=Math.min(Math.max(D,y.min),y.max);v+=M-D,y.violationType=M===D?void 0:M<D?"max":"min",y.targetSize=M}const S=v===0?"all":v>0?"min":"max";for(const y of a)h(y)||(S==="all"||y.violationType===S)&&u(y,y.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const g=a.filter(p=>p.isFlex&&!p.violationType).map(p=>p.col);if(e.fireResizedEvent){const p=a.filter(m=>m.initialSize!==m.frozenSize).map(m=>m.col),f=a.filter(m=>m.flex).map(m=>m.col);Gt(this.eventSvc,p,!0,t,f)}return g}initCol(e){const{flex:t,initialFlex:s}=e.colDef;t!==void 0?e.flex=t:s!==void 0&&(e.flex=s)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},dC=class extends b{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={};this.dataTypeDefinitions=t;const s={};this.formatValueFuncs=s;const i=r=>a=>{const{column:l,node:d,value:c}=a;let u=l.getColDef().valueFormatter;return u===r.groupSafeValueFormatter&&(u=r.valueFormatter),this.beans.valueSvc.formatValue(l,d,c,u)};for(const r of Object.keys(e)){const a=e[r],l={...a,groupSafeValueFormatter:Zl(a,this.gos)};t[r]=l,s[r]=i(l)}const o=this.gos.get("dataTypeDefinitions")??{},n={};this.dataTypeMatchers=n;for(const r of Object.keys(o)){const a=o[r],l=this.processDataTypeDefinition(a,o,[r],e);l&&(t[r]=l,a.dataTypeMatcher&&(n[r]=a.dataTypeMatcher),s[r]=i(l))}this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(r=>{const a=n[r];a&&delete n[r],n[r]=a??e[r].dataTypeMatcher})}processDataTypeDefinition(e,t,s,i){let o;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=i[n];const a=t[n];if(r&&a&&(r=a),!Ql(e,r,n))return;o=Yl(r,e)}else{if(s.includes(n)){R(44);return}const r=t[n];if(!Ql(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...s,n],i);if(!a)return;o=Yl(a,e)}return{...o,groupSafeValueFormatter:Zl(o,this.gos)}}updateColDefAndGetColumnType(e,t,s){let{cellDataType:i}=t;const{field:o}=t;if(i===void 0&&(i=e.cellDataType),(i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(o,s):!1),!i){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[i];if(!n){R(47,{cellDataType:i});return}return e.cellDataType=i,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,n,s),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const s=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",s),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",s))}canInferCellDataType(e,t){const{gos:s}=this;if(!J(s))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(un(t,i))return!1;const o=t.type===null?e.type:t.type;if(o){const n=s.get("columnTypes")??{};if(si(o).some(a=>{const l=n[a.trim()];return l&&un(l,i)}))return!1}return!un(e,i)}inferCellDataType(e,t){if(!e)return;let s;const i=this.getInitialData();if(i){const o=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");s=Jt(i,e,o)}else this.initWaitForRowData(t);if(s!=null)return Object.keys(this.dataTypeMatchers).find(o=>this.dataTypeMatchers[o](s))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?.allLeafChildren;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:s,eventSvc:i}=this.beans;t&&s&&(s.shouldQueueResizeOperations=!0);const[o]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(o?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&s?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const s=[];this.destroyColumnStateUpdateListeners();const i={},o={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const d=a.getColDef();if(t&&d.type&&d.type!==l.type){const c=uC(a,r);c.rowGroup&&c.rowGroupIndex==null&&(i[n]=c),c.pivot&&c.pivotIndex==null&&(o[n]=c),s.push(c)}}t&&s.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,o)),s.length&&he(this.beans,{state:s},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const s={},{rowGroupColsSvc:i,pivotColsSvc:o}=this.beans;return i?.restoreColumnOrder(s,e),o?.restoreColumnOrder(s,t),Object.values(s)}resetColDefIntoCol(e,t){const s=e.getUserProvidedColDef();if(!s)return!1;const i=ii(this.beans,s,e.getColId());return e.setColDef(i,s,t),!0}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,s=e.object;this.hasObjectValueParser=t.valueParser!==s.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==s.valueFormatter}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const s=this.getDataTypeDefinition(e)?.dataTypeMatcher;return s?s(t):!0}validateColDef(e){const t=s=>R(48,{property:s});if(e.cellDataType==="object"){const{object:s}=this.dataTypeDefinitions;e.valueFormatter===s.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===s.valueParser&&!this.hasObjectValueParser&&t("Parser")}}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,s,i){const o=this.formatValueFuncs[t];switch(s.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=n=>!!n.colDef.editable&&n.event.key===w.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=o;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=o;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(n,r)=>{const a=this.colModel.getColDefCol(i),l=a?.getColDef();if(!a||!l)return 0;const d=n==null?"":o({column:a,node:null,value:n}),c=r==null?"":o({column:a,node:null,value:r});return d===c?0:d>c?1:-1},e.keyCreator=o;break}}this.beans.filterManager?.setColDefPropertiesForDataType(e,s,o)}getDefaultDataTypes(){const e=s=>!!s.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:s=>s.newValue?.trim?.()===""?null:Number(s.newValue),valueFormatter:s=>s.value==null?"":typeof s.value!="number"||isNaN(s.value)?t("invalidNumber","Invalid Number"):String(s.value),dataTypeMatcher:s=>typeof s=="number"},text:{baseDataType:"text",valueParser:s=>s.newValue===""?null:Ks(s.newValue),dataTypeMatcher:s=>typeof s=="string"},boolean:{baseDataType:"boolean",valueParser:s=>s.newValue==null?s.newValue:s.newValue?.trim?.()===""?null:String(s.newValue).toLowerCase()==="true",valueFormatter:s=>s.value==null?"":String(s.value),dataTypeMatcher:s=>typeof s=="boolean"},date:{baseDataType:"date",valueParser:s=>oe(s.newValue==null?null:String(s.newValue)),valueFormatter:s=>s.value==null?"":!(s.value instanceof Date)||isNaN(s.value.getTime())?t("invalidDate","Invalid Date"):pe(s.value,!1)??"",dataTypeMatcher:s=>s instanceof Date},dateString:{baseDataType:"dateString",dateParser:s=>oe(s)??void 0,dateFormatter:s=>pe(s??null,!1)??void 0,valueParser:s=>e(String(s.newValue))?s.newValue:null,valueFormatter:s=>e(String(s.value))?s.value:"",dataTypeMatcher:s=>typeof s=="string"&&e(s)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:s=>Ks(s.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Yl(e,t){const s={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(s.columnTypes=[...si(e.columnTypes),...si(t.columnTypes)]),s}function Ql(e,t,s){return t?t.baseDataType!==e.baseDataType?(R(46),!1):!0:(R(45,{parentCellDataType:s}),!1)}function Zl(e,t){if(e.valueFormatter)return s=>{if(s.node?.group){const i=(s.colDef.pivotValueColumn??s.column).getAggFunc();if(i){if(i==="first"||i==="last")return e.valueFormatter(s);if(e.baseDataType==="number"&&i!=="count"){if(typeof s.value=="number")return e.valueFormatter(s);if(typeof s.value=="object"){if(!s.value)return;if("toNumber"in s.value)return e.valueFormatter({...s,value:s.value.toNumber()});if("value"in s.value)return e.valueFormatter({...s,value:s.value.value})}}return}if(t.get("groupDisplayType")==="groupRows"&&!t.get("treeData"))return}else if(t.get("groupHideOpenParents")&&s.column.isRowGroupActive()&&typeof s.value=="string"&&!e.dataTypeMatcher?.(s.value))return;return e.valueFormatter(s)}}function cC(e,t,s,i){if(!t[s])return!1;const o=e[s];return o===null?(t[s]=!1,!1):i===void 0?!!o:o===i}function un(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([s,i])=>cC(e,t,s,i))}function uC(e,t){const s=aa(e);return t.forEach(i=>{delete s[i],i==="rowGroup"?delete s.rowGroupIndex:i==="pivot"&&delete s.pivotIndex}),s}var hC={moduleName:"DataType",version:F,beans:[dC],dependsOn:[Vm]},gC={moduleName:"ColumnFlex",version:F,beans:[lC]},Xl={moduleName:"ColumnApi",version:F,beans:[aC],apiFunctions:{getColumnDef:Nm,getDisplayNameForColumn:Wm,getColumn:_m,getColumns:Um,applyColumnState:$m,getColumnState:Km,resetColumnState:jm,isPinning:qm,isPinningLeft:Ym,isPinningRight:Qm,getDisplayedColAfter:Zm,getDisplayedColBefore:Xm,setColumnsVisible:Jm,setColumnsPinned:eC,getAllGridColumns:tC,getDisplayedLeftColumns:sC,getDisplayedCenterColumns:iC,getDisplayedRightColumns:oC,getAllDisplayedColumns:nC,getAllDisplayedVirtualColumns:rC,getColumnDefs:zm}};function pC(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,s=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(s,"$1 $2$3").replace(/\./g," ").split(" ").map(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" ")}var fC=class extends b{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,s=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:o}=this.beans;return s&&o?o.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,s){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,s):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,s,i,o){const n=e.headerValueGetter;if(n){const r=k(this.gos,{colDef:e,column:t,columnGroup:s,providedColumnGroup:i,location:o});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return pC(e.field)}return""}},mC=class extends b{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,s=!1){const{visibleCols:i}=this,o=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!o)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=i.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(s)}}getHeadersToRender(e,t){let s;switch(e){case"left":s=this.rowsOfHeadersToRenderLeft[t];break;case"right":s=this.rowsOfHeadersToRenderRight[t];break;default:s=this.rowsOfHeadersToRenderCenter[t];break}return s||[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(e){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},e||(this.colsWithinViewportHash="")}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||CC(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,s=t+e.getActualWidth(),i=this.viewportLeft-200,o=this.viewportRight+200,n=t<i&&s<i,r=t>o&&s>o;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return x(r)&&r>this.viewportLeft},s=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,o=i.centerCols;return i.getColsForRow(e,o,s,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){this.clear(!0);const e={},{leftCols:t,rightCols:s,treeLeft:i,treeRight:o,treeCenter:n}=this.visibleCols;this.headerColsWithinViewport.concat(t).concat(s).forEach(l=>e[l.getId()]=!0);const a=(l,d,c)=>{let u=!1;for(let h=0;h<l.length;h++){const g=l[h];let p=!1;if(Ge(g))p=e[g.getId()]===!0;else{const m=g.getDisplayedChildren();m&&(p=a(m,d,c+1))}p&&(u=!0,d[c]||(d[c]=[]),d[c].push(g))}return u};a(i,this.rowsOfHeadersToRenderLeft,0),a(o,this.rowsOfHeadersToRenderRight,0),a(n,this.rowsOfHeadersToRenderCenter,0)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),s=this.colsWithinViewportHash!==t;return s&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),s}};function CC(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var vC=class extends b{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class s{refresh(){return!1}getGui(){return this.eGui}init(o){const n=t(o),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=At("<span>"+n+"</span>");return}if(n==null){this.eGui=At("<span></span>");return}this.eGui=n}}return s}},wC={moduleName:"CellRendererFunction",version:F,beans:[vC]},bC=class extends b{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultParams={},this.jsComps={},this.dynamicBeans={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:s,dynamicBeans:i,selectors:o}=e;if(s){const n=(r,a,l)=>{this.agGridDefaults[r]=a,l&&(this.agGridDefaultParams[r]=l)};for(const r of Object.keys(s)){const a=s[r];typeof a=="object"?n(r,a.classImp,a.params):n(r,a)}}if(i)for(const n of Object.keys(i))this.dynamicBeans[n]=i[n];if(o?.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const s=(a,l,d)=>({componentFromFramework:l,component:a,params:d}),{frameworkOverrides:i}=this.beans,o=i.frameworkComponent(t,this.gos.get("components"));if(o!=null)return s(o,!0);const n=this.jsComps[t];if(n){const a=i.isFrameworkComponent(n);return s(n,a)}const r=this.agGridDefaults[t];return r?s(r,!1,this.agGridDefaultParams[t]):(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null)}createDynamicBean(e,t,...s){const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(Oe(256));return}return new i(...s)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},SC=23,yC=class extends b{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===SC&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const s=this.readyCallbacks.indexOf(t);s>=0&&this.readyCallbacks.splice(s,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:s}=this.params;return[e,s,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},RC=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row-hover.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',hn=typeof window!="object"||!window?.document?.fonts?.forEach,gn=new WeakMap,zt=(e,t,s,i,o)=>{if(hn||vn)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let n=gn.get(t);if(n||(n=[],gn.set(t,n)),n.find(d=>d.css===e))return;const r=document.createElement("style");r.dataset.agGlobalCss=s,r.textContent=e;const a={css:e,el:r,priority:o};let l;for(const d of n){if(d.priority>o)break;l=d}if(l){l.el.insertAdjacentElement("afterend",r);const d=n.indexOf(l);n.splice(d+1,0,a)}else t.insertBefore(r,t.querySelector(":not(title, meta)")),n.push(a)},Jl=(e,t)=>{zt(RC,e,"core",t,0),Array.from(Tg()).sort((s,i)=>s.moduleName.localeCompare(i.moduleName)).forEach(s=>s.css?.forEach(i=>zt(i,e,`module-${s.moduleName}`,t,0)))},pn=new Set,xC=e=>{pn.add(e)},FC=e=>{if(pn.delete(e),pn.size===0){gn=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},B=e=>new ed(e),et="$default",EC=0,ed=class{constructor({feature:e,params:t,modeParams:s={},css:i,cssImports:o}){this.feature=e,this.css=i,this.cssImports=o,this.modeParams={[et]:{...s[et]??{},...t??{}},...s}}use(e,t){let s=this._inject;if(s==null){let{css:i}=this;if(i){const o=`ag-theme-${this.feature??"part"}-${++EC}`;typeof i=="function"&&(i=i()),i=`:where(.${o}) {
${i}
}
`;for(const n of this.cssImports??[])i=`@import url(${JSON.stringify(n)});
${i}`;s={css:i,class:o}}else s=!1;this._inject=s}return s&&e&&zt(s.css,e,s.class,t,1),s?s.class:!1}},DC=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),td=e=>`--ag-${DC(e)}`,Me=e=>`var(${td(e)})`,PC=(e,t,s)=>Math.max(t,Math.min(s,e)),MC=e=>{const t=new Map;return s=>{const i=s;return t.has(i)||t.set(i,e(s)),t.get(i)}},fe=e=>({ref:"accentColor",mix:e}),K=e=>({ref:"foregroundColor",mix:e}),U=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),AC=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),q={ref:"backgroundColor"},Ae={ref:"foregroundColor"},j={ref:"accentColor"},Ft={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:K(.15),chromeBackgroundColor:U(.02),browserColorScheme:"light"},TC={...Ft,textColor:Ae,accentColor:"#2196f3",invalidColor:"#e02525",wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:q,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:j,rangeSelectionBackgroundColor:fe(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:fe(.5),rangeHeaderHighlightColor:AC(.08),rowNumbersSelectedColor:fe(.5),rowHoverColor:fe(.08),columnHoverColor:fe(.05),selectedRowBackgroundColor:fe(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:q,borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},dragAndDropImageBackgroundColor:q,dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:K(.7),focusShadow:{spread:3,color:fe(.5)},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},iconSize:16,iconColor:"inherit",iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:K(.1),iconButtonActiveColor:j,iconButtonActiveBackgroundColor:fe(.28),iconButtonActiveIndicatorColor:j,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:j,toggleButtonOffBackgroundColor:U(.3),toggleButtonSwitchBackgroundColor:q,toggleButtonSwitchInset:2,menuBorder:{color:K(.2)},menuBackgroundColor:U(.03),menuTextColor:U(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:K(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:j},cellEditingShadow:{ref:"cardShadow"},dialogBorder:{color:K(.2)},panelBackgroundColor:q,panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:K(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:K(.13)},selectCellBackgroundColor:K(.07),selectCellBorder:{color:K(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:K(.15),statusBarLabelColor:Ae,statusBarLabelFontWeight:500,statusBarValueColor:Ae,statusBarValueFontWeight:500},Di=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",Pi={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},kC=()=>B({feature:"buttonStyle",params:Pi,css:Di}),sd=kC(),IC=()=>B({feature:"buttonStyle",params:{...Pi,buttonBackgroundColor:q,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:j}},css:Di}),id=IC(),LC=()=>B({feature:"buttonStyle",params:{...Pi,buttonBackgroundColor:q,buttonBorder:{color:j},buttonFontWeight:600,buttonTextColor:j,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBackgroundColor:j,buttonActiveTextColor:q},css:Di}),od=LC(),OC=()=>B({feature:"buttonStyle",params:{...Pi,buttonBorder:{color:Ae,width:2,style:"outset"},buttonActiveBorder:{color:Ae,width:2,style:"inset"},buttonBackgroundColor:U(.07),buttonHoverBackgroundColor:q,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:Di}),nd=OC(),GC=".ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",HC=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",BC=()=>B({feature:"columnDropStyle",css:GC}),Mi=BC(),VC=()=>B({feature:"columnDropStyle",css:HC}),fn=VC(),NC=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],zC=MC(e=>(e=e.toLowerCase(),NC.find(t=>e.endsWith(t.toLowerCase()))??"length")),Ai=e=>typeof e=="object"&&e?.ref?Me(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Ti=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=Me(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Me(e.onto):"transparent"}, ${t} ${PC(e.mix*100,0,100)}%)`}return!1},WC=Ai,Wt=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,s=>s[0]==="-"?s:` ${Me(s)} `)})`:e&&"ref"in e?Me(e.ref):!1,_C=Ai,UC=(e,t)=>typeof e=="string"?e:e===!0?"solid 1px var(--ag-border-color)":e===!1?t==="columnBorder"?"solid 1px transparent":"none":e&&"ref"in e?Me(e.ref):rd(e.style??"solid")+" "+Wt(e.width??1)+" "+Ti(e.color??{ref:"borderColor"}),$C=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?Me(e.ref):[Wt(e.offsetX??0),Wt(e.offsetY??0),Wt(e.radius??0),Wt(e.spread??0),Ti(e.color??{ref:"foregroundColor"})].join(" "),rd=Ai,mn=e=>typeof e=="string"?e:e&&"googleFont"in e?mn(e.googleFont):e&&"ref"in e?Me(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),KC(t))).join(", "):!1,KC=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),ad=Ai,Cn=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?Cn({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?Me(e.ref):!1,jC=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&O(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?Me(e.ref):!1,qC={color:Ti,colorScheme:WC,length:Wt,scale:_C,border:UC,borderStyle:rd,shadow:$C,image:Cn,fontFamily:mn,fontWeight:ad,duration:jC},YC=(e,t)=>{const s=zC(e);return qC[s](t,e)},vn=!1,QC=e=>{if(!(e instanceof wn))throw new Error("theme is not an object created by createTheme");return e},ms=()=>new wn().withPart(id).withPart(Mi),wn=class Cu{constructor(t=[]){this.parts=t}withPart(t){return typeof t=="function"&&(t=t()),t instanceof ed?new Cu([...this.parts,t]):(ho(259,{part:t},"Invalid part"),this)}withoutPart(t){return this.withPart(B({feature:t}))}withParams(t,s=et){return this.withPart(B({modeParams:{[s]:t}}))}_startUse({styleContainer:t,cssLayer:s,loadThemeGoogleFonts:i}){if(hn||vn)return;XC(),Jl(t,s);const o=ZC(this);if(o.length>0)for(const n of o)i&&ev(n);for(const n of this.parts)n.use(t,s)}_getCssClass(){return vn?"ag-theme-quartz":this._cssClassCache??(this._cssClassCache=ld(this.parts).map(t=>t.use(void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const s={[et]:{...TC}};for(const i of ld(this.parts))for(const o of Object.keys(i.modeParams)){const n=i.modeParams[o];if(n){const r=s[o]??(s[o]={}),a=new Set;for(const l of Object.keys(n)){const d=n[l];d!==void 0&&(r[l]=d,a.add(l))}if(o===et)for(const l of Object.keys(s)){const d=s[l];if(l!==et)for(const c of a)delete d[c]}}}this._paramsCache=t=s}return t}_getPerGridCss(t){const s="##SELECTOR##";let i=this._paramsCssCache;if(!i){let o="",n="";const r=this._getModeParams();for(const l of Object.keys(r)){const d=r[l];if(l!==et){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
`;o+=u,n+=u}for(const c of Object.keys(d).sort()){const u=d[c],h=YC(c,u);if(h===!1)O(107,{key:c,value:u});else{const g=td(c),p=g.replace("--ag-","--ag-inherited-");o+=`	${g}: var(${p}, ${h});
`,n+=`	${p}: var(${g});
`}}l!==et&&(o+=`}
`,n+=`}
`)}let a=`${s} {
${o}}
`;a+=`:has(> ${s}):not(${s}) {
${n}}
`,this._paramsCssCache=i=a}return i.replaceAll(s,`:where(.${t})`)}},ld=e=>{const t=new Map;for(const i of e)t.set(i.feature,i);const s=[];for(const i of e)(!i.feature||t.get(i.feature)===i)&&s.push(i);return s},ZC=e=>{const t=new Set,s=n=>{if(Array.isArray(n))n.forEach(s);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(s),Array.from(t).sort()},dd=!1,XC=()=>{if(!dd){dd=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},JC=new Set,ev=async e=>{JC.add(e);const t=`@import url('https://${tv}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
`;zt(t,document.head,`googleFont:${e}`,void 0,0)},tv="fonts.googleapis.com",sv='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',iv=()=>B({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:q,checkboxUncheckedBorderColor:U(.3),checkboxCheckedBackgroundColor:j,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:q,checkboxIndeterminateBackgroundColor:U(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:q,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:sv}),Cs=iv(),ov=()=>B({feature:"colorScheme",params:Ft}),nv=ov(),rv=()=>B({feature:"colorScheme",params:{...Ft,foregroundColor:"#000000de",borderColor:"#60300026",chromeBackgroundColor:"#60300005"}}),av=rv(),lv=()=>B({feature:"colorScheme",params:{...Ft,foregroundColor:"#000",chromeBackgroundColor:"#f3f8f8"}}),dv=lv(),bn=()=>({...Ft,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:U(.05),rowHoverColor:fe(.15),selectedRowBackgroundColor:fe(.2),menuBackgroundColor:U(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",checkboxUncheckedBorderColor:U(.4),toggleButtonOffBackgroundColor:U(.4)}),cv=()=>B({feature:"colorScheme",params:bn()}),uv=cv(),hv=()=>B({feature:"colorScheme",params:{backgroundColor:"hsl(29, 10%, 17%)",foregroundColor:"#FFF",browserColorScheme:"dark"}}),cd=()=>({...bn(),backgroundColor:"#1f2836"}),gv=hv(),pv=()=>B({feature:"colorScheme",params:cd()}),fv=pv(),mv=()=>B({feature:"colorScheme",params:Ft,modeParams:{light:Ft,dark:bn(),"dark-blue":cd()}}),vs=mv(),Cv=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`,vv=B({feature:"iconSet",css:Cv}),wv=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`,ud=B({feature:"iconSet",css:wv}),bv=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`,hd=B({feature:"iconSet",css:bv}),Sv=e=>{const t=[];if(e.type==="image"){const{icons:s,mask:i}=e;for(const o of Object.keys(s)){const n=Cn(s[o]);i?t.push(`.ag-icon-${o}::before { mask-image: ${n}; }`):t.push(`.ag-icon-${o}::before { background-image: ${n}; ${gd} }`)}}if(e.type==="font"){const{family:s,weight:i,color:o,icons:n}=e;let r=gd;s&&(r+=` font-family: ${mn(s)};`),i&&(r+=` font-weight: ${ad(i)};`),o&&(r+=` color: ${Ti(o)};`);for(const a of Object.keys(n))t.push(`.ag-icon-${a}::before { content: ${JSON.stringify(n[a])}; ${r} }`)}return B({css:t.join(`;
`),cssImports:e.cssImports})},gd="background-color: unset; mask-image: unset; -webkit-mask-image: unset;",pd={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},fd={"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>'},yv=(e={})=>{let t="";for(const s of[...Object.keys(pd),...Object.keys(fd)]){const i=Rv(s,e.strokeWidth);t+=`.ag-icon-${s}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
`}return t},Rv=(e,t=1.5)=>{const s=fd[e];if(s)return s;const i=pd[e];if(!i)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},ki=(e={})=>B({feature:"iconSet",css:()=>yv(e)}),xv=ki({strokeWidth:1}),md=ki(),Fv=ki({strokeWidth:2}),Sn=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',Ev=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}",Dv=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){border-left:none;border-right:none;border-top:none}",yn={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"}},Pv=()=>B({feature:"inputStyle",params:yn,css:Sn}),Mv=Pv(),Av=()=>B({feature:"inputStyle",params:{...yn,inputBackgroundColor:q,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:j},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:U(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>Sn+Ev}),Ii=Av(),Tv=()=>B({feature:"inputStyle",params:{...yn,inputBackgroundColor:"transparent",inputBorder:{width:2,color:K(.3)},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}},css:()=>Sn+Dv}),Cd=Tv(),ws='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',kv=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",bs={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},Iv=()=>B({feature:"tabStyle",params:bs,css:ws}),Lv=Iv(),Ov=()=>B({feature:"tabStyle",params:{...bs,tabBarBorder:!0,tabBarBackgroundColor:K(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:q},css:ws}),vd=Ov(),Gv=()=>B({feature:"tabStyle",params:{...bs,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:0},css:ws}),wd=Gv(),Hv=()=>B({feature:"tabStyle",params:{...bs,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:j,tabSelectedTextColor:j,tabSelectedUnderlineColor:j,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:ws}),bd=Hv(),Bv=()=>B({feature:"tabStyle",params:{...bs,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:q},css:()=>ws+kv}),Sd=Bv(),Vv=".ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-header-row,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:1px solid var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-primary-color)}",Nv=()=>ms().withPart(Cs).withPart(vs).withPart(md).withPart(vd).withPart(Ii).withPart(Mi).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),yd=Nv(),zv=()=>ms().withPart(od).withPart(Cs).withPart(vs).withPart(ud).withPart(bd).withPart(Ii).withPart(Mi).withParams({accentColor:"#2196f3",selectedRowBackgroundColor:fe(.3),inputFocusBorder:{color:fe(.4)},focusShadow:{radius:2,spread:1.6,color:fe(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:U(.45),checkboxIndeterminateBackgroundColor:U(.45),checkboxIndeterminateBorderColor:U(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:j,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:j,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:j,iconButtonHoverColor:j,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:U(.45)}),Wv=zv(),_v=()=>ms().withPart(nd).withPart(Cs).withPart(vs).withPart(vv).withPart(Sd).withPart(Ii).withPart(fn).withParams({accentColor:"#0091ea",borderColor:K(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:q,checkboxUncheckedBorderColor:U(.5),checkboxCheckedBackgroundColor:q,checkboxCheckedBorderColor:j,checkboxCheckedShapeColor:j,checkboxIndeterminateBackgroundColor:q,checkboxIndeterminateBorderColor:U(.5),checkboxIndeterminateShapeColor:U(.5),focusShadow:{radius:2,spread:1,color:j},headerTextColor:K(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:q,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:U(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:K(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:Ae}),Uv=_v(),$v=()=>{const e={tabSelectedUnderlineColor:{ref:"primaryColor"},sideButtonSelectedUnderlineColor:{ref:"primaryColor"},buttonTextColor:{ref:"primaryColor"},rangeSelectionBackgroundColor:{ref:"primaryColor",mix:.2},rangeSelectionBorderColor:{ref:"primaryColor"},rangeSelectionHighlightColor:{ref:"primaryColor",mix:.5},rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08},rowNumbersSelectedColor:{ref:"primaryColor",mix:.5},inputFocusBorder:{width:2,color:{ref:"primaryColor"}},pickerButtonFocusBorder:{width:1,color:{ref:"primaryColor"}},cellEditingBorder:{color:{ref:"primaryColor"}},menuBackgroundColor:{ref:"backgroundColor"},sideButtonBarBackgroundColor:q,sideButtonSelectedBackgroundColor:"transparent",sideButtonBarTopPadding:{calc:"spacing * 4"},headerColumnResizeHandleColor:"none",headerBackgroundColor:{ref:"backgroundColor"},rowHoverColor:K(.08),columnHoverColor:K(.08),headerCellHoverBackgroundColor:K(.05),statusBarLabelColor:K(.63),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,valueChangeValueHighlightBackgroundColor:"#00acc1",panelTitleBarIconColor:Ae,advancedFilterBuilderButtonBarBorder:!1},t={...e,primaryColor:"#3f51b5",foregroundColor:"#000D",headerTextColor:"#0008",accentColor:"#ff4081",checkboxUncheckedBorderColor:Ae,checkboxIndeterminateBackgroundColor:Ae,toggleButtonOffBackgroundColor:Ae,selectedRowBackgroundColor:"rgba(33, 150, 243, 0.3)"},s={...e,primaryColor:"#3f51b5",foregroundColor:"#fffD",headerTextColor:"#fff8",accentColor:"#bb86fc",checkboxUncheckedBorderColor:U(.5),checkboxIndeterminateBackgroundColor:U(.5),toggleButtonOffBackgroundColor:U(.5),selectedRowBackgroundColor:"#bb86fc33"};return B({feature:"styleMaterial",css:Vv,params:t,modeParams:{light:t,dark:s,"dark-blue":s}})},Rd=$v(),Kv=()=>ms().withPart(sd).withPart(Cs).withPart(vs).withPart(hd).withPart(wd).withPart(Cd).withPart(fn).withPart(Rd).withParams({rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.75 * rowVerticalPaddingScale"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4.75 * headerVerticalPaddingScale"},widgetVerticalSpacing:{calc:"spacing * 1.75"},cellHorizontalPadding:{calc:"spacing * 3"},buttonHorizontalPadding:{ref:"spacing"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 2"},fontSize:13,iconSize:18,borderRadius:0,wrapperBorderRadius:0,wrapperBorder:!1,menuBorder:!1,dialogBorder:!1,panelTitleBarBorder:!1,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sidePanelBorder:!1,sideButtonSelectedBorder:!1,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,buttonBorder:!1,buttonDisabledBorder:!1,focusShadow:{spread:4,color:K(.16)},fontFamily:[{googleFont:"Roboto"},"-apple-system","BlinkMacSystemFont","Segoe UI","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],inputHeight:{calc:"max(iconSize, fontSize) + spacing * 3"},pickerButtonBorder:{width:1,color:"transparent"},headerFontWeight:600,checkboxBorderWidth:2,checkboxBorderRadius:2,toggleButtonWidth:34,toggleButtonSwitchInset:1,cardShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)"}),jv=Kv(),xd={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},Fd={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},Ed={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},Rn={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},qv=0,Yv=class extends b{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++qv}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:s}=e;this.eGridDiv=t,this.eStyleContainer=s.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=s.themeCssLayer}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(xd),this.getSizeEl(Fd),this.getSizeEl(Ed),this.getSizeEl(Rn),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>FC(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getDefaultRowHeight(){return this.getCSSVariablePixelValue(xd)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Fd)}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Ed)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Rn)}applyThemeClasses(e){const{gridTheme:t}=this;let s="";if(t)s=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let i=this.eGridDiv;for(;i;){let o=!1;for(const n of Array.from(i.classList))n.startsWith("ag-theme-")&&(o=!0,s=s?`${s} ${n}`:n);o&&this.mutationObserver.observe(i,{attributes:!0,attributeFilter:["class"]}),i=i.parentElement}}for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(s){const i=e.className;e.className=i+(i?" ":"")+s}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),s=this.gos.get("rowHeight");if(s==null||isNaN(s)||!isFinite(s))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const i=`${s}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),s):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?zt(e,this.eStyleContainer,t,this.cssLayer,0):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const s=this.measureSizeEl(e);return s==="detached"||s==="no-styles"?e.defaultValue:(this.lastKnownValues.set(e,s),s)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const s=t.offsetWidth;return s===xn?"no-styles":(this.sizesMeasured=!0,s)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=document.createElement("div"),e.className="ag-measurement-container",this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const s=this.getMeasurementContainer();t=document.createElement("div");const{border:i}=e;i?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${xn}px`)):t.style.width=`var(${e.cssName}, ${xn}px)`,s.appendChild(t),this.sizeEls.set(e,t);let o=this.measureSizeEl(e);o==="no-styles"&&R(9,{variable:e});const n=Le(this.beans,t,()=>{const r=this.measureSizeEl(e);r==="detached"||r==="no-styles"||(this.lastKnownValues.set(e,r),r!==o&&(o=r,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>n()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Rn);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:s,gridTheme:i}=this,o=e.get("theme");let n;if(o==="legacy")n=void 0;else{const r=o??yd;r instanceof wn?n=r:O(240,{theme:r})}if(n!==i){if(n){xC(this),Jl(this.eStyleContainer,this.cssLayer);for(const[a,l]of s)zt(a,this.eStyleContainer,l,this.cssLayer,0);s.length=0}this.gridTheme=n,n?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer});let r=this.eParamsStyle;r||(r=this.eParamsStyle=document.createElement("style"),t.appendChild(r)),hn||(r.textContent=n?._getPerGridCss(this.paramsClass)||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}n&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&O(o?106:239)}},xn=15538,Qv=class extends b{constructor(){super(...arguments),this.beanName="eventSvc",this.globalEventService=new We}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,s){this.globalEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.globalEventService.removeEventListener(e,t,s)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(k(this.gos,e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(k(this.gos,e))}};function Dd(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}function Fn(e,t){let s;if(W(e)&&Dd(e)&&e.isPadding()){const i=e;s=i.getLeafColumns()[0];let o=s;for(;o!==i;)t++,o=o.getParent()}return{column:s||e,headerRowIndex:t}}var Zv=class extends b{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,s=>{this.gridBodyCon=s.gridBodyCtrl});const t=_(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let s;const{colModel:i,colGroupSvc:o,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(s=i.getCol(e),s||(s=o?.getColumnGroup(e)??null)):s=e,!s)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=H(a||[]).type==="filter",d=Ve(this.beans)-1;let c=-1,u=s;for(;u;)c++,u=u.getParent();let h=c;return t&&l&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:s}}navigateVertically(e,t,s){const i=this.beans.focusSvc;if(t||(t=i.focusedHeader),!t)return!1;const{headerRowIndex:o}=t,n=t.column,r=Ve(this.beans),a=e==="UP",l=this.getHeaderRowType(o);let{headerRowIndex:d,column:c,headerRowIndexWithoutSpan:u}=a?Xv(l,n,o):Jv(l,n,o),h=!1;return d<0&&(d=0,c=n,h=!0),d>=r?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!h&&!c?!1:i.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:c},allowUserOverride:!0,event:s})}navigateHorizontally(e,t=!1,s){const{focusSvc:i,gos:o}=this.beans,n=i.focusedHeader;let r,a;if(this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==o.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a)),r||!t)return i.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:s});if(t){const l=o.getCallback("tabToNextHeader");if(l)return i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a})}return this.focusNextHeaderRow(n,a,s)}focusNextHeaderRow(e,t,s){const i=e.headerRowIndex;let o=null,n;const r=this.beans;if(t==="Before"?i>0&&(n=i-1,this.currentHeaderRowWithoutSpan-=1,o=this.findColAtEdgeForHeaderRow(n,"end")):(n=i+1,this.currentHeaderRowWithoutSpan<Ve(r)?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1,o=this.findColAtEdgeForHeaderRow(n,"start")),!o)return!1;const{column:a,headerRowIndex:l}=Fn(o.column,o?.headerRowIndex);return r.focusSvc.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:s})}scrollToColumn(e,t="After"){if(e.getPinned())return;let s;if(W(e)){const i=e.getDisplayedLeafColumns();s=t==="Before"?H(i):i[0]}else s=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(s)}findHeader(e,t){let s,i;const{colGroupSvc:o,visibleCols:n}=this.beans;if(W(e.column)?s=o?.getGroupAtDirection(e.column,t)??void 0:(i=`getCol${t}`,s=n[i](e.column)),!s)return;const{headerRowIndex:r}=e;if(this.getHeaderRowType(r)!=="filter"){const d=[s];for(;s.getParent();)s=s.getParent(),d.push(s);s=d[Math.max(0,d.length-1-r)]}const{column:a,headerRowIndex:l}=Fn(s,r);return{column:a,headerRowIndex:l}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const{visibleCols:s,ctrlsSvc:i,colGroupSvc:o}=this.beans,n=s.allCols,r=n[t==="start"?0:n.length-1];if(!r)return;const l=i.getHeaderRowContainerCtrl(r.getPinned())?.getRowType(e);if(l=="group"){const d=o?.getColGroupAtLevel(r,e);return{headerRowIndex:e,column:d}}return{headerRowIndex:l==null?-1:e,column:r}}};function Xv(e,t,s){const i=e==="filter",o=e==="column";let n=i?t:t.getParent(),r=s-1,a=r;if(o&&Dd(t.getParent())){for(;n&&n.isPadding();)n=n.getParent(),r--;a=r,r<0&&(n=t,r=s,a=void 0)}return{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:a}}function Jv(e,t,s,i="After"){let o=t,n=s+1;const r=n;if(e==="group"){const a=t.getDisplayedLeafColumns(),l=i==="After"?a[0]:H(a),d=[];let c=l;for(;c.getParent()!==t;)c=c.getParent(),d.push(c);if(o=l,l.isSpanHeaderHeight())for(let u=d.length-1;u>=0;u--){const h=d[u];if(!h.isPadding()){o=h;break}n++}else o=H(d),o||(o=l)}return{column:o,headerRowIndex:n,headerRowIndexWithoutSpan:r}}var ew=class extends b{constructor(){super(...arguments),this.beanName="focusSvc"}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc($g(this.beans))}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCell||this.isDomDataMissingInHierarchy(z(this.beans),as)?null:this.focusedCell}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||this.isDomDataMissingInHierarchy(z(this.beans),ll)?null:this.focusedHeader}isDomDataMissingInHierarchy(e,t){let s=e;for(;s;){if(qs(this.gos,s,t))return!1;s=s.parentNode}return!0}getFocusedCell(){return this.focusedCell}shouldRestoreFocus(e){return this.isCellRestoreFocused(e)?(setTimeout(()=>{this.restoredFocusedCell=null},0),!0):!1}clearRestoreFocus(){this.restoredFocusedCell=null,this.awaitRestoreFocusedCell=!1}restoreFocusedCell(e,t){this.awaitRestoreFocusedCell=!0,setTimeout(()=>{this.awaitRestoreFocusedCell&&(this.setRestoreFocusedCell(e),t())})}isCellRestoreFocused(e){return this.restoredFocusedCell==null?!1:"cellSpan"in e?e.doesSpanContain(this.restoredFocusedCell):hi(e,this.restoredFocusedCell)}setRestoreFocusedCell(e){this.beans.frameworkOverrides.renderingEngine==="react"&&(this.restoredFocusedCell=e)}getFocusEventParams(e){const{rowIndex:t,rowPinned:s,column:i}=e,o={rowIndex:t,rowPinned:s,column:i,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:s});return n&&(o.isFullWidthCell=n.isFullWidth()),o}clearFocusedCell(){if(this.restoredFocusedCell=null,this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){const{column:t,rowIndex:s,rowPinned:i,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:n=!1}=e,r=this.colModel.getCol(t);if(!r){this.focusedCell=null;return}this.focusedCell={rowIndex:s,rowPinned:Re(i),column:r},this.eventSvc.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCell),forceBrowserFocus:o,preventScrollOnBrowserFocus:n})}isCellFocused(e){return this.focusedCell==null?!1:hi(e,this.focusedCell)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:s,pinned:i}}=e,{column:o,headerRowIndex:n}=this.focusedHeader;return t===o&&s===n&&i==o.getPinned()}focusHeaderPosition(e){if(Ct(this.beans))return!1;const{direction:t,fromTab:s,allowUserOverride:i,event:o,fromCell:n,rowWithoutSpanValue:r}=e;let{headerPosition:a}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(i){const l=this.focusedHeader,d=Ve(this.beans);if(s){const c=this.gos.getCallback("tabToNextHeader");c&&(a=this.getHeaderPositionFromUserFunc({userFunc:c,direction:t,currentPosition:l,headerPosition:a,headerRowCount:d}))}else{const c=this.gos.getCallback("navigateToNextHeader");if(c&&o){const u={key:o.key,previousHeaderPosition:l,nextHeaderPosition:a,headerRowCount:d,event:o};a=c(u)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:o,fromCell:n,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(Ct(this.beans))return!1;const{userFunc:t,headerPosition:s,direction:i,event:o}=e,n=this.focusedHeader,r=Ve(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:n,headerPosition:s,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:o})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:s,currentPosition:i,headerPosition:o,headerRowCount:n}=e,a=t({backwards:s==="Before",previousHeaderPosition:i,nextHeaderPosition:o,headerRowCount:n});return a===!0?i:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:s,fromCell:i,rowWithoutSpanValue:o,event:n}=e,{column:r,headerRowIndex:a}=t,{filterManager:l,ctrlsSvc:d,headerNavigation:c}=this.beans;if(a===-1)return l?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:r,event:n});c?.scrollToColumn(r,s);const h=d.getHeaderRowContainerCtrl(r.getPinned())?.focusHeader(t.headerRowIndex,r,n)||!1;return c&&h&&(o!=null||i)&&(c.currentHeaderRowWithoutSpan=o??-1),h}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;const{colGroupSvc:t}=this.beans;t&&e.getParent()&&(e=t.getColGroupAtLevel(e,0));const s=Fn(e,0);return this.focusHeaderPosition({headerPosition:s,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=Ve(this.beans)-1,s=H(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:s},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===Re(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&qe(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:s=!0,event:i}=e;if(this.overlays?.isExclusive())return s&&this.focusOverlay(t);if(li(this.beans))return t&&!Ct(this.beans)?this.focusLastHeader():s&&this.focusOverlay(t)?!0:t?!1:vt(this.beans,t);const o=t?ap(this.beans):rp(this.beans);if(o){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=o,l=rs(this.beans,o);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){const d=this.gos.get("enableRtl");let c;return!i||i.key===w.TAB?c=d?w.LEFT:w.RIGHT:c=i.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(o)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(o,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:Re(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:n})),!0}return!!(s&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const s=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:Ve(this.beans)-1}}):this.focusGridView({column:s})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},tw=class extends b{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),s=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==s)&&(this.horizontalScrollGap=t,this.verticalScrollGap=s,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),s=typeof e=="number"&&e>=0?e:Iu();s!=null&&(this.scrollbarWidth=s,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},sw=class extends b{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:s}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),s.destroy(),super.destroy()}},Ss=new Set(["gridPreDestroyed","fillStart","pasteStart"]),iw={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"	",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1},ow=0,nw=0,rw=class extends b{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=nw++,this.propEventSvc=new We,this.globalEventHandlerFactory=e=>(t,s)=>{if(!this.isAlive())return;const i=Ss.has(t);if(i&&!e||!i&&e)return;const o=wo(t),n=this.gridOptions[o];typeof n=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{n(s)})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??iw[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return x(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(s=>e(this.addGridCommonParams(s)))}updateGridOptions({options:e,force:t,source:s="api"}){const i={id:ow++,properties:[]},o=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=e[a];r?.warnOnInitialPropertyUpdate(s,a);const d=t||typeof l=="object"&&s==="api",c=n[a];if(d||c!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:c,changeSet:i,source:s};o.push(u)}}r?.processGridOptions(this.gridOptions),i.properties=o.map(a=>a.type),o.forEach(a=>{Ue(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){const s=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return s||O(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),s}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Po(),rowModelType:this.get("rowModelType"),isUmd:Ig()}}isModuleRegistered(e){return Ca(e,this.gridId,this.get("rowModelType"))}};function aw(e){return`<div class="ag-cell-label-container" role="presentation">
        <span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
        <span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
        <div data-ref="eLabel" class="ag-header-cell-label" role="presentation">
            <span data-ref="eText" class="ag-header-cell-text"></span>
            <span data-ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
            ${e?'<ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>':""}
        </div>
    </div>`}var Pd=class extends L{constructor(){super(...arguments),this.eFilter=E,this.eFilterButton=E,this.eSortIndicator=E,this.eMenu=E,this.eLabel=E,this.eText=E,this.eSortOrder=E,this.eSortAsc=E,this.eSortDesc=E,this.eSortMixed=E,this.eSortNone=E,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;return this.params=e,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon?!1:(this.innerHeaderComponent?this.innerHeaderComponent.refresh?.(e):this.setDisplayName(e),!0)}workOutTemplate(){const{params:e,beans:t}=this,s=e.template??aw(!!t.sortSvc);return s?.trim?s.trim():s}init(e){this.params=e;const{sortSvc:t,touchSvc:s,rowNumbersSvc:i,userCompFactory:o}=this.beans;this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate,t?[t.getSortIndicatorSelector()]:void 0),s?.setupForHeader(this),this.setMenu(),this.setupSort(),i?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(o,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const s=hg(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,s=this.currentDisplayName;if(this.currentDisplayName=t,s===t||this.innerHeaderComponent||this.isLoadingInnerComponent)return;const i=Ee(t,!0);this.eText.textContent=i}addInIcon(e,t,s){if(t==null)return;const i=ge(e,this.beans,s);i&&t.appendChild(i)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){ve(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:s}=this,i=re(e);this.addInIcon(i?"menu":"menuAlt",t,s.column),t.classList.toggle("ag-header-menu-icon",!i);const o=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=o,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(o)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:s}=this;t||this.toggleMenuAlwaysShow(!0),s.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:s,beans:i,eMenu:o,eFilterButton:n}=this,r=t.column,a=re(s);if(e&&!a){if(i.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??o??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(o??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:s}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:o,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;i.attachCustomElements(o,n,r,a,l)}this.eSortIndicator.setupSort(s),this.currentSort&&e.setupHeader(this,s,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,this.onFilterChangedIcon.bind(this),"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,s,i){if(!e)return ve(t),!1;const o=this.params.column;return this.addInIcon(i,t,o),this.addManagedListeners(o,{filterChanged:s}),s(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();N(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:s}=this;return e?t??s??this.getGui():s??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},lw=class extends L{constructor(){super(`<div class="ag-header-group-cell-label" role="presentation">
            <span data-ref="agLabel" class="ag-header-group-text" role="presentation"></span>
            <span data-ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
            <span data-ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
        </div>`),this.agOpened=E,this.agClosed=E,this.agLabel=E,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons()}checkWarnings(){this.params.template&&R(89)}workOutInnerHeaderGroupComponent(e,t){const s=pg(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:s},beans:i}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const o=l=>{if(Fe(l))return;const d=!s.isExpanded();i.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(i,t,o),this.addTouchAndClickListeners(i,e,o);const n=l=>{gt(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();const r=s.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,s){e.touchSvc?.setupForHeaderGroup(this,t,s),this.addManagedElementListeners(t,{click:s})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:s}}=this;if(s.isExpandable()){const i=s.isExpanded();N(e,i),N(t,!i)}else N(e,!1),N(t,!1)}addInIcon(e,t){const s=ge(e,this.beans,null);s&&t.appendChild(s)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:s}=this;N(t,!1),N(s,!1);return}}setupLabel(e){const{displayName:t,columnGroup:s}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;if(x(t)&&!i){const o=Ee(t,!0);this.agLabel.textContent=o}this.addOrRemoveCssClass("ag-sticky-label",!s.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},dw={moduleName:"ColumnHeaderComp",version:F,userComponents:{agColumnHeader:Pd},icons:{menu:"menu",menuAlt:"menu-alt"}},cw={moduleName:"ColumnGroupHeaderComp",version:F,userComponents:{agColumnGroupHeader:lw},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},uw={moduleName:"AnimationFrame",version:F,beans:[Wg]},hw=class extends b{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!_e())return;const t=(s,i,o)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(o?.target??null);r?.column&&r.dispatchCellContextMenuEvent(o??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,o,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!_e()||Br("dblclick"))return!1;const i=new Date().getTime(),o=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,o})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:s}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:o,eFilterButton:n}=e,r=new Rt(e.getGui(),!0),a=e.shouldSuppressMenuHide(),l=a&&x(o),d=l?new Rt(o,!0):r;if(i.enableMenu){const c=l?"tap":"longTap",u=h=>i.showColumnMenuAfterMouseClick(h.touchStart);e.addManagedListeners(d,{[c]:u})}if(i.enableSorting){const c=u=>{const h=u.touchStart.target;a&&(o?.contains(h)||n?.contains(h))||s?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(r,{tap:c})}if(i.enableFilterButton&&n){const c=new Rt(n,!0);e.addManagedListeners(c,{tap:()=>i.showFilter(n)}),e.addDestroyFunc(()=>c.destroy())}e.addDestroyFunc(()=>r.destroy()),l&&e.addDestroyFunc(()=>d.destroy())}setupForHeaderGroup(e,t,s){const i=new Rt(t,!0);e.addManagedListeners(i,{tap:s}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,s){if(!_e())return;const i=new Rt(t),o=n=>{s(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(i,{longTap:o}),e.addDestroyFunc(()=>i.destroy())}},gw={moduleName:"Touch",version:F,beans:[hw]},pw=class extends b{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,s=!1){return s?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const s=e===w.UP,i=e===w.DOWN,o=e===w.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:d}=this.beans;if(s||i)r=s?a.getFirstRow():a.getLastRow(),n=t.column;else{const c=l.get("enableRtl");r=t.rowIndex,n=(o!==c?d.allCols:[...d.allCols].reverse()).find(h=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:h}))}return n?{rowIndex:r,rowPinned:null,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let s=t,i=!1;for(;!i;){switch(e){case w.UP:s=this.getCellAbove(s);break;case w.DOWN:s=this.getCellBelow(s);break;case w.RIGHT:s=this.gos.get("enableRtl")?this.getCellToLeft(s):this.getCellToRight(s);break;case w.LEFT:s=this.gos.get("enableRtl")?this.getCellToRight(s):this.getCellToLeft(s);break;default:s=null,R(8,{key:e});break}s?i=this.isCellGoodToFocusOn(s):i=!0}return s}isCellGoodToFocusOn(e){const t=e.column;let s;const{pinnedRowModel:i,rowModel:o}=this.beans;switch(e.rowPinned){case"top":s=i?.getPinnedTopRow(e.rowIndex);break;case"bottom":s=i?.getPinnedBottomRow(e.rowIndex);break;default:s=o.getRow(e.rowIndex);break}return s?!this.isSuppressNavigable(t,s):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){const t=e.rowIndex,s=e.rowPinned;let i=!1;const{pageBounds:o,pinnedRowModel:n,rowModel:r}=this.beans;if(this.isLastRowInContainer(e))switch(s){case"bottom":return null;case"top":return r.isRowsToRender()?{rowIndex:o.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}else s&&(i=!0);const a=r.getRow(e.rowIndex),l=i?void 0:this.getNextStickyPosition(a);return l||{rowIndex:t+1,rowPinned:s}}getNextStickyPosition(e,t){const{gos:s,rowRenderer:i}=this.beans;if(!mo(s)||!e||!e.sticky)return;const o=i.getStickyTopRowCtrls().some(d=>d.rowNode.rowIndex===e.rowIndex);let n=[];o?n=[...i.getStickyTopRowCtrls()].sort((d,c)=>d.rowNode.rowIndex-c.rowNode.rowIndex):n=[...i.getStickyBottomRowCtrls()].sort((d,c)=>c.rowNode.rowIndex-d.rowNode.rowIndex);const r=t?-1:1,a=n.findIndex(d=>d.rowNode.rowIndex===e.rowIndex),l=n[a+r];if(l)return{rowIndex:l.rowNode.rowIndex,rowPinned:null}}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,s=this.getRowBelow(t);return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}isLastRowInContainer(e){const t=e.rowPinned,s=e.rowIndex,{pinnedRowModel:i,pageBounds:o}=this.beans;return t==="top"?(i?.getPinnedTopRowCount()??-1)<=s:t==="bottom"?(i?.getPinnedBottomRowCount()??-1)<=s:o.getLastRow()<=s}getRowAbove(e){const t=e.rowIndex,s=e.rowPinned,{pageBounds:i,pinnedRowModel:o,rowModel:n}=this.beans,r=s?t===0:t===i.getFirstRow();let a=!1;const l=()=>({rowIndex:o?.getPinnedTopRowCount()??-1,rowPinned:"top"});if(r)return s==="top"?null:s&&n.isRowsToRender()?{rowIndex:i.getLastRow(),rowPinned:null}:o?.isRowsToRender("top")?l():null;s&&(a=!0);const d=n.getRow(e.rowIndex),c=a?void 0:this.getNextStickyPosition(d,!0);return c||{rowIndex:t-1,rowPinned:s}}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,s=this.getRowAbove({rowIndex:t.rowIndex,rowPinned:t.rowPinned});return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:s}=this.beans,i=t.allCols;let o=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=i[0];const a=this.getRowBelow(e);if(V(a)||!a.rowPinned&&!(s?.isRowInPage(a)??!0))return null;o=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:o,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{visibleCols:t,pagination:s}=this.beans,i=t.allCols;let o=e.rowIndex,n=e.rowPinned,r=t.getColBefore(e.column);if(!r){r=H(i);const a=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(V(a)||!a.rowPinned&&!(s?.isRowInPage(a)??!0))return null;o=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:o,column:r,rowPinned:n}}isSuppressNavigable(e,t){const{suppressNavigable:s}=e.colDef;if(typeof s=="boolean")return s;if(typeof s=="function"){const i=e.createColumnFunctionCallbackParams(t);return s(i)}return!1}};function fw(e){return e.focusSvc.getFocusedCell()}function mw(e){return e.focusSvc.clearFocusedCell()}function Cw(e,t,s,i){e.focusSvc.setFocusedCell({rowIndex:t,column:s,rowPinned:i,forceBrowserFocus:!0})}function vw(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function ww(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function bw(e,t,s=!1){const i=e.headerNavigation?.getHeaderPositionForColumn(t,s);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}var Sw=class extends b{constructor(){super(),this.beanName="navigation",this.onPageDown=Cr(this.onPageDown,100),this.onPageUp=Cr(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const s=e.key,i=e.altKey,o=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=Ea(this.gos,e);let a=!1;switch(s){case w.PAGE_HOME:case w.PAGE_END:!o&&!i&&(this.onHomeOrEndKey(s),a=!0);break;case w.LEFT:case w.RIGHT:case w.UP:case w.DOWN:if(!r)return!1;o&&!i&&!n&&(this.onCtrlUpDownLeftRight(s,r),a=!0);break;case w.PAGE_DOWN:case w.PAGE_UP:!o&&!i&&(a=this.handlePageUpDown(s,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,s){return s&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===w.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){const{scrollIndex:t,scrollType:s,scrollColumn:i,focusIndex:o,focusColumn:n}=e,{scrollFeature:r}=this.gridBodyCon;x(i)&&!i.isPinned()&&r.ensureColumnVisible(i),x(t)&&r.ensureIndexVisible(t,s),e.isAsync||r.ensureIndexVisible(o);const{focusSvc:a,rangeSvc:l}=this.beans;a.setFocusedCell({rowIndex:o,column:n,rowPinned:null,forceBrowserFocus:!0}),l?.setRangeToCell({rowIndex:o,rowPinned:null,column:n})}onPageDown(e){const t=this.beans,s=En(t),i=this.getViewportHeight(),{pageBounds:o,rowModel:n,rowAutoHeight:r}=t,a=o.getPixelOffset(),l=s.top+i,d=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,s=En(t),{pageBounds:i,rowModel:o,rowAutoHeight:n}=t,r=i.getPixelOffset(),a=s.top,l=o.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,s=!1){const{pageBounds:i,rowModel:o}=this.beans,n=this.getViewportHeight(),r=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),d=o.getRow(e.rowIndex),c=s?d?.rowHeight-n-l:n-l,u=d?.rowTop+c;let h=o.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const p=s?-1:1;t=h=e.rowIndex+p}let g;s?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(o.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,s=!1){this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,s);this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const s=t?-1:1,i=this.getViewportHeight(),{pageBounds:o,rowModel:n}=this.beans,r=o.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const d=n.getRow(l);if(d){const c=d.rowHeight??0;if(a+c>i)break;a+=c}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=En(e),s=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=s),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const s=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:i}=s,o=s.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:o,focusIndex:i,focusColumn:o})}onHomeOrEndKey(e){const t=e===w.PAGE_HOME,{visibleCols:s,pageBounds:i,rowModel:o}=this.beans,n=s.allCols,r=t?i.getFirstRow():i.getLastRow(),a=o.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const s=t.shiftKey,i=this.tabToNextCellCommon(e,s,t),o=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=o;if(i!==!1){i?t.preventDefault():i===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(s);return}if(s){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(l.get("headerHeight")===0||Ct(o)?vt(o,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof ns&&e.focusCell(!0),(!s&&a.focusOverlay(!1)||vt(o,s))&&t.preventDefault()}tabToNextCell(e,t){const s=this.beans,{focusSvc:i,rowRenderer:o}=s,n=i.getFocusedCell();if(!n)return!1;let r=wt(s,n);return!r&&(r=o.getRowByPosition(n),!r||!r.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t)}tabToNextCellCommon(e,t,s){let i=e.editing;if(!i&&e instanceof ns){const r=e.rowCtrl;r&&(i=r.editing)}let o;return i?this.gos.get("editType")==="fullRow"?o=this.moveToNextEditingRow(e,t,s):o=this.moveToNextEditingCell(e,t,s):o=this.moveToNextCellNotEditing(e,t),o===null?o:o||!!this.beans.focusSvc.focusedHeader}moveToNextEditingCell(e,t,s=null){const i=e.cellPosition;e.eGui.focus(),e.stopEditing();const o=this.findNextCellToFocusOn(i,t,!0);return o===!1?null:o==null?!1:(this.beans.editSvc?.startEditing(o,null,!0,s),o.focusCell(!1),!0)}moveToNextEditingRow(e,t,s=null){const i=e.cellPosition,o=this.findNextCellToFocusOn(i,t,!0);if(o===!1)return null;if(o==null)return!1;const n=o.cellPosition,r=this.isCellEditable(i),a=this.isCellEditable(n),l=n&&i.rowIndex===n.rowIndex&&i.rowPinned===n.rowPinned,{editSvc:d,rowEditSvc:c}=this.beans;if(r&&d?.setFocusOutOnEditor(e),!l){const u=e.rowCtrl;d?.stopRowEditing(u);const h=o.rowCtrl;c?.startEditing(h,void 0,void 0,s)}return a?(d?.setFocusInOnEditor(o),o.focusCell()):o.focusCell(!0),!0}moveToNextCellNotEditing(e,t){const s=this.beans.visibleCols.allCols;let i;e instanceof fi?i={...e.getRowPosition(),column:t?s[0]:H(s)}:i=e.getFocusedCellPosition();const o=this.findNextCellToFocusOn(i,t,!1);if(o===!1)return null;if(o instanceof ns)o.focusCell(!0);else if(o)return this.tryToFocusFullWidthRow(o.getRowPosition(),t);return x(o)}findNextCellToFocusOn(e,t,s){let i=e;const o=this.beans,{cellNavigation:n,gos:r,focusSvc:a,rowRenderer:l,rangeSvc:d}=o;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=n.getNextTabbedCell(i,t);const c=r.getCallback("tabToNextCell");if(x(c)){const p=c({backwards:t,editing:s,previousCellPosition:e,nextCellPosition:i||null});if(p===!0)i=e;else{if(p===!1)return!1;i={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const g=Ve(o);return a.focusHeaderPosition({headerPosition:{headerRowIndex:g+i.rowIndex,column:i.column},fromCell:!0}),null}const u=r.get("editType")==="fullRow";if(s&&!u&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const h=wt(o,i);if(!h){const g=l.getRowByPosition(i);if(!g||!g.isFullWidth()||s)continue;return g}if(!n.isSuppressNavigable(h.column,h.rowNode))return h.setFocusedCellPosition(i),d?.setRangeToCell(i),h}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:s,rowModel:i}=this.beans;return t==="top"?s?.getPinnedTopRow(e):t==="bottom"?s?.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,s,i){let o=s,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=r;for(;o&&(o===s||!this.isValidNavigateCell(o));)d.get("enableRtl")?t===w.LEFT&&(o=this.getLastCellOfColSpan(o)):t===w.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=a.getNextCellToFocus(t,o),n=V(o);if(n&&e&&e.key===w.UP&&(o={rowIndex:-1,rowPinned:null,column:s.column}),i){const u=d.getCallback("navigateToNextCell");if(x(u)){const g=u({key:t,previousCellPosition:s,nextCellPosition:o||null,event:e});x(g)?o={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:o=null}}if(!o)return;if(o.rowIndex<0){const u=Ve(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+o.rowIndex,column:s.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(o);c?this.focusPosition(c):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const s=wt(this.beans,e);return s?(e=s.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:s,rowRenderer:i,focusSvc:o,eventSvc:n}=this.beans,r=s.allCols,a=i.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;const l=o.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?H(r):r[0])};this.focusPosition(d);const c=t??(l!=null&&Aa(d,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:s}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),s?.setRangeToCell(e)}isValidNavigateCell(e){return!!rs(this.beans,e)}getLastCellOfColSpan(e){const t=wt(this.beans,e);if(!t)return e;const s=t.getColSpanningList();return s.length===1?e:{rowIndex:e.rowIndex,column:H(s),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=mo(this.gos),s=this.beans.rowModel.getRow(e.rowIndex),i=t&&s?.sticky,{scrollFeature:o}=this.gridBodyCon;!i&&V(e.rowPinned)&&o.ensureIndexVisible(e.rowIndex),e.column.isPinned()||o.ensureColumnVisible(e.column)}};function En(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var Md={moduleName:"KeyboardNavigation",version:F,beans:[Sw,pw,Zv],apiFunctions:{getFocusedCell:fw,clearFocusedCell:mw,setFocusedCell:Cw,setFocusedHeader:bw,tabToNextCell:vw,tabToPreviousCell:ww}},yw=class extends b{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:s}=this.beans;t?t.calculatePages():e.calculateBounds(0,s.getRowCount()-1)}},Rw=class extends b{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,s=e?.rowTop??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:s,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:s}=this.beans,i=s.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const o=s.getRowBounds(t);o&&(o.rowIndex=t),this.bottomRowBounds=o,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},xw=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",Fw=class extends b{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const s of this.elements)s&&(N(s,t),we(s,e))}},Ew=class extends b{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:s}=this.beans,i=Q(e,"print"),o=i?0:t.getColsLeftWidth(),n=i?0:t.getDisplayedColumnsRightWidth();o!=this.leftWidth&&(this.leftWidth=o,s.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,s.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=Mt(e);if(t<=50)return;const s=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:n}=s;let r=o;!r.length&&!n||(i&&(r=i({columns:r,viewportWidth:t})),!(!r||!r.length)&&(r=r.filter(a=>!Ot(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new Fw(e,t)}setColsPinned(e,t,s){const{colModel:i,colAnimation:o,visibleCols:n,gos:r}=this.beans;if(!i.cols||!e?.length)return;if(Q(r,"print")){R(37);return}o?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];e.forEach(d=>{if(!d)return;const c=i.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}),l.length&&(n.refresh(s),ia(this.eventSvc,l,s)),o?.finish()}initCol(e){const{pinned:t,initialPinned:s}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,s)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const s=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const o=()=>{const n=s?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&s||!l&&i)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:o,rightPinnedWidthChanged:o,scrollVisibilityChanged:o,scrollbarWidthChanged:o})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:o}=this,n=Mt(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+o+e>n)if(n>i+o)e=n-i-o;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,s=this.leftWidth??0,i=t+s;let o=!1;if(i<e)return{columns:[],hasLockedPinned:o};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,d=0;const c=0,u=[];let h=i-c-e;for(;(d<r.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){o=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<r.length&&h>0){const g=r[d++];if(g.colDef.lockPinned){o=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:o}}},Dw={moduleName:"PinnedColumn",version:F,beans:[Ew],css:[xw]},Pw=class extends b{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=Y(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=_(e),s=this.descriptionContainer=t.createElement("div");s.classList.add("ag-aria-description-container"),Kn(s,"polite"),xu(s,"additions text"),Ru(s,!0),e.eGridDiv.appendChild(s)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{if(this.isAlive()&&this.descriptionContainer){let t=e;this.lastAnnouncement===t&&(t=`${t}.`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}},50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Z(e),e.parentElement?.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},Mw={moduleName:"Aria",version:F,beans:[Pw]};function Aw(e){e.overlays?.showLoadingOverlay()}function Tw(e){e.overlays?.showNoRowsOverlay()}function kw(e){e.overlays?.hideOverlay()}var Iw=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",Ad=class extends L{constructor(){super(`
            <div class="ag-overlay" role="presentation">
                <div class="ag-overlay-panel" role="presentation">
                    <div class="ag-overlay-wrapper" data-ref="eOverlayWrapper" role="presentation"></div>
                </div>
            </div>`),this.eOverlayWrapper=E,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(Iw)}handleKeyDown(e){if(e.key!==w.TAB||e.defaultPrevented||Fe(e))return;const t=this.beans;if(Ye(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:H(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=vt(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const s=this.eOverlayWrapper.classList,{AUTO_HEIGHT:i,NORMAL:o,PRINT:n}=Se;s.toggle(i,t.autoHeight),s.toggle(o,t.normal),s.toggle(n,t.print)}postConstruct(){this.createManagedBean(new Oo(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,s,i){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),s&&this.isGridFocused()){const o=z(this.beans);o&&!fo(this.beans)&&(this.elToFocusAfter=o)}e.then(o=>{if(this.activePromise!==e){this.activeOverlay!==o&&(this.destroyBean(o),o=null);return}if(this.activePromise=null,!!o){if(this.activeOverlay!==o&&(this.eOverlayWrapper.appendChild(o.getGui()),this.activeOverlay=o,i)){const n=o;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:r})=>{n.refresh?.(k(this.gos,{...r??{}}))})}s&&this.isGridFocused()&&qe(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const s=this.updateListenerDestroyFunc;s&&(s(),this.updateListenerDestroyFunc=null),this.destroyBean(e),Z(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=z(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},Lw={selector:"AG-OVERLAY-WRAPPER",component:Ad},Ow=class extends b{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=J(this.gos),this.isServerSide=!this.isClientSide&&rt(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){R(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return Lw}getOverlayWrapperCompClass(){return Ad}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:s,beans:{gos:i,colModel:o,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!i.get("suppressLoadingOverlay")&&(r=!i.get("columnDefs")||!o.ready||!i.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!i.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!s&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(yg(this.beans.userCompFactory,k(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(Rg(this.beans.userCompFactory,k(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,s){const i=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(i,t,this.isExclusive(),s),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;this.state===2?t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},Gw={moduleName:"Overlay",version:F,userComponents:{agLoadingOverlay:Yp,agNoRowsOverlay:Qp},apiFunctions:{showLoadingOverlay:Aw,showNoRowsOverlay:Tw,hideOverlay:kw},beans:[Ow]},Hw=class extends b{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=ku(),Ue(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Ue(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),s=e/t;return this.maxScrollY*s}},Bw=400,Vw=class extends b{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(n=>n.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(n=>n.updateRangeBordersIfRangeCount())},s=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},i=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{xe(this.gos)?s():i()}),xe(this.gos)&&s()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",s=>this.onSuppressCellFocusChanged(s.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:s,previousValue:i})=>{(!i&&s||i&&!s)&&this.redrawRows()});const{stickyRowSvc:e,gos:t}=this.beans;if(e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const s=this.gridBodyCtrl;s.setStickyTopHeight(0),s.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=Q(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new Nw(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),s=this.cachedRowCtrls?.getEntries()??[];t.length>0||s.length>0?this.allRowCtrls=[...e,...t,...s]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>{this.onCellFocusChanged(e)},cellFocusCleared:()=>this.onCellFocusChanged(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(s=>t.onFlashCells(s,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const s=l=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&l(d)})},i=()=>{s(l=>l.onLeftChanged())},o=()=>{s(l=>l.onWidthChanged())},n=()=>{s(l=>l.onFirstRightPinnedChanged())},r=()=>{s(l=>l.onLastLeftPinnedChanged())},a=()=>{s(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",o),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",o),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){const e=Q(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),s=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,s&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];return this.getAllRowCtrls().forEach(s=>{const i=s.getCellCtrl(e,!0)?.eGui;i&&t.push(i)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}refreshFloatingRows(e,t){const{pinnedRowModel:s,beans:i,printLayout:o}=this,n=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));s?.forEachPinnedRow(t,(a,l)=>{const d=e[l];d&&s.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),a.id in n?(e[l]=n[a.id],delete n[a.id]):e[l]=new fi(a,i,!1,!1,o)});const r=(t==="top"?s?.getPinnedTopRowCount():s?.getPinnedBottomRowCount())??0;e.length=r}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=i=>{const o=i[e.rowIndex];o&&o.rowNode===e&&(o.destroyFirstPass(),o.destroySecondPass(),i[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e?.forEach(s=>this.redrawRow(s,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){const t=e?.suppressKeepFocus?null:this.focusSvc.getFocusCellToUseAfterRefresh();if(t==null)return null;const s=z(this.beans),i=qs(this.gos,s,di),o=qs(this.gos,s,as);return i||o?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);const s=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&ct(this.gos),o=s?this.getRowsToRecycle():null;s||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n}=this;if(n){n.checkStickyRows();const r=n.extraTopHeight+n.extraBottomHeight;r&&this.updateContainerHeights(r)}this.recycleRows(o,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,s=this.gos.get("suppressScrollOnNewData");t&&!s&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let s=this.pageBounds.getCurrentPageHeight();s===0&&(s=1),t.setModelHeight(s+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Oe(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&this.focusSvc.restoreFocusedCell(e,()=>{this.onCellFocusChanged(k(this.gos,{rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))})}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),s=t.length;for(let i=0;i<s;i++){const o=t[i].getAllCellCtrls(),n=o.length;for(let r=0;r<n;r++)e.push(o[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),s=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...s,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,s){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,s)}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const s of this.getCellCtrls(e.rowNodes,e.columns))s.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=null;this.stickyRowFeature&&(t=this.getCellToRestoreFocusToAfterRefresh()||null);for(const s of this.getRowCtrls(e)){if(!s.isFullWidth())continue;s.refreshFullWidth()||this.redrawRow(s.rowNode,!0)}this.dispatchDisplayedRowsChanged(!1),t&&this.restoreFocusedCell(t)}getRowCtrls(e){const t=Dn(e),s=this.getAllRowCtrls();return!e||!t?s:s.filter(i=>{const o=i.rowNode;return Pn(o,t)})}getCellCtrls(e,t){let s;x(t)&&(s={},t.forEach(o=>{const n=this.colModel.getCol(o);x(n)&&(s[n.getId()]=!0)}));const i=[];return this.getRowCtrls(e).forEach(o=>{o.getAllCellCtrls().forEach(n=>{const r=n.column.getId();s&&!s[r]||i.push(n)})}),i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const s of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[s].rowNode.id==null&&e.push(s);this.removeRowCtrls(e);const t={};for(const s of Object.values(this.rowCtrlsByRowIndex)){const i=s.rowNode;t[i.id]=s}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(s=>{const i=this.rowCtrlsByRowIndex[s];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[s]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{afterScroll:t}=e;let s;const i=this.stickyRowFeature;i&&(s=this.getCellToRestoreFocusToAfterRefresh()||void 0);const o=this.firstRenderedRow,n=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let r=!1;if(i){r=i.checkStickyRows();const l=i.extraTopHeight+i.extraBottomHeight;l&&this.updateContainerHeights(l)}const a=this.firstRenderedRow!==o||this.lastRenderedRow!==n;if(!(t&&!r&&!a)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,t),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(t&&!r),s!=null)){const l=this.getCellToRestoreFocusToAfterRefresh();s!=null&&l==null&&(this.beans.animationFrameSvc?.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const s={};e.forEach(n=>s[n]=!0);const o=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!s[n]);this.removeRowCtrls(o,t)}calculateIndexesToDraw(e){const t=[];for(let o=this.firstRenderedRow;o<=this.lastRenderedRow;o++)t.push(o);const s=o=>{const n=o.rowNode.rowIndex;n!=null&&(n<this.firstRenderedRow||n>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(o)&&t.push(n)};for(const o of Object.values(this.rowCtrlsByRowIndex))s(o);if(e)for(const o of Object.values(e))s(o);t.sort((o,n)=>o-n);const i=[];for(let o=0;o<t.length;o++){const n=t[o],r=this.rowModel.getRow(n);r&&!r.sticky&&i.push(n)}return i}recycleRows(e,t=!1,s=!1){const i=this.calculateIndexesToDraw(e);(this.printLayout||s)&&(t=!1),this.removeRowCompsNotToDraw(i,!t);const o=[];if(i.forEach(n=>{const r=this.createOrUpdateRowCtrl(n,e,t,s);x(r)&&o.push(r)}),e){const{animationFrameSvc:n}=this.beans;n&&s&&!this.gos.get("suppressAnimationFrame")&&!this.printLayout?n.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),s=e.isPinningRight();(this.pinningLeft!==t||s!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=s,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const s=t.rowNode.rowIndex;e.push(s.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Dn(e);return this.getAllRowCtrls().filter(s=>{if(!s.isFullWidth())return!1;const i=s.rowNode;return!(t!=null&&!Pn(i,t))})}createOrUpdateRowCtrl(e,t,s,i){let o,n=this.rowCtrlsByRowIndex[e];if(n||(o=this.rowModel.getRow(e),x(o)&&x(t)&&t[o.id]&&o.alreadyRendered&&(n=t[o.id],t[o.id]=null)),!n)if(o||(o=this.rowModel.getRow(e)),x(o))n=this.createRowCon(o,s,i);else return;return o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n,n}destroyRowCtrls(e,t){const s=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const o=i.instanceId;this.zombieRowCtrls[o]=i,s.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[o]})}else i.destroySecondPass()}}t&&(s.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>s.forEach(i=>i()),Bw))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Ke(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:s}=this;e.updateOffset();let i,o;if(!s.isRowsToRender())i=0,o=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),o=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,p,f;do{const y=t.getPixelOffset(),{pageFirstPixel:D,pageLastPixel:M}=t.getCurrentPagePixelRange(),A=e.divStretchOffset,T=u.getVScrollPosition(),P=T.top,G=T.bottom;h?(p=D+A,f=M+A):(p=Math.max(P+y-c,D)+A,f=Math.min(G+y+c,M)+A),this.firstVisibleVPixel=Math.max(P+y,D)+A,this.lastVisibleVPixel=Math.min(G+y,M)+A,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=s.getRowIndexAtPixel(p),C=s.getRowIndexAtPixel(f);const v=t.getFirstRow(),S=t.getLastRow();m<v&&(m=v),C>S&&(C=S),i=m,o=C}const n=Q(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&o-i>a&&(o=i+a);const l=i!==this.firstRenderedRow,d=o!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=i,this.lastRenderedRow=o,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:o}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,Pe(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const s=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:o,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,o.getFirstRow(),o.getLastRow());return(r||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||r||s?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const i=e.rowNode,o=this.focusSvc.isRowNodeFocused(i),n=e.editing,r=i.detail;return o||n||r?!!this.isRowPresent(i):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowPresent(e)??!0:!1}createRowCon(e,t,s){const i=this.cachedRowCtrls?.getRow(e)??null;if(i)return i;const o=this.gos.get("suppressAnimationFrame"),n=s&&!o&&!this.printLayout&&!!this.beans.animationFrameSvc;return new fi(e,this.beans,t,n,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),s=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...s]}getRowByPosition(e){let t;const{rowIndex:s}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[s];break;case"bottom":t=this.bottomRowCtrls[s];break;default:t=this.rowCtrlsByRowIndex[s],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===s)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===s)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},Nw=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,s=this.entriesMap[t];delete this.entriesMap[t],ue(this.entriesList,s)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],ue(this.entriesList,e)}getEntries(){return this.entriesList}};function Dn(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(s=>{const i=s.id;switch(s.rowPinned){case"top":t.top[i]=s;break;case"bottom":t.bottom[i]=s;break;default:t.normal[i]=s;break}}),t}function Pn(e,t){const s=e.id;switch(e.rowPinned){case"top":return t.top[s]!=null;case"bottom":return t.bottom[s]!=null;default:return t.normal[s]!=null}}var zw=class extends b{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=be(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=be(e))}doFullSort(e,t){const s=e.map((i,o)=>({currentPos:o,rowNode:i}));return s.sort(this.compareRowNodes.bind(this,t)),s.map(i=>i.rowNode)}compareRowNodes(e,t,s){const i=t.rowNode,o=s.rowNode;for(let n=0,r=e.length;n<r;n++){const a=e[n],l=a.sort==="desc",d=this.getValue(i,a.column),c=this.getValue(o,a.column);let u;const h=this.getComparator(a,i);if(h?u=h(d,c,i,o,l):u=gr(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-s.currentPos}getComparator(e,t){const s=e.column,i=s.getColDef().comparator;if(i!=null)return i;if(!s.getColDef().showRowGroup)return;const o=!t.group&&s.getColDef().field;if(!o)return;const n=this.beans.colModel.getColDefCol(o);if(n)return n.getColDef().comparator}getValue(e,t){const{valueSvc:s,colModel:i,showRowGroupCols:o,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return s.getValue(t,e,!1);if(e.rowGroupColumn===t){if(Zs(n,i.isPivotActive())){const d=e.allLeafChildren?.[0];return d?s.getValue(t,d,!1):void 0}const l=o?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return s.getValue(t,e,!1)}};function Ww(e){e.sortSvc?.onSortChanged("api")}function ys(e,t){return`<span data-ref="eSort${e}" class="ag-sort-indicator-icon ag-sort-${t} ag-hidden" aria-hidden="true"></span>`}var _w=`<span class="ag-sort-indicator-container">
        ${ys("Order","order")}
        ${ys("Asc","ascending-icon")}
        ${ys("Desc","descending-icon")}
        ${ys("Mixed","mixed-icon")}
        ${ys("None","none-icon")}
    </span>`,Mn=class extends L{constructor(e){super(),this.eSortOrder=E,this.eSortAsc=E,this.eSortDesc=E,this.eSortMixed=E,this.eSortNone=E,e||this.setTemplate(_w)}attachCustomElements(e,t,s,i,o){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=s,this.eSortMixed=i,this.eSortNone=o}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const s=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",s),this.addManagedEventListeners({newColumnsLoaded:s,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,s){if(t==null)return;const i=ge(e,this.beans,s);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:s,column:i,gos:o,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(i);if(e&&N(e,r==="asc",{skipAriaHidden:!0}),t&&N(t,r==="desc",{skipAriaHidden:!0}),s){const a=!i.getColDef().unSortIcon&&!o.get("unSortIcon"),l=r==null;N(s,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:s}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;be(s)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:s}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(s)==="mixed";N(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:s}}=this;if(!e)return;const i=s.getColumnsWithSortingOrdered(),o=s.getDisplaySortIndexForColumn(t)??-1,n=i.some(a=>s.getDisplaySortIndexForColumn(a)??-1>=1),r=o>=0&&n;N(e,r,{skipAriaHidden:!0}),o>=0?e.textContent=(o+1).toString():Z(e)}},Uw={selector:"AG-SORT-INDICATOR",component:Mn},Rs=["asc","desc",null],$w=class extends b{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,s){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,s)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,s,i){t!=="asc"&&t!=="desc"&&(t=null);const{gos:o,showRowGroupCols:n}=this.beans,r=be(o);let a=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}a.forEach(c=>this.setColSort(c,t,i));const l=(s||o.get("alwaysMultiSort"))&&!o.get("suppressMultiSort"),d=[];if(!l){const c=this.clearSortBarTheseColumns(a,i);d.push(...c)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(i,d)}updateSortIndex(e){const{gos:t,colModel:s,showRowGroupCols:i}=this.beans,o=be(t),n=i?.getShowRowGroupCol(e.getId()),r=o&&n||e,a=this.getColumnsWithSortingOrdered();s.getAllCols().forEach(c=>this.setColSortIndex(c,null));const l=a.filter(c=>o&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...l,r]:l).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){const t=this.beans.colModel.getAllCols().filter(s=>!!s.getSort());return t&&t.length>0}dispatchSortChangedEvents(e,t){const s={type:"sortChanged",source:e};t&&(s.columns=t),this.eventSvc.dispatchEvent(s)}clearSortBarTheseColumns(e,t){const s=[];return this.beans.colModel.getAllCols().forEach(i=>{e.includes(i)||(i.getSort()&&s.push(i),this.setColSort(i,void 0,t))}),s}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??Rs,s=t.indexOf(e.getSort()),i=s<0,o=s==t.length-1;return i||o?t[0]:t[s+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:s,rowGroupColsSvc:i}=this.beans;let o=t.getAllCols().filter(d=>!!d.getSort());if(t.isPivotMode()){const d=be(e);o=o.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?s?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}const n=i?.columns.filter(d=>!!d.getSort())??[],r={};o.forEach((d,c)=>r[d.getId()]=c),o.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[d.getId()],p=r[c.getId()];return g>p?1:-1}else return h==null?-1:1});const a=be(e)&&!!n.length;a&&(o=[...new Set(o.map(d=>s?.getShowRowGroupCol(d.getId())??d))]);const l=new Map;return o.forEach((d,c)=>l.set(d,c)),a&&n.forEach(d=>{const c=s.getShowRowGroupCol(d.getId());l.set(d,l.get(c))}),l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[s,i])=>t-i).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=be(this.gos),s=!!e.getColDef().showRowGroup;return t&&s}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,o=i[0].getSort();return i.every(r=>r.getSort()==o)?o:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,s){let i=0;e.addManagedListeners(t,{movingChanged:()=>{i=new Date().getTime()}}),s&&e.addManagedElementListeners(s,{click:n=>{const r=t.isMoving(),l=new Date().getTime()-i<50;r||l||this.progressSortFromEvent(t,n)}});const o=()=>{const n=t.getSort();if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",n==="asc"),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",n==="desc"),e.addOrRemoveCssClass("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:o,columnRowGroupChanged:o})}initCol(e){const{sort:t,initialSort:s,sortIndex:i,initialSortIndex:o}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(s==="asc"||s==="desc")&&(e.sort=s),i!==void 0?i!==null&&(e.sortIndex=i):o!==null&&(e.sortIndex=o)}updateColSort(e,t,s){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,s):this.setColSort(e,void 0,s))}setColSort(e,t,s){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",s)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Mn(e)}getSortIndicatorSelector(){return Uw}},An={moduleName:"Sort",version:F,beans:[$w,zw],apiFunctions:{onSortChanged:Ww},userComponents:{agSortIndicator:Mn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},Kw=class extends b{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:s}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),s.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Ue(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,pt(e.source))}}};function jw(e){e.valueCache?.expire()}function qw(e,t){const{colKey:s,rowNode:i,useFormatter:o}=t,n=e.colModel.getColDefCol(s)??e.colModel.getCol(s);if(V(n))return null;const r=e.valueSvc.getValueForDisplay(n,i);return o?e.valueSvc.formatValue(n,i,r)??Ee(r,!0):r}var xs=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:s,children:i}=e;if(i)for(let o=0;o<i.length;++o)this.depthFirstSearchChangedPath(i[o],t);t(s)}depthFirstSearchEverything(e,t,s){const i=e.childrenAfterGroup;if(i)for(let o=0,n=i.length;o<n;++o){const r=i[o];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,s):s&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,s=!1){this.active&&!s?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,s=0;for(;!this.mapToItems[t.id];){const i={rowNode:t,children:null};this.mapToItems[t.id]=i,s++,t=t.parent}return s}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let s=e;for(;s;)this.nodeIdsToColumns[s.id]||(this.nodeIdsToColumns[s.id]={}),t.forEach(i=>this.nodeIdsToColumns[s.id][i.getId()]=!0),s=s.parent}linkPathItems(e,t){let s=e;for(let i=0;i<t;i++){const o=this.mapToItems[s.id],n=this.mapToItems[s.parent.id];n.children||(n.children=[]),n.children.push(o),s=s.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const s=this.createPathItems(e);this.linkPathItems(e,s),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const s=this.nodeIdsToColumns[e.id];return t.filter(o=>s[o.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const s=this.nodeIdsToColumns[e.id];return t.filter(o=>!s[o.getId()])}},Yw="paste",Qw=class extends b{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;J(e,t)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:s}=this.beans;if(e.source===Yw||t.get("suppressChangeDetection"))return;const i=e.node,o=[i],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!i.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new xs(a,r);l.addParentNode(i.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{o.push(d)})}s.refreshCells({rowNodes:o})}},Zw=class extends b{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);O(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(s){return O(16,{expression:e,params:t,e:s}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const s=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",s);return t[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},Xw=class extends b{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,s){if(this.active){const i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=s}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},Td={moduleName:"ValueCache",version:F,beans:[Xw],apiFunctions:{expireValueCache:jw}},Jw={moduleName:"Expression",version:F,beans:[Zw]},e0={moduleName:"ChangeDetection",version:F,beans:[Qw]},kd={moduleName:"CellApi",version:F,apiFunctions:{getCellValue:qw}},t0=class extends b{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=rt(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t){const s=t.leafGroup&&this.colModel.isPivotMode(),i=t.group&&t.expanded&&!t.footer&&!s,o=this.gos.get("groupSuppressBlankHeader");if(!i||o)return this.getValue(e,t);let n=!1;const r=this.gos.get("groupTotalRow");typeof r!="function"?n=!!r:n=!!this.gos.getCallback("groupTotalRow")({node:this});const a=i&&n;return this.getValue(e,t,a)}getValue(e,t,s=!1){if(this.initialised||this.init(),!t)return;const i=e.getColDef(),o=i.field,n=e.getColId(),r=t.data;let a;const l=t.groupData&&t.groupData[n]!==void 0,d=!s&&t.aggData&&t.aggData[n]!==void 0,c=this.isSsrm&&s&&!!e.getColDef().aggFunc,u=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(this.isTreeData&&d?a=t.aggData[n]:this.isTreeData&&i.valueGetter?a=this.executeValueGetter(i.valueGetter,r,e,t):this.isTreeData&&o&&r?a=Jt(r,o,e.isFieldContainsDots()):l?a=t.groupData[n]:d?a=t.aggData[n]:i.valueGetter?a=this.executeValueGetter(i.valueGetter,r,e,t):u?a=Jt(r,t.field,e.isFieldContainsDots()):o&&r&&!c&&(a=Jt(r,o,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const h=a.substring(1);a=this.executeValueGetter(h,r,e,t)}if(a==null){const h=this.getOpenedGroup(t,e);if(h!=null)return h}return a}parseValue(e,t,s,i){const o=e.getColDef(),n=o.valueParser;if(x(n)){const r=k(this.gos,{node:t,data:t?.data,oldValue:i,newValue:s,colDef:o,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return s}getDeleteValue(e,t){return x(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,s,i,o=!0){let n=null,r;const a=e.getColDef();if(i?r=i:o&&(r=a.valueFormatter),r){const l=k(this.gos,{value:s,node:t,data:t?t.data:null,colDef:a,column:e});typeof r=="function"?n=r(l):n=this.expressionSvc?this.expressionSvc.evaluate(r,l):null}else if(a.refData)return a.refData[s]||"";return n==null&&Array.isArray(s)&&(n=s.join(", ")),n}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup")||!t.getColDef().showRowGroup)return;const i=t.getColDef().showRowGroup;let o=e.parent;for(;o!=null;){if(o.rowGroupColumn&&(i===!0||i===o.rowGroupColumn.getColId()))return o.key;o=o.parent}}setValue(e,t,s,i){const o=this.colModel.getColDefCol(t);if(!e||!o)return!1;V(e.data)&&(e.data={});const{field:n,valueSetter:r}=o.getColDef();if(V(n)&&V(r))return R(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(o,s))return R(135),!1;const a=k(this.gos,{node:e,data:e.data,oldValue:this.getValue(o,e),newValue:s,colDef:o.getColDef(),column:o});a.newValue=s;let l;if(x(r)?typeof r=="function"?l=r(a):l=this.expressionSvc?.evaluate(r,a):l=this.setValueUsingField(e.data,n,s,o.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const d=this.getValue(o,e);return this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,colDef:a.colDef,data:e.data,node:e,oldValue:a.oldValue,newValue:d,value:d,source:i}),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,s,i){if(!t)return!1;let o=!1;if(!i)o=e[t]===s,o||(e[t]=s);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();n.length===0?(o=r[a]===s,o||(r[a]=s)):r=r[a]}}return!o}executeValueGetterWithValueCache(e,t,s,i){const o=s.getColId(),n=this.valueCache.getValue(i,o);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,s,i);return this.valueCache.setValue(i,o,r),r}executeValueGetterWithoutValueCache(e,t,s,i){const o=k(this.gos,{data:t,node:i,column:s,colDef:s.getColDef(),getValue:this.getValueCallback.bind(this,i)});let n;return typeof e=="function"?n=e(o):n=this.expressionSvc?.evaluate(e,o),n}getValueCallback(e,t){const s=this.colModel.getColDefCol(t);return s?this.getValue(s,e):null}getKeyForNode(e,t){const s=this.getValue(e,t),i=e.getColDef().keyCreator;let o=s;if(i){const n=k(this.gos,{value:s,colDef:e.getColDef(),column:e,node:t,data:t.data});o=i(n)}return typeof o=="string"||o==null||(o=String(o),o==="[object Object]"&&R(121)),o}},s0={moduleName:"CommunityCore",version:F,beans:[sw,Gf,bC,_h,Hw,Hm,Qv,rw,Hh,Rw,yw,Vw,t0,ew,Yv,tw,yC,Kw,fC,mC],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:Hf,destroy:Bf,isDestroyed:Vf,getGridOption:Nf,setGridOption:zf,updateGridOptions:Hl},dependsOn:[hC,Kl,ym,An,dw,ql,cw,Gw,e0,uw,Md,Dw,Mw,gw,wC,gC,Jw]},Tn=class Et{static applyGlobalGridOptions(t){if(!Et.gridOptions)return{...t};let s={};return ie(s,Et.gridOptions,!0,!0),Et.mergeStrategy==="deep"?ie(s,t,!0,!0):s={...s,...t},Et.gridOptions.context&&(s.context=Et.gridOptions.context),t.context&&(Et.mergeStrategy==="deep"&&s.context&&ie(t.context,s.context,!0,!0),s.context=t.context),s}};Tn.gridOptions=void 0,Tn.mergeStrategy="shallow";var Li=Tn;function i0(e,t="shallow"){Li.gridOptions=e,Li.mergeStrategy=t}function o0(e){return Li.gridOptions?.[e]}function n0(e,t,s){if(!t)return O(11),{};const i=s;let o;if(!i?.setThemeOnGridDiv){const r=document.createElement("div");r.style.height="100%",e.appendChild(r),e=r,o=()=>e.remove()}return new Id().create(e,t,r=>{const a=new Lf(e);r.createBean(a)},void 0,s,o)}var r0=1,Id=class{create(e,t,s,i,o,n){const r=Li.applyGlobalGridOptions(t),a=r.gridId??String(r0++),l=r.rowModelType??"clientSide",d=this.getRegisteredModules(o,a,l),c=this.createBeansList(l,d,a),u=this.createProvidedBeans(e,r,o);if(!c)return;const h={providedBeanInstances:u,beanClasses:c,gridId:a,beanInitComparator:wf,beanDestroyComparator:bf,derivedBeans:[Cf],destroyCallback:n},g=new Hg(h);return this.registerModuleFeatures(g,d),s(g),g.getBean("syncSvc").start(),i&&i(g),g.getBean("gridApi")}getRegisteredModules(e,t,s){return os(s0,void 0),e?.modules?.forEach(i=>os(i,t)),Ag(t,s)}registerModuleFeatures(e,t){const s=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(o=>{s.registerModule(o);const n=o.apiFunctions;n&&Object.keys(n).forEach(a=>{i?.addFunction(a,n[a])})})}createProvidedBeans(e,t,s){let i=s?s.frameworkOverrides:null;V(i)&&(i=new kl);const o={gridOptions:t,eGridDiv:e,globalListener:s?s.globalListener:null,globalSyncListener:s?s.globalSyncListener:null,frameworkOverrides:i};return s&&s.providedBeanInstances&&Object.assign(o,s.providedBeanInstances),o}createBeansList(e,t,s){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"}[e];if(!o){ho(201,{rowModelType:e},`Unknown rowModelType ${e}.`);return}if(!Ca(o,s,e)){ho(200,{reasonOrId:`rowModelType = '${e}'`,moduleName:o,gridScoped:Po(),gridId:s,rowModelType:e},`Missing module ${o}Module for rowModelType ${e}. 
If upgrading from before v33, see ${nt}/upgrading-to-ag-grid-33/#changes-to-modules/`);return}const n=new Set;return t.forEach(r=>r.beans?.forEach(a=>n.add(a))),Array.from(n)}};function ye(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Oi(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function kn(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Ld=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],a0=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged","beforeRefreshModel"],Od=[...Ld,...a0],Gd=class extends b{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");if(t)return(i,o,n)=>t({key:i,defaultValue:o,variableValues:n});const s=e.get("localeText");return(i,o,n)=>{let r=s&&s[i];if(r&&n&&n.length){let a=0;for(;!(a>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[a++])}return r??o}}},l0=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow","themeCssLayer"],d0=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","selectionColumnDef"],c0=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Hd=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],u0=["theme","rowSelection"],Bd=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild"],Vd=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],h0=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter"],Nd=[...c0,...d0,...l0,...Hd,...h0,...Vd,...Bd,...u0],g0=class{wrap(e,t,s,i){const o=this.createWrapper(e,i);return t?.forEach(n=>{this.createMethod(o,n,!0)}),s?.forEach(n=>{this.createMethod(o,n,!1)}),o}createMethod(e,t,s){e.addMethod(t,this.createMethodProxy(e,t,s))}createMethodProxy(e,t,s){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(s&&R(49,{methodName:t}),null)}}},p0=class extends yt{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().textContent=Ee(t,!0)}};function In(e){const{inputValue:t,allSuggestions:s,hideIrrelevant:i,filterByPercentageOfBestMatch:o,addSequentialWeight:n}=e;let r=s.map((d,c)=>({value:d,relevance:m0(t.toLowerCase(),d.toLocaleLowerCase(),n),idx:c}));if(r.sort((d,c)=>c.relevance-d.relevance),i&&(r=r.filter(d=>d.relevance!==0)),r.length>0&&o&&o>0){const c=r[0].relevance*o;r=r.filter(u=>c-u.relevance<0)}const a=[],l=[];for(const d of r)a.push(d.value),l.push(d.idx);return{values:a,indices:l}}function f0(e){const t=[],s=e.length;for(let i=1;i<=s;i++)for(let o=0;o<=s-i;o++){const n=o+i-1;t.push(e.slice(o,n+1))}return t}function m0(e,t,s=!1){const i=e.replace(/\s/g,""),o=t.replace(/\s/g,""),n=i.length,r=o.length,a=new Array(n+1).fill(null).map(()=>new Array(r+1).fill(0));for(let u=0;u<=n;u+=1)a[u][0]=u;for(let u=0;u<=r;u+=1)a[0][u]=u;for(let u=1;u<=n;u++)for(let h=1;h<=r;h++)i[u-1]===o[h-1]?a[u][h]=a[u-1][h-1]:a[u][h]=1+Math.min(a[u][h-1],Math.min(a[u-1][h],a[u-1][h-1]));const l=a[n][r];let c=Math.max(n,r)-l;if(s){const u=f0(i);for(let h=0;h<u.length;h++){const g=u[h];o.indexOf(g)!==-1&&(c+=1,c*=g.length)}}return c}function zd(e,t){if(typeof e!="number")return"";const s=t(),i=s("thousandSeparator",","),o=s("decimalSeparator",".");return e.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var Wd=class extends b{getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},_d=class{constructor(e){this.groupColumns=[];const{colModel:t,rowGroupColsSvc:s,colNames:i,valueSvc:o,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d}=e;this.colModel=t,this.rowGroupColsSvc=s,this.colNames=i,this.valueSvc=o,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=d}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,s,i,o){const r=(!this.gos.get("groupHideOpenParents")||o.footer)&&this.shouldRenderGroupSummaryCell(o,e,t)?this.createValueForGroupNode(e,o):this.valueSvc.getValue(e,o);return this.processCell({accumulatedRowIndex:s,rowNode:o,column:e,value:r,processCellCallback:this.processCellCallback,type:i})}shouldRenderGroupSummaryCell(e,t,s){if(!(e.group&&!this.gos.get("treeData")))return!1;if(this.groupColumns.indexOf(t)!==-1){if(e.groupData?.[t.getId()]!==void 0||rt(this.gos)&&e.group)return!0;if(e.footer&&e.level===-1){const r=t.getColDef();return r==null||r.showRowGroup===!0||r.showRowGroup===this.rowGroupColsSvc?.columns[0].getId()}}const n=Zs(this.gos,this.colModel.isPivotMode());return s===0&&n}getHeaderName(e,t){return e?e(k(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(k(this.gos,{column:e,node:t}));const s=this.gos.get("treeData"),i=a=>{if(s)return a.key;const l=a.groupData?.[e.getId()];return!l||!a.rowGroupColumn||a.rowGroupColumn.getColDef().useValueFormatterForExport===!1?l:this.valueSvc.formatValue(a.rowGroupColumn,a,l)??l},o=t.footer,n=[i(t)];if(!Mr(this.gos))for(;t.parent;)t=t.parent,n.push(i(t));const r=n.reverse().join(" -> ");return o?`Total ${r}`:r}processCell(e){const{accumulatedRowIndex:t,rowNode:s,column:i,value:o,processCellCallback:n,type:r}=e;return n?{value:n(k(this.gos,{accumulatedRowIndex:t,column:i,node:s,value:o,type:r,parseValue:a=>this.valueSvc.parseValue(i,s,a,this.valueSvc.getValue(i,s)),formatValue:a=>this.valueSvc.formatValue(i,s,a)??a}))??""}:i.getColDef().useValueFormatterForExport!==!1?{value:o??"",valueFormatted:this.valueSvc.formatValue(i,s,o)}:{value:o??""}}};function Ud(e,t){const s=document.defaultView||window;if(!s){R(52);return}const i=document.createElement("a"),o=s.URL.createObjectURL(t);i.setAttribute("href",o),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:s})),document.body.removeChild(i),s.setTimeout(()=>{s.URL.revokeObjectURL(o)},0)}var C0={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0},ae="clientSide",ne="serverSide",_t="infinite",v0={onGroupExpandedOrCollapsed:[ae],refreshClientSideRowModel:[ae],isRowDataEmpty:[ae],forEachLeafNode:[ae],forEachNodeAfterFilter:[ae],forEachNodeAfterFilterAndSort:[ae],resetRowHeights:[ae],applyTransaction:[ae],applyTransactionAsync:[ae],flushAsyncTransactions:[ae],getBestCostNodeSelection:[ae],getServerSideSelectionState:[ne],setServerSideSelectionState:[ne],applyServerSideTransaction:[ne],applyServerSideTransactionAsync:[ne],applyServerSideRowData:[ne],retryServerSideLoads:[ne],flushServerSideAsyncTransactions:[ne],refreshServerSide:[ne],getServerSideGroupLevelState:[ne],refreshInfiniteCache:[_t],purgeInfiniteCache:[_t],getInfiniteRowCount:[_t],isLastRowIndexKnown:[_t,ne],expandAll:[ae,ne],collapseAll:[ae,ne],onRowHeightChanged:[ae,ne],setRowCount:[_t,ne],getCacheBlockState:[_t,ne]},w0={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function b0(e,t,s){const i=w0[e];if(i){const{version:n,new:r,old:a,message:l}=i,d=a??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return ot(`Since ${n} api.${d} is deprecated. ${u}${l??""}`),t.apply(t,c)}}const o=v0[e];return o?(...n)=>{const r=s.rowModel.getType();if(!o.includes(r)){kt(`api.${e} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`);return}return t.apply(t,n)}:t}var $d={AdvancedFilter:1,AllEnterprise:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},Ln=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],S0={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:Ln,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Ln,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...Ln,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},y0={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function R0(e,t){const s=[];return(Array.isArray(e)?e:[e]).forEach(i=>{const o=S0[i];o?o.forEach(n=>{const r=y0[n];(!r||r===t)&&s.push(n)}):s.push(i)}),s}var Ut={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar"},x0=e=>{const t=e.map(i=>`import { ${Fs(i)} } from '${$d[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; 
${t.join(` 
`)} 

ModuleRegistry.registerModules([ ${e.map(i=>Fs(i,!0)).join(", ")} ]); 

For more info see: ${nt}/modules/`};function Fs(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function F0(e,t){const s=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let i="";return!globalThis?.agCharts&&s.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
`:t.some(n=>$d[n])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
`),i}var Kd=({reasonOrId:e,moduleName:t,gridScoped:s,gridId:i,rowModelType:o,additionalText:n,isUmd:r})=>{const a=R0(t,o),l=typeof e=="string"?e:M0[e];if(r)return F0(l,a);const d=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),c=d.length>0?`${d.map(h=>Fs(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>Fs(h)).join(", "):Fs(a[0])} is not registered${s?" for gridId: "+i:""}. ${c} Check if you have registered the module:
`}
${x0(a)}`+(n?` 

${n}`:"")},jd=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.

import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
import { ModuleRegistry } from 'ag-grid-community';
import { ${e} } from 'ag-grid-enterprise';
    
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
    `,E0=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,D0={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:s})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",s],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
                     "alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
 Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
 To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
${E0(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:({methodName:e})=>`AnimationFrameService.${e} called but animation frames are off`,93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:s,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${s?"":" the default"} paginationPageSizeSelector=[${i?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",100:({rowModelType:e})=>`selectAll only available when rowModelType='clientSide', ie not ${e}`,101:({propertyName:e,componentName:t,agGridDefaults:s,jsComps:i})=>{const o=[],n=[...Object.keys(s??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(i??[])],r=In({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return o.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
`),r.length>0&&o.push(`         Did you mean: [${r.slice(0,3)}]?
`),o.push("If using a custom component check it has been registered correctly."),o},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${nt}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({aggFuncOrString:e})=>`unrecognised aggregation function ${e}`,110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
 Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:s})=>["duplicate group keys for row data, keys should be unique",e,t,...s??[]],187:({rowId:e,firstData:t,secondData:s})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",s],188:()=>"getRowId callback must be provided for Server Side Row Model selection to work correctly.",189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Kd,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${nt}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. 
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows. 
Your code probably called a grid API method while the grid was in the render stage. 
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). 
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>jd("IntegratedChartsModule"),258:()=>jd("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:s,gridId:i,rowModelType:o})=>Kd({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ut[t],gridId:i,gridScoped:s,rowModelType:o}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${nt}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection"};function P0(e,t){const s=D0[e];if(!s)return[`Missing error text for error id ${e}!`];const i=s(t),n=`
See ${xr(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var M0={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},A0=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."}}),T0=()=>({aggFunc:{module:"SharedAggregation"},autoHeight:{supportedRowModels:["clientSide","serverSide"],module:"RowAutoHeight"},cellClass:{module:"CellStyle"},cellClassRules:{module:"CellStyle"},cellEditor:({cellEditor:e,editable:t})=>{if(!t)return null;if(typeof e=="string"){const s=Ut[e];if(s)return{module:s}}return{module:"CustomEditor"}},cellRenderer:({cellRenderer:e})=>{if(typeof e!="string")return null;const t=Ut[e];return t?{module:t}:null},cellRendererParams:{validate:e=>(e.rowGroup!=null||e.rowGroupIndex!=null||e.cellRenderer==="agGroupCellRenderer")&&"checkbox"in e.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},cellStyle:{module:"CellStyle"},children:()=>qd(),columnChooserParams:{module:"ColumnMenu"},contextMenuItems:{module:"ContextMenu"},dndSource:{module:"DragAndDrop"},dndSourceOnRowDrag:{module:"DragAndDrop"},editable:({editable:e,cellEditor:t})=>e&&!t?{module:"TextEditor"}:null,enableCellChangeFlash:{module:"HighlightChanges"},enablePivot:{module:"SharedPivot"},enableRowGroup:{module:"SharedRowGrouping"},enableValue:{module:"SharedAggregation"},filter:({filter:e})=>{if(e&&typeof e!="string"&&typeof e!="boolean")return{module:"CustomFilter"};if(typeof e=="string"){const t=Ut[e];if(t)return{module:t}}return{module:"ColumnFilter"}},floatingFilter:{module:"ColumnFilter"},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerTooltip:{module:"Tooltip"},headerValueGetter:{validate:e=>{const t=e.headerValueGetter;return typeof t=="function"||typeof t=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return Oe(262);if(e.smallLeft)return Oe(263);if(e.smallRight)return Oe(264)}return null}},mainMenuItems:{module:"ColumnMenu"},menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(s=>t.includes(s))?{module:"ColumnMenu"}:null},pivot:{module:"SharedPivot"},pivotIndex:{module:"SharedPivot"},rowDrag:{module:"RowDrag"},rowGroup:{module:"SharedRowGrouping"},rowGroupIndex:{module:"SharedRowGrouping"},sortingOrder:{validate:e=>{const t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){const s=t.filter(i=>!Rs.includes(i));if(s.length>0)return`sortingOrder must be an array with elements from [${Rs.map(js).join()}], currently it includes [${s.map(js).join()}]`}else if(!Array.isArray(t)||t.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${t}`;return null}},tooltipField:{module:"Tooltip"},tooltipValueGetter:{module:"Tooltip"},type:{validate:e=>{const t=e.type;return t instanceof Array?t.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof t=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(e,{suppressRowTransform:t})=>t?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{module:"CellSpan",dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[!1,void 0]},rowSpan:{required:[!1,void 0]}},validate:(e,{rowSelection:t,cellSelection:s,suppressRowTransform:i,enableCellSpan:o,pagination:n,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof t=="object"&&t?.mode==="singleRow"&&t?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":s?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":o?n?"colDef.spanRows is not supported with pagination.":r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."}}),k0={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0},I0=()=>Object.keys(k0),qd=()=>({objectName:"colDef",allProperties:I0(),docsUrl:"column-properties/",deprecations:A0(),validations:T0()}),L0=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."}});function Te(e,t,s,i=Number.MAX_VALUE){return typeof t=="number"||t==null?t==null||t>=s&&t<=i?null:i===Number.MAX_VALUE?`${e}: value should be greater than or equal to ${s}`:`${e}: value should be between ${s} and ${i}`:`${e}: value should be a number`}var O0=()=>{const e={alignedGrids:{module:"AlignedGrids"},allowContextMenuWithControlKey:{module:"ContextMenu"},autoSizePadding:{validate({autoSizePadding:s}){return Te("autoSizePadding",s,0)}},autoSizeStrategy:{module:"ColumnAutoSize"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:s}){return Te("cacheBlockSize",s,1)}},cacheOverflowSize:{validate({cacheOverflowSize:s}){return Te("cacheOverflowSize",s,1)}},cellSelection:{module:"CellSelection"},columnHoverHighlight:{module:"ColumnHover"},datasource:{supportedRowModels:["infinite"],module:"InfiniteRowModel"},doesExternalFilterPass:{module:"ExternalFilter"},domLayout:{validate:s=>{const i=s.domLayout,o=["autoHeight","normal","print"];return i&&!o.includes(i)?`domLayout must be one of [${o.join()}], currently it's ${i}`:null}},editType:{module:"EditCore"},enableAdvancedFilter:{module:"AdvancedFilter"},enableCharts:{module:"IntegratedCharts"},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{module:"CellSelection",dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},rowNumbers:{module:"RowNumbers"},getContextMenuItems:{module:"ContextMenu"},getLocaleText:{module:"Locale"},getMainMenuItems:{module:"ColumnMenu"},getRowClass:{module:"RowStyle"},getRowStyle:{module:"RowStyle"},grandTotalRow:{module:"SharedRowGrouping"},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},icons:{validate:({icons:s})=>{if(s){if(s.smallDown)return Oe(262);if(s.smallLeft)return Oe(263);if(s.smallRight)return Oe(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:s}){return Te("infiniteInitialRowCount",s,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},initialState:{module:"GridState"},isExternalFilterPresent:{module:"ExternalFilter"},keepDetailRowsCount:{validate({keepDetailRowsCount:s}){return Te("keepDetailRowsCount",s,1)}},localeText:{module:"Locale"},masterDetail:{module:"SharedMasterDetail"},pagination:{module:"Pagination"},paginationPageSize:{validate({paginationPageSize:s}){return Te("paginationPageSize",s,1)}},paginationPageSizeSelector:{validate:s=>{const i=s.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array.
                    If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pinnedTopRowData:{module:"PinnedRow"},pinnedBottomRowData:{module:"PinnedRow"},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}},module:"SharedPivot"},pivotPanelShow:{module:"RowGroupingPanel"},quickFilterText:{supportedRowModels:["clientSide"],module:"QuickFilter"},rowBuffer:{validate({rowBuffer:s}){return Te("rowBuffer",s,0)}},rowClass:{validate:s=>typeof s.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null,module:"RowStyle"},rowClassRules:{module:"RowStyle"},rowData:{supportedRowModels:["clientSide"],module:"ClientSideRowModel"},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{treeData:{required:[!1,void 0]},pagination:{required:[!1,void 0]}},module:"RowDrag"},rowGroupPanelShow:{module:"RowGroupingPanel"},rowSelection:{validate({rowSelection:s}){return s&&typeof s=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':s&&typeof s!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":s&&s.mode!=="multiRow"&&s.mode!=="singleRow"?`Selection mode "${s.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},module:"SharedRowSelection"},rowStyle:{validate:s=>{const i=s.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null},module:"RowStyle"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"ServerSideRowModel"},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:s}){return Te("serverSideInitialRowCount",s,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sideBar:{module:"SideBar"},sortingOrder:{validate:s=>{const i=s.sortingOrder;if(Array.isArray(i)&&i.length>0){const o=i.filter(n=>!Rs.includes(n));if(o.length>0)return`sortingOrder must be an array with elements from [${Rs.map(js).join()}], currently it includes [${o.map(js).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},statusBar:{module:"StatusBar"},tooltipHideDelay:{validate:s=>s.tooltipHideDelay&&s.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:s=>s.tooltipShowDelay&&s.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],module:"SharedTreeData",validate:s=>{const i=s.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:o,getDataPath:n}=s;return!o&&!n?"treeData requires either 'treeDataChildrenField' or 'getDataPath' in the clientSide row model.":o&&n?"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.":null}case"serverSide":{const o=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return s.isServerSideGroup&&s.getServerSideGroupKey?null:o}}return null}},treeDataChildrenField:{module:"SharedTreeData"},undoRedoCellEditing:{module:"UndoRedoEdit"},valueCache:{module:"ValueCache"},viewportDatasource:{supportedRowModels:["viewport"],module:"ViewportRowModel"},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:s}){return Te("viewportRowModelBufferSize",s,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:s}){return Te("viewportRowModelPageSize",s,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},enableCellSpan:{module:"CellSpan"}},t={};return Vd.forEach(s=>{t[s]={expectedType:"boolean"}}),Hd.forEach(s=>{t[s]={expectedType:"number"}}),ie(t,e),t},G0=()=>({objectName:"gridOptions",allProperties:[...Nd,...Od.map(e=>wo(e))],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:L0(),validations:O0()}),H0={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1},B0={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore"},V0=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),N0={pinSubMenu:"PinnedColumn",pinLeft:"PinnedColumn",pinRight:"PinnedColumn",clearPinned:"PinnedColumn",valueAggSubMenu:"SharedAggregation",autoSizeThis:"ColumnAutoSize",autoSizeAll:"ColumnAutoSize",rowGroup:"SharedRowGrouping",rowUnGroup:"SharedRowGrouping",resetColumns:"CommunityCore",expandAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],contractAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],copy:"Clipboard",copyWithHeaders:"Clipboard",copyWithGroupHeaders:"Clipboard",cut:"Clipboard",paste:"Clipboard",export:["CsvExport","ExcelExport"],csvExport:"CsvExport",excelExport:"ExcelExport",separator:"CommunityCore",pivotChart:"IntegratedCharts",chartRange:"IntegratedCharts",columnFilter:"ColumnFilter",columnChooser:"ColumnMenu",sortAscending:"Sort",sortDescending:"Sort",sortUnSort:"Sort"},z0=class extends b{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,$u(this)}postConstruct(){this.processGridOptions(this.gridOptions)}warnOnInitialPropertyUpdate(e,t){e==="api"&&C0[t]&&R(22,{key:t})}processGridOptions(e){this.processOptions(e,G0())}validateApiFunction(e,t){return b0(e,t,this.beans)}missingUserComponent(e,t,s,i){const o=Ut[t];o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):R(101,{propertyName:e,componentName:t,agGridDefaults:s,jsComps:i})}checkRowEvents(e){_0.has(e)&&R(10,{eventType:e})}validateIcon(e){if(V0.has(e)&&R(43,{iconName:e}),H0[e])return;const t=B0[e];if(t){O(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Po(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}R(134,{iconName:e})}validateMenuItem(e){const t=N0[e];t&&this.gos.assertModuleRegistered(t,`menu item '${e}'`)}isProvidedUserComp(e){return!!Ut[e]}validateColDef(e,t,s){(s||!this.beans.dataTypeSvc?.isColPendingInference(t))&&this.processOptions(e,qd())}processOptions(e,t){const{validations:s,deprecations:i,allProperties:o,propertyExceptions:n,objectName:r,docsUrl:a}=t;o&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],o,r,a);const l=new Set,d=u=>{const h=s[u];if(h)if(typeof h=="function"){const g=h(e,this.gridOptions,this.beans);if(!g)return;if("objectName"in g){const p=e[u];if(Array.isArray(p)){p.forEach(f=>{this.processOptions(f,g)});return}this.processOptions(e[u],g);return}return g}else return h;else return};Object.keys(e).forEach(u=>{const h=i[u];if(h){const{message:y,version:D}=h;l.add(`As of v${D}, ${String(u)} is deprecated. ${y??""}`)}const g=e[u];if(g==null||g===!1)return;const p=d(u);if(!p)return;const{module:f,dependencies:m,validate:C,supportedRowModels:v,expectedType:S}=p;if(S){const y=typeof g;if(y!==S){l.add(`${String(u)} should be of type '${S}' but received '${y}' (${g}).`);return}}if(v){const y=this.gridOptions.rowModelType??"clientSide";if(!v.includes(y)){l.add(`${String(u)} is not supported with the '${y}' row model. It is only valid with: ${v.join(", ")}.`);return}}if(f){const y=Array.isArray(f)?f:[f];let D=!0;if(y.forEach(M=>{this.gos.assertModuleRegistered(M,String(u))||(D=!1)}),!D)return}if(m){const y=this.checkForRequiredDependencies(u,m,e);if(y){l.add(y);return}}if(C){const y=C(e,this.gridOptions,this.beans);if(y){l.add(y);return}}}),l.size>0&&l.forEach(u=>{ot(u)})}checkForRequiredDependencies(e,t,s){const o=Object.entries(t).filter(([n,r])=>{const a=s[n];return!r.required.includes(a)});return o.length===0?null:o.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
           `)}checkProperties(e,t,s,i,o){const n=["__ob__","__v_skip","__metadata__"],r=W0(Object.getOwnPropertyNames(e),[...n,...t,...s],s),a=Object.keys(r);for(const l of a){const d=r[l];let c=`invalid ${i} property '${l}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;s.includes("context")&&(c+=`
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),ot(c)}if(a.length>0&&o){const l=this.beans.frameworkOverrides.getDocLink(o);ot(`to see all the valid ${i} properties please check: ${l}`)}}getConsoleMessage(e,t){return P0(e,t)}};function W0(e,t,s){const i={},o=e.filter(n=>!t.some(r=>r===n));return o.length>0&&o.forEach(n=>i[n]=In({inputValue:n,allSuggestions:s}).values),i}var _0=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),Yd={moduleName:"Validation",version:F,beans:[z0]};function Qd(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}var U0=class extends b{constructor(){super(...arguments),this.beanName="filterStage",this.refreshProps=new Set(["excludeChildrenWhenTreeDataFiltering"]),this.step="filter"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const s=(i,o)=>{i.hasChildren()&&e&&!o?i.childrenAfterFilter=i.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):i.childrenAfterFilter=i.childrenAfterGroup,Qd(i)};if(this.doingTreeDataFiltering()){const i=(n,r)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){const l=n.childrenAfterGroup[a],d=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?i(n.childrenAfterGroup[a],d):s(l,d)}s(n,r)},o=n=>i(n,!1);t.executeFromRootNode(o)}else{const i=o=>s(o,!1);t.forEachChangedNodeDepthFirst(i,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},$0=class extends Qo{constructor(){super(...arguments),this.iconCreated=!1}setComp(e,t,s,i,o){this.comp=e;const n=is(this,this.beans.context,o);this.eButtonShowMainFilter=s,this.eFloatingFilterBody=i,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n),n.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(n)}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return k(t.gos,{colDef:s,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,s=!!e.floatingFilter;this.active=t&&s}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=ge("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new St(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Kt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(z(t)===this.eGui)return;const o=Ye(t,this.eGui,null,e.shiftKey);if(o){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let s=this.column;do if(s=e?t.getColBefore(s):t.getColAfter(s),!s)break;while(!s.getColDef().filter||!s.getColDef().floatingFilter);return s}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case w.UP:case w.DOWN:t||e.preventDefault();case w.LEFT:case w.RIGHT:if(t)return;e.stopPropagation();case w.ENTER:t&&qe(this.eGui)&&e.preventDefault();break;case w.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const s=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&st(e.relatedTarget,"ag-floating-filter");if(s&&i&&e.target===this.eGui){const o=this.lastFocusEvent,n=!!(o&&o.key===w.TAB);if(o&&n){const r=o.shiftKey;qe(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new Yo(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!re(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{filterManager:t}=this.beans,s=i=>{if(i?.source==="filterDestroyed"&&!this.isAlive())return;const o=this.comp.getFloatingFilterComp();o&&o.then(n=>{if(n){const r=t?.getCurrentFloatingFilterParentModel(this.column),a=i?{...i,columns:i.columns??[],source:i.source==="api"?"api":"columnFilter"}:null;n.onParentModelChanged(r,a)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:s}),t?.isFilterActive(this.column)&&s(null)}setupWidth(e){const t=()=>{const s=`${this.column.getActualWidth()}px`;this.comp.setWidth(s)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const s=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,o=this.comp.getFloatingFilterComp();!o||!i?this.updateCompDetails(e,i,s):o.then(n=>{!n||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,s):this.updateFloatingFilterParams(i)})}updateCompDetails(e,t,s){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),s&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){if(!e)return;const t=e.params;this.comp.getFloatingFilterComp()?.then(s=>{s?.refresh&&typeof s.refresh=="function"&&s.refresh(t)})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function K0(e,t){const s=e.colModel.getCol(t);if(!s){O(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:s,positionBy:"auto"})}function j0(e){e.menuSvc?.hidePopupMenu()}var Zd={moduleName:"SharedMenu",version:F,beans:[qp],apiFunctions:{showColumnMenu:K0,hidePopupMenu:j0}},q0=0,Y0=200,Q0=class extends b{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:s,column:i,node:o,event:n}=e,r=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,s);let l=!1;const d=()=>{const c=this.keepXYWithinBounds(s,r.top-a.top,0),u=s.clientWidth>0?s.clientWidth:200;l||(s.style.minWidth=`${u}px`,l=!0);const g=a.right-a.left-u;let p;return this.gos.get("enableRtl")?(p=m(),p<0&&(p=f(),this.setAlignedStyles(s,"left")),p>g&&(p=0,this.setAlignedStyles(s,"right"))):(p=f(),p>g&&(p=m(),this.setAlignedStyles(s,"right")),p<0&&(p=0,this.setAlignedStyles(s,"left"))),{x:p,y:c};function f(){return r.right-a.left-2}function m(){return r.left-a.left-u}};this.positionPopup({ePopup:s,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",s,t,n instanceof MouseEvent?n:void 0,i,o)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:s,nudgeY:i,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:s,nudgeY:i,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:s,nudgeY:i,keepWithinBounds:o,eventSource:n,alignSide:r="left",position:a="over",column:l,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return a==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:s,nudgeY:i,keepWithinBounds:o,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,l,d)})}shouldRenderUnderOrAbove(e,t,s,i){const o=s.bottom-t.bottom,n=t.top-s.top,r=e.offsetHeight+i;return o>r?"under":n>r||n>o?"above":"under"}setAlignedStyles(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const i=this.popupList[s],{alignedToElement:o}=i;!o||(["right","left","over","above","under"].forEach(r=>{o.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(o.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const s=this.getPopupIndex(t);if(s!==-1){const i=this.popupList[s];i.alignedToElement=e}}callPostProcessPopup(e,t,s,i,o,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:o,rowNode:n,ePopup:t,type:e,eventSource:s,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:s,nudgeX:i,nudgeY:o,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(c+=i),o&&(u+=o),s&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const d=Le(this.beans,t,()=>l(!0));setTimeout(()=>d(),Y0)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=_(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),lr(t)}keepXYWithinBounds(e,t,s){const i=s===0,o=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=_(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),p=c===l.body,f=Math.ceil(u[r]);let C=p?(i?oo:jt)(d)+d[a]:c[o];p&&(C-=Math.abs(g[n]-h[n]));const v=C-f;return Math.min(Math.max(t,0),Math.abs(v))}addPopup(e){const t=_(this.beans),{eChild:s,ariaLabel:i,alwaysOnTop:o,positionCallback:n,anchorToElement:r}=e;if(!t)return R(122),{hideFunc:()=>{}};const a=this.getPopupIndex(s);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(s);const l=this.createPopupWrapper(s,i,!!o),d=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(s,l,d,r),{hideFunc:d}}initialisePopupPosition(e){const s=this.getPopupParent().getBoundingClientRect();x(e.style.top)||(e.style.top=`${s.top*-1}px`),x(e.style.left)||(e.style.left=`${s.left*-1}px`)}createPopupWrapper(e,t,s){const i=this.getPopupParent(),o=document.createElement("div"),{environment:n,gos:r}=this.beans;return n.applyThemeClasses(o),o.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||X(e,"dialog"),Kt(e,t),o.appendChild(e),i.appendChild(o),s?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),o}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const s of this.popupList)t.applyThemeClasses(s.wrapper)}}addEventListenersToPopup(e){const t=this.beans,s=_(t),i=this.getPopupParent(),{wrapperEl:o,eChild:n,closedCallback:r,afterGuiAttached:a,closeOnEsc:l,modal:d}=e;let c=!1;const u=f=>{if(!o.contains(z(t)))return;f.key===w.ESCAPE&&!Fe(f)&&p({keyboardEvent:f})},h=f=>p({mouseEvent:f}),g=f=>p({touchEvent:f}),p=(f={})=>{const{mouseEvent:m,touchEvent:C,keyboardEvent:v,forceHide:S}=f;!S&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:C},n)||c)||(c=!0,i.removeChild(o),s.removeEventListener("keydown",u),s.removeEventListener("mousedown",h),s.removeEventListener("touchstart",g),s.removeEventListener("contextmenu",h),this.eventSvc.removeEventListener("dragStarted",h),r&&r(m||C||v),this.removePopupFromPopupList(n))};return a&&a({hidePopup:p}),window.setTimeout(()=>{l&&s.addEventListener("keydown",u),d&&(s.addEventListener("mousedown",h),this.eventSvc.addEventListener("dragStarted",h),s.addEventListener("touchstart",g),s.addEventListener("contextmenu",h))},0),p}addPopupToPopupList(e,t,s,i){this.popupList.push({element:e,wrapper:t,hideFunc:s,instanceId:q0++,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const i=this.popupList[s];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(n=>n&&n()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=o,i.isAnchored=!0,o}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),s=t.getBoundingClientRect(),{element:i,ePopup:o}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=s[u]-n[u],p=r(o.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},l=a("top",0),d=a("left",1),c=this.beans.frameworkOverrides;return new te(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(m,C)=>{const v=r(o.style[C]);m.last!==v&&(m.initial=v,m.last=v);const S=h[C]-g[C];if(S!=m.lastDiff){const y=this.keepXYWithinBounds(o,m.initial+m.initialDiff-S,m.direction);o.style[C]=`${y}px`,m.last=y}m.lastDiff=S};f(l,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:s,touchEvent:i}=e,o=s||i;if(!o)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const a=this.popupList[r];if(Nr(a.element,o))return!0}return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(e){const t=_(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const s=this.getWrapper(e);s&&(s.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(s))}bringPopupToFront(e){const t=this.getPopupParent(),s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=s.length,o=this.getWrapper(e);if(!o||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of s)h!==o&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const a=[],l=r.length,u=o.classList.contains("ag-always-on-top")||!l?[...n,...r,o]:[...n,o,...r];for(let h=0;h<=i;h++){const g=u[h];if(s[h]===u[h]||g===o)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&a.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},Es={moduleName:"Popup",version:F,beans:[Q0]},Z0=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-set-floating-filter-input [disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function X0(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function J0(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function eb(e,t){const s=e.colModel.getColDefCol(t);if(s)return e.filterManager?.destroyFilter(s,"api")}function tb(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function sb(e){return e.filterManager?.getFilterModel()??{}}function ib(e,t){return e.filterManager?.getColumnFilterModel(t)??null}function ob(e,t,s){return e.filterManager?.setColumnFilterModel(t,s)??Promise.resolve()}function nb(e,t){const s=e.colModel.getCol(t);if(!s){O(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:s,containerType:"columnFilter",positionBy:"auto"})}var Xd={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Jd=["january","february","march","april","may","june","july","august","september","october","november","december"];function rb(e,t){return e==null?-1:t==null?1:parseFloat(e)-parseFloat(t)}var ab=class extends b{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),beforeRefreshModel:({params:e})=>{(e.rowDataUpdated||e.changedProps?.has("treeData"))&&this.onNewRowsLoaded("rowDataUpdated")},dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...this.gos.get("initialState")?.filter?.filterModel??{}}}setFilterModel(e,t="api"){const{colModel:s,dataTypeSvc:i,filterManager:o}=this.beans;if(i?.isPendingInference){this.filterModelUpdateQueue.push({model:e,source:t});return}const n=[],r=this.getFilterModel(!0);if(e){const a=new Set(Object.keys(e));this.allColumnFilters.forEach((l,d)=>{const c=e[d];n.push(Gi(l.filterPromise,c)),a.delete(d)}),a.forEach(l=>{const d=s.getColDefCol(l)||s.getCol(l);if(!d){R(62,{colId:l});return}if(!d.isFilterAllowed()){R(63,{colId:l});return}const c=this.getOrCreateFilterWrapper(d);if(!c){R(64,{colId:l});return}n.push(Gi(c.filterPromise,e[l]))})}else this.allColumnFilters.forEach(a=>{n.push(Gi(a.filterPromise,null))});te.all(n).then(()=>{const a=this.getFilterModel(!0),l=[];this.allColumnFilters.forEach((d,c)=>{const u=r?r[c]:null,h=a?a[c]:null;Tt(u,h)||l.push(d.column)}),l.length>0&&o?.onFilterChanged({columns:l,source:t})})}getFilterModel(e){const t={},{allColumnFilters:s,initialFilterModel:i,beans:{colModel:o}}=this;if(s.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);x(a)&&(t[r]=a)}),!e)for(const n of Object.keys(i)){const r=i[n];x(r)&&!s.has(n)&&o.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}getModelFromFilterWrapper(e){const{filter:t}=e;return t?typeof t.getModel!="function"?(R(66),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){const e=a=>a?a.isFilterActive?a.isFilterActive():(R(67),!1):!1,{colModel:t,gos:s}=this.beans,i=!!Qs(s),o=a=>{if(!a.isPrimary())return!0;const d=!t.isPivotActive();return!a.isValueActive()||!d?!1:t.isPivotMode()?!0:i},n=[],r=[];return this.forEachColumnFilter((a,l)=>{e(a)&&(o(l.column)?n.push(a):r.push(a))}).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((s,i)=>this.setColFilterActive(i.column,s.isFilterActive(),e,t))}forEachColumnFilter(e){const t=[];return this.allColumnFilters.forEach(s=>{const i=s.filterPromise;i&&t.push(i.then(o=>e(o,s)))}),te.all(t)}doColumnFiltersPass(e,t,s){const{data:i,aggData:o}=e,n=s?this.activeAggregateFilters:this.activeColumnFilters,r=s?o:i;for(let a=0;a<n.length;a++){const l=n[a];if(!(l==null||l===t)){if(typeof l.doesFilterPass!="function"){O(91);continue}if(!l.doesFilterPass({node:e,data:r}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:s}=this.beans,i=()=>{this.isAlive()&&s?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{filterInstance:t,additionalEventAttributes:s}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",s).then(()=>{this.allColumnFilters.forEach(i=>{i.filterPromise&&i.filterPromise.then(o=>{o&&o!==t&&o.onAnyFilterChanged&&o.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(t=>{t.onNewRowsLoaded?.()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createGetValue(e){const{filterValueSvc:t,colModel:s}=this.beans;return(i,o)=>{const n=o?s.getCol(o):e;return n?t.getValue(n,i):void 0}}isFilterActive(e){const{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():this.getModelFromInitialState(e)!=null}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;const{gos:s,dataTypeSvc:i}=this.beans;if(vo(s))t="agSetColumnFilter";else{const o=i?.getBaseDataType(e);o==="number"?t="agNumberColumnFilter":o==="date"||o==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;const{gos:s,dataTypeSvc:i}=this.beans;if(vo(s))t="agSetColumnFloatingFilter";else{const o=i?.getBaseDataType(e);o==="number"?t="agNumberColumnFloatingFilter":o==="date"||o==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){const s=this.getDefaultFilter(e),i=e.getColDef();let o;const n={...this.createFilterParams(e,i),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(o,e)(),filterChangedCallback:a=>this.filterChangedCallbackFactory(o,e)(a),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(o,a)??!0},r=ha(this.beans.userCompFactory,i,n,s);return r?{filterPromise:()=>{const a=r.newAgStackInstance();return a.then(l=>{o=l,t&&(t.filter=l??void 0)}),a},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return k(this.gos,{column:e,colDef:t,rowModel:this.beans.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){const t={column:e,filterPromise:null,compDetails:null},{filterPromise:s,compDetails:i}=this.createFilterInstance(e,t);return t.filterPromise=s?.()??null,t.compDetails=i,t}onColumnsChanged(){const e=[],{colModel:t,filterManager:s}=this.beans;this.allColumnFilters.forEach((o,n)=>{let r;o.column.isPrimary()?r=t.getColDefCol(n):r=t.getCol(n),!(r&&r===o.column)&&(e.push(o.column),this.disposeFilterWrapper(o,"columnChanged"),this.disposeColumnListener(n))});const i=e.every(ec);e.length>0&&!i?s?.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){this.beans.autoColSvc?.getColumns()?.forEach(e=>{ec(e)&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const{filter:s}=this.allColumnFilters.get(e.getColId())??{};return s&&typeof s?.isFilterAllowed=="function"?s.isFilterAllowed():!0}getFloatingFilterCompDetails(e,t){const s=c=>{const u=this.getOrCreateFilterWrapper(e)?.filterPromise;u?.then(h=>{c(Bt(h))})},i=e.getColDef(),o={...this.createFilterParams(e,i),filterChangedCallback:()=>s(c=>this.filterChangedCallbackFactory(c,e)())},{userCompFactory:n,frameworkOverrides:r}=this.beans,a=Eg(n,i,o);let l=_a(r,i,()=>this.getDefaultFloatingFilter(e));l==null&&(l="agReadOnlyFloatingFilter");const d=k(this.gos,{column:e,filterParams:a,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:s,showParentFilter:t});return ga(n,i,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e,t="api"){const s=e.getColId(),i=this.allColumnFilters.get(s);this.disposeColumnListener(s),delete this.initialFilterModel[s],i&&this.disposeFilterWrapper(i,t).then(o=>{o&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){return e.filterPromise?.then(s=>{const i=!!s?.isFilterActive();return this.destroyBean(s),this.setColFilterActive(e.column,!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:e.column}),i})??te.resolve(!1)}filterModifiedCallbackFactory(e,t){return()=>{this.eventSvc.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return s=>{const i=s?.source??"columnFilter",o={filter:e,additionalEventAttributes:s,columns:[t],source:i};this.callOnFilterChangedOutsideRenderCycle(o)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const s=t.column,{compDetails:i}=s.isFilterAllowed()?this.createFilterInstance(s):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,i)){this.destroyFilter(s,"paramsUpdated");return}const o=s.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(s,"paramsUpdated");return}t.filterPromise.then(n=>{(n?.refresh?n.refresh({...this.createFilterParams(s,s.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(n,s),filterChangedCallback:this.filterChangedCallbackFactory(n,s),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(n,a)??!0,...o}):!0)===!1&&this.destroyFilter(s,"paramsUpdated")})}setColumnFilterWrapper(e,t){const s=e.getColId();this.allColumnFilters.set(s,t),this.allColumnListeners.set(s,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(s)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:s}=e,{componentClass:i}=t;return!(s===i||s?.render&&i?.render&&s.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(s=>{t(Bt(s))})})}getFilterInstanceImpl(e){const t=this.beans.colModel.getColDefCol(e);return t?this.getOrCreateFilterWrapper(t)?.filterPromise??te.resolve(null):te.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:s})=>{this.setColumnFilterModel(e,t).then(()=>s())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){const{colModel:s,dataTypeSvc:i}=this.beans;if(i?.isPendingInference){let a=()=>{};const l=new Promise(d=>{a=d});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:a}),l}const o=s.getColDefCol(e),n=o?this.getOrCreateFilterWrapper(o):null;return n?(a=>new Promise(l=>{a.then(d=>l(d))}))(Gi(n.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){const t=this.beans.colModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,s){const i=vo(this.gos),o=this.getLocaleTextFunc(),n=r=>{const{filterParams:a}=e;e.filterParams=typeof a=="object"?{...a,...r}:r};switch(t.baseDataType){case"number":{i&&n({comparator:rb});break}case"boolean":{n(i?{valueFormatter:r=>x(r.value)?o(String(r.value),r.value?"True":"False"):o("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(r,a)=>a,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(r,a)=>a===!1,numberOfInputs:0}]});break}case"date":{n(i?{valueFormatter:r=>{const a=s(r);return x(a)?a:o("blanks","(Blanks)")},treeList:!0,treeListFormatter:(r,a)=>{if(r==="NaN")return o("invalidDate","Invalid Date");if(a===1&&r!=null){const l=Jd[Number(r)-1];return o(l,Xd[l])}return r??o("blanks","(Blanks)")}}:{isValidDate:tc});break}case"dateString":{const r=t.dateParser;n(i?{valueFormatter:a=>{const l=s(a);return x(l)?l:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:a=>{const l=r(a??void 0);return l?[String(l.getFullYear()),String(l.getMonth()+1),String(l.getDate())]:null},treeListFormatter:(a,l)=>{if(l===1&&a!=null){const d=Jd[Number(a)-1];return o(d,Xd[d])}return a??o("blanks","(Blanks)")}}:{comparator:(a,l)=>{const d=r(l);return l==null||d<a?-1:d>a?1:0},isValidDate:a=>typeof a=="string"&&tc(r(a))});break}case"object":{i?n({valueFormatter:r=>{const a=s(r);return x(a)?a:o("blanks","(Blanks)")}}):e.filterValueGetter=r=>s({column:r.column,node:r.node,value:this.beans.valueSvc.getValue(r.column,r.node)});break}}}setColFilterActive(e,t,s,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",s)),e.dispatchColEvent("filterChanged",s,i)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};function Gi(e,t){return e?new te(s=>{e.then(i=>{typeof i.setModel!="function"&&(R(65),s()),(i.setModel(t)||te.resolve()).then(()=>s())})}):te.resolve()}function ec(e){return e.getColDef().filter==="agGroupColumnFilter"}function tc(e){return e instanceof Date&&!isNaN(e.getTime())}function lb(e){return!!e.filterManager?.isAnyFilterPresent()}function db(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var cb=class extends b{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:s}=this;this.alwaysPassFilter=s.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=s.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){this.warnAdvFilters();return}this.colFilter?.setFilterModel(e,t)}getFilterModel(){return this.colFilter?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.colFilter?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggregateFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Qs(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:s,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):te.resolve()).then(()=>{const o={source:t,type:"filterChanged",columns:i};s&&ie(o,s),this.eventSvc.dispatchEvent(o),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Qs(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doAggregateFiltersPass(t,e.filterInstanceToSkip))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doColumnFiltersPass(t,e.filterInstanceToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterActive(e){return!!this.colFilter?.isFilterActive(e)}getOrCreateFilterWrapper(e){return this.colFilter?.getOrCreateFilterWrapper(e)??null}getDefaultFloatingFilter(e){return this.colFilter.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.colFilter.createFilterParams(e,t)}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){return this.colFilter?.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){return this.colFilter?.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){this.colFilter?.destroyFilter(e,t)}areFilterCompsDifferent(e,t){return!!this.colFilter?.areFilterCompsDifferent(e,t)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getColumnFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){R(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advFilterModelUpdateQueue.forEach(e=>this.setAdvFilterModel(e)),this.advFilterModelUpdateQueue=[]}getColumnFilterModel(e){return this.colFilter?.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setColumnFilterModel(e,t)??Promise.resolve()}setColDefPropertiesForDataType(e,t,s){this.colFilter?.setColDefPropertiesForDataType(e,t,s)}},ub=class extends b{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,s,i){this.showPopup(e,o=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:s,mouseEvent:t,ePopup:o})},s,t.target,re(this.gos),i)}showMenuAfterButtonClick(e,t,s,i){let o=-1,n="left";const r=re(this.gos);!r&&this.gos.get("enableRtl")&&(o=1,n="right");const a=r?void 0:4*o,l=r?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:s,eventSource:t,ePopup:d,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},s,t,r,i)}showPopup(e,t,s,i,o,n){const r=e?this.createBean(new Ha(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){O(57);return}const a=document.createElement("div");X(a,"presentation"),a.classList.add("ag-menu"),o||a.classList.add("ag-filter-menu"),[this.tabListener]=this.addManagedElementListeners(a,{keydown:f=>this.trapFocusWithin(f,a)}),a.appendChild(r?.getGui());let l;const d=()=>r?.afterGuiDetached(),c=Gr(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=f=>{Xo(e,!1,"contextMenu");const m=f instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),m&&i&&me(i)&&To(i)?.focus({preventScroll:!0}),d(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,s,e),n?.()},h=this.getLocaleTextFunc(),g=o&&s!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:c,ariaLabel:g});p&&(this.hidePopup=l=p.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:s,hidePopup:l})}),Xo(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,s,e)}trapFocusWithin(e,t){e.key!==w.TAB||e.defaultPrevented||Ye(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),qe(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,s){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:s??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},hb=class extends b{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t){if(!t)return;const s=e.getColDef(),{filterValueGetter:i}=s;return i?this.executeFilterValueGetter(i,t.data,e,t,s):this.beans.valueSvc.getValue(e,t)}executeFilterValueGetter(e,t,s,i,o){const{expressionSvc:n,valueSvc:r}=this.beans,a=k(this.gos,{data:t,node:i,column:s,colDef:o,getValue:r.getValueCallback.bind(r,i)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},gb=class extends L{constructor(){super(`
            <div class="ag-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
            </div>`,[us]),this.eFloatingFilterText=E}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const s=t.getModelAsString(e);this.eFloatingFilterText.setValue(s)}})}refresh(e){this.init(e)}},sc=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}mapCustomOptions(){const{filterOptions:e}=this;e&&e.forEach(t=>{if(typeof t=="string")return;const s=[["displayKey"],["displayName"],["predicate","test"]],i=o=>o.some(n=>t[n]!=null)?!0:(R(72,{keys:o}),!1);if(!s.every(i)){this.filterOptions=e.filter(o=>o===t)||[];return}this.customFilterOptions[t.displayKey]=t})}selectDefaultItem(e){const{filterOptions:t}=this;if(e.defaultOption)this.defaultOption=e.defaultOption;else if(t.length>=1){const s=t[0];typeof s=="string"?this.defaultOption=s:s.displayKey?this.defaultOption=s.displayKey:R(73)}else R(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Ds(e,t,s){return s==null?e.splice(t):e.splice(t,s)}function Hi(e){return e==null||typeof e=="string"&&e.trim().length===0}function pb(e){return e==="AND"||e==="OR"?e:"AND"}function fb(e,t,s){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(o=>o==null))return i(t,s)}function mb(e,t){let s=e.length;return s>t&&(e.splice(t),R(78),s=t),s}var ic=class extends Wa{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(e){const t=this.optionsFactory.getCustomOption(e);if(t){const{numberOfInputs:i}=t;return i??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,s)=>{const i=s===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOperatorsOr:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;const s=!e.operator,i=!t.operator;if(!s&&i||s&&!i)return!1;let n;if(s){const r=e,a=t;n=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;n=r.operator===a.operator&&je(r.conditions,a.conditions,(l,d)=>this.areSimpleModelsEqual(l,d))}return n}shouldRefresh(e){const t=this.getModel(),s=t?t.conditions??[t]:null,i=e.filterOptions?.map(n=>typeof n=="string"?n:n.displayKey)??this.getDefaultFilterOptions();return!(!(!s||s.every(n=>i.find(r=>r===n.type)!==void 0))||typeof e.maxNumConditions=="number"&&s&&s.length>e.maxNumConditions)}refresh(e){return!this.shouldRefresh(e)||!super.refresh(e)?!1:(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(e){if(e.operator){const s=e;let i=s.conditions;i==null&&(i=[],R(77));const o=mb(i,this.maxNumConditions),n=this.getNumConditions();if(o<n)this.removeConditionsAndOperators(o);else if(o>n)for(let a=n;a<o;a++)this.createJoinOperatorPanel(),this.createOption();const r=s.operator==="OR";this.eJoinOperatorsAnd.forEach(a=>a.setValue(!r,!0)),this.eJoinOperatorsOr.forEach(a=>a.setValue(r,!0)),i.forEach((a,l)=>{this.eTypes[l].setValue(a.type,!0),this.setConditionIntoUi(a,l)})}else{const s=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(s.type,!0),this.setConditionIntoUi(s,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),te.resolve()}doesFilterPass(e){const t=this.getModel();if(t==null)return!0;const{operator:s}=t,i=[];if(s){const n=t;i.push(...n.conditions??[])}else i.push(t);return i[s&&s==="OR"?"some":"every"](n=>this.individualConditionPasses(e,n))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=pb(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new sc,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(R(79),t=1),this.maxNumConditions=t;let s=e.numAlwaysVisibleConditions??1;s<1&&(R(80),s=1),s>t&&(R(81),s=t),this.numAlwaysVisibleConditions=s}createOption(){const e=this.createManagedBean(new xi);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());const t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);const s=this.getNumConditions()-1;this.forEachPositionInput(s,i=>this.resetInput(i)),this.addChangedListeners(e,s)}createJoinOperatorPanel(){const e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");const t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),s=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);const i=this.eJoinOperatorPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,o),this.resetJoinOperatorOr(s,i,o),this.isReadOnly()||(t.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(e,t,s){const i=this.createManagedBean(new vl);e.push(i);const o="ag-filter-condition-operator";return i.addCssClass(o),i.addCssClass(`${o}-${s}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;t.forEach(s=>{e.addOption(s)}),e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,s=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:s?this.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(t)}}createBodyTemplate(){return""}getAgComponents(){return[]}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let s=0;s<this.getNumConditions();s++)this.isConditionUiComplete(s)?e=s:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const s=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<s){this.removeConditionsAndOperators(s+1);const i=e+1,o=s-i;o>0&&this.removeConditionsAndOperators(i,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,o)=>{const n=this.isConditionDisabled(o,e);i.setDisabled(n||this.filterListOptions.length<=1),o===1&&(Pt(this.eJoinOperatorPanels[0],n),this.eJoinOperatorsAnd[0].setDisabled(n),this.eJoinOperatorsOr[0].setDisabled(n))}),this.eConditionBodies.forEach((i,o)=>{N(i,this.isConditionBodyVisible(o))});const s=(t??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(i=>{i.setValue(!s,!0)}),this.eJoinOperatorsOr.forEach(i=>{i.setValue(s,!0)}),this.forEachInput((i,o,n,r)=>{this.setElementDisplayed(i,o<r),this.setElementDisabled(i,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:s,eConditionBodies:i,eJoinOperatorPanels:o,eJoinOperatorsAnd:n,eJoinOperatorsOr:r}=this;this.removeComponents(s,e,t),this.removeElements(i,e,t),this.removeValueElements(e,t);const a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,s){Ds(e,t,s).forEach(o=>ve(o))}removeComponents(e,t,s){Ds(e,t,s).forEach(o=>{ve(o.getGui()),this.destroyBean(o)})}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){const{eFilterBody:t,eTypes:s}=this;let i;if(!this.isReadOnly()){const o=this.getInputs(0)[0];o instanceof Xe&&this.isConditionBodyVisible(0)?i=o.getInputElement():i=s[0]?.getFocusableElement()}(i??t).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const e=this.getModel();this.resetUiToActiveModel(e);let t=-1,s=-1,i=!1;const o=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,s=r);else{const a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),i=!0,l&&s--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(s,o),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getPlaceholderText(e,t){let s=this.translate(e);if(typeof this.filterPlaceholder=="function"){const i=this.eTypes[t].getValue(),o=this.translate(i);s=this.filterPlaceholder({filterOptionKey:i,filterOption:o,placeholder:s})}else typeof this.filterPlaceholder=="string"&&(s=this.filterPlaceholder);return s}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,s,i,o)=>{if(!(t instanceof Xe))return;const n=s===0&&o>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",r=s===0&&o>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(n,i)),t.setInputAriaLabel(r)})}setElementValue(e,t,s){e instanceof Xe&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){e instanceof L&&N(e.getGui(),t)}setElementDisabled(e,t){e instanceof L&&Pt(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Xe&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,s)=>{this.forEachPositionTypeInput(s,t,e)})}forEachPositionInput(e,t){const s=this.getConditionType(e);this.forEachPositionTypeInput(e,s,t)}forEachPositionTypeInput(e,t,s){const i=this.getNumberOfInputs(t),o=this.getInputs(e);for(let n=0;n<o.length;n++){const r=o[n];r!=null&&s(r,n,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(s=>s==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinOperatorsAnd.forEach((t,s)=>this.resetJoinOperatorAnd(t,s,this.joinOperatorId+s)),this.eJoinOperatorsOr.forEach((t,s)=>this.resetJoinOperatorOr(t,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),te.resolve()}resetType(e){const s=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),s)}resetJoinOperatorOr(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),s)}resetJoinOperator(e,t,s,i,o){this.updateJoinOperatorDisabled(e.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,s)=>this.updateJoinOperatorDisabled(t,s);this.eJoinOperatorsAnd.forEach(e),this.eJoinOperatorsOr.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const s=this.mapValuesFromModel(e);this.forEachInput((i,o,n)=>{n===t&&this.setElementValue(i,s[o]!=null?s[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,s,i)=>{this.setElementValue(t,s===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,s=>{this.attachElementOnChange(s,this.listener)}))}individualConditionPasses(e,t){const s=this.getCellValue(e.node),i=this.mapValuesFromModel(t),o=this.optionsFactory.getCustomOption(t.type),n=fb(o,i,s);return n??(s==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,s,t,e))}hasInvalidInputs(){return!1}},oc=class extends ic{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:s,includeBlanksInGreaterThan:i,includeBlanksInLessThan:o,includeBlanksInRange:n}=this.scalarFilterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(s)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,s){const i=s.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const o=this.comparator(),n=e[0]!=null?o(e[0],t):0;switch(i){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=o(e[1],t);return this.scalarFilterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return Hi(t);case"notBlank":return!Hi(t);default:return R(76,{filterModelType:i}),!0}}},nc=class{constructor(e,t,s,i,o){this.alive=!0,this.context=e,this.eParent=i;const n=Sg(t,s);n&&n.newAgStackInstance().then(r=>{if(!this.alive){e.destroyBean(r);return}if(this.dateComp=r,!r)return;i.appendChild(r.getGui()),r?.afterGuiAttached?.();const{tempValue:a,disabled:l}=this;a&&r.setDate(a),l!=null&&r.setDisabled?.(l),o?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){N(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}},rc=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"],On=class{constructor(e,t,s){this.getLocaleTextFunc=e,this.optionsFactory=t,this.valueFormatter=s}getModelAsString(e){if(!e)return null;const t=e.operator!=null,s=this.getLocaleTextFunc();if(t){const i=e,n=(i.conditions??[]).map(a=>this.getModelAsString(a)),r=i.operator==="AND"?"andCondition":"orCondition";return n.join(` ${s(r,za[r])} `)}else{if(e.type==="blank"||e.type==="notBlank")return s(e.type,e.type);{const i=e,o=this.optionsFactory.getCustomOption(i.type),{displayKey:n,displayName:r,numberOfInputs:a}=o||{};return n&&r&&a===0?(s(n,r),r):this.conditionToString(i,o)}}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},ac=class extends On{constructor(e,t,s){super(t,s),this.dateFilterParams=e}conditionToString(e,t){const{type:s}=e,{numberOfInputs:i}=t||{},o=s=="inRange"||i===2,n=oe(e.dateFrom),r=oe(e.dateTo),a=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(o){const l=n!==null?gs(n,a):"null",d=r!==null?gs(r,a):"null";return`${l}-${d}`}return n!=null?gs(n,a):`${s}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},lc=1e3,dc=1/0,Cb=class extends oc{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=lc,this.maxValidYear=dc,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){const{dateFrom:t,dateTo:s,type:i}=e||{};return[t&&oe(t)||null,s&&oe(s)||null].slice(0,this.getNumberOfInputs(i))}comparator(){return this.dateFilterParams.comparator??vb}isValid(e){const t=this.dateFilterParams.isValidDate;return!t||t(e)}setParams(e){this.dateFilterParams=e,super.setParams(e);const t=(s,i)=>{if(e[s]!=null)if(isNaN(e[s]))R(82,{param:s});else return e[s]==null?i:Number(e[s]);return i};this.minValidYear=t("minValidYear",lc),this.maxValidYear=t("maxValidYear",dc),this.minValidYear>this.maxValidYear&&R(83),this.minValidDate=e.minValidDate?e.minValidDate instanceof Date?e.minValidDate:oe(e.minValidDate):null,this.maxValidDate=e.maxValidDate?e.maxValidDate instanceof Date?e.maxValidDate:oe(e.maxValidDate):null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&R(84),this.filterModelFormatter=new ac(this.dateFilterParams,this.getLocaleTextFunc.bind(this),this.optionsFactory)}createDateCompWrapper(e){const{userCompFactory:t,context:s,gos:i}=this.beans,o=new nc(s,t,k(i,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams,location:"filter"}),e);return this.addDestroyFunc(()=>o.destroy()),o}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return rc}createValueElement(){const t=_(this.beans).createElement("div");return t.classList.add("ag-filter-body"),this.createFromToElement(t,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(t,this.eConditionPanelsTo,this.dateConditionToComps,"to"),t}createFromToElement(e,t,s,i){const n=_(this.beans).createElement("div");n.classList.add(`ag-filter-${i}`),n.classList.add(`ag-filter-date-${i}`),t.push(n),e.appendChild(n),s.push(this.createDateCompWrapper(n))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Ds(this.eConditionPanelsFrom,e,t),Ds(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,s){Ds(e,t,s).forEach(o=>o.destroy())}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:s,minValidYear:i,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(s){if(e>s)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((s,i,o,n)=>{o!==e||!t||i>=n||(t=t&&this.isValidDateValue(s.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={},i=this.getValues(e);return i.length>0&&(s.dateFrom=pe(i[0])),i.length>1&&(s.dateTo=pe(i[1])),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...s}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),s=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(s)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,i,o,n)=>{i<n&&t.push(s.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}};function vb(e,t){const s=t;return s<e?-1:s>e?1:0}var cc=class extends L{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let s;t?s=e.conditions[0]:s=e,this.lastType=s.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const s=e;return this.isTypeEditable(s.type)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const s=new sc;this.optionsFactory=s,s.init(e.filterParams,this.getDefaultOptions());const i=s.defaultOption;t||(this.lastType=i),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(i);this.setEditable(o)}refresh(e){this.setSimpleParams(e)}hasSingleInput(e){const t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},wb=class extends cc{constructor(){super(`
            <div class="ag-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eReadOnlyText"></ag-input-text-field>
                <div data-ref="eDateWrapper" style="display: flex;"></div>
            </div>`,[us]),this.eReadOnlyText=E,this.eDateWrapper=E}getDefaultOptions(){return rc}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new ac(this.filterParams,this.getLocaleTextFunc.bind(this),this.optionsFactory);const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.dateComp.updateParams(this.getDateComponentParams()),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const s=e?oe(e.dateFrom):null;this.dateComp.setDate(s),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){N(this.eDateWrapper,e),N(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){const e=this.dateComp.getDate(),t=pe(e);this.params.parentFilterInstance(s=>{if(s){const i=oe(t);s.onFloatingFilterChanged(this.lastType||null,i)}})}getDateComponentParams(){const{filterParams:e,column:t}=this.params,s=Lo(e,this.defaultDebounceMs);return k(this.gos,{onDateChanged:Y(this,this.onDateChanged.bind(this),s),filterParams:t.getColDef().filterParams,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:s}=this;this.dateComp=new nc(e,t,this.getDateComponentParams(),s,i=>{i.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},bb=class extends L{constructor(){super(`
            <div class="ag-filter-filter">
                <ag-input-text-field class="ag-date-filter" data-ref="eDateInput"></ag-input-text-field>
            </div>`,[us]),this.eDateInput=E,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e,t){if(t.target===z(this.beans)&&!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){const t=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=s&&Ie(),t.type=s?"date":"text";const{minValidYear:i,maxValidYear:o,minValidDate:n,maxValidDate:r,buttons:a}=e.filterParams||{};if(n&&i&&R(85),r&&o&&R(86),n&&r){const[l,d]=[n,r].map(c=>c instanceof Date?c:oe(c));l&&d&&l.getTime()>d.getTime()&&R(87)}n?n instanceof Date?t.min=gs(n):t.min=n:i&&(t.min=`${i}-01-01`),r?r instanceof Date?t.max=gs(r):t.max=r:o&&(t.max=`${o}-12-31`),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return oe(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(pe(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}},uc=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"],hc=class extends On{conditionToString(e,t){const{numberOfInputs:s}=t||{},{filter:i,filterTo:o,type:n}=e,r=n=="inRange"||s===2,a=this.formatValue.bind(this);return r?`${a(i)}-${a(o)}`:i!=null?a(i):`${n}`}};function Gn(e){const{allowedCharPattern:t}=e??{};return t??null}var Sb=class extends oc{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}refresh(e){return this.numberFilterParams.allowedCharPattern!==e.allowedCharPattern?!1:super.refresh(e)}mapValuesFromModel(e){const{filter:t,filterTo:s,type:i}=e||{};return[this.processValue(t),this.processValue(s)].slice(0,this.getNumberOfInputs(i))}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new hc(this.getLocaleTextFunc.bind(this),this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return uc}setElementValue(e,t,s){const{numberFormatter:i}=this.numberFilterParams,o=!s&&i?i(t??null):t;super.setElementValue(e,o)}createValueElement(){const e=Gn(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),X(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,s,i){const o=this.createManagedBean(i?new Je({allowedCharPattern:i}):new yi);o.addCssClass(`ag-filter-${s}`),o.addCssClass("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeValueElements(e,t){const s=i=>this.removeComponents(i,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,i,o,n)=>{i<n&&t.push(this.processValue(this.stringToFloat(s.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}processValue(e){return e==null||isNaN(e)?null:e}stringToFloat(e){if(typeof e=="number")return e;let t=Re(e);t!=null&&t.trim()===""&&(t=null);const s=this.numberFilterParams.numberParser;return s?s(t):t==null||t.trim()==="-"?null:parseFloat(t)}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(s.filter=i[0]),i.length>1&&(s.filterTo=i[1]),s}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{if(!t.getInputElement().validity.valid){e=!0;return}}),e}},gc=class extends b{constructor(e){super(),this.params=e,this.eInput=E,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new Je(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const s=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:s,keydown:s})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:s}=this;s.setInputAriaLabel(e),t!==void 0&&s.setAutoComplete(t)}};function pc(e){const t=e?.trim();return t===""?e:t}var fc=class extends cc{constructor(){super(...arguments),this.eFloatingFilterInputContainer=E,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(`
            <div class="ag-floating-filter-input" role="presentation" data-ref="eFloatingFilterInputContainer"></div>
        `)}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){this.params=e;const t=e.browserAutoComplete??!1,{inputSvc:s,defaultDebounceMs:i,readOnly:o}=this;if(s.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=pi(e.filterParams),!o){const n=Lo(e.filterParams,i),r=Y(this,this.syncUpWithParentFilter.bind(this),n);s.setValueChangedListener(r)}}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,s=t.getValue();Z(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(s,!0)}syncUpWithParentFilter(e){const t=e.key===w.ENTER;if(this.applyActive&&!t)return;const{inputSvc:s,params:i}=this;let o=s.getValue();i.filterParams.trimInput&&(o=pc(o),s.setValue(o,!0)),i.parentFilterInstance(n=>{n?.onFloatingFilterChanged(this.lastType||null,o||null)})}setEditable(e){this.inputSvc.setEditable(e)}},yb=class extends b{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new yi),this.eTextInput=this.createManagedBean(new Je),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),s=this.eTextInput.getGui();e.appendChild(t),e.appendChild(s),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(s,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},Rb=class extends fc{init(e){super.init(e),this.filterModelFormatter=new hc(this.getLocaleTextFunc.bind(this),this.optionsFactory,e.filterParams?.numberFormatter)}refresh(e){Gn(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultOptions(){return uc}createFloatingFilterInputService(e){return this.allowedCharPattern=Gn(e.filterParams),this.allowedCharPattern?this.createManagedBean(new gc({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new yb)}},mc=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Cc=class extends On{conditionToString(e,t){const{numberOfInputs:s}=t||{},{filter:i,filterTo:o,type:n}=e;return n=="inRange"||s===2?`${i}-${o}`:i!=null?`${i}`:`${n}`}},xb=class extends ic{constructor(){super("textFilter"),this.filterType="text",this.defaultFormatter=e=>e,this.defaultLowercaseFormatter=e=>e==null?null:e.toString().toLowerCase(),this.defaultMatcher=({filterOption:e,value:t,filterText:s})=>{if(s==null)return!1;switch(e){case"contains":return t.indexOf(s)>=0;case"notContains":return t.indexOf(s)<0;case"equals":return t===s;case"notEqual":return t!=s;case"startsWith":return t.indexOf(s)===0;case"endsWith":{const i=t.lastIndexOf(s);return i>=0&&i===t.length-s.length}default:return!1}},this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}setParams(e){this.textFilterParams=e,super.setParams(e),this.matcher=e.textMatcher||this.defaultMatcher,this.formatter=e.textFormatter||(e.caseSensitive?this.defaultFormatter:this.defaultLowercaseFormatter),this.filterModelFormatter=new Cc(this.getLocaleTextFunc.bind(this),this.optionsFactory)}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},i=this.getValuesWithSideEffects(e,!0);return i.length>0&&(s.filter=i[0]),i.length>1&&(s.filterTo=i[1]),s}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(e,t){const s=[];return this.forEachPositionInput(e,(i,o,n,r)=>{if(o<r){let a=Re(i.getValue());t&&this.textFilterParams.trimInput&&(a=pc(a)??null,i.setValue(a,!0)),s.push(a)}}),s}getDefaultFilterOptions(){return mc}createValueElement(){const e=document.createElement("div");return e.classList.add("ag-filter-body"),X(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,s){const i=this.createManagedBean(new Je);i.addCssClass(`ag-filter-${s}`),i.addCssClass("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeValueElements(e,t){const s=i=>this.removeComponents(i,e,t);s(this.eValuesFrom),s(this.eValuesTo)}mapValuesFromModel(e){const{filter:t,filterTo:s,type:i}=e||{};return[t||null,s||null].slice(0,this.getNumberOfInputs(i))}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,s,i){const o=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:d,textFormatter:c}=this.textFilterParams;if(s.type==="blank")return Hi(t);if(s.type==="notBlank")return!Hi(t);const u={api:r,colDef:a,column:l,context:d,node:i.node,data:i.data,filterOption:s.type,value:n,textFormatter:c};return o.some(h=>this.matcher({...u,filterText:h}))}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}},Fb=class extends fc{init(e){super.init(e),this.filterModelFormatter=new Cc(this.getLocaleTextFunc.bind(this),this.optionsFactory)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultOptions(){return mc}createFloatingFilterInputService(){return this.createManagedBean(new gc)}};function Eb(e){return!!e.quickFilter?.isFilterPresent()}function Db(e){return e.quickFilter?.getText()}function Pb(e){e.quickFilter?.resetCache()}var Mb=class extends b{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",s=>this.setFilter(s.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:s,pivotResultCols:i}=this.beans,o=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(o&&!s.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=s.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(s=>t?this.doesRowPassCache(e,s):this.doesRowPassNoCache(e,s))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return x(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){R(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),s=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,s&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(s=>{const i=this.getTextForColumn(s,e);return x(i)&&i.indexOf(t)>=0})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassMatcher(e,t){let s;e?(this.checkGenerateAggText(t),s=t.quickFilterAggregateText):s=this.getAggText(t);const{quickFilterParts:i,matcher:o}=this;return o(i,s)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let s=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const o=k(this.gos,{value:s,node:t,data:t.data,column:e,colDef:i});s=i.getQuickFilterText(o)}return x(s)?s.toString().toUpperCase():null}getAggText(e){const t=[];return this.colsToUse.forEach(s=>{const i=this.getTextForColumn(s,e);x(i)&&t.push(i)}),t.join(`
`)}},Ab={moduleName:"ClientSideRowModelFilter",version:F,rowModels:["clientSide"],beans:[U0]},Bi={moduleName:"FilterCore",version:F,beans:[cb],apiFunctions:{isAnyFilterPresent:lb,onFilterChanged:db},css:[Z0],dependsOn:[Ab]},Hn={moduleName:"FilterValue",version:F,beans:[hb]},Ps={moduleName:"ColumnFilter",version:F,beans:[ab,ub],dynamicBeans:{headerFilterCellCtrl:$0},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:X0,getColumnFilterInstance:J0,destroyFilter:eb,setFilterModel:tb,getFilterModel:sb,getColumnFilterModel:ib,setColumnFilterModel:ob,showColumnFilter:nb},dependsOn:[Bi,Es,Hn,Zd]},vc={moduleName:"CustomFilter",version:F,userComponents:{agReadOnlyFloatingFilter:gb},dependsOn:[Ps]},wc={moduleName:"TextFilter",version:F,dependsOn:[Ps],userComponents:{agTextColumnFilter:xb,agTextColumnFloatingFilter:Fb}},bc={moduleName:"NumberFilter",version:F,dependsOn:[Ps],userComponents:{agNumberColumnFilter:Sb,agNumberColumnFloatingFilter:Rb}},Sc={moduleName:"DateFilter",version:F,dependsOn:[Ps],userComponents:{agDateColumnFilter:Cb,agDateInput:bb,agDateColumnFloatingFilter:wb}},Tb={moduleName:"QuickFilterCore",version:F,rowModels:["clientSide"],beans:[Mb],dependsOn:[Bi,Hn]},yc={moduleName:"QuickFilter",version:F,apiFunctions:{isQuickFilterPresent:Eb,getQuickFilter:Db,resetQuickFilter:Pb},dependsOn:[Tb]},Rc={moduleName:"ExternalFilter",version:F,dependsOn:[Bi]},Ms=class{constructor(e){this.cellValueChanges=e}},Bn=class extends Ms{constructor(e,t,s,i){super(e),this.initialRange=t,this.finalRange=s,this.ranges=i}},kb=10,xc=class{constructor(e){this.actionStack=[],this.maxStackSize=e||kb,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},Ib=class extends b{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},s=this.activeCellEdit!==null&&hi(this.activeCellEdit,t),i=this.activeRowEdit!==null&&Ta(this.activeRowEdit,t);if(!(s||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:d}=e,c={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:d,oldValue:l};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const s=e.get("undoRedoCellEditingLimit");if(s<=0)return;this.undoStack=new xc(s),this.redoStack=new xc(s),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:s,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const o=this.undoRedo(s,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){const{eventSvc:t,undoStack:s,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const o=this.undoRedo(i,s,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,s,i,o){if(!e)return!1;const n=e.pop();return!n||!n.cellValueChanges?!1:(this.processAction(n,r=>r[i],o),n instanceof Bn?this.processRange(n.ranges||[n[s]]):this.processCell(n.cellValueChanges),t.push(n),!0)}processAction(e,t,s){e.cellValueChanges.forEach(i=>{const{rowIndex:o,rowPinned:n,columnId:r}=i,a={rowIndex:o,rowPinned:n},l=rs(this.beans,a);l.displayed&&l.setDataValue(r,t(i),s)})}processRange(e){let t;const s=this.beans.rangeSvc;s.removeAllCellRanges(!0),e.forEach((i,o)=>{if(!i)return;const n=i.startRow,r=i.endRow;o===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:i.startColumn,columns:i.columns};s.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:s,rowPinned:i}=t,o={rowIndex:s,rowPinned:i},n=rs(this.beans,o),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:s,rowPinned:i}=e,{colModel:o,focusSvc:n,rangeSvc:r}=this.beans,a=o.getCol(s);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const d={rowIndex:t,column:a,rowPinned:i};n.setFocusedCell({...d,forceBrowserFocus:!0}),r?.setRangeToCell(d)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Ms(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const s=new Ms(this.cellValueChanges);this.pushActionsToUndoStack(s)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Ms(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new Bn(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:s}=this.beans;t&&xe(s)?e=new Bn(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Ms(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1}})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},Lb=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;width:100%}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}",Ob=class extends yt{constructor(){super(`
            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[Si]),this.eCheckbox=E}init(e){this.params=e;const t=e.value??void 0,s=this.eCheckbox;s.setValue(t),s.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(s,{fieldValueChanged:o=>this.setAriaLabel(o.selected)})}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),s=Ki(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${i} (${s})`)}},Vi=class extends yt{constructor(e){super(`
            <div class="ag-cell-edit-wrapper">
                ${e.getTemplate()}
            </div>`,e.getAgComponents()),this.cellEditorInput=e,this.eInput=E}init(e){this.params=e;const{cellStartedEdit:t,eventKey:s,suppressPreventDefault:i}=e,o=this.eInput;this.cellEditorInput.init(o,e);let n,r=!0;t?(this.focusAfterAttached=!0,s===w.BACKSPACE||s===w.DELETE?n="":s&&s.length===1?i?r=!1:n=s:(n=this.cellEditorInput.getStartValue(),s!==w.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,n=this.cellEditorInput.getStartValue()),r&&n!=null&&o.setStartValue(n),this.addManagedElementListeners(o.getGui(),{keydown:a=>{const{key:l}=a;(l===w.PAGE_UP||l===w.PAGE_DOWN)&&a.preventDefault()}})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ie()||t.getFocusableElement().focus();const s=t.getInputElement();this.highlightAllOnFocus?s.select():this.cellEditorInput.setCaret?.()}focusIn(){const e=this.eInput,t=e.getFocusableElement(),s=e.getInputElement();t.focus(),s.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}},Gb=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[Rl]}init(e,t){this.eInput=e,this.params=t;const{min:s,max:i,step:o}=t;s!=null&&e.setMin(s),i!=null&&e.setMax(i),o!=null&&e.setStep(o)}getValue(){const{eInput:e,params:t}=this,s=e.getDate();return!x(s)&&!x(t.value)?t.value:s??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return pe(e,!1)}},Hb=class extends Vi{constructor(){super(new Gb)}},Bb=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[Rl]}init(e,t){this.eInput=e,this.params=t;const{min:s,max:i,step:o}=t;s!=null&&e.setMin(s),i!=null&&e.setMax(i),o!=null&&e.setStep(o)}getValue(){const{params:e,eInput:t}=this,s=this.formatDate(t.getDate());return!x(s)&&!x(e.value)?e.value:e.parseValue(s??"")}getStartValue(){return pe(this.parseDate(this.params.value??void 0)??null,!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):oe(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):pe(e??null,!1)??void 0}},Vb=class extends Vi{constructor(){super(new Bb(()=>this.beans.dataTypeSvc))}},Nb=class extends yt{constructor(){super(`<div class="ag-large-text">
        <ag-input-text-area data-ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
        </div>`,[df]),this.eTextArea=E}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),e.value!=null&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===w.LEFT||t===w.UP||t===w.RIGHT||t===w.DOWN||e.shiftKey&&t===w.ENTER)&&e.stopPropagation()}afterGuiAttached(){const e=this.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){const e=this.eTextArea.getValue(),t=this.params;return!x(e)&&!x(t.value)?t.value:t.parseValue(e)}},zb=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" data-ref="eInput"></ag-input-number-field>'}getAgComponents(){return[Sl]}init(e,t){this.eInput=e,this.params=t;const{max:s,min:i,precision:o,step:n}=t;s!=null&&e.setMax(s),i!=null&&e.setMin(i),o!=null&&e.setPrecision(o),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===w.UP||e.key===w.DOWN)&&e.preventDefault()}getValue(){const{eInput:e,params:t}=this,s=e.getValue();if(!x(s)&&!x(t.value))return t.value;let i=t.parseValue(s);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){Ie()&&this.eInput.getInputElement().focus({preventScroll:!0})}},Wb=class extends Vi{constructor(){super(new zb)}},_b=class extends yt{constructor(){super(`<div class="ag-cell-edit-wrapper">
                <ag-select class="ag-cell-editor" data-ref="eSelect"></ag-select>
            </div>`,[Pl]),this.eSelect=E,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueSvc:s,gos:i}=this,{values:o,value:n,eventKey:r}=e;if(V(o)){R(58);return}this.startedByEnter=r!=null?r===w.ENTER:!1;let a=!1;o.forEach(u=>{const h={value:u},g=s.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:d,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eSelect,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}},Ub=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" data-ref="eInput"></ag-input-text-field>'}getAgComponents(){return[us]}init(e,t){this.eInput=e,this.params=t;const s=t.maxLength;s!=null&&e.setMaxLength(s)}getValue(){const{eInput:e,params:t}=this,s=e.getValue();return!x(s)&&!x(t.value)?t.value:t.parseValue(s)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eInput,t=e.getValue(),s=x(t)&&t.length||0;s&&e.getInputElement().setSelectionRange(s,s)}},Fc=class extends Vi{constructor(){super(new Ub)}};function $b(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function Kb(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Ec(e,t,s="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,s),"ensureVisible")}function Dc(e,t,s){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,s),"ensureVisible")}function jb(e,t,s=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,s),"ensureVisible")}function qb(e){e.undoRedo?.undo("api")}function Yb(e){e.undoRedo?.redo("api")}function Qb(e,t={}){const s=[];return e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>{const o=i.comp?.getCellEditor();o&&s.push(Bt(o))}),s}function Zb(e){const t=[];return e.rowRenderer.getAllCellCtrls().forEach(s=>{if(s.editing){const{cellPosition:i}=s;t.push(i)}}),t}function Xb(e,t=!1){e.editSvc?.stopAllEditing(t)}function Jb(e,t){const s=e.colModel.getCol(t.colKey);if(!s){R(12,{colKey:t.colKey});return}const i={rowIndex:t.rowIndex,rowPinned:t.rowPinned||null,column:s};t.rowPinned==null&&Dc(e,t.rowIndex),Ec(e,t.colKey);const n=wt(e,i);if(!n)return;const{focusSvc:r,gos:a,editSvc:l}=e,d=()=>{const u=z(e),h=n.eGui;return u!==h&&!!h?.contains(u)},c=a.get("stopEditingWhenCellsLoseFocus")&&d();(c||!r.isCellFocused(i))&&r.setFocusedCell({...i,forceBrowserFocus:c,preventScrollOnBrowserFocus:!0}),l?.startRowOrCellEdit(n,t.key)}function eS(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function tS(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var sS=class extends yt{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){lt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,s=i=>{No(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:s})}},iS=class extends b{constructor(){super(...arguments),this.beanName="editSvc"}startEditing(e,t=null,s=!1,i=null){if(!e.isCellEditable()||e.editing)return!0;if(!e.comp)return e.onCompAttachedFuncs.push(()=>{this.startEditing(e,t,s,i)}),!0;const o=this.createCellEditorParams(e,t,s),n=e.column.getColDef(),r=ua(this.beans.userCompFactory,n,o),a=r?.popupFromSelector!=null?r.popupFromSelector:!!n.cellEditorPopup,l=r?.popupPositionFromSelector!=null?r.popupPositionFromSelector:n.cellEditorPopupPosition;return Pc(e,!0,r),e.comp.setEditDetails(r,a,l,this.gos.get("reactiveCustomComponents")),this.eventSvc.dispatchEvent(e.createEvent(i,"cellEditingStarted")),!r?.params?.suppressPreventDefault}stopEditing(e,t=!1){if(e.onEditorAttachedFuncs=[],!e.editing)return!1;const{comp:s,column:i,rowNode:o}=e,{newValue:n,newValueExists:r}=oS(t,s),a=this.beans.valueSvc.getValueForDisplay(i,o);let l=!1;return r&&(l=nS(e,a,n,o,i)),Pc(e,!1,void 0),s.setEditDetails(),e.updateAndFormatValue(!1),e.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.eventSvc.dispatchEvent({...e.createEvent(null,"cellEditingStopped"),oldValue:a,newValue:n,valueChanged:l}),l}handleColDefChanged(e){const t=e.comp?.getCellEditor();if(t?.refresh){const{eventKey:s,cellStartedEdit:i}=e.editCompDetails.params,o=this.createCellEditorParams(e,s,i),n=e.column.getColDef(),r=ua(this.beans.userCompFactory,n,o);t.refresh(r.params)}}setFocusOutOnEditor(e){if(!e.editing)return;const t=e.comp.getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(e){if(!e.editing)return;const t=e.comp,s=t.getCellEditor();s?.focusIn?s.focusIn():(e.focusCell(!0),e.onEditorAttachedFuncs.push(()=>t.getCellEditor()?.focusIn?.()))}stopEditingAndFocus(e,t=!1,s=!1){this.stopRowOrCellEdit(e),e.focusCell(!0),t||this.navigateAfterEdit(s,e.cellPosition)}createPopupEditorWrapper(e){return new sS(e)}stopAllEditing(e=!1){this.beans.rowRenderer.getAllRowCtrls().forEach(t=>this.stopRowEditing(t,e))}stopRowEditing(e,t=!1){if(e.stoppingRowEdit)return;const s=e.getAllCellCtrls(),i=e.editing;e.stoppingRowEdit=!0;let o=!1;for(const n of s){const r=n.stopEditing(t);i&&!t&&!o&&r&&(o=!0)}o&&this.eventSvc.dispatchEvent(e.createRowEvent("rowValueChanged")),i&&this.beans.rowEditSvc?.setEditing(e,!1),e.stoppingRowEdit=!1}addStopEditingWhenGridLosesFocus(e){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;const t=s=>{const i=s.relatedTarget;if(so(i)===null){this.stopAllEditing();return}let o=e.some(n=>n.contains(i))&&Fa(this.gos,i);if(!o){const n=this.beans.popupSvc;o=!!n&&(n.getActivePopups().some(r=>r.contains(i))||n.isElementWithinCustomPopup(i))}o||this.stopAllEditing()};e.forEach(s=>this.addManagedElementListeners(s,{focusout:t}))}setInlineEditingCss(e){const t=e.editing||e.getAllCellCtrls().some(s=>s.editing);e.forEachGui(void 0,s=>{s.rowComp.addOrRemoveCssClass("ag-row-inline-editing",t),s.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!t)})}isCellEditable(e,t){if(t.group){if(this.gos.get("treeData")){if(!t.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return e.isColumnFunc(t,e.colDef.editable)}startRowOrCellEdit(e,t,s=null){return e.comp?this.gos.get("editType")==="fullRow"?this.beans.rowEditSvc?.startEditing(e.rowCtrl,t,e)??!0:this.startEditing(e,t,!0,s):(e.onCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(e,t,s)}),!0)}stopRowOrCellEdit(e,t=!1){this.gos.get("editType")==="fullRow"?this.stopRowEditing(e.rowCtrl,t):this.stopEditing(e,t)}createCellEditorParams(e,t,s){const{column:i,rowNode:o,cellPosition:{rowIndex:n}}=e,{valueSvc:r,gos:a}=this.beans;return k(a,{value:r.getValueForDisplay(i,o),eventKey:t,column:i,colDef:i.getColDef(),rowIndex:n,node:o,data:o.data,cellStartedEdit:s,onKeyDown:e.onKeyDown.bind(e),stopEditing:e.stopEditingAndFocus.bind(e),eGridCell:e.eGui,parseValue:l=>r.parseValue(i,o,l,e.value),formatValue:e.formatValue.bind(e)})}navigateAfterEdit(e,t){if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const i=e?w.UP:w.DOWN;this.beans.navigation?.navigateToNextCell(null,i,t,!1)}}};function Pc(e,t,s){e.editCompDetails=s,e.editing!==t&&(e.editing=t)}function oS(e,t){const s={newValueExists:!1};if(e)return s;const i=t.getCellEditor();return!i||i.isCancelAfterEnd&&i.isCancelAfterEnd()?s:{newValue:i.getValue(),newValueExists:!0}}function nS(e,t,s,i,o){if(s===t)return!1;e.suppressRefreshCell=!0;const n=i.setDataValue(o,s,"edit");return e.suppressRefreshCell=!1,n}var rS=class extends b{constructor(){super(...arguments),this.beanName="rowEditSvc"}startEditing(e,t=null,s=null,i=null){if(e.editing)return!0;let o=!0,n=!1;const{editSvc:r}=this.beans;return e.getAllCellCtrls().forEach(a=>{const l=a===s;l?o=r?.startEditing(a,t,l,i)??!0:r?.startEditing(a,null,l,i),n||(n=a.editing)}),n&&this.setEditing(e,!0),o}setEditing(e,t){e.editing=t,e.forEachGui(void 0,i=>i.rowComp.addOrRemoveCssClass("ag-row-editing",t));const s=t?e.createRowEvent("rowEditingStarted"):e.createRowEvent("rowEditingStopped");this.eventSvc.dispatchEvent(s)}},Ne={moduleName:"EditCore",version:F,beans:[iS,rS],apiFunctions:{getCellEditorInstances:Qb,getEditingCells:Zb,stopEditing:Xb,startEditingCell:Jb},dependsOn:[Es],css:[Lb]},Mc={moduleName:"UndoRedoEdit",version:F,beans:[Ib],apiFunctions:{undoCellEditing:qb,redoCellEditing:Yb,getCurrentUndoSize:eS,getCurrentRedoSize:tS},dependsOn:[Ne]},Ac={moduleName:"TextEditor",version:F,userComponents:{agCellEditor:Fc,agTextCellEditor:Fc},dependsOn:[Ne]},Tc={moduleName:"NumberEditor",version:F,userComponents:{agNumberCellEditor:{classImp:Wb,params:{suppressPreventDefault:!0}}},dependsOn:[Ne]},kc={moduleName:"DateEditor",version:F,userComponents:{agDateCellEditor:Hb,agDateStringCellEditor:Vb},dependsOn:[Ne]},Ic={moduleName:"CheckboxEditor",version:F,userComponents:{agCheckboxCellEditor:Ob},dependsOn:[Ne]},Lc={moduleName:"SelectEditor",version:F,userComponents:{agSelectCellEditor:_b},dependsOn:[Ne]},Oc={moduleName:"LargeTextEditor",version:F,userComponents:{agLargeTextCellEditor:Nb},dependsOn:[Ne]},Gc={moduleName:"CustomEditor",version:F,dependsOn:[Ne]},aS=class extends b{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,pt(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),Yr(e))}createColumns(e,t){const s=()=>{ss(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,n=(this.columns?.treeDepth??-1)==i,r=this.generateSelectionCols();if(qr(r,this.columns?.list??[])&&n)return;s();const{colGroupSvc:l}=this.beans,d=l?.findDepth(e.tree)??0,c=l?.balanceTreeForAutoCols(r,d)??[];this.columns={list:r,tree:c,treeDepth:d,map:{}},t(h=>{if(!h)return null;const g=h.filter(p=>!De(p));return[...r,...g]})}updateColumns(e){const t=pt(e.source),s=e.currentValue;this.columns?.list.forEach(i=>{const o=this.createSelectionColDef(s);i.setColDef(o,null,t),he(this.beans,{state:[{colId:i.getColId(),...o}]},t)})}getColumn(e){return this.columns?.list.find(t=>xo(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,s=e.get("rowSelection");if(typeof s!="object"||!$e(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&i)return!1;const o=!!ht(s),n=Qt(s);return o||n}createSelectionColDef(e){const{gos:t}=this.beans,s=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:o,spanRows:n,...r}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,d,c){const u=d.isSelected(),h=c.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:yo}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.beans.validation?.validateColDef(e,t,!0);const s=new ei(e,null,t,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(e,t,s){const i=t&&typeof t!="string"?ht(t):void 0,o=e&&typeof e!="string"?ht(e):void 0,n=i!==o,r=t&&typeof t!="string"?Qt(t):void 0,a=e&&typeof e!="string"?Qt(e):void 0,l=r!==a,d=Xs(e),c=Xs(t);(n||l||d!==c)&&this.beans.colModel.refreshAll(s)}destroy(){ss(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e){if(!this.isSelectionColumnEnabled())return;const t=this.beans,s=t.visibleCols.getAllTrees()??[];if(s.length!==0){if(!s.some(Hc)){const i=Ht(t).find(o=>De(o.colId));i&&he(t,{state:[{colId:i.colId,hide:!i.hide}]},e)}if(s.length===1){const i=s[0],o=Bc(i);if(!o)return;he(t,{state:[{colId:o.getColId(),hide:!0}]},e)}}}},Hc=e=>e.isColumn?De(e):e.getChildren()?.some(Hc)??!1;function Bc(e){if(e.isColumn)return De(e)?e:null;const t=e.getChildren()??[];for(const s of t){const i=Bc(s);if(i)return i}return null}function lS(e,t){if(!t.nodes.every(r=>r.rowPinned?(R(59),!1):r.id===void 0?(R(60),!1):!0))return;const{nodes:i,source:o,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:o??"api",newValue:n})}function dS(e,t,s="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:s,selectAll:t})}function cS(e,t,s="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:s,selectAll:t})}function uS(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function hS(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function gS(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function pS(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function fS(e){return e.selectionSvc?.getSelectedNodes()??[]}function mS(e){return e.selectionSvc?.getSelectedRows()??[]}var CS=class extends Cl{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Zt(e),this.groupSelectsDescendants=Lt(e),this.groupSelectsFiltered=Xt(e)==="filteredDescendants",this.masterSelectsDetail=Or(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Lt(e),s=Zt(e),i=Xt(e)==="filteredDescendants";this.masterSelectsDetail=Or(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,s){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,s);return i==null?0:(this.selectionCtx.selectAll=!1,"select"in i?(i.reset?this.resetNodes():this.selectRange(i.deselect,!1,s),this.selectRange(i.select,!0,s)):this.setNodesSelected({nodes:[i.node],newValue:i.newValue,clearSelection:i.clearSelection,event:e,source:s}))}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:s,nodes:i,event:o,source:n}){if(!$e(this.gos)&&e)return R(132),0;if(i.length===0)return 0;if(i.length>1&&!this.isMultiSelect())return R(130),0;let r=0;for(let a=0;a<i.length;a++){const l=i[a],d=Ni(l),c=this.groupSelectsFiltered&&d.group;if(d.rowPinned){R(59);continue}if(d.id===void 0){R(60);continue}c||this.selectRowNode(d,e,o,n)&&(this.detailSelection.delete(d.id),r++),this.groupSelectsDescendants&&d.childrenAfterGroup?.length&&(r+=this.selectChildren(d,e,n))}return s||(e&&(t||!this.isMultiSelect())&&(r+=this.clearOtherNodes(Ni(i[0]),n)),r>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),r}selectRange(e,t,s){let i=0;return e.forEach(o=>{if(o.group&&this.groupSelectsDescendants)return;this.selectRowNode(o,t,void 0,s)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),i}selectChildren(e,t,s){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((s,i)=>{e(s)&&t.set(i,s)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:i}=this.beans;if(!J(s,i))return!1;const o=i.rootNode;if(!o)return!1;t||(t=new xs(!0,o),t.active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==o){const a=this.calculateSelectedFromChildren(r);n=this.selectRowNode(r,a===null?!1:a,void 0,e)||n}}),n}clearOtherNodes(e,t){const s=new Map;let i=0;return this.selectedNodes.forEach(o=>{if(o&&o.id!==e.id){const n=this.selectedNodes.get(o.id);i+=this.setNodesSelected({nodes:[n],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsDescendants&&o.parent&&s.set(o.parent.id,o.parent)}}),s.forEach(o=>{const n=this.calculateSelectedFromChildren(o);this.selectRowNode(o,n===null?!1:n,void 0,t)}),i}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new bt(this.beans);return t.id=e.id,t.data=e.data,t.__daemon=!0,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!J(e,t))return;const s=t.getTopLevelNodes();if(s===null)return;const i=[];function o(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(s),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const s=J(this.gos);let i=!1;const o=n=>{const r=this.selectRowNode(Ni(n),!1,void 0,e);i||(i=r)};if(t==="currentPage"||t==="filtered"){if(!s){O(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);i||(i=n)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,s=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&s++)}),{selectedCount:t,notSelectedCount:s}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:s}=this.getSelectedCounts(e);return Vc(t,s)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[];if(e==="currentPage")return this.forEachNodeOnPage(i=>{if(!i.group){t.push(i);return}if(!i.expanded&&!i.footer){const o=n=>{t.push(n),n.childrenAfterFilter?.length&&n.childrenAfterFilter.forEach(o)};o(i);return}this.groupSelectsDescendants||t.push(i)}),t;const s=this.beans.rowModel;return e==="filtered"?(s.forEachNodeAfterFilter(i=>{t.push(i)}),t):(s.forEachNode(i=>{t.push(i)}),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:s}=this.beans,i=t.getFirstRow(),o=t.getLastRow();for(let n=i;n<=o;n++){const r=s.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:s}=this;if(!$e(t)){R(132);return}if(kr(t)&&!It(t)){R(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:o}=e;let n=!1;if(this.getNodesToSelect(o).forEach(r=>{const a=this.selectRowNode(Ni(r),!0,void 0,i);n||(n=a)}),s.selectAll=!0,J(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(i);n||(n=r)}n&&this.dispatchSelectionChanged(i)}getSelectionState(){const e=[];return this.selectedNodes.forEach(t=>{t?.id&&e.push(t.id)}),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e)){O(103);return}const s=new Set(e),i=[];this.beans.rowModel.forEachNode(o=>{s.has(o.id)&&i.push(o)}),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){const{gos:e,rowModel:t}=this.beans;return J(e)?!0:(O(100,{rowModelType:t.getType()}),!1)}updateSelectable(e){const{gos:t,rowModel:s}=this.beans;if(!$e(t))return;const i="selectableChanged",o=e!==void 0,n=J(t)&&this.groupSelectsDescendants,r=[],a=l=>{if(o&&!l.group)return;if(n&&l.group){const c=l.childrenAfterGroup?.some(u=>u.selectable)??!1;this.setRowSelectable(l,c,!0);return}!this.updateRowSelectable(l,!0)&&l.isSelected()&&r.push(l)};if(n){if(e===void 0){const l=s.rootNode;e=l?new xs(!1,l):void 0}e?.forEachChangedNodeDepthFirst(a,!o,!o)}else s.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:i}),!o&&n&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const s=e.detailNode?.detailGridInfo?.api;if(!s)return;const i=vS(s);if(e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!i){const n=this.detailSelection.get(e.id)??new Set;for(const r of s.getSelectedNodes())n.add(r.id);this.detailSelection.set(e.id,n)}}setDetailSelectionState(e,t,s){if(this.masterSelectsDetail){if(!It(t)){R(269);return}switch(e.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const o=[];for(const n of i){const r=s.getRowNode(n);r&&o.push(r)}s.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}default:break}}}};function Ni(e){return e.footer?e.sibling:e}function vS(e){let t=0,s=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&s++}),Vc(t,s)}function Vc(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}var Nc={moduleName:"SharedRowSelection",version:F,beans:[aS],apiFunctions:{setNodesSelected:lS,selectAll:dS,deselectAll:cS,selectAllFiltered:uS,deselectAllFiltered:hS,selectAllOnCurrentPage:gS,deselectAllOnCurrentPage:pS,getSelectedNodes:fS,getSelectedRows:mS}},zc={moduleName:"RowSelection",version:F,rowModels:["clientSide","infinite","viewport"],beans:[CS],dependsOn:[Nc]};function wS(e){e.expansionSvc?.expandAll(!0)}function bS(e){e.expansionSvc?.expandAll(!1)}function SS(e){const t=ye(e),s=kn(e);t?t.onRowHeightChanged():s&&s.onRowHeightChanged()}function yS(e,t,s){const i=kn(e);if(i){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){O(238);return}i.setRowCount(t,s);return}O(28);return}const o=Oi(e);if(o){o.setRowCount(t,s);return}}function RS(e){return rt(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function xS(e){return e.rowModel.isLastRowIndexKnown()}var Wc={moduleName:"CsrmSsrmSharedApi",version:F,apiFunctions:{expandAll:wS,collapseAll:bS,onRowHeightChanged:SS}},_c={moduleName:"SsrmInfiniteSharedApi",version:F,apiFunctions:{setRowCount:yS,getCacheBlockState:RS,isLastRowIndexKnown:xS}},FS=class extends b{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{if(!i){O(18),t||O(20);return}if(this.isGridApi(i))return i;const o=i;return"current"in o?o.current?.api:(o.api||O(19),o.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const s=[];return e.columns?e.columns.forEach(i=>{s.push(t(i))}):e.column&&s.push(t(e.column)),s}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":R(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(s=>{let i=null;s&&(i=t.getProvidedColGroup(s.getGroupId())),!(s&&!i)&&t.setColumnGroupOpened(i,s.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){const t=e.column;let s=null;const i=this.beans,{colResize:o,ctrlsSvc:n,colModel:r}=i;if(t&&(s=r.getColDefCol(t.getColId())),t&&!s)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(h=>({colId:h.colId}));he(i,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));he(i,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));he(i,{state:u},"alignedGridChanged")}break;case"columnResized":{const c=e,u={};a.forEach(h=>{u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()}}),c.flexColumns?.forEach(h=>{u[h.getId()]&&delete u[h.getId()]}),o?.setColumnWidths(Object.values(u),!1,c.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(c=>{c.setGridOption("alwaysShowVerticalScroll",d)})}},Uc={moduleName:"AlignedGrids",version:F,beans:[FS]},ES=class extends fl{constructor(){super(...arguments),this.beanName="csrmNodeSvc"}},Vn=class{constructor(){this.removals=new Set,this.updates=new Set,this.adds=new Set}remove(e){this.adds.delete(e)||(this.updates.delete(e),this.removals.add(e))}update(e){this.adds.has(e)||this.updates.add(e)}add(e){this.adds.add(e)}};function DS(e){if(V(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let s=0;s<t.length;s++){const i=t[s],o=s===0,n=s===e.childrenAfterSort.length-1;i.setFirstChild(o),i.lastChild!==n&&(i.lastChild=n,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==s&&(i.childIndex=s,i.dispatchRowEvent("childIndexChanged"))}}function $c(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),DS(e)}var PS=class extends b{constructor(){super(...arguments),this.beanName="sortStage",this.refreshProps=new Set(["postSortRows","groupDisplayType","accentedSort"]),this.step="sort"}execute(e){const t=this.beans,s=t.sortSvc.getSortOptions(),i=x(s)&&s.length>0,o=i&&!!e.changedRowNodes&&this.gos.get("deltaSort"),n=s.some(({column:r})=>be(t.gos)?r.isPrimary()&&r.isRowGroupActive():!!r.getColDef().showRowGroup);this.sort(t,s,i,o,e.changedRowNodes,e.changedPath,n)}sort(e,t,s,i,o,n,r){const{gos:a,colModel:l,rowGroupColsSvc:d,groupHideOpenParentsSvc:c,rowNodeSorter:u}=e,h=a.get("groupMaintainOrder"),g=l.getCols().some(C=>C.isRowGroupActive()),p=l.isPivotMode(),f=a.getCallback("postSortRows"),m=C=>{c?.pullDownGroupDataForHideOpenParents(C.childrenAfterAggFilter,!0);const v=p&&C.leafGroup,S=h&&g&&!C.leafGroup&&!r;let y;if(S){const M=d?.columns?.[C.level+1]?.getSort()===null,A=C.childrenAfterAggFilter.slice(0);if(C.childrenAfterSort&&!M){const T={};C.childrenAfterSort.forEach((P,G)=>{T[P.id]=G}),A.sort((P,G)=>(T[P.id]??0)-(T[G.id]??0))}y=A}else!s||v?y=C.childrenAfterAggFilter.slice(0):i&&o?y=MS(u,C,o,n,t):y=u.doFullSort(C.childrenAfterAggFilter,t);if(C.childrenAfterSort=y,$c(C),f){const D={nodes:C.childrenAfterSort};f(D)}};n?.forEachChangedNodeDepthFirst(m)}};function MS(e,t,s,i,o){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,o);const a=new Set,l=[],{updates:d,adds:c}=s;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p.id)}const u=r.filter(h=>a.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return l.sort((h,g)=>e.compareRowNodes(o,h,g)),AS(e,o,l,u)}function AS(e,t,s,i){const o=[];let n=0,r=0;const a=s.length,l=i.length;for(;n<a&&r<l;){const d=s[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),o.push(h.rowNode)}for(;n<a;)o.push(s[n++].rowNode);for(;r<l;)o.push(i[r++].rowNode);return o}var TS=class extends b{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowsToDisplay=[],this.started=!1,this.isRefreshingModel=!1,this.rowNodesCountReady=!1,this.rowCountReady=!1,this.onRowHeightChanged_debounced=Y(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.valueCache=e.valueCache,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggStage=e.aggStage,this.pivotStage=e.pivotStage,this.filterAggStage=e.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(i=>!!i);const e=this.refreshModel.bind(this,{step:"group"}),t=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:t,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new bt(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:e,beans:t}=this;let s;return e.get("treeData")&&(e.get("treeDataChildrenField")?s=t.csrmChildrenTreeNodeSvc:s=t.csrmPathTreeNodeSvc),s??t.csrmNodeSvc}addPropertyListeners(){const e=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:t})=>[...t])];this.addManagedPropertyListeners(e,t=>{const s=t.changeSet?.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,s,i){let o,n=!1;do{o=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,s),d=Math.min(a,i);for(let c=l;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const h=at(this.beans,u);u.setRowHeight(h.height),o=!0,n=!0}}o&&this.setRowTopAndRowIndex()}while(o);return n}onPropChange(e){if(!this.rootNode)return;const t=this.gos,s=new Set(e),i={step:"nothing",changedProps:s},o=s.has("rowData"),n=s.has("treeData"),r=this.nodeManager,a=this.getNewNodeManager(),l=r!==a||s.has("treeDataChildrenField")&&t.get("treeData");let d;if(n&&(i.step="group"),(l||o)&&(d=t.get("rowData"),d!=null&&!Array.isArray(d)&&(d=null,R(1))),l&&(o||(d=r?.extractRowData()??d),r!==a&&(r?.deactivate(),this.nodeManager=a),a.activate(this.rootNode)),d&&(!l&&!this.isEmpty()&&d.length>0&&t.exists("getRowId")&&!t.get("resetRowDataOnUpdate")?(i.keepRenderedRows=!0,i.animate=!this.gos.get("suppressAnimationFrame"),i.changedRowNodes=new Vn,a.setImmutableRowData(i,d)):(i.rowDataUpdated=!0,i.newData=!0,this.beans.selectionSvc?.reset("rowDataChanged"),this.rowNodesCountReady=!0,a.setNewRowData(d))),i.rowDataUpdated)i.step="group";else if(i.step==="nothing"){for(const{refreshProps:c,step:u}of this.orderedStages)if(e.some(h=>c.has(h))){i.step=u;break}}i.step!=="nothing"&&this.refreshModel(i)}setRowTopAndRowIndex(){const{beans:e}=this,t=e.environment.getDefaultRowHeight();let s=0;const i=new Set,o=Q(this.gos,"normal"),n=this.rowsToDisplay;for(let r=0,a=n.length;r<a;++r){const l=n[r];if(l.id!=null&&i.add(l.id),l.rowHeight==null){const d=at(e,l,o,t);l.setRowHeight(d.height,d.estimated)}l.setRowTop(s),l.setRowIndex(r),s+=l.rowHeight}return i}clearRowTopAndRowIndex(e,t){const s=e.active,i=n=>{n&&n.id!=null&&!t.has(n.id)&&n.clearRowTopAndRowIndex()},o=n=>{if(n!==null&&(i(n),i(n.detailNode),i(n.sibling),n.hasChildren()&&n.childrenAfterGroup)){const r=n.level==-1;s&&!r&&!n.expanded||n.childrenAfterGroup.forEach(o)}};o(this.rootNode)}ensureRowsAtPixel(e,t,s=0){const i=this.getRowIndexAtPixel(t),o=this.getRow(i),n=!this.gos.get("suppressAnimationFrame");if(o===e[0])return!1;const r=this.rootNode?.allLeafChildren;return r?(e.forEach(a=>{ue(r,a)}),e.forEach((a,l)=>{r.splice(Math.max(i+s,0)+l,0,a)}),e.forEach((a,l)=>{a.sourceRowIndex=l}),this.refreshModel({step:"group",keepRenderedRows:!0,animate:n,rowNodesOrderChanged:!0}),!0):!1}highlightRowAtPixel(e,t){const s=t!=null?this.getRowIndexAtPixel(t):null,i=s!=null?this.getRow(s):null;if(!i||!e||t==null){this.clearHighlightedRow();return}const o=this.getHighlightPosition(t,i),n=this.isHighlightingCurrentPosition(e,i,o),r=this.lastHighlightedRow!=null&&this.lastHighlightedRow!==i;(n||r)&&(this.clearHighlightedRow(),n)||(this.setRowNodeHighlighted(i,o),this.lastHighlightedRow=i)}setRowNodeHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchRowEvent("rowHighlightChanged"))}getHighlightPosition(e,t){if(!t){const o=this.getRowIndexAtPixel(e);if(t=this.getRow(o||0),!t)return"Below"}const{rowTop:s,rowHeight:i}=t;return e-s<i/2?"Above":"Below"}getLastHighlightedRowNode(){return this.lastHighlightedRow}isHighlightingCurrentPosition(e,t,s){if(e===t)return!0;const i=s==="Above"?-1:1;return this.getRow(t.rowIndex+i)===e}clearHighlightedRow(){this.lastHighlightedRow&&(this.setRowNodeHighlighted(this.lastHighlightedRow,null),this.lastHighlightedRow=null)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const e=this.rootNode;if(!e||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===e)return 1;const s=e.childrenAfterAggFilter,i=e.sibling?1:0;return(s?s.length:0)+i}getTopLevelRowDisplayedIndex(e){const{rootNode:t,rowsToDisplay:s}=this;if(!t||!s.length||s[0]===t)return e;const{childrenAfterSort:o}=t,n=a=>{let l=o[a];if(this.gos.get("groupHideOpenParents"))for(;l.expanded&&l.childrenAfterSort&&l.childrenAfterSort.length>0;)l=l.childrenAfterSort[0];return l.rowIndex},{footerSvc:r}=this.beans;return r?r.getTopDisplayIndex(s,e,o,n):n(e)}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=ct(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=ct(this.gos),i=e.columns.length===0||e.columns.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=ct(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new xs(!1,this.rootNode);return e||(t.active=!1),t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:s,rowDataUpdated:i}=e;return!(!t||s||!i||t.removals.size||t.adds.size)}refreshModel(e){if(!this.rootNode)return;const t=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&!!e.rowDataUpdated));if(this.nodeManager.refreshModel?.(e,this.started),this.eventSvc.dispatchEvent({type:"beforeRefreshModel",params:e}),!this.started||(e.rowDataUpdated&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)))return;switch(this.isRefreshingModel=!0,e.step){case"group":this.doRowGrouping(e.changedRowNodes,t,!!e.rowNodesOrderChanged,!!e.afterColumnsChanged);case"filter":this.doFilter(t);case"pivot":this.doPivot(t);case"aggregate":this.doAggregate(t);case"filter_aggregates":this.doFilterAggregates(t);case"sort":this.doSort(e.changedRowNodes,t);case"map":this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(t,s),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?.allLeafChildren?.length||!this.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let s=!1,i=!1;const o=[],n=Lt(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(i)return;if(s&&(r===t||r===e)&&(i=!0,r.group&&n)){o.push(...r.allLeafChildren);return}if(!s){if(r!==t&&r!==e)return;s=!0}if(!r.group||!n){o.push(r);return}}),o}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay;if(this.isEmpty()||t.length===0)return-1;let s=0,i=t.length-1;if(e<=0)return 0;if(H(t).rowTop<=e)return t.length-1;let n=-1,r=-1;for(;;){const a=Math.floor((s+i)/2),l=t[a];if(this.isRowInPixel(l,e)||(l.rowTop<e?s=a+1:l.rowTop>e&&(i=a-1),n===s&&r===i))return a;n=s,r=i}}isRowInPixel(e,t){const s=e.rowTop,i=e.rowTop+e.rowHeight;return s<=t&&i>t}forEachLeafNode(e){this.rootNode?.allLeafChildren?.forEach((t,s)=>e(t,s))}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){this.rowsToDisplay.forEach(e)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterSort)}forEachPivotNode(e,t=!1,s=!1){const i=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,o=>o.leafGroup?null:o[i])}depthFirstSearchRowNodes(e,t=!1,s=n=>n.childrenAfterGroup,i=this.rootNode,o=0){let n=o;if(!i)return n;const r=i===this.rootNode;r||e(i,n++);const{footerSvc:a}=this.beans;if(i.hasChildren()&&!i.footer){const l=s(i);if(l){n=a?.addTotalRows(n,i,e,t,r,"top")??n;for(const d of l)n=this.depthFirstSearchRowNodes(e,t,s,d,n);return a?.addTotalRows(n,i,e,t,r,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:t,changedPath:e}):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const{groupHideOpenParentsSvc:s}=this.beans;this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t}):t.forEachChangedNodeDepthFirst(i=>{s?.pullDownGroupDataForHideOpenParents(i.childrenAfterAggFilter,!0),i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),$c(i)}),s?.updateGroupDataForHideOpenParents(t)}doRowGrouping(e,t,s,i){const o=this.nodeManager.treeData,n=this.rootNode;if(!o){const r=this.groupStage;if(r)r.execute({rowNode:n,changedPath:t,changedRowNodes:e,rowNodesOrderChanged:s,afterColumnsChanged:i});else{const a=n.sibling;n.childrenAfterGroup=n.allLeafChildren,a&&(a.childrenAfterGroup=n.childrenAfterGroup),n.updateHasChildren()}}this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:e}):e.forEachChangedNodeDepthFirst(t=>{t.childrenAfterFilter=t.childrenAfterGroup,Qd(t)},!0)}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){if(typeof e=="string"&&e.indexOf(gi)==0){let s;return this.forEachNode(i=>{i.id===e&&(s=i)}),s}return this.nodeManager.getRowNode(e)}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const s=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},s)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache?.onDataChanged();const e=[],t=[],s=new Vn;let i=!1;this.rowDataTransactionBatch?.forEach(o=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:n,rowsInserted:r}=this.nodeManager.updateRowData(o.rowDataTransaction,s);r&&(i=!0),t.push(n),o.callback&&e.push(o.callback.bind(null,n))}),this.commitTransactions(i,s),e.length>0&&window.setTimeout(()=>{e.forEach(o=>o())},0),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const t=new Vn,{rowNodeTransaction:s,rowsInserted:i}=this.nodeManager.updateRowData(e,t);return this.commitTransactions(i,t),s}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:e,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:t,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:e,rootNode:t}=this;let s;if(e)s=e.execute({rowNode:t});else{s=t?.childrenAfterSort??[];for(const i of s)i.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0),e.sibling&&e.sibling.setRowHeight(e.sibling.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const s=t.detailNode;s&&s.setRowHeight(s.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.beans.rowAutoHeight?.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlightedRow(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.lastHighlightedRow=null,this.orderedStages=So,this.rowsToDisplay=So}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function kS(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function IS(e,t){const s=ye(e);s&&((!t||t==="everything")&&(t="group"),s.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function LS(e){return ye(e)?.isEmpty()??!0}function OS(e,t){ye(e)?.forEachLeafNode(t)}function GS(e,t){ye(e)?.forEachNodeAfterFilter(t)}function HS(e,t){ye(e)?.forEachNodeAfterFilterAndSort(t)}function BS(e){if(e.rowAutoHeight?.active){R(3);return}ye(e)?.resetRowHeights()}function VS(e,t){return e.frameworkOverrides.wrapIncoming(()=>ye(e)?.updateRowData(t))}function NS(e,t,s){e.frameworkOverrides.wrapIncoming(()=>ye(e)?.batchUpdateRowData(t,s))}function zS(e){e.frameworkOverrides.wrapIncoming(()=>ye(e)?.flushAsyncTransactions())}function WS(e){return e.selectionSvc?.getBestCostNodeSelection()}var Kc={moduleName:"ClientSideRowModel",version:F,rowModels:["clientSide"],beans:[ES,TS,PS],dependsOn:[An]},jc={moduleName:"ClientSideRowModelApi",version:F,apiFunctions:{onGroupExpandedOrCollapsed:kS,refreshClientSideRowModel:IS,isRowDataEmpty:LS,forEachLeafNode:OS,forEachNodeAfterFilter:GS,forEachNodeAfterFilterAndSort:HS,resetRowHeights:BS,applyTransaction:VS,applyTransactionAsync:NS,flushAsyncTransactions:zS,getBestCostNodeSelection:WS},dependsOn:[Wc]},_S=class extends b{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:s,columnKeys:i,skipRowGroups:o,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:s,skipRowGroups:o,columnKeys:i,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,s,i){const o=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,d=!!i.footer,c=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&Ar(this.gos,i);if(!l&&!d&&(t.skipRowGroups||c||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.level===-1&&!l&&!d||o(k(this.gos,{node:i})))return;const g=e.onNewBodyRow(i);if(s.forEach((p,f)=>{g.onColumn(p,f,i)}),t.getCustomContentBelowRow){const p=t.getCustomContentBelowRow(k(this.gos,{node:i}));p&&e.addCustomContent(p)}}appendContent(e){return t=>{const s=e.appendContent;return s&&t.addCustomContent(s),t}}prependContent(e){return t=>{const s=e.prependContent;return s&&t.addCustomContent(s),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return s=>{if(!e.skipColumnGroupHeaders){const i=new Fo,{colGroupSvc:o}=this.beans,n=o?o.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,s,e.processGroupHeaderCallback)}return s}}exportHeaders(e,t){return s=>{if(!e.skipColumnHeaders){const i=s.onNewHeaderRow();t.forEach((o,n)=>{i.onColumn(o,n,void 0)})}return s}}processPinnedTopRows(e,t){return s=>{const i=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="top").sort((o,n)=>o.rowIndex-n.rowIndex).map(o=>this.pinnedRowModel?.getPinnedTopRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.forEachPinnedRow("top",i),s}}processRows(e,t){return s=>{const i=this.rowModel,o=J(this.gos,i),n=rt(this.gos,i),r=!o&&e.onlySelected,a=this.processRow.bind(this,s,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)return e.rowPositions.filter(d=>d.rowPinned==null).sort((d,c)=>d.rowIndex-c.rowIndex).map(d=>i.getRow(d.rowIndex)).forEach(a),s;if(this.colModel.isPivotMode())return o?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a),s;if(e.onlySelectedAllPages||r){const d=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(d),d.forEach(a)}else l==="all"?i.forEachNode(a):o||n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return s}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:s}=this.beans;if(!t||!s)return;const i=t.getSortOptions(),o=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?s.compareRowNodes(i,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):o(n.parent,r.parent):n.level>r.level?o(n.parent,r):o(n,r.parent);e.sort(o)}processPinnedBottomRows(e,t){return s=>{const i=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="bottom").sort((o,n)=>o.rowIndex-n.rowIndex).map(o=>this.pinnedRowModel?.getPinnedBottomRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.forEachPinnedRow("bottom",i),s}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:s=!1,exportRowNumbers:i=!1,columnKeys:o}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),d=h=>De(h)?!1:!Ot(h)||i;if(o&&o.length)return n.getColsForKeys(o).filter(d);const c=r.get("treeData");let u=[];return t&&!l?u=n.getCols():u=a.allCols,u=u.filter(h=>d(h)&&(s&&!c?!ti(h):!0)),u}recursivelyAddHeaderGroups(e,t,s){const i=[];e.forEach(o=>{const n=o;n.getChildren&&n.getChildren().forEach(r=>i.push(r))}),e.length>0&&W(e[0])&&this.doAddHeaderHeader(t,e,s),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,s)}doAddHeaderHeader(e,t,s){const i=e.onNewHeaderGroupingRow();let o=0;t.forEach(n=>{const r=n;let a;s?a=s(k(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const l=r.getLeafColumns().reduce((d,c,u,h)=>{let g=H(d);return c.getColumnGroupShow()==="open"?(!g||g[1]!=null)&&(g=[u],d.push(g)):g&&g[1]==null&&(g[1]=u-1),u===h.length-1&&g&&g[1]==null&&(g[1]=u),d},[]);i.onColumn(r,a||"",o++,r.getLeafColumns().length-1,l)})}},qc={moduleName:"SharedExport",version:F,beans:[_S]},Yc=`\r
`,US=class extends _d{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:s}=e;this.suppressQuotes=t,this.columnSeparator=s}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,Yc),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(s.data.value||""),s.mergeAcross&&this.appendEmptyCells(s.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,s,i){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,s){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue(e,t,t,"csv",s);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(R(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Yc),this.isFirstLine=!1}},$S=class extends Wd{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){R(51);return}const t=this.getMergedParams(e),s=this.getData(t),i=new Blob(["\uFEFF",s],{type:"text/plain"}),o=typeof t.fileName=="function"?t.fileName(k(this.gos,{})):t.fileName;Ud(this.getFileName(o),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const s=t?Object.assign({},e):this.getMergedParams(e);return this.getData(s)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:s,rowGroupColsSvc:i,valueSvc:o,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d,suppressQuotes:c,columnSeparator:u}=e;return new US({colModel:t,colNames:s,valueSvc:o,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:d||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:i})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function KS(e,t){return e.csvCreator?.getDataAsCsv(t)}function jS(e,t){e.csvCreator?.exportDataAsCsv(t)}var Qc={moduleName:"CsvExport",version:F,beans:[$S],apiFunctions:{getDataAsCsv:KS,exportDataAsCsv:jS},dependsOn:[qc]},qS=class extends b{constructor(e,t,s){super(),this.id=e,this.parentCache=t,this.params=s,this.state="needsLoading",this.version=0,this.startRow=e*s.blockSize,this.endRow=this.startRow+s.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,s){this.successCommon(e,{rowData:t,rowCount:s})}isRequestMostRecentAndLive(e){const t=e===this.version,s=this.isAlive();return t&&s}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:s,beans:i,rowNodes:o}=this;for(let n=0;n<e;n++){const r=s+n,a=new bt(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:i}}}setDataAndId(e,t,s){x(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(V(this.params.datasource.getRows)){R(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:i,filterModel:o},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:i,filterModel:o,context:k(n,{}).context}}forEachNode(e,t,s){this.rowNodes.forEach((i,o)=>{this.startRow+o<s&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const s=e-this.startRow;return this.rowNodes[s]}processServerResult(e){const{rowNodes:t,beans:s}=this;t.forEach((o,n)=>{const r=e.rowData?e.rowData[n]:void 0;!o.id&&o.alreadyRendered&&r&&(t[n]=new bt(s),t[n].setRowIndex(o.rowIndex),t[n].setRowTop(o.rowTop),t[n].setRowHeight(o.rowHeight),o.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()}),super.destroy()}},YS=2,QS=class extends b{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const s=Math.floor(e/this.params.blockSize);let i=this.blocks[s];if(!i){if(t)return;i=this.createBlock(s)}return i.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new qS(e,this,t));return this.blocks[s.id]=s,this.blockCount++,this.purgeBlocksIfNeeded(s),t.rowNodeBlockLoader.addBlock(s),s}refreshCache(){if(this.blockCount==0){this.purgeCache();return}this.getBlocksInOrder().forEach(t=>t.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e)),super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Ue(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),s=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(s);const i=this.params.maxBlocksInCache>0,o=i?this.params.maxBlocksInCache-1:null,n=YS-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,d=i?a>=o:!1;if(l||d){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:s,endRow:i}=e;return t.rowIndex>=s&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:s}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,s-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:s,overflowSize:i}=this.params,n=(e.id+1)*s+i;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,x(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};this.getBlocksInOrder().forEach(s=>s.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){const e=(s,i)=>s.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];this.getBlocksInOrder().forEach(t=>{t.id*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(t=>this.destroyBlock(t))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const s=[];let i=-1,o=!1;const n={value:0};let r=!1;return this.getBlocksInOrder().forEach(l=>{if(!r){if(o&&i+1!==l.id){r=!0;return}i=l.id,l.forEachNode(d=>{const c=d===e||d===t;(o||c)&&s.push(d),c&&(o=!o)},n,this.rowCount)}}),r||o?[]:s}},ZS=class extends b{constructor(){super(...arguments),this.beanName="rowModel"}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){this.gos.get("rowModelType")==="infinite"&&(this.rowHeight=Ke(this.beans),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()))}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Ke(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!Tt(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;ut(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:s,rowNodeBlockLoader:i,eventSvc:o,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Ke(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new QS(this.cacheParams)),o.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(s=>{s.id===e&&(t=s)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),s=this.getRowCount()-1;return t>s?s:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}};function XS(e){Oi(e)?.refreshCache()}function JS(e){Oi(e)?.purgeCache()}function ey(e){return Oi(e)?.getRowCount()}var ty=class extends b{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Tr(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Y(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ue(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Ue(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(s=>s.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length,t.forEach(s=>s.load()),this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:s,state:i}=t.getBlockStateJson();e[s]=i}),e}printCacheStatus(){Ue(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},sy={moduleName:"InfiniteRowModelCore",version:F,rowModels:["infinite"],beans:[ZS,ty]},Zc={moduleName:"InfiniteRowModel",version:F,apiFunctions:{refreshInfiniteCache:XS,purgeInfiniteCache:JS,getInfiniteRowCount:ey},dependsOn:[sy,_c]},iy="\u2191",oy="\u2193",ny=class extends L{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");const s=document.createElement("span");s.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(s),this.setTemplateFromElement(e)}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),i=e.formatValue(s),o=x(i)?i:s,n=t>=0,r=this.eDelta;n?r.textContent=iy+o:r.textContent=oy+o,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Z(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:i}=e,{eValue:o,lastValue:n,beans:r}=this;if(s===n||(x(i)?o.textContent=i:x(s)?o.textContent=s:Z(o),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof s=="number"&&typeof n=="number"){const a=s-n;this.showDelta(e,a)}return n&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},ry=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",ay=class extends L{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current"),this.registerCSS(ry)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const{beans:t,eCurrent:s}=this,i=_(t).createElement("span");i.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=i,i.textContent=s.textContent,this.getGui().insertBefore(i,s),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let s=e.value;if(V(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const i=this.eCurrent;return x(e.valueFormatted)?i.textContent=e.valueFormatted:x(e.value)?i.textContent=s:Z(i),!0}},ly=class extends b{constructor(){super(...arguments),this.beanName="cellFlashSvc"}onFlashCells(e,t){if(!e.comp)return;const s=Ma(e.cellPosition);t.cells[s]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}animateCell(e,t,s,i){const o=e.comp;if(!o)return;const{gos:n}=this;if(s||(s=n.get("cellFlashDuration")),s===0)return;x(i)||(i=n.get("cellFadeDuration"));const r=`ag-cell-${t}`,a=`ag-cell-${t}-animation`;o.addOrRemoveCssClass(r,!0),o.addOrRemoveCssClass(a,!1);const l=e.eGui;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e.isAlive()&&(o.addOrRemoveCssClass(r,!1),o.addOrRemoveCssClass(a,!0),l.style.transition=`background-color ${i}ms`,window.setTimeout(()=>{e.isAlive()&&(o.addOrRemoveCssClass(a,!1),l.style.transition="")},i))},s)})}};function dy(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>s.flashCell(i,t))})}var Xc={moduleName:"HighlightChanges",version:F,beans:[ly],userComponents:{agAnimateShowChangeCellRenderer:ny,agAnimateSlideCellRenderer:ay},apiFunctions:{flashCells:dy}};function cy(e){return e.stateSvc?.getState()??{}}function uy(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=hy(e)}return e}function hy(e){return e.cellSelection=gy(e,"rangeSelection"),e}function gy(e,t){if(e&&typeof e=="object")return e[t]}var py=class extends b{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Y(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Y(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=Y(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=J(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",F);const e=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>e(()=>this.setupStateOnGridReady()));const[t,s,i]=this.addManagedEventListeners({newColumnsLoaded:({source:o})=>{o==="gridInitializing"&&(t(),e(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{s?.(),e(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{i?.(),e(()=>this.setupStateOnFirstDataRendered())}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getInitialState(){return uy(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){const e=()=>this.updateCachedState("sideBar",this.getSideBarState());e(),this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){const e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());const t=s=>()=>this.updateColumnState([s]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){const{filter:e,rowGroupExpansion:t,rowSelection:s,pagination:i}=this.getInitialState();e&&this.setFilterState(e),t&&this.setRowGroupExpansionState(t),s&&this.setRowSelectionState(s),i&&this.setPaginationState(i);const o=this.updateCachedState.bind(this);o("filter",this.getFilterState()),o("rowGroupExpansion",this.getRowGroupExpansionState()),o("rowSelection",this.getRowSelectionState()),o("pagination",this.getPaginationState());const n=()=>{this.updateRowGroupExpansionStateTimer=0,o("rowGroupExpansion",this.getRowGroupExpansionState())};this.addManagedEventListeners({filterChanged:()=>o("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{this.gos.get("groupDefaultExpanded")!==0&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&o("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){const{scroll:e,cellSelection:t,focusedCell:s,columnOrder:i}=this.getInitialState();s&&this.setFocusedCellState(s),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!i?.orderedColIds);const o=this.updateCachedState.bind(this);o("sideBar",this.getSideBarState()),o("focusedCell",this.getFocusedCellState());const n=this.getRangeSelectionState();o("rangeSelection",n),o("cellSelection",n),o("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>o("focusedCell",this.getFocusedCellState()),cellSelectionChanged:r=>{if(r.finished){const a=this.getRangeSelectionState();o("rangeSelection",a),o("cellSelection",a)}},bodyScrollEnd:()=>o("scroll",this.getScrollState())})}getColumnState(){const e=this.beans,t=e.colModel.isPivotMode(),s=[],i=[],o=[],n=[],r=[],a=[],l=[],d=[],c=[];let u=0;const h=Ht(e);for(let g=0;g<h.length;g++){const{colId:p,sort:f,sortIndex:m,rowGroup:C,rowGroupIndex:v,aggFunc:S,pivot:y,pivotIndex:D,pinned:M,hide:A,width:T,flex:P}=h[g];c.push(p),f&&(s[m??u++]={colId:p,sort:f}),C&&(i[v??0]=p),typeof S=="string"&&o.push({colId:p,aggFunc:S}),y&&(n[D??0]=p),M&&(M==="right"?a:r).push(p),A&&l.push(p),(P!=null||T)&&d.push({colId:p,flex:P??void 0,width:T})}return{sort:s.length?{sortModel:s}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:o.length?{aggregationModel:o}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}setColumnState(e){const{sort:t,rowGroup:s,aggregation:i,pivot:o,columnPinning:n,columnVisibility:r,columnSizing:a,columnOrder:l,partialColumnState:d}=e,c={},u=m=>{let C=c[m];return C||(C={colId:m},c[m]=C,C)},h=d?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:m,sort:C},v)=>{const S=u(m);S.sort=C,S.sortIndex=v}),h.sort=null,h.sortIndex=null),s&&(s.groupColIds.forEach((m,C)=>{const v=u(m);v.rowGroup=!0,v.rowGroupIndex=C}),h.rowGroup=null,h.rowGroupIndex=null),i&&(i.aggregationModel.forEach(({colId:m,aggFunc:C})=>{u(m).aggFunc=C}),h.aggFunc=null),o&&(o.pivotColIds.forEach((m,C)=>{const v=u(m);v.pivot=!0,v.pivotIndex=C}),this.gos.updateGridOptions({options:{pivotMode:o.pivotMode},source:"gridInitializing"}),h.pivot=null,h.pivotIndex=null),n&&(n.leftColIds.forEach(m=>{u(m).pinned="left"}),n.rightColIds.forEach(m=>{u(m).pinned="right"}),h.pinned=null),r&&(r.hiddenColIds.forEach(m=>{u(m).hide=!0}),h.hide=null),a&&(a.columnSizingModel.forEach(({colId:m,flex:C,width:v})=>{const S=u(m);S.flex=C??null,S.width=v}),h.flex=null);const g=l?.orderedColIds,p=!!g?.length,f=p?g.map(m=>u(m)):Object.values(c);f.length&&(this.columnStates=f,he(this.beans,{state:f,applyOrder:p,defaultState:h},"gridInitializing"))}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const s=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:o,colGroupSvc:n}=i;if(o?.isPivotResultColsPresent()){if(t){const r=[];for(const a of t)o.getPivotResultCol(a.colId)&&r.push(a);he(i,{state:r,applyOrder:e},"gridInitializing")}s&&n?.setColumnGroupState(s,"gridInitializing")}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState(),s=[];return t.forEach(({groupId:i,open:o})=>{o&&s.push(i)}),s.length?{openColumnGroupIds:s}:void 0}setColumnGroupState(e){const t=this.beans.colGroupSvc;if(!Object.prototype.hasOwnProperty.call(e,"columnGroup")||!t)return;const s=new Set(e.columnGroup?.openColumnGroupIds),o=t.getColumnGroupState().map(({groupId:n})=>{const r=s.has(n);return r&&s.delete(n),{groupId:n,open:r}});s.forEach(n=>{o.push({groupId:n,open:!0})}),o.length&&(this.columnGroupStates=o),t.setColumnGroupState(o,"gridInitializing")}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const s=e?.getAdvFilterModel()??void 0;return t||s?{filterModel:t,advancedFilterModel:s}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:s,advancedFilterModel:i}=e??{};s&&t?.setFilterModel(s,"columnFilter"),i&&t?.setAdvFilterModel(i,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:i,startRow:o,endRow:n,columns:r,startColumn:a}=t;return{id:s,type:i,startRow:o,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:i,visibleCols:o}=this.beans;if(!xe(t)||!s)return;const n=[];e.cellRanges.forEach(r=>{const a=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&a.push(c)}),!a.length)return;let l=i.getCol(r.startColId);if(!l){const d=o.allCols,c=new Set(a);l=d.find(u=>c.has(u))}n.push({...r,columns:a,startColumn:l})}),s.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:s}=e?.getVScrollPosition()??{top:0};return s||t?{top:s,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:s}=e,{frameworkOverrides:i,rowRenderer:o,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:s,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:s,rowPinned:i}=e,{focusSvc:o,colModel:n}=this.beans;o.setFocusedCell({column:n.getCol(t),rowIndex:s,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!i))return{page:s,pageSize:i}}setPaginationState(e){const{pagination:t,gos:s}=this.beans;t&&(e.pageSize&&!s.get("paginationAutoPageSize")&&t.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&t.setPage(e.page))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e){this.beans.selectionSvc?.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const s=[];return t.forEachNode(({expanded:i,id:o})=>{i&&o&&s.push(o)}),s.length?{expandedRowGroupIds:s}:void 0}setRowGroupExpansionState(e){this.beans.expansionSvc?.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let s=!1;const i=this.cachedState;for(const o of Object.keys(t)){const n=t[o];Tt(n,i[o])||(s=!0)}this.cachedState={...i,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),Tt(t,s)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0;const t=this.beans.colAnimation;t?.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(t?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},Jc={moduleName:"GridState",version:F,beans:[py],apiFunctions:{getState:cy}};function fy(e){return e.rowModel.isLastRowIndexKnown()}function my(e){return e.pagination?.getPageSize()??100}function Cy(e){return e.pagination?.getCurrentPage()??0}function vy(e){return e.pagination?.getTotalPages()??1}function wy(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function by(e){e.pagination?.goToNextPage()}function Sy(e){e.pagination?.goToPreviousPage()}function yy(e){e.pagination?.goToFirstPage()}function Ry(e){e.pagination?.goToLastPage()}function xy(e,t){e.pagination?.goToPage(t)}var Fy=class extends b{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,s=()=>{const i=Math.max(Ke(t),1),o=Math.floor(e/i);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?Y(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},As="paginationPageSizeSelector",Ey=class extends L{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(As,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){Z(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(As)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const o=this.gos.exists("paginationPageSize"),n=this.gos.get(As)!==!0;R(94,{pageSizeSet:o,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||R(95,{paginationPageSizeOption:t,paginationPageSizeSelector:As}),e.unshift("")}const i=String(s?"":t);this.selectPageSizeComp?(je(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),i=s("pageSizeSelectorLabel","Page Size:"),o=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new xi).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(As);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,i)=>s-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},Dy={selector:"AG-PAGE-SIZE-SELECTOR",component:Ey},Py=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",My=class extends en{constructor(){super(),this.btFirst=E,this.btPrevious=E,this.btNext=E,this.btLast=E,this.lbRecordCount=E,this.lbFirstRowOnPage=E,this.lbLastRowOnPage=E,this.lbCurrent=E,this.lbTotal=E,this.pageSizeComp=E,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(Py)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[Dy]);const{btFirst:t,btPrevious:s,btNext:i,btLast:o}=this;this.activateTabIndex([t,s,i,o]),t.insertAdjacentElement("afterbegin",ge(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",ge(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",ge(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",ge(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):ya(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:t,fn:s}=e;this.addManagedListeners(t,{click:s,keydown:i=>{(i.key===w.ENTER||i.key===w.SPACE)&&(i.preventDefault(),s())}})}),Sa(this.beans,this,this.getGui()),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):zd(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=e("page","Page"),s=e("to","to"),i=e("of","of"),o=e("firstPage","First Page"),n=e("previousPage","Previous Page"),r=e("nextPage","Next Page"),a=e("lastPage","Last Page"),l=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${l}">
                <ag-page-size-selector data-ref="pageSizeComp"></ag-page-size-selector>
                <span class="ag-paging-row-summary-panel">
                    <span id="ag-${l}-first-row" data-ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
                    <span id="ag-${l}-to">${s}</span>
                    <span id="ag-${l}-last-row" data-ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
                    <span id="ag-${l}-of">${i}</span>
                    <span id="ag-${l}-row-count" data-ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
                </span>
                <span class="ag-paging-page-summary-panel" role="presentation">
                    <div data-ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
                    <div data-ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>
                    <span class="ag-paging-description">
                        <span id="ag-${l}-start-page">${t}</span>
                        <span id="ag-${l}-start-page-number" data-ref="lbCurrent" class="ag-paging-number"></span>
                        <span id="ag-${l}-of-page">${i}</span>
                        <span id="ag-${l}-of-page-number" data-ref="lbTotal" class="ag-paging-number"></span>
                    </span>
                    <div data-ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
                    <div data-ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>
                </span>
            </div>`}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),s=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),o=e===s-1;this.nextButtonDisabled=o||i,this.lastButtonDisabled=!t||i||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){jn(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),s=this.pagination.getMasterRowCount(),i=e?s:null;if(i===1){const v=this.rowModel.getRow(0);if(v&&v.group&&!(v.groupData||v.aggData)){this.setTotalLabelsToZero();return}}const o=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*o+1,a=r+n-1,e&&a>i&&(a=i));const l=r+n-1,d=!e&&s<l,c=this.formatNumber(r);this.lbFirstRowOnPage.textContent=c;let u;const h=this.getLocaleTextFunc();d?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const p=t>0?o+1:0,f=this.formatNumber(p);this.lbCurrent.textContent=f;let m,C;if(e)m=this.formatNumber(t),C=this.formatNumber(i);else{const v=h("more","more");m=v,C=v}this.lbTotal.textContent=m,this.lbRecordCount.textContent=C,this.announceAriaStatus(c,u,C,f,m)}announceAriaStatus(e,t,s,i,o){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),d=`${e} ${a} ${t} ${l} ${s}`,c=`${r} ${i} ${l} ${o}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}setTotalLabelsToZero(){const e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}},Ay={selector:"AG-PAGINATION",component:My},Ty=class extends b{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return Ay}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;!this.active||t===e||typeof t!="number"||(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}isRowPresent(e){return e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;const t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return this.active?this.getPageForIndex(e.rowIndex)===this.currentPage:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return x(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:x(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:x(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:x(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const s=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}s!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const s=this.pageSize,i=t-1;this.totalPages=Math.floor(i/s)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,n=s*o;let r=s*(o+1)-1;if(r>i&&(r=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:s}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:s=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:i,keepRenderedRows:t})}},eu={moduleName:"Pagination",version:F,beans:[Ty,Fy],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:fy,paginationGetPageSize:my,paginationGetCurrentPage:Cy,paginationGetTotalPages:vy,paginationGetRowCount:wy,paginationGoToNextPage:by,paginationGoToPreviousPage:Sy,paginationGoToFirstPage:yy,paginationGoToLastPage:Ry,paginationGoToPage:xy},dependsOn:[Es]};function ky(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function tu(e,t,s,i,o){t&&(i&&t.parent&&t.parent.level!==-1&&tu(e,t.parent,s,i,o),t.setExpanded(s,void 0,o))}function Iy(e,t){return e.rowModel.getRowNode(t)}function Ly(e,t,s,i){e.rowRenderer.addRenderedRowListener(t,s,i)}function Oy(e){return e.rowRenderer.getRenderedNodes()}function Gy(e,t,s){e.rowModel.forEachNode(t,s)}function Hy(e){return e.rowRenderer.firstRenderedRow}function By(e){return e.rowRenderer.lastRenderedRow}function Vy(e,t){return e.rowModel.getRow(t)}function Ny(e){return e.rowModel.getRowCount()}var su={moduleName:"RowApi",version:F,apiFunctions:{redrawRows:ky,setRowNodeExpanded:tu,getRowNode:Iy,addRenderedRowListener:Ly,getRenderedNodes:Oy,forEachNode:Gy,getFirstDisplayedRowIndex:Hy,getLastDisplayedRowIndex:By,getDisplayedRowAtIndex:Vy,getDisplayedRowCount:Ny}},iu={moduleName:"ScrollApi",version:F,apiFunctions:{getVerticalPixelRange:$b,getHorizontalPixelRange:Kb,ensureColumnVisible:Ec,ensureIndexVisible:Dc,ensureNodeVisible:jb}};function zy(e,t,s){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;s===null?i.removeAttribute(o):i.setAttribute(o,s)}function Wy(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function _y(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function Uy(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function $y(e){e.animationFrameSvc?.flushAllFrames()}function Ky(e){return{rowHeight:Ke(e),headerHeight:ds(e)}}function jy(e,t={}){const s=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(n=>{const r=n.getCellRenderer();r!=null&&s.push(Bt(r))}),t.columns?.length)return s;const i=[],o=Dn(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(n=>{if(o&&!Pn(n.rowNode,o)||!n.isFullWidth())return;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&i.push(Bt(l))}}),[...i,...s]}var ou={moduleName:"RenderApi",version:F,apiFunctions:{setGridAriaProperty:zy,refreshCells:Wy,refreshHeader:_y,isAnimationFrameQueueEmpty:Uy,flushAllAnimationFrames:$y,getSizesForCurrentTheme:Ky,getCellRendererInstances:jy}};function qy(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function Yy(e,t,s){e.colAutosize?.autoSizeCols({colKeys:t,skipHeader:s,source:"api"})}function Qy(e,t){e.colAutosize?.autoSizeAllColumns("api",t)}var Zy=class extends b{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:s,skipHeaderGroups:i,stopAtGroup:o,source:n="api"}=e,{animationFrameSvc:r,renderStatus:a,colModel:l,autoWidthCalc:d,visibleCols:c}=this.beans;if(r?.flushAllFrames(),this.timesDelayed<5&&a&&!a.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const u=[];let h=-1;const g=s??this.gos.get("skipHeaderOnAutoSize"),p=i??g;for(;h!==0;){h=0;const f=[];t.forEach(m=>{if(!m)return;const C=l.getCol(m);if(!C||Ot(C)||u.indexOf(C)>=0)return;const v=d.getPreferredWidthForColumn(C,g);if(v>0){const S=Xy(C,v);C.setActualWidth(S,n),u.push(C),h++}f.push(C)}),f.length&&c.refresh(n)}p||this.autoSizeColumnGroupsByColumns(t,n,o),Gt(this.eventSvc,u,!0,"autosizeColumns")}autoSizeColumn(e,t,s){e&&this.autoSizeCols({colKeys:[e],skipHeader:s,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,s){const{colModel:i,ctrlsSvc:o}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=s;)c.isPadding()||n.add(c),c=c.getParent()});let a;const l=[];for(const d of n){for(const c of o.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(d),a)break;a&&a.resizeLeafColumnsToFit(t)}return l}autoSizeAllColumns(e,t){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}const s=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:s,skipHeader:t,source:e})}addColumnAutosize(e,t){const s=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",s)};e.addEventListener("dblclick",i);const o=new Rt(e);return o.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),o.removeEventListener("doubleTap",i),o.destroy()}}addColumnGroupResize(e,t,s){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const n=[];t.getDisplayedLeafColumns().forEach(a=>{a.getColDef().suppressAutoSize||n.push(a.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),s()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:s,scrollVisibleSvc:i}=this.beans,o=s.getGridBodyCtrl(),r=o.isVerticalScrollShowing()?i.getScrollbarWidth():0,l=Mt(o.eGridBody)-r;if(l>0){this.sizeColumnsToFit(l,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):R(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",s,i){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,s,i));return}const o={};i&&i?.columnLimits?.forEach(({key:g,...p})=>{o[typeof g=="string"?g:g.getColId()]=p});const n=this.beans.visibleCols.allCols,r=e===He(n);if(e<=0||!n.length||r)return;const a=[],l=[];n.forEach(g=>{g.getColDef().suppressSizeToFit===!0?l.push(g):a.push(g)});const d=a.slice(0);let c=!1;const u=g=>{ue(a,g),l.push(g)};for(a.forEach(g=>{g.resetActualWidth(t);const p=o?.[g.getId()],f=p?.minWidth??i?.defaultMinWidth,m=p?.maxWidth??i?.defaultMaxWidth,C=g.getActualWidth();typeof f=="number"&&C<f?g.setActualWidth(f,t,!0):typeof m=="number"&&C>m&&g.setActualWidth(m,t,!0)});!c;){c=!0;const g=e-He(l);if(g<=0)a.forEach(p=>{const f=o?.[p.getId()]?.minWidth??i?.defaultMinWidth;if(typeof f=="number"){p.setActualWidth(f,t,!0);return}p.setActualWidth(p.minWidth,t)});else{const p=g/He(a);let f=g;for(let m=a.length-1;m>=0;m--){const C=a[m],v=o?.[C.getId()],S=v?.minWidth??i?.defaultMinWidth,y=v?.maxWidth??i?.defaultMaxWidth,D=C.getMinWidth(),M=C.getMaxWidth(),A=typeof S=="number"&&S>D?S:D,T=typeof y=="number"&&y<M?y:M;let P=Math.round(C.getActualWidth()*p);P<A?(P=A,u(C),c=!1):P>T?(P=T,u(C),c=!1):m===0&&(P=f),C.setActualWidth(P,t,!0),f-=P}}}d.forEach(g=>{g.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!s&&Gt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:i,defaultMaxWidth:o}=e,n=s?.map(({colId:r,minWidth:a,maxWidth:l})=>({key:r,minWidth:a,maxWidth:l}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:o,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if(e?.type!=="fitCellContents")return;const{colIds:t,skipHeader:s}=e;setTimeout(()=>{t?this.autoSizeCols({colKeys:t,skipHeader:s,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",s)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Xy(e,t){const s=e.getMinWidth();t<s&&(t=s);const i=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=i),t}var nu={moduleName:"ColumnAutoSize",version:F,beans:[Zy],apiFunctions:{sizeColumnsToFit:qy,autoSizeColumns:Yy,autoSizeAllColumns:Qy},dependsOn:[jl]};function Jy(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function e1(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function t1(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function s1(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}var i1=class extends b{constructor(){super(...arguments),this.beanName="pinnedRowModel",this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}onGridStylesChanges(e){if(e.rowHeightChanged){const t=s=>{s.setRowHeight(s.rowHeight,!0)};ks(this.pinnedBottomRows,t),ks(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const s=i=>{if(i.rowHeightEstimated){const o=at(this.beans,i);i.setRowTop(t),i.setRowHeight(o.height),t+=o.height,e=!0}};return ks(this.pinnedBottomRows,s),t=0,ks(this.pinnedTopRows,s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const s=this.getCache(t);if(e===void 0){s.order.length=0,s.cache={};return}const i=ut(this.gos),o=t==="top"?La:Oa,n=new Set(s.order),r=[],a=new Set;let l=0,d=-1;for(const c of e){const u=i?.({data:c,level:0,rowPinned:t})??o+this.nextId++;if(a.has(u)){R(96,{id:u,data:c});continue}d++,a.add(u),r.push(u);const h=Ts(s,u);if(h!==void 0)h.data!==c&&h.setData(c),l+=this.setRowTopAndRowIndex(h,l,d),n.delete(u);else{const g=new bt(this.beans);g.id=u,g.data=c,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,d),s.cache[u]=g,s.order.push(u)}}n.forEach(c=>{Ts(s,c)?.clearRowTopAndRowIndex(),delete s.cache[c]}),s.order=r}setRowTopAndRowIndex(e,t,s){return e.setRowTop(t),e.setRowHeight(at(this.beans,e).height),e.setRowIndex(s),e.rowHeight}getPinnedTopTotalHeight(){return ru(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return ru(this.pinnedBottomRows)}getPinnedTopRowCount(){return zn(this.pinnedTopRows)}getPinnedBottomRowCount(){return zn(this.pinnedBottomRows)}getPinnedTopRow(e){return Nn(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Nn(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Ts(this.getCache(t),e)}forEachPinnedRow(e,t){return ks(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}};function ru(e){const t=zn(e);if(t===0)return 0;const s=Nn(e,t-1);return s===void 0?0:s.rowTop+s.rowHeight}function Ts(e,t){return e.cache[t]}function Nn(e,t){return Ts(e,e.order[t])}function ks(e,t){e.order.forEach((s,i)=>{const o=Ts(e,s);o&&t(o,i)})}function zn(e){return e.order.length}var au={moduleName:"PinnedRow",version:F,beans:[i1],apiFunctions:{getPinnedTopRowCount:Jy,getPinnedBottomRowCount:e1,getPinnedTopRow:t1,getPinnedBottomRow:s1}},o1=class extends ns{constructor(e,t,s){super(e.col,e.firstNode,s,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,s,i,o,n,r){this.eWrapper=s,super.setComp(e,t,s,i,o,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){this.rowNode.rowIndex!=null&&Hs(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){Mu(this.eGui,this.cellSpan.spannedNodes.size)}shouldRestoreFocus(){return this.beans.focusSvc.shouldRestoreFocus(this.cellSpan)}onFocusOut(){this.focusedCellPosition=void 0,super.onFocusOut()}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}isCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.addOrRemoveCssClass(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(li(t)){this.focusedCellPosition=void 0;return}const s=this.isCellFocused();s||(this.focusedCellPosition=void 0),e&&s&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},n1=class extends fi{onRowIndexChanged(){super.onRowIndexChanged(),this.getAllCellCtrls().forEach(e=>e.refreshAriaRowIndex())}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new o1(t,this,this.beans)}shouldRecreateCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!0:e.getCellSpan()!==t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},r1=class extends b{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,s=`${e}Ctrls`,i=this[s],o=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let a=!1;for(const d of n)d.isAlive()&&t?.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}a=!0;const g=new n1(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)});this[s]=r;const l=r.size===o;if(!(!a&&l)){for(const d of i.values())d.destroyFirstPass(!0),d.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,s=t?.getCellSpanByPosition(e);if(!s)return;const i=`${lu(e.rowPinned)}Ctrls`,o=this[i].get(s.firstNode);if(o)return o.getAllCellCtrls().find(n=>n.column===e.column)}getCtrls(e){const t=`${e}Ctrls`;return[...this[t].values()]}destroyRowCtrls(e){const t=`${e}Ctrls`;for(const s of this[t].values())s.destroyFirstPass(!0),s.destroySecondPass();this[t]=new Map}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},lu=e=>e??"center",a1=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;return this.spannedNodes.forEach(s=>{s!==this.lastNode&&(t+=s.rowHeight)}),e-t}},l1=class extends b{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:i,rowModel:o,valueSvc:n}}=this,{colDef:r}=t,a=new Map,l=s.getCallback("isFullWidthRow"),d=r.equals,c=r.spanRows,u=typeof c=="function";let h=null,g=null,p;const f=(C,v)=>{h=C,g=null,p=v},m=C=>{const v=!C.isExpandable()&&!C.group&&!C.detail&&(l?!l({rowNode:C}):!0);if(C.rowIndex==null||!v){f(null,null);return}if(h==null||C.level!==h.level||C.footer||g&&C.rowIndex-1!==g?.getLastNode().rowIndex){f(C,n.getValue(t,C));return}const S=n.getValue(t,C);if(u){const y=k(s,{valueA:p,nodeA:h,valueB:S,nodeB:C,column:t,colDef:r});if(!c(y)){f(C,S);return}}else if(d?!d(p,S):p!==S){f(C,S);return}g||(g=new a1(t,h),a.set(h,g)),g.addSpannedNode(C),a.set(C,g)};switch(e){case"center":o.forEachDisplayedNode?.(m);break;case"top":i?.forEachPinnedRow("top",m);break;case"bottom":i?.forEachPinnedRow("bottom",m);break}this[`${e}ValueNodeMap`]=a}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${lu(e.rowPinned)}ValueNodeMap`].get(e)}},d1=class extends b{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Y(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Y(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){this.addManagedEventListeners({modelUpdated:this.buildModelCaches.bind(this),pinnedRowDataChanged:this.buildPinnedCaches.bind(this)})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const s=this.createManagedBean(new l1(e));this.spanningColumns.set(e,s),s.buildCache("top"),s.buildCache("bottom"),s.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated(e){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const s=this.spanningColumns.get(e);return s?s.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:s}=this.beans,i=e.column,o=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(o);break;case"bottom":r=t?.getPinnedBottomRow(o);break;default:r=s.getRow(o)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const s=this.spanningColumns.get(e);if(s)return s.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[s,i]of this.spanningColumns)if(i.isCellSpanning(e)){const o=i.getCellSpan(e);t(s,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},du={moduleName:"CellSpan",version:F,beans:[d1,r1]},c1=class extends b{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,s=e.colDef,i=s.cellClassRules,o=this.getCellClassParams(e,s);Bo(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,o,n=>t.addOrRemoveCssClass(n,!0),n=>t.addOrRemoveCssClass(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let i;if(typeof s=="function"){const o=this.getCellClassParams(e,t);i=s(o)}else i=s;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,i=this.getCellClassParams(e,s);this.staticClasses.forEach(n=>t.addOrRemoveCssClass(n,!1));const o=this.beans.cellStyles.getStaticCellClasses(s,i);this.staticClasses=o,o.forEach(n=>t.addOrRemoveCssClass(n,!0))}getCellClassParams(e,t){const{value:s,rowNode:i}=this.cellCtrl;return k(this.beans.gos,{value:s,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},u1=class extends b{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,i){Bo(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,i),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let i;return typeof s=="function"?i=s(t):i=s,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new c1(e,t)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(o=>{s(o)})}},cu={moduleName:"CellStyle",version:F,beans:[u1]},uu={moduleName:"RowStyle",version:F,beans:[pp]};function h1(e,t){return!!e.colHover?.isHovered(t)}var g1=class extends b{constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){if(this.gos.get("columnHoverHighlight")){const e=this.beans.colHover;this.addManagedListeners(this.element,{mouseout:e.clearMouseOver.bind(e),mouseover:e.setMouseOver.bind(e,this.columns)})}}},p1="ag-column-hover",f1=class extends b{constructor(){super(...arguments),this.beanName="colHover"}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,s){const i=()=>{if(!this.gos.get("columnHoverHighlight"))return;const o=this.isHovered(s);t.addOrRemoveCssClass("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t||!this.gos.get("columnHoverHighlight"))return;const s=this.isHovered(e);t.addOrRemoveCssClass(p1,s)}addHeaderFilterColumnHoverListener(e,t,s,i){this.createHoverFeature(e,[s],i);const o=()=>{if(!this.gos.get("columnHoverHighlight"))return;const n=this.isHovered(s);t.addOrRemoveCssClass("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,s){e.createManagedBean(new g1(t,s))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},hu={moduleName:"ColumnHover",version:F,beans:[f1],apiFunctions:{isColumnHovered:h1}},m1=class extends b{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addEventListener(e,t){const s=this.wrapSvc?.wrap(t)??t,i=!Ss.has(e),o=i?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(s),this.eventSvc.addEventListener(e,s,i)}removeEventListener(e,t){const s=this.wrapSvc?.unwrap(t)??t,o=!!this.asyncListeners.get(e)?.delete(s);o||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeEventListener(e,s,o)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(n,r)=>{Ss.has(n)&&t(n,r)},i=(n,r)=>{Ss.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:i});const o=this.eventSvc;o.addGlobalListener(s,!1),o.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:i}=this,o=s?.unwrapGlobal(e)??e;if(i.has(o)){const{syncListener:r,asyncListener:a}=i.get(o);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((s,i)=>{s.forEach(o=>this.eventSvc.removeEventListener(i,o,t)),s.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(s=>this.eventSvc.removeGlobalListener(s,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:s,asyncListener:i})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function C1(e,t,s){e.apiEventSvc?.addEventListener(t,s)}function v1(e,t,s){e.apiEventSvc?.removeEventListener(t,s)}function w1(e,t){e.apiEventSvc?.addGlobalListener(t)}function b1(e,t){e.apiEventSvc?.removeGlobalListener(t)}var gu={moduleName:"EventApi",version:F,apiFunctions:{addEventListener:C1,addGlobalListener:w1,removeEventListener:v1,removeGlobalListener:b1},beans:[m1]},S1=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",y1=class extends b{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,s,i){e&&t.destroyBean(e);const o=ps(this.gos),{column:n,eGui:r}=t,a=n.getColDef();!i&&o&&!a.headerComponent&&(i=Nt(()=>r.querySelector(".ag-header-cell-text")));const l={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>s??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(l);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,s,i){e&&t.destroyBean(e);const o=ps(this.gos),{column:n,eGui:r}=t,a=n.getColGroupDef();!i&&o&&!a?.headerGroupComponent&&(i=Nt(()=>r.querySelector(".ag-header-group-text")));const l={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>s??(a&&a.headerTooltip),shouldDisplayTooltip:i};a&&(l.getColDef=()=>a);const d=this.createTooltipFeature(l);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,s){const{column:i,rowNode:o}=e,n=()=>{const l=i.getColDef(),d=o.data;if(l.tooltipField&&x(d))return Jt(d,l.tooltipField,i.isTooltipFieldContainsDots());const c=l.tooltipValueGetter;return c?c(k(this.gos,{location:"cell",colDef:i.getColDef(),column:i,rowIndex:e.cellPosition.rowIndex,node:o,data:o.data,value:e.value,valueFormatted:e.valueFormatted})):null},r=ps(this.gos);!s&&r&&!e.isCellRenderer()&&(s=Nt(()=>{const l=e.eGui;return l.children.length===0?l:l.querySelector(".ag-cell-value")}));const a={getColumn:()=>i,getColDef:()=>i.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>o,getGui:()=>e.eGui,getLocation:()=>"cell",getTooltipValue:t!=null?()=>t:n,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:s};return this.createTooltipFeature(a,this.beans)}refreshRowTooltip(e,t,s,i){const o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>s,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(o,n);return t.createBean(a,r)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=x(t.tooltipField)||x(t.tooltipValueGetter)||x(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},pu={moduleName:"Tooltip",version:F,beans:[y1],dynamicBeans:{tooltipFeature:El},userComponents:{agTooltipComponent:p0},dependsOn:[Es],css:[S1]},fu={moduleName:"Locale",version:F,beans:[Gd]},R1=class extends b{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Y(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s}=this.beans,i=e.autoHeightCols;let o=!1;t.forEachDisplayedNode?.(n=>{const r=n.__autoHeights;let a=at(this.beans,n).height;for(const l of i){if(this.colSpanSkipRow(l,n))return;let d=r?.[l.getColId()];const c=s?.getCellSpan(l,n);if(c){if(c.getLastNode()!==n)continue;if(d=s?.getCellSpan(l,n)?.getLastNodeAutoHeight(),!d)return}if(d==null)return;a=Math.max(d,a)}a!==n.rowHeight&&(n.setRowHeight(a),o=!0)}),o&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,s){if(e.__autoHeights||(e.__autoHeights={}),t==null){delete e.__autoHeights[s.getId()];return}const i=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipRow(e,t){const{colModel:s,colViewport:i,visibleCols:o}=this.beans;if(!s.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=o.getLeftColsForRow(t);break;case"right":n=o.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return n.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:o,column:n}=e,r=this.beans,a=c=>{if(e.editing||!e.isAlive()||!s.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=it(i),f=u+h+g+p,C=t.offsetHeight+f;if(c<5){const v=_(r),S=!v||!v.contains(t),y=C==0;if(S||y){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(o,C,n)},l=()=>a(0);l();const d=Le(r,t,l);return s.addDestroyFunc(()=>{d(),this.setRowAutoHeight(o,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}},mu={moduleName:"RowAutoHeight",version:F,beans:[R1]},x1={moduleName:"AllCommunity",version:F,dependsOn:[Kc,Qc,Zc,Yd,Ac,Tc,kc,Ic,Lc,Oc,Gc,Mc,wc,bc,Sc,vc,yc,Rc,Jc,Uc,eu,Xl,su,iu,ou,nu,Nl,au,zc,Td,cu,hu,uu,gu,kd,Xc,pu,fu,mu,Vl,jc,du]};export{Ss as ALWAYS_SYNC_GLOBAL_EVENTS,fl as AbstractClientSideNodeManager,Xe as AgAbstractInputField,gl as AgAbstractLabel,cs as AgCheckbox,Si as AgCheckboxSelector,ei as AgColumn,Io as AgColumnGroup,yl as AgInputDateField,yi as AgInputNumberField,Sl as AgInputNumberFieldSelector,bl as AgInputTextArea,Je as AgInputTextField,us as AgInputTextFieldSelector,Dl as AgPickerField,te as AgPromise,es as AgProvidedColumnGroup,vl as AgRadioButton,xi as AgSelect,Pl as AgSelectSelector,wl as AgToggleButton,lf as AgToggleButtonSelector,Uc as AlignedGridsModule,x1 as AllCommunityModule,Pa as AutoScrollService,Bh as BaseColsService,g0 as BaseComponentWrapper,Wd as BaseCreator,_d as BaseGridSerializingSession,Cl as BaseSelectionService,b as BeanStub,kd as CellApiModule,Tl as CellRangeType,du as CellSpanModule,cu as CellStyleModule,xs as ChangedPath,Ic as CheckboxEditorModule,jc as ClientSideRowModelApiModule,Kc as ClientSideRowModelModule,Xl as ColumnApiModule,nu as ColumnAutoSizeModule,hu as ColumnHoverModule,$r as ColumnKeyCreator,L as Component,Eo as CssClassManager,Qc as CsvExportModule,Gc as CustomEditorModule,vc as CustomFilterModule,kc as DateEditorModule,Sc as DateFilterModule,Vl as DragAndDropModule,Da as DragSourceType,gu as EventApiModule,Rc as ExternalFilterModule,il as FakeHScrollComp,ol as FakeVScrollComp,Ha as FilterWrapperComp,ts as GROUP_AUTO_COLUMN_ID,tl as GridBodyCtrl,Id as GridCoreCreator,Ll as GridCtrl,al as GridHeaderCtrl,Jc as GridStateModule,Fo as GroupInstanceIdCreator,cl as HeaderRowContainerCtrl,Xc as HighlightChangesModule,Zc as InfiniteRowModelModule,w as KeyCode,Oc as LargeTextEditorModule,We as LocalEventService,fu as LocaleModule,Gd as LocaleService,St as ManagedFocusFeature,Og as ModuleRegistry,Tc as NumberEditorModule,bc as NumberFilterModule,eu as PaginationModule,au as PinnedRowModule,yt as PopupComponent,Va as PositionableFeature,Wa as ProvidedFilter,yc as QuickFilterModule,jr as ROW_NUMBERS_COLUMN_ID,E as RefPlaceholder,ou as RenderApiModule,su as RowApiModule,mu as RowAutoHeightModule,Ja as RowContainerCtrl,Nl as RowDragModule,bt as RowNode,zc as RowSelectionModule,uu as RowStyleModule,yo as SELECTION_COLUMN_ID,iu as ScrollApiModule,Lc as SelectEditorModule,ml as ServerSideTransactionResultStatus,Fi as TabGuardClassNames,en as TabGuardComp,Ml as TabGuardCtrl,Al as TabGuardFeature,Ac as TextEditorModule,wc as TextFilterModule,El as TooltipFeature,pu as TooltipModule,Rt as TouchListener,Mc as UndoRedoEditModule,Yd as ValidationModule,Td as ValueCacheModule,kl as VanillaFrameworkOverrides,Od as _ALL_EVENTS,Nd as _ALL_GRID_OPTIONS,Bd as _BOOLEAN_MIXED_GRID_OPTIONS,Ps as _ColumnFilterModule,ql as _ColumnGroupModule,Kl as _ColumnMoveModule,Wc as _CsrmSsrmSharedApiModule,on as _DragModule,Ne as _EditCoreModule,So as _EmptyArray,Vh as _EmptyBean,Na as _FOCUS_MANAGED_CLASS,Bi as _FilterCoreModule,Hn as _FilterValueModule,Pd as _HeaderComp,zl as _HorizontalResizeModule,Md as _KeyboardNavigationModule,Ld as _PUBLIC_EVENTS,Es as _PopupModule,gi as _ROW_ID_PREFIX_ROW_GROUP,nn as _SharedDragAndDropModule,qc as _SharedExportModule,Zd as _SharedMenuModule,Nc as _SharedRowSelectionModule,An as _SortModule,_c as _SsrmInfiniteSharedApiModule,ii as _addColumnDefaultAndTypes,Sa as _addFocusableContainerListener,k as _addGridCommonParams,Pr as _anchorElementToMouseMoveEvent,he as _applyColumnState,hi as _areCellsEqual,qr as _areColIdsEqual,je as _areEqual,QC as _asThemeImpl,zu as _bindCellRendererToHtmlElement,Ar as _canSkipShowingRowGroup,Z as _clearElement,xo as _columnsMatch,uh as _combineAttributesAndGridOptions,pt as _convertColumnEventSourceType,Ma as _createCellId,Qr as _createColumnTree,Ga as _createGlobalRowEvent,hl as _createIcon,ge as _createIconNoSpan,Y as _debounce,gr as _defaultComparator,ss as _destroyColumnTree,ro as _doOnce,Ud as _downloadFile,Oe as _errMsg,O as _error,Ee as _escapeString,x as _exists,mt as _findFocusableElements,Ye as _findNextFocusableElement,To as _findTabbableParent,ya as _focusGridInnerElement,qe as _focusInto,vt as _focusNextGridCoreContainer,zd as _formatNumberCommas,In as _fuzzySuggestions,oo as _getAbsoluteHeight,jt as _getAbsoluteWidth,z as _getActiveDomElement,bu as _getAriaPosInSet,wo as _getCallbackForEvent,wt as _getCellByPosition,ko as _getCellCtrlForEventTarget,Ea as _getCellPositionForEvent,ca as _getCellRendererDetails,Xs as _getCheckboxLocation,ht as _getCheckboxes,ye as _getClientSideRowModel,Ht as _getColumnState,Ro as _getColumnsFromTree,_a as _getDefaultFloatingFilterType,_ as _getDocument,wg as _getEditorRendererDetails,ah as _getFillHandle,ha as _getFilterDetails,ga as _getFloatingFilterCompDetails,jo as _getFloatingFiltersHeight,o0 as _getGlobalGridOption,sh as _getGrandTotalRow,kg as _getGridRegisteredModules,Qs as _getGroupAggFiltering,Xt as _getGroupSelection,Lt as _getGroupSelectsDescendants,ih as _getGroupTotalRowCallback,Qt as _getHeaderCheckbox,Mo as _getHeaderClassesFromColDef,nl as _getHeaderRowCount,cg as _getInnerCellRendererDetails,Ns as _getInnerHeight,Mt as _getInnerWidth,Js as _getIsRowSelectable,Wi as _getLocaleTextFunc,Tr as _getMaxConcurrentDatasourceRequests,ui as _getNormalisedMousePosition,Ys as _getPageBody,dt as _getRootNode,ls as _getRowContainerClass,Vt as _getRowContainerOptions,Ke as _getRowHeightAsNumber,at as _getRowHeightForNode,ut as _getRowIdCallback,rs as _getRowNode,Zt as _getRowSelectionMode,Qa as _getRowSpanContainerClass,Uo as _getRowViewportClass,kn as _getServerSideRowModel,gf as _getShouldDisplayTooltip,rh as _getSuppressMultiRanges,Ng as _getToolPanelClassesFromColDef,ct as _isAnimateRows,xe as _isCellSelectionEnabled,J as _isClientSideRowModel,Gr as _isColumnMenuAnchoringEnabled,be as _isColumnsSortingCoupledToGroup,Q as _isDomLayout,Nr as _isElementInEventPath,Vo as _isEventFromPrintableCharacter,go as _isGetRowHeightFunction,Mr as _isGroupMultiAutoColumn,mo as _isGroupRowsSticky,Zs as _isGroupUseEntireRow,_e as _isIOSUserAgent,ba as _isKeyboardMode,re as _isLegacyMenuEnabled,It as _isMultiRowSelection,$s as _isNodeOrElement,fo as _isNothingFocused,zh as _isPromise,Aa as _isRowBefore,$e as _isRowSelection,Ta as _isSameRow,rt as _isServerSideRowModel,ps as _isShowTooltipWhenTruncated,Fe as _isStopPropagationForAgGrid,nh as _isUsingNewCellSelectionAPI,kr as _isUsingNewRowSelectionAPI,me as _isVisible,Tt as _jsonEquals,H as _last,At as _loadTemplate,Re as _makeNull,ie as _mergeDeep,V as _missing,Le as _observeResize,oe as _parseDateTimeFromString,Zu as _preInitErrMsg,_u as _preserveRangesWhile,hh as _processOnChange,Lu as _radioCssClass,Du as _removeAriaExpanded,er as _removeAriaSort,ue as _removeFromArray,ve as _removeFromParent,Pe as _requestAnimationFrame,na as _resetColumnState,qa as _selectAllCells,pe as _serialiseDate,Eu as _setAriaActiveDescendant,Au as _setAriaChecked,Zn as _setAriaColCount,$i as _setAriaColIndex,Xn as _setAriaColSpan,tr as _setAriaControls,yu as _setAriaDescribedBy,jn as _setAriaDisabled,Gs as _setAriaExpanded,Tu as _setAriaHasPopup,Ui as _setAriaHidden,Kt as _setAriaLabel,Os as _setAriaLabelledBy,Fu as _setAriaLevel,Yn as _setAriaPosInSet,X as _setAriaRole,Qn as _setAriaRowCount,Hs as _setAriaRowIndex,Bs as _setAriaSelected,qn as _setAriaSetSize,Jn as _setAriaSort,Xo as _setColMenuVisible,Pt as _setDisabled,N as _setDisplayed,we as _setFixedWidth,Lg as _setUmd,ar as _setVisible,Nt as _shouldDisplayTooltip,oh as _shouldUpdateColVisibilityAfterGroup,gt as _stopPropagationForAgGrid,Ks as _toStringOrNull,Bt as _unwrapUserComp,Yr as _updateColsMap,Jr as _updateColumnState,vr as _waitUntil,R as _warn,ot as _warnOnce,od as buttonStyleAlpine,nd as buttonStyleBalham,sd as buttonStyleBase,id as buttonStyleQuartz,Cs as checkboxStyleDefault,uv as colorSchemeDark,fv as colorSchemeDarkBlue,gv as colorSchemeDarkWarm,nv as colorSchemeLight,dv as colorSchemeLightCold,av as colorSchemeLightWarm,vs as colorSchemeVariable,Mi as columnDropStyleBordered,fn as columnDropStylePlain,n0 as createGrid,B as createPart,ms as createTheme,Sv as iconOverrides,ud as iconSetAlpine,hd as iconSetMaterial,ki as iconSetQuartz,Fv as iconSetQuartzBold,xv as iconSetQuartzLight,md as iconSetQuartzRegular,Mv as inputStyleBase,Ii as inputStyleBordered,Cd as inputStyleUnderlined,Ge as isColumn,W as isColumnGroup,ti as isColumnGroupAutoCol,De as isColumnSelectionCol,ee as isProvidedColumnGroup,Ot as isRowNumberCol,i0 as provideGlobalGridOptions,Rd as styleMaterial,bd as tabStyleAlpine,Lv as tabStyleBase,wd as tabStyleMaterial,vd as tabStyleQuartz,Sd as tabStyleRolodex,Wv as themeAlpine,Uv as themeBalham,jv as themeMaterial,yd as themeQuartz};